[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Problem with from102cr in U2



Paul,

Well, if I'm going to use an external program, I can write my own, in
compiled BASIC.


Dead simple: open the input file, read each byte (via GET); if it's a line
feed, and the previous byte wasn't a carriage return, PUT two bytes (cr+lf)
into the output file, otherwise PUT what you GOT.


I wrote a generalization of that, to substitute anything for anything,
decades ago. I'll look and see if it still works.


But I'd prefer not to shell out of XyWrite to do this. So Carl's SE/F plus
RC seems perfect.



Another option might be tofrodos, which is available for a number of OSes. See http://www.thefreecountry.com/tofrodos/. I use it in Linux and it seems to clean out all the line feeds. Paul Lagasse
Reply to note from Harry Binswanger Thu, 24 Dec 2009 14:13:27 -0500 Harry:
But if the last character in the file is a line-feed...
True. It's a bug in XyWrite's implementation of the "wild line feed" wildcard.
Harry Binswanger hb@xxxxxxxx