curs_termcap(S-osr5)
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-osr5)
routine looks up the
termcap
entry for name.
The emulation ignores the buffer pointer bp.
The
tgetflag(S-osr5)
routine gets the boolean entry for id.
The
tgetnum(S-osr5)
routine gets the numeric entry for id.
The
tgetstr(S-osr5)
routine returns the string entry for id.
Use
tputs(S-osr5)
to output the returned string.
The
tgoto(S-osr5)
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-osr5)
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-osr5),
curs_terminfo(S-osr5),
putc(S-osr5),
tc_getent(S-osr5)
Standards conformance
tgetent(S-osr5),
tgetflag(S-osr5),
tgetnum(S-osr5),
tgetstr(S-osr5),
tgoto(S-osr5),
and
tputs(S-osr5)
are not part of any
currently supported standard;
they were developed by UNIX System Laboratories, Inc. and
are maintained by The SCO Group.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005