diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2005-09-09 11:48:27 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2005-09-09 11:48:27 +0000 |
commit | d39b9fabdb7c6802aff547b17810b02d9dffa8a4 (patch) | |
tree | cd09c46bea91106645ab48b15efea4836f97ca3d /Src/builtin.c | |
parent | f384f479849294da76608a5608bc2fcf08f298f0 (diff) | |
download | zsh-d39b9fabdb7c6802aff547b17810b02d9dffa8a4.tar.gz zsh-d39b9fabdb7c6802aff547b17810b02d9dffa8a4.tar.xz zsh-d39b9fabdb7c6802aff547b17810b02d9dffa8a4.zip |
21709 plus tweaks: use $KEYTIMEOUT for multibyte chars.Reset input state on invalid characters or EOF
Diffstat (limited to 'Src/builtin.c')
-rw-r--r-- | Src/builtin.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); } |