X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=man%2Ftput.1;h=b12385e18f5bb28e454a177373b160a94ce6f8d4;hp=7e73b0e0f49222c6274d2e7118c2eca3aff03753;hb=55ccd2b959766810cf7db8d1c4462f338ce0afc8;hpb=46722468f47c2b77b3987729b4bcf2321cccfd01 diff --git a/man/tput.1 b/man/tput.1 index 7e73b0e0..b12385e1 100644 --- a/man/tput.1 +++ b/man/tput.1 @@ -1,6 +1,6 @@ '\" 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 * @@ -27,7 +27,7 @@ .\" 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 @@ -50,14 +50,28 @@ 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). @@ -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 -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 -the attribute is also accepted. +the capability is also accepted. .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. -An all-numeric argument will be passed to the attribute as a number. .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. -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 @@ -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/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