Diff for scripts/ep/dummy/dummy.c between version 1.3 and 1.4
| version 1.3, 2001/12/13 12:22:22 |
version 1.4, 2001/12/13 17:33:42 |
|
|
| fprintf(stderr, "DEBUG: stderr->_fileno = %d\n", stderr->_fileno); |
fprintf(stderr, "DEBUG: stderr->_fileno = %d\n", stderr->_fileno); |
| |
|
| while (fgets(buf, BUFSIZE - 1, stdin) != NULL) { |
while (fgets(buf, BUFSIZE - 1, stdin) != NULL) { |
| if (print_to_both(buf) == EOF) { |
if (print_to_both(buf)) { |
| print_to_both("print_to_both() error\n"); |
print_to_both("print_to_both() error\n"); |
| return 1; |
return 1; |
| } |
} |
|
|
| |
|
| int print_to_stdout(char *s) |
int print_to_stdout(char *s) |
| { |
{ |
| return fputs("stdout: ", stdout) |
return fputs("stdout: ", stdout) == EOF |
| || fputs(s, stdout); |
|| fputs(s, stdout) == EOF; |
| } |
} |
| |
|
| int print_to_stderr(char *s) |
int print_to_stderr(char *s) |
| { |
{ |
| return fputs("stderr: ", stderr) |
return fputs("stderr: ", stderr) == EOF |
| || fputs(s, stderr); |
|| fputs(s, stderr) == EOF; |
| } |
} |
| |
|
| int print_to_both(char *s) |
int print_to_both(char *s) |
Platon Group <platon@platon.org> http://platon.org/
|
|