diff 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
line wrap: on
line diff
--- a/src/process.c	Mon Jul 12 21:47:45 2010 -0700
+++ b/src/process.c	Mon Jul 12 21:54:28 2010 -0700
@@ -6844,17 +6844,6 @@
 
 
 
-/* Add DESC to the set of keyboard input descriptors.  */
-
-void
-add_keyboard_wait_descriptor (int desc)
-{
-  FD_SET (desc, &input_wait_mask);
-  FD_SET (desc, &non_process_wait_mask);
-  if (desc > max_keyboard_desc)
-    max_keyboard_desc = desc;
-}
-
 static int add_gpm_wait_descriptor_called_flag;
 
 void
@@ -6869,25 +6858,6 @@
     max_gpm_desc = desc;
 }
 
-/* From now on, do not expect DESC to give keyboard input.  */
-
-void
-delete_keyboard_wait_descriptor (int desc)
-{
-  int fd;
-  int lim = max_keyboard_desc;
-
-  FD_CLR (desc, &input_wait_mask);
-  FD_CLR (desc, &non_process_wait_mask);
-
-  if (desc == max_keyboard_desc)
-    for (fd = 0; fd < lim; fd++)
-      if (FD_ISSET (fd, &input_wait_mask)
-	  && !FD_ISSET (fd, &non_keyboard_wait_mask)
-	  && !FD_ISSET (fd, &gpm_wait_mask))
-	max_keyboard_desc = fd;
-}
-
 void
 delete_gpm_wait_descriptor (int desc)
 {
@@ -7147,6 +7117,38 @@
 /* The following functions are needed even if async subprocesses are
    not supported.  Some of them are no-op stubs in that case.  */
 
+/* Add DESC to the set of keyboard input descriptors.  */
+
+void
+add_keyboard_wait_descriptor (int desc)
+{
+  FD_SET (desc, &input_wait_mask);
+  FD_SET (desc, &non_process_wait_mask);
+  if (desc > max_keyboard_desc)
+    max_keyboard_desc = desc;
+}
+
+/* From now on, do not expect DESC to give keyboard input.  */
+
+void
+delete_keyboard_wait_descriptor (int desc)
+{
+#ifdef subprocesses
+  int fd;
+  int lim = max_keyboard_desc;
+
+  FD_CLR (desc, &input_wait_mask);
+  FD_CLR (desc, &non_process_wait_mask);
+
+  if (desc == max_keyboard_desc)
+    for (fd = 0; fd < lim; fd++)
+      if (FD_ISSET (fd, &input_wait_mask)
+	  && !FD_ISSET (fd, &non_keyboard_wait_mask)
+	  && !FD_ISSET (fd, &gpm_wait_mask))
+	max_keyboard_desc = fd;
+#endif /* subprocesses */
+}
+
 /* Setup coding systems of PROCESS.  */
 
 void