NetBSD Problem Report #37173

From  Mon Oct 22 20:30:21 2007
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id D2D0863B8FE
	for <>; Mon, 22 Oct 2007 20:30:20 +0000 (UTC)
Message-Id: <>
Date: Mon, 22 Oct 2007 15:16:37 -0400 (EDT)
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 <>
>Release:        NetBSD 2.1.0_STABLE (20070915) (current pkgsrc)
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

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.


Recompile tin with the default PKG_OPTIONS. The reports I got included
changes in color display and arrow key behavior, and maybe other stuff.


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.

RCS file: /cvsroot/pkgsrc/news/tin/,v
retrieving revision 1.8
diff -u -r1.8
---	19 Sep 2007 05:55:05 -0000	1.8
+++	22 Oct 2007 19:11:55 -0000
@@ -3,7 +3,7 @@
 PKG_SUPPORTED_OPTIONS=		icu inet6 tin-use-inn-spool
-PKG_OPTIONS_GROUP.display=	curses ncurses ncursesw
+PKG_OPTIONS_GROUP.display=	nocurses curses ncurses ncursesw
 # untested



Responsible-Changed-From-To: pkg-manager->wiz
Responsible-Changed-When: Tue, 23 Oct 2007 00:11:38 +0000
Over to maintainer.

From: "Valeriy E. Ushakov" <>
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.


State-Changed-From-To: open->closed
State-Changed-When: Sun, 25 Nov 2007 12:43:57 +0000
I made the curses support completely optional -- just add '-curses' to your
tin options.
Thanks for the PR!

From: Thomas Klausner <>
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:

 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/

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Julian Coleman <>
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.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.