From dwmalone@maths.tcd.ie  Sun May 21 05:25:13 2000
Return-Path: <dwmalone@maths.tcd.ie>
Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11])
	by hub.freebsd.org (Postfix) with SMTP id BBAE837B5BE
	for <freebsd-gnats-submit@freebsd.org>; 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 <aa36222@salmon>; 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
Sender: dwmalone@maths.tcd.ie
Reply-To: dwmalone@maths.tcd.ie
To: FreeBSD-gnats-submit@freebsd.org
Cc: bug-ncurses@gnu.org
Subject: getch ncurses man page confuses noecho and echo.
X-Send-Pr-Version: 3.2

>Number:         18709
>Category:       docs
>Synopsis:       getch ncurses man page confuses noecho and echo.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 21 05:30:01 PDT 2000
>Closed-Date:    Mon Jul 10 03:41:24 PDT 2000
>Last-Modified:  Mon Jul 10 03:42:55 PDT 2000
>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:
State-Changed-From-To: open->feedback 
State-Changed-By: alex 
State-Changed-When: Mon Jun 12 09:04:07 PDT 2000 
State-Changed-Why:  
I'd like to see that you backcontribute this to the ncurses authors, if 
not already fixed. 
We rarely change things in contrib/, and if, only in important cases. 

Maybe it's already fixed in the original version. 
Could you try to find that out? We can then import the vendor-fix, which 
is much better. 

Thanks! 


http://www.freebsd.org/cgi/query-pr.cgi?pr=18709 
State-Changed-From-To: feedback->suspended  
State-Changed-By: dannyboy 
State-Changed-When: Fri Jul 7 19:05:37 PDT 2000 
State-Changed-Why:  
This was fixed on the 27th of May by the ncurses people. 
The next ncurses release should have the fix in it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18709 
State-Changed-From-To: suspended->closed  
State-Changed-By: dannyboy 
State-Changed-When: Mon Jul 10 03:41:24 PDT 2000 
State-Changed-Why:  
ncurses 5.1 prerelease, now in both HEAD and RELENG_4, fixes this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18709 
>Unformatted:
