summaryrefslogtreecommitdiff
path: root/src/sysdep.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-11-10 08:30:22 +0000
committerRichard M. Stallman <rms@gnu.org>1993-11-10 08:30:22 +0000
commita00d55893e4e19eec3eedf3444923afd02d0202c (patch)
tree2e0161d3cec6bb438fe95ea5b255a6fd56a1408c /src/sysdep.c
parentc52419107a8e1e97505b2460fbb61a09a0fd086b (diff)
downloademacs-a00d55893e4e19eec3eedf3444923afd02d0202c.tar.gz
(read_input_waiting): Don't mess with meta bit
if read_socket_hook is nonzero. (LPASS8, LNOFLSH): Move definitions earlier. (child_setup_tty): Turn on LPASS8.
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index 63ddbd4d3e9..3d219c69c78 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -155,6 +155,15 @@ extern int quit_char;
#include "syssignal.h"
#include "systime.h"
+/* LPASS8 is new in 4.3, and makes cbreak mode provide all 8 bits. */
+#ifndef LPASS8
+#define LPASS8 0
+#endif
+
+#ifdef BSD4_1
+#define LNOFLSH 0100000
+#endif
+
static int baud_convert[] =
#ifdef BAUD_CONVERT
BAUD_CONVERT;
@@ -496,6 +505,7 @@ child_setup_tty (out)
s.main.sg_flags &= ~(ECHO | CRMOD | ANYP | ALLDELAY | RAW | LCASE
| CBREAK | TANDEM);
+ s.main.sg_flags |= LPASS8;
s.main.sg_erase = 0377;
s.main.sg_kill = 0377;
s.lmode = LLITOUT | s.lmode; /* Don't strip 8th bit */
@@ -1172,15 +1182,6 @@ init_sys_modes ()
tty.tchars.t_stopc = '\023';
}
-/* LPASS8 is new in 4.3, and makes cbreak mode provide all 8 bits. */
-#ifndef LPASS8
-#define LPASS8 0
-#endif
-
-#ifdef BSD4_1
-#define LNOFLSH 0100000
-#endif
-
tty.lmode = LDECCTQ | LLITOUT | LPASS8 | LNOFLSH | old_tty.lmode;
#ifdef ultrix
/* Under Ultrix 4.2a, leaving this out doesn't seem to hurt
@@ -2118,11 +2119,16 @@ read_input_waiting ()
e.modifiers = 0;
for (i = 0; i < nread; i++)
{
- /* If the user says she has a meta key, then believe her. */
- if (meta_key == 1 && (buf[i] & 0x80))
- e.modifiers = meta_modifier;
- if (meta_key != 2)
- buf[i] &= ~0x80;
+ /* Convert chars > 0177 to meta events if desired.
+ We do this under the same conditions that read_avail_input does. */
+ if (read_socket_hook == 0)
+ {
+ /* If the user says she has a meta key, then believe her. */
+ if (meta_key == 1 && (buf[i] & 0x80))
+ e.modifiers = meta_modifier;
+ if (meta_key != 2)
+ buf[i] &= ~0x80;
+ }
XSET (e.code, Lisp_Int, buf[i]);
kbd_buffer_store_event (&e);