Path: utzoo!utgpu!watmath!clyde!att!ucbvax!husc6!ukma!simon From: simon@ms.uky.edu (Simon Gales) Newsgroups: comp.sys.ibm.pc Subject: Re: Printer blues Keywords: printers binary Message-ID: <10652@s.ms.uky.edu> Date: 4 Dec 88 16:26:12 GMT References: <17693@santra.UUCP> <1156@bucket.UUCP> Reply-To: simon@ms.uky.edu (Simon Gales) Organization: U of Kentucky, Mathematical Sciences Lines: 27 In article <1156@bucket.UUCP> leonard@bucket.UUCP (Leonard Erickson) writes: > >The problem is simple. The answer may or may not be. You opened the file in >"cooked" (text) mode. In this mode ^Z signals end of file and ^I gets >translated into an "appropriate" number of spaces. > >What you want is "raw" (binary) mode. If your language doesn't have this >choice built in, you need to play with a byte in the file descriptor. I have tried to do this in RAW mode, in Microsoft C 5.0, but it does not cure this problem. I agree that it should, but I couldn't get it to work. It is probably a bug in either _setmode() or in the actual output routine. I patched around it by using the bios call for the printer, this seems to ignore tabs, doesn't add linefeeds, and passes the ^Z's on to the printer. /--------------------------------------------------------------------------\ Simon Gales@University of Ky UUCP: {rutgers, uunet}!ukma!simon Arpa: simon@ms.uky.edu MaBell: 263-2285/257-3597 BitNet: simon@UKMA.BITNET -- /--------------------------------------------------------------------------\ Simon Gales@University of Ky UUCP: {rutgers, uunet}!ukma!simon Arpa: simon@ms.uky.edu MaBell: 263-2285/257-3597 BitNet: simon@UKMA.BITNET