+ <STRONG>o</STRONG> Aside from the <STRONG>set_attributes</STRONG> (<STRONG>sgr</STRONG>) capability, most terminal capa-
+ bilities require no more than one or two parameters.
+
+ <STRONG>tiparm</STRONG> is a newer form of <STRONG>tparm</STRONG> which uses <EM><stdarg.h></EM> rather than a
+ fixed-parameter list. Its numeric parameters are integers (int) rather
+ than longs.
+
+
+</PRE><H3><a name="h3-Output-Functions">Output Functions</a></H3><PRE>
+ The <STRONG>tputs</STRONG> routine applies padding information to the string <EM>str</EM> and
+ outputs it:
+
+ <STRONG>o</STRONG> The <EM>str</EM> parameter must be a terminfo string variable or the return
+ value from <STRONG>tparm</STRONG>, <STRONG>tiparm</STRONG>, <STRONG>tgetstr</STRONG>, or <STRONG>tgoto</STRONG>.
+
+ The <STRONG>tgetstr</STRONG> and <STRONG>tgoto</STRONG> functions are part of the <EM>termcap</EM> interface,
+ which happens to share this function name with the <EM>terminfo</EM> inter-
+ face.
+
+ <STRONG>o</STRONG> <EM>affcnt</EM> is the number of lines affected, or 1 if not applicable.
+
+ <STRONG>o</STRONG> <EM>putc</EM> is a <STRONG>putchar</STRONG>-like routine to which the characters are passed,
+ one at a time.
+
+ The <STRONG>putp</STRONG> routine calls <STRONG>tputs(</STRONG><EM>str</EM><STRONG>,</STRONG> <STRONG>1,</STRONG> <STRONG>putchar)</STRONG>. The output of <STRONG>putp</STRONG> al-
+ ways goes to <STRONG>stdout</STRONG>, rather than the <EM>filedes</EM> specified in <STRONG>setupterm</STRONG>.
+
+ The <STRONG>vidputs</STRONG> routine displays the string on the terminal in the video
+ attribute mode <EM>attrs</EM>, which is any combination of the attributes listed
+ in <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>. The characters are passed to the <STRONG>putchar</STRONG>-like routine
+ <EM>putc</EM>.
+
+ The <STRONG>vidattr</STRONG> routine is like the <STRONG>vidputs</STRONG> routine, except that it outputs
+ through <STRONG>putchar</STRONG>.
+
+ The <STRONG>vid_attr</STRONG> and <STRONG>vid_puts</STRONG> routines correspond to vidattr and vidputs,
+ respectively. They use a set of arguments for representing the video
+ attributes plus color, i.e.,
+
+ <STRONG>o</STRONG> <EM>attrs</EM> of type <STRONG>attr_t</STRONG> for the attributes and
+
+ <STRONG>o</STRONG> <EM>pair</EM> of type <STRONG>short</STRONG> for the color-pair number.
+
+ The <STRONG>vid_attr</STRONG> and <STRONG>vid_puts</STRONG> routines are designed to use the attribute
+ constants with the <EM>WA</EM><STRONG>_</STRONG> prefix.
+
+ X/Open Curses reserves the <EM>opts</EM> argument for future use, saying that
+ applications must provide a null pointer for that argument. As an ex-
+ tension, this implementation allows <EM>opts</EM> to be used as a pointer to
+ <STRONG>int</STRONG>, which overrides the <EM>pair</EM> (<STRONG>short</STRONG>) argument.
+
+ The <STRONG>mvcur</STRONG> routine provides low-level cursor motion. It takes effect
+ immediately (rather than at the next refresh).
+
+
+</PRE><H3><a name="h3-Terminal-Capability-Functions">Terminal Capability Functions</a></H3><PRE>
+ The <STRONG>tigetflag</STRONG>, <STRONG>tigetnum</STRONG> and <STRONG>tigetstr</STRONG> routines return the value of the
+ capability corresponding to the <STRONG>terminfo</STRONG> <EM>capname</EM> passed to them, such
+ as <STRONG>xenl</STRONG>. The <EM>capname</EM> for each capability is given in the table column
+ entitled <EM>capname</EM> code in the capabilities section of <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
+
+ These routines return special values to denote errors.
+
+ The <STRONG>tigetflag</STRONG> routine returns
+
+ <STRONG>-1</STRONG> if <EM>capname</EM> is not a boolean capability, or
+
+ <STRONG>0</STRONG> if it is canceled or absent from the terminal description.
+
+ The <STRONG>tigetnum</STRONG> routine returns
+
+ <STRONG>-2</STRONG> if <EM>capname</EM> is not a numeric capability, or
+
+ <STRONG>-1</STRONG> if it is canceled or absent from the terminal description.
+
+ The <STRONG>tigetstr</STRONG> routine returns
+
+ <STRONG>(char</STRONG> <STRONG>*)-1</STRONG>
+ if <EM>capname</EM> is not a string capability, or
+
+ <STRONG>0</STRONG> if it is canceled or absent from the terminal description.
+
+
+</PRE><H3><a name="h3-Terminal-Capability-Names">Terminal Capability Names</a></H3><PRE>
+ These null-terminated arrays contain
+
+ <STRONG>o</STRONG> the short terminfo names ("codes"),
+
+ <STRONG>o</STRONG> the <STRONG>termcap</STRONG> names ("names", and
+
+ <STRONG>o</STRONG> the long terminfo names ("fnames")
+
+ for each of the predefined <STRONG>terminfo</STRONG> variables:
+
+ <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*boolnames[]</STRONG>, <STRONG>*boolcodes[]</STRONG>, <STRONG>*boolfnames[]</STRONG>
+ <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*numnames[]</STRONG>, <STRONG>*numcodes[]</STRONG>, <STRONG>*numfnames[]</STRONG>
+ <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*strnames[]</STRONG>, <STRONG>*strcodes[]</STRONG>, <STRONG>*strfnames[]</STRONG>
+
+
+</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
+ Routines that return an integer return <STRONG>ERR</STRONG> upon failure and <STRONG>OK</STRONG> (SVr4
+ only specifies "an integer value other than <STRONG>ERR</STRONG>") upon successful com-
+ pletion, unless otherwise noted in the preceding routine descriptions.
+
+ Routines that return pointers always return <STRONG>NULL</STRONG> on error.
+
+ X/Open defines no error conditions. In this implementation
+
+ <STRONG>del_curterm</STRONG>
+ returns an error if its terminal parameter is null.
+
+ <STRONG>putp</STRONG> calls <STRONG>tputs</STRONG>, returning the same error-codes.
+
+ <STRONG>restartterm</STRONG>
+ returns an error if the associated call to <STRONG>setupterm</STRONG> returns an
+ error.
+
+ <STRONG>setupterm</STRONG>
+ returns an error if it cannot allocate enough memory, or create
+ the initial windows (stdscr, curscr, newscr). Other error con-
+ ditions are documented above.