From 0485620c03e69b1b58a6b12e5e45c98415fc7575 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 20 Aug 2017 00:59:28 +0000 Subject: [PATCH] ncurses 6.0 - patch 20170819 + update "iterm" entry -TD + add "iterm2" entry (report by Leonardo Brondani Schenkel) -TD + regenerate llib-* files. + regenerate HTML manpages. + improve picsmap test-program: + reduce memory used for tsearch + add report in log file showing cumulative color coverage. + add -x option to clear/tput to make the E3 extension optional (cf: 20130622). + add options -T and -V to clear command for compatibility with tput. + add usage message to clear command (Debian #371855). + improve usage messages for tset and tput. + minor fixes to "RDGB" extension and reset_color_pairs(). --- NEWS | 17 +- VERSION | 2 +- dist.mk | 4 +- doc/html/man/adacurses6-config.1.html | 2 +- doc/html/man/captoinfo.1m.html | 9 +- doc/html/man/clear.1.html | 24 +- doc/html/man/form.3x.html | 2 +- doc/html/man/infocmp.1m.html | 5 +- doc/html/man/infotocap.1m.html | 5 +- doc/html/man/menu.3x.html | 2 +- doc/html/man/ncurses.3x.html | 70 ++- doc/html/man/ncurses6-config.1.html | 4 +- doc/html/man/panel.3x.html | 2 +- doc/html/man/tabs.1.html | 2 +- doc/html/man/term.5.html | 211 ++++--- doc/html/man/term.7.html | 85 +-- doc/html/man/terminfo.5.html | 13 +- doc/html/man/tic.1m.html | 217 +++---- doc/html/man/toe.1m.html | 4 +- doc/html/man/tput.1.html | 36 +- doc/html/man/tset.1.html | 4 +- man/clear.1 | 24 +- man/tput.1 | 28 +- misc/terminfo.src | 234 +++++-- ncurses/base/lib_color.c | 10 +- ncurses/llib-lncurses | 12 +- ncurses/llib-lncursest | 20 +- ncurses/llib-lncursestw | 38 +- ncurses/llib-lncursesw | 30 +- ncurses/llib-ltinfo | 4 +- ncurses/llib-ltinfot | 12 +- ncurses/llib-ltinfotw | 8 + 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/clear.c | 50 +- progs/clear_cmd.c | 16 +- progs/clear_cmd.h | 6 +- progs/tput.c | 34 +- progs/tset.c | 45 +- test/configure | 859 +++++++++++++------------- test/configure.in | 3 +- test/picsmap.c | 292 ++++++--- test/test.priv.h | 6 +- 47 files changed, 1483 insertions(+), 988 deletions(-) diff --git a/NEWS b/NEWS index a0bb102f..ccb3d108 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.2916 2017/08/13 00:24:51 tom Exp $ +-- $Id: NEWS,v 1.2920 2017/08/19 20:10:50 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,21 @@ 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. +20170819 + + update "iterm" entry -TD + + add "iterm2" entry (report by Leonardo Brondani Schenkel) -TD + + regenerate llib-* files. + + regenerate HTML manpages. + + improve picsmap test-program: + + reduce memory used for tsearch + + add report in log file showing cumulative color coverage. + + add -x option to clear/tput to make the E3 extension optional + (cf: 20130622). + + add options -T and -V to clear command for compatibility with tput. + + add usage message to clear command (Debian #371855). + + improve usage messages for tset and tput. + + minor fixes to "RDGB" extension and reset_color_pairs(). + 20170812 + improve description of -R option in infocmp manual page (report by Stephane Chazelas). diff --git a/VERSION b/VERSION index e1c16464..17b4fee9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:9 6.0 20170812 +5:0:9 6.0 20170819 diff --git a/dist.mk b/dist.mk index cc9852a9..d90f789d 100644 --- 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.1177 2017/08/08 00:34:11 tom Exp $ +# $Id: dist.mk,v 1.1178 2017/08/13 21:24:56 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 = 20170812 +NCURSES_PATCH = 20170819 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/doc/html/man/adacurses6-config.1.html b/doc/html/man/adacurses6-config.1.html index 554d478c..ab19d973 100644 --- a/doc/html/man/adacurses6-config.1.html +++ b/doc/html/man/adacurses6-config.1.html @@ -125,7 +125,7 @@

SEE ALSO

        curses(3x)
 
-       This describes ncurses version 6.0 (patch 20170812).
+       This describes ncurses version 6.0 (patch 20170819).
 
 
 
diff --git a/doc/html/man/captoinfo.1m.html b/doc/html/man/captoinfo.1m.html
index be5d6fe3..60aa2693 100644
--- a/doc/html/man/captoinfo.1m.html
+++ b/doc/html/man/captoinfo.1m.html
@@ -64,7 +64,7 @@
        the  filename  or entry.  If TERMCAP is a full pathname to a file, only
        the terminal whose name is specified in the environment  variable  TERM
        is  extracted  from  that file.  If the environment variable TERMCAP is
-       not set, then the file /usr/share/terminfo is read.
+       not set, then the file /usr/local/ncurses/lib/terminfo is read.
 
        -v   print out tracing information on standard  error  as  the  program
             runs.
@@ -80,7 +80,8 @@
 
 
 

FILES

-       /usr/share/terminfo Compiled terminal description database.
+       /usr/local/ncurses/lib/terminfo
+                           Compiled terminal description database.
 
 
 

TRANSLATIONS FROM NONSTANDARD CAPABILITIES

@@ -110,8 +111,8 @@
        PD       kN     XENIX   key_npage
        PN       po     XENIX   prtr_off
        PS       pf     XENIX   prtr_on
-       PU       kP     XENIX   key_ppage
 
+       PU       kP     XENIX   key_ppage
        RT       @8     XENIX   kent
        UP       ku     XENIX   kcuu1
        KA       k;     Tek     key_f10
@@ -190,7 +191,7 @@
 

SEE ALSO

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

AUTHOR

diff --git a/doc/html/man/clear.1.html b/doc/html/man/clear.1.html
index 97d4596e..2a21936a 100644
--- a/doc/html/man/clear.1.html
+++ b/doc/html/man/clear.1.html
@@ -1,6 +1,6 @@
 
@@ -52,7 +52,7 @@
 
 
 

SYNOPSIS

-       clear
+       clear [-Ttype] [-V] [-x]
 
 
 

DESCRIPTION

@@ -67,9 +67,18 @@
        screen),  and  later  cat  the  file to the screen, clearing it at that
        point.
 
-       clear ignores any command-line parameters that  may  be  present.   The
-       analogous  "tput  clear"  has  command-line parameters including -T for
-       overriding the TERM environment variable.
+
+

OPTIONS

+       -T type
+            indicates the type of terminal.  Normally this option is  unneces-
+            sary,  because  the default is taken from the environment variable
+            TERM.
+
+       -V   reports the version of ncurses which was used in this program, and
+            exits.  The options are as follows:
+
+       -x   do not attempt to clear the terminal's scrollback buffer using the
+            extended "E3" capability.
 
 
 

HISTORY

@@ -138,7 +147,7 @@
 

SEE ALSO

        tput(1), terminfo(5)
 
-       This describes ncurses version 6.0 (patch 20170812).
+       This describes ncurses version 6.0 (patch 20170819).
 
 
 
