diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-01-22 04:50:44 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-01-22 04:50:44 +0000 |
commit | 601bfeea925568f590de34e52cd200b7a54bade5 (patch) | |
tree | f25252642fc1bd405b81d705ee3492e99f801b8f /lib/libcurses/tinfo/lib_setup.c | |
parent | 26f1dd8e47a445048bf6363de09616d595fade95 (diff) |
Move call to _nc_read_bsd_terminfo_entry() to _nc_read_entry() so reading
terminfo.db is transparent. This requires us to be able to tell which
of the entries in pathvec held the terminfo entry. To make that work
we only pass one pathname to cgetent(3) at a time. This might be a
slight performance hit but should not be noticable in normal use.
Diffstat (limited to 'lib/libcurses/tinfo/lib_setup.c')
-rw-r--r-- | lib/libcurses/tinfo/lib_setup.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/libcurses/tinfo/lib_setup.c b/lib/libcurses/tinfo/lib_setup.c index 289309d4f65..7ff479cca77 100644 --- a/lib/libcurses/tinfo/lib_setup.c +++ b/lib/libcurses/tinfo/lib_setup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib_setup.c,v 1.1 1999/01/18 19:10:19 millert Exp $ */ +/* $OpenBSD: lib_setup.c,v 1.2 1999/01/22 04:50:43 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -240,14 +240,9 @@ static int grab_entry(const char *const tn, TERMTYPE *const tp) /* return 1 if entry found, 0 if not found, -1 if database not accessible */ { char filename[PATH_MAX]; - int status = 0; - int _nc_read_bsd_terminfo_entry(const char *, TERMTYPE *); /* XXX */ + int status; -#ifdef __OpenBSD__ - status = _nc_read_bsd_terminfo_entry(tn, tp); -#endif /* __OpenBSD__ */ - - if (status != 1 && (status = _nc_read_entry(tn, filename, tp)) != 1) { + if ((status = _nc_read_entry(tn, filename, tp)) != 1) { #ifndef PURE_TERMINFO /* |