+ If <EM>cap-code</EM> is of string type and takes parameters, <STRONG>tput</STRONG>
+ interprets arguments following <EM>cap-code</EM> as the parameters,
+ up to the (fixed) quantity the capability requires.
+
+ Most parameters are numeric. Only a few terminal
+ capabilities require string parameters; <STRONG>tput</STRONG> uses a table to
+ decide which to pass as strings. Normally <STRONG>tput</STRONG> uses
+ <STRONG><A HREF="curs_terminfo.3x.html">tparm(3x)</A></STRONG> to perform the substitution. If no parameters are
+ given for the capability, <STRONG>tput</STRONG> writes the string without
+ performing the substitution.
+
+ <STRONG>init</STRONG> initializes the terminal. If the terminal database is
+ present and an entry for the user's terminal type exists,
+ the following occur.
+
+ (1) <STRONG>tput</STRONG> retrieves the terminal's mode settings. It
+ successively tests the file descriptors corresponding
+ to
+
+ <STRONG>o</STRONG> the standard error stream,
+
+ <STRONG>o</STRONG> the standard output stream,
+
+ <STRONG>o</STRONG> the standard input stream, and
+
+ <STRONG>o</STRONG> <EM>/dev/tty</EM>
+
+ to obtain terminal settings. Having retrieved them,
+ <STRONG>tput</STRONG> remembers which descriptor to use for further
+ updates.
+
+ (2) If the terminal dimensions cannot be obtained from the
+ operating system, but the environment or terminal type
+ database entry describes them, <STRONG>tput</STRONG> updates the
+ operating system's notion of them.
+
+ (3) <STRONG>tput</STRONG> updates the terminal modes.
+
+ <STRONG>o</STRONG> Any delays specified in the entry (for example,
+ when a newline is sent) are set in the terminal
+ driver.
+
+ <STRONG>o</STRONG> Tab expansion is turned on or off per the
+ specification in the entry, and
+
+ <STRONG>o</STRONG> if tabs are not expanded, standard tabs (every 8
+ spaces) are set.
+
+ (4) If initialization capabilities, detailed in subsection
+ "Tabs and Initialization" of <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>, are present,
+ <STRONG>tput</STRONG> writes them to the standard output stream.
+
+ (5) <STRONG>tput</STRONG> flushes the standard output stream.
+
+ If an entry lacks the information needed for an activity
+ above, that activity is silently skipped.
+
+ <STRONG>reset</STRONG> re-initializes the terminal. A reset differs from
+ initialization in two ways.
+
+ (1) <STRONG>tput</STRONG> sets the the terminal modes to a "sane" state,
+
+ <STRONG>o</STRONG> enabling cooked and echo modes,
+
+ <STRONG>o</STRONG> disabling cbreak and raw modes,
+
+ <STRONG>o</STRONG> enabling newline translation, and
+
+ <STRONG>o</STRONG> setting any unset special characters to their
+ default values.
+
+ (2) If any reset capabilities are defined for the terminal
+ type, <STRONG>tput</STRONG> writes them to the output stream.
+ Otherwise, <STRONG>tput</STRONG> uses any defined initialization
+ capabilities. Reset capabilities are detailed in
+ subsection "Tabs and Initialization" of <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
+
+ <STRONG>longname</STRONG> A <EM>terminfo</EM> entry begins with one or more names by which an
+ application can refer to the entry, before the list of
+ terminal capabilities. The names are separated by "|"
+ characters. X/Open Curses terms the last name the "long
+ name", and indicates that it may include blanks.
+
+ <STRONG>tic</STRONG> warns if the last name does not include blanks, to
+ accommodate old <EM>terminfo</EM> entries that treated the long name
+ as an optional feature. The long name is often referred to
+ as the description field.
+
+ If the terminal database is present and an entry for the
+ user's terminal type exists, <STRONG>tput</STRONG> reports its description to
+ the standard output stream, without a trailing newline. See
+ <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
+
+ <EM>Note:</EM> Redirecting the output of "<STRONG>tput</STRONG> <STRONG>init</STRONG>" or "<STRONG>tput</STRONG> <STRONG>reset</STRONG>" to a file
+ will capture only part of their actions. Changes to the terminal modes
+ are not affected by file descriptor redirection, since the terminal
+ modes are altered via <STRONG>ioctl(2)</STRONG>.
+
+
+</PRE><H3><a name="h3-Aliases">Aliases</a></H3><PRE>
+ If <STRONG>tput</STRONG> is invoked via link with any of the names <STRONG>clear</STRONG>, <STRONG>init</STRONG>, or
+ <STRONG>reset</STRONG>, it operates as if run with the corresponding (pseudo-)capability
+ operand. For example, executing a link named <STRONG>reset</STRONG> that points to <STRONG>tput</STRONG>
+ has the same effect as "<STRONG>tput</STRONG> <STRONG>reset</STRONG>".
+
+ This feature was introduced by <EM>ncurses</EM> 5.2 in 2000. It is rarely used:
+
+ <STRONG>clear</STRONG> is a separate program, which is both smaller and more frequently
+ executed.
+
+ <STRONG>init</STRONG> has the same name as another program in widespread use.
+
+ <STRONG>reset</STRONG> is provided by the <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG> utility (also via a link named
+ <STRONG>reset</STRONG>).
+
+
+</PRE><H3><a name="h3-Terminal-Size">Terminal Size</a></H3><PRE>
+ Besides the pseudo-capabilities (such as <STRONG>init</STRONG>), <STRONG>tput</STRONG> treats the <STRONG>lines</STRONG>
+ and <STRONG>cols</STRONG> <EM>cap-codes</EM> specially: it may call <STRONG><A HREF="curs_terminfo.3x.html">setupterm(3x)</A></STRONG> to obtain the
+ terminal size.
+
+ <STRONG>o</STRONG> First, <STRONG>tput</STRONG> attempts to obtain these capabilities from the terminal
+ database. This generally fails for terminal emulators, which lack
+ a fixed window size and thus omit the capabilities.
+
+ <STRONG>o</STRONG> It then asks the operating system for the terminal's size, which
+ generally works, unless the connection is via a serial line that
+ does not support "NAWS": negotiations about window size.
+
+ <STRONG>o</STRONG> Finally, it inspects the environment variables <EM>LINES</EM> and <EM>COLUMNS</EM>,
+ which may override the terminal size.
+
+ If the <STRONG>-T</STRONG> option is given, <STRONG>tput</STRONG> ignores the environment variables by
+ calling <STRONG>use_tioctl(TRUE)</STRONG>, relying upon the operating system (or,
+ ultimately, the terminal database).
+
+
+</PRE><H2><a name="h2-OPTIONS">OPTIONS</a></H2><PRE>
+ <STRONG>-S</STRONG> retrieves more than one capability per invocation of <STRONG>tput</STRONG>.
+ The capabilities must be passed to <STRONG>tput</STRONG> from the standard
+ input stream instead of from the command line (see section
+ "EXAMPLES" below). Only one <EM>cap-code</EM> is allowed per line.
+ The <STRONG>-S</STRONG> option changes the meanings of the <STRONG>0</STRONG> and <STRONG>1</STRONG> exit
+ statuses (see section "EXIT STATUS" below).
+
+ Some capabilities use string parameters rather than numeric
+ ones. <STRONG>tput</STRONG> employs a built-in table and the presence of
+ parameters in its input to decide how to interpret them, and
+ whether to use <STRONG><A HREF="curs_terminfo.3x.html">tparm(3x)</A></STRONG>.
+
+ <STRONG>-T</STRONG> <EM>type</EM> indicates the terminal's <EM>type</EM>. Normally this option is
+ unnecessary, because a default is taken from the <EM>TERM</EM>
+ environment variable. If specified, the environment variables
+ <EM>LINES</EM> and <EM>COLUMNS</EM> are also ignored.
+
+ <STRONG>-v</STRONG> causes <STRONG>tput</STRONG> to operate verbosely, reporting warnings.
+
+ <STRONG>-V</STRONG> reports the version of <EM>ncurses</EM> associated with <STRONG>tput</STRONG>, and exits
+ with a successful status.
+
+ <STRONG>-x</STRONG> prevents "<STRONG>tput</STRONG> <STRONG>clear</STRONG>" from attempting to clear the scrollback
+ buffer.
+
+
+</PRE><H2><a name="h2-EXIT-STATUS">EXIT STATUS</a></H2><PRE>
+ Normally, one should interpret <STRONG>tput</STRONG>'s exit statuses as follows.
+
+ <STRONG>Status</STRONG> <STRONG>Meaning</STRONG> <STRONG>When</STRONG> <STRONG>-S</STRONG> <STRONG>Not</STRONG> <STRONG>Specified</STRONG>
+ ------------------------------------------------------------------------
+ <STRONG>0</STRONG> Boolean or string capability present
+ <STRONG>1</STRONG> Boolean or numeric capability absent
+ <STRONG>2</STRONG> usage error or no terminal type specified
+ <STRONG>3</STRONG> unrecognized terminal type
+ <STRONG>4</STRONG> unrecognized capability code
+ <STRONG>>4</STRONG> system error (4 + <STRONG>errno</STRONG>)
+
+ When the <STRONG>-S</STRONG> option is used, some statuses change meanings.
+
+ <STRONG>Status</STRONG> <STRONG>Meaning</STRONG> <STRONG>When</STRONG> <STRONG>-S</STRONG> <STRONG>Specified</STRONG>
+ ------------------------------------------------------------------------
+ <STRONG>0</STRONG> all operands interpreted
+ <STRONG>1</STRONG> unused
+ <STRONG>4</STRONG> some operands not interpreted
+
+
+</PRE><H2><a name="h2-ENVIRONMENT">ENVIRONMENT</a></H2><PRE>
+ <STRONG>tput</STRONG> reads one environment variable.
+
+ <EM>TERM</EM> denotes the terminal type. Each terminal type is distinct,
+ though many are similar. The <STRONG>-T</STRONG> option overrides its value.
+
+
+</PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
+ <EM>/usr/share/tabset</EM>
+ tab stop initialization database
+
+ <EM>/usr/share/terminfo</EM>