Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit Finish initializing all the term data structures...
details: https://anonhg.NetBSD.org/src/rev/e3f24c6ff27f
branches: trunk
changeset: 516926:e3f24c6ff27f
user: christos <christos%NetBSD.org@localhost>
date: Fri Nov 02 04:42:09 2001 +0000
description:
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:
lib/libedit/term.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (39 lines):
diff -r 50f97a131cb7 -r e3f24c6ff27f lib/libedit/term.c
--- a/lib/libedit/term.c Fri Nov 02 03:57:25 2001 +0000
+++ b/lib/libedit/term.c Fri Nov 02 04:42:09 2001 +0000
@@ -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 @@
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 @@
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
Home |
Main Index |
Thread Index |
Old Index