Mercurial > emacs
diff src/process.c @ 109378:4e99d7aa7526
Remove more "#ifdef subprocesses".
process.c <inhibit_sentinels>: Move to the common part.
(Fwaiting_for_user_input_p): Move to the common part; return nil
if async subprocesses aren't supported.
sysdep.c (wait_for_termination) [!MSDOS]: Don't compile on
MS-DOS. Remove "#ifdef subprocesses".
(sys_subshell, sys_select): Remove "#ifdef subprocesses".
(gettimeofday): Remove "#ifdef subprocesses".
(wait_without_blocking): Remove function.
(flush_pending_output, child_setup_tty): Don't compile on MS-DOS.
Remove "#ifdef subprocesses".
(child_setup_tty): Use WINDOWSNT instead of DOS_NT, since not
compiled on MS-DOS.
callproc.c (Fcall_process) [!MSDOS]: Don't call
wait_for_termination on MS-DOS.
emacs.c (shut_down_emacs): Remove "#ifndef subprocesses" from
initialization of inhibit_sentinels.
keyboard.c (record_asynch_buffer_change): Remove "#ifdef
subprocesses" conditional.
callproc.c (Fcall_process) [!subprocesses]: Don't call
wait_for_termination, since `buffer' cannot be an integer when
async subprocesses are not supported
xdisp.c (decode_mode_spec): Use `MSDOS' instead of `subprocesses'
for ifdefing away the call to Fprocess_status.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Tue, 13 Jul 2010 13:57:00 +0300 |
parents | cef697cc4464 |
children | 039143f82441 |
line wrap: on
line diff
--- a/src/process.c Tue Jul 13 13:03:22 2010 +0300 +++ b/src/process.c Tue Jul 13 13:57:00 2010 +0300 @@ -304,6 +304,10 @@ /* Nonzero means delete a process right away if it exits. */ static int delete_exited_processes; +/* Nonzero means don't run process sentinels. This is used + when exiting. */ +int inhibit_sentinels; + #ifdef subprocesses /* Mask of bits indicating the descriptors that we wait for input on. */ @@ -381,10 +385,6 @@ /* Maximum number of bytes to send to a pty without an eof. */ static int pty_max_bytes; -/* Nonzero means don't run process sentinels. This is used - when exiting. */ -int inhibit_sentinels; - #ifdef HAVE_PTYS #ifdef HAVE_PTY_H #include <pty.h> @@ -5433,15 +5433,6 @@ unbind_to (count, Qnil); return nbytes; } - -DEFUN ("waiting-for-user-input-p", Fwaiting_for_user_input_p, Swaiting_for_user_input_p, - 0, 0, 0, - doc: /* Returns non-nil if Emacs is waiting for input from the user. -This is intended for use by asynchronous process output filters and sentinels. */) - (void) -{ - return (waiting_for_user_input_p ? Qt : Qnil); -} /* Sending data to subprocess */ @@ -7279,6 +7270,19 @@ #endif /* subprocesses */ } +DEFUN ("waiting-for-user-input-p", Fwaiting_for_user_input_p, Swaiting_for_user_input_p, + 0, 0, 0, + doc: /* Returns non-nil if Emacs is waiting for input from the user. +This is intended for use by asynchronous process output filters and sentinels. */) + (void) +{ +#ifdef subprocesses + return (waiting_for_user_input_p ? Qt : Qnil); +#else + return Qnil; +#endif +} + /* Stop reading input from keyboard sources. */ void