Date: Thu, 27 Jun 1996 13:18:19 +0200 (MET DST) From: "Julian H. Stacey" <jhs@freebsd.org> To: bostic@cs.berkeley.edu Cc: current@freebsd.org Subject: does cgetent() tgetent() vi see if an element of TERMPATH is a file ? Message-ID: <199606271118.NAA12464@vector.jhs.no_domain>
next in thread | raw e-mail | index | archive | help
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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606271118.NAA12464>
