diff options
| author | Kim F. Storm | 2004-02-27 23:48:59 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2004-02-27 23:48:59 +0000 |
| commit | 9cd31aafd44dd4039c58d144a02fbd31f3c7e07f (patch) | |
| tree | 5f4aa8e24307e6c98ed21278112d2a0ce1e7b29d /src | |
| parent | 9c46d57b205887f8e43a56ee29315e3455f0bd87 (diff) | |
| download | emacs-9cd31aafd44dd4039c58d144a02fbd31f3c7e07f.tar.gz emacs-9cd31aafd44dd4039c58d144a02fbd31f3c7e07f.zip | |
(w32_console_read_socket): Remove bufp_r and
numcharsp args. Add hold_quit arg.
Rework to use just one, local, inev input_event. Store inev
directly in fifo using kbd_buffer_store_event_hold.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32inevt.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/w32inevt.c b/src/w32inevt.c index b3f8e3ff737..168a0fb87b3 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c | |||
| @@ -642,8 +642,7 @@ maybe_generate_resize_event () | |||
| 642 | } | 642 | } |
| 643 | 643 | ||
| 644 | int | 644 | int |
| 645 | w32_console_read_socket (int sd, struct input_event *bufp, int numchars, | 645 | w32_console_read_socket (int sd, int expected, struct input_event *hold_quit) |
| 646 | int expected) | ||
| 647 | { | 646 | { |
| 648 | BOOL no_events = TRUE; | 647 | BOOL no_events = TRUE; |
| 649 | int nev, ret = 0, add; | 648 | int nev, ret = 0, add; |
| @@ -670,27 +669,31 @@ w32_console_read_socket (int sd, struct input_event *bufp, int numchars, | |||
| 670 | return nev; | 669 | return nev; |
| 671 | } | 670 | } |
| 672 | 671 | ||
| 673 | while (nev > 0 && numchars > 0) | 672 | while (nev > 0) |
| 674 | { | 673 | { |
| 674 | struct input_event inev; | ||
| 675 | |||
| 676 | EVENT_INIT (inev); | ||
| 677 | inev.kind = NO_EVENT; | ||
| 678 | inev.arg = Qnil; | ||
| 679 | |||
| 675 | switch (queue_ptr->EventType) | 680 | switch (queue_ptr->EventType) |
| 676 | { | 681 | { |
| 677 | case KEY_EVENT: | 682 | case KEY_EVENT: |
| 678 | add = key_event (&queue_ptr->Event.KeyEvent, bufp, &isdead); | 683 | add = key_event (&queue_ptr->Event.KeyEvent, &inev, &isdead); |
| 679 | if (add == -1) /* 95.7.25 by himi */ | 684 | if (add == -1) /* 95.7.25 by himi */ |
| 680 | { | 685 | { |
| 681 | queue_ptr--; | 686 | queue_ptr--; |
| 682 | add = 1; | 687 | add = 1; |
| 683 | } | 688 | } |
| 684 | bufp += add; | 689 | if (add) |
| 685 | ret += add; | 690 | kbd_buffer_store_event_hold (&inev, hold_quit); |
| 686 | numchars -= add; | ||
| 687 | break; | 691 | break; |
| 688 | 692 | ||
| 689 | case MOUSE_EVENT: | 693 | case MOUSE_EVENT: |
| 690 | add = do_mouse_event (&queue_ptr->Event.MouseEvent, bufp); | 694 | add = do_mouse_event (&queue_ptr->Event.MouseEvent, &inev); |
| 691 | bufp += add; | 695 | if (add) |
| 692 | ret += add; | 696 | kbd_buffer_store_event_hold (&inev, hold_quit); |
| 693 | numchars -= add; | ||
| 694 | break; | 697 | break; |
| 695 | 698 | ||
| 696 | case WINDOW_BUFFER_SIZE_EVENT: | 699 | case WINDOW_BUFFER_SIZE_EVENT: |