The old/key commands buffer is arranged as follows:

	|<----------------- HISTBUFSIZ = n   ------------------->|
	|		   					|
	*********************************************************
	[     old comm buffer      ][	  key defn buffer       ]
	*********************************************************
	^			   ^^
	 \_old		   oldend_/  \_key

oldend/key varies with how much stuff is in the key defn buffer.
The old commands buffer gets whatever space is left.
oldndx starts at 0 (an always empty line with length 1).
For the latest version, the key defn buffer is always only 1 byte long.

The new command buffer is arranged with a bubble at the cursor for
insertion of new text:

	|<--------------------- MAXCOLS ----------------------->|
	|		   					|
	*********************************************************
	[     front     ]      (bubble)		[    back	]
	*********************************************************
	^		^			^		^
	 \_buf		 \_lcurs=NULL	 rcurs_/   bufend=NULL_/

The text from buf to lcurs is what is displayed left of the cursor.
The text from rcurs to bufend is what is displayed right of the cursor.
Normally, lcurs points to the NULL at the end of the string. bufend
doesn't move and always points to a NULL at the end of the buffer.
When the buffer fills up (lcurs = rcurs), no more data is accepted
and a BELL code is sent to the terminal.

The behavior of the terminal echo under this line discipline is
different than what you might be used to in the sense that characters
are only echoed if there is a read pending on the device (ala VMS, MS-DOS
and other O/S's). Characters input are held in a typeahead buffer (t_rawq).
When a read to the port is executed, the characters are removed from the
typeahead buffer and processed by the parser. The parser determines what
(if any) characters should be echoed for each character input. This also
means that if an ioctl function is performed that turns off echo after
characters have been placed in the typeahead buffer, but before a read
is issued, those characters may not be echoed at all by the driver
(they will, however, be delivered to the process that issues the first
read which may choose to echo them itself).
