Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!samsung!emory!att!cbnewsl!npn From: npn@cbnewsl.att.com (nils-peter.nelson) Newsgroups: comp.text Subject: Re: newline indicator(s) Summary: Boring history Message-ID: <1991Feb12.160955.19741@cbnewsl.att.com> Date: 12 Feb 91 16:09:55 GMT References: <7813@exodus.Eng.Sun.COM> Distribution: na Organization: AT&T Bell Laboratories Lines: 30 In article <7813@exodus.Eng.Sun.COM>, tut@cairo.Eng.Sun.COM (Bill "Bill" Tuthill) writes: > The world's three most important operating systems-- Unix, MS-DOS, > and MacOS-- all employ different methods for separating lines from > each other. Unix uses linefeed only, MS-DOS uses carriage return > and linefeed, and MacOS uses carriage return only. > > My question is this: do any standards specify how lines should be > kept apart? That is, do any of these three operating systems have > any justification (other than space savings in the case of Unix and > MacOS) for doing things they way they did? Oldest operating systems (mostly IBM, but also CDC, GCOS (GE/Honeywell), Univac, etc) used a card-image convention-- every line stored as 80 characters (lots of trailing blanks). It was quite an innovation to go to "variable length records." In these, no motion character was needed, although many included one any way. Ken Thompson hated all these conventions, since they made software very complex-- there were 10 or more different "record types"-- and when he created Unix he chose the simplest convention he could think of. He chose newline (octal 12) because on the Model 37 Teletype that character caused both flyback (carriage return) and one vertical space. The convention is arbitrary, since some low-level terminal driver still had to add delays after the motion character on mechanical devices. At least the conventions you showed can be mapped. Binary format is hopeless, and there is no standard.