Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!floyd!harpo!seismo!hao!hplabs!sri-unix!eric@cit-vax From: eric%cit-vax@sri-unix.UUCP Newsgroups: net.unix-wizards Subject: bug in csh Message-ID: <16279@sri-arpa.UUCP> Date: Wed, 1-Feb-84 17:41:28 EST Article-I.D.: sri-arpa.16279 Posted: Wed Feb 1 17:41:28 1984 Date-Received: Wed, 8-Feb-84 02:49:43 EST Lines: 10 From: Eric HolstegeUnder 4.2, if the terminal is in raw mode (for example, an editor just bombed) the first character with the high (parity) bit set will log out the csh. This is because, in the routine bgetc in sh.lex.c, a character is read from the terminal and returned as an integer. This causes sign extension of the parity bit, resulting in a negative integer. Routines calling bgetc test for < 0 to detect EOF. The fix is to chaange the two occurrences of "return(c)" in bgetc to "return(c&0177)".