.TH tputs() "" "" "termcap/terminfo Function (libterm/libcurses)"
.PC "Read/decode leading padding information"
.B "#include <curses.h>"
.B "#include <term.h>"
\fBtputs(\fIname, affcnt, outc\^\fB)\fR
\fBchar *\fIname\fB; int \fIaffcnt\fB; int (*\fIoutc\^\fB)()\fB;\fR
.PP
.B tputs()
is one of a set of functions that read a
.B termcap
or
.B terminfo
terminal description.
.PP
.B tputs()
decodes the leading padding information of the string
.IR name .
When you use
.B tputs()
to interpret the
.B terminfo
data base,
.I name
should point to a string that names one of
.BR terminfo 's
variables, as defined in the Lexicon entry for
.BR terminfo ;
e.g.,
.BR auto_right_margin
or
.BR auto_left_margin .
When you use
.B tputs()
to interpret the
.B termcap
data base,
.I name
should point to
.BR termcap 's
variable code, e.g.,
.BR am .
.PP
.I affcnt
gives the number of lines affected by the operation.
Set it to one if it is not applicable.
.PP
.I outc
points to the routine that writes each character.
.SH Files
\fB/etc/termcap\fR \(em Terminal capabilities data base
.br
\fB/etc/terminfo\fR \(em Terminal capabilities data base
.br
\fB/usr/lib/libcurses.a\fR \(em Routines for reading \fBterminfo\fR descriptions
.br
\fB/usr/lib/libterm.a\fR \(em Routines for reading \fBtermcap\fR descriptions
.fi
.SH "See Also"
.Xr "libcurses," libcurses
.Xr "libterm," libterm
.Xr "termcap," termcap
.Xr "terminfo" terminfo
.SH Notes
As noted above,
.B tputs()
can read either a
.B termcap
or a
.B terminfo
description.
The
.B termcap
version of
.B tputs()
lives in library
.BR /usr/lib/libterm.a .
To obtain the
.B termcap
version of
.BR tputs() ,
link in the library
.BR /usr/lib/libterm.a .
To obtain the
.B terminfo
version, however, link in the library
.BR /usr/lib/libcurses.a .
