SVr2 introduced the terminfo feature. Its programming manual
mentioned these low-level functions:
Function Description
────────────────────────────────────────────────────────────
fixterm restore tty to 'in curses' state
gettmode establish current tty modes
mvcur low level cursor motion
putp utility function that uses tputs
to send
characters via putchar
.
resetterm set tty modes to 'out of curses' state
resetty reset tty flags to stored value
saveterm save current modes as 'in curses' state
savetty store current tty flags
setterm establish terminal with given type
setupterm establish terminal with given type
tparm instantiate a string expression with parameters
tputs apply padding information to a string
vidattr like vidputs
, but outputs through putchar
vidputs output a string to put terminal in a specified
video attribute mode
The programming manual also mentioned functions provided for
termcap compatibility (commenting that they 'may go away at a
later date'):
Function Description
────────────────────────────────────────────────
tgetent look up termcap entry for given name
tgetflag get boolean entry for given id
tgetnum get numeric entry for given id
tgetstr get string entry for given id
tgoto apply parameters to given capability
tputs apply padding to capability, calling
a function to put characters
Early terminfo programs obtained capability values from the
TERMINAL
structure initialized by setupterm
.
SVr3 extended terminfo by adding functions to retrieve capability
values (like the termcap interface), and reusing tgoto and tputs:
Function Description
───────────────────────────────────────────
tigetflag get boolean entry for given id
tigetnum get numeric entry for given id
tigetstr get string entry for given id
SVr3 also replaced several of the SVr2 terminfo functions which
had no counterpart in the termcap interface, documenting them as
obsolete:
Function Replaced by
─────────────────────────────
crmode cbreak
fixterm reset_prog_mode
gettmode N/A
nocrmode nocbreak
resetterm reset_shell_mode
saveterm def_prog_mode
setterm setupterm
SVr3 kept the mvcur
, vidattr
and vidputs
functions, along with
putp
, tparm
and tputs
. The latter were needed to support
padding, and handling functions such as vidattr
(which used more
than the two parameters supported by tgoto
).
SVr3 introduced the functions for switching between terminal
descriptions, e.g., set_curterm
. The various global variables
such as boolnames
were mentioned in the programming manual at
this point.
SVr4 added the vid_attr
and vid_puts
functions.
There are other low-level functions declared in the curses header
files on Unix systems, but none were documented. The functions
marked 'obsolete' remained in use by the Unix vi
editor.