Subject: pkg/29275: devel/ncurses has missing terminfo details for xterm
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <Peter.Bex@student.kun.nl>
List: pkgsrc-bugs
Date: 02/07/2005 21:54:01
>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
>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, 
------------------------------------------------

>Unformatted: