diff options
| author | Dan Nicolaescu | 2010-07-12 21:54:28 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-07-12 21:54:28 -0700 |
| commit | 01faa93498c3f0430821a0302911422e916fd6de (patch) | |
| tree | d9fd59174f6b44e62aa119e9118c330c7ebe7032 /src/process.c | |
| parent | b3ffc17c5dafe807981af3e0b72b3508d3b4fff4 (diff) | |
| download | emacs-01faa93498c3f0430821a0302911422e916fd6de.tar.gz emacs-01faa93498c3f0430821a0302911422e916fd6de.zip | |
Remove subprocesses #ifdefs from term.c.
* src/process.c (add_keyboard_wait_descriptor)
(delete_keyboard_wait_descriptor): Move to common section, do
nothing when subprocesses is not defined.
* src/term.c (Fsuspend_tty, Fresume_tty, init_tty): Remove subprocesses #ifdefs.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 62 |
1 files changed, 32 insertions, 30 deletions
diff --git a/src/process.c b/src/process.c index 95721a2bd91..275f3c15898 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -6844,17 +6844,6 @@ DEFUN ("process-filter-multibyte-p", Fprocess_filter_multibyte_p, | |||
| 6844 | 6844 | ||
| 6845 | 6845 | ||
| 6846 | 6846 | ||
| 6847 | /* Add DESC to the set of keyboard input descriptors. */ | ||
| 6848 | |||
| 6849 | void | ||
| 6850 | add_keyboard_wait_descriptor (int desc) | ||
| 6851 | { | ||
| 6852 | FD_SET (desc, &input_wait_mask); | ||
| 6853 | FD_SET (desc, &non_process_wait_mask); | ||
| 6854 | if (desc > max_keyboard_desc) | ||
| 6855 | max_keyboard_desc = desc; | ||
| 6856 | } | ||
| 6857 | |||
| 6858 | static int add_gpm_wait_descriptor_called_flag; | 6847 | static int add_gpm_wait_descriptor_called_flag; |
| 6859 | 6848 | ||
| 6860 | void | 6849 | void |
| @@ -6869,25 +6858,6 @@ add_gpm_wait_descriptor (int desc) | |||
| 6869 | max_gpm_desc = desc; | 6858 | max_gpm_desc = desc; |
| 6870 | } | 6859 | } |
| 6871 | 6860 | ||
| 6872 | /* From now on, do not expect DESC to give keyboard input. */ | ||
| 6873 | |||
| 6874 | void | ||
| 6875 | delete_keyboard_wait_descriptor (int desc) | ||
| 6876 | { | ||
| 6877 | int fd; | ||
| 6878 | int lim = max_keyboard_desc; | ||
| 6879 | |||
| 6880 | FD_CLR (desc, &input_wait_mask); | ||
| 6881 | FD_CLR (desc, &non_process_wait_mask); | ||
| 6882 | |||
| 6883 | if (desc == max_keyboard_desc) | ||
| 6884 | for (fd = 0; fd < lim; fd++) | ||
| 6885 | if (FD_ISSET (fd, &input_wait_mask) | ||
| 6886 | && !FD_ISSET (fd, &non_keyboard_wait_mask) | ||
| 6887 | && !FD_ISSET (fd, &gpm_wait_mask)) | ||
| 6888 | max_keyboard_desc = fd; | ||
| 6889 | } | ||
| 6890 | |||
| 6891 | void | 6861 | void |
| 6892 | delete_gpm_wait_descriptor (int desc) | 6862 | delete_gpm_wait_descriptor (int desc) |
| 6893 | { | 6863 | { |
| @@ -7147,6 +7117,38 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, | |||
| 7147 | /* The following functions are needed even if async subprocesses are | 7117 | /* The following functions are needed even if async subprocesses are |
| 7148 | not supported. Some of them are no-op stubs in that case. */ | 7118 | not supported. Some of them are no-op stubs in that case. */ |
| 7149 | 7119 | ||
| 7120 | /* Add DESC to the set of keyboard input descriptors. */ | ||
| 7121 | |||
| 7122 | void | ||
| 7123 | add_keyboard_wait_descriptor (int desc) | ||
| 7124 | { | ||
| 7125 | FD_SET (desc, &input_wait_mask); | ||
| 7126 | FD_SET (desc, &non_process_wait_mask); | ||
| 7127 | if (desc > max_keyboard_desc) | ||
| 7128 | max_keyboard_desc = desc; | ||
| 7129 | } | ||
| 7130 | |||
| 7131 | /* From now on, do not expect DESC to give keyboard input. */ | ||
| 7132 | |||
| 7133 | void | ||
| 7134 | delete_keyboard_wait_descriptor (int desc) | ||
| 7135 | { | ||
| 7136 | #ifdef subprocesses | ||
| 7137 | int fd; | ||
| 7138 | int lim = max_keyboard_desc; | ||
| 7139 | |||
| 7140 | FD_CLR (desc, &input_wait_mask); | ||
| 7141 | FD_CLR (desc, &non_process_wait_mask); | ||
| 7142 | |||
| 7143 | if (desc == max_keyboard_desc) | ||
| 7144 | for (fd = 0; fd < lim; fd++) | ||
| 7145 | if (FD_ISSET (fd, &input_wait_mask) | ||
| 7146 | && !FD_ISSET (fd, &non_keyboard_wait_mask) | ||
| 7147 | && !FD_ISSET (fd, &gpm_wait_mask)) | ||
| 7148 | max_keyboard_desc = fd; | ||
| 7149 | #endif /* subprocesses */ | ||
| 7150 | } | ||
| 7151 | |||
| 7150 | /* Setup coding systems of PROCESS. */ | 7152 | /* Setup coding systems of PROCESS. */ |
| 7151 | 7153 | ||
| 7152 | void | 7154 | void |