summaryrefslogtreecommitdiff
path: root/lib/libtermlib
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-08-07 03:26:01 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-08-07 03:26:01 +0000
commit8b70c05ce79ed438f3805d6bbaf7eacdd0da6e1d (patch)
tree83b4c3abc02bd5640fea6dcd166ca783e1c1ffca /lib/libtermlib
parent9acb9f57f42fa09c1d44423267a343be6dc6ac77 (diff)
If the user have a TERMCAP variable with a full terminal description in it,
prefer that to terminfo database
Diffstat (limited to 'lib/libtermlib')
-rw-r--r--lib/libtermlib/getterm.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libtermlib/getterm.c b/lib/libtermlib/getterm.c
index 18352e993c4..bb97d8edc57 100644
--- a/lib/libtermlib/getterm.c
+++ b/lib/libtermlib/getterm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getterm.c,v 1.6 1996/07/22 03:13:54 tholo Exp $ */
+/* $OpenBSD: getterm.c,v 1.7 1996/08/07 03:26:00 tholo Exp $ */
/*
* Copyright (c) 1996 SigmaSoft, Th. Lockert <tholo@sigmasoft.com>
@@ -31,7 +31,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: getterm.c,v 1.6 1996/07/22 03:13:54 tholo Exp $";
+static char rcsid[] = "$OpenBSD: getterm.c,v 1.7 1996/08/07 03:26:00 tholo Exp $";
#endif
#include <stdlib.h>
@@ -342,7 +342,10 @@ _ti_getterm(name)
int ret = 1;
char *s;
- if (_ti_buf) {
+ s = getenv("TERMCAP");
+ if (s && *s == '/')
+ s = NULL;
+ if (_ti_buf || s) {
if (_ti_gettermcap(name) != 1) {
del_curterm(cur_term);
if ((cur_term = calloc(sizeof(TERMINAL), 1)) == NULL)