Date: Mon, 28 Jan 2002 17:10:11 -0700 (MST) From: "John E. Hein" <jhein@timing.com> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/34394: tgetent returns wrong value in libtermcap Message-ID: <200201290010.g0T0ABO10630@Elmer.timing.com>
next in thread | raw e-mail | index | archive | help
>Number: 34394 >Category: bin >Synopsis: tgetent returns wrong value in libtermcap >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 28 16:20:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: John E. Hein >Release: FreeBSD 4.5-PRERELEASE i386 >Organization: Timing Solutions Corporation >Environment: System: FreeBSD Elmer.timing.com 4.5-PRERELEASE FreeBSD 4.5-PRERELEASE #0: Mon Dec 31 11:40:14 MST 2001 imp@hammer.village.org:/dell/imp/FreeBSD/src/sys/compile/ELMER i386 >Description: tgetent() should return 0 if it can't find a TERM entry. It returns -1 which is indistuinguishable from "can't open /etc/termcap" (which *should* be a return value of -1). >How-To-Repeat: env TERM=nonexistent_entry /bin/csh >Fix: _nc_read_termcap_entry() in lib/libncurses/termcap.c returns -1 and grab_entry() in contrib/ncurses/ncurses/tinfo/lib_setup.c assumes this means that the term database is inaccessible (line 332 of RELENG_4_5). It dutifully passes this up the chain to tgetent which returns the wrong value. I think the fix should be made to lib/libncurses/termcap.c to return a better value from _nc_read_termcap_entry(), but I'm not sure all the ramifications (i.e., how it affects other callers of that function). >Release-Note: >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?200201290010.g0T0ABO10630>