Date: Fri, 13 Mar 92 14:42:51 EST From: DJ Delorie To: ericb AT lsid DOT hp DOT com Cc: lee AT uhunix DOT uhcc DOT hawaii DOT edu, djgpp AT sun DOT soe DOT clarkson DOT edu Subject: djgpp ndmake and PBMPLUS >From: Eric Backus >Date: Fri, 13 Mar 92 10:31:59 PST >Mailer: Elm [revision: 66.25] Status: O >> } >There isn't much to do to port pbmplus to djgpp-msdos. Just set >> } >stdout to binary mode, and use "rb" mode in fopen(). And that has >> } >> } Note that binary to stdout will not work in 1.05 or before of djgpp; >> } it's fixed in 1.06 (mostly so that pbmplus will work!) >> >> Gee, I must just have imagined it worked for the past months. >> >> The modified files I mentioned do set stdout to binary for >> djgpp 1.05. I had to go to a little extra work, that's all. >Well, I THOUGHT I was able to set stdout to binary with >"setmode(stdout, O_BINARY)". Are you guys saying that this didn't >work? What else do I have to do? What do I have to do on 1.06? Yes, that is the correct statement, and in 1.06 it works correctly. However, it almost but not quite works in 1.05, especially if you try to print a ^Z character. Note that Turbo-C should have the same problem, since it's DOS related and not Turbo-C related. The missing command is to do an ioctl on stdout to set it into raw mode, else the ^Z gets dropped. In 1.06, this ioctl is tied to the setmode command. DJ dj AT ctron DOT com Life is a banana.