Xref: utzoo comp.std.c:3759 comp.text.tex:3361 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!tcdcs!maths.tcd.ie!tim From: tim@maths.tcd.ie (Timothy Murphy) Newsgroups: comp.std.c,comp.text.tex Subject: DVItoPS on DECstation Summary: fopen(xyz, "rb") doesn't work on DECstation Keywords: fopen, binary-mode Message-ID: <1990Oct13.204721.8027@maths.tcd.ie> Date: 13 Oct 90 20:47:21 GMT Organization: Dept. of Maths, Trinity College, Dublin, Ireland. Lines: 22 I was recently compiling the TeX PostScript driver program dvitops on a DECstation, and was surprised to find that the compiler didn't like fopen(filename, "rb"); It didn't object at compile-time, but simply failed to open the file (returning NULL). (There was no problem once all the "rb"'s and "wb"'s were changed to "r" and "w".) I think it's quite a common practice to give the "rb" and "wb" arguments for Unix/DOS compatibility. Is this relying on the compiler's generosity? What does standard C say about it? And should the DECstation compiler have complained at compile-time, if it didn't understand the argument? -- Timothy Murphy e-mail: tim@maths.tcd.ie