]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.0 - patch 20161022
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 23 Oct 2016 01:59:31 +0000 (01:59 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 23 Oct 2016 01:59:31 +0000 (01:59 +0000)
+ modify tset -w (and tput reset) to update the program's copy of the
  screensize if it was already set in the system, to improve tabstop
  setting which relies upon knowing the actual screensize.
+ add functionality of tset -w to tput, like the "-c" feature this is
  not optional in tput.
+ add "clear" as a possible link/alias to tput.
+ improve tput's check for being called as "init" or "reset" to allow
  for transformed names.
+ split-out the "clear" function from progs/clear.c, share with
  tput to get the same behavior, e.g., the E3 extension.

43 files changed:
MANIFEST
NEWS
VERSION
dist.mk
doc/html/man/adacurses6-config.1.html [moved from doc/html/man/adacurses-config.1.html with 92% similarity]
doc/html/man/captoinfo.1m.html
doc/html/man/clear.1.html
doc/html/man/curs_inopts.3x.html
doc/html/man/form.3x.html
doc/html/man/infocmp.1m.html
doc/html/man/infotocap.1m.html
doc/html/man/menu.3x.html
doc/html/man/ncurses.3x.html
doc/html/man/ncurses6-config.1.html [moved from doc/html/man/ncurses5-config.1.html with 87% similarity]
doc/html/man/panel.3x.html
doc/html/man/tabs.1.html
doc/html/man/term.5.html
doc/html/man/terminfo.5.html
doc/html/man/tic.1m.html
doc/html/man/toe.1m.html
doc/html/man/tput.1.html
doc/html/man/tset.1.html
man/curs_inopts.3x
man/infocmp.1m
man/tabs.1
man/term.5
man/terminfo.tail
man/tput.1
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec
progs/Makefile.in
progs/clear.c
progs/clear_cmd.c [new file with mode: 0644]
progs/clear_cmd.h [new file with mode: 0644]
progs/modules
progs/reset_cmd.c
progs/reset_cmd.h
progs/tput.c
progs/tset.c

index a038ad637a051bbf1a3dd13782c3454013815d72..032e0ee876beb285115f09778a0263a956889a4a 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
 ./doc/html/announce.html
 ./doc/html/hackguide.html
 ./doc/html/index.html
-./doc/html/man/adacurses-config.1.html
+./doc/html/man/adacurses6-config.1.html
 ./doc/html/man/captoinfo.1m.html
 ./doc/html/man/clear.1.html
 ./doc/html/man/curs_add_wch.3x.html
 ./doc/html/man/mitem_value.3x.html
 ./doc/html/man/mitem_visible.3x.html
 ./doc/html/man/ncurses.3x.html
-./doc/html/man/ncurses5-config.1.html
+./doc/html/man/ncurses6-config.1.html
 ./doc/html/man/panel.3x.html
 ./doc/html/man/resizeterm.3x.html
 ./doc/html/man/tabs.1.html
 ./progs/capconvert
 ./progs/clear.c
 ./progs/clear.sh
+./progs/clear_cmd.c
+./progs/clear_cmd.h
 ./progs/dump_entry.c
 ./progs/dump_entry.h
 ./progs/infocmp.c
diff --git a/NEWS b/NEWS
index a53b691a9cd3e88fdb6fdc300f4365a58647284d..1a669b3d2b746d59d191183f329936dbdf67a1c5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2682 2016/10/15 23:26:53 tom Exp $
+-- $Id: NEWS,v 1.2687 2016/10/23 00:03:47 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,18 @@ See the AUTHORS file for the corresponding full names.
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20161022
+       + modify tset -w (and tput reset) to update the program's copy of the
+         screensize if it was already set in the system, to improve tabstop
+         setting which relies upon knowing the actual screensize.
+       + add functionality of tset -w to tput, like the "-c" feature this is
+         not optional in tput.
+       + add "clear" as a possible link/alias to tput.
+       + improve tput's check for being called as "init" or "reset" to allow
+         for transformed names.
+       + split-out the "clear" function from progs/clear.c, share with
+         tput to get the same behavior, e.g., the E3 extension.
+
 20161015
        + amend internal use of tputs to consistently use the number of lines
          affected, e.g., for insert/delete character operations.  While
diff --git a/VERSION b/VERSION
index 906b2f6c4ef49bf151a8767763ec75e159d9445e..0290d6db8977109d0324090f2d034654ae05e2ff 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:9  6.0     20161015
+5:0:9  6.0     20161022
diff --git a/dist.mk b/dist.mk
index c3670a663b710f224dd5ee72c5ae711e3f665c26..3d5cc4d74fb10ce83c91441a3c59a8496f9fae72 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.1128 2016/10/15 15:43:49 tom Exp $
+# $Id: dist.mk,v 1.1129 2016/10/21 22:47:18 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -37,7 +37,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 6
 NCURSES_MINOR = 0
-NCURSES_PATCH = 20161015
+NCURSES_PATCH = 20161022
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
similarity index 92%
rename from doc/html/man/adacurses-config.1.html
rename to doc/html/man/adacurses6-config.1.html
index 213771c185ae6bcc04a3a1fc3130ac78ed36f172..1778d7be8b886dca45e072f7d96acb652d531d04 100644 (file)
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 </HEAD>
 <BODY>
-<H1>ADACURSES 1   User Commands</H1>
-<HR>
+<H1 class="no-header">ADACURSES 1   User Commands</H1>
 <PRE>
 <STRONG><A HREF="ADACURSES.1.html">ADACURSES(1)</A></STRONG>                 User Commands                 <STRONG><A HREF="ADACURSES.1.html">ADACURSES(1)</A></STRONG>
 
 
 
 
-</PRE>
-<H2><a name="h2-NAME">NAME</a></H2><PRE>
+</PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
        adacurses-config - helper script for AdaCurses libraries
 
 
-</PRE>
-<H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
+</PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
        <STRONG>adacurses-config</STRONG> [<EM>options</EM>]
 
 
-</PRE>
-<H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
+</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
        This  is  a  shell  script which simplifies configuring an
        application  to  use  the  AdaCurses  library  binding  to
        ncurses.
 
 
-</PRE>
-<H2><a name="h2-OPTIONS">OPTIONS</a></H2><PRE>
+</PRE><H2><a name="h2-OPTIONS">OPTIONS</a></H2><PRE>
        <STRONG>--cflags</STRONG>
               echos  the gnat (Ada compiler) flags needed to com-
               pile with AdaCurses.
@@ -84,8 +79,7 @@
        example).
 
 
-</PRE>
-<H2><a name="h2-EXAMPLE">EXAMPLE</a></H2><PRE>
+</PRE><H2><a name="h2-EXAMPLE">EXAMPLE</a></H2><PRE>
        For example, supposing that you want to compile the "Hello
        World!"   program  for  AdaCurses.   Make  a  file   named
        "hello.adb":
        you will compile and link the program.
 
 
-</PRE>
-<H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
+</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20150215).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161022).
 
 
 
index 7665785b2d938de874b4fd3d5f55516c6ef01ebf..aa86b59dab642648b3f590342084fa3699f5b716 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161015).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161022).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index 484a59c7012c51f1e317be1c680bb85be0fa22af..e1a9e3b301e2189f39c7713c770d07f27308044f 100644 (file)
@@ -67,7 +67,7 @@
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="tput.1.html">tput(1)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161015).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161022).
 
 
 
index eacf70345a33eaec6089ff8bb17eb094cb402aca..c22be9daf3bd0a14986cc6952df1bb85a45f324b 100644 (file)
@@ -26,7 +26,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_inopts.3x,v 1.22 2016/10/15 17:13:45 tom Exp @
+  * @Id: curs_inopts.3x,v 1.23 2016/10/22 19:54:35 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
        When <STRONG>keypad</STRONG> is first enabled, ncurses loads the  key-defi-
        nitions for the current terminal description.  If the ter-
        minal description includes extended  string  capabilities,
-       e.g.,  from  using the <STRONG>-x</STRONG> option of tic, then ncurses also
+       e.g.,  from  using the <STRONG>-x</STRONG> option of <STRONG>tic</STRONG>, then ncurses also
        defines keys for the capabilities whose names  begin  with
        "k".   The  corresponding  keycodes are generated and (de-
        pending on previous loads of  terminal  descriptions)  may
index cc7c6e6be72edad43ae56e9d62dd0be40210dbb6..9725802c6e8f9790e2014a20a1d144bdddfffb5a 100644 (file)
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> and related pages whose names begin "form_" for
        detailed descriptions of the entry points.
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161015).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161022).
 
 
 
