summaryrefslogtreecommitdiff
path: root/lib/libcurses/tinfo/read_entry.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-01-23 18:31:03 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-01-23 18:31:03 +0000
commite38d94f6fe486b90d9cdbb6cd113538c71373a31 (patch)
tree8c7f93c7698fe498d7de05093a62db6d3c44702e /lib/libcurses/tinfo/read_entry.c
parent7b8d319d151a95c0cf68e7106ffb3ee92ac41821 (diff)
make _nc_read_file_entry() look in terminfo.db too. Makes the -A and -B flags of infocmp more useful.
Diffstat (limited to 'lib/libcurses/tinfo/read_entry.c')
-rw-r--r--lib/libcurses/tinfo/read_entry.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libcurses/tinfo/read_entry.c b/lib/libcurses/tinfo/read_entry.c
index 01503550ff9..133152bbaef 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.2 1999/01/22 04:50:43 millert Exp $ */
+/* $OpenBSD: read_entry.c,v 1.3 1999/01/23 18:31:02 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
@@ -114,6 +114,11 @@ int _nc_read_file_entry(const char *const filename, TERMTYPE *ptr)
int i, fd, numread;
char buf[MAX_ENTRY_SIZE];
+#ifdef __OpenBSD__
+ if (_nc_read_bsd_terminfo_file(filename, ptr) == 1)
+ return(1);
+#endif /* __OpenBSD__ */
+
if (_nc_access(filename, R_OK) < 0
|| (fd = open(filename, O_RDONLY|O_BINARY)) < 0) {
T(("cannot open terminfo %s (errno=%d)", filename, errno));