setupterm(3cur)
Name
setupterm − perform low level terminal setup
Syntax
setupterm(term, filenum, errret)
char *term;
int filenum;
int *errret;
Description
This function sets up the terminal from the terminfo database. The parameter term is the terminal type. If this parameter is set to NULL then the environment variable TERM will be used. The filenum parameter is an ULTRIX file descriptor, not a stdio pointer. It is used for all the output generated by setupterm.
The terminfo boolean, numeric and string values are stored in a structure of type TERMINAL.
After setupterm returns successfully the variable cur_term is initialized. This variable points to the TERMINAL structure. The cur_term pointer can be saved before calling setupterm again as further calls to setupterm allocate new space; the space pointed to by cur_term is not overwritten.