index 24237fb49cfcbd0a45008cac98ebdbc7ce1c3ae3..4a621eeb885b842b144c572cdd424fb26547bf51 100644 (file)
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: infocmp.1m,v 1.58 2016/10/01 17:15:45 tom Exp @
+  * @Id: infocmp.1m,v 1.59 2016/10/22 19:54:35 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
 
        For best results when converting to  <STRONG>termcap</STRONG>  format,  you
        should use both <STRONG>-C</STRONG> and <STRONG>-r</STRONG>.  Normally a termcap description
-       is limited to 1023 bytes.  infocmp trims away less  essen-
+       is limited to 1023 bytes.  <STRONG>infocmp</STRONG> trims away less  essen-
        tial  parts  to make it fit.  If you are converting to one
        of the (rare)  termcap  implementations  which  accept  an
        unlimited  size  of  termcap,  you  may want to add the <STRONG>-T</STRONG>
        needed.
 
    <STRONG>Changing</STRONG> <STRONG>Databases</STRONG> <STRONG>[-A</STRONG> <EM>directory</EM>] [-B <EM>directory</EM>]
-       Like other <STRONG>ncurses</STRONG> utilities, infocmp looks for the termi-
+       Like other <STRONG>ncurses</STRONG> utilities, <STRONG>infocmp</STRONG> looks for the termi-
        nal descriptions in several places.  You can use the  <STRONG>TER-</STRONG>
        <STRONG>MINFO</STRONG>  and <STRONG>TERMINFO_DIRS</STRONG> environment variables to override
        the compiled-in default list  of  places  to  search  (see
 
        http://invisible-island.net/ncurses/tctest.html
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161015).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161022).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index 18de61e4f4ea2fc22ee7d98f1ca3d4e6b3689568..5d06638b3b6e6d445d1f71f6ce0210272bdeae2e 100644 (file)
@@ -88,7 +88,7 @@
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161015).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161022).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index f03f6cfe07e5bf1c395bcc09c76c4b053c1a9168..adad98b07228c377a273ad12315fafa6e98d969a 100644 (file)
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> and related pages whose names begin "menu_" for
        detailed descriptions of the entry points.
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161015).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161022).
 
 
 
index 3d1cd67e997757c828f2ff1f70b2f609ae37e5de..e38cd843d5512352769bda4aaf64797f484e5eed 100644 (file)
@@ -60,7 +60,7 @@
        sonable optimization.  This implementation is "new curses"
        (ncurses) and is the approved replacement for 4.4BSD clas-
        sic  curses,  which has been discontinued.  This describes
-       <STRONG>ncurses</STRONG> version 6.0 (patch 20161015).
+       <STRONG>ncurses</STRONG> version 6.0 (patch 20161022).
 
        The <STRONG>ncurses</STRONG> library emulates the curses library of  System
        V  Release  4  UNIX,  and  XPG4 (X/Open Portability Guide)
similarity index 87%
rename from doc/html/man/ncurses5-config.1.html
rename to doc/html/man/ncurses6-config.1.html
index 19eb7985596e638103c2322d52708b5d7aac1b3b..769ef12cecbc9a55f84a6f72c1089e7d86e62e9d 100644 (file)
 <HEAD>
 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
 <meta name="generator" content="Manpage converted by man2html - see http://invisible-island.net/scripts/readme.html#others_scripts">
-<TITLE>ncurses5-config 1</TITLE>
+<TITLE>ncurses6-config 1</TITLE>
 <link rev=made href="mailto:bug-ncurses@gnu.org">
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 </HEAD>
 <BODY>
-<H1 class="no-header">ncurses5-config 1</H1>
+<H1 class="no-header">ncurses6-config 1</H1>
 <PRE>
-<STRONG><A HREF="ncurses5-config.1.html">ncurses5-config(1)</A></STRONG>                                   <STRONG><A HREF="ncurses5-config.1.html">ncurses5-config(1)</A></STRONG>
+<STRONG><A HREF="ncurses6-config.1.html">ncurses6-config(1)</A></STRONG>                                   <STRONG><A HREF="ncurses6-config.1.html">ncurses6-config(1)</A></STRONG>
 
 
 
 
-</PRE>
-<H2><a name="h2-NAME">NAME</a></H2><PRE>
-       ncurses5-config - helper script for ncurses libraries
+</PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
+       ncurses6-config - helper script for ncurses libraries
 
 
-</PRE>
-<H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
-       <STRONG>ncurses5-config</STRONG> [<EM>options</EM>]
+</PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
+       <STRONG>ncurses6-config</STRONG> [<EM>options</EM>]
 
 
-</PRE>
-<H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
+</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
        This is a shell script which simplifies configuring appli-
        cations against a particular set of ncurses libraries.
 
 
-</PRE>
-<H2><a name="h2-OPTIONS">OPTIONS</a></H2><PRE>
+</PRE><H2><a name="h2-OPTIONS">OPTIONS</a></H2><PRE>
        <STRONG>--prefix</STRONG>
               echos the package-prefix of ncurses
 
        <STRONG>--help</STRONG> prints this message
 
 
-</PRE>
-<H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
+</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 5.9 (patch 20150523).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161022).
 
 
 
-                                                     <STRONG><A HREF="ncurses5-config.1.html">ncurses5-config(1)</A></STRONG>
+                                                     <STRONG><A HREF="ncurses6-config.1.html">ncurses6-config(1)</A></STRONG>
 </PRE>
 <div class="nav">
 <ul>
index 0228e00282fed6e96b36ac999ce117a1d3b51773..4a0df4aa4d67c478ca567d4a39434a4cf00ac5fa 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>,
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161015).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161022).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index 48493c17e1da1ae41fa8bf49ae1b573c2310fdd0..18729d835596c817cb22e62a339871c375b5a195 100644 (file)
@@ -26,7 +26,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: tabs.1,v 1.13 2016/10/15 16:16:38 tom Exp @
+  * @Id: tabs.1,v 1.14 2016/10/22 19:54:35 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
            terminal database provide this capability.
 
        <STRONG>o</STRONG>   There  is  no counterpart in X/Open Curses Issue 7 for
-           this utility, unlike <STRONG><A HREF="tput.1.html">tput(1)</A></STRONG>.
+           this utility, unlike <STRONG>tput(1)</STRONG>.
 
        The <STRONG>-d</STRONG> (debug) and <STRONG>-n</STRONG> (no-op) options are  extensions  not
        provided by other implementations.
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161015).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161022).
 
 
 
index 309a23dc432c6bce941814618d55a8d2a3349784..bde9d97148a270bd411ecf0ccc0e5bbaeaac3e24 100644 (file)
@@ -26,7 +26,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: term.5,v 1.23 2016/10/15 17:02:31 tom Exp @
+  * @Id: term.5,v 1.24 2016/10/22 19:55:01 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
index 7c0b59bb3c1e073b997711e9e7b47180b7b2ad02..43269fe96496c0636a3c362db356865cc4bb4c1d 100644 (file)
@@ -33,7 +33,7 @@
   ****************************************************************************
   * @Id: terminfo.head,v 1.22 2016/10/15 17:02:31 tom Exp @
   * Head of terminfo man page ends here
-  * @Id: terminfo.tail,v 1.72 2016/10/15 18:34:58 tom Exp @
+  * @Id: terminfo.tail,v 1.73 2016/10/22 19:56:17 tom Exp @
   * Beginning of terminfo.tail file
   * This file is part of ncurses.
   * See "terminfo.head" for copyright.
