Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1a 12/4/83; site rlgvax.UUCP Path: utzoo!linus!philabs!seismo!rlgvax!guy From: guy@rlgvax.UUCP (Guy Harris) Newsgroups: net.lang.c Subject: Re: Need Help: 1-char input in C Message-ID: <1510@rlgvax.UUCP> Date: Sat, 31-Dec-83 02:56:22 EST Article-I.D.: rlgvax.1510 Posted: Sat Dec 31 02:56:22 1983 Date-Received: Sun, 1-Jan-84 02:27:38 EST References: <464@ihuxn.UUCP>, <415@bbncca.ARPA> <216@wu1.UUCP> Organization: CCI Office Systems Group, Reston, VA Lines: 14 Two small addenda to Mr. Fritz's suggestion: 1) Doing the IOCTL's yourself will not just be faster than using system("stty cbreak"), it will be *massively* faster if "cbreak" mode is turned on or off more than once per session. 2) The user should ensure that "resetline" is called whenever the program exits, even if the program is being terminated because the user hit their interrupt key. The program should catch the SIGINT signal, and the routine which catches this signal should restore the terminal modes and then exit. Guy Harris {seismo,ihnp4,allegra}!rlgvax!guy