86int readr(
int pipe,
char *buf,
int nbytes)
93unsigned long ncount,done;
101 fSuccess = ReadFile(pipe,buf,ncount*
sizeof(TCHAR),&done,NULL);
103 {error = GetLastError(); done = -1;
104 if ((error == 109)||(error == 232)) printf(
"\nERROR Broken pipe\n\n");}
106 done = read(pipe, buf, ncount);
109 fatal(
"Failed reading fifo");
122int writer(
int pipe ,
char *buf,
int nbytes)
128unsigned long ncount,done;
137 fSuccess = WriteFile(pipe,buf,ncount*
sizeof(TCHAR),&done,NULL);
139 {error = GetLastError(); done = -1;
140 if ((error == 109)||(error == 232)) printf(
"\nERROR Broken pipe\n\n");}
142 done = write(pipe, buf, ncount);
145 fatal(
"Failed writing fifo");