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: Re: parity and Gosling Emacs
Message-ID: <160@teklds.UUCP>
Date: Fri, 10-Feb-84 22:15:33 EST
Article-I.D.: teklds.160
Posted: Fri Feb 10 22:15:33 1984
Date-Received: Wed, 15-Feb-84 04:01:52 EST
Organization: Tektronix, Beaverton OR
Lines: 27

There is in fact a bug with 4.2 Emacs in dealing with parity in the Unipress
4.2 emacs.  We encountered it with using a Concept AVT terminal.  Keyboard.c
has the code:

    c = GetKeyboardChar();
    .
    .
    .
    if(c<0) return -1;

GetKeyboardChar is a macro which invokes FillKeyboard in mchan.c.
FillKeyboard is an int function and c is an int register, so when

	    if (--KeyboardCount >= 0)
		return * KeyboardPointer++;

gets executed, the parity bit gets sign extended and c comes out negative.
The most obvious fix is to

	    if (--KeyboardCount >= 0)
		return ((*KeyboardPointer++) & 0x0FF);

inf FillKeyboard.  The other solution for the AVT is to set parity 'space',
which assures that the parity bit is always off.

-- 
Robert Reed, Tektronix Logic Design Systems, tektronix!teklds!bobr