Debian bug report logs - #731
ncurses wgetnstr doesn't work

Package: ncurses; Reported by: iwj10@cus.cam.ac.uk (Ian Jackson); 211 days old.

Message received at debian-bugs:


From cus.cam.ac.uk!iwj10 Thu Jun  1 04:08:49 1995
Return-Path: <iwj10@cus.cam.ac.uk>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sH87M-0007osC; Thu, 1 Jun 95 04:08 PDT
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA18806
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Thu, 1 Jun 1995 04:07:21 -0700
Received: by bootes.cus.cam.ac.uk 
	(Smail-3.1.29.0 #36) id m0sH7p2-000BzIC; Thu, 1 Jun 95 11:49 BST
Received: by chiark
	id <m0sGtk3-0000XQZ@chiark.al.cl.cam.ac.uk>
	(Debian /\oo/\ Smail3.1.29.1 #29.31); Wed, 31 May 95 20:47 BST
Message-Id: <m0sGtk3-0000XQZ@chiark.al.cl.cam.ac.uk>
Date: Wed, 31 May 95 20:47 BST
From: iwj10@cus.cam.ac.uk (Ian Jackson)
To: debian-bugs@pixar.com
Subject: Re:  Bug#731: ncurses wgetnstr doesn't work
In-Reply-To: <m0sGaKk-0007mpC@mongo.pixar.com>
References: <m0sGaKk-0007mpC@mongo.pixar.com>

Bruce Perens writes ("Re:  Bug#731: ncurses wgetnstr doesn't work"):
> [Second try - the first try filed my reply as a new bug, I don't know why]

The subject line of your first message started with `Re: Re:' - see
the tracking system logs.  The bug processor only strips one `Re:'.

> From: zmbenhal@netcom.com
> [...]
> >> Furthermore, when run inside a mono xterm (xbaseR6 3.1.1-7), it does
> >> something nasty to the xterm and/or ncurses's state, so that the arrow
> >> keys and so forth don't work any more.  This last problem doesn't
> >> appear on a Linux console (1.2.0) with TERM=linux.
> >
> >This is still the case in an xterm.  I haven't tested it on a VC.
> 
> I don't know where Eric gets his definitions for xterm, but my xterm has
> different F1-F5, both HOME and END send ^[O^@.
> The arrow keys do work though.

My (Debian) xterm sends ESC O M-C-p (ie, 27 79 144) for END, and ESC O
NUL (27 79 0) for HOME.

Ian.

Acknowledgement sent to iwj10@cus.cam.ac.uk (Ian Jackson):
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#731; Package ncurses. Full text available.

Message received at debian-bugs:


From pixar.com!bruce Tue May 30 16:06:02 1995
Return-Path: <bruce@pixar.com>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0sGaML-0007hdC; Tue, 30 May 95 16:06 PDT
Received: from mongo.pixar.com by pixar.com with SMTP id AA14063
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Tue, 30 May 1995 16:04:36 -0700
Received: by mongo.pixar.com (Smail3.1.28.1 #15)
	id m0sGaKk-0007mpC; Tue, 30 May 95 16:04 PDT
Message-Id: <m0sGaKk-0007mpC@mongo.pixar.com>
Date: Tue, 30 May 95 16:04 PDT
From: bruce@pixar.com (Bruce Perens)
To: debian-bugs@pixar.pixar.com, iwj10@cus.cam.ac.uk (Ian Jackson)
Subject: Re:  Bug#731: ncurses wgetnstr doesn't work

[Second try - the first try filed my reply as a new bug, I don't know why]

From: zmbenhal@netcom.com
>Date: Wed, 3 May 95 13:03 BST
>From: iwj10@cus.cam.ac.uk (Ian Jackson)
>Subject: Re: Bug#731: ncurses wgetnstr doesn't work
>
>The behaviour here is now somewhat better, but still odd.  It issues a
>beep not when you fill the buffer, but when you first delete a
>character after having filled it.

Well, it IS trying to beep, but since output does not get flushed the
bell sound later when something causes the flush. I'm not quite sure
why backspacing flushes output whilst beep does not. Adding wrefresh(win)
after beep() in lib_getstr.c will make it work but is not really a solution.

>> Alternatively, perhaps I shouldn't really be seeing those characters;
>> I turned echo on with echo() before the call to wgetnstr because
>> otherwise I didn't see any output at all.  The manpage is unclear
>> about what effect the echo setting has on the behaviour of wgetnstr.
>
>The documentation is still unclear about this.

That's because SVR4's documentation is also unclear. I guess we could
document the extisting behavior.

>> Furthermore, when run inside a mono xterm (xbaseR6 3.1.1-7), it does
>> something nasty to the xterm and/or ncurses's state, so that the arrow
>> keys and so forth don't work any more.  This last problem doesn't
>> appear on a Linux console (1.2.0) with TERM=linux.
>
>This is still the case in an xterm.  I haven't tested it on a VC.

I don't know where Eric gets his definitions for xterm, but my xterm has
different F1-F5, both HOME and END send ^[O^@.
The arrow keys do work though.
--
-- Attention Ham Radio Operators: For information on "Linux for Hams", read
-- the World Wide Web page http://www.hams.com/perens/LinuxForHams, or send
-- an e-mail message containing the word "help" to info@hams.com .

Acknowledgement sent to bruce@pixar.com (Bruce Perens):
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#731; Package ncurses. Full text available.

Message received at debian-bugs:


From cus.cam.ac.uk!iwj10 Wed May  3 07:13:46 1995
Return-Path: <iwj10@cus.cam.ac.uk>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0s6fBS-000647C; Wed, 3 May 95 07:13 PDT
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA14794
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Wed, 3 May 1995 07:12:22 -0700
Received: by bootes.cus.cam.ac.uk 
	(Smail-3.1.29.0 #36) id m0s6fB9-000C0dC; Wed, 3 May 95 15:13 BST
Received: by chiark
	id m0s6d91-0000XQZ
	(Debian /\oo/\ Smail3.1.29.1 #29.30); Wed, 3 May 95 13:03 BST
Message-Id: <m0s6d91-0000XQZ.ijackson@nyx.cs.du.edu>
Date: Wed, 3 May 95 13:03 BST
From: iwj10@cus.cam.ac.uk (Ian Jackson)
To: Debian bugs submission address <debian-bugs@pixar>
Subject: Re: Bug#731: ncurses wgetnstr doesn't work
In-Reply-To: <5564808@toto.iv>

I wrote:
> The `search' option in dselect 0.93.35 exhibits bug(s) in ncurses's
> wgetnstr routine.
> 
> It appears always to return ERR, or to set the returned string to the
> empty string (it's not clear which).  

This appears to work in ncurses 1.9.0c-0.

>  When I try it I'm able to type
> much more into the prompt than I'm supposed to be able to - according
> to the manpage I should only be able to type as many characters as the
> size I've specified (which is 49 in this case).

The behaviour here is now somewhat better, but still odd.  It issues a
beep not when you fill the buffer, but when you first delete a
character after having filled it.

> Alternatively, perhaps I shouldn't really be seeing those characters;
> I turned echo on with echo() before the call to wgetnstr because
> otherwise I didn't see any output at all.  The manpage is unclear
> about what effect the echo setting has on the behaviour of wgetnstr.

The documentation is still unclear about this.

> Furthermore, when run inside a mono xterm (xbaseR6 3.1.1-7), it does
> something nasty to the xterm and/or ncurses's state, so that the arrow
> keys and so forth don't work any more.  This last problem doesn't
> appear on a Linux console (1.2.0) with TERM=linux.

This is still the case in an xterm.  I haven't tested it on a VC.

Ian.

Acknowledgement sent to iwj10@cus.cam.ac.uk (Ian Jackson):
Extra info received and forwarded. Full text available.
Information forwarded to debian-devel@pixar.com:
Bug#731; Package ncurses. Full text available.

Message received at debian-bugs:


From cus.cam.ac.uk!iwj10 Mon Apr  3 07:15:33 1995
Return-Path: <iwj10@cus.cam.ac.uk>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0rvmui-0006LZC; Mon, 3 Apr 95 07:15 PDT
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA08328
  (5.65c/IDA-1.4.4 for <debian-bugs@pixar.com>); Mon, 3 Apr 1995 07:15:27 -0700
Received: by bootes.cus.cam.ac.uk 
	(Smail-3.1.29.0 #30) id m0rvmQQ-000C0GC; Mon, 3 Apr 95 14:44 BST
Received: by chiark
	id m0rvl2C-0000YUZ
	(Debian /\oo/\ Smail3.1.29.1 #29.27); Mon, 3 Apr 95 13:15 BST
Message-Id: <m0rvl2C-0000YUZ.ijackson@nyx.cs.du.edu>
Date: Mon, 3 Apr 95 13:15 BST
From: iwj10@cus.cam.ac.uk (Ian Jackson)
To: Debian bugs submission address <debian-bugs@pixar.com>
Subject: ncurses wgetnstr doesn't work

Package: ncurses
Version: 1.8.7-1

The `search' option in dselect 0.93.35 exhibits bug(s) in ncurses's
wgetnstr routine.

It appears always to return ERR, or to set the returned string to the
empty string (it's not clear which).  When I try it I'm able to type
much more into the prompt than I'm supposed to be able to - according
to the manpage I should only be able to type as many characters as the
size I've specified (which is 49 in this case).

Alternatively, perhaps I shouldn't really be seeing those characters;
I turned echo on with echo() before the call to wgetnstr because
otherwise I didn't see any output at all.  The manpage is unclear
about what effect the echo setting has on the behaviour of wgetnstr.

Furthermore, when run inside a mono xterm (xbaseR6 3.1.1-7), it does
something nasty to the xterm and/or ncurses's state, so that the arrow
keys and so forth don't work any more.  This last problem doesn't
appear on a Linux console (1.2.0) with TERM=linux.

Ian.

Acknowledgement sent to iwj10@cus.cam.ac.uk (Ian Jackson):
New bug report received and forwarded. Full text available.
Report forwarded to debian-devel@pixar.com:
Bug#731; Package ncurses. Full text available.
Ian Jackson / iwj10@thor.cam.ac.uk, with the debian-bugs tracking mechanism
This page last modified 07:43:01 GMT Wed 01 Nov