Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libedit In the `not what I asked for' department:



details:   https://anonhg.NetBSD.org/src/rev/d31febc82b01
branches:  trunk
changeset: 517206:d31febc82b01
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Thu Nov 08 19:39:10 2001 +0000

description:
In the `not what I asked for' department:
Do NOT return an error from term_init() if term_set() fails.  Otherwise
el_init() barfs and libedit fails to work.

diffstat:

 lib/libedit/term.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r b973b5cff6df -r d31febc82b01 lib/libedit/term.c
--- a/lib/libedit/term.c        Thu Nov 08 19:34:41 2001 +0000
+++ b/lib/libedit/term.c        Thu Nov 08 19:39:10 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: term.c,v 1.33 2001/11/02 04:42:09 christos Exp $       */
+/*     $NetBSD: term.c,v 1.34 2001/11/08 19:39:10 mycroft 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.33 2001/11/02 04:42:09 christos Exp $");
+__RCSID("$NetBSD: term.c,v 1.34 2001/11/08 19:39:10 mycroft Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -321,7 +321,6 @@
 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)
@@ -342,9 +341,9 @@
                return (-1);
        (void) memset(el->el_term.t_val, 0, T_val * sizeof(int));
        term_outfile = el->el_outfile;
-       error = term_set(el, NULL);
+       (void) term_set(el, NULL);
        term_init_arrow(el);
-       return (error);
+       return (0);
 }
 /* term_end():
  *     Clean up the terminal stuff



Home | Main Index | Thread Index | Old Index