emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100185: Fix revno 100152.


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100185: Fix revno 100152.
Date: Tue, 09 Nov 2010 20:36:21 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100185
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-23
timestamp: Tue 2010-11-09 20:36:21 +0200
message:
  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.
modified:
  src/ChangeLog
  src/keyboard.c
  src/process.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-11-09 18:28:38 +0000
+++ b/src/ChangeLog     2010-11-09 18:36:21 +0000
@@ -1,5 +1,13 @@
 2010-11-09  Eli Zaretskii  <address@hidden>
 
+       * 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

=== modified file 'src/keyboard.c'
--- a/src/keyboard.c    2010-11-01 11:30:33 +0000
+++ b/src/keyboard.c    2010-11-09 18:36:21 +0000
@@ -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.  */

=== modified file 'src/process.c'
--- a/src/process.c     2010-11-04 19:54:28 +0000
+++ b/src/process.c     2010-11-09 18:36:21 +0000
@@ -7356,6 +7356,7 @@
   register int i;
 
   inhibit_sentinels = 0;
+  kbd_is_on_hold = 0;
 
 #ifdef SIGCHLD
 #ifndef CANNOT_DUMP
@@ -8093,7 +8094,6 @@
 void
 init_process ()
 {
-  kbd_is_on_hold = 0;
 }
 
 void


reply via email to

[Prev in Thread] Current Thread [Next in Thread]