X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=pipe.h;h=a8b086bd55783bc2142efc292adeff20a869c6b0;hb=8c255c15cc55a2e5254152c8e07a8ab45b22b7af;hp=eecfb1ccd7e87850e04d3977babdac4672bf2746;hpb=5cd5185613348b13625e257efcd7b2f11ca85276;p=polyglot.git diff --git a/pipe.h b/pipe.h index eecfb1c..a8b086b 100644 --- a/pipe.h +++ b/pipe.h @@ -4,6 +4,9 @@ // includes #include +#include +#include +#include // 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;