Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles; site uiuccsb.UUCP Path: utzoo!watmath!clyde!floyd!harpo!eagle!mhuxl!ihnp4!inuxc!pur-ee!uiucdcs!uiuccsb!emrath From: emrath@uiuccsb.UUCP Newsgroups: net.bugs.4bsd Subject: Re: 4.2 TSET minor bug fix - (nf) Message-ID: <6300008@uiuccsb.UUCP> Date: Tue, 10-Apr-84 22:25:00 EST Article-I.D.: uiuccsb.6300008 Posted: Tue Apr 10 22:25:00 1984 Date-Received: Thu, 12-Apr-84 04:41:35 EST References: <33500002@parsec.UUCP> Lines: 20 Nf-ID: #R:parsec:33500002:uiuccsb:6300008:000:478 Nf-From: uiuccsb!emrath Apr 10 21:25:00 1984 #R:parsec:33500002:uiuccsb:6300008:000:478 uiuccsb!emrath Apr 10 21:25:00 1984 > The following is a minor bug fix for 4.2 TSET. The original code would > produce odd results if you typed something like: > tset -k^u (as opposed to ^U). > > OLD: #define CTRL(x) (x ^ 0100) > > NEW: #define CTRL(x) (x & ~0140) You won't be able to use 'tset -e^?' to use rubout for erasing. Some people have been known to do this. How 'bout? #define CTRL(x) ((x) & ~((x) >> 1 & 040) ^ 0100) /* P.U. */ or #define CTRL(x) ((x) & 0100 ? (x) &~ 0140 : (x) | 0100)