4.2 TSET minor bug fix - (nf)

emrath at uiuccsb.UUCP emrath at uiuccsb.UUCP
Wed Apr 11 13:25:00 AEST 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)



More information about the Comp.bugs.4bsd.ucb-fixes mailing list