15 #define PIPEX_EOF (1<<0)
16 #define PIPEX_ACTIVE (1<<1)
18 // This should be bigger than the maximum length of an engine output or GUI
21 #define LINE_INPUT_MAX_CHAR 4096
28 HANDLE hInput, hOutput;
33 CRITICAL_SECTION CriticalSection;
35 volatile char * lpFeedEnd;
36 volatile int nReadEnd;
37 char lpBuffer[LINE_INPUT_MAX_CHAR];
38 char lpReadBuffer[LINE_INPUT_MAX_CHAR];
39 char szWriteBuffer[LINE_INPUT_MAX_CHAR];
53 #include <sys/types.h>
56 #include <sys/resource.h>
64 #define PIPEX_EOF (1<<0)
65 #define PIPEX_ACTIVE (1<<1)
79 // part common to WIN32 and POSIX
83 extern void pipex_open (pipex_t *pipex,
85 const char *working_dir,
87 extern bool pipex_active (pipex_t *pipex);
88 extern bool pipex_readln (pipex_t *pipex, char *string);
89 extern bool pipex_readln_nb (pipex_t *pipex, char *string);
90 extern void pipex_writeln (pipex_t *pipex, const char *string);
91 extern void pipex_write (pipex_t *pipex, const char *string);
92 extern bool pipex_eof (pipex_t *pipex);
93 extern void pipex_send_eof (pipex_t *pipex);
94 extern void pipex_exit (pipex_t *pipex);
95 extern void pipex_set_priority (pipex_t *pipex, int value);
96 extern void pipex_set_affinity (pipex_t *pipex, int value);
97 extern void pipex_wait_event (pipex_t *pipex[]);