weinberg@necis.UUCP (Glenn Weinberg) (01/15/88)
We've recently run into a problem with GNU Emacs (18.48, SysV/68 derivative system) mucking with stty settings. In particular, the following code can be found in sysdep.c: #ifdef HAVE_TERMIO . . . #ifdef CS8 sg.c_cflag |= CS8; /* allow 8th bit on input */ sg.c_cflag &= ~PARENB; /* Don't check parity */ #endif This causes us problems on terminals that are actually set to use 7-bit characters with even parity, as many of our terminals are. I've commented this code out in our version, and it seems to be behaving properly. Now, I understand that Emacs wants to be able to handle 8-bit characters, but if the terminal is configured for 7-bit characters, Emacs isn't going to see any 8-bit characters. So, my questions are: 1) Is anything going to break if Emacs doesn't see a character size of 8 with no parity? 2) If not, does anybody know why this code is here? Any insights would be greatly appreciated. Thank you. -- Glenn Weinberg (weinberg@necis.nec.com) NEC Information Systems, 289 Great Road, Acton, MA 01720 (617) 263-3833 x222 After 01 Feb 88: 1300 Massachusetts Ave., Boxborough, MA 01719 (617) 635-6278 After 16 Jul 88: 1300 Massachusetts Ave., Boxborough, MA 01719 (508) 635-6278
jr@LF-SERVER-2.BBN.COM (John Robinson) (01/15/88)
>> 1) Is anything going to break if Emacs doesn't see a character >> size of 8 with no parity? > >> 2) If not, does anybody know why this code is here? Some terminals and workstations generate an 8-bit characer set. The 8th bit is often set using a "meta" shift key (called different things in different hardware; on the Sun it is "left" and "right"). Disabling the 8th bit will lose the meta half of these terminals' character sets. The VT220 is an example of a terminal that uses an 8-bit characrer set (in its native mode). As to how to fix this, the code commented out has to be enabled dynamically based on something like a terminal type, or ideally a termcap component (but none seems to be in the standard set). Since the code in question is in the sysV stuff, I'll have to stop here (no expertise). Maybe it should be more careful to check whether the terminal was checking parity when emacs started, and preserve things in this case. /jr jr@bbn.com or jr@bbn.uucp