diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-08-31 02:40:31 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-08-31 02:40:31 +0000 |
commit | 8f547f55975d4bad5f74d8fa0a3afce475ace830 (patch) | |
tree | 830d64eabd6986d6945b18481929dd521d04ea90 /lib/libtermlib | |
parent | 54fe9c257042886934179f754dc76be80bcc88b4 (diff) |
Fix thinko in last change
Diffstat (limited to 'lib/libtermlib')
-rw-r--r-- | lib/libtermlib/del_curterm.c | 10 | ||||
-rw-r--r-- | lib/libtermlib/globals.c | 8 |
2 files changed, 11 insertions, 7 deletions
diff --git a/lib/libtermlib/del_curterm.c b/lib/libtermlib/del_curterm.c index 9f0e2faf168..bc55d8897fe 100644 --- a/lib/libtermlib/del_curterm.c +++ b/lib/libtermlib/del_curterm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: del_curterm.c,v 1.1 1996/05/31 05:40:02 tholo Exp $ */ +/* $OpenBSD: del_curterm.c,v 1.2 1996/08/31 02:40:30 tholo Exp $ */ /* * Copyright (c) 1996 SigmaSoft, Th. Lockert <tholo@sigmasoft.com> @@ -31,12 +31,14 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: del_curterm.c,v 1.1 1996/05/31 05:40:02 tholo Exp $"; +static char rcsid[] = "$OpenBSD: del_curterm.c,v 1.2 1996/08/31 02:40:30 tholo Exp $"; #endif #include <stdlib.h> #include "term.h" +extern TERMINAL _ti_empty; + /* * Free storage associated with the terminal description * passed in. Note that it is legal to free cur_term in @@ -51,6 +53,8 @@ del_curterm(term) { int i; + if (term == &_ti_empty) + return OK; for (i = 0; i < _tStrCnt; i++) if (term->strs[i] != NULL) free(term->strs[i]); @@ -61,6 +65,6 @@ del_curterm(term) * one, set cur_term to NULL */ if (term == cur_term) - cur_term = NULL; + cur_term = &_ti_empty; return OK; } diff --git a/lib/libtermlib/globals.c b/lib/libtermlib/globals.c index 2de158e8bff..7e96e9ea552 100644 --- a/lib/libtermlib/globals.c +++ b/lib/libtermlib/globals.c @@ -1,4 +1,4 @@ -/* $OpenBSD: globals.c,v 1.1 1996/08/31 02:36:59 tholo Exp $ */ +/* $OpenBSD: globals.c,v 1.2 1996/08/31 02:40:30 tholo Exp $ */ /* * Copyright (c) 1996 SigmaSoft, Th. Lockert <tholo@sigmasoft.com> @@ -31,13 +31,13 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: globals.c,v 1.1 1996/08/31 02:36:59 tholo Exp $"; +static char rcsid[] = "$OpenBSD: globals.c,v 1.2 1996/08/31 02:40:30 tholo Exp $"; #endif #include "term.h" -static TERMINAL empty = { +TERMINAL _ti_empty = { -1, 9600, {}, {}, "dumb", {}, { 80, 0, 24 }, {} }; -TERMINAL *cur_term = ∅ +TERMINAL *cur_term = &_ti_empty; |