NetBSD Problem Report #29275

From sjamaan@frohike.nvie.com  Mon Feb  7 21:53:03 2005
Return-Path: <sjamaan@frohike.nvie.com>
Received: from hermes.uci.kun.nl (hermes.uci.kun.nl [131.174.93.58])
	by narn.netbsd.org (Postfix) with ESMTP id 08B3B63B400
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  7 Feb 2005 21:52:58 +0000 (UTC)
Message-Id: <20050207215132.61D7F6B407@frohike.nvie.com>
Date: Mon, 07 Feb 2005 22:51:32 +0100 (CET)
From: Peter.Bex@student.kun.nl
Reply-To: Peter.Bex@student.kun.nl
To: gnats-bugs@netbsd.org
Subject: devel/ncurses has missing terminfo details for xterm
X-Send-Pr-Version: 3.95

>Number:         29275
>Category:       pkg
>Synopsis:       The `make cursor (very) invisible' function is missing from xterm entry
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 07 21:54:00 +0000 2005
>Closed-Date:    
>Last-Modified:  Sun Mar 21 16:18:05 +0000 2010
>Originator:     Peter.Bex@student.kun.nl
>Release:        NetBSD 2.0
>Organization:

>Environment:


System: NetBSD frohike.nvie.com 2.0 NetBSD 2.0 (FROHIKE) #0: Wed Dec 22 10:00:59 CET 2004 sjamaan@frohike.nvie.com:/usr/src/sys/arch/i386/compile/FROHIKE i386
Architecture: i386
Machine: i386
>Description:
	The xterm entry in NetBSD's termcap has a `vi' and `vs' entry, which
	ncurses' terminfo is missing.  This caused a certain program to complain
	because curs_set(0) return ERR.
>How-To-Repeat:

------------------- test.c ---------------------
#include <ncurses.h>

int
main(void)
{
	int x;

	initscr();
	x = curs_set(0);
	endwin();
	printf("x = %i\n", x);
	return 0;
}
-------------------------------------------

