From owner-freebsd-bugs Mon Jan 28 16:20:10 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 3136337B416 for ; Mon, 28 Jan 2002 16:20:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0T0K2W77633; Mon, 28 Jan 2002 16:20:02 -0800 (PST) (envelope-from gnats) Received: from Daffy.timing.com (daffy.timing.com [206.168.13.218]) by hub.freebsd.org (Postfix) with ESMTP id 6FE9137B430 for ; Mon, 28 Jan 2002 16:10:12 -0800 (PST) Received: from Elmer.timing.com (elmer.timing.com [206.168.13.187]) by Daffy.timing.com (8.11.3/8.11.3) with ESMTP id g0T0ABS71553; Mon, 28 Jan 2002 17:10:11 -0700 (MST) (envelope-from jhein@timing.com) Received: (from jhein@localhost) by Elmer.timing.com (8.11.6/8.11.6) id g0T0ABO10630; Mon, 28 Jan 2002 17:10:11 -0700 (MST) (envelope-from jhein) Message-Id: <200201290010.g0T0ABO10630@Elmer.timing.com> Date: Mon, 28 Jan 2002 17:10:11 -0700 (MST) From: "John E. Hein" Reply-To: "John E. Hein" To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/34394: tgetent returns wrong value in libtermcap Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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