deraadt@enme3.ucalgary.ca (Theo Deraadt) (08/13/89)
In article <15874@watdragon.waterloo.edu> rtczegledi@crocus.waterloo.edu (Richard Czegledi) writes: >Why couldn't they have done it proper? Lf is a line feed! and CR is a >carriage return. It's a pain when programs start sticking out LF's >in the middle of lines. Such programs usualy crap out on my terminal >(he who lives without a terminal for editing is not alive). Using two line terminators is braindead. Just because some I** guy decided to do things that way a long time ago, does not mean it makes sense. Might as well ask for ^Z terminated files.. gad.. make me puke. <tdr. Theo de Raadt (403) 289-5894 Calgary, Alberta, Canada
dillon@POSTGRES.BERKELEY.EDU (Matt Dillon) (08/25/89)
:Using two line terminators is braindead. Just because some I** guy
:decided to do things that way a long time ago, does not mean it makes
:sense. Might as well ask for ^Z terminated files.. gad.. make me puke.
: <tdr.
The original reason for having CR LF as a line terminator was that
the original teletypewriter performed two very different physical
actions for each character. In fact, it was considered really neat
that the TTY could begin the CR (carriage return) operation and, in
the midst of it, receive the LF and do the line feed simultaniously
with the carriage return. Also, a certain amount of time (NULs) was
required after the CR LF to allow the mechanism to reposition itself
before the TTY could begin printing again.
Needless to say, the CR LF convention lasted well beyond its
lifetime, mainly due to the conservatism of large corporations. In
fact, as we all note, CR LF is still very much alive.
^Z used to terminate files because, at the time CP/M was introduced
(and probably before, I'm only 23!), files were always record-aligned.
To have the fiction of arbitrarily sized files a ^Z somewhere in the
middle of the 'record' would terminate the file as far as most programs
were concerned.
Now, filesystems hide the record alignment and know exactly how
long the file is supposed to be. But, guess what? Yup, IBM-PC's still
use ^Z .. they have both the old and new method, in fact.
-Matt