tgetent(3X) tgetent(3X)
NAME
tgetent, tgetflag, tgetnum, tgetstr, tgoto - termcap database emula-
tion
SYNOPSIS
cc [flag ...] file ... -lcurses [library ...]
#include <term.h>
int tgetent(char *bp, const char *name);
int tgetflag(char id[2]);
int tgetnum(char id[2]);
char *tgetstr(char id[2], char **area);
char *tgoto(char *cap, int col, int row);
DESCRIPTION
The tgetent() function looks up the termcap entry for name. The emula-
tion ignores the buffer pointer bp.
The tgetflag() function gets the boolean entry for id.
The tgetnum() function gets the numeric entry for id.
The tgetstr() function gets the string entry for id. If area is not a
null pointer and does not point to a null pointer, tgetstr() copies
the string entry into the buffer pointed to by *area and advances the
variable pointed to by area to the first byte after the copy of the
string entry.
The tgoto() function instantiates the parameters col and row into the
capability cap and returns a pointer to the resulting string.
All of the information available in the terminfo(4) database need not
be available through these functions.
RETURN VALUE
Upon successful completion, functions that return an integer return
OK. Otherwise, they return ERR.
Functions that return pointers return a null pointer on error.
ERRORS
No errors are defined.
NOTES
These functions are included as a conversion aid for programs that use
the termcap library. Their arguments are the same and the functions
are emulated using the terminfo database.
Page 1 Reliant UNIX 5.44 Printed 11/98
tgetent(3X) tgetent(3X)
These functions are only guaranteed to operate reliably on character
sets in which each character fits into a single byte, whose attributes
can be expressed using only constants with the A prefix.
Any terminal capabilities from the terminfo database that cannot be
retrieved using these interfaces can be retrieved using the interfaces
described on the tigetflag(3X) manual page.
Portable applications must use tputs() to output the strings returned
by tgetstr() and tgoto().
SEE ALSO
putc(3S), curses(3X), setupterm(3X), tigetflag(3X), terminfo(4),
term(5).
Page 2 Reliant UNIX 5.44 Printed 11/98