Specifying tty delimiter characters

Duncan McEwan duncan at comp.vuw.ac.nz
Wed May 18 11:15:51 AEST 1988


In article <14341 at brl-adm.ARPA> rbj at icst-cmr.arpa (Root Boy Jim) writes:
>   wcs at skep2.ATT.COM (Bill.Stewart.<ho95c>) wrote:
>   > One feature I've wished was available in a TTY driver is the ability to
>   > specify a bunch of characters (e.g. control characters), and tell it
>   > to "read until N input characters or a special character".
>
>Why don't you just write a wrapper function to do this?

A wrapper function could certainly do the job, but one possible reason for
putting it in the kernel would be to allow for programs that need the
flexibility but don't want the overhead of running in raw or cbreak modes.  For
example command line editing shells only need to gain control when an editing
character is typed.  Most (?) of the time the user does not edit the command
line.

I don't know how hard this facility would be to add - I guess the `additional
break character' of the 4.[23]bsd tty driver could be made into a bitmap,
and an ioctl added to alter it.

Unfortunately, inadvertently leaving a tty with a break character mask that did
not correspond to current unix behaviour would probably break many programs
that expect to get a full line when they read from a tty.  With the increasing
use of personal workstations, is the saving of a little extra load on the cpu
due to shells wanting to run in cbreak or raw mode worth these problems?

Duncan

Domain: duncan at comp.vuw.ac.nz		Path: ...!uunet!vuwcomp!duncan



More information about the Comp.unix.wizards mailing list