diff options
| author | christos <christos@NetBSD.org> | 2001-11-02 04:42:09 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2001-11-02 04:42:09 +0000 |
| commit | 41df15832a4e870138ae173c8fb8b60ef641798f (patch) | |
| tree | 97d7e9332f10c695b019ae7f48a21ae4ebb31058 /lib/libedit | |
| parent | 895db4cb832d8b2321fc0e56d9a4bf3f5fda531f (diff) | |
Finish initializing all the term data structures even if the terminal init
fails. This makes editline work on dumb terminals again. Noted by mycroft.
Oops, too agressive error checking.
Diffstat (limited to 'lib/libedit')
| -rw-r--r-- | lib/libedit/term.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libedit/term.c b/lib/libedit/term.c index dfbe30ef0d5..077cd33dc4a 100644 --- a/lib/libedit/term.c +++ b/lib/libedit/term.c @@ -1,4 +1,4 @@ -/* $NetBSD: term.c,v 1.32 2001/01/23 15:55:31 jdolecek Exp $ */ +/* $NetBSD: term.c,v 1.33 2001/11/02 04:42:09 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)term.c 8.2 (Berkeley) 4/30/95"; #else -__RCSID("$NetBSD: term.c,v 1.32 2001/01/23 15:55:31 jdolecek Exp $"); +__RCSID("$NetBSD: term.c,v 1.33 2001/11/02 04:42:09 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -321,6 +321,7 @@ term_setflags(EditLine *el) protected int term_init(EditLine *el) { + int error; el->el_term.t_buf = (char *) el_malloc(TC_BUFSIZE); if (el->el_term.t_buf == NULL) @@ -341,10 +342,9 @@ term_init(EditLine *el) return (-1); (void) memset(el->el_term.t_val, 0, T_val * sizeof(int)); term_outfile = el->el_outfile; - if (term_set(el, NULL) == -1) - return (-1); + error = term_set(el, NULL); term_init_arrow(el); - return (0); + return (error); } /* term_end(): * Clean up the terminal stuff |
