aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDan Nicolaescu2010-07-12 21:54:28 -0700
committerDan Nicolaescu2010-07-12 21:54:28 -0700
commit01faa93498c3f0430821a0302911422e916fd6de (patch)
treed9fd59174f6b44e62aa119e9118c330c7ebe7032 /src
parentb3ffc17c5dafe807981af3e0b72b3508d3b4fff4 (diff)
downloademacs-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')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/process.c62
-rw-r--r--src/term.c9
3 files changed, 38 insertions, 39 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index d7d2f935492..65d71cda7aa 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,11 @@
12010-07-13 Dan Nicolaescu <dann@ics.uci.edu> 12010-07-13 Dan Nicolaescu <dann@ics.uci.edu>
2 2
3 Remove subprocesses #ifdefs from term.c.
4 * process.c (add_keyboard_wait_descriptor)
5 (delete_keyboard_wait_descriptor): Move to common section, do
6 nothing when subprocesses is not defined.
7 * term.c (Fsuspend_tty, Fresume_tty, init_tty): Remove subprocesses #ifdefs.
8
3 Convert maybe_fatal to standard C. 9 Convert maybe_fatal to standard C.
4 * lisp.h (verror): Declare. 10 * lisp.h (verror): Declare.
5 * eval.c (verror): New function containing the code from ... 11 * eval.c (verror): New function containing the code from ...
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
6849void
6850add_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
6858static int add_gpm_wait_descriptor_called_flag; 6847static int add_gpm_wait_descriptor_called_flag;
6859 6848
6860void 6849void
@@ -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
6874void
6875delete_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
6891void 6861void
6892delete_gpm_wait_descriptor (int desc) 6862delete_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
7122void
7123add_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
7133void
7134delete_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
7152void 7154void
diff --git a/src/term.c b/src/term.c
index 5ffd7416bbd..3233db84cf7 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2431,10 +2431,7 @@ A suspended tty may be resumed by calling `resume-tty' on it. */)
2431 } 2431 }
2432 2432
2433 reset_sys_modes (t->display_info.tty); 2433 reset_sys_modes (t->display_info.tty);
2434
2435#ifdef subprocesses
2436 delete_keyboard_wait_descriptor (fileno (f)); 2434 delete_keyboard_wait_descriptor (fileno (f));
2437#endif
2438 2435
2439#ifndef MSDOS 2436#ifndef MSDOS
2440 fclose (f); 2437 fclose (f);
@@ -2502,9 +2499,7 @@ frame's terminal). */)
2502 t->display_info.tty->input = t->display_info.tty->output; 2499 t->display_info.tty->input = t->display_info.tty->output;
2503#endif 2500#endif
2504 2501
2505#ifdef subprocesses
2506 add_keyboard_wait_descriptor (fd); 2502 add_keyboard_wait_descriptor (fd);
2507#endif
2508 2503
2509 if (FRAMEP (t->display_info.tty->top_frame)) 2504 if (FRAMEP (t->display_info.tty->top_frame))
2510 { 2505 {
@@ -3523,9 +3518,7 @@ init_tty (char *name, char *terminal_type, int must_succeed)
3523 terminal->name = xstrdup (name); 3518 terminal->name = xstrdup (name);
3524 tty->type = xstrdup (terminal_type); 3519 tty->type = xstrdup (terminal_type);
3525 3520
3526#ifdef subprocesses
3527 add_keyboard_wait_descriptor (0); 3521 add_keyboard_wait_descriptor (0);
3528#endif
3529 3522
3530 Wcm_clear (tty); 3523 Wcm_clear (tty);
3531 3524
@@ -4017,9 +4010,7 @@ delete_tty (struct terminal *terminal)
4017 4010
4018 if (tty->input) 4011 if (tty->input)
4019 { 4012 {
4020#ifdef subprocesses
4021 delete_keyboard_wait_descriptor (fileno (tty->input)); 4013 delete_keyboard_wait_descriptor (fileno (tty->input));
4022#endif
4023 if (tty->input != stdin) 4014 if (tty->input != stdin)
4024 fclose (tty->input); 4015 fclose (tty->input);
4025 } 4016 }