aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1992-08-19 06:37:58 +0000
committerJim Blandy1992-08-19 06:37:58 +0000
commit345677047df477bf523ff915ff91249031c180d1 (patch)
treef695f6ca1da070057813791b423883ed8668ef18 /src
parent8c7f1e3596d1e4a52598392fbd78458f70bcb2c3 (diff)
downloademacs-345677047df477bf523ff915ff91249031c180d1.tar.gz
emacs-345677047df477bf523ff915ff91249031c180d1.zip
* 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.
Diffstat (limited to 'src')
-rw-r--r--src/sysdep.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index 7283f7d9e06..a14edc644e0 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -90,8 +90,10 @@ extern char *sys_errlist[];
90#include <fcntl.h> 90#include <fcntl.h>
91#endif 91#endif
92#ifdef USG 92#ifdef USG
93#ifndef USG5
93#include <fcntl.h> 94#include <fcntl.h>
94#endif 95#endif
96#endif
95#endif /* not 4.1 bsd */ 97#endif /* not 4.1 bsd */
96 98
97/* Get DGUX definition for FASYNC - DJB */ 99/* Get DGUX definition for FASYNC - DJB */
@@ -1662,7 +1664,7 @@ select (nfds, rfds, wfds, efds, timeout)
1662 if (*local_timeout == 0 || ravail != 0 || process_tick != update_tick) 1664 if (*local_timeout == 0 || ravail != 0 || process_tick != update_tick)
1663 break; 1665 break;
1664 old_alarm = alarm (0); 1666 old_alarm = alarm (0);
1665 old_trap = (int (*)()) signal (SIGALRM, select_alarm); 1667 old_trap = signal (SIGALRM, select_alarm);
1666 select_alarmed = 0; 1668 select_alarmed = 0;
1667 alarm (SELECT_PAUSE); 1669 alarm (SELECT_PAUSE);
1668 /* Wait for a SIGALRM (or maybe a SIGTINT) */ 1670 /* Wait for a SIGALRM (or maybe a SIGTINT) */
@@ -1714,7 +1716,8 @@ read_input_waiting ()
1714{ 1716{
1715 char buf[256 * BUFFER_SIZE_FACTOR]; 1717 char buf[256 * BUFFER_SIZE_FACTOR];
1716 struct input_event e; 1718 struct input_event e;
1717 int nread; 1719 int nread, i;
1720 extern int quit_char;
1718 1721
1719 if (read_socket_hook) 1722 if (read_socket_hook)
1720 { 1723 {
@@ -1736,7 +1739,7 @@ read_input_waiting ()
1736 kbd_buffer_store_event (&e); 1739 kbd_buffer_store_event (&e);
1737 /* Don't look at input that follows a C-g too closely. 1740 /* Don't look at input that follows a C-g too closely.
1738 This reduces lossage due to autorepeat on C-g. */ 1741 This reduces lossage due to autorepeat on C-g. */
1739 if (buf[i] == Ctl ('G')) 1742 if (buf[i] == quit_char)
1740 break; 1743 break;
1741 } 1744 }
1742} 1745}