Thus a user may edit a line of characters before they are consumed by a program. If the user inputs the line-kill character then the head of the input buffer is adjusted and the cursor reset. If the user inputs a regular character, then the line cursor is incremented, and the character put in the input buffer. Semaphore isem is not signalled. Any other character is put directly into the echo queue.
Characters Erasing a character is simple.
Normally a backspace character is echoed. Care has to be taken to erase over the two character representation of control characters.