Author: markj
Date: Sat Jan 14 22:06:25 2017
New Revision: 312196
URL: https://svnweb.freebsd.org/changeset/base/312196

Log:
  Revert r311952.
  
  It broke DDB type-ahead since it caused db_check_interrupt() to drop
  unrecognized characters.
  
  Reported by:  bde

Modified:
  head/sys/ddb/db_input.c

Modified: head/sys/ddb/db_input.c
==============================================================================
--- head/sys/ddb/db_input.c     Sat Jan 14 20:41:44 2017        (r312195)
+++ head/sys/ddb/db_input.c     Sat Jan 14 22:06:25 2017        (r312196)
@@ -63,6 +63,7 @@ static int    db_lhist_nlines;
 #define        BLANK           ' '
 #define        BACKUP          '\b'
 
+static int     cnmaygetc(void);
 static void    db_delete(int n, int bwd);
 static int     db_inputchar(int c);
 static void    db_putnchars(int c, int count);
@@ -290,6 +291,12 @@ db_inputchar(c)
        return (0);
 }
 
+static int
+cnmaygetc()
+{
+       return (-1);
+}
+
 int
 db_readline(lstart, lsize)
        char *  lstart;
@@ -343,7 +350,7 @@ db_check_interrupt(void)
 {
        int     c;
 
-       c = cncheckc();
+       c = cnmaygetc();
        switch (c) {
            case -1:            /* no character */
                return;
@@ -354,7 +361,7 @@ db_check_interrupt(void)
 
            case CTRL('s'):
                do {
-                   c = cncheckc();
+                   c = cnmaygetc();
                    if (c == CTRL('c'))
                        db_error((char *)0);
                } while (c != CTRL('q'));
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to