bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cbreak+echo+nl: carriage return but no newline


From: Thomas Dickey
Subject: Re: cbreak+echo+nl: carriage return but no newline
Date: Tue, 12 Mar 2024 08:18:03 -0400 (EDT)

----- Original Message -----
| From: "Thomas Dickey" <dickey@his.com>
| To: "G. Branden Robinson" <g.branden.robinson@gmail.com>
| Cc: "Ncurses Mailing List" <bug-ncurses@gnu.org>
| Sent: Tuesday, March 12, 2024 7:23:45 AM
| Subject: Re: cbreak+echo+nl: carriage return but no newline

| On Tue, Mar 12, 2024 at 03:31:44AM -0500, G. Branden Robinson wrote:
|> Hi folks,
|> 
|> I'm working on a revision of the getch(3X) man page and a simple
|> experiment has left me stumped.  The attached sample program, as I
|> understand the man page, _should_ move the cursor down one row when the
|> user types a carriage return.  But, for me, it doesn't.
|> 
|> Here's the existing man page language:
|> 
|>      If echo is enabled, and the window is not a pad, then the character
|>      will also be echoed into the designated  window  according  to  the
|>      following rules:

echoing is down (as-if) using addch

https://invisible-island.net/ncurses/man/curs_addch.3x.html#h3-Adding-Characters

|> 8.  No "translation" (or supplementary) line feed occurs.

translation happens after echoing

|> 
|> What gives?
| 
| The test program doesn't show the effect of "translated".
| Here's an updated version which may help clarify that.

-- 
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]