HP-UX Reference (11i v1 05/09) - 3 Library Functions N-Z (vol 7)
t
tgetent(3X) tgetent(3X)
(ENHANCED CURSES)
NAME
tgetent, tgetflag, tgetnum, tgetstr, tgoto — termcap database emulation (TO BE WITHDRAWN)
SYNOPSIS
#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 emulation 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.Ifarea 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 vari-
able pointed to by area to the first byte after the copy of the string entry.
The
tgoto() function instantiates col and row into cap and returns a pointer to the resulting string.
All of the information available in the terminfo database need not be available through these functions.
Information about non-standard tgetent and tgetflag() is in the termcap(3X) manpage.
RETURN VALUE
Upon successful completion, functions that return an integer will return 0K (0). Otherwise, they return
ERR (-1).
Functions that return pointers will return a null pointer on error.
ERRORS
No errors are defined.
APPLICATION USAGE
These functions are included as a conversion aid for programs that use the termcap library. Their argu-
ments are the same and the functions are emulated using the terminfo database.
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
tigetflg() page.
Portable applications must use tputs() to output the strings returned by tgetstr() and tgoto().
SEE ALSO
putc(3S), del_curterm(3X), termcap(3X), tigetflag(3X), <term.h>.
CHANGE HISTORY
First released in X/Open Curses, Issue 4.
Section 3−−1010 Hewlett-Packard Company − 1 − HP-UX 11i Version 1: September 2005