Path: utzoo!dciem!nrcaer!scs!spl1!laidbak!att!osu-cis!tut.cis.ohio-state.edu!rutgers!iuvax!bobmon From: bobmon@iuvax.cs.indiana.edu (RAMontante) Newsgroups: comp.sys.ibm.pc Subject: Re: CR? LF? CRLF???? Message-ID: <9320@iuvax.cs.indiana.edu> Date: 2 Jun 88 22:30:51 GMT Article-I.D.: iuvax.9320 References: <1770@loral.UUCP> <17210@gatech.edu> Reply-To: bobmon@iuvax.UUCP (RAMontante) Organization: Computer Science Dept., Indiana University Lines: 24 jkg@gatech.UUCP (Jim Greenlee) writes: >jlh@loral.UUCP (The Mad Merkin Hunter) writes: >>Edlin rides the porcelan bus unless it >>sees a CR LF combination. So, is there an easy way in DOS or MKS vi >>to automatically do this conversion? > >The easiest way to do this is with MKS vi. Just vi the file and do a >":wq!". MKS vi automatically converts LF characters to CR/LF pairs >when it writes the file to disk. The trick is that you have to force You can also get this behavior with microemacs, cse (posted by, um, whatzisname from Colorado School of Mines), a recent posting of 'ed'... If you want to write a filter, it's remarkably easy in something like TurboC -- open the file in binary mode so that LF is sufficient to mark a line. Read in convienient-size chunks, write to a file that's been opened in text mode, and the newlines will "automagically" be sent out as CR/LFs. I expect MSC and other languages will offer the same binary/text behavior. -bob,mon "In this position, the skier is flying in a complete stall..." -- -bob,mon "In this position, the skier is flying in a complete stall..."