version 1.7, 1997/09/01 23:24:23 |
version 1.8, 2000/04/20 06:19:33 |
|
|
sig_t f; |
sig_t f; |
char r; |
char r; |
|
|
pwrite(FD, buf, size(buf)); |
parwrite(FD, buf, size(buf)); |
quit = 0; |
quit = 0; |
kill(pid, SIGIOT); |
kill(pid, SIGIOT); |
read(repdes[0], (char *)&ccc, 1); /* Wait until read process stops */ |
read(repdes[0], (char *)&ccc, 1); /* Wait until read process stops */ |
|
|
* finish command |
* finish command |
*/ |
*/ |
r = '\r'; |
r = '\r'; |
pwrite(FD, &r, 1); |
parwrite(FD, &r, 1); |
do |
do |
read(FD, &c, 1); |
read(FD, &c, 1); |
while ((c&STRIP_PAR) != '\n'); |
while ((c&STRIP_PAR) != '\n'); |
|
|
int retry = 0; |
int retry = 0; |
|
|
cc = c; |
cc = c; |
pwrite(FD, &cc, 1); |
parwrite(FD, &cc, 1); |
#ifdef notdef |
#ifdef notdef |
if (number(value(CDELAY)) > 0 && c != '\r') |
if (number(value(CDELAY)) > 0 && c != '\r') |
nap(number(value(CDELAY))); |
nap(number(value(CDELAY))); |
|
|
printf("\r\ntimeout error (%s)\r\n", ctrl(c)); |
printf("\r\ntimeout error (%s)\r\n", ctrl(c)); |
if (retry++ > 3) |
if (retry++ > 3) |
return; |
return; |
pwrite(FD, &null, 1); /* poke it */ |
parwrite(FD, &null, 1); /* poke it */ |
goto tryagain; |
goto tryagain; |
} |
} |
} |
} |