[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: missing use_terminfo_vars() calls in ncurses-5.1-20001007

From: Thomas Dickey
Subject: Re: missing use_terminfo_vars() calls in ncurses-5.1-20001007
Date: Sun, 8 Oct 2000 19:40:04 -0400

On Sun, Oct 08, 2000 at 04:45:55PM -0600, Todd C. Miller wrote:
> This adds a few missing use_terminfo_vars() and fixes up _nc_tgetent().
> Previously, _nc_cgetset() would still get called on cp so the
> simplest thing is to set cp to NULL if !use_terminfo_vars().
> This also makes the code a bit easier to read (IMO).  Additionally,
> I added checks for a NUL HOME environment variable out of sheer,
> raging paranoia.

I left $TERMCAP in (the non-pathname case) because in the places where
it's needed, it's because of stuff like xterm setting it for old apps
that don't get the screen size.  I don't see the harm in leaving it

I guess in addition to checking if $HOME isn't null, it might be nice to
check that it's a directory (need yet another function to wrap that in ;-).
> Personally, I don't like reading .termcap from the cwd since it
> could be hostile as well but I have not changed that here.  The
> same does not seem to be true of the .terminfo dir.

Actually both .termcap and .terminfo seem equally bad, since that sort of
thing (mysterious differences in running between root/non-root) are the
most frequent complaints I see in this area.  So I'm inclined to disregard
> --- read_entry.c.DIST Sat Oct  7 21:17:34 2000
> +++ read_entry.c      Sun Oct  8 16:23:53 2000
> @@ -79,7 +79,7 @@
>       if (path != 0) {
>           result = path;
>           have_tic_directory = TRUE;
> -     } else if (!have_tic_directory) {
> +     } else if (!have_tic_directory && use_terminfo_vars()) {
>           char *envp;
>           if ((envp = getenv("TERMINFO")) != 0)
>               return _nc_tic_dir(envp);

ok - I missed this one for some reason (too many late nights).

Thomas E. Dickey <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]