Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!comp.vuw.ac.nz!actrix!ewen From: ewen@actrix.co.nz (Ewen McNeill) Newsgroups: comp.os.cpm Subject: Re: How "hard" is CR-LF Summary: Scan for LFs, instead of CRs. More portable. Keywords: text, utilites, CR, LF Message-ID: <1990Sep23.092141.1446@actrix.co.nz> Date: 23 Sep 90 09:21:41 GMT References: <4584@crash.cts.com> Sender: ewen@actrix.co.nz Followup-To: comp.os.cpm Organization: Actrix Public Access UNIX, Wellington, New Zealand Lines: 14 In article <4584@crash.cts.com> mwilson@crash.cts.com (Marc Wilson) writes: > Why don't you just scan for the CR? If you find one, then look > at the next character. If it's a LF, then throw it away. If it's > not, you've got a weird file. IMHO, the best idea is to scan for a LF. If you find a CR, then ignore it. This means that you can read in text files that were produced on Unix/Amiga/whatever which only have LFs, directly. If more CP/M utilities did this (UNARC does when typing a file from an archive), then life would be much nicer, and I could throw away my unix2cpm program. --- Ewen McNeill. Email: ewen@actrix.co.nz