X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <84dde90812221112t38ead661k3c1bcb4e6ccd4f1@mail.gmail.com> Date: Mon, 22 Dec 2008 14:12:11 -0500 From: "Linus Hicks" To: cygwin AT cygwin DOT com Subject: Re: Rationale for line-ending recommendation? In-Reply-To: <20081219170214.GX6830@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <877i5wlwc3 DOT fsf AT mcbain DOT luannocracy DOT com> <20081219090531 DOT GV14886 AT trikaliotis DOT net> <452D2288F0FE4F1898E686A227A022BD AT DFW5RB41> <20081219170214 DOT GX6830 AT calimero DOT vinschen DOT de> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Fri, Dec 19, 2008 at 12:02 PM, Corinna Vinschen wrote: > > Yeah, right, if this were in fact the 21st century, why would we ever > have to deal with a 30 year old, idiotic-from-the-start text file format > using two line ending chars? How quickly we forget... The first devices that had any understanding of this kind of data stream generated display characters through mechanical means - much like an old mechanical typewriter. These devices all had a carriage that moved left to right or right to left depending on whether you moved the paper or the print head while it struck an inked ribbon between a platen and character dies that supplied a limited and fixed set of characters. The people who designed these things obviously saw the carriage return as distinct from the linefeed. In fact, these devices had no capacity to buffer the input data stream and even at 300 baud, it took longer to return the carriage than the interval between characters. If you did not supply some non-printing characters in the data stream after the CR/LF sequence, it would print the next character about half way back to the beginning of the next line. If you sent only CR as line terminator, you got all lines printed on the same line and eventually ate a hole in the paper. If you sent only LF, the carriage would shortly reach the far right margin and print each line in one character position on separate lines. Early design decisions, however well considered, sometimes remain to encumber the future, often for reasons of compatibility. The constraints of available technology at the time of an innovation can play a crucial role in this process. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/