summaryrefslogtreecommitdiff
path: root/lib/libcurses/tinfo/read_entry.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-01-22 04:50:44 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-01-22 04:50:44 +0000
commit601bfeea925568f590de34e52cd200b7a54bade5 (patch)
treef25252642fc1bd405b81d705ee3492e99f801b8f /lib/libcurses/tinfo/read_entry.c
parent26f1dd8e47a445048bf6363de09616d595fade95 (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/read_entry.c')
-rw-r--r--lib/libcurses/tinfo/read_entry.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/libcurses/tinfo/read_entry.c b/lib/libcurses/tinfo/read_entry.c
index 9ebf0779912..01503550ff9 100644
--- a/lib/libcurses/tinfo/read_entry.c
+++ b/lib/libcurses/tinfo/read_entry.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: read_entry.c,v 1.1 1999/01/18 19:10:22 millert Exp $ */
+/* $OpenBSD: read_entry.c,v 1.2 1999/01/22 04:50:43 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
@@ -48,6 +48,7 @@
#include <term.h>
#include <tic.h>
+#include <term_entry.h>
MODULE_ID("$From: read_entry.c,v 1.47 1998/12/20 02:51:50 tom Exp $")
@@ -325,6 +326,12 @@ int _nc_read_entry(const char *const tn, char *const filename, TERMTYPE *const t
char *envp;
char ttn[MAX_ALIAS + 3];
+#ifdef __OpenBSD__
+ /* First check the BSD terminfo.db file */
+ if (_nc_read_bsd_terminfo_entry(tn, filename, tp) == 1)
+ return 1;
+#endif /* __OpenBSD__ */
+
/* truncate the terminal name to prevent dangerous buffer airline */
(void) sprintf(ttn, "%c/%.*s", *tn, MAX_ALIAS, tn);