From owner-freebsd-doc Sun May 21 5:30: 5 2000 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 38CFF37B68C for ; Sun, 21 May 2000 05:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id FAA67096; Sun, 21 May 2000 05:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id BBAE837B5BE for ; Sun, 21 May 2000 05:25:12 -0700 (PDT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 21 May 2000 13:25:11 +0100 (BST) Message-Id: <200005211325.aa00961@walton.maths.tcd.ie> Date: Sun, 21 May 2000 13:25:11 +0100 (BST) From: dwmalone@maths.tcd.ie Reply-To: dwmalone@maths.tcd.ie To: FreeBSD-gnats-submit@freebsd.org Cc: bug-ncurses@gnu.org X-Send-Pr-Version: 3.2 Subject: docs/18709: getch ncurses man page confuses noecho and echo. Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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 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