Mercurial > emacs
comparison src/process.c @ 14998:ffbd85603f91
(wait_reading_process_input, both definitions):
Don't call detect_input_pending; use detect_input_pending_run_timers.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Fri, 12 Apr 1996 06:02:54 +0000 |
| parents | 3e0dc64a5cb8 |
| children | af36df262fc5 |
comparison
equal
deleted
inserted
replaced
| 14997:51a773474d47 | 14998:ffbd85603f91 |
|---|---|
| 2172 redisplay_preserve_echo_area (); | 2172 redisplay_preserve_echo_area (); |
| 2173 if (XINT (read_kbd) < 0) | 2173 if (XINT (read_kbd) < 0) |
| 2174 set_waiting_for_input (&timeout); | 2174 set_waiting_for_input (&timeout); |
| 2175 } | 2175 } |
| 2176 | 2176 |
| 2177 if (XINT (read_kbd) && detect_input_pending ()) | 2177 { |
| 2178 { | 2178 int old_timers_run = timers_run; |
| 2179 nfds = 0; | 2179 if (XINT (read_kbd) && detect_input_pending_run_timers (do_display)) |
| 2180 FD_ZERO (&Available); | 2180 { |
| 2181 } | 2181 nfds = 0; |
| 2182 else | 2182 FD_ZERO (&Available); |
| 2183 nfds = select (MAXDESC, &Available, (SELECT_TYPE *)0, (SELECT_TYPE *)0, | 2183 } |
| 2184 &timeout); | 2184 else if (timers_run != old_timers_run) |
| 2185 ; | |
| 2186 else | |
| 2187 nfds = select (MAXDESC, &Available, (SELECT_TYPE *)0, (SELECT_TYPE *)0, | |
| 2188 &timeout); | |
| 2189 } | |
| 2185 | 2190 |
| 2186 xerrno = errno; | 2191 xerrno = errno; |
| 2187 | 2192 |
| 2188 /* Make C-g and alarm signals set flags again */ | 2193 /* Make C-g and alarm signals set flags again */ |
| 2189 clear_waiting_for_input (); | 2194 clear_waiting_for_input (); |
| 2246 | 2251 |
| 2247 /* Check for keyboard input */ | 2252 /* Check for keyboard input */ |
| 2248 /* If there is any, return immediately | 2253 /* If there is any, return immediately |
| 2249 to give it higher priority than subprocesses */ | 2254 to give it higher priority than subprocesses */ |
| 2250 | 2255 |
| 2251 if (XINT (read_kbd) < 0 && detect_input_pending ()) | 2256 if ((XINT (read_kbd) != 0 || wait_for_cell) |
| 2252 { | |
| 2253 swallow_events (do_display); | |
| 2254 if (detect_input_pending ()) | |
| 2255 break; | |
| 2256 } | |
| 2257 | |
| 2258 if ((XINT (read_kbd) > 0 || wait_for_cell) | |
| 2259 && detect_input_pending_run_timers (do_display)) | 2257 && detect_input_pending_run_timers (do_display)) |
| 2260 { | 2258 { |
| 2261 swallow_events (do_display); | 2259 swallow_events (do_display); |
| 2262 if (detect_input_pending_run_timers (do_display)) | 2260 if (detect_input_pending_run_timers (do_display)) |
| 2263 break; | 2261 break; |
| 3928 /* If a frame has been newly mapped and needs updating, | 3926 /* If a frame has been newly mapped and needs updating, |
| 3929 reprocess its display stuff. */ | 3927 reprocess its display stuff. */ |
| 3930 if (frame_garbaged && do_display) | 3928 if (frame_garbaged && do_display) |
| 3931 redisplay_preserve_echo_area (); | 3929 redisplay_preserve_echo_area (); |
| 3932 | 3930 |
| 3933 if (XINT (read_kbd) && detect_input_pending ()) | 3931 { |
| 3934 nfds = 0; | 3932 int old_timers_run = timers_run; |
| 3935 else | 3933 if (XINT (read_kbd) && detect_input_pending_run_timers (do_display)) |
| 3936 nfds = select (1, &waitchannels, (SELECT_TYPE *)0, (SELECT_TYPE *)0, | 3934 nfds = 0; |
| 3937 &timeout); | 3935 else if (timers_run != old_timers_run) |
| 3936 ; | |
| 3937 else | |
| 3938 nfds = select (1, &waitchannels, (SELECT_TYPE *)0, (SELECT_TYPE *)0, | |
| 3939 &timeout); | |
| 3940 } | |
| 3938 | 3941 |
| 3939 xerrno = errno; | 3942 xerrno = errno; |
| 3940 | 3943 |
| 3941 /* Make C-g and alarm signals set flags again */ | 3944 /* Make C-g and alarm signals set flags again */ |
| 3942 clear_waiting_for_input (); | 3945 clear_waiting_for_input (); |
| 3967 kill (getpid (), SIGIO); | 3970 kill (getpid (), SIGIO); |
| 3968 #endif | 3971 #endif |
| 3969 | 3972 |
| 3970 /* Check for keyboard input */ | 3973 /* Check for keyboard input */ |
| 3971 | 3974 |
| 3972 if (XINT (read_kbd) < 0 && detect_input_pending ()) | 3975 if (XINT (read_kbd) != 0 |
| 3973 { | |
| 3974 swallow_events (do_display); | |
| 3975 if (detect_input_pending ()) | |
| 3976 break; | |
| 3977 } | |
| 3978 | |
| 3979 if (XINT (read_kbd) > 0 | |
| 3980 && detect_input_pending_run_timers (do_display)) | 3976 && detect_input_pending_run_timers (do_display)) |
| 3981 { | 3977 { |
| 3982 swallow_events (do_display); | 3978 swallow_events (do_display); |
| 3983 if (detect_input_pending_run_timers (do_display)) | 3979 if (detect_input_pending_run_timers (do_display)) |
| 3984 break; | 3980 break; |
