Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!rochester!pt!sei!sei.cmu.edu!ds From: ds@sei.cmu.edu (Donald Stone) Newsgroups: comp.emacs Subject: Discard_Tty_Input Message-ID: <2166@aw.sei.cmu.edu> Date: Wed, 12-Aug-87 15:53:58 EDT Article-I.D.: aw.2166 Posted: Wed Aug 12 15:53:58 1987 Date-Received: Sat, 15-Aug-87 01:33:38 EDT Sender: netnews@sei.cmu.edu Lines: 43 In emacs 18.41: In sysdep.c, the routine discard_tty_input seems to flush the input buffer with the following two statements: ioctl (0, TIOCGETP, &buf); ioctl (0, TIOCSETP, &buf); I believe this gets the terminal state, and sets the terminal state to the same thing, with the side effect of flushing the input buffer. Unfortunately, on the Apollo (sr9.5), this also has the side effect of setting ^Q/^S control flow. Oops. However, it seems there is an ioctl parameter, TIOCFLUSH, which flushes the tty input buffer. When I replace the pair of calls with ioctl (0, TIOCFLUSH, &buf); everything seems to work fine. Does anyone who knows the ioctl calls and this piece of emacs know if this is correct? Or have I missed something? Thanks, Don Stone (ds@sei.cmu.edu) Software Engineering Institute Carnegie-Mellon University Pittsburgh, PA (412) 268-7606