Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!ucbvax!ucsfcgl!kneller From: kneller@ucsfcgl.UUCP Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Re: Unbuffered I/O using MicroSoft C 3.0 Message-ID: <10038@cgl.ucsf.edu.ucsfcgl.UUCP> Date: Sat, 31-Jan-87 23:42:19 EST Article-I.D.: cgl.10038 Posted: Sat Jan 31 23:42:19 1987 Date-Received: Sun, 1-Feb-87 11:48:48 EST References: <1867@sunybcs.UUCP> <645@uw-warp.UUCP> <650@uw-warp.UUCP> <2609@ecsvax.UUCP> Sender: daemon@ucsfcgl.UUCP Reply-To: kneller@cgl.ucsf.edu (Don Kneller) Distribution: net Organization: UCSF Computer Graphics Lab Lines: 16 Xref: watmath comp.lang.c:906 comp.sys.ibm.pc:1317 In article <2609@ecsvax.UUCP> bet@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@cgl.ucsf.edu BITNET: kneller@ucsfcgl.BITNET