Source-Changes-HG archive

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

[src/netbsd-1-5]: src/lib/libedit pull up 1.18 (approved by thorpej). allow...



details:   https://anonhg.NetBSD.org/src/rev/306cb20fcfdd
branches:  netbsd-1-5
changeset: 488848:306cb20fcfdd
user:      chuck <chuck%NetBSD.org@localhost>
date:      Wed Aug 02 13:45:40 2000 +0000

description:
pull up 1.18 (approved by thorpej).   allows a gdb linked with libedit's
readline emulation to work properly with xxgdb.

diffstat:

 lib/libedit/el.c |  17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diffs (45 lines):

diff -r c376998a4633 -r 306cb20fcfdd lib/libedit/el.c
--- a/lib/libedit/el.c  Wed Aug 02 10:40:56 2000 +0000
+++ b/lib/libedit/el.c  Wed Aug 02 13:45:40 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: el.c,v 1.16.4.1 2000/06/28 22:09:04 sommerfeld Exp $   */
+/*     $NetBSD: el.c,v 1.16.4.2 2000/08/02 13:45:40 chuck Exp $        */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)el.c       8.2 (Berkeley) 1/3/94";
 #else
-__RCSID("$NetBSD: el.c,v 1.16.4.1 2000/06/28 22:09:04 sommerfeld Exp $");
+__RCSID("$NetBSD: el.c,v 1.16.4.2 2000/08/02 13:45:40 chuck Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -69,6 +69,8 @@
     const char *prog;
     FILE *fin, *fout, *ferr;
 {
+    extern char *rl_readline_name;
+
     EditLine *el = (EditLine *) el_malloc(sizeof(EditLine));
 #ifdef DEBUG
     char *tty;
@@ -88,6 +90,17 @@
      * Initialize all the modules. Order is important!!!
      */
     el->el_flags = 0;
+
+    /* readline compat hack to make xxgdb work */
+    if (prog == rl_readline_name) {
+        struct termios t;
+
+        if (tcgetattr(el->el_infd, &t) == 0) {
+           if ((t.c_lflag & ECHO) == 0)
+               el->el_flags |= EDIT_DISABLED;
+       }
+    }
+
     (void) term_init(el);
     (void) key_init(el);
     (void) map_init(el);



Home | Main Index | Thread Index | Old Index