Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cuae2!ihnp4!inuxc!pur-ee!uiucdcs!uxc.cso.uiuc.edu!crimmins From: crimmins@uxc.cso.uiuc.edu.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: Need help with MS-DOS 3.1 and C Message-ID: <174200037@uxc.cso.uiuc.edu> Date: Wed, 18-Feb-87 16:05:00 EST Article-I.D.: uxc.174200037 Posted: Wed Feb 18 16:05:00 1987 Date-Received: Fri, 20-Feb-87 22:38:32 EST References: <227@uvicctr.UUCP> Lines: 43 Nf-ID: #R:uvicctr.UUCP:227:uxc.cso.uiuc.edu:174200037:000:1183 Nf-From: uxc.cso.uiuc.edu!crimmins Feb 18 15:05:00 1987 >In article <174200030@uxc.cso.uiuc.edu> crimmins@uxc.cso.uiuc.edu writes: >> (stuff deleted) >>With MSC, there are 5 predefined stream pointers...stdin, stdout, >>stderr, stdaux (COM1:), and stdprn (LPT1:). No opening is >>necessary...just write to the appropriate stream. This is all >>documented completely in the manuals. > >Yes, but what if you want to read binary from stdin, and write >binary to stdout??? > > S. John Banner Try: #include int result; result = setmode(fileno(stdin),O_BINARY); result = setmode(fileno(stdout),O_BINARY); This is taken directly from the MSC run-time library documentation, page 346-7. As an aside, I'd just like to add that I think the MSC documentation is a model of what good documentation should be. I have never had a problem that it did not cover, and is superb in all aspects. Congratulation, Microsoft. Keep up the good work. ---- Dan Crimmins University of Illinois at Urbana-Champaign Computing Services Office - Micro Consulting Dept. ARPA: crimmins@uiucuxc.cso.uiuc.edu BITNET: crimmins@uiucuxc.bitnet CSNET: crimmins@uiucuxc.csnet UUCP: {ihnp4,pur-ee,convex}!uiucdcs!uiucuxc!crimmins