]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/tput.1
ncurses 5.5
[ncurses.git] / man / tput.1
index 7e73b0e0f49222c6274d2e7118c2eca3aff03753..b12385e18f5bb28e454a177373b160a94ce6f8d4 100644 (file)
@@ -1,6 +1,6 @@
 '\" t
 .\"***************************************************************************
 '\" t
 .\"***************************************************************************
-.\" Copyright (c) 1998-2000,2002 Free Software Foundation, Inc.              *
+.\" Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" copy of this software and associated documentation files (the            *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" copy of this software and associated documentation files (the            *
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: tput.1,v 1.18 2002/10/12 13:53:20 tom Exp $
+.\" $Id: tput.1,v 1.22 2005/01/08 17:44:26 tom Exp $
 .TH tput 1 ""
 .ds d @TERMINFO@
 .ds n 1
 .TH tput 1 ""
 .ds d @TERMINFO@
 .ds n 1
 The \fBtput\fR utility uses the \fBterminfo\fR database to make the
 values of terminal-dependent capabilities and information available to
 the shell (see \fBsh\fR(1)), to initialize or reset the terminal, or
 The \fBtput\fR utility uses the \fBterminfo\fR database to make the
 values of terminal-dependent capabilities and information available to
 the shell (see \fBsh\fR(1)), to initialize or reset the terminal, or
-return the long name of the requested terminal type.  \fBtput\fR
-outputs a string if the attribute (\fIcap\fRability \fIname\fR) is of
-type string, or an integer if the attribute is of type integer.  If
-the attribute is of type boolean, \fBtput\fR simply sets the exit code
-(\fB0\fR for TRUE if the terminal has the capability, \fB1\fR for
-FALSE if it does not), and produces no output.  Before using a value
-returned on standard output, the user should test the exit code
-[\fB$?\fR, see \fBsh\fR(1)] to be sure it is \fB0\fR.
+return the long name of the requested terminal type.
+The result depends upon the capability's type:
+.RS
+.TP 5
+string
+\fBtput\fR writes the string to the standard output.
+No trailing newline is supplied.
+.TP
+integer
+\fBtput\fR writes the decimal value to the standard output,
+with a trailing newline.
+.TP
+boolean
+\fBtput\fR simply sets the exit code
+(\fB0\fR for TRUE if the terminal has the capability,
+\fB1\fR 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
+(e.g., \fB$?\fR, see \fBsh\fR(1)) to be sure it is \fB0\fR.
 (See the \fBEXIT CODES\fR and \fBDIAGNOSTICS\fR sections.)
 For a complete list of capabilities
 and the \fIcapname\fR associated with each, see \fBterminfo\fR(\*n).
 (See the \fBEXIT CODES\fR and \fBDIAGNOSTICS\fR sections.)
 For a complete list of capabilities
 and the \fIcapname\fR associated with each, see \fBterminfo\fR(\*n).
@@ -70,20 +84,20 @@ variables \fBLINES\fR and \fBCOLUMNS\fR will be ignored,and the
 operating system will not be queried for the actual screen size.
 .TP
 \fIcapname\fR
 operating system will not be queried for the actual screen size.
 .TP
 \fIcapname\fR
-indicates the attribute from the \fBterminfo\fR database.  When
+indicates the capability from the \fBterminfo\fR database.  When
 \fBtermcap\fR support is compiled in, the \fBtermcap\fR name for
 \fBtermcap\fR support is compiled in, the \fBtermcap\fR name for
-the attribute is also accepted.
+the capability is also accepted.
 .TP
 \fIparms\fR
 .TP
 \fIparms\fR
-If the attribute is a string that takes parameters, the arguments
+If the capability is a string that takes parameters, the arguments
 \fIparms\fR will be instantiated into the string.
 \fIparms\fR will be instantiated into the string.
-An all-numeric argument will be passed to the attribute as a number.
 .IP
 .IP
+Most parameters are numbers.
 Only a few terminfo capabilities require string parameters;
 \fBtput\fR uses a table to decide which to pass as strings.
 Normally \fBtput\fR uses \fBtparm\fR (3X) to perform the substitution.
 Only a few terminfo capabilities require string parameters;
 \fBtput\fR uses a table to decide which to pass as strings.
 Normally \fBtput\fR uses \fBtparm\fR (3X) to perform the substitution.
-If no parameters are given for the attribute,
-\fBtput\fR writes the string without performing the substitution. 
+If no parameters are given for the capability,
+\fBtput\fR writes the string without performing the substitution.
 .TP
 \fB-S\fR
 allows more than one capability per invocation of \fBtput\fR.  The
 .TP
 \fB-S\fR
 allows more than one capability per invocation of \fBtput\fR.  The
@@ -200,12 +214,6 @@ The list is terminated by an exclamation mark (\fB!\fR) on a line by itself.
 \fB\*d\fR
 compiled terminal description database
 .TP
 \fB\*d\fR
 compiled terminal description database
 .TP
-\fB/usr/include/curses.h\fR
-\fBcurses\fR(3X) header file
-.TP
-\fB/usr/include/term.h\fR
-\fBterminfo\fR header file
-.TP
 \fB@DATADIR@/tabset/*\fR
 tab settings for some terminals, in a format
 appropriate to be output to the terminal (escape
 \fB@DATADIR@/tabset/*\fR
 tab settings for some terminals, in a format
 appropriate to be output to the terminal (escape