version 1.4w10UCIb22
[polyglot.git] / pipe.h
diff --git a/pipe.h b/pipe.h
index eecfb1c..a8b086b 100644 (file)
--- a/pipe.h
+++ b/pipe.h
@@ -4,6 +4,9 @@
 // includes
 
 #include <windows.h>
+#include <io.h>
+#include <fcntl.h>
+#include <stdio.h>
 
 // constants
 
@@ -19,6 +22,7 @@ const int LINE_INPUT_MAX_CHAR = 10*4096;
 struct PipeStruct {
 
     HANDLE hInput, hOutput;
+    FILE *fpInput;
     HANDLE hProcess;
     HANDLE hThread;
     HANDLE hEvent;
@@ -28,6 +32,7 @@ struct PipeStruct {
     CRITICAL_SECTION CriticalSection;
 
     volatile DWORD state;
+    volatile char * lpFeedEnd;
     volatile int nReadEnd;
     char lpBuffer[LINE_INPUT_MAX_CHAR];
     char lpReadBuffer[LINE_INPUT_MAX_CHAR];
@@ -40,8 +45,7 @@ struct PipeStruct {
     bool Active(void);
     void set_Active(void);
     void ReadInput(void);
-    int ReadLine(void);
-    bool CheckInput(void);
+    int ReadData(void);
     bool GetBuffer(char *szLineStr);
     void LineInput(char *szLineStr);
     void LineOutput(const char *szLineStr) const;