changeset 1014:6e25f9b75841

* sysdep.c (select): There's no need to cast the return value of signal anymore, since we have the SIGTYPE macro defined. * sysdep.c (read_input_waiting): When scanning for quit characters, use the value of quit_char, rather than assuming that C-g is the quit character. And don't forget to declare i. * sysdep.c [USG5]: Don't include fcntl.h.
author Jim Blandy <jimb@redhat.com>
date Wed, 19 Aug 1992 06:37:58 +0000
parents 6bf2c4766d4c
children 58c373be762c
files src/sysdep.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/sysdep.c	Wed Aug 19 06:36:35 1992 +0000
+++ b/src/sysdep.c	Wed Aug 19 06:37:58 1992 +0000
@@ -90,8 +90,10 @@
 #include <fcntl.h>
 #endif
 #ifdef USG
+#ifndef USG5
 #include <fcntl.h>
 #endif
+#endif
 #endif /* not 4.1 bsd */
 
 /* Get DGUX definition for FASYNC - DJB */
@@ -1662,7 +1664,7 @@
       if (*local_timeout == 0 || ravail != 0 || process_tick != update_tick)
 	break;
       old_alarm = alarm (0);
-      old_trap = (int (*)()) signal (SIGALRM, select_alarm);
+      old_trap = signal (SIGALRM, select_alarm);
       select_alarmed = 0;
       alarm (SELECT_PAUSE);
       /* Wait for a SIGALRM (or maybe a SIGTINT) */
@@ -1714,7 +1716,8 @@
 {
   char buf[256 * BUFFER_SIZE_FACTOR];
   struct input_event e;
-  int nread;
+  int nread, i;
+  extern int quit_char;
 
   if (read_socket_hook)
     {
@@ -1736,7 +1739,7 @@
       kbd_buffer_store_event (&e);
       /* Don't look at input that follows a C-g too closely.
 	 This reduces lossage due to autorepeat on C-g.  */
-      if (buf[i] == Ctl ('G'))
+      if (buf[i] == quit_char)
 	break;
     }
 }