Newsgroups: comp.text Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: newline indicator(s) Message-ID: <1991Feb11.224826.5525@zoo.toronto.edu> Organization: U of Toronto Zoology References: <7813@exodus.Eng.Sun.COM> Date: Mon, 11 Feb 1991 22:48:26 GMT In article <7813@exodus.Eng.Sun.COM> tut@cairo.Eng.Sun.COM (Bill "Bill" Tuthill) writes: >... 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? ASCII gives you a choice. Normally, CR signifies move back to left margin and LF signifies go down to next line, so some combination of those two is the right choice for an end-of-line sequence (bearing in mind that line boundaries could also be stored as out-of-band data, e.g. length counts, in which case there *is* no such sequence). However, ASCII also specifies that a single character can be used as a line terminator if all parties involved agree on this, and that if so, it shall be LF, aka newline. So Unix is doing things right :-), MuShDOS is also technically right but is doing things the hard way -- a single terminator makes life a lot easier for software -- and MacOS is unequivocally broken. -- "Read the OSI protocol specifications? | Henry Spencer @ U of Toronto Zoology I can't even *lift* them!" | henry@zoo.toronto.edu utzoo!henry