Mercurial > emacs
changeset 111590:121e3a019c49
Fix revno 100152.
keyboard.c (kbd_buffer_nr_stored): Define only ifdef subprocesses.
(kbd_buffer_store_event_hold, kbd_buffer_get_event)
(tty_read_avail_input): Call kbd_buffer_nr_stored only ifdef
subprocesses. Use buffer_free only ifdef subprocesses.
process.c (init_process) [subprocesses]: Init kbd_is_on_hold in
the subprocesses version, not in the non-subprocesses one.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Tue, 09 Nov 2010 20:36:21 +0200 |
parents | 82705ee7a2ac |
children | 6926686a73a0 |
files | src/ChangeLog src/keyboard.c src/process.c |
diffstat | 3 files changed, 19 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Tue Nov 09 20:28:38 2010 +0200 +++ b/src/ChangeLog Tue Nov 09 20:36:21 2010 +0200 @@ -1,5 +1,13 @@ 2010-11-09 Eli Zaretskii <eliz@gnu.org> + * keyboard.c (kbd_buffer_nr_stored): Define only ifdef subprocesses. + (kbd_buffer_store_event_hold, kbd_buffer_get_event) + (tty_read_avail_input): Call kbd_buffer_nr_stored only ifdef + subprocesses. Use buffer_free only ifdef subprocesses. + + * process.c (init_process) [subprocesses]: Init kbd_is_on_hold in + the subprocesses version, not in the non-subprocesses one. + * Makefile.in: Don't use ## comment, it breaks the MSDOS build. * xfns.c (x_real_positions): Fix declaration-after-statement
--- a/src/keyboard.c Tue Nov 09 20:28:38 2010 +0200 +++ b/src/keyboard.c Tue Nov 09 20:36:21 2010 +0200 @@ -3783,6 +3783,7 @@ return FRAME_KBOARD (XFRAME (frame)); } +#ifdef subprocesses /* Return the number of slots occupied in kbd_buffer. */ static int @@ -3795,6 +3796,7 @@ : ((kbd_buffer + KBD_BUFFER_SIZE) - kbd_fetch_ptr + (kbd_store_ptr - kbd_buffer))); } +#endif /* subprocesses */ Lisp_Object Vthrow_on_input; @@ -3918,6 +3920,7 @@ { *kbd_store_ptr = *event; ++kbd_store_ptr; +#ifdef subprocesses if (kbd_buffer_nr_stored () > KBD_BUFFER_SIZE/2 && ! kbd_on_hold_p ()) { /* Don't read keyboard input until we have processed kbd_buffer. @@ -3929,6 +3932,7 @@ #endif stop_polling (); } +#endif /* subprocesses */ } /* If we're inside while-no-input, and this event qualifies @@ -4097,6 +4101,7 @@ register int c; Lisp_Object obj; +#ifdef subprocesses if (kbd_on_hold_p () && kbd_buffer_nr_stored () < KBD_BUFFER_SIZE/4) { /* Start reading input again, we have processed enough so we can @@ -4108,6 +4113,7 @@ #endif /* SIGIO */ start_polling (); } +#endif /* subprocesses */ if (noninteractive /* In case we are running as a daemon, only do this before @@ -7308,10 +7314,12 @@ int n_to_read, i; struct tty_display_info *tty = terminal->display_info.tty; int nread = 0; +#ifdef subprocesses int buffer_free = KBD_BUFFER_SIZE - kbd_buffer_nr_stored () - 1; if (kbd_on_hold_p () || buffer_free <= 0) return 0; +#endif /* subprocesses */ if (!terminal->name) /* Don't read from a dead terminal. */ return 0; @@ -7393,9 +7401,11 @@ #endif #endif +#ifdef subprocesses /* Don't read more than we can store. */ if (n_to_read > buffer_free) n_to_read = buffer_free; +#endif /* subprocesses */ /* Now read; for one reason or another, this will not block. NREAD is set to the number of chars read. */