From d39b9fabdb7c6802aff547b17810b02d9dffa8a4 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 9 Sep 2005 11:48:27 +0000 Subject: 21709 plus tweaks: use $KEYTIMEOUT for multibyte chars.Reset input state on invalid characters or EOF --- Src/builtin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Src/builtin.c') diff --git a/Src/builtin.c b/Src/builtin.c index 2df342533..f9ba4af3e 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -4539,7 +4539,7 @@ bin_read(char *name, char **args, Options ops, UNUSED(int func)) do { if (izle) { - if ((val = getkeyptr(0)) < 0) + if ((val = getkeyptr(0, NULL)) < 0) break; *bptr++ = (char) val; nchars--; @@ -4595,7 +4595,7 @@ bin_read(char *name, char **args, Options ops, UNUSED(int func)) /* get, and store, reply */ if (izle) { - int key = getkeyptr(0); + int key = getkeyptr(0, NULL); readbuf[0] = (key == 'y' ? 'y' : 'n'); } else { @@ -4818,7 +4818,7 @@ zread(int izle, int *readchar) int ret; if (izle) { - int c = getkeyptr(0); + int c = getkeyptr(0, NULL); return (c < 0 ? EOF : c); } -- cgit 1.4.1