Compile and link with ncurses.  When you run it under xterm ($TERM=xterm),
it says `x = -1' (and -1 is ERR, meaning the function failed).
Change `ncurses.h' to `curses.h' and compile and link with curses.  When you
run it under xterm again, it will now say `x = 1'.

>Fix:

Trivial fix:

------------- patches/patch-ae ----------------
$NetBSD$

--- misc/terminfo.src.orig	2004-01-18 02:37:18.000000000 +0100
+++ misc/terminfo.src
@@ -2741,10 +2741,10 @@ xterm-r6|xterm-old|xterm X11R6 version, 
 	OTbs, am, km, mir, msgr, xenl, 
 	cols#80, it#8, lines#24, 
 	acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 
-	bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=^M, 
+	bel=^G, bold=\E[1m, civis=\E[?25l, clear=\E[H\E[2J, cr=^M, 
 	csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, 
 	cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, 
-	cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, 
+	cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, cvvis=\E[?25h
 	dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, 
 	el=\E[K, enacs=\E)0, home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, 
 	il1=\E[L, ind=^J, 
------------------------------------------------

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->jlam
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Tue, 08 Feb 2005 15:11:21 +0000
Responsible-Changed-Why:
Over to maintainer.


State-Changed-From-To: open->suspended
State-Changed-By: jlam@netbsd.org
State-Changed-When: Sun, 20 Mar 2005 07:26:02 +0000
State-Changed-Why:
This patch will be applied and the PKGREVISION of ncurses bumped after
the pkgsrc-2005Q1 branch.


State-Changed-From-To: suspended->open
State-Changed-By: jlam@netbsd.org
State-Changed-When: Thu, 24 Mar 2005 03:24:24 +0000
State-Changed-Why:
After further investigation, the issue is not so clear-cut.  Re-open this PR.


From: "Johnny C. Lam" <jlam@NetBSD.org>
To: Peter.Bex@student.kun.nl
Cc: pkgsrc-bugs@netbsd.org, gnats-bugs@netbsd.org
Subject: Re: pkg/29275: devel/ncurses has missing terminfo details for xterm
Date: Thu, 24 Mar 2005 03:36:51 +0000

 On Mon, Feb 07, 2005 at 09:54:01PM +0000, Peter.Bex@student.kun.nl wrote:
 > 	
 > System: NetBSD frohike.nvie.com 2.0 NetBSD 2.0 (FROHIKE) #0: Wed Dec 22 10:00:59 CET 2004 sjamaan@frohike.nvie.com:/usr/src/sys/arch/i386/compile/FROHIKE i386
 > Architecture: i386
 > Machine: i386
 > >Description:
 > 	The xterm entry in NetBSD's termcap has a `vi' and `vs' entry, which
 > 	ncurses' terminfo is missing.  This caused a certain program to complain
 > 	because curs_set(0) return ERR.
 > 
 > Trivial fix:
 > 
 > ------------- patches/patch-ae ----------------
 > $NetBSD$
 > 
 > --- misc/terminfo.src.orig	2004-01-18 02:37:18.000000000 +0100
 > +++ misc/terminfo.src
 > @@ -2741,10 +2741,10 @@ xterm-r6|xterm-old|xterm X11R6 version, 
 >  	OTbs, am, km, mir, msgr, xenl, 
 >  	cols#80, it#8, lines#24, 
 >  	acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 
 > -	bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=^M, 
 > +	bel=^G, bold=\E[1m, civis=\E[?25l, clear=\E[H\E[2J, cr=^M, 
 >  	csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, 
 >  	cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, 
 > -	cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, 
 > +	cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, cvvis=\E[?25h
 >  	dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, 
 >  	el=\E[K, enacs=\E)0, home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, 
 >  	il1=\E[L, ind=^J, 
 > ------------------------------------------------

 This patch modifies the "xterm-r6" entry to include the civis and
 cvvis definitions.  This "fixes" the problem because the "xterm" entry
 is just a clone of "xterm-r6".  There are two other things we can do:

     (1) Modify the "xterm" entry to clone "xterm-xfree86" instead, which
 	does have the civis and cvvis definitions, and which should work
 	with the XFree86 distributed with NetBSD.  This would also
 	require a PKGREVISION bump of ncurses.

     (2) Tell the user to set TERM=xterm-xfree86 in the shell environment.

 If I had to choose between the supplied patch and option (1), I would
 rather go with option (1) since is leaves open the possibility for a
 user to explicitly choose TERM=xterm-r6 to get the other behavior.
 However, I'm not completely sure that making this change is the best
 thing to do since this entry is possibly wrong for xterm running on,
 e.g. Solaris or IRIX.

 	-- Johnny Lam <jlam@NetBSD.org>

From: Peter Bex <Peter.Bex@student.kun.nl>
To: "Johnny C. Lam" <jlam@NetBSD.org>
Cc: pkgsrc-bugs@netbsd.org, gnats-bugs@netbsd.org
Subject: Re: pkg/29275: devel/ncurses has missing terminfo details for xterm
Date: Thu, 24 Mar 2005 09:48:34 +0100

 On Thu, Mar 24, 2005 at 03:36:51AM +0000, Johnny C. Lam wrote:
 > This patch modifies the "xterm-r6" entry to include the civis and
 > cvvis definitions.  This "fixes" the problem because the "xterm" entry
 > is just a clone of "xterm-r6".  There are two other things we can do:
 >=20
 >     (1) Modify the "xterm" entry to clone "xterm-xfree86" instead, which
 > 	does have the civis and cvvis definitions, and which should work
 > 	with the XFree86 distributed with NetBSD.  This would also
 > 	require a PKGREVISION bump of ncurses.
 >=20
 >     (2) Tell the user to set TERM=3Dxterm-xfree86 in the shell environmen=
 t.

 I'd like to add another option for consideration:

 (3) Change our xterm to export TERM=3Dxterm-xfree86 by default.

 Of course, this may cause problems when remotely logging in to another
 system which doesn't know about XFree86, but it does fix the problem in
 an (IMHO) rather clean way.  The essence of the problem is that everybody
 calls something different by the same name, `xterm'.

 Changing the xterm option to something else could also be done based on the
 system (option (1)).  This would require a bsd.ncurses.mk/bsd.xterm.mk file
 for every supported OS in pkgsrc.  (this is a simple sed operation, of cour=
 se)

 Maybe we should also have a look at the native NetBSD curses termcap,
 it has the vs/vi entries too, which would break if someone would login
 from a system which has an older type xterm.

 Regards,
 Peter

Responsible-Changed-From-To: jlam->pkg-manager
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Sun, 21 Mar 2010 16:18:05 +0000
Responsible-Changed-Why:
Back to role account, jlam lost his commit bit.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.