delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/03/22/21:22:53

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Message-ID: <19990323022316.26697.rocketmail@send102.yahoomail.com>
Date: Mon, 22 Mar 1999 18:23:16 -0800 (PST)
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Reply-To: earnie_boyd AT yahoo DOT com
Subject: Re: proposed patch: fix console attribute glitching
To: cygwin developers <cygwin-developers AT sourceware DOT cygnus DOT com>
MIME-Version: 1.0

---Chris Faylor <cgf AT cygnus DOT com> wrote:
--8<--
 
> An output of "\n" cause the cursor to be moved to the beginning of
> the next line.  For binary output this is not right.  The above code
> moves the cursor to just below its previous position.

--8<--

I beg to differ with you on this.  The \n moves the cursor to the next
line, same column.  The \r moves the cursor to the beginning of the
line.  This is also true in UNIX but the terminal devices handle
adding the \r to the output to move the cursor to the beginning of the
line when receiving the \n.  And even this can usually be turned off.

This also happens currently with cygwin.  To test this, modify the cat
program to use binary descriptors in all cases.  Try the notty option
and have a file with just \n endings and one with \r\n endings.  You
should be able to see the same results with the tty setting if you
turn off the addition of the \r in bash.

==
-                        \\||//
-------------------o0O0--Earnie--0O0o-------------------
--                earnie_boyd AT yahoo DOT com               --
-- http://www.freeyellow.com/members5/gw32/index.html --
----------------------ooo0O--O0ooo----------------------

PS: Newbie's, you should visit my page.
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019