TTY, speak now, or forever

Roy Smith roy at phri.UUCP
Thu Oct 26 00:30:01 AEST 1989


In article <216100015 at s.cs.uiuc.edu> voss at s.cs.uiuc.edu writes:
> anything NOT in `man 4 tty` that you think I should put in my driver?

	One of my long-time wants for a tty driver is a 256-long look up
table.  This is probably a feeping creature, but like all such creatures,
it in itself should be trivial to implement (i.e. it's all the *other*
creatures which make the kernel so bloated!)  Each input character taken
off the raw queue is looked up in the table to find out what action should
be taken.  The two possible actions I have in mind are "echo and buffer in
the cooked queue" and "don't echo, put on cooked queue, and cause an input
break (i.e. make read(2) return)".  You should also be able to cause an
input break after a certain number of characters have been typed.

	The idea is to allow programs like emacs to run in a mode slightly
more intelligent than the traditional raw or cbreak modes, but still get at
every character it has to when it has to.  For most things (i.e. plain
printing characters which have not reached the end of the line yet) you can
let the kernel do the echoing.  Any time an escape character is typed, or
the end of a line is reached, you let emacs get control again and decide
what needs to be done.  Of couse, you need an ioctl to let the user program
load its own 256-byte long lookup table.

> Is there anything IN `man 4 tty` you think I should NOT put in my driver?

	Yes, get rid of the proliferation of control structures pretending
to have v6 and v7 backwards compatability and start again from scratch.
-- 
Roy Smith, Public Health Research Institute
455 First Avenue, New York, NY 10016
{att,philabs,cmcl2,rutgers,hombre}!phri!roy -or- roy at alanine.phri.nyu.edu
"The connector is the network"



More information about the Comp.unix.wizards mailing list