Path: utzoo!utgpu!water!watmath!clyde!ima!haddock!trb From: trb@haddock.ima.isc.com (Andrew Tannenbaum) Newsgroups: comp.unix.wizards Subject: Re: Character echo at read time Message-ID: <7540@haddock.ima.isc.com> Date: 15 Sep 88 19:02:48 GMT References: <1059@nmtsun.nmt.edu> <8458@smoke.ARPA> Reply-To: trb@haddock.ima.isc.com (Andrew Tannenbaum) Organization: Interactive Systems, Boston Lines: 44 In article <8458@smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >In article <1059@nmtsun.nmt.edu> warner@hydrovax.nmt.edu (M. Warner Losh) writes: >>With VMS you can do a ^X anytime the terminal is >>not in "raw" mode and clear the current type ahead buffer. How does one >>do this under unix? > >I don't know of any UNIX implementation that provides such a feature, >although it is doable and I've often wished I had it (its utility is >not limited to deferred-echo terminal handlers). The MASSCOMP tty system has these features, plus everything else that you would want in a UNIX-style tty handler. When I was working at MASSCOMP (until last 1985) our major thrust was the integration of features from 4BSD and System V. Steve Zimmermann took the System V termio structure and integrated the 4BSD functionality, plus a lot more. For example, there were separate keys for kill line and kill input buffer. There might have even been a way to retype the whole input buffer (like ^R). There was a full fledged tty --more-- processing mode, which included scroll and noscroll options. There was a status line (^T) that had about 30 option bits. You could find out how much system resources your current process was using, and you could find out the current program name, current system call (and whether it was complete). This came in really handy when your make bombed because some phase of the C compiler was busted - you just type make and then a bunch of ^T's, until it bombed. It also had DEC-style delayed echo of typeahead (as an option). It was source code compatible with both AT&T and BSD tty ioctl calls. It supported job control on both sides - in general, it had what I wanted. It was modular enough that we loaded the same code into the 68K-based tty mux board that we loaded into the kernel. Anyway, this is the tty system that MASSCOMP still distributes with its UNIX. I believe that the MASSCOMP man pages explain it fully. I wish it was the standard. Andrew Tannenbaum Interactive Boston, MA +1 617 247 1155 P.S. For you fans of goofy code, one of the funniest parts of the BSD tty.c was the code for figuring out the number of screen spaces used by a tab that you were backspacing over. The BSD code essentially does a ^O followed by a ^R (throwing away the output) to calculate the column, and then turns FLUSHO off. Steve rewrote this code to make backspacing over tabs a little more efficient and straightforward.