Unbuffered I/O using MicroSoft C 3.0

kneller at ucsfcgl.UUCP kneller at ucsfcgl.UUCP
Sun Feb 1 14:42:19 AEST 1987


In article <2609 at ecsvax.UUCP> bet at ecsvax.UUCP (Bennett E. Todd III) writes:
>
>While setbuf will still be needed to get unbuffered I/O, there is a
>wondrously simple way to ensure that I/O doesn't get redirected without
>mucking about with DOS interrupts! Like so:
>
>	FILE *fopen(), *console;
>
>	console = fopen("\\dev\\con", "r");

One caveat is that the open will sometimes fail running under DOS 2.x.
DOS 3.x doesn't have this problem.
	Don Kneller
UUCP:	...ucbvax!ucsfcgl!kneller
ARPA:	kneller at cgl.ucsf.edu
BITNET:	kneller at ucsfcgl.BITNET



More information about the Comp.lang.c mailing list