# ncurses 6.0 - patch 20161022 - Thomas E. Dickey # # ------------------------------------------------------------------------------ # # Ncurses 6.0 is at # ftp.gnu.org:/pub/gnu # # Patches for ncurses 6.0 can be found at # ftp://invisible-island.net/ncurses/6.0 # http://invisible-mirror.net/archives/ncurses/6.0 # # ------------------------------------------------------------------------------ # ftp://invisible-island.net/ncurses/6.0/ncurses-6.0-20161022.patch.gz # patch by Thomas E. Dickey # created Sun Oct 23 01:59:31 UTC 2016 # ------------------------------------------------------------------------------ # MANIFEST | 6 # NEWS | 14 # VERSION | 2 # dist.mk | 4 # doc/html/man/captoinfo.1m.html | 2 # doc/html/man/clear.1.html | 2 # doc/html/man/curs_inopts.3x.html | 4 # doc/html/man/form.3x.html | 2 # doc/html/man/infocmp.1m.html | 8 # doc/html/man/infotocap.1m.html | 2 # doc/html/man/menu.3x.html | 2 # doc/html/man/ncurses.3x.html | 2 # doc/html/man/panel.3x.html | 2 # doc/html/man/tabs.1.html | 6 # doc/html/man/term.5.html | 2 # doc/html/man/terminfo.5.html | 8 # doc/html/man/tic.1m.html | 2 # doc/html/man/toe.1m.html | 2 # doc/html/man/tput.1.html | 207 +++++------ # doc/html/man/tset.1.html | 2 # man/curs_inopts.3x | 4 # man/infocmp.1m | 6 # man/tabs.1 | 4 # man/term.5 | 8 # man/terminfo.tail | 9 # man/tput.1 | 29 - # ncurses-6.0-20161022/doc/html/man/adacurses6-config.1.html | 151 ++++++++ # ncurses-6.0-20161022/doc/html/man/ncurses6-config.1.html | 133 +++++++ # ncurses-6.0-20161022/progs/clear_cmd.c | 59 +++ # ncurses-6.0-20161022/progs/clear_cmd.h | 44 ++ # package/debian-mingw/changelog | 4 # package/debian-mingw64/changelog | 4 # package/debian/changelog | 4 # package/mingw-ncurses.nsi | 4 # package/mingw-ncurses.spec | 2 # package/ncurses.spec | 2 # progs/Makefile.in | 8 # progs/clear.c | 23 - # progs/modules | 3 # progs/reset_cmd.c | 24 - # progs/reset_cmd.h | 4 # progs/tput.c | 43 +- # progs/tset.c | 4 # 43 files changed, 639 insertions(+), 218 deletions(-) # ------------------------------------------------------------------------------ # Please remove the following files before applying this patch. # (You can feed this patch to 'sh' to do so.) rm -f doc/html/man/adacurses-config.1.html rm -f doc/html/man/ncurses5-config.1.html exit Index: MANIFEST --- ncurses-6.0-20161015+/MANIFEST 2016-09-18 00:39:59.000000000 +0000 +++ ncurses-6.0-20161022/MANIFEST 2016-10-22 20:16:37.000000000 +0000 @@ -342,7 +342,7 @@ ./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 @@ -463,7 +463,7 @@ ./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 @@ -1047,6 +1047,8 @@ ./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 Index: NEWS Prereq: 1.2682 --- ncurses-6.0-20161015+/NEWS 2016-10-15 23:26:53.000000000 +0000 +++ ncurses-6.0-20161022/NEWS 2016-10-23 00:03:47.000000000 +0000 @@ -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 @@ 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 Index: VERSION --- ncurses-6.0-20161015+/VERSION 2016-10-15 15:43:49.000000000 +0000 +++ ncurses-6.0-20161022/VERSION 2016-10-21 22:47:18.000000000 +0000 @@ -1 +1 @@ -5:0:9 6.0 20161015 +5:0:9 6.0 20161022 Index: dist.mk Prereq: 1.1128 --- ncurses-6.0-20161015+/dist.mk 2016-10-15 15:43:49.000000000 +0000 +++ ncurses-6.0-20161022/dist.mk 2016-10-21 22:47:18.000000000 +0000 @@ -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 @@ # 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) Index: doc/html/man/adacurses6-config.1.html --- /dev/null 2016-10-22 18:36:25.655999441 +0000 +++ ncurses-6.0-20161022/doc/html/man/adacurses6-config.1.html 2016-10-22 20:13:52.000000000 +0000 @@ -0,0 +1,151 @@ + + + + + + +ADACURSES 1 User Commands + + + + +

ADACURSES 1 User Commands

+
+ADACURSES(1)                 User Commands                 ADACURSES(1)
+
+
+
+
+

NAME

+       adacurses-config - helper script for AdaCurses libraries
+
+
+

SYNOPSIS

+       adacurses-config [options]
+
+
+

DESCRIPTION

+       This  is  a  shell  script which simplifies configuring an
+       application  to  use  the  AdaCurses  library  binding  to
+       ncurses.
+
+
+

