]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - doc/html/man/tput.1.html
ncurses 6.0 - patch 20170422
[ncurses.git] / doc / html / man / tput.1.html
index ad00b2358c2def4f48c0a920710bde0385dd2db3..db32031e47a9213d234c9a522d7bcb440f1d0ce3 100644 (file)
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: tput.1,v 1.51 2017/01/14 20:49:40 tom Exp @
+  * @Id: tput.1,v 1.54 2017/01/29 00:51:08 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
 
 
 </PRE><H3><a name="h3-Commands">Commands</a></H3><PRE>
+       A  few  commands  (<STRONG>init</STRONG>,  <STRONG>reset</STRONG> and <STRONG>longname</STRONG>) are special;
+       they are defined by the <STRONG>tput</STRONG> program.  The others are  the
+       names of <EM>capabilities</EM> from the terminal database (see <STRONG>ter-</STRONG>
+       <STRONG><A HREF="terminfo.5.html">minfo(5)</A></STRONG> for a list).  Although <STRONG>init</STRONG>  and  <STRONG>reset</STRONG>  resemble
+       capability  names,  <STRONG>tput</STRONG> uses several capabilities to per-
+       form these special functions.
+
        <EM>capname</EM>
-              indicates  the  capability  from the <STRONG>terminfo</STRONG> data-
-              base.  When <STRONG>termcap</STRONG> support  is  compiled  in,  the
-              <STRONG>termcap</STRONG> name for the capability is also accepted.
+              indicates the capability from  the  terminal  data-
+              base.
 
               If  the  capability  is a string that takes parame-
               ters, the arguments following the  capability  will
               be used as parameters for the string.
 
-              Most  parameters  are numbers.  Only a few terminfo
+              Most  parameters  are numbers.  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.
               writes the string without performing the  substitu-
               tion.
 
-       <STRONG>init</STRONG>   If  the  <STRONG>terminfo</STRONG>  database is present and an entry
+       <STRONG>init</STRONG>   If  the  terminal  database is present and an entry
               for the user's terminal exists (see <STRONG>-T</STRONG><EM>type</EM>, above),
               the following will occur:
 
               Otherwise, <STRONG>reset</STRONG> acts identically to <STRONG>init</STRONG>.
 
        <STRONG>longname</STRONG>
-              If the <STRONG>terminfo</STRONG> database is present  and  an  entry
+              If the terminal database is present  and  an  entry
               for  the user's terminal exists (see <STRONG>-T</STRONG><EM>type</EM> above),
               then the long name of the terminal will be put out.
               The long name is the last name in the first line of
        Both of these appeared in 4.4BSD,  becoming  the  "modern"
        BSD implementation of <STRONG>tput</STRONG>.
 
+       This  implementation of <STRONG>tput</STRONG> began from a different source
+       than AT&amp;T or BSD: Ross Ridge's <EM>mytinfo</EM> package,  published
+       on  <EM>comp.sources.unix</EM>  in  December 1992.  Ridge's program
+       made more sophisticated use of the  terminal  capabilities
+       than  the BSD program.  Eric Raymond used the <STRONG>tput</STRONG> program
+       (and other parts of <EM>mytinfo</EM>)  in  ncurses  in  June  1995.
+       Using  the  portions  dealing  with  terminal capabilities
+       almost without change, Raymond made  improvements  to  the
+       way the command-line parameters were handled.
+
 
 </PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
        This  implementation of <STRONG>tput</STRONG> differs from AT&amp;T <STRONG>tput</STRONG> in two
            an internal library function  to  analyze  nonstandard
            <EM>capname</EM> operands.
 
+       This  implementation (unlike others) can accept both <EM>term-</EM>
+       <EM>cap</EM> and <EM>terminfo</EM> names for the <EM>capname</EM> feature, if <EM>termcap</EM>
+       support  is  compiled in.  However, the predefined <EM>termcap</EM>
+       and <EM>terminfo</EM> names have two ambiguities in this case  (and
+       the <EM>terminfo</EM> name is assumed):
+
+       <STRONG>o</STRONG>   The  <EM>termcap</EM>  name <STRONG>dl</STRONG> corresponds to the <EM>terminfo</EM> name
+           <STRONG>dl1</STRONG> (delete one line).
+           The <EM>terminfo</EM> name <STRONG>dl</STRONG> corresponds to the  <EM>termcap</EM>  name
+           <STRONG>DL</STRONG> (delete a given number of lines).
+
+       <STRONG>o</STRONG>   The  <EM>termcap</EM>  name <STRONG>ed</STRONG> corresponds to the <EM>terminfo</EM> name
+           <STRONG>rmdc</STRONG> (end delete mode).
+           The <EM>terminfo</EM> name <STRONG>ed</STRONG> corresponds to the  <EM>termcap</EM>  name
+           <STRONG>cd</STRONG> (clear to end of screen).
+
        The  <STRONG>longname</STRONG>  and <STRONG>-S</STRONG> options, and the parameter-substitu-
        tion features used in the <STRONG>cup</STRONG> example, were not  supported
        in  BSD curses before 4.3reno (1989) or in AT&amp;T/USL curses
        <STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>,    <STRONG>stty(1)</STRONG>,   <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG>,   <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>,   <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>,
        <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170114).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170422).