[Coco] End-of-Line Character

John W. Linville linville at tuxdriver.com
Sun May 6 13:52:47 EDT 2007


On Sun, May 06, 2007 at 12:21:07PM -0500, Roger Taylor wrote:
> At 03:54 PM 5/5/2007, you wrote:

> I think this is probably the biggest stinkin' issue with computer 
> file compatibility, and I can't understand why print drivers, 
> terminal programs, etc. can't just add a line feed (10) if one is 
> needed for the end device used to print or display the file.  Some 
> computers use just a line feed (10) for the carriage return, causing 
> an even bigger headache, but you knew this, too.  I think any OS that 
> does this was purposely designed that way as a rebelious act. :)  It 
> just goes to prove that nobody really sticks to the standards anymore.

Anymore?  Unix has used LF line termination since before I was born! :-)

CR/LF made sense for use w/ teletype machines, where "carriage return"
and "line feed" are two distinct actions.  But the same programmer's
who eventually gave us the Y2K hysteria^H^H^H^H^H^H^H^Hcrisis probably
thought that saving one byte for each line of text made sense.  It is
a shame that not everyone could pick the same character to drop...

> Even some of the text file converters are a nightmare, making you 
> specify command-line switches as if you already know what format the 
> file is in.  There's also the issue of whether 10 comes before 13 or 
> after.  Maybe we need a command that lets you specify -fromwindows 
> -tolinux, or -fromlinux -tococo, etc.

man dos2unix
man unix2dos

Both have a "mac" mode as well.  I think mac mode should work for coco.

John
-- 
John W. Linville
linville at tuxdriver.com



More information about the Coco mailing list