Author: markj
Date: Thu Jan 12 00:22:36 2017
New Revision: 311952
URL: https://svnweb.freebsd.org/changeset/base/311952

Log:
  Enable the use of ^C and ^S/^Q in DDB.
  
  This lets one interrupt DDB's output, which is useful if paging is
  disabled and the output device is slow.
  
  Submitted by: Anton Rang <r...@acm.org>
  Reviewed by:  jhb
  MFC after:    1 week
  Differential Revision:        https://reviews.freebsd.org/D9138

Modified:
  head/sys/ddb/db_input.c

Modified: head/sys/ddb/db_input.c
==============================================================================
--- head/sys/ddb/db_input.c     Thu Jan 12 00:09:31 2017        (r311951)
+++ head/sys/ddb/db_input.c     Thu Jan 12 00:22:36 2017        (r311952)
@@ -63,7 +63,6 @@ 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);
@@ -291,12 +290,6 @@ db_inputchar(c)
        return (0);
 }
 
-static int
-cnmaygetc()
-{
-       return (-1);
-}
-
 int
 db_readline(lstart, lsize)
        char *  lstart;
@@ -350,7 +343,7 @@ db_check_interrupt(void)
 {
        int     c;
 
-       c = cnmaygetc();
+       c = cncheckc();
        switch (c) {
            case -1:            /* no character */
                return;
@@ -361,7 +354,7 @@ db_check_interrupt(void)
 
            case CTRL('s'):
                do {
-                   c = cnmaygetc();
+                   c = cncheckc();
                    if (c == CTRL('c'))
                        db_error((char *)0);
                } while (c != CTRL('q'));
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to