From owner-svn-src-head@freebsd.org Thu Jan 12 00:22:38 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 033BBCABB82; Thu, 12 Jan 2017 00:22:38 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6F8E1E2F; Thu, 12 Jan 2017 00:22:37 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0C0Ma7p053077; Thu, 12 Jan 2017 00:22:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0C0MaHq053076; Thu, 12 Jan 2017 00:22:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201701120022.v0C0MaHq053076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 12 Jan 2017 00:22:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r311952 - head/sys/ddb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 00:22:38 -0000 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 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'));