Mercurial > emacs
comparison src/dispnew.c @ 56727:6b028bf60b4e
(Fsleep_for): Remove obsolete code.
Rename wait_reading_process_input to wait_reading_process_output.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Fri, 20 Aug 2004 10:33:05 +0000 |
parents | f95a8f5985be |
children | a1c4ff636947 22658e29bd48 d8411455de48 |
comparison
equal
deleted
inserted
replaced
56726:05cd07c4498a | 56727:6b028bf60b4e |
---|---|
6329 sec += usec / 1000000, usec %= 1000000; | 6329 sec += usec / 1000000, usec %= 1000000; |
6330 | 6330 |
6331 if (sec < 0 || (sec == 0 && usec == 0)) | 6331 if (sec < 0 || (sec == 0 && usec == 0)) |
6332 return Qnil; | 6332 return Qnil; |
6333 | 6333 |
6334 wait_reading_process_input (sec, usec, 0, 0, Qnil, NULL, 0); | 6334 wait_reading_process_output (sec, usec, 0, 0, Qnil, NULL, 0); |
6335 | |
6336 /* We should always have wait_reading_process_input; we have a dummy | |
6337 implementation for systems which don't support subprocesses. */ | |
6338 #if 0 | |
6339 /* No wait_reading_process_input */ | |
6340 immediate_quit = 1; | |
6341 QUIT; | |
6342 | |
6343 #ifdef VMS | |
6344 sys_sleep (sec); | |
6345 #else /* not VMS */ | |
6346 /* The reason this is done this way | |
6347 (rather than defined (H_S) && defined (H_T)) | |
6348 is because the VMS preprocessor doesn't grok `defined'. */ | |
6349 #ifdef HAVE_SELECT | |
6350 EMACS_GET_TIME (end_time); | |
6351 EMACS_SET_SECS_USECS (timeout, sec, usec); | |
6352 EMACS_ADD_TIME (end_time, end_time, timeout); | |
6353 | |
6354 while (1) | |
6355 { | |
6356 EMACS_GET_TIME (timeout); | |
6357 EMACS_SUB_TIME (timeout, end_time, timeout); | |
6358 if (EMACS_TIME_NEG_P (timeout) | |
6359 || !select (1, 0, 0, 0, &timeout)) | |
6360 break; | |
6361 } | |
6362 #else /* not HAVE_SELECT */ | |
6363 sleep (sec); | |
6364 #endif /* HAVE_SELECT */ | |
6365 #endif /* not VMS */ | |
6366 | |
6367 immediate_quit = 0; | |
6368 #endif /* no subprocesses */ | |
6369 | 6335 |
6370 return Qnil; | 6336 return Qnil; |
6371 } | 6337 } |
6372 | 6338 |
6373 | 6339 |
6374 /* This is just like wait_reading_process_input, except that | 6340 /* This is just like wait_reading_process_output, except that |
6375 it does the redisplay. | 6341 it does the redisplay. |
6376 | 6342 |
6377 It's also much like Fsit_for, except that it can be used for | 6343 It's also much like Fsit_for, except that it can be used for |
6378 waiting for input as well. */ | 6344 waiting for input as well. */ |
6379 | 6345 |
6394 | 6360 |
6395 #ifdef SIGIO | 6361 #ifdef SIGIO |
6396 gobble_input (0); | 6362 gobble_input (0); |
6397 #endif | 6363 #endif |
6398 | 6364 |
6399 wait_reading_process_input (sec, usec, reading ? -1 : 1, display, | 6365 wait_reading_process_output (sec, usec, reading ? -1 : 1, display, |
6400 Qnil, NULL, 0); | 6366 Qnil, NULL, 0); |
6401 | 6367 |
6402 return detect_input_pending () ? Qnil : Qt; | 6368 return detect_input_pending () ? Qnil : Qt; |
6403 } | 6369 } |
6404 | 6370 |
6405 | 6371 |