OPTIONS

+       --cflags
+              echos  the gnat (Ada compiler) flags needed to com-
+              pile with AdaCurses.
+
+       --libs echos  the  gnat  libraries  needed  to  link  with
+              AdaCurses.
+
+       --version
+              echos  the release+patchdate version of the ncurses
+              libraries used to configure and build AdaCurses.
+
+       --help prints a  list  of  the  adacurses-config  script's
+              options.
+
+       If  no options are given, adacurses-config prints the com-
+       bination of --cflags and --libs that gnatmake expects (see
+       example).
+
+
+

EXAMPLE

+       For example, supposing that you want to compile the "Hello
+       World!"   program  for  AdaCurses.   Make  a  file   named
+       "hello.adb":
+              with Terminal_Interface.Curses; use Terminal_Interface.Curses;
+
+              procedure Hello is
+
+                 Visibility : Cursor_Visibility := Invisible;
+                 done : Boolean := False;
+                 c : Key_Code;
+
+              begin
+
+                 Init_Screen;
+                 Set_Echo_Mode (False);
+
+                 Set_Cursor_Visibility (Visibility);
+                 Set_Timeout_Mode (Standard_Window, Non_Blocking, 0);
+
+                 Move_Cursor (Line => Lines / 2, Column => (Columns - 12) / 2);
+                 Add (Str => "Hello World!");
+
+                 while not done loop
+
+                    c := Get_Keystroke (Standard_Window);
+                    case c is
+                    when Character'Pos ('q') => done := True;
+                    when others => null;
+                    end case;
+
+                    Nap_Milli_Seconds (50);
+
+                 end loop;
+
+                 End_Windows;
+
+              end Hello;
+
+       Then, using
+              gnatmake  `adacurses-config  --cflags` hello -largs
+              `adacurses-config --libs`
+
+       or (simpler):
+              gnatmake hello `adacurses-config`
+
+       you will compile and link the program.
+
+
+

SEE ALSO

+       curses(3x)
+
+       This describes ncurses version 6.0 (patch 20161022).
+
+
+
+                                                           ADACURSES(1)
+
+ + + Index: doc/html/man/captoinfo.1m.html --- ncurses-6.0-20161015+/doc/html/man/captoinfo.1m.html 2016-10-15 23:12:19.000000000 +0000 +++ ncurses-6.0-20161022/doc/html/man/captoinfo.1m.html 2016-10-22 20:13:52.000000000 +0000 @@ -198,7 +198,7 @@

SEE ALSO

        infocmp(1m), curses(3x), terminfo(5)
 
-       This describes ncurses version 6.0 (patch 20161015).
+       This describes ncurses version 6.0 (patch 20161022).
 
 
 

AUTHOR

Index: doc/html/man/clear.1.html
--- ncurses-6.0-20161015+/doc/html/man/clear.1.html	2016-10-15 23:12:19.000000000 +0000
+++ ncurses-6.0-20161022/doc/html/man/clear.1.html	2016-10-22 20:13:52.000000000 +0000
@@ -67,7 +67,7 @@
 

SEE ALSO

        tput(1), terminfo(5)
 
-       This describes ncurses version 6.0 (patch 20161015).
+       This describes ncurses version 6.0 (patch 20161022).
 
 
 
Index: doc/html/man/curs_inopts.3x.html
--- ncurses-6.0-20161015+/doc/html/man/curs_inopts.3x.html	2016-10-15 23:12:20.000000000 +0000
+++ ncurses-6.0-20161022/doc/html/man/curs_inopts.3x.html	2016-10-22 20:13:53.000000000 +0000
@@ -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 @
 -->
 
 
@@ -257,7 +257,7 @@
        When keypad 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 -x option of tic, then ncurses also
+       e.g.,  from  using the -x option of tic, 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: doc/html/man/form.3x.html
--- ncurses-6.0-20161015+/doc/html/man/form.3x.html	2016-10-15 23:12:22.000000000 +0000
+++ ncurses-6.0-20161022/doc/html/man/form.3x.html	2016-10-22 20:13:54.000000000 +0000
@@ -235,7 +235,7 @@
        curses(3x) and related pages whose names begin "form_" for
        detailed descriptions of the entry points.
 
-       This describes ncurses version 6.0 (patch 20161015).
+       This describes ncurses version 6.0 (patch 20161022).
 
 
 
Index: doc/html/man/infocmp.1m.html
--- ncurses-6.0-20161015+/doc/html/man/infocmp.1m.html	2016-10-15 23:12:22.000000000 +0000
+++ ncurses-6.0-20161022/doc/html/man/infocmp.1m.html	2016-10-22 20:13:55.000000000 +0000
@@ -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 @
 -->
 
 
@@ -121,7 +121,7 @@
 
        For best results when converting to  termcap  format,  you
        should use both -C and -r.  Normally a termcap description
-       is limited to 1023 bytes.  infocmp trims away less  essen-
+       is limited to 1023 bytes.  infocmp 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 -T
@@ -216,7 +216,7 @@
        needed.
 
    Changing Databases [-A directory] [-B directory]
