NetBSD Problem Report #37173
From dholland@eecs.harvard.edu Mon Oct 22 20:30:21 2007
Return-Path: <dholland@eecs.harvard.edu>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id D2D0863B8FE
for <gnats-bugs@gnats.NetBSD.org>; Mon, 22 Oct 2007 20:30:20 +0000 (UTC)
Message-Id: <20071022191637.31AD8FBD0@tanaqui.eecs.harvard.edu>
Date: Mon, 22 Oct 2007 15:16:37 -0400 (EDT)
From: dholland@eecs.harvard.edu
Reply-To: dholland@eecs.harvard.edu
To: gnats-bugs@NetBSD.org
Subject: PKG_OPTIONS.tin and curses
X-Send-Pr-Version: 3.95
>Number: 37173
>Category: pkg
>Synopsis: PKG_OPTIONS.tin and curses
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: wiz
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Oct 22 20:35:00 +0000 2007
>Closed-Date: Sun Nov 25 12:43:57 +0000 2007
>Last-Modified: Sat Dec 08 18:40:01 +0000 2007
>Originator: David A. Holland <dholland@eecs.harvard.edu>
>Release: NetBSD 2.1.0_STABLE (20070915) (current pkgsrc)
>Organization:
EECS
>Environment:
System: NetBSD bantha 2.1.0_STABLE NetBSD 2.1.0_STABLE (GENERIC) #3: Fri Dec 1 14:58:15 EST 2006 root@bantha:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
Recently the PKG_OPTIONS for tin were rearranged to allow choosing
curses, ncurses, or ncursesw. None of these, however, is the same as
the behavior prior to the rearrangement; the choice apparently has
broad user-visible implications, and consequently the users complained.
>How-To-Repeat:
Recompile tin with the default PKG_OPTIONS. The reports I got included
changes in color display and arrow key behavior, and maybe other stuff.
>Fix:
This adds an option to select the old behavior. It might be best to
make it the default as well, so as to create the least surprise.
Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/news/tin/options.mk,v
retrieving revision 1.8
diff -u -r1.8 options.mk
--- options.mk 19 Sep 2007 05:55:05 -0000 1.8
+++ options.mk 22 Oct 2007 19:11:55 -0000
@@ -3,7 +3,7 @@
PKG_OPTIONS_VAR= PKG_OPTIONS.tin
PKG_SUPPORTED_OPTIONS= icu inet6 tin-use-inn-spool
PKG_OPTIONS_REQUIRED_GROUPS= display
-PKG_OPTIONS_GROUP.display= curses ncurses ncursesw
+PKG_OPTIONS_GROUP.display= nocurses curses ncurses ncursesw
PKG_SUGGESTED_OPTIONS= curses
# untested
#PKG_SUPPORTED_OPTIONS+= socks
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->wiz
Responsible-Changed-By: obache@netbsd.org
Responsible-Changed-When: Tue, 23 Oct 2007 00:11:38 +0000
Responsible-Changed-Why:
Over to maintainer.
From: "Valeriy E. Ushakov" <uwe@stderr.spb.ru>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/37173
Date: Sat, 17 Nov 2007 02:56:27 +0300
Suggested hack makes keypad keys (arrows &co) in tin work for me again.
Our curses has no chance of working with tin, b/c tin does something
in its curses code that is not strictly legal. In tcurses.c:ReadCh
it does ungetch() on KEY_* values while our curses doesn't support
that (as per SUS). To quote the SUS (emphasis mine):
The ungetch() function pushes the SINGLE-BYTE character ch onto the
head of the input queue.
and KEY_* values are from 0x100 up, i.e. not single-byte. So later,
when get_arrow_key calls getch() again it receives truncated value
(KEY_* & 0xff) instead of the KEY_* value.
-uwe
State-Changed-From-To: open->closed
State-Changed-By: wiz@netbsd.org
State-Changed-When: Sun, 25 Nov 2007 12:43:57 +0000
State-Changed-Why:
I made the curses support completely optional -- just add '-curses' to your
tin options.
Thanks for the PR!
From: Thomas Klausner <wiz@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/37173 CVS commit: pkgsrc/news/tin
Date: Sun, 25 Nov 2007 12:44:07 +0000 (UTC)
Module Name: pkgsrc
Committed By: wiz
Date: Sun Nov 25 12:44:07 UTC 2007
Modified Files:
pkgsrc/news/tin: options.mk
Log Message:
Make curses support completely optional, in response to PR 37173
by David A. Holland.
To generate a diff of this commit:
cvs rdiff -r1.8 -r1.9 pkgsrc/news/tin/options.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Julian Coleman <jdc@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/37173 CVS commit: src/lib/libcurses
Date: Sat, 8 Dec 2007 18:38:12 +0000 (UTC)
Module Name: src
Committed By: jdc
Date: Sat Dec 8 18:38:11 UTC 2007
Modified Files:
src/lib/libcurses: curses_private.h get_wch.c getch.c screen.c
Log Message:
Keep pushed-back characters locally. Fixes problems where KEY_* symbols
are pushed back. Should fix the arrow keys part of PR pkg/37173.
While we are here, make getch() and get_wch() check for resize immediately,
instead of reading a key, checking for resize and then having to push-back
the just read key.
To generate a diff of this commit:
cvs rdiff -r1.40 -r1.41 src/lib/libcurses/curses_private.h
cvs rdiff -r1.4 -r1.5 src/lib/libcurses/get_wch.c
cvs rdiff -r1.49 -r1.50 src/lib/libcurses/getch.c
cvs rdiff -r1.20 -r1.21 src/lib/libcurses/screen.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.