Date: Sun, 21 May 2000 13:25:11 +0100 (BST) From: dwmalone@maths.tcd.ie To: FreeBSD-gnats-submit@freebsd.org Cc: bug-ncurses@gnu.org Subject: docs/18709: getch ncurses man page confuses noecho and echo. Message-ID: <200005211325.aa00961@walton.maths.tcd.ie>
index | next in thread | raw e-mail
>Number: 18709
>Category: docs
>Synopsis: getch ncurses man page confuses noecho and echo.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-doc
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: doc-bug
>Submitter-Id: current-users
>Arrival-Date: Sun May 21 05:30:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: David Malone
>Release: FreeBSD 5.0-CURRENT i386
>Organization:
School of Mathematics
>Environment:
FreeBSD 5.X and FreeBSD 4.X - I think 3.X uses a different version
of curses. Seems to be present in original ncurses import, and
consequently Redhat etc..
>Description:
The getch man page says:
If noecho has been set, then the character will also be
echoed into the designated window according to the follow-
ing rules: If the character is the current erase charac-
ter, left arrow, or backspace, the cursor is moved one
space to the left and that screen position is erased as if
delch had been called. If the character value is any
other KEY_ define, the user is alerted with a beep call.
Otherwise the character is simply output to the screen.
I think this should begin:
If echo has been set, ...
Actually, the behavior doesn't even match what is in the man page
then, but atleast is is closer. (This is regardless of if you call
keypag(stdscr, TURE) or not).
>How-To-Repeat:
Try the following program with (needs -lncurses to compile).
#include <ncurses.h>
int main(int argc,char **argv) {
initscr();
cbreak();
clear();
noecho();
move(0,0);
printw("Testing with noecho.");
move(1,0);
while( getch() != '\n' );
clear();
echo();
move(0,0);
printw("Testing with echo.");
move(1,0);
while( getch() != '\n' );
return(0);
}
>Fix:
--- /usr/src/contrib/ncurses/man/curs_getch.3x Tue Aug 24 02:06:39 1999
+++ curs_getch.3x Sun May 21 13:09:15 2000
@@ -57,7 +57,7 @@
mode). In half-delay mode, the program waits until a character is typed or the
specified timeout has been reached.
-If \fBnoecho\fR has been set, then the character will also be echoed into the
+If \fBecho\fR has been set, then the character will also be echoed into the
designated window according to the following rules:
If the character is the current erase character, left arrow, or backspace,
the cursor is moved one space to the left and that screen position is erased
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005211325.aa00961>
