Several programs in C/Base work interactively with a video screen and keyboard,
called a terminal in this document. Each program calls a small set of
routines to perform terminal input and output functions. These routines were
designed to provide a method of using a wide variety of video terminals that
would be transparent to the program using the terminal. Application programmers
can use these routines to write programs that work on a wide variety of terminals.
The following functions are provided
ttyinit initializes the terminal and prepares it for the other functions
ttyrestore undoes the result of the ttyinit function
escape writes a terminal escape sequence on standard output, usually the terminal's screen
getkey reads from standard input, usually the terminal's keyboard, and translates function keys and cursor arrow keys into terminal independent constants
termparm returns terminal characteristics
escin determines if the terminal implements a specified input key
escout determines of the terminal implements a specified output escape sequence
erasechar returns the current character erase character
killchar returns the current line erase character
intrchar returns the current interrupt character
These functions reference a terminal definition that describes the escape sequences sent and received for each different terminal.
The termset program creates, alters, and displays the escape sequences for a particular terminal. This program creates a file in the directory \cbase\lib\cbase\escape for each terminal/screen modes defined. The file has the same name as the terminal name and it contains the escape sequences sent and received by the terminal.