NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lib/46075: No set_color_pair in terminfo
>Number: 46075
>Category: lib
>Synopsis: No set_color_pair in terminfo
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 22 23:00:01 +0000 2012
>Originator: asau%inbox.ru@localhost
>Release: NetBSD 5.99.60
>Organization:
>Environment:
System: NetBSD lithium 5.99.60 NetBSD 5.99.60 (GENERIC) #1: Fri Jan 27 02:12:22
MSK 2012 asau@lithium:/home/asau/var/netbsd/obj/sys/arch/i386/compile/GENERIC
i386
Architecture: i386
Machine: i386
>Description:
NetBSD's terminfo doesn't define "set_color_pair".
When looking at the code, one can find that it defines "set_color_paid"
macro.
In particular, term.h defines
#define set_color_paid t_set_color_paid(cur_term)
#define t_set_color_paid(t) (t)->strs[TICODE_scp]
TICODE_scp maps to "sp" capability as defined in
src/lib/libterminfo/termcap_map.c:
{ "sp", TICODE_scp },
FreeBSD 9.0 terminfo(5) reports that it corresponds to:
set_color_pair scp sp Set current color
pair to #1
>How-To-Repeat:
Try building any program that uses terminfo's/curses' "set_color_pair".
>Fix:
Rename "set_color_paid" to "set_color_pair" as in other terminfo
implementations.
Index: lib/libterminfo/term.h
===================================================================
RCS file: /cvsroot/src/lib/libterminfo/term.h,v
retrieving revision 1.10
diff -u -r1.10 term.h
--- lib/libterminfo/term.h 4 Oct 2011 11:01:14 -0000 1.10
+++ lib/libterminfo/term.h 22 Feb 2012 22:40:09 -0000
@@ -1012,7 +1012,7 @@
#define t_set_bottom_margin_parm(t) (t)->strs[TICODE_smgbp]
#define t_set_clock(t) (t)->strs[TICODE_sclk]
#define t_set_color_band(t) (t)->strs[TICODE_setcolor]
-#define t_set_color_paid(t) (t)->strs[TICODE_scp]
+#define t_set_color_pair(t) (t)->strs[TICODE_scp]
#define t_set_foreground(t) (t)->strs[TICODE_setf]
#define t_set_left_margin(t) (t)->strs[TICODE_smgl]
#define t_set_left_margin_parm(t) (t)->strs[TICODE_smglp]
@@ -1407,7 +1407,7 @@
#define set_bottom_margin_parm t_set_bottom_margin_parm(cur_term)
#define set_clock t_set_clock(cur_term)
#define set_color_band t_set_color_band(cur_term)
-#define set_color_paid t_set_color_paid(cur_term)
+#define set_color_pair t_set_color_pair(cur_term)
#define set_foreground t_set_foreground(cur_term)
#define set_left_margin t_set_left_margin(cur_term)
#define set_left_margin_parm t_set_left_margin_parm(cur_term)
Home |
Main Index |
Thread Index |
Old Index