@@ -75,7 +75,7 @@
        nals by giving a set of capabilities which they  have,  by
        specifying how to perform screen operations, and by speci-
        fying padding requirements and  initialization  sequences.
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161015).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161022).
 
        Entries in <EM>terminfo</EM> consist of a sequence of `,' separated
        fields (embedded commas may be escaped with a backslash or
        initially  set every <EM>n</EM> spaces when the terminal is powered
        up, the numeric parameter <STRONG>it</STRONG> is given, showing the  number
        of  spaces  the tabs are set to.  This is normally used by
-       the <EM>tset</EM> command to determine whether to set the mode  for
+       the <STRONG>tset</STRONG> command to determine whether to set the mode  for
        hardware  tab expansion, and whether to set the tab stops.
        If the terminal has tab stops that can be  saved  in  non-
        volatile  memory, the terminfo description can assume that
        These strings are expected to set the terminal into  modes
        consistent  with  the  rest  of  the terminfo description.
        They are normally sent to the terminal, by the <EM>init</EM> option
-       of  the  <EM>tput</EM>  program,  each time the user logs in.  They
+       of  the  <STRONG>tput</STRONG>  program,  each time the user logs in.  They
        will be printed in the following order:
 
               run the program
index 90c1162cf35ddae1763d2863021c32d42617d7bb..6ee32a3ce6dce48a12cdb3b928f71148b1003d28 100644 (file)
        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>,   <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>,   <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>,    <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG>,
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="term.5.html">term(5)</A></STRONG>.  <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161015).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161022).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index ab8af6713b8d802f46881ecb3db60c99ff2587ab..c7cfbd731cfa1a1e1598e0389b3b2744e9e09698 100644 (file)
        <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>,   <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>,   <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>,    <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>,
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161015).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161022).
 
 
 
index 6483d3d0538026a57039be3e2a56a9370641d48f..000d45a94ced11d6ed3e5db56c59dd268054b6d4 100644 (file)
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: tput.1,v 1.44 2016/08/20 23:40:31 tom Exp @
+  * @Id: tput.1,v 1.46 2016/10/22 19:57:25 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
 
 
 </PRE><H3><a name="h3-Aliases">Aliases</a></H3><PRE>
-       <STRONG>tput</STRONG>  handles  the  <STRONG>init</STRONG>  and <STRONG>reset</STRONG> commands specially: it
-       allows for the possibility that it is invoked  by  a  link
+       <STRONG>tput</STRONG> handles the <STRONG>clear</STRONG>, <STRONG>init</STRONG> and <STRONG>reset</STRONG> commands specially:
+       it allows for the possibility that it is invoked by a link
        with those names.
 
        If  <STRONG>tput</STRONG>  is  invoked  by a link named <STRONG>reset</STRONG>, this has the
        same effect as  <STRONG>tput</STRONG>  <STRONG>reset</STRONG>.   The  <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>  utility  also
-       treats a link named <STRONG>reset</STRONG> specially:
+       treats a link named <STRONG>reset</STRONG> specially.
 
-       <STRONG>o</STRONG>   That  utility  resets  the  terminal modes and special
-           characters (not done here).
+       Before  ncurses 6.1, the two utilities were different from
+       each other:
 
-       <STRONG>o</STRONG>   On the other hand, tset's repertoire of terminal capa-
-           bilities  for  resetting the terminal is more limited,
+       <STRONG>o</STRONG>   <STRONG>tset</STRONG> utility reset  the  terminal  modes  and  special
+           characters (not done with <STRONG>tput</STRONG>).
+
+       <STRONG>o</STRONG>   On the other hand, <STRONG>tset</STRONG>'s repertoire of terminal capa-
+           bilities for resetting the terminal was more  limited,
            i.e., only <STRONG>reset_1string</STRONG>, <STRONG>reset_2string</STRONG> and <STRONG>reset_file</STRONG>
            in contrast to the tab-stops and margins which are set
            by this utility.
 
-       <STRONG>o</STRONG>   The <STRONG>reset</STRONG> program is usually an alias for tset, due to
-           the  resetting  of  terminal modes and special charac-
-           ters.
+       <STRONG>o</STRONG>   The  <STRONG>reset</STRONG>  program  is  usually  an  alias  for <STRONG>tset</STRONG>,
+           because of this  difference  with  resetting  terminal
+           modes and special characters.
 
        If <STRONG>tput</STRONG> is invoked by a link named <STRONG>init</STRONG>, this has the same
-       effect  as  <STRONG>tput</STRONG>  <STRONG>init</STRONG>.  Again, you are less likely to use
-       that link because another program named <STRONG>init</STRONG>  has  a  more
+       effect as <STRONG>tput</STRONG> <STRONG>init</STRONG>.  Again, you are less  likely  to  use
+       that  link  because  another program named <STRONG>init</STRONG> has a more
        well-established use.
 
 
 </PRE><H2><a name="h2-EXAMPLES">EXAMPLES</a></H2><PRE>
        <STRONG>tput</STRONG> <STRONG>init</STRONG>
             Initialize the terminal according to the type of ter-
-            minal in the environmental variable <STRONG>TERM</STRONG>.  This  com-
-            mand  should be included in everyone's .profile after
+            minal  in the environmental variable <STRONG>TERM</STRONG>.  This com-
+            mand should be included in everyone's .profile  after
             the environmental variable <STRONG>TERM</STRONG> has been exported, as
             illustrated on the <STRONG>profile(5)</STRONG> manual page.
 
        <STRONG>tput</STRONG> <STRONG>-T5620</STRONG> <STRONG>reset</STRONG>
-            Reset  an  AT&amp;T 5620 terminal, overriding the type of
+            Reset an AT&amp;T 5620 terminal, overriding the  type  of
             terminal in the environmental variable <STRONG>TERM</STRONG>.
 
        <STRONG>tput</STRONG> <STRONG>cup</STRONG> <STRONG>0</STRONG> <STRONG>0</STRONG>
        <STRONG>bold=`tput</STRONG> <STRONG>smso`</STRONG> <STRONG>offbold=`tput</STRONG> <STRONG>rmso`</STRONG>
             Set the shell variables <STRONG>bold</STRONG>, to begin stand-out mode
             sequence, and <STRONG>offbold</STRONG>, to end standout mode sequence,
-            for  the current terminal.  This might be followed by
-            a prompt: <STRONG>echo</STRONG>  <STRONG>"${bold}Please</STRONG>  <STRONG>type</STRONG>  <STRONG>in</STRONG>  <STRONG>your</STRONG>  <STRONG>name:</STRONG>
+            for the current terminal.  This might be followed  by
+            a  prompt:  <STRONG>echo</STRONG>  <STRONG>"${bold}Please</STRONG>  <STRONG>type</STRONG>  <STRONG>in</STRONG> <STRONG>your</STRONG> <STRONG>name:</STRONG>
             <STRONG>${offbold}\c"</STRONG>
 
        <STRONG>tput</STRONG> <STRONG>hc</STRONG>
-            Set  exit code to indicate if the current terminal is
+            Set exit code to indicate if the current terminal  is
             a hard copy terminal.
 
        <STRONG>tput</STRONG> <STRONG>cup</STRONG> <STRONG>23</STRONG> <STRONG>4</STRONG>
-            Send the sequence to move the cursor to row 23,  col-
+            Send  the sequence to move the cursor to row 23, col-
             umn 4.
 
        <STRONG>tput</STRONG> <STRONG>cup</STRONG>
             parameters substituted.
 
        <STRONG>tput</STRONG> <STRONG>longname</STRONG>
-            Print the long name from the  <STRONG>terminfo</STRONG>  database  for
-            the  type  of terminal specified in the environmental
+            Print  the  long  name from the <STRONG>terminfo</STRONG> database for
+            the type of terminal specified in  the  environmental
             variable <STRONG>TERM</STRONG>.
 
             <STRONG>tput</STRONG> <STRONG>-S</STRONG> <STRONG>&lt;&lt;!</STRONG>
             <STRONG>&gt;</STRONG> <STRONG>bold</STRONG>
             <STRONG>&gt;</STRONG> <STRONG>!</STRONG>
 
-            This example shows <STRONG>tput</STRONG> processing several  capabili-
-            ties  in one invocation.  It clears the screen, moves
-            the cursor to position  10,  10  and  turns  on  bold
-            (extra  bright)  mode.   The list is terminated by an
+            This  example shows <STRONG>tput</STRONG> processing several capabili-
+            ties in one invocation.  It clears the screen,  moves
+            the  cursor  to  position  10,  10  and turns on bold
+            (extra bright) mode.  The list is  terminated  by  an
             exclamation mark (<STRONG>!</STRONG>) on a line by itself.
 
 
 
        <STRONG>/usr/share/tabset/*</STRONG>
               tab settings for some terminals, in a format appro-
-              priate   to  be  output  to  the  terminal  (escape
-              sequences that set  margins  and  tabs);  for  more
-              information,  see the <EM>Tabs</EM> <EM>and</EM> <EM>Initialization</EM>, sec-
+              priate  to  be  output  to  the  terminal   (escape
+              sequences  that  set  margins  and  tabs); for more
+              information, see the <EM>Tabs</EM> <EM>and</EM> <EM>Initialization</EM>,  sec-
               tion of <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
 
 </PRE><H2><a name="h2-EXIT-CODES">EXIT CODES</a></H2><PRE>
        If the <STRONG>-S</STRONG> option is used, <STRONG>tput</STRONG> 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.  If  no  errors
-       are  found,  the  exit  code is <STRONG>0</STRONG>.  No indication of which
+       line, and if any errors are found, will set the exit  code
+       to  4  plus the number of lines with errors.  If no errors
+       are found, the exit code is <STRONG>0</STRONG>.   No  indication  of  which
        line failed can be given so exit code <STRONG>1</STRONG> will never appear.
-       Exit  codes <STRONG>2</STRONG>, <STRONG>3</STRONG>, and <STRONG>4</STRONG> retain their usual interpretation.
+       Exit codes <STRONG>2</STRONG>, <STRONG>3</STRONG>, and <STRONG>4</STRONG> retain their usual  interpretation.
        If the <STRONG>-S</STRONG> option is not used, the exit code depends on the
        type of <EM>capname</EM>:
 
           <EM>boolean</EM>
                  a value of <STRONG>0</STRONG> is set for TRUE and <STRONG>1</STRONG> for FALSE.
 
-          <EM>string</EM> a  value  of  <STRONG>0</STRONG> is set if the <EM>capname</EM> is defined
-                 for this terminal <EM>type</EM> (the value of <EM>capname</EM>  is
-                 returned  on  standard  output); a value of <STRONG>1</STRONG> is
-                 set if <EM>capname</EM> is not defined for this  terminal
+          <EM>string</EM> a value of <STRONG>0</STRONG> is set if the  <EM>capname</EM>  is  defined
+                 for  this terminal <EM>type</EM> (the value of <EM>capname</EM> is
+                 returned on standard output); a value  of  <STRONG>1</STRONG>  is
+                 set  if <EM>capname</EM> is not defined for this terminal
                  <EM>type</EM> (nothing is written to standard output).
 
           <EM>integer</EM>
-                 a  value of <STRONG>0</STRONG> is always set, whether or not <EM>cap-</EM>
-                 <EM>name</EM> is defined  for  this  terminal  <EM>type</EM>.   To
-                 determine  if <EM>capname</EM> is defined for this termi-
-                 nal <EM>type</EM>, the user must test the  value  written
-                 to  standard  output.   A value of <STRONG>-1</STRONG> means that
+                 a value of <STRONG>0</STRONG> is always set, whether or not  <EM>cap-</EM>
+                 <EM>name</EM>  is  defined  for  this  terminal <EM>type</EM>.  To
+                 determine if <EM>capname</EM> is defined for this  termi-
+                 nal  <EM>type</EM>,  the user must test the value written
+                 to standard output.  A value of  <STRONG>-1</STRONG>  means  that
                  <EM>capname</EM> is not defined for this terminal <EM>type</EM>.
 
-          <EM>other</EM>  <STRONG>reset</STRONG> or <STRONG>init</STRONG> may fail to find their  respective
-                 files.   In that case, the exit code is set to 4
+          <EM>other</EM>  <STRONG>reset</STRONG>  or <STRONG>init</STRONG> may fail to find their respective
+                 files.  In that case, the exit code is set to  4
                  + <STRONG>errno</STRONG>.
 
-       Any other exit code indicates an error; see  the  DIAGNOS-
+       Any  other  exit code indicates an error; see the DIAGNOS-
        TICS section.
 
 
 
        exit code   error message
        ---------------------------------------------------------------------
-       <STRONG>0</STRONG>           (<EM>capname</EM> is a numeric variable that is not specified  in
-                   the  <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>  database  for this terminal type, e.g.
+       <STRONG>0</STRONG>           (<EM>capname</EM>  is a numeric variable that is not specified in
+                   the <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> database for this  terminal  type,  e.g.
                    <STRONG>tput</STRONG> <STRONG>-T450</STRONG> <STRONG>lines</STRONG> and <STRONG>tput</STRONG> <STRONG>-T2621</STRONG> <STRONG>xmc</STRONG>)
        <STRONG>1</STRONG>           no error message is printed, see the <STRONG>EXIT</STRONG> <STRONG>CODES</STRONG> section.
        <STRONG>2</STRONG>           usage error
 
 
 </PRE><H2><a name="h2-HISTORY">HISTORY</a></H2><PRE>
-       The <STRONG>tput</STRONG> command was begun by Bill Joy in 1980.  The  ini-
+       The  <STRONG>tput</STRONG> command was begun by Bill Joy in 1980.  The ini-
        tial version only cleared the screen.
 
-       AT&amp;T  System  V  provided  a different <STRONG>tput</STRONG> command, whose
-       <STRONG>init</STRONG> and <STRONG>reset</STRONG>  subcommands (more than half  the  program)
+       AT&amp;T System V provided a  different  <STRONG>tput</STRONG>  command,  whose
+       <STRONG>init</STRONG>  and  <STRONG>reset</STRONG>  subcommands (more than half the program)
        were incorporated from the <STRONG>reset</STRONG> feature of BSD <STRONG>tset</STRONG> writ-
-       ten by Eric Allman.  Later the corresponding  source  code
-       for  <EM>reset</EM>  was  removed  from the BSD <STRONG>tset</STRONG> (in June 1993,
+       ten  by  Eric Allman.  Later the corresponding source code
+       for <EM>reset</EM> was removed from the BSD  <STRONG>tset</STRONG>  (in  June  1993,
        released in 4.4BSD-Lite a year later).
 
-       Keith Bostic replaced the BSD <STRONG>tput</STRONG> command in 1989 with  a
-       new  implementation  based  on  the  AT&amp;T System V program
-       <STRONG>tput</STRONG>.  Like the AT&amp;T program,  Bostic's  version  accepted
-       some  parameters  named  for <EM>terminfo</EM> <EM>capabilities</EM> (<STRONG>clear</STRONG>,
-       <STRONG>init</STRONG>, <STRONG>longname</STRONG> and <STRONG>reset</STRONG>).  However (because he  had  only
-       termcap  available),  it  accepted <EM>termcap</EM> <EM>names</EM> for other
-       capabilities.  Also, Bostic's BSD <STRONG>tput</STRONG> did not modify  the
+       Keith  Bostic replaced the BSD <STRONG>tput</STRONG> command in 1989 with a
+       new implementation based on  the  AT&amp;T  System  V  program
+       <STRONG>tput</STRONG>.   Like  the  AT&amp;T program, Bostic's version accepted
+       some parameters named for  <EM>terminfo</EM>  <EM>capabilities</EM>  (<STRONG>clear</STRONG>,
+       <STRONG>init</STRONG>,  <STRONG>longname</STRONG>  and <STRONG>reset</STRONG>).  However (because he had only
+       termcap available), it accepted <EM>termcap</EM>  <EM>names</EM>  for  other
+       capabilities.   Also, Bostic's BSD <STRONG>tput</STRONG> did not modify the
        terminal I/O modes as the earlier BSD <STRONG>tset</STRONG> had done.
 
-       At  the  same  time,  Bostic  added  a  shell script named
+       At the same  time,  Bostic  added  a  shell  script  named
        "clear", which used <STRONG>tput</STRONG> to clear the screen.
 
-       Both of these appeared in 4.4BSD,  becoming  the  "modern"
+       Both  of  these  appeared in 4.4BSD, becoming the "modern"
        BSD implementation of <STRONG>tput</STRONG>.
 
 
 </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
+       This implementation of <STRONG>tput</STRONG> differs from AT&amp;T <STRONG>tput</STRONG> in  two
        important areas:
 
-       <STRONG>o</STRONG>   tput <EM>capname</EM> writes to the standard output.  That need
-           not  be  a regular terminal.  However, the subcommands
-           which manipulate terminal modes may not use the  stan-
+       <STRONG>o</STRONG>   <STRONG>tput</STRONG> <EM>capname</EM> writes to the standard output.  That need
+           not be a regular terminal.  However,  the  subcommands
+           which  manipulate terminal modes may not use the stan-
            dard output.
 
-           The  AT&amp;T implementation's <STRONG>init</STRONG> and <STRONG>reset</STRONG> commands use
+           The AT&amp;T implementation's <STRONG>init</STRONG> and <STRONG>reset</STRONG> commands  use
            the BSD (4.1c) <STRONG>tset</STRONG> source, which manipulates terminal
-           modes.   It  successively tries standard output, stan-
-           dard error, standard  input  before  falling  back  to
+           modes.  It successively tries standard  output,  stan-
+           dard  error,  standard  input  before  falling back to
            "/dev/tty" and finally just assumes a 1200Bd terminal.
            When updating terminal modes, it ignores errors.
 
-           Until changes made after ncurses  6.0,  tput  did  not
-           modify  terminal  modes.   tput  now  uses  a  similar
-           scheme, using functions shared with  tset  (and  ulti-
-           mately  based  on the 4.4BSD <STRONG>tset</STRONG>).  If it is not able
-           to open a terminal, e.g., when running in  <STRONG>cron</STRONG>,  tput
+           Until  changes  made  after  ncurses 6.0, <STRONG>tput</STRONG> did not
+           modify  terminal  modes.   <STRONG>tput</STRONG>  now  uses  a  similar
+           scheme,  using  functions  shared with <STRONG>tset</STRONG> (and ulti-
+           mately based on the 4.4BSD <STRONG>tset</STRONG>).  If it is  not  able
+           to  open  a terminal, e.g., when running in <STRONG>cron</STRONG>, <STRONG>tput</STRONG>
            will return an error.
 
-       <STRONG>o</STRONG>   AT&amp;T  <STRONG>tput</STRONG> guesses the type of its <EM>capname</EM> operands by
+       <STRONG>o</STRONG>   AT&amp;T <STRONG>tput</STRONG> guesses the type of its <EM>capname</EM> operands  by
            seeing if all of the characters are numeric, or not.
 
            Most implementations which provide support for <EM>capname</EM>
-           operands  use  the <EM>tparm</EM> function to expand parameters
+           operands use the <EM>tparm</EM> function to  expand  parameters
            in it.  That function expects a mixture of numeric and
-           string  parameters,  requiring <STRONG>tput</STRONG> to know which type
+           string parameters, requiring <STRONG>tput</STRONG> to know  which  type
            to use.
 
-           This implementation uses  a  table  to  determine  the
+           This  implementation  uses  a  table  to determine the
            parameter types for the standard <EM>capname</EM> operands, and
-           an internal library function  to  analyze  nonstandard
+           an  internal  library  function to analyze nonstandard
            <EM>capname</EM> operands.
 
-       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
+       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
        before SVr4 (1988).
 
-       IEEE Std 1003.1/The Open Group  Base Specifications  Issue
-       7  (POSIX.1-2008)  documents  only the operands for <STRONG>clear</STRONG>,
-       <STRONG>init</STRONG> and <STRONG>reset</STRONG>.  There are a few interesting  observations
+       IEEE  Std 1003.1/The Open Group  Base Specifications Issue
+       7 (POSIX.1-2008) documents only the  operands  for  <STRONG>clear</STRONG>,
+       <STRONG>init</STRONG>  and <STRONG>reset</STRONG>.  There are a few interesting observations
        to make regarding that:
 
-       <STRONG>o</STRONG>   In  this  implementation, <STRONG>clear</STRONG> is part of the <EM>capname</EM>
+       <STRONG>o</STRONG>   In this implementation, <STRONG>clear</STRONG> is part of  the  <EM>capname</EM>
            support.  The others (<STRONG>init</STRONG> and <STRONG>longname</STRONG>) do not corre-
            spond to terminal capabilities.
 
-       <STRONG>o</STRONG>   Other  implementations  of  <STRONG>tput</STRONG> on SVr4-based systems
-           such as Solaris, IRIX64 and HPUX  as  well  as  others
-           such  as AIX and Tru64 provide support for <EM>capname</EM> op-
+       <STRONG>o</STRONG>   Other implementations of <STRONG>tput</STRONG>  on  SVr4-based  systems
+           such  as  Solaris,  IRIX64  and HPUX as well as others
+           such as AIX and Tru64 provide support for <EM>capname</EM>  op-
            erands.
 
-       <STRONG>o</STRONG>   A few platforms  such  as  FreeBSD  recognize  termcap
-           names  rather  than terminfo capability names in their
-           respective <STRONG>tput</STRONG> commands.  Since 2010,  NetBSD's  <STRONG>tput</STRONG>
-           uses  terminfo  names.  Before that, it (like FreeBSD)
+       <STRONG>o</STRONG>   A  few  platforms  such  as  FreeBSD recognize termcap
+           names rather than terminfo capability names  in  their
+           respective  <STRONG>tput</STRONG>  commands.  Since 2010, NetBSD's <STRONG>tput</STRONG>
+           uses terminfo names.  Before that, it  (like  FreeBSD)
            recognized termcap names.
 
-       Because (apparently) <EM>all</EM> of  the  certified  Unix  systems
-       support  the  full  set of capability names, the reasoning
+       Because  (apparently)  <EM>all</EM>  of  the certified Unix systems
+       support the full set of capability  names,  the  reasoning
        for documenting only a few may not be apparent.
 
        <STRONG>o</STRONG>   X/Open Curses Issue 7 documents <STRONG>tput</STRONG> differently, with
-           <EM>capname</EM>  and the other features used in this implemen-
+           <EM>capname</EM> and the other features used in this  implemen-
            tation.
 
-       <STRONG>o</STRONG>   That is, there are two standards for  <STRONG>tput</STRONG>:  POSIX  (a
-           subset)  and  X/Open Curses (the full implementation).
-           POSIX documents a subset to avoid the complication  of
-           including  X/Open Curses and the terminal capabilities
+       <STRONG>o</STRONG>   That  is,  there  are two standards for <STRONG>tput</STRONG>: POSIX (a
+           subset) and X/Open Curses (the  full  implementation).
+           POSIX  documents a subset to avoid the complication of
+           including X/Open Curses and the terminal  capabilities
            database.
 
        <STRONG>o</STRONG>   While it is certainly possible to write a <STRONG>tput</STRONG> program
            without using curses, none of the systems which have a
-           curses implementation provide  a  <STRONG>tput</STRONG>  utility  which
+           curses  implementation  provide  a  <STRONG>tput</STRONG> utility which
            does not provide the <EM>capname</EM> feature.
 
 
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
-       <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="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 20161015).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161022).
 
 
 
index 4a6a048e623b4a250e7e7ee9c591ea9621c97441..cd112fbbb4bb413cfb4dffa1512512c70ed2c6e4 100644 (file)
        <STRONG>csh(1)</STRONG>,   <STRONG>sh(1)</STRONG>,   <STRONG>stty(1)</STRONG>,   <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>,   <STRONG>tty(4)</STRONG>,
        <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>, <STRONG>ttys(5)</STRONG>, <STRONG>environ(7)</STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161015).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20161022).
 
 
 
index baa88c884fead0694b5b4593355970b6ec7df4b5..31cf1989864724535dbc63fc783a8e661c93cd2e 100644 (file)
@@ -26,7 +26,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_inopts.3x,v 1.22 2016/10/15 17:13:45 tom Exp $
+.\" $Id: curs_inopts.3x,v 1.23 2016/10/22 19:54:35 tom Exp $
 .TH curs_inopts 3X ""
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
@@ -296,7 +296,7 @@ just after initialization, even if your program remains in cooked mode.
 When \fBkeypad\fP is first enabled,
 ncurses loads the key-definitions for the current terminal description.
 If the terminal description includes extended string capabilities,
-e.g., from using the \fB\-x\fP option of @TIC@,
+e.g., from using the \fB\-x\fP option of \fB@TIC@\fP,
 then ncurses also defines keys for the capabilities whose names
 begin with "k".
 The corresponding keycodes are generated and (depending on previous
index 49bd8701fad7b02739e2bc9643b892264d5ee030..ef47b7a2f4d854f5c574d862f3e62c28c1f01313 100644 (file)
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: infocmp.1m,v 1.58 2016/10/01 17:15:45 tom Exp $
+.\" $Id: infocmp.1m,v 1.59 2016/10/22 19:54:35 tom Exp $
 .TH @INFOCMP@ 1M ""
 .ds n 5
 .de bP
@@ -138,7 +138,7 @@ These should be edited by hand.
 For best results when converting to \fBtermcap\fP format,
 you should use both \fB\-C\fP and \fB\-r\fP.
 Normally a termcap description is limited to 1023 bytes.
-@INFOCMP@ trims away less essential parts to make it fit.
+\fB@INFOCMP@\fP trims away less essential parts to make it fit.
 If you are converting to one of the (rare) termcap implementations
 which accept an unlimited size of termcap,
 you may want to add the \fB\-T\fP option.
@@ -235,7 +235,7 @@ superfluous.
 were not needed.
 .SS Changing Databases [\-A \fIdirectory\fR] [\-B \fIdirectory\fR]
 Like other \fBncurses\fP utilities,
-@INFOCMP@ looks for the terminal descriptions in several places.
+\fB@INFOCMP@\fP looks for the terminal descriptions in several places.
 You can use the \fBTERMINFO\fP and \fBTERMINFO_DIRS\fP environment variables
 to override the compiled-in default list of places to search
 (see \fBcurses\fP(3X) for details).
index 7928113fcd36eb0656143ec222378600bed55dd8..938327d4431c85f30f8e1d3e886ab11bbcc4d871 100644 (file)
@@ -26,7 +26,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: tabs.1,v 1.13 2016/10/15 16:16:38 tom Exp $
+.\" $Id: tabs.1,v 1.14 2016/10/22 19:54:35 tom Exp $
 .TH @TABS@ 1 ""
 .ds n 5
 .de bP
@@ -133,7 +133,7 @@ This standard describes a \fB+m\fP option, to set a terminal's left-margin.
 Very few of the entries in the terminal database provide this capability.
 .bP
 There is no counterpart in X/Open Curses Issue 7 for this utility,
-unlike @TPUT@(1).
+unlike \fB@TPUT@(1)\fP.
 .PP
 The \fB\-d\fP (debug) and \fB\-n\fP (no-op) options are extensions not provided
 by other implementations.
index 8b50e9595202a81d5a75c178e95618b174d89b6b..311316f4f44dfe8a22e9786247f37304be16b1cd 100644 (file)
@@ -26,7 +26,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: term.5,v 1.23 2016/10/15 17:02:31 tom Exp $
+.\" $Id: term.5,v 1.24 2016/10/22 19:55:01 tom Exp $
 .TH term 5
 .ds n 5
 .ds d @TERMINFO@
@@ -73,10 +73,8 @@ The format has been chosen so that it will be the same on all hardware.
 An 8 or more bit byte is assumed, but no assumptions about byte ordering
 or sign extension are made.
 .PP
-The compiled file is created with the
-.B @TIC@
-program, and read by the routine
-.BR setupterm .
+The compiled file is created with the \fB@TIC@\fP program,
+and read by the routine \fBsetupterm\fP.
 The file is divided into six parts:
 the header,
 terminal names,
index 280aead0b71bb59fd86b4862f7f4672cfd30238f..02fe0bd0125de2b382c3109e656b805d4cda7ab0 100644 (file)
@@ -1,4 +1,4 @@
-.\" $Id: terminfo.tail,v 1.72 2016/10/15 18:34:58 tom Exp $
+.\" $Id: terminfo.tail,v 1.73 2016/10/22 19:56:17 tom Exp $
 .\" Beginning of terminfo.tail file
 .\" This file is part of ncurses.
 .\" See "terminfo.head" for copyright.
@@ -1082,8 +1082,7 @@ spaces when the terminal is powered up,
 the numeric parameter
 .B it
 is given, showing the number of spaces the tabs are set to.
-This is normally used by the
-.IR @TSET@
+This is normally used by the \fB@TSET@\fP
 command to determine whether to set the mode for hardware tab expansion,
 and whether to set the tab stops.
 If the terminal has tab stops that can be saved in non-volatile memory,
@@ -1103,9 +1102,7 @@ These strings are expected to set the terminal into modes consistent
 with the rest of the terminfo description.
 They are normally sent to the terminal, by the
 .I init
-option of the
-.IR @TPUT@
-program, each time the user logs in.
+option of the \fB@TPUT@\fP program, each time the user logs in.
 They will be printed in the following order:
 .RS
 .TP
index f8da1f2330c5628f1e37bb893cc73d69bb9d4d92..6aafe816534377410ea71711855d4565c9fdd42f 100644 (file)
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: tput.1,v 1.44 2016/08/20 23:40:31 tom Exp $
+.\" $Id: tput.1,v 1.46 2016/10/22 19:57:25 tom Exp $
 .TH @TPUT@ 1 ""
 .ds d @TERMINFO@
 .ds n 1
@@ -168,21 +168,25 @@ 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
 \fBterminfo\fR database [see \fBterm\fR(5)].
 .SS Aliases
-\fB@TPUT@\fR handles the \fBinit\fP and \fBreset\fP commands specially:
+\fB@TPUT@\fR handles the \fBclear\fP, \fBinit\fP and \fBreset\fP
+commands specially:
 it allows for the possibility that it is invoked by a link with those names.
 .PP
 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:
+The \fB@TSET@\fR(\*n) utility also treats a link named \fBreset\fP specially.
+.PP
+Before ncurses 6.1, the two utilities were different from each other:
 .bP
-That utility resets the terminal modes and special characters (not done here).
+\fB@TSET@\fP utility reset the terminal modes and special characters
+(not done with \fB@TPUT@\fP).
 .bP
-On the other hand, @TSET@'s repertoire of terminal capabilities for
-resetting the terminal is more limited, i.e., only \fBreset_1string\fP, \fBreset_2string\fP and \fBreset_file\fP
+On the other hand, \fB@TSET@\fP's repertoire of terminal capabilities for
+resetting the terminal was more limited, i.e., only \fBreset_1string\fP, \fBreset_2string\fP and \fBreset_file\fP
 in contrast to the tab-stops and margins which are set by this utility.
 .bP
-The \fBreset\fP program is usually an alias for @TSET@,
-due to the resetting of terminal modes and special characters.
+The \fBreset\fP program is usually an alias for \fB@TSET@\fP,
+because of this difference with resetting terminal modes and special characters.
 .PP
 If \fB@TPUT@\fR is invoked by a link named \fBinit\fR, this has the
 same effect as \fB@TPUT@ init\fR.
@@ -356,7 +360,7 @@ becoming the \*(lqmodern\*(rq BSD implementation of \fBtput\fP.
 This implementation of \fBtput\fP differs from AT&T \fBtput\fP in
 two important areas:
 .bP
-@TPUT@ \fIcapname\fP writes to the standard output.
+\fB@TPUT@\fP \fIcapname\fP writes to the standard output.
 That need not be a regular terminal.
 However, the subcommands which manipulate terminal modes
 may not use the standard output.
@@ -368,11 +372,12 @@ before falling back to \*(lq/dev/tty\*(rq and finally just assumes
 a 1200Bd terminal.
 When updating terminal modes, it ignores errors.
 .IP
-Until changes made after ncurses 6.0, @TPUT@ did not modify terminal modes.
-@TPUT@ now uses a similar scheme, using functions shared with @TSET@
+Until changes made after ncurses 6.0, \fB@TPUT@\fP did not modify terminal modes.
+\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,
-@TPUT@ will return an error.
+\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.
index 87da00ad6a1378500b2d7dbd633a5117de52385a..5c81d34c0c88e4f74a3b0fbf835f2ab8eb37d2d5 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20161015) unstable; urgency=low
+ncurses6 (6.0+20161022) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 15 Oct 2016 11:43:49 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Fri, 21 Oct 2016 18:47:18 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 87da00ad6a1378500b2d7dbd633a5117de52385a..5c81d34c0c88e4f74a3b0fbf835f2ab8eb37d2d5 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20161015) unstable; urgency=low
+ncurses6 (6.0+20161022) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 15 Oct 2016 11:43:49 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Fri, 21 Oct 2016 18:47:18 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index c6b1f9f182cca8b328451555ac597666eadfbc09..80827c81c642b95cacfe9f58fa17e92c563871b5 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20161015) unstable; urgency=low
+ncurses6 (6.0+20161022) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 15 Oct 2016 11:43:49 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Fri, 21 Oct 2016 18:47:18 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 3f3aad2fda484c7b1d6fe18df4cadb24f9fb994d..9db828eeb751889fbcba84f1f8d3fdee56e1baf8 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.180 2016/10/15 15:43:49 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.181 2016/10/21 22:47:18 tom Exp $\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"\r
 !define VERSION_MINOR "0"\r
 !define VERSION_YYYY  "2016"\r
-!define VERSION_MMDD  "1015"\r
+!define VERSION_MMDD  "1022"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index a8a11c91815e39dfd3eae33d6970782efbaed73b..bf5ad5add887af228ce285044ddd7adb982e6a40 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.0
-Release: 20161015
+Release: 20161022
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index f863fc42b4974ab51ab0c2426dbfd0bb9ded7b3b..96d4bca265a461c8004c15f212e4c400ad3cfa9f 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.0
-Release: 20161015
+Release: 20161022
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 4b16e5a5020d1f2f284b0f7c3ac90b5116fca596..7de8c9e5eaff3f7a6eb732210f9aaea05016261f 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.97 2016/08/06 13:25:38 tom Exp $
+# $Id: Makefile.in,v 1.99 2016/10/22 00:13:20 tom Exp $
 ##############################################################################
 # Copyright (c) 1998-2015,2016 Free Software Foundation, Inc.                #
 #                                                                            #
@@ -179,6 +179,7 @@ actual_tset      = `echo tset$x|      $(TRANSFORM)`
 
 # transformed names for comparing at runtime
 define_captoinfo = `echo captoinfo|   $(TRANSFORM)`
+define_clear     = `echo clear|       $(TRANSFORM)`
 define_infotocap = `echo infotocap|   $(TRANSFORM)`
 define_init      = `echo init|        $(TRANSFORM)`
 define_reset     = `echo reset|       $(TRANSFORM)`
@@ -191,6 +192,7 @@ transform.h :
        -$(SHELL) -c 'if test -n "$x" ; then echo "#define SUFFIX_IGNORED \"$x\"">>$@; fi'
        echo "#define PROG_CAPTOINFO \"$(define_captoinfo)\""           >>$@
        echo "#define PROG_INFOTOCAP \"$(define_infotocap)\""           >>$@
+       echo "#define PROG_CLEAR     \"$(define_clear)\""               >>$@
        echo "#define PROG_RESET     \"$(define_reset)\""               >>$@
        echo "#define PROG_INIT      \"$(define_init)\""                >>$@
        echo "#endif /* __TRANSFORM_H */"                               >>$@
@@ -248,7 +250,8 @@ toe$x: $(DEPS_TOE) $(DEPS_CURSES)
        @ECHO_LD@ $(LINK) $(DEPS_TOE) $(LDFLAGS_TIC) -o $@
 
 DEPS_CLEAR = \
-       $(MODEL)/clear$o
+       $(MODEL)/clear$o \
+       $(MODEL)/clear_cmd$o
 
 clear$x: $(DEPS_CLEAR) $(DEPS_CURSES)
        @ECHO_LD@ $(LINK) $(DEPS_CLEAR) $(LDFLAGS_TINFO) -o $@
@@ -261,6 +264,7 @@ tabs$x: $(DEPS_TABS) $(DEPS_TABS)
 
 DEPS_TPUT = \
        $(MODEL)/tput$o \
+       $(MODEL)/clear_cmd$o \
        $(MODEL)/reset_cmd$o \
        $(MODEL)/tparm_type$o \
        $(MODEL)/transform$o
index 4ac503ed3641570468eac4a4e00bab24ecc74400..e9203a29e95fff901dcca02ecd64909313a1bfd9 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2007,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2016 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            *
  * clear.c --  clears the terminal's screen
  */
 
-#define USE_LIBTINFO
-#include <progs.priv.h>
+#define USE_LIBTINFO 1
+#include <clear_cmd.h>
 
-MODULE_ID("$Id: clear.c,v 1.13 2013/06/22 22:20:54 tom Exp $")
-
-static int
-putch(int c)
-{
-    return putchar(c);
-}
+MODULE_ID("$Id: clear.c,v 1.15 2016/10/23 00:36:36 tom Exp $")
 
 int
 main(
        int argc GCC_UNUSED,
        char *argv[]GCC_UNUSED)
 {
-    char *E3;
-
     setupterm((char *) 0, STDOUT_FILENO, (int *) 0);
 
-    /* Clear the scrollback buffer if possible. */
-    E3 = tigetstr("E3");
-    if (E3)
-       (void) tputs(E3, lines > 0 ? lines : 1, putch);
-
-    ExitProgram((tputs(clear_screen, lines > 0 ? lines : 1, putch) == ERR)
+    ExitProgram((clear_cmd() == ERR)
                ? EXIT_FAILURE
                : EXIT_SUCCESS);
 }
diff --git a/progs/clear_cmd.c b/progs/clear_cmd.c
new file mode 100644 (file)
index 0000000..07d5636
--- /dev/null
@@ -0,0 +1,59 @@
+/****************************************************************************
+ * Copyright (c) 2016 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            *
+ * "Software"), to deal in the Software without restriction, including      *
+ * without limitation the rights to use, copy, modify, merge, publish,      *
+ * distribute, distribute with modifications, sublicense, and/or sell       *
+ * copies of the Software, and to permit persons to whom the Software is    *
+ * furnished to do so, subject to the following conditions:                 *
+ *                                                                          *
+ * The above copyright notice and this permission notice shall be included  *
+ * in all copies or substantial portions of the Software.                   *
+ *                                                                          *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
+ *                                                                          *
+ * Except as contained in this notice, the name(s) of the above copyright   *
+ * holders shall not be used in advertising or otherwise to promote the     *
+ * sale, use or other dealings in this Software without prior written       *
+ * authorization.                                                           *
+ ****************************************************************************/
+
+/****************************************************************************
+ *  Author: Thomas E. Dickey                                                *
+ ****************************************************************************/
+
+/*
+ * clear.c --  clears the terminal's screen
+ */
+
+#define USE_LIBTINFO
+#include <clear_cmd.h>
+
+MODULE_ID("$Id: clear_cmd.c,v 1.1 2016/10/21 23:37:35 tom Exp $")
+
+static int
+putch(int c)
+{
+    return putchar(c);
+}
+
+int
+clear_cmd(void)
+{
+    char *E3;
+
+    /* Clear the scrollback buffer if possible. */
+    E3 = tigetstr("E3");
+    if (E3)
+       (void) tputs(E3, lines > 0 ? lines : 1, putch);
+
+    return tputs(clear_screen, lines > 0 ? lines : 1, putch);
+}
diff --git a/progs/clear_cmd.h b/progs/clear_cmd.h
new file mode 100644 (file)
index 0000000..28b7e7f
--- /dev/null
@@ -0,0 +1,44 @@
+/****************************************************************************
+ * Copyright (c) 2016 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            *
+ * "Software"), to deal in the Software without restriction, including      *
+ * without limitation the rights to use, copy, modify, merge, publish,      *
+ * distribute, distribute with modifications, sublicense, and/or sell       *
+ * copies of the Software, and to permit persons to whom the Software is    *
+ * furnished to do so, subject to the following conditions:                 *
+ *                                                                          *
+ * The above copyright notice and this permission notice shall be included  *
+ * in all copies or substantial portions of the Software.                   *
+ *                                                                          *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
+ *                                                                          *
+ * Except as contained in this notice, the name(s) of the above copyright   *
+ * holders shall not be used in advertising or otherwise to promote the     *
+ * sale, use or other dealings in this Software without prior written       *
+ * authorization.                                                           *
+ ****************************************************************************/
+
+/****************************************************************************
+ *  Author: Thomas E. Dickey                                                *
+ ****************************************************************************/
+
+/*
+ * $Id: clear_cmd.h,v 1.1 2016/10/21 23:29:04 tom Exp $
+ *
+ * Utility functions for clearing terminal.
+ */
+#ifndef CLEAR_CMD_H
+#define CLEAR_CMD_H 1
+
+#include <progs.priv.h>
+extern int clear_cmd(void);
+
+#endif /* CLEAR_CMD_H */
index 6423b44d5ddaca49a6088c52a50979f8394976f8..f84d5df271915b1c0226961ee2928b16de806909 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: modules,v 1.19 2016/08/06 16:52:30 tom Exp $
+# $Id: modules,v 1.20 2016/10/21 23:15:41 tom Exp $
 # Program modules (some are in ncurses lib!)
 ##############################################################################
 # Copyright (c) 1998-2014,2016 Free Software Foundation, Inc.                #
@@ -35,6 +35,7 @@
 clear          progs           $(srcdir)       $(HEADER_DEPS)
 tic            progs           $(srcdir)       $(HEADER_DEPS) transform.h $(srcdir)/dump_entry.h $(srcdir)/tparm_type.h
 toe            progs           $(srcdir)       $(HEADER_DEPS)             $(INCDIR)/hashed_db.h
+clear_cmd      progs           $(srcdir)       $(HEADER_DEPS) clear_cmd.h
 dump_entry     progs           $(srcdir)       $(HEADER_DEPS)             $(srcdir)/dump_entry.h ../include/parametrized.h $(INCDIR)/capdefaults.c termsort.c
 infocmp                progs           $(srcdir)       $(HEADER_DEPS)             $(srcdir)/dump_entry.h
 reset_cmd      progs           $(srcdir)       $(HEADER_DEPS) reset_cmd.h
index 09dba5e5bb8bad1a4699c460e94b0c45c408450f..e0831e273c55f8c61a88a39707ccdc5e3c0326e9 100644 (file)
@@ -51,7 +51,7 @@
 #include <sys/ptem.h>
 #endif
 
-MODULE_ID("$Id: reset_cmd.c,v 1.7 2016/09/10 20:49:10 tom Exp $")
+MODULE_ID("$Id: reset_cmd.c,v 1.9 2016/10/23 01:08:11 tom Exp $")
 
 /*
  * SCO defines TIOCGSIZE and the corresponding struct.  Other systems (SunOS,
@@ -661,18 +661,26 @@ update_tty_settings(TTY * old_settings, TTY * new_settings)
 }
 
 #if HAVE_SIZECHANGE
-/* Set window size if not set already */
+/*
+ * Set window size if not set already, but update our copy of the values if the
+ * size was set.
+ */
 void
-set_window_size(int fd, int high, int wide)
+set_window_size(int fd, short *high, short *wide)
 {
     STRUCT_WINSIZE win;
     (void) ioctl(fd, IOCTL_GET_WINSIZE, &win);
     if (WINSIZE_ROWS(win) == 0 &&
-       WINSIZE_COLS(win) == 0 &&
-       high > 0 && wide > 0) {
-       WINSIZE_ROWS(win) = (unsigned short) high;
-       WINSIZE_COLS(win) = (unsigned short) wide;
-       (void) ioctl(fd, IOCTL_SET_WINSIZE, &win);
+       WINSIZE_COLS(win) == 0) {
+       if (*high > 0 && *wide > 0) {
+           WINSIZE_ROWS(win) = (unsigned short) *high;
+           WINSIZE_COLS(win) = (unsigned short) *wide;
+           (void) ioctl(fd, IOCTL_SET_WINSIZE, &win);
+       }
+    } else if (WINSIZE_ROWS(win) > 0 &&
+              WINSIZE_COLS(win) > 0) {
+       *high = (short) WINSIZE_ROWS(win);
+       *wide = (short) WINSIZE_COLS(win);
     }
 }
 #endif
index 77f34a3bcc4a74354d3fa48d95b1d162a2dde7e9..19aee023c058754d4d02f4c8cdb458d05c5e3d4a 100644 (file)
@@ -31,7 +31,7 @@
  ****************************************************************************/
 
 /*
- * $Id: reset_cmd.h,v 1.5 2016/08/06 20:09:34 tom Exp $
+ * $Id: reset_cmd.h,v 1.6 2016/10/22 23:34:37 tom Exp $
  *
  * Utility functions for resetting terminal.
  */
@@ -58,7 +58,7 @@ extern void set_conversions(TTY * /* tty_settings */);
 extern void update_tty_settings(TTY * /* old_settings */, TTY * /* new_settings */);
 
 #if HAVE_SIZECHANGE
-extern void set_window_size(int /* fd */, int /* high */, int /* wide */);
+extern void set_window_size(int /* fd */, short * /* high */, short * /* wide */);
 #endif
 
 extern const char *_nc_progname;
index 8ff3be1ba57346943770dbec9de7df5a63b9aa38..b2d44f028d6baf04e402e734b6750405b386af40 100644 (file)
@@ -40,6 +40,7 @@
  */
 
 #include <tparm_type.h>
+#include <clear_cmd.h>
 #include <reset_cmd.h>
 
 #if !PURE_TERMINFO
@@ -48,7 +49,7 @@
 #endif
 #include <transform.h>
 
-MODULE_ID("$Id: tput.c,v 1.57 2016/08/20 21:46:31 tom Exp $")
+MODULE_ID("$Id: tput.c,v 1.63 2016/10/23 01:08:28 tom Exp $")
 
 #define PUTS(s)                fputs(s, stdout)
 
@@ -57,6 +58,7 @@ const char *_nc_progname = "tput";
 static char *prg_name;
 static bool is_init = FALSE;
 static bool is_reset = FALSE;
+static bool is_clear = FALSE;
 
 static void
 quit(int status, const char *fmt,...)
@@ -78,11 +80,21 @@ usage(void)
     ExitProgram(EXIT_FAILURE);
 }
 
-static void
-check_aliases(const char *name, bool program)
+static char *
+check_aliases(char *name, bool program)
 {
-    is_init = same_program(name, program ? PROG_INIT : "init");
-    is_reset = same_program(name, program ? PROG_RESET : "reset");
+    static char my_init[] = "init";
+    static char my_reset[] = "reset";
+    static char my_clear[] = "clear";
+
+    char *result = name;
+    if ((is_init = same_program(name, program ? PROG_INIT : my_init)))
+       result = my_init;
+    if ((is_reset = same_program(name, program ? PROG_RESET : my_reset)))
+       result = my_reset;
+    if ((is_clear = same_program(name, program ? PROG_CLEAR : my_clear)))
+       result = my_clear;
+    return result;
 }
 
 static int
@@ -114,9 +126,7 @@ tput_cmd(int argc, char *argv[])
     bool termcap = FALSE;
 #endif
 
-    if ((name = argv[0]) == 0)
-       name = "";
-    check_aliases(name, FALSE);
+    name = check_aliases(argv[0], FALSE);
     if (is_reset || is_init) {
        TTY mode, oldmode;
 
@@ -124,11 +134,16 @@ tput_cmd(int argc, char *argv[])
        int intrchar = -1;      /* new interrupt character */
        int tkillchar = -1;     /* new kill character */
 
-       (void) save_tty_settings(&mode);
+       int my_fd = save_tty_settings(&mode);
 
        reset_start(stdout, is_reset, is_init);
        reset_tty_settings(&mode);
 
+#if HAVE_SIZECHANGE
+       set_window_size(my_fd, &lines, &columns);
+#else
+       (void) my_fd;
+#endif
        set_control_chars(&mode, terasechar, intrchar, tkillchar);
        set_conversions(&mode);
        if (send_init_strings(&oldmode)) {
@@ -146,7 +161,9 @@ tput_cmd(int argc, char *argv[])
 #if !PURE_TERMINFO
   retry:
 #endif
-    if ((status = tigetflag(name)) != -1) {
+    if (strcmp(name, "clear") == 0) {
+       return clear_cmd();
+    } else if ((status = tigetflag(name)) != -1) {
        return exit_code(BOOLEAN, status);
     } else if ((status = tigetnum(name)) != CANCELLED_NUMERIC) {
        (void) printf("%d\n", status);
@@ -246,7 +263,7 @@ main(int argc, char **argv)
     char buf[BUFSIZ];
     int result = 0;
 
-    check_aliases(prg_name = _nc_rootname(argv[0]), TRUE);
+    prg_name = check_aliases(_nc_rootname(argv[0]), TRUE);
 
     term = getenv("TERM");
 
@@ -271,7 +288,7 @@ main(int argc, char **argv)
     /*
      * Modify the argument list to omit the options we processed.
      */
-    if (is_reset || is_init) {
+    if (is_clear || is_reset || is_init) {
        if (optind-- < argc) {
            argc -= optind;
            argv += optind;
@@ -289,7 +306,7 @@ main(int argc, char **argv)
        quit(3, "unknown terminal \"%s\"", term);
 
     if (cmdline) {
-       if ((argc <= 0) && !is_reset && !is_init)
+       if ((argc <= 0) && !(is_clear || is_reset || is_init))
            usage();
        ExitProgram(tput_cmd(argc, argv));
     }
index 8b96838e3fa04d83820d818c5d01803126db2b01..f21cb6d731f330948a9703b0c1c543ac33731ec7 100644 (file)
@@ -96,7 +96,7 @@
 char *ttyname(int fd);
 #endif
 
-MODULE_ID("$Id: tset.c,v 1.112 2016/09/10 23:33:10 tom Exp $")
+MODULE_ID("$Id: tset.c,v 1.113 2016/10/22 23:34:47 tom Exp $")
 
 #ifndef environ
 extern char **environ;
@@ -844,7 +844,7 @@ main(int argc, char **argv)
     if (!noset) {
 #if HAVE_SIZECHANGE
        if (opt_w) {
-           set_window_size(my_fd, lines, columns);
+           set_window_size(my_fd, &lines, &columns);
        }
 #endif
        if (opt_c) {