-\fB@TPUT@\fR simply sets the exit code
-(\fB0\fR for TRUE if the terminal has the capability,
-\fB1\fR for FALSE if it does not),
+\fB@TPUT@\fP simply sets the exit code
+(\fB0\fP for TRUE if the terminal has the capability,
+\fB1\fP for FALSE if it does not),
and writes nothing to the standard output.
.RE
.PP
Before using a value returned on the standard output,
the application should test the exit code
and writes nothing to the standard output.
.RE
.PP
Before using a value returned on the standard output,
the application should test the exit code
-(e.g., \fB$?\fR, see \fBsh\fR(1)) to be sure it is \fB0\fR.
-(See the \fBEXIT CODES\fR and \fBDIAGNOSTICS\fR sections.)
+(e.g., \fB$?\fP, see \fBsh\fP(1)) to be sure it is \fB0\fP.
+(See the \fBEXIT CODES\fP and \fBDIAGNOSTICS\fP sections.)
-\fB\-S\fR
-allows more than one capability per invocation of \fB@TPUT@\fR. The
-capabilities must be passed to \fB@TPUT@\fR from the standard input
+\fB\-S\fP
+allows more than one capability per invocation of \fB@TPUT@\fP. The
+capabilities must be passed to \fB@TPUT@\fP from the standard input
-Only one \fIcapname\fR is allowed per line.
-The \fB\-S\fR option changes the
-meaning of the \fB0\fR and \fB1\fR boolean and string exit codes (see the
+Only one \fIcapname\fP is allowed per line.
+The \fB\-S\fP option changes the
+meaning of the \fB0\fP and \fB1\fP boolean and string exit codes (see the
EXIT CODES section).
.IP
Because some capabilities may use
\fIstring\fP parameters rather than \fInumbers\fP,
EXIT CODES section).
.IP
Because some capabilities may use
\fIstring\fP parameters rather than \fInumbers\fP,
-\fB@TPUT@\fR uses a table and the presence of parameters in its input
-to decide whether to use \fBtparm\fR(3X),
+\fB@TPUT@\fP uses a table and the presence of parameters in its input
+to decide whether to use \fBtparm\fP(3X),
-variable \fBTERM\fR.
-If \fB\-T\fR is specified, then the shell
-variables \fBLINES\fR and \fBCOLUMNS\fR will also be ignored.
+variable \fBTERM\fP.
+If \fB\-T\fP is specified, then the shell
+variables \fBLINES\fP and \fBCOLUMNS\fP will also be ignored.
A few commands (\fBinit\fP, \fBreset\fP and \fBlongname\fP) are
special; they are defined by the \fB@TPUT@\fP program.
The others are the names of \fIcapabilities\fP from the terminal database
A few commands (\fBinit\fP, \fBreset\fP and \fBlongname\fP) are
special; they are defined by the \fB@TPUT@\fP program.
The others are the names of \fIcapabilities\fP from the terminal database
Although \fBinit\fP and \fBreset\fP resemble capability names,
\fB@TPUT@\fP uses several capabilities to perform these special functions.
.TP
Although \fBinit\fP and \fBreset\fP resemble capability names,
\fB@TPUT@\fP uses several capabilities to perform these special functions.
.TP
indicates the capability from the terminal database.
.IP
If the capability is a string that takes parameters, the arguments
indicates the capability from the terminal database.
.IP
If the capability is a string that takes parameters, the arguments
-\fB@TPUT@\fR uses a table to decide which to pass as strings.
-Normally \fB@TPUT@\fR uses \fBtparm\fR(3X) to perform the substitution.
+\fB@TPUT@\fP uses a table to decide which to pass as strings.
+Normally \fB@TPUT@\fP uses \fBtparm\fP(3X) to perform the substitution.
contain the information needed for any of these activities,
that activity will silently be skipped.
.TP
contain the information needed for any of these activities,
that activity will silently be skipped.
.TP
(2)
Instead of putting out \fIinitialization\fP strings, the terminal's
\fIreset\fP strings will be output if present
(2)
Instead of putting out \fIinitialization\fP strings, the terminal's
\fIreset\fP strings will be output if present
-(\fBrs1\fR, \fBrs2\fR, \fBrs3\fR, \fBrf\fR).
+(\fBrs1\fP, \fBrs2\fP, \fBrs3\fP, \fBrf\fP).
If the \fIreset\fP strings are not present, but \fIinitialization\fP
strings are, the \fIinitialization\fP strings will be output.
.RE
.IP
If the \fIreset\fP strings are not present, but \fIinitialization\fP
strings are, the \fIinitialization\fP strings will be output.
.RE
.IP
of the terminal will be put out.
The long name is the last
name in the first line of the terminal's description in the
of the terminal will be put out.
The long name is the last
name in the first line of the terminal's description in the
-If \fB@TPUT@\fR is invoked by a link named \fBreset\fR, this has the
-same effect as \fB@TPUT@ reset\fR.
-The \fB@TSET@\fR(\*n) utility also treats a link named \fBreset\fP specially.
+If \fB@TPUT@\fP is invoked by a link named \fBreset\fP, this has the
+same effect as \fB@TPUT@ reset\fP.
+The \fB@TSET@\fP(\*n) utility also treats a link named \fBreset\fP specially.
redirecting their output to a file will capture only part of their actions.
The changes to the terminal modes are not affected by redirecting the output.
.PP
redirecting their output to a file will capture only part of their actions.
The changes to the terminal modes are not affected by redirecting the output.
.PP
-If \fB@TPUT@\fR is invoked by a link named \fBinit\fR, this has the
-same effect as \fB@TPUT@ init\fR.
+If \fB@TPUT@\fP is invoked by a link named \fBinit\fP, this has the
+same effect as \fB@TPUT@ init\fP.
Again, you are less likely to use that link because another program
named \fBinit\fP has a more well-established use.
.SS Terminal Size
Again, you are less likely to use that link because another program
named \fBinit\fP has a more well-established use.
.SS Terminal Size
-the environmental variable \fBTERM\fR has been exported, as
-illustrated on the \fBprofile\fR(5) manual page.
+the environmental variable \fBTERM\fP has been exported, as
+illustrated on the \fBprofile\fP(5) manual page.
-\fBbold=`@TPUT@ smso` offbold=`@TPUT@ rmso`\fR
-Set the shell variables \fBbold\fR, to begin stand-out mode
-sequence, and \fBoffbold\fR, to end standout mode sequence,
+\fBbold=`@TPUT@ smso` offbold=`@TPUT@ rmso`\fP
+Set the shell variables \fBbold\fP, to begin stand-out mode
+sequence, and \fBoffbold\fP, to end standout mode sequence,
in one invocation.
It clears the screen,
moves the cursor to position 10, 10
and turns on bold (extra bright) mode.
in one invocation.
It clears the screen,
moves the cursor to position 10, 10
and turns on bold (extra bright) mode.
tab settings for some terminals, in a format
appropriate to be output to the terminal (escape
sequences that set margins and tabs); for more
information, see the
.IR "Tabs and Initialization" ,
tab settings for some terminals, in a format
appropriate to be output to the terminal (escape
sequences that set margins and tabs); for more
information, see the
.IR "Tabs and Initialization" ,
-If the \fB\-S\fR option is used,
-\fB@TPUT@\fR checks for errors from each line,
+If the \fB\-S\fP option is used,
+\fB@TPUT@\fP checks for errors from each line,
and if any errors are found, will set the exit code to 4 plus the
number of lines with errors.
and if any errors are found, will set the exit code to 4 plus the
number of lines with errors.
-exit code \fB1\fR will never appear.
-Exit codes \fB2\fR, \fB3\fR, and
-\fB4\fR retain their usual interpretation.
-If the \fB\-S\fR option is not used,
-the exit code depends on the type of \fIcapname\fR:
+exit code \fB1\fP will never appear.
+Exit codes \fB2\fP, \fB3\fP, and
+\fB4\fP retain their usual interpretation.
+If the \fB\-S\fP option is not used,
+the exit code depends on the type of \fIcapname\fP:
-a value of \fB0\fR is set if the
-\fIcapname\fR is defined for this terminal \fItype\fR (the value of
-\fIcapname\fR is returned on standard output);
-a value of \fB1\fR is set if \fIcapname\fR
-is not defined for this terminal \fItype\fR
+a value of \fB0\fP is set if the
+\fIcapname\fP is defined for this terminal \fItype\fP (the value of
+\fIcapname\fP is returned on standard output);
+a value of \fB1\fP is set if \fIcapname\fP
+is not defined for this terminal \fItype\fP
-a value of \fB0\fR is always set,
-whether or not \fIcapname\fR is defined for this terminal \fItype\fR.
-To determine if \fIcapname\fR is defined for this terminal \fItype\fR,
+a value of \fB0\fP is always set,
+whether or not \fIcapname\fP is defined for this terminal \fItype\fP.
+To determine if \fIcapname\fP is defined for this terminal \fItype\fP,
-\fBreset\fR or \fBinit\fR may fail to find their respective files.
-In that case, the exit code is set to 4 + \fBerrno\fR.
+\fBreset\fP or \fBinit\fP may fail to find their respective files.
+In that case, the exit code is set to 4 + \fBerrno\fP.
-\fB0\fR T{
-(\fIcapname\fR is a numeric variable that is not specified in the
-\fBterminfo\fR(5) database for this terminal type, e.g.
-\fB@TPUT@ \-T450 lines\fR and \fB@TPUT@ \-Thp2621 xmc\fR)
+\fB0\fP T{
+(\fIcapname\fP is a numeric variable that is not specified in the
+\fBterminfo\fP(5) database for this terminal type, e.g.
+\fB@TPUT@ \-T450 lines\fP and \fB@TPUT@ \-Thp2621 xmc\fP)
-\fB1\fR no error message is printed, see the \fBEXIT CODES\fR section.
-\fB2\fR usage error
-\fB3\fR unknown terminal \fItype\fR or no \fBterminfo\fR database
-\fB4\fR unknown \fBterminfo\fR capability \fIcapname\fR
-\fB>4\fR error occurred in \-S
+\fB1\fP no error message is printed, see the \fBEXIT CODES\fP section.
+\fB2\fP usage error
+\fB3\fP unknown terminal \fItype\fP or no \fBterminfo\fP database
+\fB4\fP unknown \fBterminfo\fP capability \fIcapname\fP
+\fB>4\fP error occurred in \-S
(more than half the program) were incorporated from
the \fBreset\fP feature of BSD \fBtset\fP written by Eric Allman.
.bP
(more than half the program) were incorporated from
the \fBreset\fP feature of BSD \fBtset\fP written by Eric Allman.
.bP
-SVr4 added color initialization using the \fIorig_colors\fP and
-\fIorig_pairs\fP capabilities in the \fBinit\fP subcommand.
+SVr4 added color initialization using the \fBorig_colors\fP and
+\fBorig_pair\fP capabilities in the \fBinit\fP subcommand.
.PP
Keith Bostic replaced the BSD \fBtput\fP command in 1989
with a new implementation
based on the AT&T System V program \fBtput\fP.
Like the AT&T program, Bostic's version
.PP
Keith Bostic replaced the BSD \fBtput\fP command in 1989
with a new implementation
based on the AT&T System V program \fBtput\fP.
Like the AT&T program, Bostic's version
-However (because he had only termcap available),
-it accepted \fItermcap names\fP for other capabilities.
+However (because he had only \fItermcap\fP available),
+it accepted \fItermcap\fP names for other capabilities.
Also, Bostic's BSD \fBtput\fP did not modify the terminal I/O modes
as the earlier BSD \fBtset\fP had done.
.PP
Also, Bostic's BSD \fBtput\fP did not modify the terminal I/O modes
as the earlier BSD \fBtset\fP had done.
.PP
\fB@TPUT@\fP now uses a similar scheme,
using functions shared with \fB@TSET@\fP
(and ultimately based on the 4.4BSD \fBtset\fP).
\fB@TPUT@\fP now uses a similar scheme,
using functions shared with \fB@TSET@\fP
(and ultimately based on the 4.4BSD \fBtset\fP).
-If it is not able to open a terminal, e.g., when running in \fBcron\fP,
+If it is not able to open a terminal, e.g., when running in \fBcron\fP(1),
\fB@TPUT@\fP will return an error.
.bP
AT&T \fBtput\fP guesses the type of its \fIcapname\fP operands by seeing if
all of the characters are numeric, or not.
.IP
\fB@TPUT@\fP will return an error.
.bP
AT&T \fBtput\fP guesses the type of its \fIcapname\fP operands by seeing if
all of the characters are numeric, or not.
.IP
-Most implementations which provide support for \fIcapname\fR operands
-use the \fItparm\fP function to expand parameters in it.
+Most implementations which provide support for \fIcapname\fP operands
+use the \fBtparm\fP function to expand parameters in it.
That function expects a mixture of numeric and string parameters,
requiring \fB@TPUT@\fP to know which type to use.
.IP
This implementation uses a table to determine the parameter types for
That function expects a mixture of numeric and string parameters,
requiring \fB@TPUT@\fP to know which type to use.
.IP
This implementation uses a table to determine the parameter types for
-the standard \fIcapname\fR operands, and an internal library
-function to analyze nonstandard \fIcapname\fR operands.
+the standard \fIcapname\fP operands, and an internal library
+function to analyze nonstandard \fIcapname\fP operands.
.IP
Besides providing more reliable operation than AT&T's utility,
a portability problem is introduced by this analysis:
.IP
Besides providing more reliable operation than AT&T's utility,
a portability problem is introduced by this analysis:
This implementation (unlike others) can accept both \fItermcap\fP
and \fIterminfo\fP names for the \fIcapname\fP feature,
if
This implementation (unlike others) can accept both \fItermcap\fP
and \fIterminfo\fP names for the \fIcapname\fP feature,
if
However, the predefined \fItermcap\fP and \fIterminfo\fP names have two
ambiguities in this case (and the \fIterminfo\fP name is assumed):
.bP
However, the predefined \fItermcap\fP and \fIterminfo\fP names have two
ambiguities in this case (and the \fIterminfo\fP name is assumed):
.bP
The \fIterminfo\fP name \fBed\fP corresponds to
the \fItermcap\fP name \fBcd\fP (clear to end of screen).
.PP
The \fIterminfo\fP name \fBed\fP corresponds to
the \fItermcap\fP name \fBcd\fP (clear to end of screen).
.PP
-The \fBlongname\fR and \fB\-S\fR options, and the parameter-substitution
-features used in the \fBcup\fR example,
+The \fBlongname\fP and \fB\-S\fP options, and the parameter-substitution
+features used in the \fBcup\fP example,
documents only the operands for \fBclear\fP, \fBinit\fP and \fBreset\fP.
There are a few interesting observations to make regarding that:
.bP
documents only the operands for \fBclear\fP, \fBinit\fP and \fBreset\fP.
There are a few interesting observations to make regarding that:
.bP
The others (\fBinit\fP and \fBlongname\fP) do not correspond to terminal
capabilities.
.bP
Other implementations of \fBtput\fP on
SVr4-based systems such as Solaris, IRIX64 and HPUX
as well as others such as AIX and Tru64
The others (\fBinit\fP and \fBlongname\fP) do not correspond to terminal
capabilities.
.bP
Other implementations of \fBtput\fP on
SVr4-based systems such as Solaris, IRIX64 and HPUX
as well as others such as AIX and Tru64
.bP
A few platforms such as FreeBSD recognize termcap names rather
than terminfo capability names in their respective \fBtput\fP commands.
.bP
A few platforms such as FreeBSD recognize termcap names rather
than terminfo capability names in their respective \fBtput\fP commands.