Type-ahead in unix

Doug Gwyn gwyn at smoke.brl.mil
Wed Apr 10 15:13:56 AEST 1991


In article <1991Apr9.112142.13195 at robobar.co.uk> ronald at robobar.co.uk (Ronald S H Khoo) writes:
>Can someone explain how Rob Pike's Plan 9 stuff does *both* echoing
>immediately *and* rearranging the display so that the output doesn't
>have its appearance ruined?  Sounds like the best of both worlds to me ..

Presumably it uses much the same scheme as his "mux" (Blit layers
multiplexer/terminal emulator).  There is an "insertion point" in
the stream of characters (including embedded newlines) in a display;
anything "behind" the insertion point can be freely edited, and
ditto for anything in front of the insertion point, with the special
feature that insertion of a newline in front of the insertion point
causes everything from the insertion point through the newline to be
sent to the underlying process (for "mux", this would be to the UNIX
process trying to read input from the layer).  All that has to occur
to preserve the text after the insertion point is for fresh output
to be placed into the display AT the insertion point.  Simple?



More information about the Comp.unix.questions mailing list