termcap
(terminal capabilities) A Unix database listing different types of terminal (or terminal emulation) and the character strings to send to make the terminal perform certain functions such as move the cursor up one line or clear the screen.
Programs written using termcap can work on any terminal in the database which supports the necessary functions. Typical programs are text editors or file viewers like more. The termcap routines look for an environment variable "TERM" to determine which terminal the user is using.
terminfo is a later version of termcap.