Binary I/O on stdin/stdout?
Arthur David Olson
ado at elsie.UUCP
Sun Apr 10 05:10:25 AEST 1988
> If UNIX needed this facility, and if it used "b" to indicate binary mode,
> FILE *binin = fdopen(fileno(stdin), "rb");
> FILE *binout= fdopen(fileno(stdout),"wb");
> /* use bin_in, bin_out instead of stdin, stdout */
> would do the job. Would this work in MSDOS?
Whether or not it works in MSDOS, it wouldn't work in draft proposed ANSI C
(which lacks an "fdopen" function).
--
ado at ncifcrf.gov ADO is a trademark of Ampex.
More information about the Comp.lang.c
mailing list