DESCRIPTION

The
tigetflag(),
tigetnum(),
and
tigetstr()
functions obtain boolean, numeric and string capabilities, respectively, from
the selected record of the terminfo database.
For each capability, the value to use as capname appears in the
Capname
column in the table in
Defined Capabilities
.

The
tparm()
function takes as
cap
a string capability. If
cap
is parameterised (as described in
),
tparm()
resolves the parameterisation. If the parameterised string refers to
parameters %p1 through %p9, then
tparm()
substitutes the values of p1 through p9, respectively.

RETURN VALUE

Upon successful completion,
tigetflag(),
tigetnum()
and
tigetstr()
return the specified capability. The
tigetflag()
function returns -1 if capname is not a boolean capability. The
tigetnum()
function returns -2 if capname is not a numeric capability. The
tigetstr()
function returns (char *)-1 if capname is not a string
capability.

If using cursor addressing, output enter_ca_mode upon
startup and output exit_ca_mode before exiting.

If using shell escapes, output
exit_ca_mode
and call
reset_shell_mode()
before calling the shell; call
reset_prog_mode()
and output
enter_ca_mode
after returning from the shell.

All parameterised terminal capabilities defined in this document
can be passed to
tparm().
Some implementations create their own capabilities, create
capabilities for non-terminal devices, and redefine the capabilities in this
document. These practices are non-conforming because it may be that
tparm()
cannot parse these user-defined strings.