Mercurial > emacs
comparison src/process.c @ 109376:409ecfd9731e
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.
| author | Dan Nicolaescu <dann@ics.uci.edu> |
|---|---|
| date | Mon, 12 Jul 2010 21:54:28 -0700 |
| parents | a0caeaa02476 |
| children | cef697cc4464 |
comparison
equal
deleted
inserted
replaced
| 109375:3e07e13fe30a | 109376:409ecfd9731e |
|---|---|
| 6842 } | 6842 } |
| 6843 | 6843 |
| 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 |
| 6861 add_gpm_wait_descriptor (int desc) | 6850 add_gpm_wait_descriptor (int desc) |
| 6862 { | 6851 { |
| 6865 add_gpm_wait_descriptor_called_flag = 1; | 6854 add_gpm_wait_descriptor_called_flag = 1; |
| 6866 FD_SET (desc, &input_wait_mask); | 6855 FD_SET (desc, &input_wait_mask); |
| 6867 FD_SET (desc, &gpm_wait_mask); | 6856 FD_SET (desc, &gpm_wait_mask); |
| 6868 if (desc > max_gpm_desc) | 6857 if (desc > max_gpm_desc) |
| 6869 max_gpm_desc = desc; | 6858 max_gpm_desc = desc; |
| 6870 } | |
| 6871 | |
| 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 } | 6859 } |
| 6890 | 6860 |
| 6891 void | 6861 void |
| 6892 delete_gpm_wait_descriptor (int desc) | 6862 delete_gpm_wait_descriptor (int desc) |
| 6893 { | 6863 { |
| 7144 | 7114 |
| 7145 #endif /* not subprocesses */ | 7115 #endif /* not subprocesses */ |
| 7146 | 7116 |
| 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. */ |
| 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 } | |
| 7149 | 7151 |
| 7150 /* Setup coding systems of PROCESS. */ | 7152 /* Setup coding systems of PROCESS. */ |
| 7151 | 7153 |
| 7152 void | 7154 void |
| 7153 setup_process_coding_systems (Lisp_Object process) | 7155 setup_process_coding_systems (Lisp_Object process) |
