curs_termcap(S)
curs_termcap: tgetent, tgetflag, tgetnum, tgetstr, tgoto, tputs --
curses and terminfo interfaces (emulated) to the termcap library
Syntax
cc ... -lcurses
#define M_TERMCAP
#include <curses.h>
#include <term.h>
int tgetent(char *bp, 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);
int tputs(char *str, int affcnt, int (*putc)(int));
Description
These routines are included as a conversion aid for programs that use the
termcap library.
Their parameters are the same as those from the termcap library
but the routines are emulated using the
terminfo(F)
database.
These routines are provided for backwards compatibility
and should not be used in new applications.
The
tgetent(S)
routine looks up the
termcap
entry for name.
The emulation ignores the buffer pointer bp.
The
tgetflag(S)
routine gets the boolean entry for id.
The
tgetnum(S)
routine gets the numeric entry for id.
The
tgetstr(S)
routine returns the string entry for id.
Use
tputs(S)
to output the returned string.
The
tgoto(S)
routine instantiates the parameters into the given capability.
The output from this routine is to be passed to
tputs( ).
The
tputs( )
routine is described in the
curs_terminfo(S)
manual page.
Return values
Routines that return an integer return ERR on failure,
and on successful completion return an integer value other than ERR.
Routines that return pointers return NULL on error.
Warning
The header file curses.h automatically includes the header files
stdio.h and unctrl.h.
Files
/usr/lib/libcurses.a-
/usr/lib/libtinfo.a-
See also
curses(S),
curs_terminfo(S),
putc(S),
tc_getent(S)
Standards conformance
tgetent(S),
tgetflag(S),
tgetnum(S),
tgetstr(S),
tgoto(S),
and
tputs(S)
are not part of any
currently supported standard;
they were developed by UNIX System Laboratories, Inc. and
are maintained by The SCO Group.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003