Date: Fri, 17 Apr 1998 21:25:22 -0700 (PDT) From: Jin Guojun (ITG staff) <jin@adv-pc-1.lbl.gov> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: misc/6340: missing the terminfo, which causes libraries failure Message-ID: <199804180425.VAA11173@adv-pc-1.lbl.gov>
next in thread | raw e-mail | index | archive | help
>Number: 6340
>Category: misc
>Synopsis: missing the terminfo, which causes libraries failure
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Apr 17 21:30:04 PDT 1998
>Last-Modified:
>Originator: Jin Guojun (ITG staff)
>Organization:
>Release: FreeBSD 2.2.6-RELEASE i386
>Environment:
All release
>Description:
It seems that the libncurses failure is caused by missing terminfo.
(xxgdb) where
#0 0x8068552 in has_colors () at lib_color.c:85
#1 0x1fa8a in Initialize_Color_Screen () at color.c:143
#2 0x17f36 in Initialize_Terminal () at terminal.c:162
#3 0x1db4c in Curses_Initialization () at curses_ui.c:1884
#4 0x1e95 in main (argc=1, argv=0xefbfd5dc) at bridge.c:261
(xxgdb) p orig_pair
No symbol "orig_pair" in current context.
......
int has_colors()
{
return ((orig_pair != NULL) && (max_colors != -1) && (max_pairs != -1)
&&
(((set_foreground != NULL) && (set_background != NULL)) ||
((set_a_foreground != NULL) && (set_a_background != NULL)))
);
}
......
How could this line fail? By searching the libraries:
FreeBSD # whereis terminfo
terminfo: /usr/src/usr.bin/file/Magdir/terminfo
# more /usr/src/usr.bin/file/Magdir/terminfo
#------------------------------------------------------------------------------
# terminfo: file(1) magic for terminfo
#
# XXX - byte order for screen images?
#
0 string \032\001 Compiled terminfo entry
0 short 0433 Curses screen image
0 short 0434 Curses screen image
# cd /usr/src/lib/libncurses
# grep orig_pair *
lib_color.c: if (orig_pair != NULL)
lib_color.c: putp(orig_pair);
lib_color.c: return ((orig_pair != NULL) && (max_colors != -1) && (max_pairs != -1)
lib_endwin.c: putp(orig_pair);
lib_vidattr.c: if (orig_pair) {
lib_vidattr.c: tputs(orig_pair, 1, outc);
terminfo.5:\s-1orig_pair, op op Set default color-pair to original one\s+1
# man terminfo
TERMINFO(5) TERMINFO(5)
NAME
terminfo - terminal capability data base
SYNOPSIS
/usr/lib/terminfo/*/*
DESCRIPTION
Terminfo is a data base describing terminals, used by
screen-oriented programs such as vi(1), rogue(1) and
ncurses(3). Terminfo describes terminals by giving a set
of capabilities which they have, by specifying how to per-
form screen operations, and by specifying padding require-
ments and initialization sequences.
...
>How-To-Repeat:
# ls -l /usr/lib/terminfo/
ls: /usr/lib/terminfo/: Not a directory
>Fix:
need to locate the terminfo which is useful for vi and libncurses
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804180425.VAA11173>
