version 1.4.55b
[polyglot.git] / pipex.h
diff --git a/pipex.h b/pipex.h
index e96457f..8a51652 100644 (file)
--- a/pipex.h
+++ b/pipex.h
@@ -36,7 +36,11 @@ typedef struct {
     volatile int nReadEnd;
     char lpBuffer[LINE_INPUT_MAX_CHAR];
     char lpReadBuffer[LINE_INPUT_MAX_CHAR];
+    char szWriteBuffer[LINE_INPUT_MAX_CHAR];
+    DWORD dwWriteIndex;
     const char *name;
+    const char *command;
+    BOOL quit_pending;
 
 } pipex_t;
 
@@ -66,6 +70,8 @@ typedef struct {
     io_t io[1];
     pid_t pid;
     int state;
+    bool quit_pending;
+    const char *command;
 } pipex_t;
 
 #endif
@@ -76,11 +82,13 @@ typedef struct {
 
 extern void pipex_open         (pipex_t *pipex, 
                                 const char *name,
+                                const char *working_dir,
                                 const char *command);
 extern bool pipex_active       (pipex_t *pipex);
 extern bool pipex_readln       (pipex_t *pipex, char *string);
 extern bool pipex_readln_nb    (pipex_t *pipex, char *string);
 extern void pipex_writeln      (pipex_t *pipex, const char *string);
+extern void pipex_write        (pipex_t *pipex, const char *string);
 extern bool pipex_eof          (pipex_t *pipex);
 extern void pipex_send_eof     (pipex_t *pipex);
 extern void pipex_exit         (pipex_t *pipex);