Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!eecae!netnews.upenn.edu!rutgers!cmcl2!yale!spolsky-joel From: spolsky-joel@CS.YALE.EDU (Joel Spolsky) Newsgroups: comp.sys.ibm.pc Subject: Re: Text file conversion between UNIX and MSDOS Message-ID: <50186@yale-celray.yale.UUCP> Date: 9 Feb 89 23:53:31 GMT References: <89Feb9.123853est.2662@godzilla.eecg.toronto.edu> Sender: root@yale.UUCP Reply-To: spolsky-joel@CS.YALE.EDU (Joel Spolsky) Distribution: na Organization: Yale University Computer Science Dept, New Haven CT 06520-2158 Lines: 31 In article <89Feb9.123853est.2662@godzilla.eecg.toronto.edu> noworol@eecg.toronto.edu (Mark Noworolski) writes: >Very frequently when I get stuff off the net I run into the problem of >no carriage returns. It appears that UNIX stores text a little differently >from Messdos. Depends how you get it off the net. If you are using Kermit, you should be able to set a switch to convert CR->CR/LF on downloading. It's in the manual somewhere. The trick is to make sure kermit knows it's a text file. Otherwise try this: while ((c=getchar()) != EOF) { putchar(c); if (c==13) putchar(10); } /* did I get that right? no guarantees, it's just me rattling off untested code again... */ --- Oh, if you're using XENIX doscp, there is a switch to control CR-CR/LF translation. +----------------+----------------------------------------------------------+ | Joel Spolsky | bitnet: spolsky@yalecs.bitnet uucp: ...!yale!spolsky | | | internet: spolsky@cs.yale.edu voicenet: 203-436-1483 | +----------------+----------------------------------------------------------+ #include