termcap(3X) termcap(3X)
NAME
termcap: tgetent(), tgetflag(), tgetnum(), tgetstr(), tgoto(), tputs() - emulate /usr/share/lib/termcap access routines
SYNOPSIS
DESCRIPTION
These functions extract and use capabilities from the compiled terminal capability data bases (see terminfo(4)). They are emulation rou-
tines.
Extracts the compiled entry for terminal
name into buffers accessible by the programmer. Unlike previous termcap routines, all capability strings (except
cursor addressing and padding information) are already compiled and stored internally upon return from The buffer
pointer bp is redundant in the emulation, and is ignored. It should not be relied upon to point to meaningful infor-
mation. returns -1 if it cannot access the terminfo directory or if there is no capability file for name, and 0 if
all goes well. If a environment variable is set, first looks for (where is the first character of name), and if that
file is not accessible, it looks for
Gets the numeric value of capability
id, returning -1 if it is not given for the terminal. is useful only with capabilities having numeric values.
Returns 1 if the specified capability is present in
the terminal's entry, and 0 if it is not. is useful only with capabilities that are boolean in nature (i.e. either
present or missing in terminfo(4)).
Returns a pointer to the string value of capability
id. In addition, if area is not a NULL pointer, places the capability in the buffer at area and advances the area
pointer. The returned string capability is compiled except for cursor addressing and padding information. is useful
only with capabilities having string values.
Returns a cursor addressing string decoded from
cm to go to column destcol in line destline. (Programs that call should be sure to turn off the TAB3 bit or bits,
since can now output a tab. See termio(7)). Note that programs using should in general turn off TAB3 anyway since
some terminals use Ctrl-I for other functions, such as nondestructive space.) If a sequence is given that is not
understood, returns [OOPS].
Decodes the padding information of the string
cp. affcnt gives the number of lines affected by the operation, or 1 if this is not applicable. outc is a routine
that is called with each character in turn. The variable pad_char should contain a pad character to be used (from
the pc capability) if a null is inappropriate.
WARNINGS
These routines are not meant to be used by programs running in the background.
Obsolescent Interfaces
and are to be obsoleted at a future date.
FILES
library
data bases
SEE ALSO
ex(1), terminfo(4), termio(7).
TO BE OBSOLETED termcap(3X)