|Skip Navigation Links|
|Exit Print View|
|man pages section 3: Curses Library Functions Oracle Solaris 10 1/13 Information Library|
- curses interfaces (emulated) to the termcap library
cc [ flag ... ] file ... -lcurses [ library ... ] #include <curses.h> #include <term.h> int tgetent(char *bp, char *name);
int tgetflag(char id);
int tgetnum(char id);
char *tgetstr(char id, char **area);
char *tgoto(char *cap, int col, int row);
int tputs(char *str, int affcnt, int (*putc)(void));
These routines are included as a conversion aid for programs that use the termcap library. Their parameters are the same and the routines are emulated using the terminfo database. These routines are supported at Level 2 and should not be used in new applications.
The tgetent() routine looks up the termcap entry for name. The emulation ignores the buffer pointer bp.
The tgetflag() routine gets the boolean entry for id.
The tgetnum() routine gets the numeric entry for id.
The tgetstr() routine returns the string entry for id. Use tputs() to output the returned string.
The tgoto() routine instantiates the parameters into the given capability. The output from this routine is to be passed to tputs().
The tputs() routine is described on the curs_terminfo(3CURSES) manual page.
Routines that return an integer return ERR upon failure and an integer value other than ERR upon successful completion.
Routines that return pointers return NULL on error.
See attributes(5) for descriptions of the following attributes:
The header <curses.h> automatically includes the headers <stdio.h> and <unctrl.h>.