Revert r311952.

It broke DDB type-ahead since it caused db_check_interrupt() to drop
unrecognized characters.

Reported by:	bde
This commit is contained in:
Mark Johnston 2017-01-14 22:06:25 +00:00
parent a15fbc904a
commit c2718b428e

View File

@ -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'));