Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Oct 1996 00:29:50 +0000 ()
From:      hmmm <hmmm@alaska.net>
To:        patl@Phoenix.volant.org
Cc:        kuku@gilberto.physik.rwth-aachen.de, jsigmon@www.hsc.wvu.edu, randyd@nconnect.net, questions@FreeBSD.org
Subject:   Re: MS-DOS text files in UNIX
Message-ID:  <Pine.BSF.3.95.961010205555.262C-100000@hmmm.alaska.net>
In-Reply-To: <9610101651.AA27996@asimov.volant.org>

next in thread | previous in thread | raw e-mail | index | archive | help

------------------------------------------------------------------------------
 Harry Browne for President!                      http://www.alaska.net/~hmmm
------------------------------------------------------------------------------

On Thu, 10 Oct 1996 patl@asimov.volant.org wrote:

> |>  hmmm writes:
> |>  > 
> |>  > apple/mac uses CR
> |>  > dos/win   uses LF/CR
> |>    dos/win uses CR/LF
> |>    VMS     uses CR/LF
> |>  > unixes    use  LF
> 
> No, actually unix uses NL (New Line), not LF (Line Feed).  It just happens
> that they both have the same encoding.  The difference is in interpretaton
> and goes back to the ASCII standards of the late 60's.  According to the
> standard (which at that time was based on printers and printing terminals),
> CR means go to the beginning of the current line, LF means move to the
> current horizontal position in the next line, and NL means move to the
> beginning of the next line.  LF and NL have the same encoding primarily
> because devices built to an earlier version of the standard disagreed on
> how that code should be interpreted.  (The earlier standard was unclear
> on that detail.)
> 
> In any case, CR/LF, LF/CR, and NL are all legitimate standard end-of-line
> indicators.  The Apple CR is not.  Unix chose NL for brevity and clarity.
> (Otherwise what does a lone LF or CR mean in the midst of a text file?)
> MS-Windows uses CR/LF because MS-DOS used CR/LF because CP-M used CR/LF.
> I don't know why CP-M used CR/LF; but if I had to guess, I would suspect
> that the original developer(s) were using a printer that subscribed to
> the CR/LF interpretation.

> P.S.	Yes, I know that this reply is -way- late; but I just got the cycles
> 	to catch up on this mailing list for the first time in weeks...

thanks - that was a very good explanation.  i quit the list because i
never heard the end of my "LF/CR" (CR/LF) note.  i meant to only list
them, not ORDER them.

as an embedded systems/driver hacker, at times i get frustrated with the
kludges we create for compatabilities sake.  i get a little tired
programming a zillion things that have nothing to do with the task at
hand, but more to do with remaining "compatable".  for example, at this
time my monitoring units have to talk 

SDLC - for the synch mainframes
HDLC - for old mainframes that upgraded their modems
SNMP - proposed protocol
HTML - realistic protocol
NASMD- division specific protocol.

plus many other additional protocols for local interfaces.  and this is
just to communicate the info that my 3 different A2D chips, 2 different
PIO chips, on 3 versions of motherboards just to relay the info my 
REAL code monitors. and we're talking all hand written code for embedded
systems!  good grief!

working with UNIX as of late; i have become enlightened to certain things.
i believe that if i were to give a PC to an intelligent alien race, after
some time, just based on intelligent reason & logic, they would develop a
UNIX clone.  it appears to me that UNIX is a not just code, it is a
Philosophy of reason & logic applied to Binary machines.

ps. has anyone ever considered MS to be a communist plot to subvert
capitalism by killing our economy via unproductivity? :)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.961010205555.262C-100000>