Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 (Tek) 9/26/83; site teklds.UUCP
Path: utzoo!linus!decvax!harpo!eagle!mhuxl!ihnp4!alberta!ubc-vision!uw-beaver!tektronix!azure!teklds!bobr
From: bobr@teklds.UUCP (Robert Reed)
Newsgroups: net.emacs
Subject: fix for the rest of the 4.2 parity problem
Message-ID: <162@teklds.UUCP>
Date: Sat, 11-Feb-84 18:55:16 EST
Article-I.D.: teklds.162
Posted: Sat Feb 11 18:55:16 1984
Date-Received: Wed, 15-Feb-84 03:44:32 EST
Organization: Tektronix, Beaverton OR
Lines: 15

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