File descriptors and streams and co
RAMontante
bobmon at iuvax.cs.indiana.edu
Thu Apr 20 01:05:23 AEST 1989
I've approached this "changing stdin" idea from the other way around:
all my I/O calls are of the form
fgets(buffer, size, MyIn);
fputs(string, MyOut);
and the initialization logic is sort of like:
if (input_name_supplied) {
MyIn = fopen(input_name,"r");
/* what? me, error-check? */
} else
MyIn = stdin;
/* likewise for output */
For what kinds of situation is this approach inadequate?
More information about the Comp.lang.c
mailing list