Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!lll-lcc!well!ljz From: ljz@well.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: Need help with MS-DOS 3.1 and C Message-ID: <2590@well.UUCP> Date: Sun, 15-Feb-87 12:52:53 EST Article-I.D.: well.2590 Posted: Sun Feb 15 12:52:53 1987 Date-Received: Mon, 16-Feb-87 01:47:51 EST References: <784@cald80.UUCP> <174200030@uxc.cso.uiuc.edu> <227@uvicctr.UUCP> Reply-To: ljz@well.UUCP (Lloyd Zusman) Distribution: world Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 23 Keywords: C microsoft binary mode In article <227@uvicctr.UUCP> sbanner1@uvicctr.UUCP (S. John Banner) writes: >Yes, but what if you want to read binary from stdin, and write >binary to stdout??? You could then use the setmode() function (in the Microsoft C run-time library) to change the mode ... #include #include extern int errno; ... if(setmode(fileno(stdin), O_BINARY) == -1) printf("error = %d when changing mode to binary\n", errno); As described in the "Run-time Library Reference Manual", setmode() changes the mode (text or binary) of an already open file. Lloyd Zusman Master Byte Software ...!hplabs!well!ljz