-       Like other ncurses utilities, infocmp looks for the termi-
+       Like other ncurses utilities, infocmp looks for the termi-
        nal descriptions in several places.  You can use the  TER-
        MINFO  and TERMINFO_DIRS environment variables to override
        the compiled-in default list  of  places  to  search  (see
@@ -478,7 +478,7 @@
 
        http://invisible-island.net/ncurses/tctest.html
 
-       This describes ncurses version 6.0 (patch 20161015).
+       This describes ncurses version 6.0 (patch 20161022).
 
 
 

AUTHOR

Index: doc/html/man/infotocap.1m.html
--- ncurses-6.0-20161015+/doc/html/man/infotocap.1m.html	2016-10-15 23:12:22.000000000 +0000
+++ ncurses-6.0-20161022/doc/html/man/infotocap.1m.html	2016-10-22 20:13:55.000000000 +0000
@@ -88,7 +88,7 @@
 

SEE ALSO

        curses(3x), tic(1m), infocmp(1m), terminfo(5)
 
-       This describes ncurses version 6.0 (patch 20161015).
+       This describes ncurses version 6.0 (patch 20161022).
 
 
 

AUTHOR

Index: doc/html/man/menu.3x.html
--- ncurses-6.0-20161015+/doc/html/man/menu.3x.html	2016-10-15 23:12:23.000000000 +0000
+++ ncurses-6.0-20161022/doc/html/man/menu.3x.html	2016-10-22 20:13:55.000000000 +0000
@@ -217,7 +217,7 @@
        curses(3x) and related pages whose names begin "menu_" for
        detailed descriptions of the entry points.
 
-       This describes ncurses version 6.0 (patch 20161015).
+       This describes ncurses version 6.0 (patch 20161022).
 
 
 
Index: doc/html/man/ncurses.3x.html
--- ncurses-6.0-20161015+/doc/html/man/ncurses.3x.html	2016-10-15 23:12:23.000000000 +0000
+++ ncurses-6.0-20161022/doc/html/man/ncurses.3x.html	2016-10-22 20:13:56.000000000 +0000
@@ -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
-       ncurses version 6.0 (patch 20161015).
+       ncurses version 6.0 (patch 20161022).
 
        The ncurses library emulates the curses library of  System
        V  Release  4  UNIX,  and  XPG4 (X/Open Portability Guide)
Index: doc/html/man/ncurses6-config.1.html
--- /dev/null	2016-10-22 18:36:25.655999441 +0000
+++ ncurses-6.0-20161022/doc/html/man/ncurses6-config.1.html	2016-10-22 20:13:56.000000000 +0000
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+ncurses6-config 1
+
+
+
+
+

ncurses6-config 1

+
+ncurses6-config(1)                                   ncurses6-config(1)
+
+
+
+
+

NAME

+       ncurses6-config - helper script for ncurses libraries
+
+
+

SYNOPSIS

+       ncurses6-config [options]
+
+
+

DESCRIPTION

+       This is a shell script which simplifies configuring appli-
+       cations against a particular set of ncurses libraries.
+
+
+

OPTIONS

+       --prefix
+              echos the package-prefix of ncurses
+
+       --exec-prefix
+              echos the executable-prefix of ncurses
+
+       --cflags
+              echos the C compiler flags needed to  compile  with
+              ncurses
+
+       --libs echos the libraries needed to link with ncurses
+
+       --version
+              echos the release+patchdate version of ncurses
+
+       --abi-version
+              echos the ABI version of ncurses
+
+       --mouse-version
+              echos the mouse-interface version of ncurses
+
+       --bindir
+              echos the directory containing ncurses programs
+
+       --datadir
+              echos the directory containing ncurses data
+
+       --includedir
+              echos the directory containing ncurses header files
+
+       --libdir
+              echos the directory containing ncurses libraries
+
+       --mandir
+              echos the directory containing ncurses manpages
+
+       --terminfo
+              echos the $TERMINFO terminfo database path, e.g.,
+              /usr/share/terminfo
+
+       --terminfo-dirs
+              echos the $TERMINFO_DIRS directory list, e.g.,
+              /usr/local/ncurses/share/terminfo:/usr/share/ter-
+              minfo
+
+       --termpath
+              echos the $TERMPATH termcap list,  if  support  for
+              termcap is configured.
+
+       --help prints this message
+
+
+

SEE ALSO

+       curses(3x)
+
+       This describes ncurses version 6.0 (patch 20161022).
+
+
+
+                                                     ncurses6-config(1)
+
+ + + Index: doc/html/man/panel.3x.html --- ncurses-6.0-20161015+/doc/html/man/panel.3x.html 2016-10-15 23:12:23.000000000 +0000 +++ ncurses-6.0-20161022/doc/html/man/panel.3x.html 2016-10-22 20:13:56.000000000 +0000 @@ -208,7 +208,7 @@

SEE ALSO

        curses(3x), curs_variables(3x),
 
-       This describes ncurses version 6.0 (patch 20161015).
+       This describes ncurses version 6.0 (patch 20161022).
 
 
 

AUTHOR

Index: doc/html/man/tabs.1.html
--- ncurses-6.0-20161015+/doc/html/man/tabs.1.html	2016-10-15 23:12:23.000000000 +0000
+++ ncurses-6.0-20161022/doc/html/man/tabs.1.html	2016-10-22 20:13:56.000000000 +0000
@@ -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 @
 -->
 
 
@@ -148,7 +148,7 @@
            terminal database provide this capability.
 
        o   There  is  no counterpart in X/Open Curses Issue 7 for
-           this utility, unlike tput(1).
+           this utility, unlike tput(1).
 
        The -d (debug) and -n (no-op) options are  extensions  not
        provided by other implementations.
@@ -164,7 +164,7 @@
 

SEE ALSO

        tset(1), infocmp(1m), curses(3x), terminfo(5).
 
-       This describes ncurses version 6.0 (patch 20161015).
+       This describes ncurses version 6.0 (patch 20161022).
 
 
 
Index: doc/html/man/term.5.html
--- ncurses-6.0-20161015+/doc/html/man/term.5.html	2016-10-15 23:12:24.000000000 +0000
+++ ncurses-6.0-20161022/doc/html/man/term.5.html	2016-10-22 20:13:56.000000000 +0000
@@ -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 @
 -->
 
 
Index: doc/html/man/terminfo.5.html
--- ncurses-6.0-20161015+/doc/html/man/terminfo.5.html	2016-10-15 23:12:24.000000000 +0000
+++ ncurses-6.0-20161022/doc/html/man/terminfo.5.html	2016-10-22 20:13:57.000000000 +0000
@@ -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 ncurses version 6.0 (patch 20161015).
+       This describes ncurses version 6.0 (patch 20161022).
 
        Entries in terminfo consist of a sequence of `,' separated
        fields (embedded commas may be escaped with a backslash or
@@ -1886,7 +1886,7 @@
        initially  set every n spaces when the terminal is powered
        up, the numeric parameter it is given, showing the  number
        of  spaces  the tabs are set to.  This is normally used by
-       the tset command to determine whether to set the mode  for
+       the tset 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
@@ -1899,7 +1899,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 init option
-       of  the  tput  program,  each time the user logs in.  They
+       of  the  tput  program,  each time the user logs in.  They
        will be printed in the following order:
 
               run the program
Index: doc/html/man/tic.1m.html
--- ncurses-6.0-20161015+/doc/html/man/tic.1m.html	2016-10-15 23:12:24.000000000 +0000
+++ ncurses-6.0-20161022/doc/html/man/tic.1m.html	2016-10-22 20:13:57.000000000 +0000
@@ -401,7 +401,7 @@
        infocmp(1m),   captoinfo(1m),   infotocap(1m),    toe(1m),
        curses(3x), term(5).  terminfo(5).
 
-       This describes ncurses version 6.0 (patch 20161015).
+       This describes ncurses version 6.0 (patch 20161022).
 
 
 

AUTHOR

Index: doc/html/man/toe.1m.html
--- ncurses-6.0-20161015+/doc/html/man/toe.1m.html	2016-10-15 23:12:24.000000000 +0000
+++ ncurses-6.0-20161022/doc/html/man/toe.1m.html	2016-10-22 20:13:57.000000000 +0000
@@ -117,7 +117,7 @@
        tic(1m),   infocmp(1m),   captoinfo(1m),    infotocap(1m),
        curses(3x), terminfo(5).
 
-       This describes ncurses version 6.0 (patch 20161015).
+       This describes ncurses version 6.0 (patch 20161022).
 
 
 
Index: doc/html/man/tput.1.html
--- ncurses-6.0-20161015+/doc/html/man/tput.1.html	2016-10-15 23:12:24.000000000 +0000
+++ ncurses-6.0-20161022/doc/html/man/tput.1.html	2016-10-22 20:13:57.000000000 +0000
@@ -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 @
 -->
 
 
@@ -170,43 +170,46 @@
 
 
 

Aliases

-       tput  handles  the  init  and reset commands specially: it
-       allows for the possibility that it is invoked  by  a  link
+       tput handles the clear, init and reset commands specially:
+       it allows for the possibility that it is invoked by a link
        with those names.
 
        If  tput  is  invoked  by a link named reset, this has the
        same effect as  tput  reset.   The  tset(1)  utility  also
-       treats a link named reset specially:
+       treats a link named reset specially.
 
-       o   That  utility  resets  the  terminal modes and special
-           characters (not done here).
+       Before  ncurses 6.1, the two utilities were different from
+       each other:
 
-       o   On the other hand, tset's repertoire of terminal capa-
-           bilities  for  resetting the terminal is more limited,
+       o   tset utility reset  the  terminal  modes  and  special
+           characters (not done with tput).
+
+       o   On the other hand, tset's repertoire of terminal capa-
+           bilities for resetting the terminal was more  limited,
            i.e., only reset_1string, reset_2string and reset_file
            in contrast to the tab-stops and margins which are set
            by this utility.
 
-       o   The reset program is usually an alias for tset, due to
-           the  resetting  of  terminal modes and special charac-
-           ters.
+       o   The  reset  program  is  usually  an  alias  for tset,
+           because of this  difference  with  resetting  terminal
+           modes and special characters.
 
        If tput is invoked by a link named init, this has the same
-       effect  as  tput  init.  Again, you are less likely to use
-       that link because another program named init  has  a  more
+       effect as tput init.  Again, you are less  likely  to  use
+       that  link  because  another program named init has a more
        well-established use.
 
 
 

EXAMPLES

        tput init
             Initialize the terminal according to the type of ter-
-            minal in the environmental variable TERM.  This  com-
-            mand  should be included in everyone's .profile after
+            minal  in the environmental variable TERM.  This com-
+            mand should be included in everyone's .profile  after
             the environmental variable TERM has been exported, as
             illustrated on the profile(5) manual page.
 
        tput -T5620 reset
-            Reset  an  AT&T 5620 terminal, overriding the type of
+            Reset an AT&T 5620 terminal, overriding the  type  of
             terminal in the environmental variable TERM.
 
        tput cup 0 0
@@ -227,16 +230,16 @@
        bold=`tput smso` offbold=`tput rmso`
             Set the shell variables bold, to begin stand-out mode
             sequence, and offbold, to end standout mode sequence,
-            for  the current terminal.  This might be followed by
-            a prompt: echo  "${bold}Please  type  in  your  name:
+            for the current terminal.  This might be followed  by
+            a  prompt:  echo  "${bold}Please  type  in your name:
             ${offbold}\c"
 
        tput hc
-            Set  exit code to indicate if the current terminal is
+            Set exit code to indicate if the current terminal  is
             a hard copy terminal.
 
        tput cup 23 4
-            Send the sequence to move the cursor to row 23,  col-
+            Send  the sequence to move the cursor to row 23, col-
             umn 4.
 
        tput cup
@@ -244,8 +247,8 @@
             parameters substituted.
 
        tput longname
-            Print the long name from the  terminfo  database  for
-            the  type  of terminal specified in the environmental
+            Print  the  long  name from the terminfo database for
+            the type of terminal specified in  the  environmental
             variable TERM.
 
             tput -S <<!
@@ -254,10 +257,10 @@
             > bold
             > !
 
-            This example shows tput 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 tput 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 (!) on a line by itself.
 
 
@@ -267,44 +270,44 @@
 
        /usr/share/tabset/*
               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 Tabs and Initialization, sec-
+              priate  to  be  output  to  the  terminal   (escape
+              sequences  that  set  margins  and  tabs); for more
+              information, see the Tabs and Initialization,  sec-
               tion of terminfo(5)
 
 
 

EXIT CODES

        If the -S option is used, tput 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 0.  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 0.   No  indication  of  which
        line failed can be given so exit code 1 will never appear.
-       Exit  codes 2, 3, and 4 retain their usual interpretation.
+       Exit codes 2, 3, and 4 retain their usual  interpretation.
        If the -S option is not used, the exit code depends on the
        type of capname:
 
           boolean
                  a value of 0 is set for TRUE and 1 for FALSE.
 
-          string a  value  of  0 is set if the capname is defined
-                 for this terminal type (the value of capname  is
-                 returned  on  standard  output); a value of 1 is
-                 set if capname is not defined for this  terminal
+          string a value of 0 is set if the  capname  is  defined
+                 for  this terminal type (the value of capname is
+                 returned on standard output); a value  of  1  is
+                 set  if capname is not defined for this terminal
                  type (nothing is written to standard output).
 
           integer
-                 a  value of 0 is always set, whether or not cap-
-                 name is defined  for  this  terminal  type.   To
-                 determine  if capname is defined for this termi-
-                 nal type, the user must test the  value  written
-                 to  standard  output.   A value of -1 means that
+                 a value of 0 is always set, whether or not  cap-
+                 name  is  defined  for  this  terminal type.  To
+                 determine if capname is defined for this  termi-
+                 nal  type,  the user must test the value written
+                 to standard output.  A value of  -1  means  that
                  capname is not defined for this terminal type.
 
-          other  reset or init may fail to find their  respective
-                 files.   In that case, the exit code is set to 4
+          other  reset  or init may fail to find their respective
+                 files.  In that case, the exit code is set to  4
                  + errno.
 
-       Any other exit code indicates an error; see  the  DIAGNOS-
+       Any  other  exit code indicates an error; see the DIAGNOS-
        TICS section.
 
 
@@ -314,8 +317,8 @@
 
        exit code   error message
        ---------------------------------------------------------------------
-       0           (capname is a numeric variable that is not specified  in
-                   the  terminfo(5)  database  for this terminal type, e.g.
+       0           (capname  is a numeric variable that is not specified in
+                   the terminfo(5) database for this  terminal  type,  e.g.
                    tput -T450 lines and tput -T2621 xmc)
        1           no error message is printed, see the EXIT CODES section.
        2           usage error
@@ -326,119 +329,119 @@
 
 
 

HISTORY

-       The tput command was begun by Bill Joy in 1980.  The  ini-
+       The  tput command was begun by Bill Joy in 1980.  The ini-
        tial version only cleared the screen.
 
-       AT&T  System  V  provided  a different tput command, whose
-       init and reset  subcommands (more than half  the  program)
+       AT&T System V provided a  different  tput  command,  whose
+       init  and  reset  subcommands (more than half the program)
        were incorporated from the reset feature of BSD tset writ-
-       ten by Eric Allman.  Later the corresponding  source  code
-       for  reset  was  removed  from the BSD tset (in June 1993,
+       ten  by  Eric Allman.  Later the corresponding source code
+       for reset was removed from the BSD  tset  (in  June  1993,
        released in 4.4BSD-Lite a year later).
 
-       Keith Bostic replaced the BSD tput command in 1989 with  a
-       new  implementation  based  on  the  AT&T System V program
-       tput.  Like the AT&T program,  Bostic's  version  accepted
-       some  parameters  named  for terminfo capabilities (clear,
-       init, longname and reset).  However (because he  had  only
-       termcap  available),  it  accepted termcap names for other
-       capabilities.  Also, Bostic's BSD tput did not modify  the
+       Keith  Bostic replaced the BSD tput command in 1989 with a
+       new implementation based on  the  AT&T  System  V  program
+       tput.   Like  the  AT&T program, Bostic's version accepted
+       some parameters named for  terminfo  capabilities  (clear,
+       init,  longname  and reset).  However (because he had only
+       termcap available), it accepted termcap  names  for  other
+       capabilities.   Also, Bostic's BSD tput did not modify the
        terminal I/O modes as the earlier BSD tset 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 tput 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 tput.
 
 
 

PORTABILITY

-       This  implementation of tput differs from AT&T tput in two
+       This implementation of tput differs from AT&T tput in  two
        important areas:
 
-       o   tput capname writes to the standard output.  That need
-           not  be  a regular terminal.  However, the subcommands
-           which manipulate terminal modes may not use the  stan-
+       o   tput capname 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&T implementation's init and reset commands use
+           The AT&T implementation's init and reset commands  use
            the BSD (4.1c) tset 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 tset).  If it is not able
-           to open a terminal, e.g., when running in  cron,  tput
+           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 tset).  If it is  not  able
+           to  open  a terminal, e.g., when running in cron, tput
            will return an error.
 
-       o   AT&T  tput guesses the type of its capname operands by
+       o   AT&T tput guesses the type of its capname operands  by
            seeing if all of the characters are numeric, or not.
 
            Most implementations which provide support for capname
-           operands  use  the tparm function to expand parameters
+           operands use the tparm function to  expand  parameters
            in it.  That function expects a mixture of numeric and
-           string  parameters,  requiring tput to know which type
+           string parameters, requiring tput 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 capname operands, and
-           an internal library function  to  analyze  nonstandard
+           an  internal  library  function to analyze nonstandard
            capname operands.
 
-       The  longname  and -S options, and the parameter-substitu-
-       tion features used in the cup example, were not  supported
-       in  BSD curses before 4.3reno (1989) or in AT&T/USL curses
+       The longname and -S options, and  the  parameter-substitu-
+       tion  features used in the cup example, were not supported
+       in BSD curses before 4.3reno (1989) or in AT&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 clear,
-       init and reset.  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  clear,
+       init  and reset.  There are a few interesting observations
        to make regarding that:
 
-       o   In  this  implementation, clear is part of the capname
+       o   In this implementation, clear is part of  the  capname
            support.  The others (init and longname) do not corre-
            spond to terminal capabilities.
 
-       o   Other  implementations  of  tput on SVr4-based systems
-           such as Solaris, IRIX64 and HPUX  as  well  as  others
-           such  as AIX and Tru64 provide support for capname op-
+       o   Other implementations of tput  on  SVr4-based  systems
+           such  as  Solaris,  IRIX64  and HPUX as well as others
+           such as AIX and Tru64 provide support for capname  op-
            erands.
 
-       o   A few platforms  such  as  FreeBSD  recognize  termcap
-           names  rather  than terminfo capability names in their
-           respective tput commands.  Since 2010,  NetBSD's  tput
-           uses  terminfo  names.  Before that, it (like FreeBSD)
+       o   A  few  platforms  such  as  FreeBSD recognize termcap
+           names rather than terminfo capability names  in  their
+           respective  tput  commands.  Since 2010, NetBSD's tput
+           uses terminfo names.  Before that, it  (like  FreeBSD)
            recognized termcap names.
 
-       Because (apparently) all of  the  certified  Unix  systems
-       support  the  full  set of capability names, the reasoning
+       Because  (apparently)  all  of  the certified Unix systems
+       support the full set of capability  names,  the  reasoning
        for documenting only a few may not be apparent.
 
        o   X/Open Curses Issue 7 documents tput differently, with
-           capname  and the other features used in this implemen-
+           capname and the other features used in this  implemen-
            tation.
 
-       o   That is, there are two standards for  tput:  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
+       o   That  is,  there  are two standards for tput: 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.
 
        o   While it is certainly possible to write a tput program
            without using curses, none of the systems which have a
-           curses implementation provide  a  tput  utility  which
+           curses  implementation  provide  a  tput utility which
            does not provide the capname feature.
 
 
 

SEE ALSO

-       clear(1),    stty(1),   tabs(1),   tset(1),   terminfo(5),
+       clear(1),   stty(1),   tabs(1),   tset(1),    terminfo(5),
        curs_termcap(3x).
 
-       This describes ncurses version 6.0 (patch 20161015).
+       This describes ncurses version 6.0 (patch 20161022).
 
 
 
Index: doc/html/man/tset.1.html
--- ncurses-6.0-20161015+/doc/html/man/tset.1.html	2016-10-15 23:12:24.000000000 +0000
+++ ncurses-6.0-20161022/doc/html/man/tset.1.html	2016-10-22 20:13:57.000000000 +0000
@@ -387,7 +387,7 @@
        csh(1),   sh(1),   stty(1),   curs_terminfo(3x),   tty(4),
        terminfo(5), ttys(5), environ(7)
 
-       This describes ncurses version 6.0 (patch 20161015).
+       This describes ncurses version 6.0 (patch 20161022).
 
 
 
Index: man/curs_inopts.3x
Prereq:  1.22 
--- ncurses-6.0-20161015+/man/curs_inopts.3x	2016-10-15 17:13:45.000000000 +0000
+++ ncurses-6.0-20161022/man/curs_inopts.3x	2016-10-22 19:54:35.000000000 +0000
@@ -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 @@
 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: man/infocmp.1m
Prereq:  1.58 
--- ncurses-6.0-20161015+/man/infocmp.1m	2016-10-01 17:15:45.000000000 +0000
+++ ncurses-6.0-20161022/man/infocmp.1m	2016-10-22 19:54:35.000000000 +0000
@@ -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 @@
 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 @@
 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: man/tabs.1
Prereq:  1.13 
--- ncurses-6.0-20161015+/man/tabs.1	2016-10-15 16:16:38.000000000 +0000
+++ ncurses-6.0-20161022/man/tabs.1	2016-10-22 19:54:35.000000000 +0000
@@ -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 @@
 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: man/term.5
Prereq:  1.23 
--- ncurses-6.0-20161015+/man/term.5	2016-10-15 17:02:31.000000000 +0000
+++ ncurses-6.0-20161022/man/term.5	2016-10-22 19:55:01.000000000 +0000
@@ -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 @@
 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: man/terminfo.tail
Prereq:  1.72 
--- ncurses-6.0-20161015+/man/terminfo.tail	2016-10-15 18:34:58.000000000 +0000
+++ ncurses-6.0-20161022/man/terminfo.tail	2016-10-22 19:56:17.000000000 +0000
@@ -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 @@
 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 @@
 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: man/tput.1
Prereq:  1.44 
--- ncurses-6.0-20161015+/man/tput.1	2016-08-20 23:40:31.000000000 +0000
+++ ncurses-6.0-20161022/man/tput.1	2016-10-22 19:57:25.000000000 +0000
@@ -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 @@
 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 @@
 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 @@
 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: package/debian-mingw/changelog
--- ncurses-6.0-20161015+/package/debian-mingw/changelog	2016-10-15 15:43:49.000000000 +0000
+++ ncurses-6.0-20161022/package/debian-mingw/changelog	2016-10-21 22:47:18.000000000 +0000
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20161015) unstable; urgency=low
+ncurses6 (6.0+20161022) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Sat, 15 Oct 2016 11:43:49 -0400
+ -- Thomas E. Dickey   Fri, 21 Oct 2016 18:47:18 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
Index: package/debian-mingw64/changelog
--- ncurses-6.0-20161015+/package/debian-mingw64/changelog	2016-10-15 15:43:49.000000000 +0000
+++ ncurses-6.0-20161022/package/debian-mingw64/changelog	2016-10-21 22:47:18.000000000 +0000
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20161015) unstable; urgency=low
+ncurses6 (6.0+20161022) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Sat, 15 Oct 2016 11:43:49 -0400
+ -- Thomas E. Dickey   Fri, 21 Oct 2016 18:47:18 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
Index: package/debian/changelog
--- ncurses-6.0-20161015+/package/debian/changelog	2016-10-15 15:43:49.000000000 +0000
+++ ncurses-6.0-20161022/package/debian/changelog	2016-10-21 22:47:18.000000000 +0000
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20161015) unstable; urgency=low
+ncurses6 (6.0+20161022) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Sat, 15 Oct 2016 11:43:49 -0400
+ -- Thomas E. Dickey   Fri, 21 Oct 2016 18:47:18 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
Index: package/mingw-ncurses.nsi
Prereq:  1.180 
--- ncurses-6.0-20161015+/package/mingw-ncurses.nsi	2016-10-15 15:43:49.000000000 +0000
+++ ncurses-6.0-20161022/package/mingw-ncurses.nsi	2016-10-21 22:47:18.000000000 +0000
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.180 2016/10/15 15:43:49 tom Exp $
+; $Id: mingw-ncurses.nsi,v 1.181 2016/10/21 22:47:18 tom Exp $
 
 ; TODO add examples
 ; TODO bump ABI to 6
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"
 !define VERSION_MINOR "0"
 !define VERSION_YYYY  "2016"
-!define VERSION_MMDD  "1015"
+!define VERSION_MMDD  "1022"
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
 
 !define MY_ABI   "5"
Index: package/mingw-ncurses.spec
--- ncurses-6.0-20161015+/package/mingw-ncurses.spec	2016-10-15 15:43:49.000000000 +0000
+++ ncurses-6.0-20161022/package/mingw-ncurses.spec	2016-10-21 22:47:18.000000000 +0000
@@ -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: package/ncurses.spec
--- ncurses-6.0-20161015+/package/ncurses.spec	2016-10-15 15:43:49.000000000 +0000
+++ ncurses-6.0-20161022/package/ncurses.spec	2016-10-21 22:47:18.000000000 +0000
@@ -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: progs/Makefile.in
Prereq:  1.97 
--- ncurses-6.0-20161015+/progs/Makefile.in	2016-08-06 13:25:38.000000000 +0000
+++ ncurses-6.0-20161022/progs/Makefile.in	2016-10-22 00:13:20.000000000 +0000
@@ -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 @@
 
 # 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 @@
 	-$(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 @@
 	@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 @@
 
 DEPS_TPUT = \
 	$(MODEL)/tput$o \
+	$(MODEL)/clear_cmd$o \
 	$(MODEL)/reset_cmd$o \
 	$(MODEL)/tparm_type$o \
 	$(MODEL)/transform$o
Index: progs/clear.c
Prereq:  1.13 
--- ncurses-6.0-20161015+/progs/clear.c	2013-06-22 22:20:54.000000000 +0000
+++ ncurses-6.0-20161022/progs/clear.c	2016-10-23 00:36:36.000000000 +0000
@@ -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            *
@@ -36,32 +36,19 @@
  * clear.c --  clears the terminal's screen
  */
 
-#define USE_LIBTINFO
-#include 
+#define USE_LIBTINFO 1
+#include 
 
-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);
 }
Index: progs/clear_cmd.c
--- /dev/null	2016-10-22 18:36:25.655999441 +0000
+++ ncurses-6.0-20161022/progs/clear_cmd.c	2016-10-21 23:37:35.000000000 +0000
@@ -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 
+
+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);
+}
Index: progs/clear_cmd.h
--- /dev/null	2016-10-22 18:36:25.655999441 +0000
+++ ncurses-6.0-20161022/progs/clear_cmd.h	2016-10-21 23:29:04.000000000 +0000
@@ -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 
+extern int clear_cmd(void);
+
+#endif /* CLEAR_CMD_H */
Index: progs/modules
Prereq:  1.19 
--- ncurses-6.0-20161015+/progs/modules	2016-08-06 16:52:30.000000000 +0000
+++ ncurses-6.0-20161022/progs/modules	2016-10-21 23:15:41.000000000 +0000
@@ -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: progs/reset_cmd.c
Prereq:  1.7 
--- ncurses-6.0-20161015+/progs/reset_cmd.c	2016-09-10 20:49:10.000000000 +0000
+++ ncurses-6.0-20161022/progs/reset_cmd.c	2016-10-23 01:08:11.000000000 +0000
@@ -51,7 +51,7 @@
 #include 
 #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 @@
 }
 
 #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: progs/reset_cmd.h
Prereq:  1.5 
--- ncurses-6.0-20161015+/progs/reset_cmd.h	2016-08-06 20:09:34.000000000 +0000
+++ ncurses-6.0-20161022/progs/reset_cmd.h	2016-10-22 23:34:37.000000000 +0000
@@ -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 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: progs/tput.c
Prereq:  1.57 
--- ncurses-6.0-20161015+/progs/tput.c	2016-08-20 21:46:31.000000000 +0000
+++ ncurses-6.0-20161022/progs/tput.c	2016-10-23 01:08:28.000000000 +0000
@@ -40,6 +40,7 @@
  */
 
 #include 
+#include 
 #include 
 
 #if !PURE_TERMINFO
@@ -48,7 +49,7 @@
 #endif
 #include 
 
-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 @@
 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 @@
     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 @@
     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 @@
 	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 @@
 #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 @@
     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 @@
     /*
      * 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 @@
 	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: progs/tset.c
Prereq:  1.112 
--- ncurses-6.0-20161015+/progs/tset.c	2016-09-10 23:33:10.000000000 +0000
+++ ncurses-6.0-20161022/progs/tset.c	2016-10-22 23:34:47.000000000 +0000
@@ -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 @@
     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) {