This is the mail archive of the email@example.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]
Re: proposed patch: fix console attribute glitching
- To: cygwin developers <firstname.lastname@example.org>
- Subject: Re: proposed patch: fix console attribute glitching
- From: Earnie Boyd <email@example.com>
- Date: Mon, 22 Mar 1999 18:23:16 -0800 (PST)
- Delivered-To: firstname.lastname@example.org
- Delivered-To: mailing list email@example.com
- Mailing-List: contact firstname.lastname@example.org; run by ezmlm
- Reply-To: email@example.com
- Sender: firstname.lastname@example.org
---Chris Faylor <email@example.com> wrote:
> 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.
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.
-- firstname.lastname@example.org --
-- http://www.freeyellow.com/members5/gw32/index.html --
PS: Newbie's, you should visit my page.
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com