From 8b70c05ce79ed438f3805d6bbaf7eacdd0da6e1d Mon Sep 17 00:00:00 2001 From: Thorsten Lockert Date: Wed, 7 Aug 1996 03:26:01 +0000 Subject: If the user have a TERMCAP variable with a full terminal description in it, prefer that to terminfo database --- lib/libtermlib/getterm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/libtermlib') 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 @@ -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 @@ -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) -- cgit v1.2.3