Path: utzoo!attcan!uunet!mcsun!ukc!edcastle!lismore!nick From: nick@lfcs.cs.edinburgh.ac.uk (Nick Rothwell) Newsgroups: comp.sys.mac.programmer Subject: \r, \n conversion in general (Re: Carriage Returns in ascii files) Message-ID: <5453@castle.ed.ac.uk> Date: 1 Aug 90 11:25:07 GMT References: <14711@csli.Stanford.EDU> <5434@castle.ed.ac.uk> <1806@mountn.dec.com> Reply-To: nick@lfcs.cs.edinburgh.ac.uk (Nick Rothwell) Organization: Computer Science, Edinburgh University Lines: 16 In article <1806@mountn.dec.com>, minow@mountn.dec.com (Martin Minow) writes: > 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. Makes sense. In fact, I was thinking of the more general problems when passing files to/from other machines. The \n - \r conversion in our Unix gateway is done automagically (according to whether the file type is TEXT and/or the owner is "unix" and/or the file exists and/or the file has some special finder info and/or ...) so moving binary files around requires some care. Nick Rothwell, Laboratory for Foundations of Computer Science, Edinburgh. nick@lfcs.ed.ac.uk !mcsun!ukc!lfcs!nick ~ ~~ ~~ ~~ ~~ Hey, son, get that DeLorean off the track! And ~~ ~~ ~~ ~~ ~ what have you done with all my lovely harpsichords?