tgetent(3XC)
NAME
tgetent, tgetflag, tgetnum, tgetstr, tgoto − emulate the termcap database
SYNOPSIS
#include <term.h>
int tgetent (char ∗bp, const char ∗name);
int tgetflag (char id[2]);
int tgetnum (char id[2]);
char ∗tgetstr (char cap[2], char ∗∗area);
char ∗tgoto (const char ∗cap, int col, int row);
ARGUMENTS
bpIs a pointer to a buffer. This parameter is ignored.
nameIs the termcap entry to look up.
capIs the pointer to a termcap capability.
areaIs a pointer to the area where tgetstr() stores the decoded string.
colIs the column placement of the new cursor.
rowIs the row placement of the new cursor.
DESCRIPTION
These functions provide an interface to the termcap database.
The tgetent() function looks up the termcap entry for the terminal name. The bp parameter is ignored by this function.
The tgetflag() function returns the Boolean value of the termcap capability pointed to by cap.
The tgetnum() function looks up the numeric entry for cap.
The tgetstr() function looks up the string entry for the termcap capability pointed to by cap, placing the decoded string at area and advancing the area pointers. The tputs(3XC) function should be used to output the string.
The tgoto() function decodes cursor values returned from tgetstr(). A pointer to a cursor addressing string is returned that, when sent to the terminal with tputs(), moves the cursor to the new location.
These functions are included for compatibility purposes with programs that use the termcap library. New programs should use terminfo functions described on the tigetflag(3XC) man page.
RETURN VALUES
On success, those functions that return integers return OK. Otherwise, they return ERR.
Those functions that return pointers return a null pointer when an error occurs.
ERRORS
None.
SEE ALSO
putp(3XC), setupterm(3XC), tigetflag(3XC)
SunOS 5.6 — Last change: 1 Jun 1996