'\"macro stdmacro
.if n .pH g3x.curs_termcap @(#)curs_termcap	40.3 of 12/15/89
.\" Copyright 1989 AT&T
.\" ident	"@(#)svid_ti:ti_lib/curs_termcap	1.4"
.nr X
.if \nX=0 .ds x} curs_termcap 3X "" "\&"
.if \nX=1 .ds x} curs_termcap 3X ""
.if \nX=2 .ds x} curs_termcap 3X "" "\&"
.if \nX=3 .ds x} curs_termcap "" "" "\&"
.TH \*(x}
.SH NAME
\f4curs_termcap\f2: \f4 tgetent\f1, \f4tgetflag\f1, \f4tgetnum\f1, \f4tgetstr\f1, \f4tgoto\f1, \f4tputs\f1 \- \f4curses\fP interfaces (emulated) to the termcap library
.SH SYNOPSIS
.nf
.ft 4
#include <curses.h>
#include <term.h>
.sp .5
int tgetent(char *bp, char *name);
.sp .25
int tgetflag(char id[2]);
.sp .25
int tgetnum(char id[2]);
.sp .25
char *tgetstr(char id[2], char **area);
.sp .25
char *tgoto(char *cap, int col, int row);
.sp .25
int tputs(char *str, int affcnt, int (*putc)(void));
.ft 1
.fi
.SH DESCRIPTION
These routines are included as a conversion aid for
programs that use the \f2termcap\f1 library.
Their parameters are the same and the routines are emulated
using the \f2terminfo\f1 database.
These routines are supported at Level 2 and should not be used in new
applications.
.PP
The \f4tgetent\f1 routine looks up the termcap entry for \f2name\f1.
The emulation ignores the buffer pointer \f2bp\f1.
.P
The \f4tgetflag\f1 routine gets the boolean entry for \f2id\f1.
.P
The \f4tgetnum\f1 routine gets the numeric entry for \f2id\f1.
.P
The \f4tgetstr\f1 routine returns the string entry for \f2id\f1.
Use \f4tputs\f1 to output the returned string.
.P
The \f4tgoto\f1 routine instantiates the parameters into the
given capability.
The output from this routine is to be passed to
\f4tputs\f1.
.P
The \f4tputs\f1 routine is described on the curs_\f4terminfo\fP(4)
manual page.
.SH RETURN VALUE
Routines that return an integer return \f4ERR\f1 upon
failure and an integer value other than \f4ERR\f1
upon successful completion.
.P
Routines that return pointers return \f4NULL\f1 on error.
.SH NOTES
.P
The header file \f4<curses.h>\f1 automatically includes the header files
\f4<stdio.h>\f1 and \f4<unctrl.h>\f1.
.SH SEE ALSO
.na
\f4curses\fP(3X),
\f4curs_\f4terminfo\fP(4),
\f4putc\fP(3S).
.ad
