Historical question: LF vs. CR\LF in text files

Greg Hunt hunt at dg-rtp.dg.com
Sat Jun 2 05:59:10 AEST 1990


In article <253 at samna.UUCP>, jeff at samna.UUCP (Jeff Barber) writes:
|> 
|> UNIX's representation was (IMHO) a real innovation since it
|> simplifies breaking text into lines in software.  The cost is
|> that you need a device driver to interpret control characters
|> on the way in from and out to the terminal.

You're correct in that it makes processing the lines in a file much
easier, but incorrect in assuming that UNIX invented the idea.  It
has been around for alot longer than UNIX, and was invented by 
someone else (I don't know who).  One example I know of is the Data
General AOS/VS series of computers, which have always interpreted LF
or "Newline" as meaning CR/LF if you're not using raw I/O.  

UNIX borrowed lots of ideas from other OS's, and vice-versa.  One thing
UNIX should have (IMHO) learned from other OS's but didn't, is to use
the ASCII FF "Form Feed" character.  It makes document writing so much
easier, since all printers I know of proper handle it.  It causes the
paper to go to the top of the next page.  The standard UNIX tools always
count the number of blank lines and dump them into the file before
printing.  Not only does that waste bytes, but it also means that the
document can only be printed on other printers with exactly the same
number of lines as the printer it was written for has.  Using FF, the
document frequently can be printed on other printers without hassles.

I run into this all the time.  UNIX documents never print right on my
AOS/VS printer, but AOS/VS documents always print right on my UNIX
printer.  Oh well, nobody said UNIX didn't make some big mistakes.

--
Greg Hunt                        Internet: hunt at dg-rtp.dg.com
Data Management Development      UUCP:     {world}!mcnc!rti!dg-rtp!hunt
Data General Corporation
Research Triangle Park, NC       These opinions are mine, not DG's.



More information about the Comp.unix.questions mailing list