From owner-freebsd-current Thu Jun 27 05:52:06 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id FAA22499 for current-outgoing; Thu, 27 Jun 1996 05:52:06 -0700 (PDT) Received: from vector.jhs.no_domain (slip139-92-42-131.ut.nl.ibm.net [139.92.42.131]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id FAA22481; Thu, 27 Jun 1996 05:51:59 -0700 (PDT) Received: (from jhs@localhost) by vector.jhs.no_domain (8.7.5/8.6.9) id NAA12464; Thu, 27 Jun 1996 13:18:19 +0200 (MET DST) Date: Thu, 27 Jun 1996 13:18:19 +0200 (MET DST) Message-Id: <199606271118.NAA12464@vector.jhs.no_domain> To: bostic@cs.berkeley.edu Cc: current@freebsd.org Subject: does cgetent() tgetent() vi see if an element of TERMPATH is a file ? From: "Julian H. Stacey" Reply-To: "Julian H. Stacey" Web: http://www.freebsd.org/~jhs/ Mailer: EXMH 1.6.7, PGP available Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi Keith Bostic, cc FreeBSD current, Does current FreeBSD lib cgetent() called from tgetent() called from Vi 1.34 always correctly detect the difference between an element of TERMPATH being a file & a directory ? Problem: vi blew up with: Error: initscr failed: Not a directory. xterm: unknown terminal type, or terminal lacks necessary features. as I had TERMPATH /usr/p/jhs/.termcap:/usr/local/etc/termcap:\ /etc/termcap:/usr/share/misc/termcap & /usr/local/etc somehow was a file (from hpack, (BTW I've just checked on my current ports/, & install called from ports/archivers/hpack.non-usa.only automatically creates etc, so no problem there now, if ever, maybe the functionality of install changed or something similar ) I'm not sure if its a bug or a mistake in my config somewhere, as I can demo the effect on my FreeBSD 2.1 Release box, but not on my FreeBSD Current box. Release & Current have identical src/lib/libtermcap/termcap.c Rel & Curr vi are almost the same, only difference: Makefile (MLINKS) & vi/v_ulcase.c (Toggle upper & lower case letters) PS exactly the same README version 1.34 tgetent is called from usr.bin/vi/ sex/sex_screen.c sex/sex_window.c svi/svi_curses.c src/lib/libtermcap/termcap.c line 138: i = cgetent(&dummy, pathvec, (char *)name); libc/gen/getcap.c line 272 : fd = open(*db_p, O_RDONLY, 0); if (fd < 0) { /* No error on unfound file. */ if (errno == ENOENT) continue; free(record); return (-2); Could that be the problem ? Anyone more familiar with this ? Julian -- Julian H. Stacey jhs@freebsd.org http://www.freebsd.org/~jhs/