Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucsd!pacbell.com!decwrl!bacchus.pa.dec.com!shlump.nac.dec.com!mountn.dec.com!minow From: minow@mountn.dec.com (Martin Minow) Newsgroups: comp.sys.mac.programmer Subject: Re: Carriage Returns in ascii files Message-ID: <1806@mountn.dec.com> Date: 1 Aug 90 00:06:56 GMT References: <14711@csli.Stanford.EDU> <5434@castle.ed.ac.uk> Reply-To: minow@bolt.enet.dec.com (Martin Minow) Organization: Digital Equipment Corporation Lines: 13 In article <5434@castle.ed.ac.uk> nick@lfcs.ed.ac.uk (Nick Rothwell) notes that THINK C converts '\r' to '\n' when it reads files (and converts in the other direction when it writes files): > >This whole business really is a pain, especially if you want to start >doing things with binary files passed between different hosts. > If you open the file as fopen("file", "rb" [or "wb"]), THINK C supresses conversion. The 'b' (binary) mode is part of the ANSI C standard. It should be mentioned in the THINK C library documentation. Martin Minow minow@bolt.enet.dec.com