comparison src/process.c @ 14613:386831bc4a4e

(wait_reading_process_input): Pass new arg to swallow_events. (wait_reading_process_input): If read_kbd is 1, use detect_input_pending_run_timers instead of detect_input_pending.
author Karl Heuer <kwzh@gnu.org>
date Wed, 21 Feb 1996 21:08:31 +0000
parents 80196bfd8b94
children 0493e857a13b
comparison
equal deleted inserted replaced
14612:0019d219990c 14613:386831bc4a4e
2191 #else 2191 #else
2192 abort (); 2192 abort ();
2193 #endif 2193 #endif
2194 } 2194 }
2195 else 2195 else
2196 error("select error: %s", strerror (xerrno)); 2196 error ("select error: %s", strerror (xerrno));
2197 } 2197 }
2198 #if defined(sun) && !defined(USG5_4) 2198 #if defined(sun) && !defined(USG5_4)
2199 else if (nfds > 0 && keyboard_bit_set (&Available) 2199 else if (nfds > 0 && keyboard_bit_set (&Available)
2200 && interrupt_input) 2200 && interrupt_input)
2201 /* System sometimes fails to deliver SIGIO. 2201 /* System sometimes fails to deliver SIGIO.
2210 2210
2211 /* Check for keyboard input */ 2211 /* Check for keyboard input */
2212 /* If there is any, return immediately 2212 /* If there is any, return immediately
2213 to give it higher priority than subprocesses */ 2213 to give it higher priority than subprocesses */
2214 2214
2215 /* We used to do this if wait_for_cell, 2215 if (XINT (read_kbd) < 0 && detect_input_pending ())
2216 but that caused infinite recursion in selection request events. */
2217 if ((XINT (read_kbd) || wait_for_cell)
2218 && detect_input_pending ())
2219 { 2216 {
2220 swallow_events (); 2217 swallow_events (do_display);
2221 if (detect_input_pending ()) 2218 if (detect_input_pending ())
2219 break;
2220 }
2221
2222 if ((XINT (read_kbd) > 0 || wait_for_cell)
2223 && detect_input_pending_run_timers ())
2224 {
2225 swallow_events (do_display);
2226 if (detect_input_pending_run_timers ())
2222 break; 2227 break;
2223 } 2228 }
2224 2229
2225 /* Exit now if the cell we're waiting for became non-nil. */ 2230 /* Exit now if the cell we're waiting for became non-nil. */
2226 if (wait_for_cell && ! NILP (*wait_for_cell)) 2231 if (wait_for_cell && ! NILP (*wait_for_cell))