Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!think!mintaka!oliveb!apple!motcsd!dms!shepperd From: shepperd@dms.UUCP (Dave Shepperd) Newsgroups: comp.unix.questions Subject: Re: Where Goeth the Line-editing? (was Re: Strangeness in shell) Message-ID: <795@dms.UUCP> Date: 7 Aug 89 02:04:35 GMT References: <13303@bloom-beacon.MIT.EDU> Organization: Atari Games Inc., Milpitas, CA Lines: 42 From article <13303@bloom-beacon.MIT.EDU>, by jik@athena.mit.edu (Jonathan I. Kamens): > > [stuff deleted] > > In multics, it was possible to install a driver that lived at the > gateway between the actual terminal and user processes. This driver > would intercept and process *all* input before sending it to the > process. Therefore, if you wrote a line-editing driver and installed > it, it would work for *every* program on the system, without fail. > There were, of course, ways to turn off the line-editing features for > programs that needed character-by-character input. > Actually, Un*x has this "feature" as well. At least, sort of. The concept of line disciplines was developed to address this issue (or other protocol handling requirements). Line discipline 0 is responsible for doing the input editing you get when doing normal (such as echo, backspace processing, line kill, signals, etc). It also does the stuff such as adding extra cr's, lf's, null's or other things in the output stream as so indicated by various stty flags. Line disciplines don't do the job as neatly as is desired (a better idea, STREAMS, was invented which does the job quite a bit better). I wrote a command line editor using the line discipline mechanism on Xenix (cuz that's what I had) and can say it's no picnic. I haven't a clue whether it'll work on another flavor of Unix since I don't have one (other than SCO/UNIX 3.2) and am not interested in getting one just yet. Although I haven't brought up SCO/Unix 3.2 (it doesn't have support for the Ethernet boards I have), from what I can gather in its doc set, the line discipline mechanism is exactly the same as on Xenix 2.3.2, so it ought to install and work without any trouble (I'll believe it when I see it). I've been using my editor for some months now as have all the other Xenix users here and we have found it to be quite indispensible. None of us understands why an interactive line editor hasn't been part of the distribution of most flavors of Un*x for years. -- Dave Shepperd. shepperd@dms.UUCP or weitek!dms!shepperd Atari Games Corporation, Sycamore Drive, Milpitas CA 95035. (Arcade Video Game Manufacturer, NOT Atari Corp. ST manufacturer).