@@ -149,6 +158,7 @@
 
  • NAME
  • SYNOPSIS
  • DESCRIPTION
  • +
  • OPTIONS
  • HISTORY
  • PORTABILITY
  • SEE ALSO
  • diff --git a/doc/html/man/form.3x.html b/doc/html/man/form.3x.html index 39b92034..76f3376a 100644 --- a/doc/html/man/form.3x.html +++ b/doc/html/man/form.3x.html @@ -234,7 +234,7 @@ curses(3x) and related pages whose names begin "form_" for detailed descriptions of the entry points. - This describes ncurses version 6.0 (patch 20170812). + This describes ncurses version 6.0 (patch 20170819). diff --git a/doc/html/man/infocmp.1m.html b/doc/html/man/infocmp.1m.html index d4edb63e..ff6ea36a 100644 --- a/doc/html/man/infocmp.1m.html +++ b/doc/html/man/infocmp.1m.html @@ -449,7 +449,8 @@

    FILES

    -       /usr/share/terminfo Compiled terminal description database.
    +       /usr/local/ncurses/lib/terminfo
    +                           Compiled terminal description database.
     
     
     

    EXTENSIONS

    @@ -476,7 +477,7 @@
     
            http://invisible-island.net/ncurses/tctest.html
     
    -       This describes ncurses version 6.0 (patch 20170812).
    +       This describes ncurses version 6.0 (patch 20170819).
     
     
     

    AUTHOR

    diff --git a/doc/html/man/infotocap.1m.html b/doc/html/man/infotocap.1m.html
    index a0995cab..acd41ad6 100644
    --- a/doc/html/man/infotocap.1m.html
    +++ b/doc/html/man/infotocap.1m.html
    @@ -74,7 +74,8 @@
     
     
     

    FILES

    -       /usr/share/terminfo Compiled terminal description database.
    +       /usr/local/ncurses/lib/terminfo
    +                           Compiled terminal description database.
     
     
     

    NOTES

    @@ -85,7 +86,7 @@
     

    SEE ALSO

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

    AUTHOR

    diff --git a/doc/html/man/menu.3x.html b/doc/html/man/menu.3x.html
    index 29817399..d744b115 100644
    --- a/doc/html/man/menu.3x.html
    +++ b/doc/html/man/menu.3x.html
    @@ -210,7 +210,7 @@
            curses(3x) and related pages whose names  begin  "menu_"  for  detailed
            descriptions of the entry points.
     
    -       This describes ncurses version 6.0 (patch 20170812).
    +       This describes ncurses version 6.0 (patch 20170819).
     
     
     
    diff --git a/doc/html/man/ncurses.3x.html b/doc/html/man/ncurses.3x.html
    index 9a946e91..d92016ce 100644
    --- a/doc/html/man/ncurses.3x.html
    +++ b/doc/html/man/ncurses.3x.html
    @@ -59,7 +59,7 @@
            method of updating  character  screens  with  reasonable  optimization.
            This  implementation  is  "new  curses"  (ncurses)  and is the approved
            replacement for 4.4BSD classic curses,  which  has  been  discontinued.
    -       This describes ncurses version 6.0 (patch 20170812).
    +       This describes ncurses version 6.0 (patch 20170819).
     
            The  ncurses  library emulates the curses library of System V Release 4
            UNIX, and XPG4 (X/Open Portability Guide) curses  (also  known  as  XSI
    @@ -176,7 +176,7 @@
            standard  place.  For example, if TERM is set to att4424, then the com-
            piled terminal definition is found in
     
    -         /usr/share/terminfo/a/att4424.
    +         /usr/local/ncurses/lib/terminfo/a/att4424.
     
            (The a is copied from the first letter of att4424 to avoid creation  of
            huge  directories.)   However,  if  TERMINFO  is  set to $HOME/myterms,
    @@ -186,10 +186,10 @@
     
            and if that fails, it then checks
     
    -         /usr/share/terminfo/a/att4424.
    +         /usr/local/ncurses/lib/terminfo/a/att4424.
     
            This is useful for developing experimental definitions  or  when  write
    -       permission in /usr/share/terminfo is not available.
    +       permission in /usr/local/ncurses/lib/terminfo is not available.
     
            The integer variables LINES and COLS are defined in <curses.h> and will
            be filled in by initscr with the size of  the  screen.   The  constants
    @@ -1091,13 +1091,14 @@
                  o   /usr/local/ncurses/share/terminfo:/usr/share/terminfo (corre-
                      sponding to the TERMINFO_DIRS variable)
     
    -             o   /usr/share/terminfo (corresponding to the TERMINFO variable)
    +             o   /usr/local/ncurses/lib/terminfo  (corresponding  to  the TER-
    +                 MINFO variable)
     
     
     

    TERMINFO_DIRS

    -       Specifies  a  list  of  locations  to search for terminal descriptions.
    -       Each location in the list is a terminal database as  described  in  the
    -       section  on  the  TERMINFO  variable.   The list is separated by colons
    +       Specifies a list of locations  to  search  for  terminal  descriptions.
    +       Each  location  in  the list is a terminal database as described in the
    +       section on the TERMINFO variable.  The  list  is  separated  by  colons
            (i.e., ":") on Unix, semicolons on OS/2 EMX.
     
            There is no corresponding feature in System V terminfo; it is an exten-
    @@ -1105,11 +1106,11 @@
     
     
     

    TERMPATH

    -       If  TERMCAP  does not hold a file name then ncurses checks the TERMPATH
    -       environment variable.  This is a list of filenames separated by  spaces
    +       If TERMCAP does not hold a file name then ncurses checks  the  TERMPATH
    +       environment  variable.  This is a list of filenames separated by spaces
            or colons (i.e., ":") on Unix, semicolons on OS/2 EMX.
     
    -       If  the  TERMPATH environment variable is not set, ncurses looks in the
    +       If the TERMPATH environment variable is not set, ncurses looks  in  the
            files
     
              /etc/termcap, /usr/share/misc/termcap and $HOME/.termcap,
    @@ -1117,7 +1118,7 @@
            in that order.
     
            The library may be configured to disregard the following variables when
    -       the  current  user  is the superuser (root), or if the application uses
    +       the current user is the superuser (root), or if  the  application  uses
            setuid or setgid permissions:
     
              $TERMINFO, $TERMINFO_DIRS, $TERMPATH, as well as $HOME.
    @@ -1125,8 +1126,8 @@
     
     

    ALTERNATE CONFIGURATIONS

            Several different configurations are possible, depending on the config-
    -       ure  script  options  used when building ncurses.  There are a few main
    -       options whose effects are visible to the applications  developer  using
    +       ure script options used when building ncurses.  There are  a  few  main
    +       options  whose  effects are visible to the applications developer using
            ncurses:
     
            --disable-overwrite
    @@ -1134,19 +1135,19 @@
     
                   #include <curses.h>
     
    -            This  option  is  used to avoid filename conflicts when ncurses is
    +            This option is used to avoid filename conflicts  when  ncurses  is
                 not the main implementation of curses of the computer.  If ncurses
    -            is  installed disabling overwrite, it puts its headers in a subdi-
    +            is installed disabling overwrite, it puts its headers in a  subdi-
                 rectory, e.g.,
     
                   #include <ncurses/curses.h>
     
    -            It also omits a  symbolic  link  which  would  allow  you  to  use
    +            It  also  omits  a  symbolic  link  which  would  allow you to use
                 -lcurses to build executables.
     
            --enable-widec
    -            The  configure  script  renames  the  library  and  (if the --dis-
    -            able-overwrite option is used) puts the header files in a  differ-
    +            The configure script  renames  the  library  and  (if  the  --dis-
    +            able-overwrite  option is used) puts the header files in a differ-
                 ent subdirectory.  All of the library names have a "w" appended to
                 them, i.e., instead of
     
    @@ -1157,23 +1158,23 @@
                   -lncursesw
     
                 You must also define _XOPEN_SOURCE_EXTENDED when compiling for the
    -            wide-character  library to use the extended (wide-character) func-
    -            tions.  The curses.h file which is installed for the  wide-charac-
    +            wide-character library to use the extended (wide-character)  func-
    +            tions.   The curses.h file which is installed for the wide-charac-
                 ter library is designed to be compatible with the normal library's
    -            header.  Only the size of the WINDOW structure differs,  and  very
    -            few  applications  require more than a pointer to WINDOWs.  If the
    +            header.   Only  the size of the WINDOW structure differs, and very
    +            few applications require more than a pointer to WINDOWs.   If  the
                 headers  are  installed  allowing  overwrite,  the  wide-character
    -            library's  headers should be installed last, to allow applications
    +            library's headers should be installed last, to allow  applications
                 to be built using either library from the same set of headers.
     
            --with-pthread
    -            The configure script renames the  library.   All  of  the  library
    -            names  have  a  "t"  appended  to  them  (before  any "w" added by
    +            The  configure  script  renames  the  library.  All of the library
    +            names have a "t"  appended  to  them  (before  any  "w"  added  by
                 --enable-widec).
     
                 The global variables such as LINES are replaced by macros to allow
                 read-only access.  At the same time, setter-functions are provided
    -            to set these values.  Some applications  (very  few)  may  require
    +            to  set  these  values.   Some applications (very few) may require
                 changes to work with this convention.
     
            --with-shared
    @@ -1183,22 +1184,23 @@
            --with-debug
     
            --with-profile
    -            The  shared and normal (static) library names differ by their suf-
    -            fixes, e.g., libncurses.so and libncurses.a.  The debug  and  pro-
    -            filing  libraries  add a "_g" and a "_p" to the root names respec-
    +            The shared and normal (static) library names differ by their  suf-
    +            fixes,  e.g.,  libncurses.so and libncurses.a.  The debug and pro-
    +            filing libraries add a "_g" and a "_p" to the root  names  respec-
                 tively, e.g., libncurses_g.a and libncurses_p.a.
     
            --with-trace
    -            The trace function normally resides in the debug library,  but  it
    +            The  trace  function normally resides in the debug library, but it
                 is sometimes useful to configure this in the shared library.  Con-
    -            figure scripts should check for the  function's  existence  rather
    +            figure  scripts  should  check for the function's existence rather
                 than assuming it is always in the debug library.
     
     
     

    FILES

            /usr/share/tabset
    -            directory  containing  initialization files for the terminal capa-
    -            bility database /usr/share/terminfo terminal capability database
    +            directory containing initialization files for the  terminal  capa-
    +            bility  database /usr/local/ncurses/lib/terminfo terminal capabil-
    +            ity database
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/ncurses6-config.1.html b/doc/html/man/ncurses6-config.1.html
    index 5228b2f2..0716fb07 100644
    --- a/doc/html/man/ncurses6-config.1.html
    +++ b/doc/html/man/ncurses6-config.1.html
    @@ -96,7 +96,7 @@
     
            --terminfo
                   echos the $TERMINFO terminfo database path, e.g.,
    -              /usr/share/terminfo
    +              /usr/local/ncurses/lib/terminfo
     
            --terminfo-dirs
                   echos the $TERMINFO_DIRS directory list, e.g.,
    @@ -112,7 +112,7 @@
     

    SEE ALSO

            curses(3x)
     
    -       This describes ncurses version 6.0 (patch 20170812).
    +       This describes ncurses version 6.0 (patch 20170819).
     
     
     
    diff --git a/doc/html/man/panel.3x.html b/doc/html/man/panel.3x.html
    index 2c0eb3d9..aceb1b5f 100644
    --- a/doc/html/man/panel.3x.html
    +++ b/doc/html/man/panel.3x.html
    @@ -194,7 +194,7 @@
     

    SEE ALSO

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

    AUTHOR

    diff --git a/doc/html/man/tabs.1.html b/doc/html/man/tabs.1.html
    index 76574075..b5bc3ac0 100644
    --- a/doc/html/man/tabs.1.html
    +++ b/doc/html/man/tabs.1.html
    @@ -164,7 +164,7 @@
     

    SEE ALSO

            tset(1), infocmp(1m), curses(3x), terminfo(5).
     
    -       This describes ncurses version 6.0 (patch 20170812).
    +       This describes ncurses version 6.0 (patch 20170819).
     
     
     
    diff --git a/doc/html/man/term.5.html b/doc/html/man/term.5.html
    index 4d398c3f..6dacae61 100644
    --- a/doc/html/man/term.5.html
    +++ b/doc/html/man/term.5.html
    @@ -26,7 +26,7 @@
       * sale, use or other dealings in this Software without prior written       *
       * authorization.                                                           *
       ****************************************************************************
    -  * @Id: term.5,v 1.26 2017/02/18 16:58:21 tom Exp @
    +  * @Id: term.5,v 1.26.1.3 2017/05/27 23:28:31 tom Exp @
     -->
     
     
    @@ -57,44 +57,45 @@
     
     

    STORAGE LOCATION

            Compiled   terminfo   descriptions   are  placed  under  the  directory
    -       /usr/share/terminfo.  Two configurations are supported  (when  building
    -       the ncurses libraries):
    +       /usr/local/ncurses/lib/terminfo.   Two  configurations  are   supported
    +       (when building the ncurses libraries):
     
            directory tree
                 A two-level scheme is used to avoid a linear search of a huge UNIX
    -            system directory: /usr/share/terminfo/c/name  where  name  is  the
    -            name of the terminal, and c is the first character of name.  Thus,
    -            act4 can be found in the  file  /usr/share/terminfo/a/act4.   Syn-
    -            onyms  for  the same terminal are implemented by multiple links to
    -            the same compiled file.
    +            system  directory:  /usr/local/ncurses/lib/terminfo/c/name   where
    +            name  is the name of the terminal, and c is the first character of
    +            name.     Thus,    act4    can    be    found    in    the    file
    +            /usr/local/ncurses/lib/terminfo/a/act4.   Synonyms  for  the  same
    +            terminal are implemented by multiple links to  the  same  compiled
    +            file.
     
            hashed database
                 Using Berkeley database, two types of records are stored: the ter-
    -            minfo  data  in the same format as stored in a directory tree with
    -            the terminfo's primary name as a key, and records containing  only
    +            minfo data in the same format as stored in a directory  tree  with
    +            the  terminfo's primary name as a key, and records containing only
                 aliases pointing to the primary name.
     
    -            If  built  to  write hashed databases, ncurses can still read ter-
    -            minfo databases organized as a directory tree,  but  cannot  write
    -            entries  into  the  directory  tree.   It  can  write (or rewrite)
    +            If built to write hashed databases, ncurses can  still  read  ter-
    +            minfo  databases  organized  as a directory tree, but cannot write
    +            entries into the  directory  tree.   It  can  write  (or  rewrite)
                 entries in the hashed database.
     
    -            ncurses distinguishes the two  cases  in  the  TERMINFO  and  TER-
    -            MINFO_DIRS  environment  variable by assuming a directory tree for
    +            ncurses  distinguishes  the  two  cases  in  the TERMINFO and TER-
    +            MINFO_DIRS environment variable by assuming a directory  tree  for
                 entries that correspond to an existing directory, and hashed data-
                 base otherwise.
     
     
    -

    STORAGE FORMAT

    +

    LEGACY STORAGE FORMAT

            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  order-
    +       An  8 or more bit byte is assumed, but no assumptions about byte order-
            ing or sign extension are made.
     
            The compiled file is created with the tic program, and read by the rou-
    -       tine setupterm(3x).  The file is divided into six  parts:  the  header,
    +       tine  setupterm(3x).   The  file is divided into six parts: the header,
            terminal names, boolean flags, numbers, strings, and string table.
     
    -       The  header  section  begins the file.  This section contains six short
    +       The header section begins the file.  This section  contains  six  short
            integers in the format described below.  These integers are
     
                 (1) the magic number (octal 0432);
    @@ -109,62 +110,62 @@
     
                 (6) the size, in bytes, of the string table.
     
    -       Short integers are stored in two 8-bit bytes.  The first byte  contains
    +       Short  integers are stored in two 8-bit bytes.  The first byte contains
            the least significant 8 bits of the value, and the second byte contains
    -       the most significant 8 bits.  (Thus, the value represented is  256*sec-
    -       ond+first.)   The  value -1 is represented by the two bytes 0377, 0377;
    -       other negative values are illegal. This value generally means that  the
    +       the  most significant 8 bits.  (Thus, the value represented is 256*sec-
    +       ond+first.)  The value -1 is represented by the two bytes  0377,  0377;
    +       other  negative values are illegal. This value generally means that the
            corresponding capability is missing from this terminal.  Note that this
            format corresponds to the hardware of the VAX and PDP-11 (that is, lit-
    -       tle-endian  machines).   Machines where this does not correspond to the
    -       hardware must read the integers as two bytes and  compute  the  little-
    +       tle-endian machines).  Machines where this does not correspond  to  the
    +       hardware  must  read  the integers as two bytes and compute the little-
            endian value.
     
    -       The  terminal  names section comes next.  It contains the first line of
    -       the terminfo description, listing the various names for  the  terminal,
    -       separated  by  the  "|"  character.   The section is terminated with an
    +       The terminal names section comes next.  It contains the first  line  of
    +       the  terminfo  description, listing the various names for the terminal,
    +       separated by the "|" character.  The  section  is  terminated  with  an
            ASCII NUL character.
     
    -       The boolean flags have one byte for each flag.  This byte is  either  0
    -       or  1  as  the  flag is present or absent.  The capabilities are in the
    +       The  boolean  flags have one byte for each flag.  This byte is either 0
    +       or 1 as the flag is present or absent.  The  capabilities  are  in  the
            same order as the file <term.h>.
     
            Between the boolean section and the number section, a null byte will be
    -       inserted,  if necessary, to ensure that the number section begins on an
    +       inserted, if necessary, to ensure that the number section begins on  an
            even byte (this is a relic of the PDP-11's word-addressed architecture,
    -       originally  designed in to avoid IOT traps induced by addressing a word
    -       on an odd byte boundary).  All short integers are aligned  on  a  short
    +       originally designed in to avoid IOT traps induced by addressing a  word
    +       on  an  odd  byte boundary).  All short integers are aligned on a short
            word boundary.
     
    -       The  numbers  section is similar to the flags section.  Each capability
    +       The numbers section is similar to the flags section.   Each  capability
            takes up two bytes, and is stored as a little-endian short integer.  If
            the value represented is -1, the capability is taken to be missing.
     
    -       The  strings  section  is also similar.  Each capability is stored as a
    +       The strings section is also similar.  Each capability is  stored  as  a
            short integer, in the format above.  A value of -1 means the capability
            is missing.  Otherwise, the value is taken as an offset from the begin-
    -       ning of the string table.  Special characters in ^X or \c notation  are
    -       stored  in  their  interpreted  form,  not the printing representation.
    -       Padding information $<nn>  and  parameter  information  %x  are  stored
    +       ning  of the string table.  Special characters in ^X or \c notation are
    +       stored in their interpreted  form,  not  the  printing  representation.
    +       Padding  information  $<nn>  and  parameter  information  %x are stored
            intact in uninterpreted form.
     
    -       The  final  section is the string table.  It contains all the values of
    -       string capabilities referenced in the string section.  Each  string  is
    +       The final section is the string table.  It contains all the  values  of
    +       string  capabilities  referenced in the string section.  Each string is
            null terminated.
     
     
     

    EXTENDED STORAGE FORMAT

            The previous section describes the conventional terminfo binary format.
    -       With some minor variations of the offsets (see PORTABILITY),  the  same
    -       binary  format  is used in all modern UNIX systems.  Each system uses a
    +       With  some  minor variations of the offsets (see PORTABILITY), the same
    +       binary format is used in all modern UNIX systems.  Each system  uses  a
            predefined set of boolean, number or string capabilities.
     
            The ncurses libraries and applications support extended terminfo binary
    -       format,  allowing users to define capabilities which are loaded at run-
    +       format, allowing users to define capabilities which are loaded at  run-
            time.  This extension is made possible by using the fact that the other
    -       implementations  stop  reading the terminfo data when they have reached
    -       the end of the size given in the header.  ncurses checks the size,  and
    -       if  it  exceeds  that  due  to  the predefined data, continues to parse
    +       implementations stop reading the terminfo data when they  have  reached
    +       the  end of the size given in the header.  ncurses checks the size, and
    +       if it exceeds that due to  the  predefined  data,  continues  to  parse
            according to its own scheme.
     
            First, it reads the extended header (5 short integers):
    @@ -182,11 +183,32 @@
            Using the counts and sizes, ncurses allocates arrays and reads data for
            the extended capabilities in the same order as the header information.
     
    -       The  extended  string  table  contains  values for string capabilities.
    -       After the end of these values, it contains the names for  each  of  the
    -       extended  capabilities  in  order,  e.g.,  booleans,  then  numbers and
    +       The extended string table  contains  values  for  string  capabilities.
    +       After  the  end  of these values, it contains the names for each of the
    +       extended capabilities  in  order,  e.g.,  booleans,  then  numbers  and
            finally strings.
     
    +       Applications  which  manipulate  terminal  data can use the definitions
    +       described in term_variables(3x) which  associate  the  long  capability
    +       names with members of a TERMTYPE structure.
    +
    +
    +

    EXTENDED NUMBER FORMAT

    +       On occasion, 16-bit signed integers are not large enough.  With ncurses
    +       6.1, a new format is introduced by making a few changes to  the  legacy
    +       format:
    +
    +       o   a different magic number (0542)
    +
    +       o   changing  the type for the number array from signed 16-bit integers
    +           to signed 32-bit integers.
    +
    +       To maintain compatibility, the library presents the  same  data  struc-
    +       tures to direct users of the TERMTYPE structure as in previous formats.
    +       However, that cannot provide callers with the  extended  numbers.   The
    +       library  uses  a similar but hidden data structure TERMTYPE2 to provide
    +       data for the terminfo functions.
    +
     
     

    PORTABILITY

            Note that it is possible for setupterm to expect  a  different  set  of
    @@ -209,50 +231,66 @@
            terminfo(5)  for  detailed  discussion of terminfo source compatibility
            issues.
     
    +       Direct access to the TERMTYPE structure is provided for legacy applica-
    +       tions.   Portable  applications  should  use  the tigetflag and related
    +       functions described in curs_terminfo(3x) for reading terminal capabili-
    +       ties.
    +
     
     

    EXAMPLE

    -       As an example, here is a hex dump of  the  description  for  the  Lear-
    -       Siegler ADM-3, a popular though rather stupid early terminal:
    -
    -       adm3a|lsi adm3a,
    -               am,
    -               cols#80, lines#24,
    -               bel=^G, clear= 32$<1>, cr=^M, cub1=^H, cud1=^J,
    -               cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K,
    -               home=^^, ind=^J,
    -
    -       0000  1a 01 10 00 02 00 03 00  82 00 31 00 61 64 6d 33  ........ ..1.adm3
    -       0010  61 7c 6c 73 69 20 61 64  6d 33 61 00 00 01 50 00  a|lsi ad m3a...P.
    -       0020  ff ff 18 00 ff ff 00 00  02 00 ff ff ff ff 04 00  ........ ........
    -       0030  ff ff ff ff ff ff ff ff  0a 00 25 00 27 00 ff ff  ........ ..%.'...
    -       0040  29 00 ff ff ff ff 2b 00  ff ff 2d 00 ff ff ff ff  ).....+. ..-.....
    -       0050  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    -       0060  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    -       0070  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    -       0080  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    -       0090  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    -       00a0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    -       00b0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    -       00c0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    -       00d0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    -       00e0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    -       00f0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    -       0100  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    -       0110  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    -       0120  ff ff ff ff ff ff 2f 00  07 00 0d 00 1a 24 3c 31  ....../. .....$<1
    -       0130  3e 00 1b 3d 25 70 31 25  7b 33 32 7d 25 2b 25 63  >..=%p1% {32}%+%c
    -       0140  25 70 32 25 7b 33 32 7d  25 2b 25 63 00 0a 00 1e  %p2%{32} %+%c....
    -       0150  00 08 00 0c 00 0b 00 0a  00                       ........ .
    +       As an example, here is a description for the Lear-Siegler ADM-3, a pop-
    +       ular though rather stupid early terminal:
    +
    +         adm3a|lsi adm3a,
    +                 am,
    +                 cols#80, lines#24,
    +                 bel=^G, clear= 32$<1>, cr=^M, cub1=^H, cud1=^J,
    +                 cuf1=^L, cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K,
    +                 home=^^, ind=^J,
    +
    +
    +       and a hexadecimal dump of the compiled terminal description:
    +
    +         0000  1a 01 10 00 02 00 03 00  82 00 31 00 61 64 6d 33  ........ ..1.adm3
    +         0010  61 7c 6c 73 69 20 61 64  6d 33 61 00 00 01 50 00  a|lsi ad m3a...P.
    +         0020  ff ff 18 00 ff ff 00 00  02 00 ff ff ff ff 04 00  ........ ........
    +         0030  ff ff ff ff ff ff ff ff  0a 00 25 00 27 00 ff ff  ........ ..%.'...
    +         0040  29 00 ff ff ff ff 2b 00  ff ff 2d 00 ff ff ff ff  ).....+. ..-.....
    +         0050  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    +         0060  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    +         0070  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    +         0080  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    +         0090  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    +         00a0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    +         00b0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    +         00c0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    +         00d0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    +         00e0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    +         00f0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    +         0100  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    +         0110  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  ........ ........
    +         0120  ff ff ff ff ff ff 2f 00  07 00 0d 00 1a 24 3c 31  ....../. .....$<1
    +         0130  3e 00 1b 3d 25 70 31 25  7b 33 32 7d 25 2b 25 63  >..=%p1% {32}%+%c
    +         0140  25 70 32 25 7b 33 32 7d  25 2b 25 63 00 0a 00 1e  %p2%{32} %+%c....
    +         0150  00 08 00 0c 00 0b 00 0a  00                       ........ .
     
     
     
     

    LIMITS

    -       Some limitations: total compiled entries cannot exceed 4096 bytes.  The
    -       name field cannot exceed 128 bytes.
    +       Some limitations:
    +
    +       o   total compiled entries cannot exceed 4096 bytes in the legacy  for-
    +           mat.
    +
    +       o   total  compiled  entries  cannot exceed 32768 bytes in the extended
    +           format.
    +
    +       o   the name field cannot exceed 128 bytes.
     
     
     

    FILES

    -       /usr/share/terminfo/*/*  compiled terminal capability data base
    +       /usr/local/ncurses/lib/terminfo/*/*     compiled  terminal   capability
    +       data base
     
     
     

    SEE ALSO

    @@ -263,8 +301,10 @@
            Thomas E. Dickey
            extended terminfo format for ncurses 5.0
            hashed database support for ncurses 5.6
    +       extended number support for ncurses 6.1
     
            Eric S. Raymond
    +       documented legacy terminfo format, e.g., from pdcurses.
     
     
     
    @@ -277,8 +317,9 @@
     
  • DESCRIPTION
  • PORTABILITY
  • diff --git a/doc/html/man/term.7.html b/doc/html/man/term.7.html index 0d4ac03e..334d625b 100644 --- a/doc/html/man/term.7.html +++ b/doc/html/man/term.7.html @@ -84,8 +84,8 @@ line. Terminal type descriptions are stored as files of capability data - underneath /usr/share/terminfo. To browse a list of all terminal names - recognized by the system, do + underneath /usr/local/ncurses/lib/terminfo. To browse a list of all + terminal names recognized by the system, do toe | more @@ -97,61 +97,62 @@ infocmp entry_name where entry_name is the name of the type you wish to examine (and the - name of its capability file the subdirectory of /usr/share/terminfo - named for its first letter). This command dumps a capability file in - the text format described by terminfo(5). + name of its capability file the subdirectory of + /usr/local/ncurses/lib/terminfo named for its first letter). This com- + mand dumps a capability file in the text format described by ter- + minfo(5). - The first line of a terminfo(5) description gives the names by which - terminfo knows a terminal, separated by "|" (pipe-bar) characters with + The first line of a terminfo(5) description gives the names by which + terminfo knows a terminal, separated by "|" (pipe-bar) characters with the last name field terminated by a comma. The first name field is the type's primary name, and is the one to use when setting TERM. The last - name field (if distinct from the first) is actually a description of - the terminal type (it may contain blanks; the others must be single - words). Name fields between the first and last (if present) are + name field (if distinct from the first) is actually a description of + the terminal type (it may contain blanks; the others must be single + words). Name fields between the first and last (if present) are aliases for the terminal, usually historical names retained for compat- ibility. - There are some conventions for how to choose terminal primary names - that help keep them informative and unique. Here is a step-by-step + There are some conventions for how to choose terminal primary names + that help keep them informative and unique. Here is a step-by-step guide to naming terminals that also explains how to parse them: - First, choose a root name. The root will consist of a lower-case let- - ter followed by up to seven lower-case letters or digits. You need to + First, choose a root name. The root will consist of a lower-case let- + ter followed by up to seven lower-case letters or digits. You need to avoid using punctuation characters in root names, because they are used - and interpreted as filenames and shell meta-characters (such as !, $, + and interpreted as filenames and shell meta-characters (such as !, $, *, ?, etc.) embedded in them may cause odd and unhelpful behavior. The - slash (/), or any other character that may be interpreted by anyone's - file system (\, $, [, ]), is especially dangerous (terminfo is plat- - form-independent, and choosing names with special characters could - someday make life difficult for users of a future port). The dot (.) - character is relatively safe as long as there is at most one per root + slash (/), or any other character that may be interpreted by anyone's + file system (\, $, [, ]), is especially dangerous (terminfo is plat- + form-independent, and choosing names with special characters could + someday make life difficult for users of a future port). The dot (.) + character is relatively safe as long as there is at most one per root name; some historical terminfo names use it. - The root name for a terminal or workstation console type should almost - always begin with a vendor prefix (such as hp for Hewlett-Packard, wy - for Wyse, or att for AT&T terminals), or a common name of the terminal - line (vt for the VT series of terminals from DEC, or sun for Sun - Microsystems workstation consoles, or regent for the ADDS Regent - series. You can list the terminfo tree to see what prefixes are - already in common use. The root name prefix should be followed when + The root name for a terminal or workstation console type should almost + always begin with a vendor prefix (such as hp for Hewlett-Packard, wy + for Wyse, or att for AT&T terminals), or a common name of the terminal + line (vt for the VT series of terminals from DEC, or sun for Sun + Microsystems workstation consoles, or regent for the ADDS Regent + series. You can list the terminfo tree to see what prefixes are + already in common use. The root name prefix should be followed when appropriate by a model number; thus vt100, hp2621, wy50. - The root name for a PC-Unix console type should be the OS name, i.e., - linux, bsdos, freebsd, netbsd. It should not be console or any other + The root name for a PC-Unix console type should be the OS name, i.e., + linux, bsdos, freebsd, netbsd. It should not be console or any other generic that might cause confusion in a multi-platform environment! If - a model number follows, it should indicate either the OS release level + a model number follows, it should indicate either the OS release level or the console driver release level. - The root name for a terminal emulator (assuming it does not fit one of + The root name for a terminal emulator (assuming it does not fit one of the standard ANSI or vt100 types) should be the program name or a read- ily recognizable abbreviation of it (i.e., versaterm, ctrm). - Following the root name, you may add any reasonable number of hyphen- + Following the root name, you may add any reasonable number of hyphen- separated feature suffixes. 2p Has two pages of memory. Likewise 4p, 8p, etc. - mc Magic-cookie. Some terminals (notably older Wyses) can only sup- + mc Magic-cookie. Some terminals (notably older Wyses) can only sup- port one attribute without magic-cookie lossage. Their base entry is usually paired with another that has this suffix and uses magic cookies to support multiple attributes. @@ -160,7 +161,7 @@ -m Mono mode - suppress color support. - -na No arrow keys - termcap ignores arrow keys which are actually + -na No arrow keys - termcap ignores arrow keys which are actually there on the terminal, so the user can use the arrow keys locally. -nam No auto-margin - suppress am capability. @@ -179,18 +180,18 @@ -w Wide; terminal is in 132 column mode. - Conventionally, if your terminal type is a variant intended to specify - a line height, that suffix should go first. So, for a hypothetical - FuBarCo model 2317 terminal in 30-line mode with reverse video, best + Conventionally, if your terminal type is a variant intended to specify + a line height, that suffix should go first. So, for a hypothetical + FuBarCo model 2317 terminal in 30-line mode with reverse video, best form would be fubar-30-rv (rather than, say, "fubar-rv-30"). - Terminal types that are written not as standalone entries, but rather - as components to be plugged into other entries via use capabilities, + Terminal types that are written not as standalone entries, but rather + as components to be plugged into other entries via use capabilities, are distinguished by using embedded plus signs rather than dashes. Commands which use a terminal type to control display often accept a -T - option that accepts a terminal name argument. Such programs should - fall back on the TERM environment variable when no -T option is speci- + option that accepts a terminal name argument. Such programs should + fall back on the TERM environment variable when no -T option is speci- fied. @@ -200,7 +201,7 @@

    FILES

    -       /usr/share/terminfo/?/*
    +       /usr/local/ncurses/lib/terminfo/?/*
                 compiled terminal capability data base
     
            /etc/inittab
    diff --git a/doc/html/man/terminfo.5.html b/doc/html/man/terminfo.5.html
    index ccc0c24e..6c39ed6d 100644
    --- a/doc/html/man/terminfo.5.html
    +++ b/doc/html/man/terminfo.5.html
    @@ -65,7 +65,7 @@
     
     
     

    SYNOPSIS

    -       /usr/share/terminfo/*/*
    +       /usr/local/ncurses/lib/terminfo/*/*
     
     
     

    DESCRIPTION

    @@ -74,7 +74,7 @@
            Terminfo describes terminals by giving a set of capabilities which they
            have, by specifying how to perform screen operations, and by specifying
            padding  requirements  and  initialization  sequences.   This describes
    -       ncurses version 6.0 (patch 20170812).
    +       ncurses version 6.0 (patch 20170819).
     
     
     

    Terminfo Entry Syntax

    @@ -1284,15 +1284,15 @@
     
                An  empty directory name (i.e., if the variable begins or ends with
                a colon, or contains adjacent colons) is interpreted as the  system
    -           location /usr/share/terminfo.
    +           location /usr/local/ncurses/lib/terminfo.
     
            o   Finally, ncurses searches these compiled-in locations:
     
                o   a    list    of    directories   (/usr/local/ncurses/share/ter-
                    minfo:/usr/share/terminfo), and
     
    -           o   the system terminfo directory,  /usr/share/terminfo  (the  com-
    -               piled-in default).
    +           o   the system terminfo directory,  /usr/local/ncurses/lib/terminfo
    +               (the compiled-in default).
     
     
     

    Preparing Descriptions

    @@ -2415,7 +2415,8 @@
     
     
     

    FILES

    -       /usr/share/terminfo/?/*  files containing terminal descriptions
    +       /usr/local/ncurses/lib/terminfo/?/*
    +                                files containing terminal descriptions
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/tic.1m.html b/doc/html/man/tic.1m.html
    index 0243a550..3f273d35 100644
    --- a/doc/html/man/tic.1m.html
    +++ b/doc/html/man/tic.1m.html
    @@ -79,19 +79,20 @@
            minfo" leaf, versus a "terminfo.db" file.
     
            The  results  are  normally  placed  in  the  system  terminfo database
    -       /usr/share/terminfo.  The compiled terminal description can  be  placed
    -       in a different terminfo database.  There are two ways to achieve this:
    +       /usr/local/ncurses/lib/terminfo.  The compiled terminal description can
    +       be  placed  in  a  different  terminfo database.  There are two ways to
    +       achieve this:
     
    -       o   First,  you  may override the system default either by using the -o
    -           option, or by setting the variable TERMINFO in your shell  environ-
    +       o   First, you may override the system default either by using  the  -o
    +           option,  or by setting the variable TERMINFO in your shell environ-
                ment to a valid database location.
     
    -       o   Secondly,  if  tic cannot write in /usr/share/terminfo or the loca-
    -           tion specified using your  TERMINFO  variable,  it  looks  for  the
    -           directory  $HOME/.terminfo (or hashed database $HOME/.terminfo.db);
    -           if that location exists, the entry is placed there.
    +       o   Secondly, if tic cannot write in /usr/local/ncurses/lib/terminfo or
    +           the  location  specified using your TERMINFO variable, it looks for
    +           the  directory  $HOME/.terminfo  (or  hashed  database  $HOME/.ter-
    +           minfo.db); if that location exists, the entry is placed there.
     
    -       Libraries that read terminfo entries are expected to check  in  succes-
    +       Libraries  that  read terminfo entries are expected to check in succes-
            sion
     
            o   a location specified with the TERMINFO environment variable,
    @@ -100,10 +101,10 @@
     
            o   directories listed in the TERMINFO_DIRS environment variable,
     
    -       o   a  compiled-in  list  of directories (/usr/local/ncurses/share/ter-
    +       o   a compiled-in list  of  directories  (/usr/local/ncurses/share/ter-
                minfo:/usr/share/terminfo), and
     
    -       o   the system terminfo database (/usr/share/terminfo).
    +       o   the system terminfo database (/usr/local/ncurses/lib/terminfo).
     
     
     

    OPTIONS

    @@ -111,41 +112,41 @@
     
            -1     restricts the output to a single column
     
    -       -a     tells tic to retain commented-out capabilities rather than  dis-
    +       -a     tells  tic to retain commented-out capabilities rather than dis-
                   carding them.  Capabilities are commented by prefixing them with
    -              a period.  This sets the -x option, because it treats  the  com-
    -              mented-out  entries  as  user-defined  names.   If the source is
    -              termcap, accept the 2-character names  required  by  version  6.
    +              a  period.   This sets the -x option, because it treats the com-
    +              mented-out entries as user-defined  names.   If  the  source  is
    +              termcap,  accept  the  2-character  names required by version 6.
                   Otherwise these are ignored.
     
    -       -C     Force  source translation to termcap format.  Note: this differs
    -              from the -C option of infocmp(1m) in that  it  does  not  merely
    +       -C     Force source translation to termcap format.  Note: this  differs
    +              from  the  -C  option  of infocmp(1m) in that it does not merely
                   translate capability names, but also translates terminfo strings
    -              to termcap format.  Capabilities that are not  translatable  are
    -              left  in  the entry under their terminfo names but commented out
    -              with two preceding dots.  The actual  format  used  incorporates
    -              some  improvements  for escaped characters from terminfo format.
    +              to  termcap  format.  Capabilities that are not translatable are
    +              left in the entry under their terminfo names but  commented  out
    +              with  two  preceding  dots.  The actual format used incorporates
    +              some improvements for escaped characters from  terminfo  format.
                   For a stricter BSD-compatible translation, add the -K option.
     
    -              If this is combined with -c,  tic  makes  additional  checks  to
    -              report  cases  where  the  terminfo  values do not have an exact
    +              If  this  is  combined  with  -c, tic makes additional checks to
    +              report cases where the terminfo values  do  not  have  an  exact
                   equivalent in termcap form.  For example:
     
    -              o   sgr usually will not  convert,  because  termcap  lacks  the
    -                  ability  to  work with more than two parameters, and because
    -                  termcap lacks many of the arithmetic/logical operators  used
    +              o   sgr  usually  will  not  convert,  because termcap lacks the
    +                  ability to work with more than two parameters,  and  because
    +                  termcap  lacks many of the arithmetic/logical operators used
                       in terminfo.
     
    -              o   capabilities  with more than one delay or with delays before
    +              o   capabilities with more than one delay or with delays  before
                       the end of the string will not convert completely.
     
    -       -c     tells tic to only check file for errors, including syntax  prob-
    -              lems  and  bad  use  links.   If  you  specify -C (-I) with this
    -              option, the code will print warnings about entries which,  after
    -              use  resolution, are more than 1023 (4096) bytes long.  Due to a
    +       -c     tells  tic to only check file for errors, including syntax prob-
    +              lems and bad use links.   If  you  specify  -C  (-I)  with  this
    +              option,  the code will print warnings about entries which, after
    +              use resolution, are more than 1023 (4096) bytes long.  Due to  a
                   fixed buffer length in older termcap libraries, as well as buggy
    -              checking  for  the buffer length (and a documented limit in ter-
    -              minfo), these entries may cause core dumps with other  implemen-
    +              checking for the buffer length (and a documented limit  in  ter-
    +              minfo),  these entries may cause core dumps with other implemen-
                   tations.
     
                   tic checks string capabilities to ensure that those with parame-
    @@ -153,29 +154,29 @@
                   predefined string capabilities; those which are defined with the
                   -x option are ignored.
     
    -       -D     tells tic to print the database locations that it  knows  about,
    +       -D     tells  tic  to print the database locations that it knows about,
                   and exit.  The first location shown is the one to which it would
    -              write compiled terminal descriptions.  If tic  is  not  able  to
    -              find  a writable database location according to the rules summa-
    -              rized above, it will print a diagnostic and exit with  an  error
    +              write  compiled  terminal  descriptions.   If tic is not able to
    +              find a writable database location according to the rules  summa-
    +              rized  above,  it will print a diagnostic and exit with an error
                   rather than printing a list of database locations.
     
            -e names
    -              Limit  writes  and translations to the following comma-separated
    -              list of terminals.  If any name or alias of a  terminal  matches
    -              one  of  the  names  in  the  list, the entry will be written or
    +              Limit writes and translations to the  following  comma-separated
    +              list  of  terminals.  If any name or alias of a terminal matches
    +              one of the names in the list,  the  entry  will  be  written  or
                   translated as normal.  Otherwise no output will be generated for
    -              it.   The  option  value is interpreted as a file containing the
    +              it.  The option value is interpreted as a  file  containing  the
                   list if it contains a '/'.  (Note: depending on how tic was com-
                   piled, this option may require -I or -C.)
     
    -       -f     Display     complex     terminfo     strings    which    contain
    +       -f     Display    complex    terminfo     strings     which     contain
                   if/then/else/endif expressions indented for readability.
     
    -       -G     Display constant literals in  decimal  form  rather  than  their
    +       -G     Display  constant  literals  in  decimal  form rather than their
                   character equivalents.
     
    -       -g     Display  constant  character literals in quoted form rather than
    +       -g     Display constant character literals in quoted form  rather  than
                   their decimal equivalents.
     
            -I     Force source translation to terminfo format.
    @@ -183,24 +184,24 @@
            -K     Suppress some longstanding ncurses extensions to termcap format,
                   e.g., "\s" for space.
     
    -       -L     Force  source  translation  to  terminfo format using the long C
    +       -L     Force source translation to terminfo format  using  the  long  C
                   variable names listed in <term.h>
     
            -N     Disable smart defaults.  Normally, when translating from termcap
    -              to  terminfo,  the  compiler makes a number of assumptions about
    -              the  defaults  of  string   capabilities   reset1_string,   car-
    +              to terminfo, the compiler makes a number  of  assumptions  about
    +              the   defaults   of   string  capabilities  reset1_string,  car-
                   riage_return,  cursor_left,  cursor_down,  scroll_forward,  tab,
                   newline, key_backspace, key_left, and key_down, then attempts to
    -              use  obsolete termcap capabilities to deduce correct values.  It
    +              use obsolete termcap capabilities to deduce correct values.   It
                   also normally suppresses output of obsolete termcap capabilities
    -              such  as bs.  This option forces a more literal translation that
    +              such as bs.  This option forces a more literal translation  that
                   also preserves the obsolete capabilities.
     
    -       -odir  Write compiled entries to given  database  location.   Overrides
    +       -odir  Write  compiled  entries  to given database location.  Overrides
                   the TERMINFO environment variable.
     
    -       -Qn    Rather  than  show  source  in terminfo (text) format, print the
    -              compiled (binary) format in hexadecimal or base64 form,  depend-
    +       -Qn    Rather than show source in terminfo  (text)  format,  print  the
    +              compiled  (binary) format in hexadecimal or base64 form, depend-
                   ing on the option's value:
     
                    1  hexadecimal
    @@ -213,35 +214,35 @@
                   source.
     
            -Rsubset
    -              Restrict output to a given subset.  This option is for use  with
    -              archaic  versions  of  terminfo  like  those on SVr1, Ultrix, or
    -              HP/UX that do not support the full set of SVR4/XSI  Curses  ter-
    -              minfo;  and  outright  broken ports like AIX 3.x that have their
    -              own extensions incompatible with  SVr4/XSI.   Available  subsets
    +              Restrict  output to a given subset.  This option is for use with
    +              archaic versions of terminfo like  those  on  SVr1,  Ultrix,  or
    +              HP/UX  that  do not support the full set of SVR4/XSI Curses ter-
    +              minfo; and outright broken ports like AIX 3.x  that  have  their
    +              own  extensions  incompatible  with SVr4/XSI.  Available subsets
                   are "SVr1", "Ultrix", "HP", "BSD" and "AIX"; see terminfo(5) for
                   details.
     
    -       -r     Force entry resolution (so there are no remaining  tc  capabili-
    -              ties)  even  when doing translation to termcap format.  This may
    -              be needed if you are preparing a  termcap  file  for  a  termcap
    -              library  (such as GNU termcap through version 1.3 or BSD termcap
    -              through 4.3BSD) that does not handle  multiple  tc  capabilities
    +       -r     Force  entry  resolution (so there are no remaining tc capabili-
    +              ties) even when doing translation to termcap format.   This  may
    +              be  needed  if  you  are  preparing a termcap file for a termcap
    +              library (such as GNU termcap through version 1.3 or BSD  termcap
    +              through  4.3BSD)  that  does not handle multiple tc capabilities
                   per entry.
     
    -       -s     Summarize  the  compile  by  showing  the database location into
    -              which entries are written, and the number of entries  which  are
    +       -s     Summarize the compile by  showing  the  database  location  into
    +              which  entries  are written, and the number of entries which are
                   compiled.
     
    -       -T     eliminates  size-restrictions  on  the  generated text.  This is
    -              mainly useful for  testing  and  analysis,  since  the  compiled
    -              descriptions  are limited (e.g., 1023 for termcap, 4096 for ter-
    +       -T     eliminates size-restrictions on the  generated  text.   This  is
    +              mainly  useful  for  testing  and  analysis,  since the compiled
    +              descriptions are limited (e.g., 1023 for termcap, 4096 for  ter-
                   minfo).
     
    -       -t     tells tic to discard commented-out capabilities.  Normally  when
    -              translating  from  terminfo to termcap, untranslatable capabili-
    +       -t     tells  tic to discard commented-out capabilities.  Normally when
    +              translating from terminfo to termcap,  untranslatable  capabili-
                   ties are commented-out.
     
    -       -U   tells tic to not post-process the data after  parsing  the  source
    +       -U   tells  tic  to  not post-process the data after parsing the source
                 file.  Normally, it infers data which is commonly missing in older
                 terminfo data, or in termcaps.
     
    @@ -251,9 +252,9 @@
            -vn  specifies that (verbose) output be written to standard error trace
                 information showing tic's progress.
     
    -            The optional parameter n is a number  from  1  to  10,  inclusive,
    +            The  optional  parameter  n  is  a number from 1 to 10, inclusive,
                 indicating the desired level of detail of information.  If ncurses
    -            is built  without  tracing  support,  the  optional  parameter  is
    +            is  built  without  tracing  support,  the  optional  parameter is
                 ignored.  If n is omitted, the default level is 1.  If n is speci-
                 fied and greater than 1, the level of detail is increased.
     
    @@ -275,88 +276,88 @@
     
                 If the debug level n is not given, it is taken to be one.
     
    -       -W   By itself, the -w  option  will  not  force  long  strings  to  be
    +       -W   By  itself,  the  -w  option  will  not  force  long strings to be
                 wrapped.  Use the -W option to do this.
     
    -            If  you specify both -f and -W options, the latter is ignored when
    +            If you specify both -f and -W options, the latter is ignored  when
                 -f has already split the line.
     
            -wn  specifies the width of the output.  The parameter is optional.  If
                 it is omitted, it defaults to 60.
     
    -       -x   Treat  unknown capabilities as user-defined.  That is, if you sup-
    -            ply a capability name which tic does not recognize, it will  infer
    -            its  type  (boolean, number or string) from the syntax and make an
    -            extended table entry for that.   User-defined  capability  strings
    +       -x   Treat unknown capabilities as user-defined.  That is, if you  sup-
    +            ply  a capability name which tic does not recognize, it will infer
    +            its type (boolean, number or string) from the syntax and  make  an
    +            extended  table  entry  for that.  User-defined capability strings
                 whose name begins with "k" are treated as function keys.
     
     
     

    PARAMETERS

    -       file   contains  one  or  more terminfo terminal descriptions in source
    -              format  [see  terminfo(5)].   Each  description  in   the   file
    +       file   contains one or more terminfo terminal  descriptions  in  source
    +              format   [see   terminfo(5)].   Each  description  in  the  file
                   describes the capabilities of a particular terminal.
     
    -              If  file  is "-", then the data is read from the standard input.
    +              If file is "-", then the data is read from the  standard  input.
                   The file parameter may also be the path of a character-device.
     
     
     

    PROCESSING

    -       All but one of the capabilities recognized by  tic  are  documented  in
    +       All  but  one  of  the capabilities recognized by tic are documented in
            terminfo(5).  The exception is the use capability.
     
            When a use=entry-name field is discovered in a terminal entry currently
    -       being compiled, tic reads in the  binary  from  /usr/share/terminfo  to
    -       complete  the  entry.   (Entries  created from file will be used first.
    -       tic duplicates the capabilities in entry-name for  the  current  entry,
    -       with the exception of those capabilities that explicitly are defined in
    -       the current entry.
    -
    -       When an entry, e.g., entry_name_1, contains a  use=entry_name_2  field,
    -       any   canceled   capabilities  in  entry_name_2  must  also  appear  in
    -       entry_name_1 before use= for  these  capabilities  to  be  canceled  in
    +       being     compiled,     tic     reads     in     the     binary    from
    +       /usr/local/ncurses/lib/terminfo to complete the entry.   (Entries  cre-
    +       ated  from file will be used first.  tic duplicates the capabilities in
    +       entry-name for the current entry, with the exception of those capabili-
    +       ties that explicitly are defined in the current entry.
    +
    +       When  an  entry, e.g., entry_name_1, contains a use=entry_name_2 field,
    +       any  canceled  capabilities  in  entry_name_2  must  also   appear   in
    +       entry_name_1  before  use=  for  these  capabilities  to be canceled in
            entry_name_1.
     
            Total compiled entries cannot exceed 4096 bytes.  The name field cannot
    -       exceed 512 bytes.  Terminal names exceeding the  maximum  alias  length
    +       exceed  512  bytes.   Terminal names exceeding the maximum alias length
            (32 characters on systems with long filenames, 14 characters otherwise)
    -       will be truncated to the maximum alias length  and  a  warning  message
    +       will  be  truncated  to  the maximum alias length and a warning message
            will be printed.
     
     
     

    COMPATIBILITY

    -       There  is  some  evidence  that  historic  tic  implementations treated
    -       description fields with no whitespace in them as additional aliases  or
    +       There is  some  evidence  that  historic  tic  implementations  treated
    +       description  fields with no whitespace in them as additional aliases or
            short names.  This tic does not do that, but it does warn when descrip-
    -       tion fields may be treated that way and check them for dangerous  char-
    +       tion  fields may be treated that way and check them for dangerous char-
            acters.
     
     
     

    EXTENSIONS

    -       Unlike  the  SVr4 tic command, this implementation can actually compile
    -       termcap sources.  In fact, entries in terminfo and termcap  syntax  can
    -       be  mixed  in  a  single  source file.  See terminfo(5) for the list of
    +       Unlike the SVr4 tic command, this implementation can  actually  compile
    +       termcap  sources.   In fact, entries in terminfo and termcap syntax can
    +       be mixed in a single source file.  See  terminfo(5)  for  the  list  of
            termcap names taken to be equivalent to terminfo names.
     
    -       The SVr4 manual pages are not clear on the  resolution  rules  for  use
    -       capabilities.   This  implementation  of tic will find use targets any-
    -       where in the source file, or anywhere in the file tree rooted  at  TER-
    -       MINFO  (if TERMINFO is defined), or in the user's $HOME/.terminfo data-
    +       The  SVr4  manual  pages  are not clear on the resolution rules for use
    +       capabilities.  This implementation of tic will find  use  targets  any-
    +       where  in  the source file, or anywhere in the file tree rooted at TER-
    +       MINFO (if TERMINFO is defined), or in the user's $HOME/.terminfo  data-
            base (if it exists), or (finally) anywhere in the system's file tree of
            compiled entries.
     
    -       The  error  messages  from this tic have the same format as GNU C error
    +       The error messages from this tic have the same format as  GNU  C  error
            messages, and can be parsed by GNU Emacs's compile facility.
     
    -       The -0, -1, -C, -G, -I, -N, -R, -T, -V, -a, -e, -f, -g, -o, -r, -s,  -t
    +       The  -0, -1, -C, -G, -I, -N, -R, -T, -V, -a, -e, -f, -g, -o, -r, -s, -t
            and -x options are not supported under SVr4.  The SVr4 -c mode does not
            report bad use links.
     
    -       System V does  not  compile  entries  to  or  read  entries  from  your
    +       System  V  does  not  compile  entries  to  or  read  entries from your
            $HOME/.terminfo database unless TERMINFO is explicitly set to it.
     
     
     

    FILES

    -       /usr/share/terminfo/?/*
    +       /usr/local/ncurses/lib/terminfo/?/*
                 Compiled terminal description database.
     
     
    @@ -364,7 +365,7 @@
            infocmp(1m),   captoinfo(1m),   infotocap(1m),   toe(1m),   curses(3x),
            term(5).  terminfo(5).
     
    -       This describes ncurses version 6.0 (patch 20170812).
    +       This describes ncurses version 6.0 (patch 20170819).
     
     
     

    AUTHOR

    diff --git a/doc/html/man/toe.1m.html b/doc/html/man/toe.1m.html
    index f03c7f59..7cbcb508 100644
    --- a/doc/html/man/toe.1m.html
    +++ b/doc/html/man/toe.1m.html
    @@ -105,7 +105,7 @@
     
     
     

    FILES

    -       /usr/share/terminfo/?/*
    +       /usr/local/ncurses/lib/terminfo/?/*
                 Compiled terminal description database.
     
     
    @@ -113,7 +113,7 @@
            tic(1m), infocmp(1m), captoinfo(1m),  infotocap(1m),  curses(3x),  ter-
            minfo(5).
     
    -       This describes ncurses version 6.0 (patch 20170812).
    +       This describes ncurses version 6.0 (patch 20170819).
     
     
     
    diff --git a/doc/html/man/tput.1.html b/doc/html/man/tput.1.html
    index ce115eb2..1de0239a 100644
    --- a/doc/html/man/tput.1.html
    +++ b/doc/html/man/tput.1.html
    @@ -27,7 +27,7 @@
       * sale, use or other dealings in this Software without prior written       *
       * authorization.                                                           *
       ****************************************************************************
    -  * @Id: tput.1,v 1.54 2017/01/29 00:51:08 tom Exp @
    +  * @Id: tput.1,v 1.55 2017/08/19 14:26:42 tom Exp @
     -->
     
     
    @@ -52,7 +52,7 @@
     
     

    SYNOPSIS

            tput [-Ttype] capname [parameters]
    -       tput [-Ttype] clear
    +       tput [-Ttype] [-x] clear
            tput [-Ttype] init
            tput [-Ttype] reset
            tput [-Ttype] longname
    @@ -87,25 +87,29 @@
     
     
     

    Options

    -       -Ttype indicates the type of terminal.  Normally this option is  unnec-
    -              essary,  because the default is taken from the environment vari-
    -              able TERM.  If -T is specified, then the shell  variables  LINES
    -              and COLUMNS will also be ignored.
    -
    -       -S     allows  more  than  one  capability per invocation of tput.  The
    -              capabilities must be passed to  tput  from  the  standard  input
    -              instead  of  from the command line (see example).  Only one cap-
    -              name is allowed per line.  The -S option changes the meaning  of
    -              the  0  and  1 boolean and string exit codes (see the EXIT CODES
    +       -S     allows more than one capability per  invocation  of  tput.   The
    +              capabilities  must  be  passed  to  tput from the standard input
    +              instead of from the command line (see example).  Only  one  cap-
    +              name  is allowed per line.  The -S option changes the meaning of
    +              the 0 and 1 boolean and string exit codes (see  the  EXIT  CODES
                   section).
     
    -              Again, tput uses a table and the presence of parameters  in  its
    +              Because  some capabilities may use string parameters rather than
    +              numbers, tput uses a table and the presence of parameters in its
                   input  to  decide whether to use tparm(3x), and how to interpret
                   the parameters.
     
    -       -V     reports the version of ncurses which was used in  this  program,
    +       -Ttype indicates the type of terminal.  Normally this option is  unnec-
    +              essary,  because the default is taken from the environment vari-
    +              able TERM.  If -T is specified, then the shell  variables  LINES
    +              and COLUMNS will also be ignored.
    +
    +       -V     reports  the  version of ncurses which was used in this program,
                   and exits.
     
    +       -x     do not attempt to clear the terminal's scrollback  buffer  using
    +              the extended "E3" capability.
    +
     
     

    Commands

            A few commands (init, reset and longname) are special; they are defined
    @@ -300,7 +304,7 @@
     
     
     

    FILES

    -       /usr/share/terminfo
    +       /usr/local/ncurses/lib/terminfo
                   compiled terminal description database
     
            /usr/share/tabset/*
    @@ -478,7 +482,7 @@
     

    SEE ALSO

            clear(1), stty(1), tabs(1), tset(1), terminfo(5), curs_termcap(3x).
     
    -       This describes ncurses version 6.0 (patch 20170812).
    +       This describes ncurses version 6.0 (patch 20170819).
     
     
     
    diff --git a/doc/html/man/tset.1.html b/doc/html/man/tset.1.html
    index 4b4dd16d..0dcd6195 100644
    --- a/doc/html/man/tset.1.html
    +++ b/doc/html/man/tset.1.html
    @@ -381,7 +381,7 @@
                 system  port  name to terminal type mapping database (BSD versions
                 only).
     
    -       /usr/share/terminfo
    +       /usr/local/ncurses/lib/terminfo
                 terminal capability database
     
     
    @@ -389,7 +389,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 20170812).
    +       This describes ncurses version 6.0 (patch 20170819).
     
     
     
    diff --git a/man/clear.1 b/man/clear.1
    index 055b5f24..3d2ffd98 100644
    --- a/man/clear.1
    +++ b/man/clear.1
    @@ -1,5 +1,5 @@
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2013,2016 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2016,2017 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            *
    @@ -26,7 +26,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: clear.1,v 1.16 2016/12/31 16:09:34 tom Exp $
    +.\" $Id: clear.1,v 1.17 2017/08/19 14:12:50 tom Exp $
     .TH @CLEAR@ 1 ""
     .\" these would be fallbacks for DS/DE,
     .\" but groff changed the meaning of the macros.
    @@ -54,7 +54,7 @@
     .SH NAME
     \fB@CLEAR@\fR \- clear the terminal screen
     .SH SYNOPSIS
    -\fB@CLEAR@\fR
    +\fB@CLEAR@\fR [\fB\-T\fR\fItype\fR] [\fB\-V\fP] [\fB\-x\fP]
     .br
     .SH DESCRIPTION
     \fB@CLEAR@\fR clears your screen if this is possible,
    @@ -68,10 +68,22 @@ and then in the
     You can redirect the standard output to a file (which prevents
     \fB@CLEAR@\fR from actually clearing the screen),
     and later \fBcat\fP the file to the screen, clearing it at that point.
    +.SH OPTIONS
     .PP
    -\fB@CLEAR@\fR ignores any command-line parameters that may be present.
    -The analogous \*(``\fB@TPUT@\fP clear\*('' has command-line parameters
    -including \fB\-T\fP for overriding the \fBTERM\fP environment variable.
    +.TP 5
    +.B \-T \fItype\fP
    +indicates the \fItype\fR of terminal.
    +Normally this option is
    +unnecessary, because the default is taken from the environment
    +variable \fBTERM\fR.
    +.TP
    +.B \-V
    +reports the version of ncurses which was used in this program, and exits.
    +The options are as follows:
    +.TP
    +.B \-x
    +do not attempt to clear the terminal's scrollback buffer
    +using the extended \*(``E3\*('' capability.
     .SH HISTORY
     A \fBclear\fP command appeared in 2.79BSD dated February 24, 1979.
     Later that was provided in Unix 8th edition (1985).
    diff --git a/man/tput.1 b/man/tput.1
    index e2f44e5c..0f984a74 100644
    --- a/man/tput.1
    +++ b/man/tput.1
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: tput.1,v 1.54 2017/01/29 00:51:08 tom Exp $
    +.\" $Id: tput.1,v 1.55 2017/08/19 14:26:42 tom Exp $
     .TH @TPUT@ 1 ""
     .ds d @TERMINFO@
     .ds n 1
    @@ -43,7 +43,7 @@
     .SH SYNOPSIS
     \fB@TPUT@\fR [\fB\-T\fR\fItype\fR] \fIcapname\fR [\fIparameters\fR]
     .br
    -\fB@TPUT@\fR [\fB\-T\fR\fItype\fR] \fBclear\fR
    +\fB@TPUT@\fR [\fB\-T\fR\fItype\fR] [\fB\-x\fP] \fBclear\fR
     .br
     \fB@TPUT@\fR [\fB\-T\fR\fItype\fR] \fBinit\fR
     .br
    @@ -86,14 +86,6 @@ For a complete list of capabilities
     and the \fIcapname\fR associated with each, see \fBterminfo\fR(5).
     .SS Options
     .TP
    -\fB\-T\fR\fItype\fR
    -indicates the \fItype\fR of terminal.
    -Normally this option is
    -unnecessary, because the default is taken from the environment
    -variable \fBTERM\fR.
    -If \fB\-T\fR is specified, then the shell
    -variables \fBLINES\fR and \fBCOLUMNS\fR will also be ignored.
    -.TP
     \fB\-S\fR
     allows more than one capability per invocation of \fB@TPUT@\fR.  The
     capabilities must be passed to \fB@TPUT@\fR from the standard input
    @@ -103,12 +95,26 @@ The \fB\-S\fR option changes the
     meaning of the \fB0\fR and \fB1\fR boolean and string exit codes (see the
     EXIT CODES section).
     .IP
    -Again, \fB@TPUT@\fR uses a table and the presence of parameters in its input
    +Because some capabilities may use
    +\fIstring\fP parameters rather than \fInumbers\fP,
    +\fB@TPUT@\fR uses a table and the presence of parameters in its input
     to decide whether to use \fBtparm\fR(3X),
     and how to interpret the parameters.
     .TP
    +\fB\-T\fR\fItype\fR
    +indicates the \fItype\fR of terminal.
    +Normally this option is
    +unnecessary, because the default is taken from the environment
    +variable \fBTERM\fR.
    +If \fB\-T\fR is specified, then the shell
    +variables \fBLINES\fR and \fBCOLUMNS\fR will also be ignored.
    +.TP
     \fB\-V\fR
     reports the version of ncurses which was used in this program, and exits.
    +.TP
    +.B \-x
    +do not attempt to clear the terminal's scrollback buffer
    +using the extended \*(``E3\*('' capability.
     .SS Commands
     A few commands (\fBinit\fP, \fBreset\fP and \fBlongname\fP) are
     special; they are defined by the \fB@TPUT@\fP program.
    diff --git a/misc/terminfo.src b/misc/terminfo.src
    index 84838be0..92990300 100644
    --- a/misc/terminfo.src
    +++ b/misc/terminfo.src
    @@ -6,8 +6,8 @@
     # Report bugs and new terminal descriptions to
     #	bug-ncurses@gnu.org
     #
    -#	$Revision: 1.607 $
    -#	$Date: 2017/07/30 00:10:59 $
    +#	$Revision: 1.616 $
    +#	$Date: 2017/08/18 18:33:02 $
     #
     # The original header is preserved below for reference.  It is noted that there
     # is a "newer" version which differs in some cosmetic details (but actually
    @@ -462,6 +462,9 @@ ecma+color|color control for ECMA-48-compatible terminals,
     	colors#8, ncv#3, pairs#64,
     	op=\E[39;49m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
     
    +ecma+italics|ECMA-48 strikeout/crossed-out,
    +	ritm=\E[23m, sitm=\E[3m,
    +
     # Attribute control for ECMA-48-compatible terminals
     ecma+sgr|attribute capabilities for true ECMA-48 terminals,
     	rmso=\E[27m, rmul=\E[24m, use=klone+sgr8,
    @@ -883,7 +886,9 @@ st52-old|Atari ST with VT52 emulation,
     	ri=\EI, rmcup=, rmso=\Eq, rs1=\Ez_\Eb@\EcA, sc=\Ej, sgr0=\Eq,
     	smcup=\Ee, smso=\Ep,
     
    -#### Apple Terminal.app
    +#### Apple
    +
    +######## Terminal.app
     
     # nsterm*|Apple_Terminal - AppKit Terminal.app
     #
    @@ -1342,21 +1347,119 @@ nsterm-build361|Terminal.app in OS X 10.11,
     nsterm|Apple_Terminal|AppKit Terminal.app,
     	use=nsterm-build361,
     
    -# iTerm.app from http://iterm.sourceforge.net/ is an alternative (and
    -# more featureful) terminal emulator for Mac OS X. It is similar
    -# enough in capabilities to nsterm-16color that I have derived this
    -# description from that one, but as far as I know they share no code.
    -# Many of the features are user-configurable, but I attempt only to
    -# describe the default configuration.
    -#
    -# NOTE: When tack tests (csr) + (nel) iTerm.app crashes, so (csr) is
    -# disabled.
    +######## iTerm, iTerm2
    +
    +# iTerm 0.10
    +#
    +# iTerm.app from http://iterm.sourceforge.net/ is an alternative (and more
    +# featureful) terminal emulator for Mac OS X.  It is similar enough in
    +# capabilities to nsterm-16color that I have derived this description from that
    +# one, but as far as I know they share no code.  Many of the features are
    +# user-configurable, but I attempt only to describe the default configuration
    +# (B. Sittler).
    +#
    +# According to its documentation, iTerm uses terminfo to obtain function key
    +# definitions.  For example, if it is started with TERM=xterm, it uses key
    +# definitons from that terminal description from the local OSX machine.  Those
    +# $TERM settings may be augmented using the bookmark and profile dialogs. 
    +# However, the behavior seen with tack does not agree with either the terminfo
    +# description or the function keys in its "xterm" profile.
    +#
    +# NOTES:
    +# with vttest:
    +#	reports primary DA as VT100 with AVO: \E[?1;2c
    +#	reports secondary DA as "\E[>0;95;c"
    +#	supports blink and underline
    +#	displays bold text as red
    +#	recognizes all dtterm controls for modifying/querying window
    +#	resizing via escape sequence is very slow
    +#	supports X11R5 mouse (no X10) and XFree86 mouse (button- and event-tracking)
    +#	supports X11R5 alternate screen and XFree86 1049 (no 1047/1048)
    +#	supports CHA, VPA, VPR, but no other ECMA-48 cursor movement such as HPA
    +# with tack:
    +#	.
    +# with ncurses test-program:
    +#	ncurses 'k' has problem in second screen; light background does not fill
    +# with xterm scripts
    +#	can display/alter xterm-256color cube
    +#	can display/alter xterm-88color cube
     iTerm.app|iterm|iTerm.app terminal emulator for Mac OS X,
    -	bce, bw@,
    -	csr@, dim@, kend=\EOF, khome=\EOH,
    -	sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?
    -	    %p7%t;8%;m%?%p9%t\016%e\017%;,
    -	use=xterm+256setaf, use=nsterm-16color,
    +	am, bce, hs, mir, msgr, npc, xenl, xon,
    +	cols#80, it#8, lines#24, wsl#50,
    +	acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
    +	bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
    +	clear=\E[H\E[J, cnorm=\E[?25h, cr=\r,
    +	csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
    +	cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
    +	cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
    +	dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
    +	dsl=\E]2;\007, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0,
    +	flash=\E[?5h$<200/>\E[?5l, fsl=^G, home=\E[H,
    +	hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@,
    +	il=\E[%p1%dL, il1=\E[L, ind=\n, kbs=^?, kcbt=\E[Z,
    +	kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
    +	kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\EOP, kf10=\E[21~,
    +	kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS,
    +	kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
    +	khome=\EOH, knp=\E[6~, kpp=\E[5~, op=\E[0m, rc=\E8,
    +	rev=\E[7m, ri=\EM, rmacs=^O, rmam=\E[?7l,
    +	rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E[?1l\E>,
    +	rmso=\E[m, rmul=\E[m,
    +	rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
    +	sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?
    +	    %p9%t\016%e\017%;,
    +	sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E7\E[?47h,
    +	smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m,
    +	tbc=\E[3g, tsl=\E]2;, u6=\E[%i%d;%dR, u7=\E[6n,
    +	u8=\E[?1;2c, u9=\E[c, vpa=\E[%i%p1%dd, TS=\E]2;,
    +	kEND5=\E[1;5F, kHOM5=\E[1;5H, kLFT2=\E[1;2D,
    +	kRIT2=\E[1;2C, use=vt100+keypad, use=xterm+256setaf,
    +
    +# iTerm2 3.0.15
    +#
    +# https://www.iterm2.com/
    +# https://github.com/gnachman/iTerm2
    +# ~/Library/Preferences/com.googlecode.iterm2.plist
    +# "iTerm" stalled in 2009.  A different set of developers began "iTerm2".
    +#
    +# NOTES:
    +# with vttest:
    +#	reports primary DA as VT100 with AVO: \E[?1;2c
    +#	reports secondary DA as "\E[>0;95;0c"
    +#	numeric keypad application mode does not work
    +#	by default, dtterm window-modifications are ignored
    +#	by default, dtterm window-reports return, but icon as "L", window as "l"
    +#	supports SD/SU, no REP, SL, SR
    +#	supports CBT, CHA, VPA, CNL, CPL, VPR (no HPA, CHT, HPR)
    +#	no improvement to XFree86 1047/1048 modes
    +# with tack:
    +#	in meta-mode, imitates xterm, sending UTF-8
    +#	special-key modifiers based on xterm use incompatible default for alt/meta
    +# with ncurses test-program:
    +#	no italics
    +#	no improvement to ncurses 'k'
    +# with xterm scripts:
    +#	acolors.sh works
    +#
    +# Italic text did not work initially, apparently because upgrading did not
    +# add/change that preference (set in Preferences, Profiles, Text).  A new
    +# install of iTerm 3.0.15 provides italics by default (blinking text:no).
    +iTerm2.app|iterm2|terminal emulator for Mac OS X,
    +	blink@, dim=\E[2m, ka1@, ka3@, kb2@, kc1@, kc3@, kent@,
    +	kf13=\E[1;2P, kf14=\E[1;2Q, kf15=\E[1;2R, kf16=\E[1;2S,
    +	kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~, kf2=\EOQ,
    +	kf20=\E[19;2~, kf21=\E[20;2~, kf22=\E[21;2~,
    +	kf23=\E[23;2~, kf24=\E[24;2~, kDN2=\E[1;2B, kDN3=\E\E[B,
    +	kDN4=\E[1;10B, kDN5=\E[1;5B, kDN6=\E[1;6B, kEND2=\E[1;2F,
    +	kEND3=\E[1;9F, kEND4=\E[1;10F, kEND6=\E[1;6F,
    +	kEND7=\E[1;13F, kEND8=\E[1;14F, kHOM2=\E[1;2H,
    +	kHOM3=\E[1;9H, kHOM4=\E[1;10H, kHOM6=\E[1;6H,
    +	kHOM7=\E[1;13H, kHOM8=\E[1;14H, kLFT3=\E\E[D,
    +	kLFT4=\E[1;10D, kLFT5=\E[1;5D, kLFT6=\E[1;6D,
    +	kNXT3=\E\E[6~, kPRV3=\E\E[5~, kRIT3=\E\E[C,
    +	kRIT4=\E[1;10C, kRIT5=\E[1;5C, kRIT6=\E[1;6C,
    +	kUP2=\E[1;2A, kUP3=\E\E[A, kUP4=\E[1;10A, kUP5=\E[1;5A,
    +	kUP6=\E[1;6A, use=ecma+italics, use=iterm,
     
     # xnuppc - Darwin PowerPC Console (a.k.a. "darwin")
     #
    @@ -1984,14 +2087,14 @@ hurd|The GNU Hurd console server,
     	kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
     	khome=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
     	kspd=^Z, nel=\r\n, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\E[T,
    -	rin=\E[%p1%dT, ritm=\E[23m, rmacs=\E[10m, rmir=\E[4l,
    -	rmso=\E[27m, rmul=\E[24m, rs1=\EM\E[?1000l, sc=\E7,
    -	setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
    +	rin=\E[%p1%dT, rmacs=\E[10m, rmir=\E[4l, rmso=\E[27m,
    +	rmul=\E[24m, rs1=\EM\E[?1000l, sc=\E7, setab=\E[4%p1%dm,
    +	setaf=\E[3%p1%dm,
     	sgr=\E[0%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;
     	    2%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m,
    -	sgr0=\E[0m, sitm=\E[3m, smacs=\E[11m, smir=\E[4h,
    -	smso=\E[7m, smul=\E[4m, vpa=\E[%i%p1%dd, grbom=\E[>1l,
    -	gsbom=\E[>1h,
    +	sgr0=\E[0m, smacs=\E[11m, smir=\E[4h, smso=\E[7m,
    +	smul=\E[4m, vpa=\E[%i%p1%dd, grbom=\E[>1l, gsbom=\E[>1h,
    +	use=ecma+italics,
     
     #### QNX
     #
    @@ -2305,10 +2408,9 @@ iris-ansi-ap|IRIS ANSI in application-keypad mode,
     iris-color|xwsh|IRIX ANSI with color,
     	ncv#33,
     	csr=\E[%i%p1%d;%p2%dr, dch=\E[%p1%dP, dim=\E[2m,
    -	ech=\E[%p1%dX, ich=\E[%p1%d@, rc=\E8, ritm=\E[23m,
    -	rmul=\E[24m, rs1=\Ec,
    +	ech=\E[%p1%dX, ich=\E[%p1%d@, rc=\E8, rmul=\E[24m, rs1=\Ec,
     	rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
    -	sitm=\E[3m, use=vt100+enq, use=klone+color,
    +	use=ecma+italics, use=vt100+enq, use=klone+color,
     	use=iris-ansi-ap,
     
     #### OpenBSD consoles
    @@ -4368,9 +4470,9 @@ xterm-basic|modern xterm terminal emulator - common,
     	il=\E[%p1%dL, il1=\E[L, ind=\n, invis=\E[8m,
     	is2=\E[!p\E[?3;4l\E[4l\E>, kmous=\E[M, meml=\El,
     	memu=\Em, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM,
    -	ritm=\E[23m, rmacs=\E(B, rmam=\E[?7l, rmcup=\E[?1049l,
    -	rmir=\E[4l, rmkx=\E[?1l\E>, rmm=\E[?1034l, rmso=\E[27m,
    -	rmul=\E[24m, rs1=\Ec, rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7,
    +	rmacs=\E(B, rmam=\E[?7l, rmcup=\E[?1049l, rmir=\E[4l,
    +	rmkx=\E[?1l\E>, rmm=\E[?1034l, rmso=\E[27m, rmul=\E[24m,
    +	rs1=\Ec, rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7,
     	setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
     	setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}
     	     %=%t3%e%p1%d%;m,
    @@ -4378,10 +4480,10 @@ xterm-basic|modern xterm terminal emulator - common,
     	     %=%t3%e%p1%d%;m,
     	sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;
     	    %?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
    -	sgr0=\E(B\E[m, sitm=\E[3m, smacs=\E(0, smam=\E[?7h,
    -	smcup=\E[?1049h, smir=\E[4h, smkx=\E[?1h\E=,
    -	smm=\E[?1034h, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
    -	vpa=\E[%i%p1%dd, E3=\E[3J, use=ansi+pp, use=xterm+kbs,
    +	sgr0=\E(B\E[m, smacs=\E(0, smam=\E[?7h, smcup=\E[?1049h,
    +	smir=\E[4h, smkx=\E[?1h\E=, smm=\E[?1034h, smso=\E[7m,
    +	smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd, E3=\E[3J,
    +	use=ecma+italics, use=ansi+pp, use=xterm+kbs,
     	use=vt100+enq,
     
     # From: David J. MacKenzie , 14 Nov 1997
    @@ -5029,11 +5131,10 @@ gnome-2008|GNOME Terminal snapshot 2.22.3,
     # Testing with tack shows that flash does not/has not worked -TD
     vte-2012|VTE 0.34.1,
     	ncv#16,
    -	dim=\E[2m, flash@, invis=\E[8m, ritm=\E[23m, rmso=\E[27m,
    -	rmul=\E[24m,
    +	dim=\E[2m, flash@, invis=\E[8m, rmso=\E[27m, rmul=\E[24m,
     	sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p5%t;2%;%?%p7%t;8%;%?%p1%p3
     	    %|%t;7%;m%?%p9%t\016%e\017%;,
    -	sitm=\E[3m, use=vte-2008,
    +	use=ecma+italics, use=vte-2008,
     # Version 3.6.1 sets TERM to xterm-256color (still hardcoded), which has
     # 61 differences from a correct entry for gnome terminal.
     gnome-2012|GNOME Terminal 3.6.0,
    @@ -5157,13 +5258,13 @@ konsole-base|KDE console window,
     	hpa=\E[%i%p1%dG, indn=\E[%p1%dS, kbs=^?, kdch1=\E[3~,
     	kend=\E[4~, kf1@, kf10@, kf11@, kf12@, kf13@, kf14@, kf15@, kf16@,
     	kf17@, kf18@, kf19@, kf2@, kf20@, kf3@, kf4@, kf5@, kf6@, kf7@, kf8@,
    -	kf9@, kfnd@, khome=\E[1~, kslt@, rin=\E[%p1%dT, ritm=\E[23m,
    -	rmam=\E[?7l, rmso=\E[27m, rmul=\E[24m,
    +	kf9@, kfnd@, khome=\E[1~, kslt@, rin=\E[%p1%dT, rmam=\E[?7l,
    +	rmso=\E[27m, rmul=\E[24m,
     	rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>\E[?1000l\E[?25h,
     	sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?
     	    %p9%t\016%e\017%;,
    -	sgr0=\E[0m\017, sitm=\E[3m, smam=\E[?7h, vpa=\E[%i%p1%dd,
    -	use=ecma+color, use=xterm-r6,
    +	sgr0=\E[0m\017, smam=\E[?7h, vpa=\E[%i%p1%dd,
    +	use=ecma+italics, use=ecma+color, use=xterm-r6,
     konsole-linux|KDE console window with linux keyboard,
     	kf1=\E[[A, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13@,
     	kf14@, kf15@, kf16@, kf17@, kf18@, kf19@, kf2=\E[[B, kf20@,
    @@ -5214,7 +5315,7 @@ mlterm|multi lingual terminal emulator,
     # mlterm.ti; this entry is based on testing with tack and vttest -TD
     mlterm3|multi lingual terminal emulator,
     	kf1=\E[11~, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~,
    -	ritm=\E[23m, sitm=\E[3m, use=xterm+app, use=xterm+pcf0,
    +	use=ecma+italics, use=xterm+app, use=xterm+pcf0,
     	use=xterm+pcc2, use=xterm+pce2, use=mlterm2,
     
     # This is mlterm 2.9.3's mlterm.ti, with some additions/corrections -TD
    @@ -5913,21 +6014,20 @@ st|stterm| simpleterm 0.4.1,
     	kil1=\E[2;5~, kind=\E[1;2B, kmous=\E[M, knp=\E[6~,
     	kpp=\E[5~, kri=\E[1;2A, krmir=\E[2;2~, mc0=\E[i, mc4=\E[4i,
     	mc5=\E[5i, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM,
    -	ritm=\E[23m, rmacs=\E(B, rmcup=\E[?1049l, rmir=\E[4l,
    -	rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs1=\Ec,
    -	rs2=\E[4l\E>\E[?1034l, sc=\E7, setab=\E[4%p1%dm,
    -	setaf=\E[3%p1%dm,
    +	rmacs=\E(B, rmcup=\E[?1049l, rmir=\E[4l, rmkx=\E[?1l\E>,
    +	rmso=\E[27m, rmul=\E[24m, rs1=\Ec, rs2=\E[4l\E>\E[?1034l,
    +	sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
     	setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}
     	     %=%t3%e%p1%d%;m,
     	setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}
     	     %=%t3%e%p1%d%;m,
     	sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|
     	    %t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
    -	sgr0=\E[0m, sitm=\E[3m, smacs=\E(0, smcup=\E[?1049h,
    -	smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m,
    -	tbc=\E[3g, tsl=\E]0;, u6=\E[%i%d;%dR, u7=\E[6n,
    -	u8=\E[?1;2c, u9=\E[c, vpa=\E[%i%p1%dd, Se=\E[2 q,
    -	Ss=\E[%p1%d q,
    +	sgr0=\E[0m, smacs=\E(0, smcup=\E[?1049h, smir=\E[4h,
    +	smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
    +	tsl=\E]0;, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c,
    +	vpa=\E[%i%p1%dd, Se=\E[2 q, Ss=\E[%p1%d q,
    +	use=ecma+italics,
     #
     # st-0.1.1
     #
    @@ -6197,8 +6297,8 @@ dumb-emacs-ansi|Emacs dumb terminal with ANSI color codes,
     	am, hc,
     	colors#8, it#8, ncv#13, pairs#64,
     	bold=\E[1m, cud1=\n, ht=^I, ind=\n, op=\E[39;49m,
    -	ritm=\E[23m, rmul=\E[24m, setab=\E[4%p1%dm,
    -	setaf=\E[3%p1%dm, sgr0=\E[m, sitm=\E[3m, smul=\E[4m,
    +	rmul=\E[24m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
    +	sgr0=\E[m, smul=\E[4m, use=ecma+italics,
     
     #### Screen
     
    @@ -6509,7 +6609,7 @@ screen3|older VT 100/ANSI X3.64 virtual terminal,
     # tmux is compatible with screen, but has support for italics, and some of the
     # xterm cursor bits.
     tmux|tmux terminal multiplexer,
    -	ritm=\E[23m, rmso=\E[27m, sitm=\E[3m, smso=\E[7m,
    +	rmso=\E[27m, smso=\E[7m, use=ecma+italics,
     	use=ecma+strikeout, use=xterm+edit, use=xterm+pcfkeys,
     	use=xterm+sl, use=xterm+tmux, use=screen,
     
    @@ -6563,8 +6663,8 @@ dvtm|dynamic virtual terminal manager,
     	kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
     	kfnd=\E[1~, khome=\E[7~, kich1=\E[2~, kind=\E[a,
     	kmous=\E[M, knp=\E[6~, kpp=\E[5~, kri=\E[b, kslt=\E[4~,
    -	op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, ritm=\E[23m,
    -	rmacs=^O, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmso=\E[27m,
    +	op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O,
    +	rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmso=\E[27m,
     	rmul=\E[24m,
     	rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H,
     	rs2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E>\E[?1000l\E[?
    @@ -6573,9 +6673,9 @@ dvtm|dynamic virtual terminal manager,
     	setaf=\E[3%p1%dm,
     	sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?
     	    %p9%t\016%e\017%;,
    -	sgr0=\E[m\017, sitm=\E[3m, smacs=^N, smcup=\E7\E[?47h,
    -	smir=\E[4h, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
    -	vpa=\E[%i%p1%dd,
    +	sgr0=\E[m\017, smacs=^N, smcup=\E7\E[?47h, smir=\E[4h,
    +	smso=\E[7m, smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd,
    +	use=ecma+italics,
     
     dvtm-256color|dynamic virtual terminal manager with 256 colors,
     	colors#0x100, pairs#0x7fff,
    @@ -23299,12 +23399,13 @@ v3220|LANPAR Vision II model 3220/3221/3222,
     # function keys do not use 2-character names, and are available only with
     # terminfo.
     #
    -# As of mid-2012, no other terminfo/termcap implementation than ncurses
    -# supports this extension; termcap libraries can as noted above make limited
    -# use of the feature.
    +# Beginning in 2010, NetBSD curses has also provided a "-x" option for
    +# tic/infocmp, and uses this database (with a few changes).  There are a few
    +# differences, noted in
    +#	http://invisible-island.net/ncurses/ncurses-netbsd.html
     #
    -# ncurses makes explicit checks for a few user-definable capabilities:  AX, U8,
    -# XM.
    +# ncurses makes explicit checks for a few user-definable capabilities:  AX,
    +# RGB, U8, XM, which are documented in the user_caps(5) manual page.
     #
     #### SCREEN Extensions:
     #
    @@ -25140,4 +25241,11 @@ v3220|LANPAR Vision II model 3220/3221/3222,
     #	+ move SGR 24 and 27 from vte-2014 to vte-2012 (request by Alain
     #	  Williams) -TD
     #
    +# 2017-08-16
    +#	+ update "iterm" entry -TD
    +#	+ add "iterm2" entry (report by Leonardo Brondani Schenkel) -TD
    +#
    +# 2017-08-18
    +#	+ update notes on user-defined capabilities -TD
    +#
     ######## SHANTIH!  SHANTIH!  SHANTIH!
    diff --git a/ncurses/base/lib_color.c b/ncurses/base/lib_color.c
    index 09787afd..433b1641 100644
    --- a/ncurses/base/lib_color.c
    +++ b/ncurses/base/lib_color.c
    @@ -48,7 +48,7 @@
     #define CUR SP_TERMTYPE
     #endif
     
    -MODULE_ID("$Id: lib_color.c,v 1.132 2017/08/12 22:23:52 tom Exp $")
    +MODULE_ID("$Id: lib_color.c,v 1.135 2017/08/19 23:48:19 tom Exp $")
     
     #ifdef USE_TERM_DRIVER
     #define CanChange      InfoOf(SP_PARM).canchange
    @@ -266,7 +266,7 @@ init_direct_colors(NCURSES_SP_DCL0)
     	}
     
     	if ((n = tigetflag(name)) > 0) {
    -	    n = width / 3;
    +	    n = (width + 2) / 3;
     	    result->bits.red = UChar(n);
     	    result->bits.green = UChar(n);
     	    result->bits.blue = UChar(width - (2 * n));
    @@ -282,6 +282,7 @@ init_direct_colors(NCURSES_SP_DCL0)
     	    switch (sscanf(s, "%d/%d/%d", &red, &green, &blue)) {
     	    default:
     		blue = width - (2 * n);
    +		/* FALLTHRU */
     	    case 1:
     		green = n;
     		/* FALLTHRU */
    @@ -1117,8 +1118,11 @@ NCURSES_SP_NAME(reset_color_pairs) (NCURSES_SP_DCL0)
     {
         if (SP_PARM != 0) {
     	if (SP_PARM->_color_pairs) {
    -	    memset(sp->_color_pairs, 0, sizeof(colorpair_t) * (size_t) sp->_pair_alloc);
     	    _nc_free_ordered_pairs(SP_PARM);
    +	    free(SP_PARM->_color_pairs);
    +	    SP_PARM->_color_pairs = 0;
    +	    SP_PARM->_pair_alloc = 0;
    +	    _nc_reserve_pairs(SP_PARM, 16);
     	    clearok(CurScreen(SP_PARM), TRUE);
     	    touchwin(StdScreen(SP_PARM));
     	}
    diff --git a/ncurses/llib-lncurses b/ncurses/llib-lncurses
    index 67874611..af7eba9d 100644
    --- a/ncurses/llib-lncurses
    +++ b/ncurses/llib-lncurses
    @@ -245,6 +245,12 @@ void	_nc_change_pair(
     		int	pair)
     		{ /* void */ }
     
    +#undef _nc_reserve_pairs
    +colorpair_t *_nc_reserve_pairs(
    +		SCREEN	*sp, 
    +		int	want)
    +		{ return(*(colorpair_t **)0); }
    +
     #undef _nc_init_pair
     int	_nc_init_pair(
     		SCREEN	*sp, 
    @@ -3992,8 +3998,8 @@ int	_nc_read_file_entry(
     		TERMTYPE2 *ptr)
     		{ return(*(int *)0); }
     
    -#undef _nc_read_entry2
    -int	_nc_read_entry2(
    +#undef _nc_read_entry
    +int	_nc_read_entry(
     		const char *const name, 
     		char	*const filename, 
     		TERMTYPE2 *const tp)
    @@ -4004,7 +4010,7 @@ int	_nc_read_entry2(
     #undef _nc_read_termcap_entry
     int	_nc_read_termcap_entry(
     		const char *const tn, 
    -		TERMTYPE *const tp)
    +		TERMTYPE2 *const tp)
     		{ return(*(int *)0); }
     
     /* ./tinfo/strings.c */
    diff --git a/ncurses/llib-lncursest b/ncurses/llib-lncursest
    index 12447c02..a5f3a299 100644
    --- a/ncurses/llib-lncursest
    +++ b/ncurses/llib-lncursest
    @@ -248,6 +248,12 @@ void	_nc_change_pair(
     		int	pair)
     		{ /* void */ }
     
    +#undef _nc_reserve_pairs
    +colorpair_t *_nc_reserve_pairs(
    +		SCREEN	*sp, 
    +		int	want)
    +		{ return(*(colorpair_t **)0); }
    +
     #undef _nc_init_pair
     int	_nc_init_pair(
     		SCREEN	*sp, 
    @@ -3531,6 +3537,14 @@ int	_nc_setupterm(
     		int	reuse)
     		{ return(*(int *)0); }
     
    +#undef _nc_find_prescr
    +SCREEN	*_nc_find_prescr(void)
    +		{ return(*(SCREEN **)0); }
    +
    +#undef _nc_forget_prescr
    +void	_nc_forget_prescr(void)
    +		{ /* void */ }
    +
     #undef new_prescr
     SCREEN	*new_prescr(void)
     		{ return(*(SCREEN **)0); }
    @@ -4105,8 +4119,8 @@ int	_nc_read_file_entry(
     		TERMTYPE2 *ptr)
     		{ return(*(int *)0); }
     
    -#undef _nc_read_entry2
    -int	_nc_read_entry2(
    +#undef _nc_read_entry
    +int	_nc_read_entry(
     		const char *const name, 
     		char	*const filename, 
     		TERMTYPE2 *const tp)
    @@ -4117,7 +4131,7 @@ int	_nc_read_entry2(
     #undef _nc_read_termcap_entry
     int	_nc_read_termcap_entry(
     		const char *const tn, 
    -		TERMTYPE *const tp)
    +		TERMTYPE2 *const tp)
     		{ return(*(int *)0); }
     
     /* ./tinfo/strings.c */
    diff --git a/ncurses/llib-lncursestw b/ncurses/llib-lncursestw
    index f4c211d3..8088e8b7 100644
    --- a/ncurses/llib-lncursestw
    +++ b/ncurses/llib-lncursestw
    @@ -285,6 +285,12 @@ void	_nc_change_pair(
     		int	pair)
     		{ /* void */ }
     
    +#undef _nc_reserve_pairs
    +colorpair_t *_nc_reserve_pairs(
    +		SCREEN	*sp, 
    +		int	want)
    +		{ return(*(colorpair_t **)0); }
    +
     #undef _nc_init_pair
     int	_nc_init_pair(
     		SCREEN	*sp, 
    @@ -443,6 +449,11 @@ int	extended_pair_content_sp(
     		int	*b)
     		{ return(*(int *)0); }
     
    +#undef reset_color_pairs_sp
    +void	reset_color_pairs_sp(
    +		SCREEN	*sp)
    +		{ /* void */ }
    +
     #undef init_extended_pair
     int	init_extended_pair(
     		int	pair, 
    @@ -473,6 +484,10 @@ int	extended_pair_content(
     		int	*b)
     		{ return(*(int *)0); }
     
    +#undef reset_color_pairs
    +void	reset_color_pairs(void)
    +		{ /* void */ }
    +
     /* ./base/lib_colorset.c */
     
     #undef wcolor_set
    @@ -3538,6 +3553,11 @@ int	mcprint(
     
     /* ./base/new_pair.c */
     
    +#undef _nc_free_ordered_pairs
    +void	_nc_free_ordered_pairs(
    +		SCREEN	*sp)
    +		{ /* void */ }
    +
     #undef _nc_reset_color_pair
     void	_nc_reset_color_pair(
     		SCREEN	*sp, 
    @@ -3552,6 +3572,14 @@ void	_nc_set_color_pair(
     		int	mode)
     		{ /* void */ }
     
    +#undef _nc_copy_pairs
    +void	_nc_copy_pairs(
    +		SCREEN	*sp, 
    +		colorpair_t *target, 
    +		colorpair_t *source, 
    +		int	length)
    +		{ /* void */ }
    +
     #undef alloc_pair_sp
     int	alloc_pair_sp(
     		SCREEN	*sp, 
    @@ -4464,6 +4492,14 @@ int	_nc_setupterm(
     		int	reuse)
     		{ return(*(int *)0); }
     
    +#undef _nc_find_prescr
    +SCREEN	*_nc_find_prescr(void)
    +		{ return(*(SCREEN **)0); }
    +
    +#undef _nc_forget_prescr
    +void	_nc_forget_prescr(void)
    +		{ /* void */ }
    +
     #undef new_prescr
     SCREEN	*new_prescr(void)
     		{ return(*(SCREEN **)0); }
    @@ -5068,7 +5104,7 @@ int	_nc_read_entry(
     #undef _nc_read_termcap_entry
     int	_nc_read_termcap_entry(
     		const char *const tn, 
    -		TERMTYPE *const tp)
    +		TERMTYPE2 *const tp)
     		{ return(*(int *)0); }
     
     /* ./tinfo/strings.c */
    diff --git a/ncurses/llib-lncursesw b/ncurses/llib-lncursesw
    index 8aacf053..10f608de 100644
    --- a/ncurses/llib-lncursesw
    +++ b/ncurses/llib-lncursesw
    @@ -282,6 +282,12 @@ void	_nc_change_pair(
     		int	pair)
     		{ /* void */ }
     
    +#undef _nc_reserve_pairs
    +colorpair_t *_nc_reserve_pairs(
    +		SCREEN	*sp, 
    +		int	want)
    +		{ return(*(colorpair_t **)0); }
    +
     #undef _nc_init_pair
     int	_nc_init_pair(
     		SCREEN	*sp, 
    @@ -440,6 +446,11 @@ int	extended_pair_content_sp(
     		int	*b)
     		{ return(*(int *)0); }
     
    +#undef reset_color_pairs_sp
    +void	reset_color_pairs_sp(
    +		SCREEN	*sp)
    +		{ /* void */ }
    +
     #undef init_extended_pair
     int	init_extended_pair(
     		int	pair, 
    @@ -470,6 +481,10 @@ int	extended_pair_content(
     		int	*b)
     		{ return(*(int *)0); }
     
    +#undef reset_color_pairs
    +void	reset_color_pairs(void)
    +		{ /* void */ }
    +
     /* ./base/lib_colorset.c */
     
     #undef wcolor_set
    @@ -3529,6 +3544,11 @@ int	mcprint(
     
     /* ./base/new_pair.c */
     
    +#undef _nc_free_ordered_pairs
    +void	_nc_free_ordered_pairs(
    +		SCREEN	*sp)
    +		{ /* void */ }
    +
     #undef _nc_reset_color_pair
     void	_nc_reset_color_pair(
     		SCREEN	*sp, 
    @@ -3543,6 +3563,14 @@ void	_nc_set_color_pair(
     		int	mode)
     		{ /* void */ }
     
    +#undef _nc_copy_pairs
    +void	_nc_copy_pairs(
    +		SCREEN	*sp, 
    +		colorpair_t *target, 
    +		colorpair_t *source, 
    +		int	length)
    +		{ /* void */ }
    +
     #undef alloc_pair_sp
     int	alloc_pair_sp(
     		SCREEN	*sp, 
    @@ -4955,7 +4983,7 @@ int	_nc_read_entry(
     #undef _nc_read_termcap_entry
     int	_nc_read_termcap_entry(
     		const char *const tn, 
    -		TERMTYPE *const tp)
    +		TERMTYPE2 *const tp)
     		{ return(*(int *)0); }
     
     /* ./tinfo/strings.c */
    diff --git a/ncurses/llib-ltinfo b/ncurses/llib-ltinfo
    index cf7e3175..f2457426 100644
    --- a/ncurses/llib-ltinfo
    +++ b/ncurses/llib-ltinfo
    @@ -1275,8 +1275,8 @@ int	_nc_read_file_entry(
     		TERMTYPE2 *ptr)
     		{ return(*(int *)0); }
     
    -#undef _nc_read_entry2
    -int	_nc_read_entry2(
    +#undef _nc_read_entry
    +int	_nc_read_entry(
     		const char *const name, 
     		char	*const filename, 
     		TERMTYPE2 *const tp)
    diff --git a/ncurses/llib-ltinfot b/ncurses/llib-ltinfot
    index 41c92034..acf0733a 100644
    --- a/ncurses/llib-ltinfot
    +++ b/ncurses/llib-ltinfot
    @@ -805,6 +805,14 @@ int	_nc_setupterm(
     		int	reuse)
     		{ return(*(int *)0); }
     
    +#undef _nc_find_prescr
    +SCREEN	*_nc_find_prescr(void)
    +		{ return(*(SCREEN **)0); }
    +
    +#undef _nc_forget_prescr
    +void	_nc_forget_prescr(void)
    +		{ /* void */ }
    +
     #undef new_prescr
     SCREEN	*new_prescr(void)
     		{ return(*(SCREEN **)0); }
    @@ -1379,8 +1387,8 @@ int	_nc_read_file_entry(
     		TERMTYPE2 *ptr)
     		{ return(*(int *)0); }
     
    -#undef _nc_read_entry2
    -int	_nc_read_entry2(
    +#undef _nc_read_entry
    +int	_nc_read_entry(
     		const char *const name, 
     		char	*const filename, 
     		TERMTYPE2 *const tp)
    diff --git a/ncurses/llib-ltinfotw b/ncurses/llib-ltinfotw
    index 31376b54..83b025d2 100644
    --- a/ncurses/llib-ltinfotw
    +++ b/ncurses/llib-ltinfotw
    @@ -833,6 +833,14 @@ int	_nc_setupterm(
     		int	reuse)
     		{ return(*(int *)0); }
     
    +#undef _nc_find_prescr
    +SCREEN	*_nc_find_prescr(void)
    +		{ return(*(SCREEN **)0); }
    +
    +#undef _nc_forget_prescr
    +void	_nc_forget_prescr(void)
    +		{ /* void */ }
    +
     #undef new_prescr
     SCREEN	*new_prescr(void)
     		{ return(*(SCREEN **)0); }
    diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog
    index 099d07b3..1ef039e3 100644
    --- a/package/debian-mingw/changelog
    +++ b/package/debian-mingw/changelog
    @@ -1,8 +1,8 @@
    -ncurses6 (6.0+20170812) unstable; urgency=low
    +ncurses6 (6.0+20170819) unstable; urgency=low
     
       * latest weekly patch
     
    - -- Thomas E. Dickey   Mon, 07 Aug 2017 20:34:11 -0400
    + -- Thomas E. Dickey   Sun, 13 Aug 2017 17:24:56 -0400
     
     ncurses6 (5.9-20131005) unstable; urgency=low
     
    diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog
    index 099d07b3..1ef039e3 100644
    --- a/package/debian-mingw64/changelog
    +++ b/package/debian-mingw64/changelog
    @@ -1,8 +1,8 @@
    -ncurses6 (6.0+20170812) unstable; urgency=low
    +ncurses6 (6.0+20170819) unstable; urgency=low
     
       * latest weekly patch
     
    - -- Thomas E. Dickey   Mon, 07 Aug 2017 20:34:11 -0400
    + -- Thomas E. Dickey   Sun, 13 Aug 2017 17:24:56 -0400
     
     ncurses6 (5.9-20131005) unstable; urgency=low
     
    diff --git a/package/debian/changelog b/package/debian/changelog
    index 3f89df21..28b06da6 100644
    --- a/package/debian/changelog
    +++ b/package/debian/changelog
    @@ -1,8 +1,8 @@
    -ncurses6 (6.0+20170812) unstable; urgency=low
    +ncurses6 (6.0+20170819) unstable; urgency=low
     
       * latest weekly patch
     
    - -- Thomas E. Dickey   Mon, 07 Aug 2017 20:34:11 -0400
    + -- Thomas E. Dickey   Sun, 13 Aug 2017 17:24:56 -0400
     
     ncurses6 (5.9-20120608) unstable; urgency=low
     
    diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi
    index e62663c2..fb3620ea 100644
    --- a/package/mingw-ncurses.nsi
    +++ b/package/mingw-ncurses.nsi
    @@ -1,4 +1,4 @@
    -; $Id: mingw-ncurses.nsi,v 1.225 2017/08/08 00:34:11 tom Exp $
    +; $Id: mingw-ncurses.nsi,v 1.226 2017/08/13 21:24:56 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  "2017"
    -!define VERSION_MMDD  "0812"
    +!define VERSION_MMDD  "0819"
     !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
     
     !define MY_ABI   "5"
    diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec
    index c8de4d45..1204a663 100644
    --- a/package/mingw-ncurses.spec
    +++ b/package/mingw-ncurses.spec
    @@ -3,7 +3,7 @@
     Summary: shared libraries for terminal handling
     Name: mingw32-ncurses6
     Version: 6.0
    -Release: 20170812
    +Release: 20170819
     License: X11
     Group: Development/Libraries
     Source: ncurses-%{version}-%{release}.tgz
    diff --git a/package/ncurses.spec b/package/ncurses.spec
    index b6dab0f3..9bca6e34 100644
    --- a/package/ncurses.spec
    +++ b/package/ncurses.spec
    @@ -1,7 +1,7 @@
     Summary: shared libraries for terminal handling
     Name: ncurses6
     Version: 6.0
    -Release: 20170812
    +Release: 20170819
     License: X11
     Group: Development/Libraries
     Source: ncurses-%{version}-%{release}.tgz
    diff --git a/progs/clear.c b/progs/clear.c
    index 559d296c..7eac9b1e 100644
    --- a/progs/clear.c
    +++ b/progs/clear.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 1998-2013,2016 Free Software Foundation, Inc.              *
    + * Copyright (c) 1998-2016,2017 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            *
    @@ -40,10 +40,28 @@
     #include 
     #include 
     
    -MODULE_ID("$Id: clear.c,v 1.17 2016/12/24 19:33:39 tom Exp $")
    +MODULE_ID("$Id: clear.c,v 1.19 2017/08/19 13:40:22 tom Exp $")
     
     const char *_nc_progname = "clear";
     
    +static void
    +usage(void)
    +{
    +#define KEEP(s) s "\n"
    +    static const char msg[] =
    +    {
    +	KEEP("")
    +	KEEP("Options:")
    +	KEEP("  -T TERM     use this instead of $TERM")
    +	KEEP("  -V          print curses-version")
    +	KEEP("  -x          do not try to clear scrollback")
    +    };
    +#undef KEEP
    +    (void) fprintf(stderr, "Usage: %s [options]\n", _nc_progname);
    +    fputs(msg, stderr);
    +    ExitProgram(EXIT_FAILURE);
    +}
    +
     int
     main(
     	int argc GCC_UNUSED,
    @@ -51,14 +69,38 @@ main(
     {
         TTY tty_settings;
         int fd;
    +    int c;
    +    char *term;
    +    bool opt_x = FALSE;		/* clear scrollback if possible */
     
         _nc_progname = _nc_rootname(argv[0]);
    +    term = getenv("TERM");
    +
    +    while ((c = getopt(argc, argv, "T:Vx")) != -1) {
    +	switch (c) {
    +	case 'T':
    +	    use_env(FALSE);
    +	    term = optarg;
    +	    break;
    +	case 'V':
    +	    puts(curses_version());
    +	    ExitProgram(EXIT_SUCCESS);
    +	case 'x':		/* do not try to clear scrollback */
    +	    opt_x = TRUE;
    +	    break;
    +	default:
    +	    usage();
    +	    /* NOTREACHED */
    +	}
    +    }
    +    if (optind < argc)
    +	usage();
     
         fd = save_tty_settings(&tty_settings);
     
    -    setupterm((char *) 0, fd, (int *) 0);
    +    setupterm(term, fd, (int *) 0);
     
    -    ExitProgram((clear_cmd() == ERR)
    +    ExitProgram((clear_cmd(opt_x) == ERR)
     		? EXIT_FAILURE
     		: EXIT_SUCCESS);
     }
    diff --git a/progs/clear_cmd.c b/progs/clear_cmd.c
    index 07d5636c..0e1d85f5 100644
    --- a/progs/clear_cmd.c
    +++ b/progs/clear_cmd.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 2016 Free Software Foundation, Inc.                        *
    + * Copyright (c) 2016,2017 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            *
    @@ -37,7 +37,7 @@
     #define USE_LIBTINFO
     #include 
     
    -MODULE_ID("$Id: clear_cmd.c,v 1.1 2016/10/21 23:37:35 tom Exp $")
    +MODULE_ID("$Id: clear_cmd.c,v 1.2 2017/08/19 13:37:24 tom Exp $")
     
     static int
     putch(int c)
    @@ -46,14 +46,16 @@ putch(int c)
     }
     
     int
    -clear_cmd(void)
    +clear_cmd(bool legacy)
     {
         char *E3;
     
    -    /* Clear the scrollback buffer if possible. */
    -    E3 = tigetstr("E3");
    -    if (E3)
    -	(void) tputs(E3, lines > 0 ? lines : 1, putch);
    +    if (!legacy) {
    +	/* 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
    index 28b7e7f7..7ccd44c8 100644
    --- a/progs/clear_cmd.h
    +++ b/progs/clear_cmd.h
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 2016 Free Software Foundation, Inc.                        *
    + * Copyright (c) 2016,2017 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            *
    @@ -31,7 +31,7 @@
      ****************************************************************************/
     
     /*
    - * $Id: clear_cmd.h,v 1.1 2016/10/21 23:29:04 tom Exp $
    + * $Id: clear_cmd.h,v 1.2 2017/08/19 13:37:38 tom Exp $
      *
      * Utility functions for clearing terminal.
      */
    @@ -39,6 +39,6 @@
     #define CLEAR_CMD_H 1
     
     #include 
    -extern int clear_cmd(void);
    +extern int clear_cmd(bool);
     
     #endif /* CLEAR_CMD_H */
    diff --git a/progs/tput.c b/progs/tput.c
    index 5b43ca71..9bcde000 100644
    --- a/progs/tput.c
    +++ b/progs/tput.c
    @@ -50,7 +50,7 @@
     #include 
     #include 
     
    -MODULE_ID("$Id: tput.c,v 1.69 2017/01/21 17:40:51 tom Exp $")
    +MODULE_ID("$Id: tput.c,v 1.71 2017/08/19 13:44:27 tom Exp $")
     
     #define PUTS(s)		fputs(s, stdout)
     
    @@ -77,7 +77,25 @@ quit(int status, const char *fmt,...)
     static void
     usage(void)
     {
    -    fprintf(stderr, "usage: %s [-V] [-S] [-T term] capname\n", prg_name);
    +#define KEEP(s) s "\n"
    +    static const char msg[] =
    +    {
    +	KEEP("")
    +	KEEP("Options:")
    +	KEEP("  -S <<       read commands from standard input")
    +	KEEP("  -T TERM     use this instead of $TERM")
    +	KEEP("  -V          print curses-version")
    +	KEEP("  -x          do not try to clear scrollback")
    +	KEEP("")
    +	KEEP("Commands:")
    +	KEEP("  clear       clear the screen")
    +	KEEP("  init        initialize the terminal")
    +	KEEP("  reset       reinitialize the terminal")
    +	KEEP("  capname     unlike clear/init/reset, print value for capability \"capname\"")
    +    };
    +#undef KEEP
    +    (void) fprintf(stderr, "Usage: %s [options] [command]\n", prg_name);
    +    fputs(msg, stderr);
         ExitProgram(EXIT_FAILURE);
     }
     
    @@ -118,7 +136,7 @@ exit_code(int token, int value)
     }
     
     static int
    -tput_cmd(int fd, TTY * saved_settings, int argc, char *argv[])
    +tput_cmd(int fd, TTY * saved_settings, bool opt_x, int argc, char *argv[])
     {
         NCURSES_CONST char *name;
         char *s;
    @@ -165,7 +183,7 @@ tput_cmd(int fd, TTY * saved_settings, int argc, char *argv[])
       retry:
     #endif
         if (strcmp(name, "clear") == 0) {
    -	return clear_cmd();
    +	return clear_cmd(opt_x);
         } else if ((status = tigetflag(name)) != -1) {
     	return exit_code(BOOLEAN, status);
         } else if ((status = tigetnum(name)) != CANCELLED_NUMERIC) {
    @@ -264,6 +282,7 @@ main(int argc, char **argv)
         int result = 0;
         int fd;
         TTY tty_settings;
    +    bool opt_x = FALSE;		/* clear scrollback if possible */
     
         prg_name = check_aliases(_nc_rootname(argv[0]), TRUE);
     
    @@ -281,6 +300,9 @@ main(int argc, char **argv)
     	case 'V':
     	    puts(curses_version());
     	    ExitProgram(EXIT_SUCCESS);
    +	case 'x':		/* do not try to clear scrollback */
    +	    opt_x = TRUE;
    +	    break;
     	default:
     	    usage();
     	    /* NOTREACHED */
    @@ -312,7 +334,7 @@ main(int argc, char **argv)
         if (cmdline) {
     	if ((argc <= 0) && !(is_clear || is_reset || is_init))
     	    usage();
    -	ExitProgram(tput_cmd(fd, &tty_settings, argc, argv));
    +	ExitProgram(tput_cmd(fd, &tty_settings, opt_x, argc, argv));
         }
     
         while (fgets(buf, sizeof(buf), stdin) != 0) {
    @@ -333,7 +355,7 @@ main(int argc, char **argv)
     	argvec[argnum] = 0;
     
     	if (argnum != 0
    -	    && tput_cmd(fd, &tty_settings, argnum, argvec) != 0) {
    +	    && tput_cmd(fd, &tty_settings, opt_x, argnum, argvec) != 0) {
     	    if (result == 0)
     		result = 4;	/* will return value >4 */
     	    ++result;
    diff --git a/progs/tset.c b/progs/tset.c
    index d660d84d..8fb5be72 100644
    --- a/progs/tset.c
    +++ b/progs/tset.c
    @@ -97,7 +97,7 @@
     char *ttyname(int fd);
     #endif
     
    -MODULE_ID("$Id: tset.c,v 1.116 2017/01/07 22:48:20 tom Exp $")
    +MODULE_ID("$Id: tset.c,v 1.118 2017/08/19 13:16:03 tom Exp $")
     
     #ifndef environ
     extern char **environ;
    @@ -711,27 +711,36 @@ print_shell_commands(const char *ttype)
     static void
     usage(void)
     {
    -#define DATA(s) s "\n"
    +#define SKIP(s)			/* nothing */
    +#define KEEP(s) s "\n"
         static const char msg[] =
         {
    -	DATA("")
    -	DATA("Options:")
    -	DATA("  -c          set control characters")
    -	DATA("  -e ch       erase character")
    -	DATA("  -I          no initialization strings")
    -	DATA("  -i ch       interrupt character")
    -	DATA("  -k ch       kill character")
    -	DATA("  -m mapping  map identifier to type")
    -	DATA("  -Q          do not output control key settings")
    -	DATA("  -r          display term on stderr")
    -	DATA("  -s          output TERM set command")
    -	DATA("  -V          print curses-version")
    -	DATA("  -w          set window-size")
    +	KEEP("")
    +	KEEP("Options:")
    +	SKIP("  -a arpanet  (obsolete)")
    +	KEEP("  -c          set control characters")
    +	SKIP("  -d dialup   (obsolete)")
    +	KEEP("  -e ch       erase character")
    +	KEEP("  -I          no initialization strings")
    +	KEEP("  -i ch       interrupt character")
    +	KEEP("  -k ch       kill character")
    +	KEEP("  -m mapping  map identifier to type")
    +	SKIP("  -p plugboard (obsolete)")
    +	KEEP("  -Q          do not output control key settings")
    +	KEEP("  -q          display term only, do no changes")
    +	KEEP("  -r          display term on stderr")
    +	SKIP("  -S          (obsolete)")
    +	KEEP("  -s          output TERM set command")
    +	KEEP("  -V          print curses-version")
    +	KEEP("  -w          set window-size")
    +	KEEP("")
    +	KEEP("If neither -c/-w are given, both are assumed.")
         };
    -#undef DATA
    +#undef KEEP
    +#undef SKIP
         (void) fprintf(stderr, "Usage: %s [options] [terminal]\n", _nc_progname);
         fputs(msg, stderr);
    -    exit_error();
    +    ExitProgram(EXIT_FAILURE);
         /* NOTREACHED */
     }
     
    @@ -759,7 +768,7 @@ main(int argc, char **argv)
         my_fd = STDERR_FILENO;
         obsolete(argv);
         noinit = noset = quiet = Sflag = sflag = showterm = 0;
    -    while ((ch = getopt(argc, argv, "a:cd:e:Ii:k:m:p:qQSrsVw")) != -1) {
    +    while ((ch = getopt(argc, argv, "a:cd:e:Ii:k:m:p:qQrSsVw")) != -1) {
     	switch (ch) {
     	case 'c':		/* set control-chars */
     	    opt_c = TRUE;
    diff --git a/test/configure b/test/configure
    index c262a215..c061081e 100755
    --- a/test/configure
    +++ b/test/configure
    @@ -14777,6 +14777,7 @@ getopt.h \
     locale.h \
     math.h \
     stdarg.h \
    +stdint.h \
     sys/ioctl.h \
     sys/select.h \
     sys/time.h \
    @@ -14785,23 +14786,23 @@ unistd.h \
     
     do
     as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
    -echo "$as_me:14788: checking for $ac_header" >&5
    +echo "$as_me:14789: checking for $ac_header" >&5
     echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     if eval "test \"\${$as_ac_Header+set}\" = set"; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
       cat >conftest.$ac_ext <<_ACEOF
    -#line 14794 "configure"
    +#line 14795 "configure"
     #include "confdefs.h"
     #include <$ac_header>
     _ACEOF
    -if { (eval echo "$as_me:14798: \"$ac_cpp conftest.$ac_ext\"") >&5
    +if { (eval echo "$as_me:14799: \"$ac_cpp conftest.$ac_ext\"") >&5
       (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
       ac_status=$?
       egrep -v '^ *\+' conftest.er1 >conftest.err
       rm -f conftest.er1
       cat conftest.err >&5
    -  echo "$as_me:14804: \$? = $ac_status" >&5
    +  echo "$as_me:14805: \$? = $ac_status" >&5
       (exit $ac_status); } >/dev/null; then
       if test -s conftest.err; then
         ac_cpp_err=$ac_c_preproc_warn_flag
    @@ -14820,7 +14821,7 @@ else
     fi
     rm -f conftest.err conftest.$ac_ext
     fi
    -echo "$as_me:14823: result: `eval echo '${'$as_ac_Header'}'`" >&5
    +echo "$as_me:14824: result: `eval echo '${'$as_ac_Header'}'`" >&5
     echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     if test `eval echo '${'$as_ac_Header'}'` = yes; then
       cat >>confdefs.h <&5
    +echo "$as_me:14837: checking for $ac_header" >&5
     echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
     if eval "test \"\${$as_ac_Header+set}\" = set"; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
       cat >conftest.$ac_ext <<_ACEOF
    -#line 14842 "configure"
    +#line 14843 "configure"
     #include "confdefs.h"
     #include <$ac_header>
     _ACEOF
    -if { (eval echo "$as_me:14846: \"$ac_cpp conftest.$ac_ext\"") >&5
    +if { (eval echo "$as_me:14847: \"$ac_cpp conftest.$ac_ext\"") >&5
       (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
       ac_status=$?
       egrep -v '^ *\+' conftest.er1 >conftest.err
       rm -f conftest.er1
       cat conftest.err >&5
    -  echo "$as_me:14852: \$? = $ac_status" >&5
    +  echo "$as_me:14853: \$? = $ac_status" >&5
       (exit $ac_status); } >/dev/null; then
       if test -s conftest.err; then
         ac_cpp_err=$ac_c_preproc_warn_flag
    @@ -14868,7 +14869,7 @@ else
     fi
     rm -f conftest.err conftest.$ac_ext
     fi
    -echo "$as_me:14871: result: `eval echo '${'$as_ac_Header'}'`" >&5
    +echo "$as_me:14872: result: `eval echo '${'$as_ac_Header'}'`" >&5
     echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
     if test `eval echo '${'$as_ac_Header'}'` = yes; then
       cat >>confdefs.h <&5
    +echo "$as_me:14882: checking for header declaring getopt variables" >&5
     echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
     if test "${cf_cv_getopt_header+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -14888,7 +14889,7 @@ cf_cv_getopt_header=none
     for cf_header in stdio.h stdlib.h unistd.h getopt.h
     do
     cat >conftest.$ac_ext <<_ACEOF
    -#line 14891 "configure"
    +#line 14892 "configure"
     #include "confdefs.h"
     
     #include <$cf_header>
    @@ -14901,16 +14902,16 @@ int x = optind; char *y = optarg
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:14904: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:14905: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:14907: \$? = $ac_status" >&5
    +  echo "$as_me:14908: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:14910: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:14911: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:14913: \$? = $ac_status" >&5
    +  echo "$as_me:14914: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_getopt_header=$cf_header
      break
    @@ -14922,7 +14923,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
     done
     
     fi
    -echo "$as_me:14925: result: $cf_cv_getopt_header" >&5
    +echo "$as_me:14926: result: $cf_cv_getopt_header" >&5
     echo "${ECHO_T}$cf_cv_getopt_header" >&6
     if test $cf_cv_getopt_header != none ; then
     
    @@ -14947,13 +14948,13 @@ tsearch \
     
     do
     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
    -echo "$as_me:14950: checking for $ac_func" >&5
    +echo "$as_me:14951: checking for $ac_func" >&5
     echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
     if eval "test \"\${$as_ac_var+set}\" = set"; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
       cat >conftest.$ac_ext <<_ACEOF
    -#line 14956 "configure"
    +#line 14957 "configure"
     #include "confdefs.h"
     /* System header to define __stub macros and hopefully few prototypes,
         which can conflict with char $ac_func (); below.  */
    @@ -14984,16 +14985,16 @@ f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:14987: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:14988: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:14990: \$? = $ac_status" >&5
    +  echo "$as_me:14991: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:14993: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:14994: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:14996: \$? = $ac_status" >&5
    +  echo "$as_me:14997: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       eval "$as_ac_var=yes"
     else
    @@ -15003,7 +15004,7 @@ eval "$as_ac_var=no"
     fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     fi
    -echo "$as_me:15006: result: `eval echo '${'$as_ac_var'}'`" >&5
    +echo "$as_me:15007: result: `eval echo '${'$as_ac_var'}'`" >&5
     echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
     if test `eval echo '${'$as_ac_var'}'` = yes; then
       cat >>confdefs.h <&5
    +	{ { echo "$as_me:15018: error: getopt is required for building programs" >&5
     echo "$as_me: error: getopt is required for building programs" >&2;}
        { (exit 1); exit 1; }; }
     fi
    @@ -15033,13 +15034,13 @@ wcstombs \
     
     do
     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
    -echo "$as_me:15036: checking for $ac_func" >&5
    +echo "$as_me:15037: checking for $ac_func" >&5
     echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
     if eval "test \"\${$as_ac_var+set}\" = set"; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
       cat >conftest.$ac_ext <<_ACEOF
    -#line 15042 "configure"
    +#line 15043 "configure"
     #include "confdefs.h"
     /* System header to define __stub macros and hopefully few prototypes,
         which can conflict with char $ac_func (); below.  */
    @@ -15070,16 +15071,16 @@ f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:15073: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:15074: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:15076: \$? = $ac_status" >&5
    +  echo "$as_me:15077: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:15079: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:15080: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:15082: \$? = $ac_status" >&5
    +  echo "$as_me:15083: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       eval "$as_ac_var=yes"
     else
    @@ -15089,7 +15090,7 @@ eval "$as_ac_var=no"
     fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     fi
    -echo "$as_me:15092: result: `eval echo '${'$as_ac_var'}'`" >&5
    +echo "$as_me:15093: result: `eval echo '${'$as_ac_var'}'`" >&5
     echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
     if test `eval echo '${'$as_ac_var'}'` = yes; then
       cat >>confdefs.h <&5
    +echo "$as_me:15105: checking definition to turn on extended curses functions" >&5
     echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
     if test "${cf_cv_need_xopen_extension+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -15109,7 +15110,7 @@ else
     
     cf_cv_need_xopen_extension=unknown
     cat >conftest.$ac_ext <<_ACEOF
    -#line 15112 "configure"
    +#line 15113 "configure"
     #include "confdefs.h"
     
     #include 
    @@ -15135,16 +15136,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:15138: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:15139: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:15141: \$? = $ac_status" >&5
    +  echo "$as_me:15142: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:15144: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:15145: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:15147: \$? = $ac_status" >&5
    +  echo "$as_me:15148: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_need_xopen_extension=none
     else
    @@ -15154,7 +15155,7 @@ cat conftest.$ac_ext >&5
     	for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
     	do
     		cat >conftest.$ac_ext <<_ACEOF
    -#line 15157 "configure"
    +#line 15158 "configure"
     #include "confdefs.h"
     
     #define $cf_try_xopen_extension 1
    @@ -15176,16 +15177,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:15179: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:15180: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:15182: \$? = $ac_status" >&5
    +  echo "$as_me:15183: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:15185: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:15186: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:15188: \$? = $ac_status" >&5
    +  echo "$as_me:15189: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
     else
    @@ -15199,7 +15200,7 @@ fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     
     fi
    -echo "$as_me:15202: result: $cf_cv_need_xopen_extension" >&5
    +echo "$as_me:15203: result: $cf_cv_need_xopen_extension" >&5
     echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
     
     case $cf_cv_need_xopen_extension in
    @@ -15208,7 +15209,7 @@ case $cf_cv_need_xopen_extension in
     	;;
     esac
     
    -echo "$as_me:15211: checking for term.h" >&5
    +echo "$as_me:15212: checking for term.h" >&5
     echo $ECHO_N "checking for term.h... $ECHO_C" >&6
     if test "${cf_cv_term_header+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -15229,7 +15230,7 @@ esac
     for cf_header in $cf_header_list
     do
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 15232 "configure"
    +#line 15233 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -15243,16 +15244,16 @@ WINDOW *x
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:15246: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:15247: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:15249: \$? = $ac_status" >&5
    +  echo "$as_me:15250: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:15252: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:15253: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:15255: \$? = $ac_status" >&5
    +  echo "$as_me:15256: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_term_header=$cf_header
     	 break
    @@ -15271,7 +15272,7 @@ case $cf_cv_term_header in
     	for cf_header in ncurses/term.h ncursesw/term.h
     	do
     		cat >conftest.$ac_ext <<_ACEOF
    -#line 15274 "configure"
    +#line 15275 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -15289,16 +15290,16 @@ WINDOW *x
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:15292: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:15293: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:15295: \$? = $ac_status" >&5
    +  echo "$as_me:15296: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:15298: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:15299: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:15301: \$? = $ac_status" >&5
    +  echo "$as_me:15302: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_term_header=$cf_header
     			 break
    @@ -15313,7 +15314,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
     esac
     
     fi
    -echo "$as_me:15316: result: $cf_cv_term_header" >&5
    +echo "$as_me:15317: result: $cf_cv_term_header" >&5
     echo "${ECHO_T}$cf_cv_term_header" >&6
     
     case $cf_cv_term_header in
    @@ -15340,7 +15341,7 @@ EOF
     	;;
     esac
     
    -echo "$as_me:15343: checking for unctrl.h" >&5
    +echo "$as_me:15344: checking for unctrl.h" >&5
     echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
     if test "${cf_cv_unctrl_header+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -15361,7 +15362,7 @@ esac
     for cf_header in $cf_header_list
     do
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 15364 "configure"
    +#line 15365 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -15375,16 +15376,16 @@ WINDOW *x
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:15378: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:15379: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:15381: \$? = $ac_status" >&5
    +  echo "$as_me:15382: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:15384: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:15385: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:15387: \$? = $ac_status" >&5
    +  echo "$as_me:15388: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_unctrl_header=$cf_header
     	 break
    @@ -15397,12 +15398,12 @@ rm -f conftest.$ac_objext conftest.$ac_ext
     done
     
     fi
    -echo "$as_me:15400: result: $cf_cv_unctrl_header" >&5
    +echo "$as_me:15401: result: $cf_cv_unctrl_header" >&5
     echo "${ECHO_T}$cf_cv_unctrl_header" >&6
     
     case $cf_cv_unctrl_header in
     (no)
    -	{ echo "$as_me:15405: WARNING: unctrl.h header not found" >&5
    +	{ echo "$as_me:15406: WARNING: unctrl.h header not found" >&5
     echo "$as_me: WARNING: unctrl.h header not found" >&2;}
     	;;
     esac
    @@ -15481,10 +15482,10 @@ do
     
     cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
     
    -	echo "$as_me:15484: checking for ${cf_func}" >&5
    +	echo "$as_me:15485: checking for ${cf_func}" >&5
     echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
     
    -echo "${as_me:-configure}:15487: testing ${cf_func} ..." 1>&5
    +echo "${as_me:-configure}:15488: testing ${cf_func} ..." 1>&5
     
     	if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -15493,7 +15494,7 @@ else
     		eval cf_result='$ac_cv_func_'$cf_func
     		if test ".$cf_result" != ".no"; then
     			cat >conftest.$ac_ext <<_ACEOF
    -#line 15496 "configure"
    +#line 15497 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -15526,16 +15527,16 @@ if (foo + 1234 > 5678)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:15529: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:15530: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:15532: \$? = $ac_status" >&5
    +  echo "$as_me:15533: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:15535: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:15536: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:15538: \$? = $ac_status" >&5
    +  echo "$as_me:15539: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     else
    @@ -15551,7 +15552,7 @@ fi
     
     	# use the computed/retrieved cache-value:
     	eval 'cf_result=$cf_cv_func_'$cf_func
    -	echo "$as_me:15554: result: $cf_result" >&5
    +	echo "$as_me:15555: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     	if test $cf_result != no; then
     		cat >>confdefs.h <&5
    +	echo "$as_me:15570: checking for ${cf_func}" >&5
     echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
     
    -echo "${as_me:-configure}:15572: testing ${cf_func} ..." 1>&5
    +echo "${as_me:-configure}:15573: testing ${cf_func} ..." 1>&5
     
     	if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -15578,7 +15579,7 @@ else
     		eval cf_result='$ac_cv_func_'$cf_func
     		if test ".$cf_result" != ".no"; then
     			cat >conftest.$ac_ext <<_ACEOF
    -#line 15581 "configure"
    +#line 15582 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -15611,16 +15612,16 @@ if (foo + 1234 > 5678)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:15614: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:15615: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:15617: \$? = $ac_status" >&5
    +  echo "$as_me:15618: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:15620: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:15621: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:15623: \$? = $ac_status" >&5
    +  echo "$as_me:15624: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     else
    @@ -15636,7 +15637,7 @@ fi
     
     	# use the computed/retrieved cache-value:
     	eval 'cf_result=$cf_cv_func_'$cf_func
    -	echo "$as_me:15639: result: $cf_result" >&5
    +	echo "$as_me:15640: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     	if test $cf_result != no; then
     		cat >>confdefs.h <conftest.$ac_ext <<_ACEOF
    -#line 15663 "configure"
    +#line 15664 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -15680,21 +15681,21 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:15683: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:15684: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:15686: \$? = $ac_status" >&5
    +  echo "$as_me:15687: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:15689: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:15690: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:15692: \$? = $ac_status" >&5
    +  echo "$as_me:15693: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
     
     		test -n "$verbose" && echo "	prototype $cf_ret func($cf_arg value)" 1>&6
     
    -echo "${as_me:-configure}:15697: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
    +echo "${as_me:-configure}:15698: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
     
     		cat >>confdefs.h <&5
    +echo "$as_me:15718: checking for ncurses extended functions" >&5
     echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
     if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 15724 "configure"
    +#line 15725 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -15736,16 +15737,16 @@ int x = NCURSES_EXT_FUNCS
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:15739: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:15740: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:15742: \$? = $ac_status" >&5
    +  echo "$as_me:15743: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:15745: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:15746: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:15748: \$? = $ac_status" >&5
    +  echo "$as_me:15749: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_ncurses_ext_funcs=defined
     else
    @@ -15753,7 +15754,7 @@ else
     cat conftest.$ac_ext >&5
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 15756 "configure"
    +#line 15757 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -15778,16 +15779,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:15781: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:15782: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:15784: \$? = $ac_status" >&5
    +  echo "$as_me:15785: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:15787: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:15788: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:15790: \$? = $ac_status" >&5
    +  echo "$as_me:15791: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_ncurses_ext_funcs=yes
     else
    @@ -15801,7 +15802,7 @@ fi
     rm -f conftest.$ac_objext conftest.$ac_ext
     
     fi
    -echo "$as_me:15804: result: $cf_cv_ncurses_ext_funcs" >&5
    +echo "$as_me:15805: result: $cf_cv_ncurses_ext_funcs" >&5
     echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
     test "$cf_cv_ncurses_ext_funcs" = yes &&
     cat >>confdefs.h <<\EOF
    @@ -15815,11 +15816,11 @@ then
     	if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
     	then
     		cf_define_xpg5=no
    -		echo "$as_me:15818: checking if _XPG5 should be defined to enable wide-characters" >&5
    +		echo "$as_me:15819: checking if _XPG5 should be defined to enable wide-characters" >&5
     echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
     
     		cat >conftest.$ac_ext <<_ACEOF
    -#line 15822 "configure"
    +#line 15823 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -15832,16 +15833,16 @@ int x = _XPG5
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:15835: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:15836: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:15838: \$? = $ac_status" >&5
    +  echo "$as_me:15839: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:15841: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:15842: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:15844: \$? = $ac_status" >&5
    +  echo "$as_me:15845: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       :
     else
    @@ -15850,7 +15851,7 @@ cat conftest.$ac_ext >&5
     cf_save_cppflags="$CPPFLAGS"
     			 CPPFLAGS="$CPPFLAGS -D_XPG5"
     			 cat >conftest.$ac_ext <<_ACEOF
    -#line 15853 "configure"
    +#line 15854 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -15863,16 +15864,16 @@ int x = _XPG5
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:15866: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:15867: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:15869: \$? = $ac_status" >&5
    +  echo "$as_me:15870: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:15872: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:15873: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:15875: \$? = $ac_status" >&5
    +  echo "$as_me:15876: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_define_xpg5=yes
     else
    @@ -15883,7 +15884,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
     			 CPPFLAGS="$cf_save_cppflags"
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
    -		echo "$as_me:15886: result: $cf_define_xpg5" >&5
    +		echo "$as_me:15887: result: $cf_define_xpg5" >&5
     echo "${ECHO_T}$cf_define_xpg5" >&6
     
     		if test "$cf_define_xpg5" = yes
    @@ -15892,14 +15893,14 @@ echo "${ECHO_T}$cf_define_xpg5" >&6
     		fi
     	fi
     
    -	echo "$as_me:15895: checking for wide-character functions" >&5
    +	echo "$as_me:15896: checking for wide-character functions" >&5
     echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
     if test "${cf_cv_widechar_funcs+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
     
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 15902 "configure"
    +#line 15903 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -15916,16 +15917,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:15919: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:15920: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:15922: \$? = $ac_status" >&5
    +  echo "$as_me:15923: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:15925: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:15926: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:15928: \$? = $ac_status" >&5
    +  echo "$as_me:15929: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_widechar_funcs=yes
     else
    @@ -15936,7 +15937,7 @@ fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     
     fi
    -echo "$as_me:15939: result: $cf_cv_widechar_funcs" >&5
    +echo "$as_me:15940: result: $cf_cv_widechar_funcs" >&5
     echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
     	if test "$cf_cv_widechar_funcs" != no ; then
     
    @@ -15957,14 +15958,14 @@ EOF
     
     fi
     
    -echo "$as_me:15960: checking if $cf_cv_screen library uses pthreads" >&5
    +echo "$as_me:15961: checking if $cf_cv_screen library uses pthreads" >&5
     echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
     if test "${cf_cv_use_pthreads+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 15967 "configure"
    +#line 15968 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -15982,16 +15983,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:15985: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:15986: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:15988: \$? = $ac_status" >&5
    +  echo "$as_me:15989: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:15991: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:15992: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:15994: \$? = $ac_status" >&5
    +  echo "$as_me:15995: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_use_pthreads=yes
     else
    @@ -16002,20 +16003,20 @@ fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     
     fi
    -echo "$as_me:16005: result: $cf_cv_use_pthreads" >&5
    +echo "$as_me:16006: result: $cf_cv_use_pthreads" >&5
     echo "${ECHO_T}$cf_cv_use_pthreads" >&6
     test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
     #define USE_PTHREADS 1
     EOF
     
    -echo "$as_me:16011: checking if sys/time.h works with sys/select.h" >&5
    +echo "$as_me:16012: checking if sys/time.h works with sys/select.h" >&5
     echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
     if test "${cf_cv_sys_time_select+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 16018 "configure"
    +#line 16019 "configure"
     #include "confdefs.h"
     
     #include 
    @@ -16035,16 +16036,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:16038: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:16039: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:16041: \$? = $ac_status" >&5
    +  echo "$as_me:16042: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:16044: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:16045: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:16047: \$? = $ac_status" >&5
    +  echo "$as_me:16048: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_sys_time_select=yes
     else
    @@ -16056,7 +16057,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
     
     fi
     
    -echo "$as_me:16059: result: $cf_cv_sys_time_select" >&5
    +echo "$as_me:16060: result: $cf_cv_sys_time_select" >&5
     echo "${ECHO_T}$cf_cv_sys_time_select" >&6
     test "$cf_cv_sys_time_select" = yes &&
     cat >>confdefs.h <<\EOF
    @@ -16065,7 +16066,7 @@ EOF
     
     # special check for test/ditto.c
     
    -echo "$as_me:16068: checking for openpty in -lutil" >&5
    +echo "$as_me:16069: checking for openpty in -lutil" >&5
     echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
     if test "${ac_cv_lib_util_openpty+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -16073,7 +16074,7 @@ else
       ac_check_lib_save_LIBS=$LIBS
     LIBS="-lutil  $LIBS"
     cat >conftest.$ac_ext <<_ACEOF
    -#line 16076 "configure"
    +#line 16077 "configure"
     #include "confdefs.h"
     
     /* Override any gcc2 internal prototype to avoid an error.  */
    @@ -16092,16 +16093,16 @@ openpty ();
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:16095: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:16096: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:16098: \$? = $ac_status" >&5
    +  echo "$as_me:16099: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:16101: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:16102: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:16104: \$? = $ac_status" >&5
    +  echo "$as_me:16105: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       ac_cv_lib_util_openpty=yes
     else
    @@ -16112,7 +16113,7 @@ fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     LIBS=$ac_check_lib_save_LIBS
     fi
    -echo "$as_me:16115: result: $ac_cv_lib_util_openpty" >&5
    +echo "$as_me:16116: result: $ac_cv_lib_util_openpty" >&5
     echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
     if test $ac_cv_lib_util_openpty = yes; then
       cf_cv_lib_util=yes
    @@ -16120,7 +16121,7 @@ else
       cf_cv_lib_util=no
     fi
     
    -echo "$as_me:16123: checking for openpty header" >&5
    +echo "$as_me:16124: checking for openpty header" >&5
     echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
     if test "${cf_cv_func_openpty+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -16147,7 +16148,7 @@ LIBS="$cf_add_libs"
     	for cf_header in pty.h libutil.h util.h
     	do
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 16150 "configure"
    +#line 16151 "configure"
     #include "confdefs.h"
     
     #include <$cf_header>
    @@ -16164,16 +16165,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:16167: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:16168: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:16170: \$? = $ac_status" >&5
    +  echo "$as_me:16171: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:16173: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:16174: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:16176: \$? = $ac_status" >&5
    +  echo "$as_me:16177: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
     
     		cf_cv_func_openpty=$cf_header
    @@ -16191,7 +16192,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     	LIBS="$cf_save_LIBS"
     
     fi
    -echo "$as_me:16194: result: $cf_cv_func_openpty" >&5
    +echo "$as_me:16195: result: $cf_cv_func_openpty" >&5
     echo "${ECHO_T}$cf_cv_func_openpty" >&6
     
     if test "$cf_cv_func_openpty" != no ; then
    @@ -16225,7 +16226,7 @@ TEST_LIBS="$cf_add_libs"
     	fi
     fi
     
    -echo "$as_me:16228: checking for function curses_version" >&5
    +echo "$as_me:16229: checking for function curses_version" >&5
     echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
     if test "${cf_cv_func_curses_version+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -16235,7 +16236,7 @@ if test "$cross_compiling" = yes; then
       cf_cv_func_curses_version=unknown
     else
       cat >conftest.$ac_ext <<_ACEOF
    -#line 16238 "configure"
    +#line 16239 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -16248,15 +16249,15 @@ int main(void)
     
     _ACEOF
     rm -f conftest$ac_exeext
    -if { (eval echo "$as_me:16251: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:16252: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:16254: \$? = $ac_status" >&5
    +  echo "$as_me:16255: \$? = $ac_status" >&5
       (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    -  { (eval echo "$as_me:16256: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:16257: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:16259: \$? = $ac_status" >&5
    +  echo "$as_me:16260: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_func_curses_version=yes
     
    @@ -16271,14 +16272,14 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
     fi
     rm -f core
     fi
    -echo "$as_me:16274: result: $cf_cv_func_curses_version" >&5
    +echo "$as_me:16275: result: $cf_cv_func_curses_version" >&5
     echo "${ECHO_T}$cf_cv_func_curses_version" >&6
     test "$cf_cv_func_curses_version" = yes &&
     cat >>confdefs.h <<\EOF
     #define HAVE_CURSES_VERSION 1
     EOF
     
    -echo "$as_me:16281: checking for alternate character set array" >&5
    +echo "$as_me:16282: checking for alternate character set array" >&5
     echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
     if test "${cf_cv_curses_acs_map+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -16288,7 +16289,7 @@ cf_cv_curses_acs_map=unknown
     for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
     do
     cat >conftest.$ac_ext <<_ACEOF
    -#line 16291 "configure"
    +#line 16292 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -16304,16 +16305,16 @@ $name['k'] = ACS_PLUS
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:16307: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:16308: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:16310: \$? = $ac_status" >&5
    +  echo "$as_me:16311: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:16313: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:16314: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:16316: \$? = $ac_status" >&5
    +  echo "$as_me:16317: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_curses_acs_map=$name; break
     else
    @@ -16324,7 +16325,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     done
     
     fi
    -echo "$as_me:16327: result: $cf_cv_curses_acs_map" >&5
    +echo "$as_me:16328: result: $cf_cv_curses_acs_map" >&5
     echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
     
     test "$cf_cv_curses_acs_map" != unknown &&
    @@ -16334,7 +16335,7 @@ EOF
     
     if test "$cf_enable_widec" = yes; then
     
    -echo "$as_me:16337: checking for wide alternate character set array" >&5
    +echo "$as_me:16338: checking for wide alternate character set array" >&5
     echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
     if test "${cf_cv_curses_wacs_map+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -16344,7 +16345,7 @@ else
     	for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
     	do
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 16347 "configure"
    +#line 16348 "configure"
     #include "confdefs.h"
     
     #ifndef _XOPEN_SOURCE_EXTENDED
    @@ -16360,16 +16361,16 @@ void *foo = &($name['k'])
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:16363: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:16364: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:16366: \$? = $ac_status" >&5
    +  echo "$as_me:16367: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:16369: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:16370: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:16372: \$? = $ac_status" >&5
    +  echo "$as_me:16373: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_curses_wacs_map=$name
     	 break
    @@ -16380,7 +16381,7 @@ fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     	done
     fi
    -echo "$as_me:16383: result: $cf_cv_curses_wacs_map" >&5
    +echo "$as_me:16384: result: $cf_cv_curses_wacs_map" >&5
     echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
     
     test "$cf_cv_curses_wacs_map" != unknown &&
    @@ -16388,7 +16389,7 @@ cat >>confdefs.h <&5
    +echo "$as_me:16392: checking for wide alternate character constants" >&5
     echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
     if test "${cf_cv_curses_wacs_symbols+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -16398,7 +16399,7 @@ cf_cv_curses_wacs_symbols=no
     if test "$cf_cv_curses_wacs_map" != unknown
     then
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 16401 "configure"
    +#line 16402 "configure"
     #include "confdefs.h"
     
     #ifndef _XOPEN_SOURCE_EXTENDED
    @@ -16415,16 +16416,16 @@ cchar_t *foo = WACS_PLUS;
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:16418: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:16419: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:16421: \$? = $ac_status" >&5
    +  echo "$as_me:16422: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:16424: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:16425: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:16427: \$? = $ac_status" >&5
    +  echo "$as_me:16428: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_curses_wacs_symbols=yes
     else
    @@ -16434,7 +16435,7 @@ fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     else
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 16437 "configure"
    +#line 16438 "configure"
     #include "confdefs.h"
     
     #ifndef _XOPEN_SOURCE_EXTENDED
    @@ -16450,16 +16451,16 @@ cchar_t *foo = WACS_PLUS
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:16453: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:16454: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:16456: \$? = $ac_status" >&5
    +  echo "$as_me:16457: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:16459: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:16460: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:16462: \$? = $ac_status" >&5
    +  echo "$as_me:16463: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_curses_wacs_symbols=yes
     else
    @@ -16470,7 +16471,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     fi
     
     fi
    -echo "$as_me:16473: result: $cf_cv_curses_wacs_symbols" >&5
    +echo "$as_me:16474: result: $cf_cv_curses_wacs_symbols" >&5
     echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
     
     test "$cf_cv_curses_wacs_symbols" != no &&
    @@ -16480,10 +16481,10 @@ EOF
     
     fi
     
    -echo "$as_me:16483: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
    +echo "$as_me:16484: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
     echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
     cat >conftest.$ac_ext <<_ACEOF
    -#line 16486 "configure"
    +#line 16487 "configure"
     #include "confdefs.h"
     
     #ifndef _XOPEN_SOURCE_EXTENDED
    @@ -16501,16 +16502,16 @@ attr_t foo
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:16504: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:16505: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:16507: \$? = $ac_status" >&5
    +  echo "$as_me:16508: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:16510: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:16511: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:16513: \$? = $ac_status" >&5
    +  echo "$as_me:16514: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     else
    @@ -16519,7 +16520,7 @@ cat conftest.$ac_ext >&5
     cf_result=no
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
    -echo "$as_me:16522: result: $cf_result" >&5
    +echo "$as_me:16523: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     if test $cf_result = yes ; then
     
    @@ -16540,14 +16541,14 @@ fi
     if test "$cf_enable_widec" = yes; then
     
     # This is needed on Tru64 5.0 to declare mbstate_t
    -echo "$as_me:16543: checking if we must include wchar.h to declare mbstate_t" >&5
    +echo "$as_me:16544: checking if we must include wchar.h to declare mbstate_t" >&5
     echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
     if test "${cf_cv_mbstate_t+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 16550 "configure"
    +#line 16551 "configure"
     #include "confdefs.h"
     
     #include 
    @@ -16565,23 +16566,23 @@ mbstate_t state
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:16568: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:16569: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:16571: \$? = $ac_status" >&5
    +  echo "$as_me:16572: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:16574: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:16575: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:16577: \$? = $ac_status" >&5
    +  echo "$as_me:16578: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_mbstate_t=no
     else
       echo "$as_me: failed program was:" >&5
     cat conftest.$ac_ext >&5
     cat >conftest.$ac_ext <<_ACEOF
    -#line 16584 "configure"
    +#line 16585 "configure"
     #include "confdefs.h"
     
     #include 
    @@ -16600,16 +16601,16 @@ mbstate_t value
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:16603: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:16604: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:16606: \$? = $ac_status" >&5
    +  echo "$as_me:16607: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:16609: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:16610: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:16612: \$? = $ac_status" >&5
    +  echo "$as_me:16613: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_mbstate_t=yes
     else
    @@ -16621,7 +16622,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
     fi
    -echo "$as_me:16624: result: $cf_cv_mbstate_t" >&5
    +echo "$as_me:16625: result: $cf_cv_mbstate_t" >&5
     echo "${ECHO_T}$cf_cv_mbstate_t" >&6
     
     if test "$cf_cv_mbstate_t" = yes ; then
    @@ -16644,14 +16645,14 @@ if test "$cf_cv_mbstate_t" != unknown ; then
     fi
     
     # This is needed on Tru64 5.0 to declare wchar_t
    -echo "$as_me:16647: checking if we must include wchar.h to declare wchar_t" >&5
    +echo "$as_me:16648: checking if we must include wchar.h to declare wchar_t" >&5
     echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
     if test "${cf_cv_wchar_t+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 16654 "configure"
    +#line 16655 "configure"
     #include "confdefs.h"
     
     #include 
    @@ -16669,23 +16670,23 @@ wchar_t state
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:16672: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:16673: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:16675: \$? = $ac_status" >&5
    +  echo "$as_me:16676: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:16678: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:16679: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:16681: \$? = $ac_status" >&5
    +  echo "$as_me:16682: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_wchar_t=no
     else
       echo "$as_me: failed program was:" >&5
     cat conftest.$ac_ext >&5
     cat >conftest.$ac_ext <<_ACEOF
    -#line 16688 "configure"
    +#line 16689 "configure"
     #include "confdefs.h"
     
     #include 
    @@ -16704,16 +16705,16 @@ wchar_t value
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:16707: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:16708: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:16710: \$? = $ac_status" >&5
    +  echo "$as_me:16711: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:16713: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:16714: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:16716: \$? = $ac_status" >&5
    +  echo "$as_me:16717: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_wchar_t=yes
     else
    @@ -16725,7 +16726,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
     fi
    -echo "$as_me:16728: result: $cf_cv_wchar_t" >&5
    +echo "$as_me:16729: result: $cf_cv_wchar_t" >&5
     echo "${ECHO_T}$cf_cv_wchar_t" >&6
     
     if test "$cf_cv_wchar_t" = yes ; then
    @@ -16748,14 +16749,14 @@ if test "$cf_cv_wchar_t" != unknown ; then
     fi
     
     # This is needed on Tru64 5.0 to declare wint_t
    -echo "$as_me:16751: checking if we must include wchar.h to declare wint_t" >&5
    +echo "$as_me:16752: checking if we must include wchar.h to declare wint_t" >&5
     echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
     if test "${cf_cv_wint_t+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 16758 "configure"
    +#line 16759 "configure"
     #include "confdefs.h"
     
     #include 
    @@ -16773,23 +16774,23 @@ wint_t state
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:16776: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:16777: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:16779: \$? = $ac_status" >&5
    +  echo "$as_me:16780: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:16782: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:16783: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:16785: \$? = $ac_status" >&5
    +  echo "$as_me:16786: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_wint_t=no
     else
       echo "$as_me: failed program was:" >&5
     cat conftest.$ac_ext >&5
     cat >conftest.$ac_ext <<_ACEOF
    -#line 16792 "configure"
    +#line 16793 "configure"
     #include "confdefs.h"
     
     #include 
    @@ -16808,16 +16809,16 @@ wint_t value
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:16811: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:16812: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:16814: \$? = $ac_status" >&5
    +  echo "$as_me:16815: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:16817: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:16818: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:16820: \$? = $ac_status" >&5
    +  echo "$as_me:16821: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_wint_t=yes
     else
    @@ -16829,7 +16830,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
     fi
    -echo "$as_me:16832: result: $cf_cv_wint_t" >&5
    +echo "$as_me:16833: result: $cf_cv_wint_t" >&5
     echo "${ECHO_T}$cf_cv_wint_t" >&6
     
     if test "$cf_cv_wint_t" = yes ; then
    @@ -16853,10 +16854,10 @@ fi
     
     	if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
     
    -echo "$as_me:16856: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
    +echo "$as_me:16857: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
     echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
     cat >conftest.$ac_ext <<_ACEOF
    -#line 16859 "configure"
    +#line 16860 "configure"
     #include "confdefs.h"
     
     #ifndef _XOPEN_SOURCE_EXTENDED
    @@ -16874,16 +16875,16 @@ mbstate_t foo
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:16877: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:16878: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:16880: \$? = $ac_status" >&5
    +  echo "$as_me:16881: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:16883: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:16884: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:16886: \$? = $ac_status" >&5
    +  echo "$as_me:16887: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     else
    @@ -16892,7 +16893,7 @@ cat conftest.$ac_ext >&5
     cf_result=no
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
    -echo "$as_me:16895: result: $cf_result" >&5
    +echo "$as_me:16896: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     if test $cf_result = yes ; then
     
    @@ -16914,10 +16915,10 @@ fi
     
     	if test "$NCURSES_OK_WCHAR_T" = 0 ; then
     
    -echo "$as_me:16917: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
    +echo "$as_me:16918: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
     echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
     cat >conftest.$ac_ext <<_ACEOF
    -#line 16920 "configure"
    +#line 16921 "configure"
     #include "confdefs.h"
     
     #ifndef _XOPEN_SOURCE_EXTENDED
    @@ -16935,16 +16936,16 @@ wchar_t foo
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:16938: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:16939: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:16941: \$? = $ac_status" >&5
    +  echo "$as_me:16942: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:16944: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:16945: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:16947: \$? = $ac_status" >&5
    +  echo "$as_me:16948: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     else
    @@ -16953,7 +16954,7 @@ cat conftest.$ac_ext >&5
     cf_result=no
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
    -echo "$as_me:16956: result: $cf_result" >&5
    +echo "$as_me:16957: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     if test $cf_result = yes ; then
     
    @@ -16975,10 +16976,10 @@ fi
     
     	if test "$NCURSES_OK_WINT_T" = 0 ; then
     
    -echo "$as_me:16978: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
    +echo "$as_me:16979: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
     echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
     cat >conftest.$ac_ext <<_ACEOF
    -#line 16981 "configure"
    +#line 16982 "configure"
     #include "confdefs.h"
     
     #ifndef _XOPEN_SOURCE_EXTENDED
    @@ -16996,16 +16997,16 @@ wint_t foo
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:16999: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:17000: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:17002: \$? = $ac_status" >&5
    +  echo "$as_me:17003: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:17005: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17006: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17008: \$? = $ac_status" >&5
    +  echo "$as_me:17009: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     else
    @@ -17014,7 +17015,7 @@ cat conftest.$ac_ext >&5
     cf_result=no
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
    -echo "$as_me:17017: result: $cf_result" >&5
    +echo "$as_me:17018: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     if test $cf_result = yes ; then
     
    @@ -17037,11 +17038,11 @@ fi
     
     for cf_data in ospeed
     do
    -echo "$as_me:17040: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
    +echo "$as_me:17041: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
     echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 17044 "configure"
    +#line 17045 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -17069,16 +17070,16 @@ void *foo = &($cf_data)
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:17072: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:17073: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:17075: \$? = $ac_status" >&5
    +  echo "$as_me:17076: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:17078: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17079: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17081: \$? = $ac_status" >&5
    +  echo "$as_me:17082: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     
    @@ -17088,7 +17089,7 @@ cat conftest.$ac_ext >&5
     cf_result=no
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
    -echo "$as_me:17091: result: $cf_result" >&5
    +echo "$as_me:17092: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     
     if test $cf_result = yes ; then
    @@ -17100,14 +17101,14 @@ cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./
     EOF
     
     else
    -	echo "$as_me:17103: checking for data $cf_data in library" >&5
    +	echo "$as_me:17104: checking for data $cf_data in library" >&5
     echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
     	# BSD linkers insist on making weak linkage, but resolve at runtime.
     	if test "$cross_compiling" = yes; then
     
     	# cross-compiling
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 17110 "configure"
    +#line 17111 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -17140,16 +17141,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:17143: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:17144: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:17146: \$? = $ac_status" >&5
    +  echo "$as_me:17147: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:17149: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17150: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17152: \$? = $ac_status" >&5
    +  echo "$as_me:17153: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     else
    @@ -17161,7 +17162,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     
     else
       cat >conftest.$ac_ext <<_ACEOF
    -#line 17164 "configure"
    +#line 17165 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -17187,15 +17188,15 @@ int main(void)
     }
     _ACEOF
     rm -f conftest$ac_exeext
    -if { (eval echo "$as_me:17190: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:17191: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:17193: \$? = $ac_status" >&5
    +  echo "$as_me:17194: \$? = $ac_status" >&5
       (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    -  { (eval echo "$as_me:17195: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17196: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17198: \$? = $ac_status" >&5
    +  echo "$as_me:17199: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     
    @@ -17207,7 +17208,7 @@ cf_result=no
     fi
     rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
     fi
    -	echo "$as_me:17210: result: $cf_result" >&5
    +	echo "$as_me:17211: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     	if test $cf_result = yes ; then
     
    @@ -17224,11 +17225,11 @@ done
     
     for cf_data in boolnames
     do
    -echo "$as_me:17227: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
    +echo "$as_me:17228: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
     echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 17231 "configure"
    +#line 17232 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -17256,16 +17257,16 @@ void *foo = &($cf_data)
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:17259: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:17260: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:17262: \$? = $ac_status" >&5
    +  echo "$as_me:17263: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:17265: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17266: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17268: \$? = $ac_status" >&5
    +  echo "$as_me:17269: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     
    @@ -17275,7 +17276,7 @@ cat conftest.$ac_ext >&5
     cf_result=no
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
    -echo "$as_me:17278: result: $cf_result" >&5
    +echo "$as_me:17279: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     
     if test $cf_result = yes ; then
    @@ -17287,14 +17288,14 @@ cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./
     EOF
     
     else
    -	echo "$as_me:17290: checking for data $cf_data in library" >&5
    +	echo "$as_me:17291: checking for data $cf_data in library" >&5
     echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
     	# BSD linkers insist on making weak linkage, but resolve at runtime.
     	if test "$cross_compiling" = yes; then
     
     	# cross-compiling
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 17297 "configure"
    +#line 17298 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -17327,16 +17328,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:17330: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:17331: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:17333: \$? = $ac_status" >&5
    +  echo "$as_me:17334: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:17336: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17337: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17339: \$? = $ac_status" >&5
    +  echo "$as_me:17340: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     else
    @@ -17348,7 +17349,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     
     else
       cat >conftest.$ac_ext <<_ACEOF
    -#line 17351 "configure"
    +#line 17352 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -17374,15 +17375,15 @@ int main(void)
     }
     _ACEOF
     rm -f conftest$ac_exeext
    -if { (eval echo "$as_me:17377: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:17378: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:17380: \$? = $ac_status" >&5
    +  echo "$as_me:17381: \$? = $ac_status" >&5
       (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    -  { (eval echo "$as_me:17382: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17383: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17385: \$? = $ac_status" >&5
    +  echo "$as_me:17386: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     
    @@ -17394,7 +17395,7 @@ cf_result=no
     fi
     rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
     fi
    -	echo "$as_me:17397: result: $cf_result" >&5
    +	echo "$as_me:17398: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     	if test $cf_result = yes ; then
     
    @@ -17411,11 +17412,11 @@ done
     
     for cf_data in boolfnames
     do
    -echo "$as_me:17414: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
    +echo "$as_me:17415: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
     echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 17418 "configure"
    +#line 17419 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -17443,16 +17444,16 @@ void *foo = &($cf_data)
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:17446: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:17447: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:17449: \$? = $ac_status" >&5
    +  echo "$as_me:17450: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:17452: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17453: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17455: \$? = $ac_status" >&5
    +  echo "$as_me:17456: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     
    @@ -17462,7 +17463,7 @@ cat conftest.$ac_ext >&5
     cf_result=no
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
    -echo "$as_me:17465: result: $cf_result" >&5
    +echo "$as_me:17466: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     
     if test $cf_result = yes ; then
    @@ -17474,14 +17475,14 @@ cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./
     EOF
     
     else
    -	echo "$as_me:17477: checking for data $cf_data in library" >&5
    +	echo "$as_me:17478: checking for data $cf_data in library" >&5
     echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
     	# BSD linkers insist on making weak linkage, but resolve at runtime.
     	if test "$cross_compiling" = yes; then
     
     	# cross-compiling
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 17484 "configure"
    +#line 17485 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -17514,16 +17515,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:17517: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:17518: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:17520: \$? = $ac_status" >&5
    +  echo "$as_me:17521: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:17523: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17524: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17526: \$? = $ac_status" >&5
    +  echo "$as_me:17527: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     else
    @@ -17535,7 +17536,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     
     else
       cat >conftest.$ac_ext <<_ACEOF
    -#line 17538 "configure"
    +#line 17539 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -17561,15 +17562,15 @@ int main(void)
     }
     _ACEOF
     rm -f conftest$ac_exeext
    -if { (eval echo "$as_me:17564: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:17565: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:17567: \$? = $ac_status" >&5
    +  echo "$as_me:17568: \$? = $ac_status" >&5
       (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    -  { (eval echo "$as_me:17569: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17570: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17572: \$? = $ac_status" >&5
    +  echo "$as_me:17573: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     
    @@ -17581,7 +17582,7 @@ cf_result=no
     fi
     rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
     fi
    -	echo "$as_me:17584: result: $cf_result" >&5
    +	echo "$as_me:17585: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     	if test $cf_result = yes ; then
     
    @@ -17598,11 +17599,11 @@ done
     
     for cf_data in ttytype
     do
    -echo "$as_me:17601: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
    +echo "$as_me:17602: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
     echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 17605 "configure"
    +#line 17606 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -17630,16 +17631,16 @@ void *foo = &($cf_data)
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:17633: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:17634: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:17636: \$? = $ac_status" >&5
    +  echo "$as_me:17637: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:17639: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17640: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17642: \$? = $ac_status" >&5
    +  echo "$as_me:17643: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     
    @@ -17649,7 +17650,7 @@ cat conftest.$ac_ext >&5
     cf_result=no
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
    -echo "$as_me:17652: result: $cf_result" >&5
    +echo "$as_me:17653: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     
     if test $cf_result = yes ; then
    @@ -17661,14 +17662,14 @@ cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./
     EOF
     
     else
    -	echo "$as_me:17664: checking for data $cf_data in library" >&5
    +	echo "$as_me:17665: checking for data $cf_data in library" >&5
     echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
     	# BSD linkers insist on making weak linkage, but resolve at runtime.
     	if test "$cross_compiling" = yes; then
     
     	# cross-compiling
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 17671 "configure"
    +#line 17672 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -17701,16 +17702,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:17704: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:17705: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:17707: \$? = $ac_status" >&5
    +  echo "$as_me:17708: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:17710: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17711: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17713: \$? = $ac_status" >&5
    +  echo "$as_me:17714: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     else
    @@ -17722,7 +17723,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     
     else
       cat >conftest.$ac_ext <<_ACEOF
    -#line 17725 "configure"
    +#line 17726 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -17748,15 +17749,15 @@ int main(void)
     }
     _ACEOF
     rm -f conftest$ac_exeext
    -if { (eval echo "$as_me:17751: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:17752: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:17754: \$? = $ac_status" >&5
    +  echo "$as_me:17755: \$? = $ac_status" >&5
       (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    -  { (eval echo "$as_me:17756: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17757: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17759: \$? = $ac_status" >&5
    +  echo "$as_me:17760: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     
    @@ -17768,7 +17769,7 @@ cf_result=no
     fi
     rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
     fi
    -	echo "$as_me:17771: result: $cf_result" >&5
    +	echo "$as_me:17772: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     	if test $cf_result = yes ; then
     
    @@ -17785,7 +17786,7 @@ done
     
     if ( test "$GCC" = yes || test "$GXX" = yes )
     then
    -echo "$as_me:17788: checking if you want to turn on gcc warnings" >&5
    +echo "$as_me:17789: checking if you want to turn on gcc warnings" >&5
     echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
     
     # Check whether --enable-warnings or --disable-warnings was given.
    @@ -17802,7 +17803,7 @@ else
     	with_warnings=no
     
     fi;
    -echo "$as_me:17805: result: $with_warnings" >&5
    +echo "$as_me:17806: result: $with_warnings" >&5
     echo "${ECHO_T}$with_warnings" >&6
     if test "$with_warnings" = "yes"
     then
    @@ -17825,10 +17826,10 @@ cat > conftest.i <&5
    +	{ echo "$as_me:17829: checking for $CC __attribute__ directives..." >&5
     echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
     cat > conftest.$ac_ext <&5
    +		if { (eval echo "$as_me:17881: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:17883: \$? = $ac_status" >&5
    +  echo "$as_me:17884: \$? = $ac_status" >&5
       (exit $ac_status); }; then
    -			test -n "$verbose" && echo "$as_me:17885: result: ... $cf_attribute" >&5
    +			test -n "$verbose" && echo "$as_me:17886: result: ... $cf_attribute" >&5
     echo "${ECHO_T}... $cf_attribute" >&6
     			cat conftest.h >>confdefs.h
     			case $cf_attribute in
    @@ -17946,12 +17947,12 @@ INTEL_COMPILER=no
     if test "$GCC" = yes ; then
     	case $host_os in
     	(linux*|gnu*)
    -		echo "$as_me:17949: checking if this is really Intel C compiler" >&5
    +		echo "$as_me:17950: checking if this is really Intel C compiler" >&5
     echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
     		cf_save_CFLAGS="$CFLAGS"
     		CFLAGS="$CFLAGS -no-gcc"
     		cat >conftest.$ac_ext <<_ACEOF
    -#line 17954 "configure"
    +#line 17955 "configure"
     #include "confdefs.h"
     
     int
    @@ -17968,16 +17969,16 @@ make an error
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:17971: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:17972: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:17974: \$? = $ac_status" >&5
    +  echo "$as_me:17975: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:17977: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17978: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17980: \$? = $ac_status" >&5
    +  echo "$as_me:17981: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       INTEL_COMPILER=yes
     cf_save_CFLAGS="$cf_save_CFLAGS -we147"
    @@ -17988,7 +17989,7 @@ cat conftest.$ac_ext >&5
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
     		CFLAGS="$cf_save_CFLAGS"
    -		echo "$as_me:17991: result: $INTEL_COMPILER" >&5
    +		echo "$as_me:17992: result: $INTEL_COMPILER" >&5
     echo "${ECHO_T}$INTEL_COMPILER" >&6
     		;;
     	esac
    @@ -17997,12 +17998,12 @@ fi
     CLANG_COMPILER=no
     
     if test "$GCC" = yes ; then
    -	echo "$as_me:18000: checking if this is really Clang C compiler" >&5
    +	echo "$as_me:18001: checking if this is really Clang C compiler" >&5
     echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
     	cf_save_CFLAGS="$CFLAGS"
     	CFLAGS="$CFLAGS -Qunused-arguments"
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 18005 "configure"
    +#line 18006 "configure"
     #include "confdefs.h"
     
     int
    @@ -18019,16 +18020,16 @@ make an error
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:18022: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:18023: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:18025: \$? = $ac_status" >&5
    +  echo "$as_me:18026: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:18028: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18029: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18031: \$? = $ac_status" >&5
    +  echo "$as_me:18032: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       CLANG_COMPILER=yes
     cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
    @@ -18039,12 +18040,12 @@ cat conftest.$ac_ext >&5
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
     	CFLAGS="$cf_save_CFLAGS"
    -	echo "$as_me:18042: result: $CLANG_COMPILER" >&5
    +	echo "$as_me:18043: result: $CLANG_COMPILER" >&5
     echo "${ECHO_T}$CLANG_COMPILER" >&6
     fi
     
     cat > conftest.$ac_ext <&5
    +	{ echo "$as_me:18065: checking for $CC warning options..." >&5
     echo "$as_me: checking for $CC warning options..." >&6;}
     	cf_save_CFLAGS="$CFLAGS"
     	EXTRA_CFLAGS="-Wall"
    @@ -18077,12 +18078,12 @@ echo "$as_me: checking for $CC warning options..." >&6;}
     		wd981
     	do
     		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
    -		if { (eval echo "$as_me:18080: \"$ac_compile\"") >&5
    +		if { (eval echo "$as_me:18081: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:18083: \$? = $ac_status" >&5
    +  echo "$as_me:18084: \$? = $ac_status" >&5
       (exit $ac_status); }; then
    -			test -n "$verbose" && echo "$as_me:18085: result: ... -$cf_opt" >&5
    +			test -n "$verbose" && echo "$as_me:18086: result: ... -$cf_opt" >&5
     echo "${ECHO_T}... -$cf_opt" >&6
     			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
     		fi
    @@ -18091,7 +18092,7 @@ echo "${ECHO_T}... -$cf_opt" >&6
     
     elif test "$GCC" = yes
     then
    -	{ echo "$as_me:18094: checking for $CC warning options..." >&5
    +	{ echo "$as_me:18095: checking for $CC warning options..." >&5
     echo "$as_me: checking for $CC warning options..." >&6;}
     	cf_save_CFLAGS="$CFLAGS"
     	EXTRA_CFLAGS=
    @@ -18115,12 +18116,12 @@ echo "$as_me: checking for $CC warning options..." >&6;}
     		Wundef $cf_gcc_warnings $cf_warn_CONST
     	do
     		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
    -		if { (eval echo "$as_me:18118: \"$ac_compile\"") >&5
    +		if { (eval echo "$as_me:18119: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:18121: \$? = $ac_status" >&5
    +  echo "$as_me:18122: \$? = $ac_status" >&5
       (exit $ac_status); }; then
    -			test -n "$verbose" && echo "$as_me:18123: result: ... -$cf_opt" >&5
    +			test -n "$verbose" && echo "$as_me:18124: result: ... -$cf_opt" >&5
     echo "${ECHO_T}... -$cf_opt" >&6
     			case $cf_opt in
     			(Wcast-qual)
    @@ -18131,7 +18132,7 @@ echo "${ECHO_T}... -$cf_opt" >&6
     				([34].*)
     					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
     
    -echo "${as_me:-configure}:18134: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
    +echo "${as_me:-configure}:18135: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
     
     					continue;;
     				esac
    @@ -18141,7 +18142,7 @@ echo "${as_me:-configure}:18134: testing feature is broken in gcc $GCC_VERSION .
     				([12].*)
     					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
     
    -echo "${as_me:-configure}:18144: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
    +echo "${as_me:-configure}:18145: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
     
     					continue;;
     				esac
    @@ -18157,7 +18158,7 @@ rm -rf conftest*
     fi
     fi
     
    -echo "$as_me:18160: checking if you want to use dmalloc for testing" >&5
    +echo "$as_me:18161: checking if you want to use dmalloc for testing" >&5
     echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
     
     # Check whether --with-dmalloc or --without-dmalloc was given.
    @@ -18174,7 +18175,7 @@ EOF
     else
       with_dmalloc=
     fi;
    -echo "$as_me:18177: result: ${with_dmalloc:-no}" >&5
    +echo "$as_me:18178: result: ${with_dmalloc:-no}" >&5
     echo "${ECHO_T}${with_dmalloc:-no}" >&6
     
     case .$with_cflags in
    @@ -18288,23 +18289,23 @@ fi
     esac
     
     if test "$with_dmalloc" = yes ; then
    -	echo "$as_me:18291: checking for dmalloc.h" >&5
    +	echo "$as_me:18292: checking for dmalloc.h" >&5
     echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
     if test "${ac_cv_header_dmalloc_h+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
       cat >conftest.$ac_ext <<_ACEOF
    -#line 18297 "configure"
    +#line 18298 "configure"
     #include "confdefs.h"
     #include 
     _ACEOF
    -if { (eval echo "$as_me:18301: \"$ac_cpp conftest.$ac_ext\"") >&5
    +if { (eval echo "$as_me:18302: \"$ac_cpp conftest.$ac_ext\"") >&5
       (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
       ac_status=$?
       egrep -v '^ *\+' conftest.er1 >conftest.err
       rm -f conftest.er1
       cat conftest.err >&5
    -  echo "$as_me:18307: \$? = $ac_status" >&5
    +  echo "$as_me:18308: \$? = $ac_status" >&5
       (exit $ac_status); } >/dev/null; then
       if test -s conftest.err; then
         ac_cpp_err=$ac_c_preproc_warn_flag
    @@ -18323,11 +18324,11 @@ else
     fi
     rm -f conftest.err conftest.$ac_ext
     fi
    -echo "$as_me:18326: result: $ac_cv_header_dmalloc_h" >&5
    +echo "$as_me:18327: result: $ac_cv_header_dmalloc_h" >&5
     echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
     if test $ac_cv_header_dmalloc_h = yes; then
     
    -echo "$as_me:18330: checking for dmalloc_debug in -ldmalloc" >&5
    +echo "$as_me:18331: checking for dmalloc_debug in -ldmalloc" >&5
     echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
     if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -18335,7 +18336,7 @@ else
       ac_check_lib_save_LIBS=$LIBS
     LIBS="-ldmalloc  $LIBS"
     cat >conftest.$ac_ext <<_ACEOF
    -#line 18338 "configure"
    +#line 18339 "configure"
     #include "confdefs.h"
     
     /* Override any gcc2 internal prototype to avoid an error.  */
    @@ -18354,16 +18355,16 @@ dmalloc_debug ();
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:18357: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:18358: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:18360: \$? = $ac_status" >&5
    +  echo "$as_me:18361: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:18363: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18364: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18366: \$? = $ac_status" >&5
    +  echo "$as_me:18367: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       ac_cv_lib_dmalloc_dmalloc_debug=yes
     else
    @@ -18374,7 +18375,7 @@ fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     LIBS=$ac_check_lib_save_LIBS
     fi
    -echo "$as_me:18377: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
    +echo "$as_me:18378: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
     echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
     if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
       cat >>confdefs.h <&5
    +echo "$as_me:18393: checking if you want to use dbmalloc for testing" >&5
     echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
     
     # Check whether --with-dbmalloc or --without-dbmalloc was given.
    @@ -18406,7 +18407,7 @@ EOF
     else
       with_dbmalloc=
     fi;
    -echo "$as_me:18409: result: ${with_dbmalloc:-no}" >&5
    +echo "$as_me:18410: result: ${with_dbmalloc:-no}" >&5
     echo "${ECHO_T}${with_dbmalloc:-no}" >&6
     
     case .$with_cflags in
    @@ -18520,23 +18521,23 @@ fi
     esac
     
     if test "$with_dbmalloc" = yes ; then
    -	echo "$as_me:18523: checking for dbmalloc.h" >&5
    +	echo "$as_me:18524: checking for dbmalloc.h" >&5
     echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
     if test "${ac_cv_header_dbmalloc_h+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
       cat >conftest.$ac_ext <<_ACEOF
    -#line 18529 "configure"
    +#line 18530 "configure"
     #include "confdefs.h"
     #include 
     _ACEOF
    -if { (eval echo "$as_me:18533: \"$ac_cpp conftest.$ac_ext\"") >&5
    +if { (eval echo "$as_me:18534: \"$ac_cpp conftest.$ac_ext\"") >&5
       (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
       ac_status=$?
       egrep -v '^ *\+' conftest.er1 >conftest.err
       rm -f conftest.er1
       cat conftest.err >&5
    -  echo "$as_me:18539: \$? = $ac_status" >&5
    +  echo "$as_me:18540: \$? = $ac_status" >&5
       (exit $ac_status); } >/dev/null; then
       if test -s conftest.err; then
         ac_cpp_err=$ac_c_preproc_warn_flag
    @@ -18555,11 +18556,11 @@ else
     fi
     rm -f conftest.err conftest.$ac_ext
     fi
    -echo "$as_me:18558: result: $ac_cv_header_dbmalloc_h" >&5
    +echo "$as_me:18559: result: $ac_cv_header_dbmalloc_h" >&5
     echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
     if test $ac_cv_header_dbmalloc_h = yes; then
     
    -echo "$as_me:18562: checking for debug_malloc in -ldbmalloc" >&5
    +echo "$as_me:18563: checking for debug_malloc in -ldbmalloc" >&5
     echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
     if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -18567,7 +18568,7 @@ else
       ac_check_lib_save_LIBS=$LIBS
     LIBS="-ldbmalloc  $LIBS"
     cat >conftest.$ac_ext <<_ACEOF
    -#line 18570 "configure"
    +#line 18571 "configure"
     #include "confdefs.h"
     
     /* Override any gcc2 internal prototype to avoid an error.  */
    @@ -18586,16 +18587,16 @@ debug_malloc ();
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:18589: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:18590: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:18592: \$? = $ac_status" >&5
    +  echo "$as_me:18593: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:18595: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18596: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18598: \$? = $ac_status" >&5
    +  echo "$as_me:18599: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       ac_cv_lib_dbmalloc_debug_malloc=yes
     else
    @@ -18606,7 +18607,7 @@ fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     LIBS=$ac_check_lib_save_LIBS
     fi
    -echo "$as_me:18609: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
    +echo "$as_me:18610: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
     echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
     if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
       cat >>confdefs.h <&5
    +echo "$as_me:18625: checking if you want to use valgrind for testing" >&5
     echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
     
     # Check whether --with-valgrind or --without-valgrind was given.
    @@ -18638,7 +18639,7 @@ EOF
     else
       with_valgrind=
     fi;
    -echo "$as_me:18641: result: ${with_valgrind:-no}" >&5
    +echo "$as_me:18642: result: ${with_valgrind:-no}" >&5
     echo "${ECHO_T}${with_valgrind:-no}" >&6
     
     case .$with_cflags in
    @@ -18751,7 +18752,7 @@ fi
     	;;
     esac
     
    -echo "$as_me:18754: checking if you want to perform memory-leak testing" >&5
    +echo "$as_me:18755: checking if you want to perform memory-leak testing" >&5
     echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
     
     # Check whether --enable-leaks or --disable-leaks was given.
    @@ -18761,7 +18762,7 @@ if test "${enable_leaks+set}" = set; then
     else
       : ${with_no_leaks:=no}
     fi;
    -echo "$as_me:18764: result: $with_no_leaks" >&5
    +echo "$as_me:18765: result: $with_no_leaks" >&5
     echo "${ECHO_T}$with_no_leaks" >&6
     
     if test "$with_no_leaks" = yes ; then
    @@ -18777,7 +18778,7 @@ EOF
     fi
     
     LD_RPATH_OPT=
    -echo "$as_me:18780: checking for an rpath option" >&5
    +echo "$as_me:18781: checking for an rpath option" >&5
     echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
     case $cf_cv_system_name in
     (irix*)
    @@ -18808,12 +18809,12 @@ case $cf_cv_system_name in
     (*)
     	;;
     esac
    -echo "$as_me:18811: result: $LD_RPATH_OPT" >&5
    +echo "$as_me:18812: result: $LD_RPATH_OPT" >&5
     echo "${ECHO_T}$LD_RPATH_OPT" >&6
     
     case "x$LD_RPATH_OPT" in
     (x-R*)
    -	echo "$as_me:18816: checking if we need a space after rpath option" >&5
    +	echo "$as_me:18817: checking if we need a space after rpath option" >&5
     echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
     	cf_save_LIBS="$LIBS"
     
    @@ -18834,7 +18835,7 @@ done
     LIBS="$cf_add_libs"
     
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 18837 "configure"
    +#line 18838 "configure"
     #include "confdefs.h"
     
     int
    @@ -18846,16 +18847,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:18849: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:18850: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:18852: \$? = $ac_status" >&5
    +  echo "$as_me:18853: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:18855: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18856: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18858: \$? = $ac_status" >&5
    +  echo "$as_me:18859: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_rpath_space=no
     else
    @@ -18865,13 +18866,13 @@ cf_rpath_space=yes
     fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     	LIBS="$cf_save_LIBS"
    -	echo "$as_me:18868: result: $cf_rpath_space" >&5
    +	echo "$as_me:18869: result: $cf_rpath_space" >&5
     echo "${ECHO_T}$cf_rpath_space" >&6
     	test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
     	;;
     esac
     
    -echo "$as_me:18874: checking if rpath-hack should be disabled" >&5
    +echo "$as_me:18875: checking if rpath-hack should be disabled" >&5
     echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
     
     # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
    @@ -18888,21 +18889,21 @@ else
     	cf_disable_rpath_hack=no
     
     fi;
    -echo "$as_me:18891: result: $cf_disable_rpath_hack" >&5
    +echo "$as_me:18892: result: $cf_disable_rpath_hack" >&5
     echo "${ECHO_T}$cf_disable_rpath_hack" >&6
     if test "$cf_disable_rpath_hack" = no ; then
     
    -echo "$as_me:18895: checking for updated LDFLAGS" >&5
    +echo "$as_me:18896: checking for updated LDFLAGS" >&5
     echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
     if test -n "$LD_RPATH_OPT" ; then
    -	echo "$as_me:18898: result: maybe" >&5
    +	echo "$as_me:18899: result: maybe" >&5
     echo "${ECHO_T}maybe" >&6
     
     	for ac_prog in ldd
     do
       # Extract the first word of "$ac_prog", so it can be a program name with args.
     set dummy $ac_prog; ac_word=$2
    -echo "$as_me:18905: checking for $ac_word" >&5
    +echo "$as_me:18906: checking for $ac_word" >&5
     echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
     if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -18917,7 +18918,7 @@ for ac_dir in $ac_dummy; do
       test -z "$ac_dir" && ac_dir=.
       $as_executable_p "$ac_dir/$ac_word" || continue
     ac_cv_prog_cf_ldd_prog="$ac_prog"
    -echo "$as_me:18920: found $ac_dir/$ac_word" >&5
    +echo "$as_me:18921: found $ac_dir/$ac_word" >&5
     break
     done
     
    @@ -18925,10 +18926,10 @@ fi
     fi
     cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
     if test -n "$cf_ldd_prog"; then
    -  echo "$as_me:18928: result: $cf_ldd_prog" >&5
    +  echo "$as_me:18929: result: $cf_ldd_prog" >&5
     echo "${ECHO_T}$cf_ldd_prog" >&6
     else
    -  echo "$as_me:18931: result: no" >&5
    +  echo "$as_me:18932: result: no" >&5
     echo "${ECHO_T}no" >&6
     fi
     
    @@ -18942,7 +18943,7 @@ test -n "$cf_ldd_prog" || cf_ldd_prog="no"
     		cf_rpath_oops=
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 18945 "configure"
    +#line 18946 "configure"
     #include "confdefs.h"
     #include 
     int
    @@ -18954,16 +18955,16 @@ printf("Hello");
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:18957: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:18958: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:18960: \$? = $ac_status" >&5
    +  echo "$as_me:18961: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:18963: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18964: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18966: \$? = $ac_status" >&5
    +  echo "$as_me:18967: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
     		 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
    @@ -18991,7 +18992,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     					then
     						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
     
    -echo "${as_me:-configure}:18994: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
    +echo "${as_me:-configure}:18995: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
     
     						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
     						break
    @@ -19003,11 +19004,11 @@ echo "${as_me:-configure}:18994: testing ...adding -L$cf_rpath_dir/lib to LDFLAG
     
     	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
     
    -echo "${as_me:-configure}:19006: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
    +echo "${as_me:-configure}:19007: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
     
     test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
     
    -echo "${as_me:-configure}:19010: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
    +echo "${as_me:-configure}:19011: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
     
     cf_rpath_dst=
     for cf_rpath_src in $LDFLAGS
    @@ -19044,7 +19045,7 @@ do
     			then
     				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
     
    -echo "${as_me:-configure}:19047: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
    +echo "${as_me:-configure}:19048: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
     
     				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
     			fi
    @@ -19057,11 +19058,11 @@ LDFLAGS=$cf_rpath_dst
     
     test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
     
    -echo "${as_me:-configure}:19060: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
    +echo "${as_me:-configure}:19061: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
     
     test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
     
    -echo "${as_me:-configure}:19064: testing ...checking LIBS $LIBS ..." 1>&5
    +echo "${as_me:-configure}:19065: testing ...checking LIBS $LIBS ..." 1>&5
     
     cf_rpath_dst=
     for cf_rpath_src in $LIBS
    @@ -19098,7 +19099,7 @@ do
     			then
     				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
     
    -echo "${as_me:-configure}:19101: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
    +echo "${as_me:-configure}:19102: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
     
     				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
     			fi
    @@ -19111,14 +19112,14 @@ LIBS=$cf_rpath_dst
     
     test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
     
    -echo "${as_me:-configure}:19114: testing ...checked LIBS $LIBS ..." 1>&5
    +echo "${as_me:-configure}:19115: testing ...checked LIBS $LIBS ..." 1>&5
     
     	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
     
    -echo "${as_me:-configure}:19118: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
    +echo "${as_me:-configure}:19119: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
     
     else
    -	echo "$as_me:19121: result: no" >&5
    +	echo "$as_me:19122: result: no" >&5
     echo "${ECHO_T}no" >&6
     fi
     
    @@ -19208,7 +19209,7 @@ DEFS=-DHAVE_CONFIG_H
     : ${CONFIG_STATUS=./config.status}
     ac_clean_files_save=$ac_clean_files
     ac_clean_files="$ac_clean_files $CONFIG_STATUS"
    -{ echo "$as_me:19211: creating $CONFIG_STATUS" >&5
    +{ echo "$as_me:19212: creating $CONFIG_STATUS" >&5
     echo "$as_me: creating $CONFIG_STATUS" >&6;}
     cat >$CONFIG_STATUS <<_ACEOF
     #! $SHELL
    @@ -19384,7 +19385,7 @@ cat >>$CONFIG_STATUS <<\EOF
         echo "$ac_cs_version"; exit 0 ;;
       --he | --h)
         # Conflict between --help and --header
    -    { { echo "$as_me:19387: error: ambiguous option: $1
    +    { { echo "$as_me:19388: error: ambiguous option: $1
     Try \`$0 --help' for more information." >&5
     echo "$as_me: error: ambiguous option: $1
     Try \`$0 --help' for more information." >&2;}
    @@ -19403,7 +19404,7 @@ Try \`$0 --help' for more information." >&2;}
         ac_need_defaults=false;;
     
       # This is an error.
    -  -*) { { echo "$as_me:19406: error: unrecognized option: $1
    +  -*) { { echo "$as_me:19407: error: unrecognized option: $1
     Try \`$0 --help' for more information." >&5
     echo "$as_me: error: unrecognized option: $1
     Try \`$0 --help' for more information." >&2;}
    @@ -19453,7 +19454,7 @@ do
       "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
       "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
       "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
    -  *) { { echo "$as_me:19456: error: invalid argument: $ac_config_target" >&5
    +  *) { { echo "$as_me:19457: error: invalid argument: $ac_config_target" >&5
     echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
        { (exit 1); exit 1; }; };;
       esac
    @@ -19744,7 +19745,7 @@ done; }
       esac
     
       if test x"$ac_file" != x-; then
    -    { echo "$as_me:19747: creating $ac_file" >&5
    +    { echo "$as_me:19748: creating $ac_file" >&5
     echo "$as_me: creating $ac_file" >&6;}
         rm -f "$ac_file"
       fi
    @@ -19762,7 +19763,7 @@ echo "$as_me: creating $ac_file" >&6;}
           -) echo $tmp/stdin ;;
           [\\/$]*)
              # Absolute (can't be DOS-style, as IFS=:)
    -         test -f "$f" || { { echo "$as_me:19765: error: cannot find input file: $f" >&5
    +         test -f "$f" || { { echo "$as_me:19766: error: cannot find input file: $f" >&5
     echo "$as_me: error: cannot find input file: $f" >&2;}
        { (exit 1); exit 1; }; }
              echo $f;;
    @@ -19775,7 +19776,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
                echo $srcdir/$f
              else
                # /dev/null tree
    -           { { echo "$as_me:19778: error: cannot find input file: $f" >&5
    +           { { echo "$as_me:19779: error: cannot find input file: $f" >&5
     echo "$as_me: error: cannot find input file: $f" >&2;}
        { (exit 1); exit 1; }; }
              fi;;
    @@ -19791,7 +19792,7 @@ cat >>$CONFIG_STATUS <<\EOF
           if test -n "$ac_seen"; then
             ac_used=`grep '@datarootdir@' $ac_item`
             if test -z "$ac_used"; then
    -          { echo "$as_me:19794: WARNING: datarootdir was used implicitly but not set:
    +          { echo "$as_me:19795: WARNING: datarootdir was used implicitly but not set:
     $ac_seen" >&5
     echo "$as_me: WARNING: datarootdir was used implicitly but not set:
     $ac_seen" >&2;}
    @@ -19800,7 +19801,7 @@ $ac_seen" >&2;}
           fi
           ac_seen=`grep '${datarootdir}' $ac_item`
           if test -n "$ac_seen"; then
    -        { echo "$as_me:19803: WARNING: datarootdir was used explicitly but not set:
    +        { echo "$as_me:19804: WARNING: datarootdir was used explicitly but not set:
     $ac_seen" >&5
     echo "$as_me: WARNING: datarootdir was used explicitly but not set:
     $ac_seen" >&2;}
    @@ -19837,7 +19838,7 @@ s,@INSTALL@,$ac_INSTALL,;t t
                 ac_init=`egrep '[ 	]*'$ac_name'[ 	]*=' $ac_file`
                 if test -z "$ac_init"; then
                   ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
    -              { echo "$as_me:19840: WARNING: Variable $ac_name is used but was not set:
    +              { echo "$as_me:19841: WARNING: Variable $ac_name is used but was not set:
     $ac_seen" >&5
     echo "$as_me: WARNING: Variable $ac_name is used but was not set:
     $ac_seen" >&2;}
    @@ -19848,7 +19849,7 @@ $ac_seen" >&2;}
         egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
         if test -s $tmp/out; then
           ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
    -      { echo "$as_me:19851: WARNING: Some variables may not be substituted:
    +      { echo "$as_me:19852: WARNING: Some variables may not be substituted:
     $ac_seen" >&5
     echo "$as_me: WARNING: Some variables may not be substituted:
     $ac_seen" >&2;}
    @@ -19897,7 +19898,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
       * )   ac_file_in=$ac_file.in ;;
       esac
     
    -  test x"$ac_file" != x- && { echo "$as_me:19900: creating $ac_file" >&5
    +  test x"$ac_file" != x- && { echo "$as_me:19901: creating $ac_file" >&5
     echo "$as_me: creating $ac_file" >&6;}
     
       # First look for the input files in the build tree, otherwise in the
    @@ -19908,7 +19909,7 @@ echo "$as_me: creating $ac_file" >&6;}
           -) echo $tmp/stdin ;;
           [\\/$]*)
              # Absolute (can't be DOS-style, as IFS=:)
    -         test -f "$f" || { { echo "$as_me:19911: error: cannot find input file: $f" >&5
    +         test -f "$f" || { { echo "$as_me:19912: error: cannot find input file: $f" >&5
     echo "$as_me: error: cannot find input file: $f" >&2;}
        { (exit 1); exit 1; }; }
              echo $f;;
    @@ -19921,7 +19922,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
                echo $srcdir/$f
              else
                # /dev/null tree
    -           { { echo "$as_me:19924: error: cannot find input file: $f" >&5
    +           { { echo "$as_me:19925: error: cannot find input file: $f" >&5
     echo "$as_me: error: cannot find input file: $f" >&2;}
        { (exit 1); exit 1; }; }
              fi;;
    @@ -19979,7 +19980,7 @@ cat >>$CONFIG_STATUS <<\EOF
       rm -f $tmp/in
       if test x"$ac_file" != x-; then
         if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
    -      { echo "$as_me:19982: $ac_file is unchanged" >&5
    +      { echo "$as_me:19983: $ac_file is unchanged" >&5
     echo "$as_me: $ac_file is unchanged" >&6;}
         else
           ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
    diff --git a/test/configure.in b/test/configure.in
    index f0538beb..0c27c7ca 100644
    --- a/test/configure.in
    +++ b/test/configure.in
    @@ -28,7 +28,7 @@ dnl***************************************************************************
     dnl
     dnl Author: Thomas E. Dickey 1996-on
     dnl
    -dnl $Id: configure.in,v 1.133 2017/08/07 23:30:23 tom Exp $
    +dnl $Id: configure.in,v 1.134 2017/08/19 23:40:39 tom Exp $
     dnl This is a simple configuration-script for the ncurses test programs that
     dnl allows the test-directory to be separately configured against a reference
     dnl system (i.e., sysvr4 curses)
    @@ -173,6 +173,7 @@ getopt.h \
     locale.h \
     math.h \
     stdarg.h \
    +stdint.h \
     sys/ioctl.h \
     sys/select.h \
     sys/time.h \
    diff --git a/test/picsmap.c b/test/picsmap.c
    index 5ad88b12..196cf446 100644
    --- a/test/picsmap.c
    +++ b/test/picsmap.c
    @@ -26,7 +26,7 @@
      * authorization.                                                           *
      ****************************************************************************/
     /*
    - * $Id: picsmap.c,v 1.90 2017/08/12 17:21:48 tom Exp $
    + * $Id: picsmap.c,v 1.100 2017/08/19 23:42:27 tom Exp $
      *
      * Author: Thomas E. Dickey
      *
    @@ -34,9 +34,8 @@
      * measure the time taken to paint it normally vs randomly.
      *
      * TODO improve use of rgb-names using tsearch.
    - * TODO when not using tsearch, dispense with intermediate index
    - * TODO count/report uses of each color, giving percentiles.
      *
    + * TODO add option to dump picture in non-optimized mode, e.g., like tput.
      * TODO write cells/second to stderr (or log)
      * TODO write picture left-to-right/top-to-bottom
      * TODO write picture randomly
    @@ -54,6 +53,13 @@
     #include 
     #include 
     
    +#ifdef HAVE_STDINT_H
    +#include 
    +#define my_intptr_t	intptr_t
    +#else
    +#define my_intptr_t	long
    +#endif
    +
     #if HAVE_TSEARCH
     #include 
     #endif
    @@ -74,6 +80,7 @@
     #define RGB_PATH "/etc/X11/rgb.txt"
     
     typedef int NUM_COLOR;
    +typedef unsigned short NUM_COUNT;
     
     typedef struct {
         char ch;			/* nominal character to display */
    @@ -82,8 +89,7 @@ typedef struct {
     
     typedef struct {
         NUM_COLOR fgcol;
    -    unsigned short which;
    -    unsigned short count;
    +    NUM_COUNT count;
     } FG_NODE;
     
     typedef struct {
    @@ -91,7 +97,7 @@ typedef struct {
         short high;
         short wide;
         int colors;
    -    FG_NODE **fgcol;
    +    FG_NODE *fgcol;
         PICS_CELL *cells;
     } PICS_HEAD;
     
    @@ -116,6 +122,15 @@ typedef struct {
         size_t cell;
     } HOW_MUCH;
     
    +#undef MAX
    +#define MAX(a,b) ((a)>(b)?(a):(b))
    +
    +/*
    + * tfind will return null on failure, so we map subscripts starting at one.
    + */
    +#define P2I(n) (((int)(my_intptr_t)(n)) - 1)
    +#define I2P(n) (void *)(my_intptr_t)((n) + 1)
    +
     #define stop_curses() if (in_curses) endwin()
     
     #define debugmsg if (debugging) logmsg
    @@ -126,6 +141,7 @@ static void giveup(const char *fmt,...) GCC_PRINTFLIKE(1, 2);
     static void logmsg(const char *fmt,...) GCC_PRINTFLIKE(1, 2);
     static void logmsg2(const char *fmt,...) GCC_PRINTFLIKE(1, 2);
     static void warning(const char *fmt,...) GCC_PRINTFLIKE(1, 2);
    +static int gather_c_values(int);
     
     static FILE *logfp = 0;
     static bool in_curses = FALSE;
    @@ -138,7 +154,7 @@ static HOW_MUCH how_much;
     
     static int reading_last;
     static int reading_size;
    -static FG_NODE **reading_ncols;
    +static FG_NODE *reading_ncols;
     
     #if HAVE_TSEARCH
     static void *reading_ntree;
    @@ -246,14 +262,6 @@ static PICS_HEAD *
     free_pics_head(PICS_HEAD * pics)
     {
         if (pics != 0) {
    -#if !(HAVE_TSEARCH && HAVE_TDESTROY)
    -	int n;
    -	if (pics->fgcol != 0) {
    -	    for (n = 0; n < pics->colors; ++n) {
    -		free(pics->fgcol[n]);
    -	    }
    -	}
    -#endif
     	free(pics->fgcol);
     	free(pics->cells);
     	free(pics->name);
    @@ -268,17 +276,19 @@ begin_c_values(int size)
     {
         reading_last = 0;
         reading_size = size;
    -    reading_ncols = typeCalloc(FG_NODE *, size + 1);
    -    how_much.pair += (sizeof(FG_NODE *) * (size_t) size);
    +    reading_ncols = typeCalloc(FG_NODE, size + 1);
    +    how_much.pair += (sizeof(FG_NODE) * (size_t) size);
    +    /* black is always the first slot, to work around P2I/I2P logic */
    +    gather_c_values(0);
     }
     
     #if HAVE_TSEARCH
     static int
     compare_c_values(const void *p, const void *q)
     {
    -    const FG_NODE *a = (const FG_NODE *) p;
    -    const FG_NODE *b = (const FG_NODE *) q;
    -    return (a->fgcol - b->fgcol);
    +    const int a = P2I(p);
    +    const int b = P2I(q);
    +    return (reading_ncols[a].fgcol - reading_ncols[b].fgcol);
     }
     
     #ifdef DEBUG_TSEARCH
    @@ -288,36 +298,26 @@ check_c_values(int ln)
         static int oops = 5;
         FG_NODE **ft;
         int n;
    -    if (oops-- <= 0)
    -	return;
         for (n = 0; n < reading_last; ++n) {
    -	if (reading_ncols[n] == 0)
    -	    continue;
    -	ft = tfind(reading_ncols[n], &reading_ntree, compare_c_values);
    -	if (ft != 0 && *ft != 0) {
    -	    if ((*ft)->fgcol != reading_ncols[n]->fgcol) {
    -		logmsg("@%d, %d:%d (%d) %p %p fgcol %06X %06X", ln, n,
    -		       reading_last - 1,
    -		       reading_size,
    -		       (*ft), reading_ncols[n],
    -		       reading_ncols[n]->fgcol,
    -		       (*ft)->fgcol);
    -	    }
    -	    if ((*ft)->which != reading_ncols[n]->which) {
    -		logmsg("@%d, %d:%d (%d) %p %p which %d %d", ln, n,
    +	ft = tfind(I2P(n), &reading_ntree, compare_c_values);
    +	if (ft != 0) {
    +	    int q = P2I(*ft);
    +	    if (reading_ncols[q].fgcol != reading_ncols[n].fgcol) {
    +		logmsg("@%d, %d:%d (%d) %d %d fgcol %06X %06X", ln, n,
     		       reading_last - 1,
     		       reading_size,
    -		       (*ft), reading_ncols[n],
    -		       reading_ncols[n]->which,
    -		       (*ft)->which);
    +		       q, n,
    +		       reading_ncols[n].fgcol,
    +		       reading_ncols[q].fgcol);
     	    }
     	} else {
    -	    logmsg("@%d, %d:%d (%d) %p %p null %06X %d", ln, n,
    +	    logmsg("@%d, %d:%d (%d) ? %d null %06X", ln, n,
     		   reading_last - 1,
     		   reading_size,
    -		   ft, reading_ncols[n],
    -		   reading_ncols[n]->fgcol,
    -		   reading_ncols[n]->which);
    +		   n,
    +		   reading_ncols[n].fgcol);
    +	    if (oops-- <= 0)
    +		return;
     	}
         }
     }
    @@ -326,44 +326,41 @@ check_c_values(int ln)
     #endif
     #endif
     
    -#undef MAX
    -#define MAX(a,b) ((a)>(b)?(a):(b))
    -
     static int
     gather_c_values(int fg)
     {
         int found = -1;
     #if HAVE_TSEARCH
         FG_NODE **ft;
    -    FG_NODE *find = typeMalloc(FG_NODE, 1);
    +    int next = reading_last;
     
    -    how_much.pair += sizeof(FG_NODE);
    -    find->fgcol = fg;
    -    find->which = 0;
    +    reading_ncols[next].fgcol = fg;
    +    reading_ncols[next].count = 0;
     
         check_c_values(__LINE__);
    -    if ((ft = tfind(find, &reading_ntree, compare_c_values)) != 0) {
    -	found = (*ft)->which;
    +    if ((ft = tfind(I2P(next), &reading_ntree, compare_c_values)) != 0) {
    +	found = P2I(*ft);
         } else {
    -	if (reading_last + 1 >= reading_size) {
    +	if (reading_last + 2 >= reading_size) {
     	    int more = ((MAX(reading_last, reading_size) + 2) * 3) / 2;
    -	    FG_NODE **p = typeRealloc(FG_NODE *, more, reading_ncols);
    +	    int last = reading_last + 1;
    +	    FG_NODE *p = typeRealloc(FG_NODE, more, reading_ncols);
     	    if (p == 0)
     		goto done;
     
    -	    /* FIXME - this won't reallocate pointers for tsearch */
    -	    how_much.pair -= (sizeof(FG_NODE *) * (size_t) reading_size);
    -	    how_much.pair += (sizeof(FG_NODE *) * (size_t) more);
     	    reading_size = more;
     	    reading_ncols = p;
    -	    memset(reading_ncols + reading_last, 0,
    -		   sizeof(FG_NODE *) * (size_t) (more - reading_last));
    +	    memset(reading_ncols + last, 0,
    +		   sizeof(FG_NODE) * (size_t) (more - last));
     	    check_c_values(__LINE__);
     	}
    -	reading_ncols[reading_last] = find;
    -	find->which = (unsigned short) reading_last++;
    -	if ((ft = tsearch(find, &reading_ntree, compare_c_values)) != 0) {
    -	    found = find->which;
    +	++reading_last;
    +	how_much.pair += sizeof(FG_NODE);
    +	if ((ft = tsearch(I2P(next), &reading_ntree, compare_c_values)) != 0) {
    +	    found = P2I(*ft);
    +	    if (found != next)
    +		logmsg("OOPS expected slot %d, got %d", next, found);
    +	    debugmsg("allocated color #%d as #%06X", next, fg);
     	    check_c_values(__LINE__);
     	}
         }
    @@ -371,30 +368,26 @@ gather_c_values(int fg)
         int n;
     
         for (n = 0; n < reading_last; ++n) {
    -	if (reading_ncols[n]->fgcol == fg) {
    +	if (reading_ncols[n].fgcol == fg) {
     	    found = n;
     	    break;
     	}
         }
         if (found < 0) {
    -	FG_NODE *node = typeMalloc(FG_NODE, 1);
    -	how_much.pair += sizeof(FG_NODE);
     	if (reading_last + 2 >= reading_size) {
     	    int more = ((reading_last + 2) * 3) / 2;
    -	    FG_NODE **p = typeRealloc(FG_NODE *, more, reading_ncols);
    +	    FG_NODE *p = typeRealloc(FG_NODE, more, reading_ncols);
     	    if (p == 0)
     		goto done;
     
    -	    how_much.pair -= (sizeof(FG_NODE *) * reading_size);
    -	    how_much.pair += (sizeof(FG_NODE *) * more);
    +	    how_much.pair -= (sizeof(FG_NODE) * (size_t) reading_size);
    +	    how_much.pair += (sizeof(FG_NODE) * (size_t) more);
     	    reading_size = more;
     	    reading_ncols = p;
     	    memset(reading_ncols + reading_last, 0,
    -		   sizeof(FG_NODE) * (more - reading_last));
    +		   sizeof(FG_NODE) * (size_t) (more - reading_last));
     	}
    -	node->fgcol = fg;
    -	node->which = reading_last;
    -	reading_ncols[reading_last] = node;
    +	reading_ncols[reading_last].fgcol = fg;
     	found = reading_last++;
         }
     #endif
    @@ -413,26 +406,30 @@ finish_c_values(PICS_HEAD * head)
         reading_ncols = 0;
     }
     
    +#if HAVE_TSEARCH && HAVE_TDESTROY
    +static void
    +never_free(void *node GCC_UNUSED)
    +{
    +}
    +#endif
    +
     static void
     dispose_c_values(void)
     {
    -    int n;
     #if HAVE_TSEARCH
         if (reading_ntree != 0) {
     #if HAVE_TDESTROY
    -	tdestroy(reading_ntree, free);
    +	tdestroy(reading_ntree, never_free);
     #else
    +	int n;
     	for (n = 0; n < reading_last; ++n) {
    -	    tdelete(reading_ncols[n], &reading_ntree, compare_c_values);
    +	    tdelete(I2P(n), &reading_ntree, compare_c_values);
     	}
     #endif
     	reading_ntree = 0;
         }
     #endif
         if (reading_ncols != 0) {
    -	for (n = 0; n < reading_last; ++n) {
    -	    free(reading_ncols[n]);
    -	}
     	free(reading_ncols);
     	reading_ncols = 0;
         }
    @@ -470,7 +467,7 @@ read_file(const char *filename)
     
         if (is_file(filename, &sb)) {
     	size_t size = (size_t) sb.st_size;
    -	char *blob = typeMalloc(char, size + 1);
    +	char *blob = typeCalloc(char, size + 1);
     	bool had_line = TRUE;
     	bool binary = FALSE;
     	unsigned j;
    @@ -1010,6 +1007,10 @@ parse_xbm(char **data)
         result = typeCalloc(PICS_HEAD, 1);
         how_much.head += sizeof(PICS_HEAD);
     
    +    begin_c_values(2);
    +    gather_c_values(0);
    +    gather_c_values(0xffffff);
    +
         for (n = 0; data[n] != 0; ++n) {
     	if (strlen(s = data[n]) >= sizeof(buf) - 1)
     	    continue;
    @@ -1066,14 +1067,15 @@ parse_xbm(char **data)
     			state = -1;
     			goto finish;
     		    }
    -		    /* TODO: which order? */
     		    for (b = 0; b < 8; ++b) {
     			if (((1L << b) & value) != 0) {
     			    result->cells[which].ch = '*';
     			    result->cells[which].fg = 1;
    +			    reading_ncols[1].count++;
     			} else {
     			    result->cells[which].ch = ' ';
     			    result->cells[which].fg = 0;
    +			    reading_ncols[0].count++;
     			}
     			if (++which > cells) {
     			    state = -1;
    @@ -1100,9 +1102,6 @@ parse_xbm(char **data)
     	    result = free_pics_head(result);
     	}
         } else {
    -	begin_c_values(2);
    -	gather_c_values(0);
    -	gather_c_values(0xffffff);
     	finish_c_values(result);
         }
         return result;
    @@ -1167,8 +1166,8 @@ parse_xpm(char **data)
     		result->cells = typeCalloc(PICS_CELL, cells);
     		how_much.cell += sizeof(PICS_CELL) * (size_t) cells;
     
    -		list = typeCalloc(char *, result->colors);
    -		how_much.list += sizeof(char *) * (size_t) result->colors;
    +		list = typeCalloc(char *, result->colors + 1);
    +		how_much.list += sizeof(char *) * (size_t) (result->colors + 1);
     
     		cpp = num[3];
     		state = 3;
    @@ -1202,10 +1201,12 @@ parse_xpm(char **data)
     		found = gather_c_values(0);	/* actually an error */
     	    }
     	    debugmsg("  [%d:%d] %06X", num_colors, result->colors,
    -		     reading_ncols[(found >= 0) ? found : 0]->fgcol);
    +		     reading_ncols[(found >= 0) ? found : 0].fgcol);
     	    if (num_colors >= result->colors) {
     		finish_c_values(result);
     		state = 4;
    +		if (list != 0 && list[0] == 0)
    +		    list[0] = strdup("\033");
     	    }
     	    break;
     	case 4:
    @@ -1216,9 +1217,14 @@ parse_xpm(char **data)
     
     		    /* FIXME - factor out */
     		    for (c = 0; c < result->colors; ++c) {
    +			if (list[c] == 0) {
    +			    /* should not happen... */
    +			    continue;
    +			}
     			if (!strncmp(cs, list[c], (size_t) cpp)) {
     			    result->cells[which].ch = list[c][0];
     			    result->cells[which].fg = c;
    +			    result->fgcol[c].count++;
     			    break;
     			}
     		    }
    @@ -1232,7 +1238,10 @@ parse_xpm(char **data)
     			state = 5;
     			break;
     		    }
    -		    for (c = cpp; c > 0; --c, ++cs) ;
    +		    for (c = cpp; c > 0; --c, ++cs) {
    +			if (*cs == '\0')
    +			    break;
    +		    }
     		}
     	    }
     	    break;
    @@ -1368,9 +1377,12 @@ parse_img(const char *filename)
     						check == 0xffffff)
     					       ? ' '
     					       : '#');
    -		    result->cells[which].fg = ((c >= 0 && c < reading_last)
    -					       ? c
    -					       : -1);
    +		    if (c >= 0 && c < reading_last) {
    +			result->cells[which].fg = c;
    +			reading_ncols[c].count++;
    +		    } else {
    +			result->cells[which].fg = -1;
    +		    }
     		} else {
     		    okay = FALSE;
     		    break;
    @@ -1382,7 +1394,7 @@ parse_img(const char *filename)
     	if (okay) {
     	    /* FIXME - is this trimming needed? */
     	    for (len = result->colors; len > 3; len--) {
    -		if (result->fgcol[len - 1] == 0) {
    +		if (result->fgcol[len - 1].fgcol == 0) {
     		    result->colors = len - 1;
     		} else {
     		    break;
    @@ -1423,7 +1435,7 @@ read_picture(const char *filename, char **data)
         return pics;
     }
     
    -#define fg_color(pics,n) (pics->fgcol[n]->fgcol)
    +#define fg_color(pics,n) (pics->fgcol[n].fgcol)
     
     static void
     dump_picture(PICS_HEAD * pics)
    @@ -1522,6 +1534,99 @@ show_picture(PICS_HEAD * pics)
     	endwin();
     }
     
    +static int
    +compare_fg_counts(const void *a, const void *b)
    +{
    +    const FG_NODE *p = (const FG_NODE *) a;
    +    const FG_NODE *q = (const FG_NODE *) b;
    +    return (q->count - p->count);
    +}
    +
    +static void
    +report_colors(PICS_HEAD * pics)
    +{
    +    int j, k;
    +    int high;
    +    int wide = 4;
    +    int accum;
    +    double level;
    +    int shift;
    +    int total;
    +    char buffer[256];
    +
    +    if (logfp == 0)
    +	return;
    +
    +    qsort(pics->fgcol, (size_t) pics->colors, sizeof(FG_NODE), compare_fg_counts);
    +    /*
    +     * For debugging, show a (short) list of the colors used.
    +     */
    +    if (debugging && (pics->colors < 1000)) {
    +	int digits = 0;
    +	for (j = pics->colors; j != 0; j /= 10) {
    +	    ++digits;
    +	    if (j < 10)
    +		++digits;
    +	}
    +	logmsg("These colors were used:");
    +	high = (pics->colors + wide - 1) / wide;
    +	for (j = 0; j < high && j < pics->colors; ++j) {
    +	    char *s = buffer;
    +	    *s = '\0';
    +	    for (k = 0; k < wide; ++k) {
    +		int n = j + (k * high);
    +		if (n >= pics->colors)
    +		    break;
    +		if (k) {
    +		    *s++ = ' ';
    +		    if (digits < 8) {
    +			sprintf(s, "%*s", 8 - digits, " ");
    +			s += strlen(s);
    +		    }
    +		}
    +		if (pics->fgcol[n].fgcol >= 0) {
    +		    sprintf(s, "%3d #%06X %*d", n,
    +			    pics->fgcol[n].fgcol,
    +			    digits, pics->fgcol[n].count);
    +		} else {
    +		    sprintf(s, "%3d (empty) %*d", n,
    +			    digits, pics->fgcol[n].count);
    +		}
    +		s += strlen(s);
    +		if ((s - buffer) > 100)
    +		    break;
    +	    }
    +	    logmsg("%s", buffer);
    +	}
    +    }
    +
    +    /*
    +     * Given the list of colors sorted by the number of times they are used,
    +     * log a short report showing the number of colors for 90%, 99%, 99.9%,
    +     * etc.
    +     */
    +    logmsg("Number of colors versus number of cells");
    +    total = pics->high * pics->wide;
    +    accum = 0;
    +    level = 0.1;
    +    shift = 1;
    +    for (j = 0; j < pics->colors; ++j) {
    +	accum += pics->fgcol[j].count;
    +	if (accum >= (total * (1.0 - level))) {
    +	    int after = (shift > 2) ? shift - 2 : 0;
    +	    logmsg("%8d colors (%.1f%%) in %d cells (%.*f%%)",
    +		   j + 1,
    +		   (100.0 * (j + 1)) / pics->colors,
    +		   accum,
    +		   after, (100.0 * accum) / total);
    +	    if (accum >= total)
    +		break;
    +	    level /= 10.0;
    +	    shift++;
    +	}
    +    }
    +}
    +
     int
     main(int argc, char *argv[])
     {
    @@ -1612,6 +1717,7 @@ main(int argc, char *argv[])
     		} else {
     		    dump_picture(pics);
     		}
    +		report_colors(pics);
     		dispose_c_values();
     		free_data(data);
     		free_pics_head(pics);
    diff --git a/test/test.priv.h b/test/test.priv.h
    index 6c940efa..cc5c1a8a 100644
    --- a/test/test.priv.h
    +++ b/test/test.priv.h
    @@ -29,7 +29,7 @@
     /****************************************************************************
      *  Author: Thomas E. Dickey                    1996-on                     *
      ****************************************************************************/
    -/* $Id: test.priv.h,v 1.146 2017/08/07 23:29:48 tom Exp $ */
    +/* $Id: test.priv.h,v 1.147 2017/08/19 23:40:19 tom Exp $ */
     
     #ifndef __TEST_PRIV_H
     #define __TEST_PRIV_H 1
    @@ -197,6 +197,10 @@
     #define HAVE_SLK_INIT 0
     #endif
     
    +#ifndef HAVE_STDINT_H
    +#define HAVE_STDINT_H 0
    +#endif
    +
     #ifndef HAVE_SYS_IOCTL_H
     #define HAVE_SYS_IOCTL_H 0
     #endif
    -- 
    2.45.0