// includes
#include <windows.h>
+#include <io.h>
+#include <fcntl.h>
+#include <stdio.h>
// constants
-const int LINE_INPUT_MAX_CHAR = 10*4096;
+// This should be bigger than the maximum length of an engine output or GUI
+// input line.
+const int LINE_INPUT_MAX_CHAR = 40960;
// defines
struct PipeStruct {
HANDLE hInput, hOutput;
+ FILE *fpInput;
HANDLE hProcess;
HANDLE hThread;
HANDLE hEvent;