bobr@teklds.UUCP (Robert Reed) (02/12/84)
It suddenly occured to me last night why typing quickly still caused emacs exit with the parity problem previously mentioned. GetChar (in keyboard.c) gets characters by calling the macro GetKeyboardChar (in mchan.h). This macro suffers the same problem as FillKeyboard, the parity bit will be sign extended and GetChar will return -1. This only happens if you type fast enough that GetKeyboardChar actually finds characters in the buffer. The fix is to change GetKeyboardChar: #define GetKeyboardChar() (--KeyboardCount>=0 ? *KeyboardPointer++ : FillKeyboard()) to: #define GetKeyboardChar() (--KeyboardCount>=0 ? ((*KeyboardPointer++) & 0x0FF) : FillKeyboard()) -- Robert Reed, Tektronix Logic Design Systems, tektronix!teklds!bobr