diff options
| author | Richard M. Stallman | 1993-11-10 08:30:22 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-11-10 08:30:22 +0000 |
| commit | a00d55893e4e19eec3eedf3444923afd02d0202c (patch) | |
| tree | 2e0161d3cec6bb438fe95ea5b255a6fd56a1408c | |
| parent | c52419107a8e1e97505b2460fbb61a09a0fd086b (diff) | |
| download | emacs-a00d55893e4e19eec3eedf3444923afd02d0202c.tar.gz emacs-a00d55893e4e19eec3eedf3444923afd02d0202c.zip | |
(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.
| -rw-r--r-- | src/sysdep.c | 34 |
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; | |||
| 155 | #include "syssignal.h" | 155 | #include "syssignal.h" |
| 156 | #include "systime.h" | 156 | #include "systime.h" |
| 157 | 157 | ||
| 158 | /* LPASS8 is new in 4.3, and makes cbreak mode provide all 8 bits. */ | ||
| 159 | #ifndef LPASS8 | ||
| 160 | #define LPASS8 0 | ||
| 161 | #endif | ||
| 162 | |||
| 163 | #ifdef BSD4_1 | ||
| 164 | #define LNOFLSH 0100000 | ||
| 165 | #endif | ||
| 166 | |||
| 158 | static int baud_convert[] = | 167 | static int baud_convert[] = |
| 159 | #ifdef BAUD_CONVERT | 168 | #ifdef BAUD_CONVERT |
| 160 | BAUD_CONVERT; | 169 | BAUD_CONVERT; |
| @@ -496,6 +505,7 @@ child_setup_tty (out) | |||
| 496 | 505 | ||
| 497 | s.main.sg_flags &= ~(ECHO | CRMOD | ANYP | ALLDELAY | RAW | LCASE | 506 | s.main.sg_flags &= ~(ECHO | CRMOD | ANYP | ALLDELAY | RAW | LCASE |
| 498 | | CBREAK | TANDEM); | 507 | | CBREAK | TANDEM); |
| 508 | s.main.sg_flags |= LPASS8; | ||
| 499 | s.main.sg_erase = 0377; | 509 | s.main.sg_erase = 0377; |
| 500 | s.main.sg_kill = 0377; | 510 | s.main.sg_kill = 0377; |
| 501 | s.lmode = LLITOUT | s.lmode; /* Don't strip 8th bit */ | 511 | s.lmode = LLITOUT | s.lmode; /* Don't strip 8th bit */ |
| @@ -1172,15 +1182,6 @@ init_sys_modes () | |||
| 1172 | tty.tchars.t_stopc = '\023'; | 1182 | tty.tchars.t_stopc = '\023'; |
| 1173 | } | 1183 | } |
| 1174 | 1184 | ||
| 1175 | /* LPASS8 is new in 4.3, and makes cbreak mode provide all 8 bits. */ | ||
| 1176 | #ifndef LPASS8 | ||
| 1177 | #define LPASS8 0 | ||
| 1178 | #endif | ||
| 1179 | |||
| 1180 | #ifdef BSD4_1 | ||
| 1181 | #define LNOFLSH 0100000 | ||
| 1182 | #endif | ||
| 1183 | |||
| 1184 | tty.lmode = LDECCTQ | LLITOUT | LPASS8 | LNOFLSH | old_tty.lmode; | 1185 | tty.lmode = LDECCTQ | LLITOUT | LPASS8 | LNOFLSH | old_tty.lmode; |
| 1185 | #ifdef ultrix | 1186 | #ifdef ultrix |
| 1186 | /* Under Ultrix 4.2a, leaving this out doesn't seem to hurt | 1187 | /* Under Ultrix 4.2a, leaving this out doesn't seem to hurt |
| @@ -2118,11 +2119,16 @@ read_input_waiting () | |||
| 2118 | e.modifiers = 0; | 2119 | e.modifiers = 0; |
| 2119 | for (i = 0; i < nread; i++) | 2120 | for (i = 0; i < nread; i++) |
| 2120 | { | 2121 | { |
| 2121 | /* If the user says she has a meta key, then believe her. */ | 2122 | /* Convert chars > 0177 to meta events if desired. |
| 2122 | if (meta_key == 1 && (buf[i] & 0x80)) | 2123 | We do this under the same conditions that read_avail_input does. */ |
| 2123 | e.modifiers = meta_modifier; | 2124 | if (read_socket_hook == 0) |
| 2124 | if (meta_key != 2) | 2125 | { |
| 2125 | buf[i] &= ~0x80; | 2126 | /* If the user says she has a meta key, then believe her. */ |
| 2127 | if (meta_key == 1 && (buf[i] & 0x80)) | ||
| 2128 | e.modifiers = meta_modifier; | ||
| 2129 | if (meta_key != 2) | ||
| 2130 | buf[i] &= ~0x80; | ||
| 2131 | } | ||
| 2126 | 2132 | ||
| 2127 | XSET (e.code, Lisp_Int, buf[i]); | 2133 | XSET (e.code, Lisp_Int, buf[i]); |
| 2128 | kbd_buffer_store_event (&e); | 2134 | kbd_buffer_store_event (&e); |