diff options
| author | Karoly Lorentey | 2004-02-25 02:55:32 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-02-25 02:55:32 +0000 |
| commit | a0dc3cb69aadb1feb15e26914e9d032157294b53 (patch) | |
| tree | 43688620195fb62787bd1698acee01ad6ba13114 | |
| parent | 01d81f75b97d8e105f1a84be05f30d40b727ef6e (diff) | |
| download | emacs-a0dc3cb69aadb1feb15e26914e9d032157294b53.tar.gz emacs-a0dc3cb69aadb1feb15e26914e9d032157294b53.zip | |
Allow tty_read_avail_input to use the whole input buffer.
src/keyboard.c (tty_read_avail_input): Use a cbuf of size numchar, not numchar-1.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-96
| -rw-r--r-- | src/keyboard.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index de91b40d295..9c41fa91351 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -6685,10 +6685,10 @@ tty_read_avail_input (struct display *display, | |||
| 6685 | struct input_event *buf, | 6685 | struct input_event *buf, |
| 6686 | int numchars, int expected) | 6686 | int numchars, int expected) |
| 6687 | { | 6687 | { |
| 6688 | /* Using numchars - 1 here avoids reading more than the buf can | 6688 | /* Using numchars here avoids reading more than the buf can |
| 6689 | really hold. That may prevent loss of characters on some systems | 6689 | really hold. That may prevent loss of characters on some systems |
| 6690 | when input is stuffed at us. */ | 6690 | when input is stuffed at us. */ |
| 6691 | unsigned char cbuf[numchars - 1]; | 6691 | unsigned char cbuf[numchars]; |
| 6692 | int n_to_read, i; | 6692 | int n_to_read, i; |
| 6693 | struct tty_display_info *tty = display->display_info.tty; | 6693 | struct tty_display_info *tty = display->display_info.tty; |
| 6694 | int nread = 0; | 6694 | int nread = 0; |