]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.0 - patch 20170603
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 4 Jun 2017 02:00:28 +0000 (02:00 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 4 Jun 2017 02:00:28 +0000 (02:00 +0000)
+ add option to picsmap to use color-palette files, e.g., for mapping
  to xterm-256color.
+ move the data in SCREEN used for the alloc_pair() function to the
  end, to restore compatibility between ncurses/ncursesw libtinfo
  (report/patch by Miroslav Lichvar).
+ add build-time utility "report_offsets" to help show when the various
  configurations of tinfo library are compatible or not.

41 files changed:
MANIFEST
NEWS
VERSION
configure
configure.in
dist.mk
doc/html/man/adacurses6-config.1.html
doc/html/man/captoinfo.1m.html
doc/html/man/clear.1.html
doc/html/man/curs_getstr.3x.html
doc/html/man/curs_initscr.3x.html
doc/html/man/curs_util.3x.html
doc/html/man/form.3x.html
doc/html/man/infocmp.1m.html
doc/html/man/infotocap.1m.html
doc/html/man/menu.3x.html
doc/html/man/ncurses.3x.html
doc/html/man/ncurses6-config.1.html
doc/html/man/panel.3x.html
doc/html/man/resizeterm.3x.html
doc/html/man/tabs.1.html
doc/html/man/terminfo.5.html
doc/html/man/tic.1m.html
doc/html/man/toe.1m.html
doc/html/man/tput.1.html
doc/html/man/tset.1.html
man/curs_getstr.3x
man/curs_initscr.3x
man/curs_util.3x
man/ncurses.3x
man/resizeterm.3x
ncurses/Makefile.in
ncurses/curses.priv.h
ncurses/report_offsets.c [new file with mode: 0644]
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec
test/picsmap.c

index 2b165c230e2f2b15e7cf6f08f0989e162cfa1360..4f72deecbff515c63d02e1ba8116c247da12769c 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
 ./ncurses/llib-ltinfow
 ./ncurses/modules
 ./ncurses/new_pair.h
+./ncurses/report_offsets.c
 ./ncurses/tinfo/MKcaptab.awk
 ./ncurses/tinfo/MKcaptab.sh
 ./ncurses/tinfo/MKcodes.awk
diff --git a/NEWS b/NEWS
index e22c2e1cb7d31c629b44b772a2531c72f87c7e56..e996f092329b113223dc6a3b9a7712082ab025a0 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2847 2017/05/27 22:31:39 tom Exp $
+-- $Id: NEWS,v 1.2851 2017/06/03 23:27:40 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,15 @@ 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.
 
+20170603
+       + add option to picsmap to use color-palette files, e.g., for mapping
+         to xterm-256color.
+       + move the data in SCREEN used for the alloc_pair() function to the
+         end, to restore compatibility between ncurses/ncursesw libtinfo
+         (report/patch by Miroslav Lichvar).
+       + add build-time utility "report_offsets" to help show when the various
+         configurations of tinfo library are compatible or not.
+
 20170527
        + improved test/picsmap.c:
          + lookup named colors for xpm files in rgb.txt
diff --git a/VERSION b/VERSION
index b1ee4bfcd575c76c9f5ac9f8ce26bbb2b57f5864..3ec21987b23d411c4589b24429f1755f3d566756 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:9  6.0     20170527
+5:0:9  6.0     20170603
index 255e9facb6e759cdd0790344e30eac92c86821c3..1c088aebf9a954258d4569ba97a5023e0fca4c01 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
 #! /bin/sh
-# From configure.in Revision: 1.641 .
+# From configure.in Revision: 1.642 .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by Autoconf 2.52.20150926.
+# Generated by Autoconf 2.52.20170501.
 #
 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
 # Free Software Foundation, Inc.
@@ -912,7 +912,7 @@ This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by $as_me, which was
-generated by GNU Autoconf 2.52.20150926.  Invocation command line was
+generated by GNU Autoconf 2.52.20170501.  Invocation command line was
 
   $ $0 $@
 
@@ -1701,7 +1701,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include "confdefs.h"
 
 int
-main ()
+main (void)
 {
 
   ;
@@ -1832,7 +1832,7 @@ else
 #include "confdefs.h"
 
 int
-main ()
+main (void)
 {
 
   ;
@@ -1876,7 +1876,7 @@ else
 #include "confdefs.h"
 
 int
-main ()
+main (void)
 {
 #ifndef __GNUC__
        choke me
@@ -1924,7 +1924,7 @@ else
 #include "confdefs.h"
 
 int
-main ()
+main (void)
 {
 
   ;
@@ -2004,7 +2004,7 @@ do
 #include <stdlib.h>
 $ac_declaration
 int
-main ()
+main (void)
 {
 exit (42);
   ;
@@ -2035,7 +2035,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 #include "confdefs.h"
 $ac_declaration
 int
-main ()
+main (void)
 {
 exit (42);
   ;
@@ -2129,7 +2129,7 @@ int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, i
 int argc;
 char **argv;
 int
-main ()
+main (void)
 {
 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
   ;
@@ -2793,7 +2793,7 @@ else
 #include "confdefs.h"
 
 int
-main ()
+main (void)
 {
 #ifndef __GNUC__
        choke me
@@ -2841,7 +2841,7 @@ else
 #include "confdefs.h"
 
 int
-main ()
+main (void)
 {
 
   ;
@@ -2900,7 +2900,7 @@ do
 #include <stdlib.h>
 $ac_declaration
 int
-main ()
+main (void)
 {
 exit (42);
   ;
@@ -2931,7 +2931,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 #include "confdefs.h"
 $ac_declaration
 int
-main ()
+main (void)
 {
 exit (42);
   ;
@@ -2997,7 +2997,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include <stdio.h>
 
 int
-main ()
+main (void)
 {
 
                printf("Hello world!\n")
@@ -5322,7 +5322,7 @@ extern "C"
    builtin and then its argument prototype would still apply.  */
 char Gpm_Open ();
 int
-main ()
+main (void)
 {
 Gpm_Open ();
   ;
@@ -5417,7 +5417,7 @@ char dlsym ();
 char (*f) ();
 
 int
-main ()
+main (void)
 {
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
@@ -5478,7 +5478,7 @@ extern "C"
    builtin and then its argument prototype would still apply.  */
 char dlsym ();
 int
-main ()
+main (void)
 {
 dlsym ();
   ;
@@ -5542,7 +5542,7 @@ echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
 #include "confdefs.h"
 #include <dlfcn.h>
 int
-main ()
+main (void)
 {
 
                void *obj;
@@ -5704,7 +5704,7 @@ extern "C"
    builtin and then its argument prototype would still apply.  */
 char Gpm_Wgetch ();
 int
-main ()
+main (void)
 {
 Gpm_Wgetch ();
   ;
@@ -5818,7 +5818,7 @@ fi;
 #endif
 
 int
-main ()
+main (void)
 {
 
        struct mouse_info the_mouse;
@@ -5975,7 +5975,7 @@ LIBS="$cf_add_libs"
 #include "confdefs.h"
 
 int
-main ()
+main (void)
 {
 
   ;
@@ -6083,7 +6083,7 @@ echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
 #include "confdefs.h"
 #include <stdio.h>
 int
-main ()
+main (void)
 {
 int x = 1
   ;
@@ -6193,7 +6193,7 @@ else
 #include "confdefs.h"
 
 int
-main ()
+main (void)
 {
 int i;
   ;
@@ -6450,7 +6450,7 @@ CF_EOF
 #include "confdefs.h"
 #include <stdio.h>
 int
-main ()
+main (void)
 {
 printf("Hello\n");
   ;
@@ -6621,7 +6621,7 @@ echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
 #include "confdefs.h"
 #include <stdio.h>
 int
-main ()
+main (void)
 {
 printf("Hello work\n");
   ;
@@ -6890,7 +6890,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include "confdefs.h"
 #include <stdio.h>
 int
-main ()
+main (void)
 {
 printf("Hello");
   ;
@@ -7695,7 +7695,7 @@ char $ac_func ();
 char (*f) ();
 
 int
-main ()
+main (void)
 {
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
@@ -7768,7 +7768,7 @@ char $ac_func ();
 char (*f) ();
 
 int
-main ()
+main (void)
 {
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
@@ -8059,7 +8059,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include "confdefs.h"
 #include <sys/types.h>
 int
-main ()
+main (void)
 {
 
 #ifndef _XOPEN_SOURCE
@@ -8092,7 +8092,7 @@ cf_save="$CPPFLAGS"
 #include "confdefs.h"
 #include <sys/types.h>
 int
-main ()
+main (void)
 {
 
 #ifdef _XOPEN_SOURCE
@@ -8144,7 +8144,7 @@ CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
 #include "confdefs.h"
 #include <sys/types.h>
 int
-main ()
+main (void)
 {
 
 #ifdef _DEFAULT_SOURCE
@@ -8214,7 +8214,7 @@ echo "${as_me:-configure}:8210: testing if the symbol is already defined go no f
 #include "confdefs.h"
 #include <sys/types.h>
 int
-main ()
+main (void)
 {
 
 #ifndef _POSIX_C_SOURCE
@@ -8259,7 +8259,7 @@ cf_want_posix_source=no
 #include "confdefs.h"
 #include <sys/types.h>
 int
-main ()
+main (void)
 {
 
 #ifdef _POSIX_SOURCE
@@ -8302,7 +8302,7 @@ echo "${as_me:-configure}:8298: testing if the second compile does not leave our
 #include "confdefs.h"
 #include <sys/types.h>
 int
-main ()
+main (void)
 {
 
 #ifndef _POSIX_C_SOURCE
@@ -8491,7 +8491,7 @@ else
 #include <sys/types.h>
 
 int
-main ()
+main (void)
 {
 
 #ifndef _XOPEN_SOURCE
@@ -8528,7 +8528,7 @@ cf_save="$CPPFLAGS"
 #include <sys/types.h>
 
 int
-main ()
+main (void)
 {
 
 #ifdef _XOPEN_SOURCE
@@ -8704,7 +8704,7 @@ echo "${as_me:-configure}:8700: testing if the symbol is already defined go no f
 #include "confdefs.h"
 #include <sys/types.h>
 int
-main ()
+main (void)
 {
 
 #ifndef _POSIX_C_SOURCE
@@ -8749,7 +8749,7 @@ cf_want_posix_source=no
 #include "confdefs.h"
 #include <sys/types.h>
 int
-main ()
+main (void)
 {
 
 #ifdef _POSIX_SOURCE
@@ -8792,7 +8792,7 @@ echo "${as_me:-configure}:8788: testing if the second compile does not leave our
 #include "confdefs.h"
 #include <sys/types.h>
 int
-main ()
+main (void)
 {
 
 #ifndef _POSIX_C_SOURCE
@@ -9057,7 +9057,7 @@ echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
 #include "confdefs.h"
 #include <stdlib.h>
 int
-main ()
+main (void)
 {
 
 #ifndef _XOPEN_SOURCE
@@ -9095,7 +9095,7 @@ echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
 #include "confdefs.h"
 #include <stdlib.h>
 int
-main ()
+main (void)
 {
 
 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
@@ -9146,7 +9146,7 @@ else
 #include <sys/types.h>
 
 int
-main ()
+main (void)
 {
 
 #ifndef _XOPEN_SOURCE
@@ -9183,7 +9183,7 @@ cf_save="$CPPFLAGS"
 #include <sys/types.h>
 
 int
-main ()
+main (void)
 {
 
 #ifdef _XOPEN_SOURCE
@@ -9354,7 +9354,7 @@ else
 #include <sys/signal.h>
 
 int
-main ()
+main (void)
 {
 int x = SIGWINCH
   ;
@@ -9388,7 +9388,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include <sys/signal.h>
 
 int
-main ()
+main (void)
 {
 int x = SIGWINCH
   ;
@@ -9444,7 +9444,7 @@ do
 #include <sys/signal.h>
 
 int
-main ()
+main (void)
 {
 
 #if SIGWINCH != $cf_sigwinch
@@ -9499,7 +9499,7 @@ else
 #include "confdefs.h"
 #include <langinfo.h>
 int
-main ()
+main (void)
 {
 char* cs = nl_langinfo(CODESET);
   ;
@@ -9639,7 +9639,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #endif
 
 int
-main ()
+main (void)
 {
 
        wint_t foo = 0;
@@ -9682,7 +9682,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include <sys/types.h>
 
 int
-main ()
+main (void)
 {
 
 #ifndef _XOPEN_SOURCE_EXTENDED
@@ -9725,7 +9725,7 @@ echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
 #include <sys/types.h>
 
 int
-main ()
+main (void)
 {
 
 #if _XOPEN_SOURCE_EXTENDED- < 0
@@ -9932,7 +9932,7 @@ char $ac_func ();
 char (*f) ();
 
 int
-main ()
+main (void)
 {
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
@@ -9992,7 +9992,7 @@ else
 
 #include <stdlib.h>
 int
-main ()
+main (void)
 {
 putwc(0,0);
   ;
@@ -10031,7 +10031,7 @@ cat >conftest.$ac_ext <<_ACEOF
 
 #include <libutf8.h>
 int
-main ()
+main (void)
 {
 putwc(0,0);
   ;
@@ -10067,7 +10067,7 @@ cat >conftest.$ac_ext <<_ACEOF
 
 #include <libutf8.h>
 int
-main ()
+main (void)
 {
 putwc(0,0);
   ;
@@ -10203,7 +10203,7 @@ echo "${as_me:-configure}:10197: testing ... testing $cf_cv_header_path_utf8 ...
 
 #include <libutf8.h>
 int
-main ()
+main (void)
 {
 putwc(0,0);
   ;
@@ -10329,7 +10329,7 @@ echo "${as_me:-configure}:10321: testing ... testing $cf_cv_library_path_utf8 ..
 
 #include <libutf8.h>
 int
-main ()
+main (void)
 {
 putwc(0,0);
   ;
@@ -10432,7 +10432,7 @@ if test -n "$cf_cv_header_path_utf8" ; then
 #include "confdefs.h"
 #include <stdio.h>
 int
-main ()
+main (void)
 {
 printf("Hello")
   ;
@@ -10551,7 +10551,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include <libutf8.h>
 #endif
 int
-main ()
+main (void)
 {
 mbstate_t state
   ;
@@ -10586,7 +10586,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include <libutf8.h>
 #endif
 int
-main ()
+main (void)
 {
 mbstate_t value
   ;
@@ -10650,7 +10650,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include <libutf8.h>
 #endif
 int
-main ()
+main (void)
 {
 wchar_t state
   ;
@@ -10685,7 +10685,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include <libutf8.h>
 #endif
 int
-main ()
+main (void)
 {
 wchar_t value
   ;
@@ -10754,7 +10754,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include <libutf8.h>
 #endif
 int
-main ()
+main (void)
 {
 wint_t state
   ;
@@ -10789,7 +10789,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include <libutf8.h>
 #endif
 int
-main ()
+main (void)
 {
 wint_t value
   ;
@@ -10900,7 +10900,7 @@ else
                       && LARGE_OFF_T % 2147483647 == 1)
                      ? 1 : -1];
 int
-main ()
+main (void)
 {
 
   ;
@@ -10976,7 +10976,7 @@ else
                       && LARGE_OFF_T % 2147483647 == 1)
                      ? 1 : -1];
 int
-main ()
+main (void)
 {
 
   ;
@@ -11015,7 +11015,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
                       && LARGE_OFF_T % 2147483647 == 1)
                      ? 1 : -1];
 int
-main ()
+main (void)
 {
 
   ;
@@ -11073,7 +11073,7 @@ else
                       && LARGE_OFF_T % 2147483647 == 1)
                      ? 1 : -1];
 int
-main ()
+main (void)
 {
 
   ;
@@ -11112,7 +11112,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
                       && LARGE_OFF_T % 2147483647 == 1)
                      ? 1 : -1];
 int
-main ()
+main (void)
 {
 
   ;
@@ -11165,7 +11165,7 @@ else
 #include "confdefs.h"
 #include <stdio.h>
 int
-main ()
+main (void)
 {
 return !fseeko;
   ;
@@ -11196,7 +11196,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
 #define _LARGEFILE_SOURCE 1
 #include <stdio.h>
 int
-main ()
+main (void)
 {
 return !fseeko;
   ;
@@ -11248,7 +11248,7 @@ else
 #include "confdefs.h"
 #include <stdio.h>
 int
-main ()
+main (void)
 {
 return fseeko && fseeko (stdin, 0, 0);
   ;
@@ -11311,7 +11311,7 @@ else
 #include <dirent.h>
 
 int
-main ()
+main (void)
 {
 
                /* if transitional largefile support is setup, this is true */
@@ -12420,7 +12420,7 @@ else
 
 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
 int
-main ()
+main (void)
 {
   int i;
   for (i = 0; i < 256; i++)
@@ -12519,7 +12519,7 @@ else
 #include "confdefs.h"
 $ac_includes_default
 int
-main ()
+main (void)
 {
 if ((signed char *) 0)
   return 0;
@@ -12565,7 +12565,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include "confdefs.h"
 $ac_includes_default
 int
-main ()
+main (void)
 {
 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
   ;
@@ -12591,7 +12591,7 @@ if { (eval echo "$as_me:12576: \"$ac_compile\"") >&5
 #include "confdefs.h"
 $ac_includes_default
 int
-main ()
+main (void)
 {
 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
   ;
@@ -12628,7 +12628,7 @@ ac_hi=-1 ac_mid=-1
 #include "confdefs.h"
 $ac_includes_default
 int
-main ()
+main (void)
 {
 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
   ;
@@ -12665,7 +12665,7 @@ while test "x$ac_lo" != "x$ac_hi"; do
 #include "confdefs.h"
 $ac_includes_default
 int
-main ()
+main (void)
 {
 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
   ;
@@ -12704,7 +12704,7 @@ else
 #include "confdefs.h"
 $ac_includes_default
 int
-main ()
+main (void)
 {
 FILE *f = fopen ("conftest.val", "w");
 if (!f)
@@ -12887,7 +12887,7 @@ LIBS="$cf_add_libs"
 #include <pthread.h>
 
 int
-main ()
+main (void)
 {
 
                int rc = pthread_create(0,0,0,0);
@@ -12976,7 +12976,7 @@ char pthread_kill ();
 char (*f) ();
 
 int
-main ()
+main (void)
 {
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
@@ -13062,7 +13062,7 @@ cat >conftest.$ac_ext <<_ACEOF
 
 #include <stdio.h>
 int
-main ()
+main (void)
 {
 
 #if defined(__GNUC__)
@@ -13587,7 +13587,7 @@ echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
 #include "confdefs.h"
 
 int
-main ()
+main (void)
 {
 
 #ifdef __INTEL_COMPILER
@@ -13638,7 +13638,7 @@ echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
 #include "confdefs.h"
 
 int
-main ()
+main (void)
 {
 
 #ifdef __clang__
@@ -13802,7 +13802,7 @@ echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
 #include "confdefs.h"
 
 int
-main ()
+main (void)
 {
 
 #ifdef __INTEL_COMPILER
@@ -13853,7 +13853,7 @@ echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
 #include "confdefs.h"
 
 int
-main ()
+main (void)
 {
 
 #ifdef __clang__
@@ -14180,7 +14180,7 @@ char strlcat ();
 char (*f) ();
 
 int
-main ()
+main (void)
 {
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
@@ -14244,7 +14244,7 @@ extern "C"
    builtin and then its argument prototype would still apply.  */
 char strlcat ();
 int
-main ()
+main (void)
 {
 strlcat ();
   ;
@@ -14372,7 +14372,7 @@ char $ac_func ();
 char (*f) ();
 
 int
-main ()
+main (void)
 {
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
@@ -14635,7 +14635,7 @@ extern "C"
    builtin and then its argument prototype would still apply.  */
 char dmalloc_debug ();
 int
-main ()
+main (void)
 {
 dmalloc_debug ();
   ;
@@ -14867,7 +14867,7 @@ extern "C"
    builtin and then its argument prototype would still apply.  */
 char debug_malloc ();
 int
-main ()
+main (void)
 {
 debug_malloc ();
   ;
@@ -15270,7 +15270,7 @@ char gettimeofday ();
 char (*f) ();
 
 int
-main ()
+main (void)
 {
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
@@ -15334,7 +15334,7 @@ extern "C"
    builtin and then its argument prototype would still apply.  */
 char gettimeofday ();
 int
-main ()
+main (void)
 {
 gettimeofday ();
   ;
@@ -15407,7 +15407,7 @@ else
        #include <math.h>
 
 int
-main ()
+main (void)
 {
 double x = rand(); printf("result = %g\n", pow(sin(x),x))
   ;
@@ -15538,7 +15538,7 @@ else
 
 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
 int
-main ()
+main (void)
 {
   int i;
   for (i = 0; i < 256; i++)
@@ -15595,7 +15595,7 @@ else
 #include <$ac_hdr>
 
 int
-main ()
+main (void)
 {
 if ((DIR *) 0)
 return 0;
@@ -15655,7 +15655,7 @@ extern "C"
    builtin and then its argument prototype would still apply.  */
 char opendir ();
 int
-main ()
+main (void)
 {
 opendir ();
   ;
@@ -15709,7 +15709,7 @@ extern "C"
    builtin and then its argument prototype would still apply.  */
 char opendir ();
 int
-main ()
+main (void)
 {
 opendir ();
   ;
@@ -15758,7 +15758,7 @@ else
 #include <time.h>
 
 int
-main ()
+main (void)
 {
 if ((struct tm *) 0)
 return 0;
@@ -15826,7 +15826,7 @@ char regcomp ();
 char (*f) ();
 
 int
-main ()
+main (void)
 {
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
@@ -15889,7 +15889,7 @@ extern "C"
    builtin and then its argument prototype would still apply.  */
 char regcomp ();
 int
-main ()
+main (void)
 {
 regcomp ();
   ;
@@ -15967,7 +15967,7 @@ char compile ();
 char (*f) ();
 
 int
-main ()
+main (void)
 {
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
@@ -16027,7 +16027,7 @@ extern "C"
    builtin and then its argument prototype would still apply.  */
 char compile ();
 int
-main ()
+main (void)
 {
 compile ();
   ;
@@ -16103,7 +16103,7 @@ case $cf_regex_func in
 #include "confdefs.h"
 #include <$cf_regex_hdr>
 int
-main ()
+main (void)
 {
 
                        char *p = compile("", "", "", 0);
@@ -16145,7 +16145,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 #include <sys/types.h>
 #include <$cf_regex_hdr>
 int
-main ()
+main (void)
 {
 
                        regex_t *p;
@@ -16334,7 +16334,7 @@ cat >conftest.$ac_ext <<_ACEOF
 
 #include <$cf_header>
 int
-main ()
+main (void)
 {
 int x = optind; char *y = optarg
   ;
@@ -16396,7 +16396,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include "confdefs.h"
 
 int
-main ()
+main (void)
 {
 main ();
   ;
@@ -16454,7 +16454,7 @@ extern "C"
    builtin and then its argument prototype would still apply.  */
 char bzero ();
 int
-main ()
+main (void)
 {
 bzero ();
   ;
@@ -16524,7 +16524,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #endif
 
 int
-main ()
+main (void)
 {
 
   ;
@@ -16578,7 +16578,7 @@ else
 #include "confdefs.h"
 
 int
-main ()
+main (void)
 {
 /* FIXME: Include the comments suggested by Paul. */
 #ifndef __cplusplus
@@ -16737,7 +16737,7 @@ else
 #include "confdefs.h"
 inline int foo(void) { return 1; }
 int
-main ()
+main (void)
 {
 ${cf_cv_main_return:-return} foo()
   ;
@@ -16898,7 +16898,7 @@ static void handler(int sig)
        x = 5;
 }
 int
-main ()
+main (void)
 {
 signal(SIGINT, handler);
                 x = 1
@@ -17030,7 +17030,7 @@ else
 #include "confdefs.h"
 
 int
-main ()
+main (void)
 {
 long x = 1L + 1UL + 1U + 1
   ;
@@ -17092,7 +17092,7 @@ else
 #include <sys/types.h>
 #include <errno.h>
 int
-main ()
+main (void)
 {
 int x = (int) errno
   ;
@@ -17149,7 +17149,7 @@ else
 extern int errno;
 
 int
-main ()
+main (void)
 {
 errno = 2
   ;
@@ -17334,7 +17334,7 @@ char $ac_func ();
 char (*f) ();
 
 int
-main ()
+main (void)
 {
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
@@ -17400,7 +17400,7 @@ cat >conftest.$ac_ext <<_ACEOF
 
 #include <stdlib.h>
 int
-main ()
+main (void)
 {
 
        char temp[128];
@@ -17458,7 +17458,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
 #include <stdlib.h>
 int
-main ()
+main (void)
 {
 
        char temp[128];
@@ -17520,7 +17520,7 @@ else
 #include "confdefs.h"
 #include <ctype.h>
 int
-main ()
+main (void)
 {
 int x = isascii(' ')
   ;
@@ -17565,7 +17565,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include <sys/types.h>
 #include <signal.h>
 int
-main ()
+main (void)
 {
 struct sigaction act
   ;
@@ -17597,7 +17597,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include <sys/types.h>
 #include <signal.h>
 int
-main ()
+main (void)
 {
 struct sigaction act
   ;
@@ -17814,7 +17814,7 @@ echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
 #include "confdefs.h"
 #include <termios.h>
 int
-main ()
+main (void)
 {
 struct termios foo; int x = foo.c_iflag
   ;
@@ -17845,7 +17845,7 @@ cat conftest.$ac_ext >&5
 #define _POSIX_SOURCE
 #include <termios.h>
 int
-main ()
+main (void)
 {
 struct termios foo; int x = foo.c_iflag
   ;
@@ -17908,7 +17908,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #endif
 
 int
-main ()
+main (void)
 {
 
 TTY foo;
@@ -17957,7 +17957,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include <stdarg.h>
 #include <stdio.h>
 int
-main ()
+main (void)
 {
 
        va_list ap;
@@ -17990,7 +17990,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include <stdarg.h>
 #include <stdio.h>
 int
-main ()
+main (void)
 {
 
        FILE strbuf;
@@ -18029,7 +18029,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include <stdarg.h>
 #include <stdio.h>
 int
-main ()
+main (void)
 {
 
        FILE strbuf;
@@ -18239,7 +18239,7 @@ char mkstemp ();
 char (*f) ();
 
 int
-main ()
+main (void)
 {
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
@@ -18314,7 +18314,7 @@ else
 #include <stdio.h>
 /* If setvbuf has the reversed format, exit 0. */
 int
-main ()
+main (void)
 {
   /* This call has the arguments reversed.
      A reversed system may check and see that the address of main
@@ -18368,7 +18368,7 @@ else
 #include "confdefs.h"
 $ac_includes_default
 int
-main ()
+main (void)
 {
 if ((intptr_t *) 0)
   return 0;
@@ -18420,7 +18420,7 @@ else
 #include "confdefs.h"
 $ac_includes_default
 int
-main ()
+main (void)
 {
 if ((ssize_t *) 0)
   return 0;
@@ -18474,7 +18474,7 @@ else
 
 #include <signal.h>
 int
-main ()
+main (void)
 {
 sigaction_t x
   ;
@@ -18546,7 +18546,7 @@ do
 #endif
 
 int
-main ()
+main (void)
 {
 
 #ifdef TIOCGSIZE
@@ -18635,7 +18635,7 @@ char memmove ();
 char (*f) ();
 
 int
-main ()
+main (void)
 {
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
@@ -18697,7 +18697,7 @@ char bcopy ();
 char (*f) ();
 
 int
-main ()
+main (void)
 {
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
@@ -18829,7 +18829,7 @@ char $ac_func ();
 char (*f) ();
 
 int
-main ()
+main (void)
 {
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
@@ -18976,7 +18976,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include <stdarg.h>
 
 int
-main ()
+main (void)
 {
 
        static va_list dst;
@@ -19027,7 +19027,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include <stdarg.h>
 
 int
-main ()
+main (void)
 {
 
        static va_list dst;
@@ -19075,7 +19075,7 @@ else
 #include "confdefs.h"
 $ac_includes_default
 int
-main ()
+main (void)
 {
 if ((pid_t *) 0)
   return 0;
@@ -19189,7 +19189,7 @@ char $ac_func ();
 char (*f) ();
 
 int
-main ()
+main (void)
 {
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
@@ -19251,7 +19251,7 @@ else
       # include <unistd.h>
       #endif
       /* Some systems only have a dummy stub for fork() */
-      int main ()
+      int main (void)
       {
         if (fork() < 0)
           $ac_main_return (1);
@@ -19348,7 +19348,7 @@ sparc_address_test (arg) int arg;
 }
 
 int
-main ()
+main (void)
 {
   pid_t parent = getpid ();
   pid_t child;
@@ -19476,7 +19476,7 @@ extern "C"
    builtin and then its argument prototype would still apply.  */
 char openpty ();
 int
-main ()
+main (void)
 {
 openpty ();
   ;
@@ -19545,7 +19545,7 @@ LIBS="$cf_add_libs"
 #include <$cf_header>
 
 int
-main ()
+main (void)
 {
 
        int x = openpty((int *)0, (int *)0, (char *)0,
@@ -19657,7 +19657,7 @@ if test -n "$with_hashed_db/include" ; then
 #include "confdefs.h"
 #include <stdio.h>
 int
-main ()
+main (void)
 {
 printf("Hello")
   ;
@@ -19811,7 +19811,7 @@ if test -n "$cf_item" ; then
 #include "confdefs.h"
 #include <stdio.h>
 int
-main ()
+main (void)
 {
 printf("Hello")
   ;
@@ -20017,7 +20017,7 @@ $ac_includes_default
 #endif
 
 int
-main ()
+main (void)
 {
 DBT *foo = 0
   ;
@@ -20097,7 +20097,7 @@ $ac_includes_default
 #include <db.h>
 
 int
-main ()
+main (void)
 {
 
        char *path = "/tmp/foo";
@@ -20231,7 +20231,7 @@ else
 #include "confdefs.h"
 
 int
-main ()
+main (void)
 {
 bool foo = false
   ;
@@ -20263,7 +20263,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #endif
 
 int
-main ()
+main (void)
 {
 bool foo = false
   ;
@@ -20315,7 +20315,7 @@ else
 #include <sys/types.h>
 
 int
-main ()
+main (void)
 {
 bool x = false
   ;
@@ -20372,7 +20372,7 @@ echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
 
                        #include <iostream>
 int
-main ()
+main (void)
 {
 
                        std::cout << "Hello World!" << std::endl;
@@ -20449,7 +20449,7 @@ LIBS="$cf_add_libs"
 
                                #include <iostream>
 int
-main ()
+main (void)
 {
 
                                std::cout << "Hello World!" << std::endl;
@@ -20585,7 +20585,7 @@ LIBS="$cf_add_libs"
 #include <$cf_gpp_libname/builtin.h>
 
 int
-main ()
+main (void)
 {
 two_arg_error_handler_t foo2 = lib_error_handler
   ;
@@ -20645,7 +20645,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include <builtin.h>
 
 int
-main ()
+main (void)
 {
 two_arg_error_handler_t foo2 = lib_error_handler
   ;
@@ -21010,7 +21010,7 @@ echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
 using std::endl;
 using std::cerr;
 int
-main ()
+main (void)
 {
 
 cerr << "testing" << endl;
@@ -21061,7 +21061,7 @@ else
 #include "confdefs.h"
 
 int
-main ()
+main (void)
 {
 bool foo = false
   ;
@@ -21093,7 +21093,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #endif
 
 int
-main ()
+main (void)
 {
 bool foo = false
   ;
@@ -21145,7 +21145,7 @@ else
 #include <sys/types.h>
 
 int
-main ()
+main (void)
 {
 bool x = false
   ;
@@ -21295,7 +21295,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include <etip.h.in>
 
 int
-main ()
+main (void)
 {
 
   ;
@@ -21460,7 +21460,7 @@ public:
 };
 
 int
-main ()
+main (void)
 {
 
        const char* p_UserData = static_cast<char*>(0)
@@ -22172,7 +22172,7 @@ else
 #include "confdefs.h"
 $ac_includes_default
 int
-main ()
+main (void)
 {
 if ((wchar_t *) 0)
   return 0;
@@ -22218,7 +22218,7 @@ cat >conftest.$ac_ext <<_ACEOF
 #include "confdefs.h"
 $ac_includes_default
 int
-main ()
+main (void)
 {
 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
   ;
@@ -22244,7 +22244,7 @@ if { (eval echo "$as_me:22229: \"$ac_compile\"") >&5
 #include "confdefs.h"
 $ac_includes_default
 int
-main ()
+main (void)
 {
 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
   ;
@@ -22281,7 +22281,7 @@ ac_hi=-1 ac_mid=-1
 #include "confdefs.h"
 $ac_includes_default
 int
-main ()
+main (void)
 {
 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
   ;
@@ -22318,7 +22318,7 @@ while test "x$ac_lo" != "x$ac_hi"; do
 #include "confdefs.h"
 $ac_includes_default
 int
-main ()
+main (void)
 {
 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
   ;
@@ -22357,7 +22357,7 @@ else
 #include "confdefs.h"
 $ac_includes_default
 int
-main ()
+main (void)
 {
 FILE *f = fopen ("conftest.val", "w");
 if (!f)
@@ -22854,7 +22854,7 @@ EOF
 int cf_ldflags_static(FILE *fp);
 
 int
-main ()
+main (void)
 {
 
        return cf_ldflags_static(stdin);
 
 if test "x$cross_compiling" = xyes ; then
        ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
+       CHECK_BUILD="#"
 else
        ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
+       CHECK_BUILD=
 fi
 
 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_SCRIPTS $SUB_MAKEFILES Makefile"
@@ -23514,7 +23516,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:23517: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:23519: creating $CONFIG_STATUS" >&5
 echo "$as_me: creating $CONFIG_STATUS" >&6;}
 cat >$CONFIG_STATUS <<_ACEOF
 #! $SHELL
@@ -23646,7 +23648,7 @@ EOF
 cat >>$CONFIG_STATUS <<EOF
 ac_cs_version="\\
 config.status
-configured by $0, generated by GNU Autoconf 2.52.20150926,
+configured by $0, generated by GNU Autoconf 2.52.20170501,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -23690,7 +23692,7 @@ cat >>$CONFIG_STATUS <<\EOF
     echo "$ac_cs_version"; exit 0 ;;
   --he | --h)
     # Conflict between --help and --header
-    { { echo "$as_me:23693: error: ambiguous option: $1
+    { { echo "$as_me:23695: 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;}
@@ -23709,7 +23711,7 @@ Try \`$0 --help' for more information." >&2;}
     ac_need_defaults=false;;
 
   # This is an error.
-  -*) { { echo "$as_me:23712: error: unrecognized option: $1
+  -*) { { echo "$as_me:23714: 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;}
@@ -23728,7 +23730,7 @@ cat >&5 << _ACEOF
 ## Running config.status.  ##
 ## ----------------------- ##
 
-This file was extended by $as_me 2.52.20150926, executed with
+This file was extended by $as_me 2.52.20170501, executed with
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
   CONFIG_LINKS    = $CONFIG_LINKS
@@ -23828,7 +23830,7 @@ do
   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
-  *) { { echo "$as_me:23831: error: invalid argument: $ac_config_target" >&5
+  *) { { echo "$as_me:23833: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
   esac
@@ -24175,6 +24177,7 @@ s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
+s,@CHECK_BUILD@,$CHECK_BUILD,;t t
 CEOF
 
 EOF
@@ -24307,7 +24310,7 @@ done; }
   esac
 
   if test x"$ac_file" != x-; then
-    { echo "$as_me:24310: creating $ac_file" >&5
+    { echo "$as_me:24313: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
     rm -f "$ac_file"
   fi
@@ -24325,7 +24328,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:24328: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:24331: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -24338,7 +24341,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:24341: error: cannot find input file: $f" >&5
+           { { echo "$as_me:24344: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -24354,7 +24357,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:24357: WARNING: datarootdir was used implicitly but not set:
+          { echo "$as_me:24360: 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;}
@@ -24363,7 +24366,7 @@ $ac_seen" >&2;}
       fi
       ac_seen=`grep '${datarootdir}' $ac_item`
       if test -n "$ac_seen"; then
-        { echo "$as_me:24366: WARNING: datarootdir was used explicitly but not set:
+        { echo "$as_me:24369: 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;}
@@ -24400,7 +24403,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:24403: WARNING: Variable $ac_name is used but was not set:
+              { echo "$as_me:24406: 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;}
@@ -24411,7 +24414,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:24414: WARNING: Some variables may not be substituted:
+      { echo "$as_me:24417: WARNING: Some variables may not be substituted:
 $ac_seen" >&5
 echo "$as_me: WARNING: Some variables may not be substituted:
 $ac_seen" >&2;}
@@ -24460,7 +24463,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:24463: creating $ac_file" >&5
+  test x"$ac_file" != x- && { echo "$as_me:24466: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
 
   # First look for the input files in the build tree, otherwise in the
@@ -24471,7 +24474,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:24474: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:24477: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -24484,7 +24487,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:24487: error: cannot find input file: $f" >&5
+           { { echo "$as_me:24490: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -24542,7 +24545,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:24545: $ac_file is unchanged" >&5
+      { echo "$as_me:24548: $ac_file is unchanged" >&5
 echo "$as_me: $ac_file is unchanged" >&6;}
     else
       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
@@ -24887,7 +24890,7 @@ cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQ
                                (cygdll|msysdll|mingw)
                                        test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
 
-echo "${as_me:-configure}:24890: testing overriding CXX_MODEL to SHARED ..." 1>&5
+echo "${as_me:-configure}:24893: testing overriding CXX_MODEL to SHARED ..." 1>&5
 
                                        with_shared_cxx=yes
                                        ;;
index c3cf1fbe754e83d0de47028dccdc4b4ca29aaafc..c28e10c3976554319432305427e31d52416f57a1 100644 (file)
@@ -28,14 +28,14 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: configure.in,v 1.641 2017/04/13 23:35:03 tom Exp $
+dnl $Id: configure.in,v 1.642 2017/06/03 13:26:42 tom Exp $
 dnl Process this file with autoconf to produce a configure script.
 dnl
 dnl See http://invisible-island.net/autoconf/ for additional information.
 dnl
 dnl ---------------------------------------------------------------------------
 AC_PREREQ(2.52.20030208)
-AC_REVISION($Revision: 1.641 $)
+AC_REVISION($Revision: 1.642 $)
 AC_INIT(ncurses/base/lib_initscr.c)
 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
 
@@ -2267,10 +2267,13 @@ AC_SUBST(UNALTERED_SYMS)
 
 if test "x$cross_compiling" = xyes ; then
        ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
+       CHECK_BUILD="#"
 else
        ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
+       CHECK_BUILD=
 fi
 AC_SUBST(ADAGEN_LDFLAGS)
+AC_SUBST(CHECK_BUILD)
 
 AC_OUTPUT( \
        include/MKterm.h.awk \
diff --git a/dist.mk b/dist.mk
index f5332f8f35e374794e8aa18cb93ef72903ded3c3..21f7d7f0015abbf573c0715588eab7b8fa70318e 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.1165 2017/05/21 16:57:02 tom Exp $
+# $Id: dist.mk,v 1.1166 2017/05/29 23:10:42 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 = 20170527
+NCURSES_PATCH = 20170603
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 5afe14d822a84e0d362dd3442f89d01142e79e74..e90328751ba5c35a81086707d4df1d22d6836b76 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170520).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170603).
 
 
 
index 0cf55f336b3d0e5c3fdeb757cb348dfe196a9cf4..9696019260ebe2c1223d802403d0713e9b4040e8 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170520).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170603).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index 5252f61667cc6389c23b94757fe5d80c17acbe5f..6d7f427e0aecbcc34222d540d2e6ee36b5b15720 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="tput.1.html">tput(1)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170520).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170603).
 
 
 
index 52968d5ed0adfede7cb76742f4142af021393f1b..4c9de8839d15a567d18ad1a003153984ad57f018 100644 (file)
@@ -26,7 +26,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_getstr.3x,v 1.21 2017/02/18 16:37:18 tom Exp @
+  * @Id: curs_getstr.3x,v 1.22 2017/05/30 21:08:31 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
@@ -94,7 +94,7 @@
        In  this  implementation, these functions return an error if the window
        pointer is null, or if its timeout expires without having any data.
 
-       This implementation provides an extension as well.  If a  SIGWINCH  in-
+       This implementation provides an extension as well.  If a  <STRONG>SIGWINCH</STRONG>  in-
        terrupts the function, it will return <STRONG>KEY_RESIZE</STRONG> rather than <STRONG>OK</STRONG> or <STRONG>ERR</STRONG>.
 
        Functions  with  a  "mv"  prefix  first perform a cursor movement using
index 9e04741d9abc08b96bb7d10a09848d9df0cd82b0..77a1b64e59725f58570fb32f4d94c1d9682a65a5 100644 (file)
@@ -26,7 +26,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_initscr.3x,v 1.27 2017/03/04 20:59:02 tom Exp @
+  * @Id: curs_initscr.3x,v 1.28 2017/05/30 21:12:51 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
        Quoting from X/Open Curses, section 3.1.1:
 
             <EM>Curses</EM>  <EM>implementations</EM>  <EM>may</EM>  <EM>provide</EM>  <EM>for</EM> <EM>special</EM> <EM>handling</EM> <EM>of</EM> <EM>the</EM>
-            <EM>SIGINT,</EM> <EM>SIGQUIT</EM>  <EM>and</EM>  <EM>SIGTSTP</EM>  <EM>signals</EM>  <EM>if</EM>  <EM>their</EM>  <EM>disposition</EM>  <EM>is</EM>
-            <EM>SIG</EM><STRONG>_</STRONG><EM>DFL</EM> <EM>at</EM> <EM>the</EM> <EM>time</EM> <STRONG>initscr</STRONG> <EM>is</EM> <EM>called</EM> <STRONG>...</STRONG>
+            <STRONG>SIGINT</STRONG><EM>,</EM> <STRONG>SIGQUIT</STRONG>  <EM>and</EM>  <STRONG>SIGTSTP</STRONG>  <EM>signals</EM>  <EM>if</EM>  <EM>their</EM>  <EM>disposition</EM>  <EM>is</EM>
+            <STRONG>SIG_DFL</STRONG> <EM>at</EM> <EM>the</EM> <EM>time</EM> <STRONG>initscr</STRONG> <EM>is</EM> <EM>called</EM> <STRONG>...</STRONG>
 
             <EM>Any</EM>  <EM>special</EM>  <EM>handling</EM>  <EM>for</EM> <EM>these</EM> <EM>signals</EM> <EM>may</EM> <EM>remain</EM> <EM>in</EM> <EM>effect</EM> <EM>for</EM>
             <EM>the</EM> <EM>life</EM> <EM>of</EM> <EM>the</EM> <EM>process</EM> <EM>or</EM> <EM>until</EM> <EM>the</EM> <EM>process</EM> <EM>changes</EM> <EM>the</EM>  <EM>disposi-</EM>
             terminal modes with <STRONG>def_shell_mode</STRONG> (see <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>).
 
        <STRONG>SIGWINCH</STRONG>
-            This  handles the window-size changes which were initially ignored
-            in the standardization efforts.  The handler sets a  (signal-safe)
-            variable which is later tested in <STRONG>wgetch</STRONG> (see <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>).  If
+            This  handles  the  window-size  changes which were ignored in the
+            standardization efforts.  The handler sets a  (signal-safe)  vari-
+            able  which  is  later  tested in <STRONG>wgetch</STRONG> (see <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>).  If
             <STRONG>keypad</STRONG> has been enabled for the corresponding window,  <STRONG>wgetch</STRONG>  re-
             turns  the  key symbol <STRONG>KEY_RESIZE</STRONG>.  At the same time, <STRONG>wgetch</STRONG> calls
             <STRONG>resizeterm</STRONG> to adjust the standard screen <STRONG>stdscr</STRONG>, and update  other
index b945709e39b0a2bd49190e495b391334daa8a7f8..e4249aa812c9414146b6fd4257d73fc496250133 100644 (file)
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_util.3x,v 1.48 2017/04/22 14:05:14 tom Exp @
+  * @Id: curs_util.3x,v 1.49 2017/05/30 21:09:21 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
            in those to override the results from the operating system or  ter-
            minal database.
 
-           <STRONG>Ncurses</STRONG>  also  updates the screen size in response to SIGWINCH, un-
+           <STRONG>Ncurses</STRONG>  also  updates the screen size in response to <STRONG>SIGWINCH</STRONG>, un-
            less overridden by the <STRONG>LINES</STRONG> or <STRONG>COLUMNS</STRONG> environment variables,
 
 
index 2643c134654ede46094382aa833d6ada043750df..496f62568aee743e5b48451542c8804a09241641 100644 (file)
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>  and  related  pages  whose names begin "form_" for detailed
        descriptions of the entry points.
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170520).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170603).
 
 
 
index b35c733d322814c1cf1411d363a984e979a00206..21bc5a4df85ab76e22c5dc819af1496e26093128 100644 (file)
 
        http://invisible-island.net/ncurses/tctest.html
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170520).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170603).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index 6e72844f34f9ef0f98a5ecc39da4b2ee408a203f..cfc4aa445122593b32d2f41e4238bc21f3155981 100644 (file)
@@ -85,7 +85,7 @@
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170520).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170603).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index 2a9f20c8ecb73acbc4c19df54256e36f32e68158..f3ae8a4cf374e1226d1b88a294e8e4e5f3e446bb 100644 (file)
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> and related pages whose names  begin  "menu_"  for  detailed
        descriptions of the entry points.
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170520).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170603).
 
 
 
index b1f5bad6408d9b1827f99c607d6fff2f06535ab3..df8fe1b3f35c275b01fe6be1349a841eff7faa45 100644 (file)
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: ncurses.3x,v 1.133 2017/05/06 14:32:49 tom Exp @
+  * @Id: ncurses.3x,v 1.134 2017/05/30 21:07:33 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <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 <STRONG>ncurses</STRONG> version 6.0 (patch 20170520).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170603).
 
        The  <STRONG>ncurses</STRONG>  library emulates the curses library of System V Release 4
        UNIX, and XPG4 (X/Open Portability Guide) curses  (also  known  as  XSI
        The <STRONG>ncurses</STRONG> library includes facilities for responding to window resiz-
        ing events, e.g., when running in an xterm.  See the <STRONG><A HREF="resizeterm.3x.html">resizeterm(3x)</A></STRONG> and
        <STRONG><A HREF="wresize.3x.html">wresize(3x)</A></STRONG> manual pages for details.  In addition, the library may  be
-       configured with a SIGWINCH handler.
+       configured with a <STRONG>SIGWINCH</STRONG> handler.
 
        The  <STRONG>ncurses</STRONG> library extends the fixed set of function key capabilities
        of terminals by allowing the application designer to define  additional
index 184ffd740d6a3833e569d7a1bd0d31e146bc9d04..22e6e995c3fbb5e9fc33beecfd1ee88b56173a3d 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170520).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170603).
 
 
 
index edad3965904fe3e8bc1f8cb866cd13a96f90cd2b..78a74654c555fff0d37b471ded0d9e77f8e34113 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>,
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170520).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170603).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index c4a5bcfba029ff8d9e5f9c0eaf6b2e73bca0ee86..aa4e2fab7598f964c426bbfccd48ac948975879d 100644 (file)
@@ -27,7 +27,7 @@
   * authorization.                                                           *
   ****************************************************************************
   * Author: Thomas E. Dickey 1996-on
-  * @Id: resizeterm.3x,v 1.22 2017/01/07 19:25:15 tom Exp @
+  * @Id: resizeterm.3x,v 1.23 2017/05/30 21:08:21 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
@@ -74,7 +74,7 @@
 
 </PRE><H3><a name="h3-resize_term">resize_term</a></H3><PRE>
        Most  of the work is done by the inner function <STRONG>resize_term</STRONG>.  The outer
-       function <STRONG>resizeterm</STRONG> adds bookkeeping for the  SIGWINCH  handler.   When
+       function <STRONG>resizeterm</STRONG> adds bookkeeping for the  <STRONG>SIGWINCH</STRONG>  handler.   When
        resizing  the  windows,  <STRONG>resize_term</STRONG>  blank-fills  the  areas  that are
        extended.  The calling application should  fill  in  these  areas  with
        appropriate data.  The <STRONG>resize_term</STRONG> function attempts to resize all win-
 
 </PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
        While  these functions are intended to be used to support a signal han-
-       dler (i.e., for SIGWINCH), care should be taken to avoid invoking  them
+       dler (i.e., for <STRONG>SIGWINCH</STRONG>), care should be taken to avoid invoking  them
        in  a  context where <STRONG>malloc</STRONG> or <STRONG>realloc</STRONG> may have been interrupted, since
        it uses those functions.
 
-       If ncurses is configured to supply its own SIGWINCH handler,
+       If ncurses is configured to supply its own <STRONG>SIGWINCH</STRONG> handler,
 
-       <STRONG>o</STRONG>   on receipt of a SIGWINCH, the handler sets a flag
+       <STRONG>o</STRONG>   on receipt of a <STRONG>SIGWINCH</STRONG>, the handler sets a flag
 
        <STRONG>o</STRONG>   which is tested in <STRONG><A HREF="curs_getch.3x.html">wgetch(3x)</A></STRONG> and <STRONG>doupdate</STRONG>,
 
 
        If  the  environment variables <STRONG>LINES</STRONG> or <STRONG>COLUMNS</STRONG> are set, this overrides
        the library's use of the window size obtained from the  operating  sys-
-       tem.   Thus,  even if a SIGWINCH is received, no screen size change may
+       tem.   Thus,  even if a <STRONG>SIGWINCH</STRONG> is received, no screen size change may
        be recorded.
 
 
index f3d9b8a59446945c17a7e4185fc6913490c98725..725f26a12c8e0e32ad3b382a5adfd59bb06b66f4 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170520).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170603).
 
 
 
index 50a9cf3fb011e6cbf2477aaf368c3f00779b8109..db126514deba58205e61c550d93fe0806d4a2ecc 100644 (file)
@@ -74,7 +74,7 @@
        <EM>Terminfo</EM> 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
-       <STRONG>ncurses</STRONG> version 6.0 (patch 20170520).
+       <STRONG>ncurses</STRONG> version 6.0 (patch 20170603).
 
 
 </PRE><H3><a name="h3-Terminfo-Entry-Syntax">Terminfo Entry Syntax</a></H3><PRE>
index 83c220a4575e2963bb214813c3b94bb7d6f07a1c..65eb2b35eb2aecd5823900196dba834def9d10c9 100644 (file)
        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>,   <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>,   <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>,   <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG>,   <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,
        <STRONG><A HREF="term.5.html">term(5)</A></STRONG>.  <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170520).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170603).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index 3e01cae083ec1e1c5287468c01b626ab13be9319..18b0d07e6353ab04bfdea99cb0692b91a6c6bf02 100644 (file)
        <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>,  <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>,  <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,  <STRONG>ter-</STRONG>
        <STRONG><A HREF="terminfo.5.html">minfo(5)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170520).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170603).
 
 
 
index b2c39229fa6dabb627a379121ff93e789b1656dc..da9841f86308633cd0136e1f35fedb1bfe70bc0b 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>, <STRONG>stty(1)</STRONG>, <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG>, <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>, <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170520).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170603).
 
 
 
index 4fec77d8e0112ea2ebabcd2677a8fd03606209da..527a351422f42262a1adf6303b97569ddc75f2e6 100644 (file)
        <STRONG>csh(1)</STRONG>,  <STRONG>sh(1)</STRONG>,  <STRONG>stty(1)</STRONG>,   <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>,   <STRONG>tty(4)</STRONG>,   <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>,
        <STRONG>ttys(5)</STRONG>, <STRONG>environ(7)</STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170520).
+       This describes <STRONG>ncurses</STRONG> version 6.0 (patch 20170603).
 
 
 
index ee8ae92d48b9307491dc018f1e215842746e37a4..5f1601301f5bda484efde918f9d9bfeaa7fdf15f 100644 (file)
@@ -26,7 +26,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_getstr.3x,v 1.21 2017/02/18 16:37:18 tom Exp $
+.\" $Id: curs_getstr.3x,v 1.22 2017/05/30 21:08:31 tom Exp $
 .TH curs_getstr 3X ""
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
@@ -96,7 +96,7 @@ if the window pointer is null, or
 if its timeout expires without having any data.
 .PP
 This implementation provides an extension as well.
-If a SIGWINCH interrupts the function, it will return \fBKEY_RESIZE\fP
+If a \fBSIGWINCH\fP interrupts the function, it will return \fBKEY_RESIZE\fP
 rather than \fBOK\fP or \fBERR\fP.
 .PP
 Functions with a \*(``mv\*('' prefix first perform a cursor movement using
index 24b6fc52a67883c5e5591082f19ae5bb7f2ef78e..0082b03e855f76c9101f67363d291a3c20adad15 100644 (file)
@@ -26,7 +26,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_initscr.3x,v 1.27 2017/03/04 20:59:02 tom Exp $
+.\" $Id: curs_initscr.3x,v 1.28 2017/05/30 21:12:51 tom Exp $
 .TH curs_initscr 3X ""
 .de bP
 .IP \(bu 4
@@ -190,8 +190,9 @@ Other implementations may handle a missing/empty TERM variable differently.
 Quoting from X/Open Curses, section 3.1.1:
 .RS 5
 .PP
-\fICurses implementations may provide for special handling of the SIGINT,
-SIGQUIT and SIGTSTP signals if their disposition is SIG_DFL at the time
+\fICurses implementations may provide for special handling of the \fBSIGINT\fP,
+\fBSIGQUIT\fP and \fBSIGTSTP\fP signals
+if their disposition is \fBSIG_DFL\fP at the time
 \fBinitscr\fP is called \fP...
 .PP
 \fIAny special handling for these signals may remain in effect for the
@@ -234,7 +235,7 @@ assuming that it has been completely altered.
 It also updates the saved terminal modes with \fBdef_shell_mode\fP (see curs_kernel(3X)).
 .TP 5
 .B SIGWINCH
-This handles the window-size changes which were initially ignored in
+This handles the window-size changes which were ignored in
 the standardization efforts.
 The handler sets a (signal-safe) variable
 which is later tested in \fBwgetch\fP (see curs_getch(3X)).
index 77807d9e75bf79af79f415e391c0cfd10c772494..719beabd6d06f01a12b9c4ecbbcbefa721639ba8 100644 (file)
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_util.3x,v 1.48 2017/04/22 14:05:14 tom Exp $
+.\" $Id: curs_util.3x,v 1.49 2017/05/30 21:09:21 tom Exp $
 .TH curs_util 3X ""
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
@@ -159,7 +159,7 @@ Finally (unless \fBuse_env\fP was called with \fBFALSE\fP parameter),
 using a value in those to override the results
 from the operating system or terminal database.
 .IP
-\fBNcurses\fP also updates the screen size in response to SIGWINCH,
+\fBNcurses\fP also updates the screen size in response to \fBSIGWINCH\fP,
 unless overridden by the \fBLINES\fR or \fBCOLUMNS\fR environment variables,
 .SS use_tioctl
 .PP
index 87cfb9afff728d19de08cbb3e8d5a15bda3c96e9..2b7df3e69b23c74f8ca1407c9afc59a00a180c7c 100644 (file)
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: ncurses.3x,v 1.133 2017/05/06 14:32:49 tom Exp $
+.\" $Id: ncurses.3x,v 1.134 2017/05/30 21:07:33 tom Exp $
 .hy 0
 .TH ncurses 3X ""
 .ie \n(.g .ds `` \(lq
@@ -1292,7 +1292,7 @@ The \fBncurses\fR library includes facilities for responding to window
 resizing events, e.g., when running in an xterm.
 See the \fBresizeterm\fR(3X)
 and \fBwresize\fR(3X) manual pages for details.
-In addition, the library may be configured with a SIGWINCH handler.
+In addition, the library may be configured with a \fBSIGWINCH\fP handler.
 .PP
 The \fBncurses\fR library extends the fixed set of function key capabilities
 of terminals by allowing the application designer to define additional
index 9ab3b011a1058d27e8f9ade583bc2a20f4c3a57d..be0756cee5f31b378c451104929f789fbb342194 100644 (file)
@@ -28,7 +28,7 @@
 .\"
 .\" Author: Thomas E. Dickey 1996-on
 .\"
-.\" $Id: resizeterm.3x,v 1.22 2017/01/07 19:25:15 tom Exp $
+.\" $Id: resizeterm.3x,v 1.23 2017/05/30 21:08:21 tom Exp $
 .TH resizeterm 3X ""
 .de bP
 .IP \(bu 4
@@ -59,7 +59,7 @@ such as the \fBLINES\fP and \fBCOLS\fP variables.
 .SS resize_term
 .PP
 Most of the work is done by the inner function \fBresize_term\fR.
-The outer function \fBresizeterm\fR adds bookkeeping for the SIGWINCH handler.
+The outer function \fBresizeterm\fR adds bookkeeping for the \fBSIGWINCH\fP handler.
 When resizing the windows,
 \fBresize_term\fR blank-fills the areas that are extended.
 The calling application should fill in these areas with appropriate data.
@@ -79,13 +79,13 @@ They will fail if either of the dimensions are less than or equal to zero,
 or if an error occurs while (re)allocating memory for the windows.
 .SH NOTES
 While these functions are intended to be used to support a signal handler
-(i.e., for SIGWINCH), care should be taken to avoid invoking them in a
+(i.e., for \fBSIGWINCH\fP), care should be taken to avoid invoking them in a
 context where \fBmalloc\fR or \fBrealloc\fR may have been interrupted,
 since it uses those functions.
 .PP
-If ncurses is configured to supply its own SIGWINCH handler,
+If ncurses is configured to supply its own \fBSIGWINCH\fP handler,
 .bP
-on receipt of a SIGWINCH, the handler sets a flag
+on receipt of a \fBSIGWINCH\fP, the handler sets a flag
 .bP
 which is tested in \fBwgetch\fP(3X) and \fBdoupdate\fP,
 .bP
@@ -106,7 +106,7 @@ data structures.
 If the environment variables \fBLINES\fP or \fBCOLUMNS\fP are set,
 this overrides the library's use of the window size obtained from
 the operating system.
-Thus, even if a SIGWINCH is received,
+Thus, even if a \fBSIGWINCH\fP is received,
 no screen size change may be recorded.
 .SH PORTABILITY
 .PP
index d761af1d5d7447a2af3988eea3a3d313636c3226..9bb8bb8780eaa8e5e87beb2cb46cd308be2e1d7e 100644 (file)
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.152 2016/06/25 21:13:06 tom Exp $
+# $Id: Makefile.in,v 1.154 2017/06/03 13:02:30 tom Exp $
 ##############################################################################
-# Copyright (c) 1998-2015,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 "Software"), #
@@ -206,8 +206,9 @@ wide         = $(srcdir)/widechar
 win32con = $(srcdir)/win32con
 
 ################################################################################
-all \
-libs ::                $(AUTO_SRC) ../lib $(LIBRARIES)
+all libs ::    $(AUTO_SRC) ../lib $(LIBRARIES)
+
+@CHECK_BUILD@all libs ::       report_offsets$(BUILD_EXEEXT) 
 
 sources:       $(AUTO_SRC)
 
@@ -239,6 +240,11 @@ make_hash$(BUILD_EXEEXT) : \
                ../include/hashsize.h
        $(BUILD_CC) -o $@ $(BUILD_CPPFLAGS) $(BUILD_CCFLAGS) $(tinfo)/make_hash.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
 
+report_offsets$(BUILD_EXEEXT) : \
+               $(srcdir)/report_offsets.c
+       $(BUILD_CC) -o $@ $(BUILD_CPPFLAGS) $(BUILD_CCFLAGS) $(srcdir)/report_offsets.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
+       ./report_offsets$(BUILD_EXEEXT)
+
 ./expanded.c : $(srcdir)/curses.priv.h $(serial)/MKexpanded.sh
        $(SHELL) -e $(serial)/MKexpanded.sh "$(CPP)" $(CPPFLAGS) > $@
 
@@ -276,6 +282,7 @@ clean :: mostlyclean
        -rm -f $(AUTO_SRC)
        -rm -f make_keys$(BUILD_EXEEXT)
        -rm -f make_hash$(BUILD_EXEEXT)
+       -rm -f report_offsets$(BUILD_EXEEXT)
        -rm -rf .libs *.dSYM *.map
 
 distclean :: clean
index abe2139d42a6947a0f93d4599c86c4f31f11855d..f6c4879f40c4a92df81c08cc0ac7d13094417bf6 100644 (file)
@@ -34,7 +34,7 @@
  ****************************************************************************/
 
 /*
- * $Id: curses.priv.h,v 1.572 2017/04/20 09:05:57 tom Exp $
+ * $Id: curses.priv.h,v 1.573 2017/06/02 23:19:52 tom Exp $
  *
  *     curses.priv.h
  *
@@ -1137,11 +1137,6 @@ struct screen {
        int             _pair_count;    /* same as COLOR_PAIRS               */
        int             _pair_limit;    /* actual limit of color-pairs       */
 #if NCURSES_EXT_FUNCS
-#if USE_NEW_PAIR
-       void            *_ordered_pairs; /* index used by alloc_pair()       */
-       int             _pairs_used;    /* actual number of color-pairs used */
-       int             _recent_pair;   /* number for most recent free-pair  */
-#endif
        bool            _assumed_color; /* use assumed colors                */
        bool            _default_color; /* use default colors                */
        bool            _has_sgr_39_49; /* has ECMA default color support    */
@@ -1302,6 +1297,11 @@ struct screen {
        bool            _screen_acs_fix;
        bool            _screen_unicode;
 #endif
+#if NCURSES_EXT_FUNCS && USE_NEW_PAIR
+       void            *_ordered_pairs; /* index used by alloc_pair()       */
+       int             _pairs_used;    /* actual number of color-pairs used */
+       int             _recent_pair;   /* number for most recent free-pair  */
+#endif
 };
 
 extern NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain;
diff --git a/ncurses/report_offsets.c b/ncurses/report_offsets.c
new file mode 100644 (file)
index 0000000..ed39b51
--- /dev/null
@@ -0,0 +1,111 @@
+/****************************************************************************
+ * Copyright (c) 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            *
+ * "Software"), to deal in the Software without restriction, including      *
+ * without limitation the rights to use, copy, modify, merge, publish,      *
+ * distribute, distribute with modifications, sublicense, and/or sell       *
+ * copies of the Software, and to permit persons to whom the Software is    *
+ * furnished to do so, subject to the following conditions:                 *
+ *                                                                          *
+ * The above copyright notice and this permission notice shall be included  *
+ * in all copies or substantial portions of the Software.                   *
+ *                                                                          *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
+ *                                                                          *
+ * Except as contained in this notice, the name(s) of the above copyright   *
+ * holders shall not be used in advertising or otherwise to promote the     *
+ * sale, use or other dealings in this Software without prior written       *
+ * authorization.                                                           *
+ ****************************************************************************/
+
+/****************************************************************************
+ *  Author: Thomas E. Dickey                                                *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: report_offsets.c,v 1.5 2017/06/03 13:52:28 tom Exp $")
+
+#define show_size(type) \
+       printf("%6ld\t" #type "\n", (long)sizeof(type))
+#define show_offset(type,member) \
+       printf("%6ld\t" #type "." #member "\n", (long)offsetof(type,member))
+
+int
+main(void)
+{
+    printf("Size/offsets of data structures:\n");
+
+    show_size(attr_t);
+    show_size(chtype);
+#if NCURSES_WIDECHAR
+    show_size(cchar_t);
+#endif
+    show_size(mmask_t);
+    show_size(MEVENT);
+    show_size(NCURSES_BOOL);
+
+    printf("\n");
+    show_size(SCREEN);
+    show_offset(SCREEN, _panelHook);
+#if USE_REENTRANT
+    show_offset(SCREEN, _ttytype);
+#endif
+#ifdef TRACE
+    show_offset(SCREEN, tracechr_buf);
+#endif
+#ifdef USE_SP_WINDOWLIST
+    show_offset(SCREEN, _windowlist);
+#endif
+    show_offset(SCREEN, rsp);
+#if NCURSES_EXT_FUNCS
+#if USE_NEW_PAIR
+    show_offset(SCREEN, _ordered_pairs);
+#endif
+#if NCURSES_SP_FUNCS
+    show_offset(SCREEN, use_tioctl);
+#endif
+#endif
+#if USE_WIDEC_SUPPORT
+    show_offset(SCREEN, _screen_acs_fix);
+#endif
+
+    printf("\n");
+    show_size(TERMINAL);
+    show_offset(TERMINAL, type);
+    show_offset(TERMINAL, Filedes);
+#if defined(TERMIOS)
+    show_offset(TERMINAL, Ottyb);
+    show_offset(TERMINAL, Nttyb);
+#endif
+    show_offset(TERMINAL, _baudrate);
+    show_offset(TERMINAL, _termname);
+#if NCURSES_EXT_COLORS && HAVE_INIT_EXTENDED_COLOR
+    show_offset(TERMINAL, type2);
+#endif
+
+    printf("\n");
+    show_size(TERMTYPE);
+#if NCURSES_XNAMES
+    show_offset(TERMTYPE, ext_str_table);
+    show_offset(TERMTYPE, ext_Strings);
+#endif
+
+    printf("\n");
+    show_size(WINDOW);
+#if NCURSES_WIDECHAR
+    show_offset(WINDOW, _bkgrnd);
+#if NCURSES_EXT_COLORS
+    show_offset(WINDOW, _color);
+#endif
+#endif
+    return EXIT_SUCCESS;
+}
index f9776615da121d6d62559614755804eed7d615cf..cdff83f420d3a8c062ea9614c7dc33e15e0c5110 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20170527) unstable; urgency=low
+ncurses6 (6.0+20170603) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 21 May 2017 12:57:02 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 29 May 2017 19:10:42 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index f9776615da121d6d62559614755804eed7d615cf..cdff83f420d3a8c062ea9614c7dc33e15e0c5110 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20170527) unstable; urgency=low
+ncurses6 (6.0+20170603) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 21 May 2017 12:57:02 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 29 May 2017 19:10:42 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 5b00cdbac9feefffbe72730ed9649a0faeec66d6..d642403d343dbc7081d2885219c3e3591b6ca053 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20170527) unstable; urgency=low
+ncurses6 (6.0+20170603) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 21 May 2017 12:57:02 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 29 May 2017 19:10:42 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 112fb58e450dd699170b987455a13a5b9e231347..0bf5494851ff6e58654e18d4712740c547f9ec3d 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.213 2017/05/21 16:57:02 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.214 2017/05/29 23:10:42 tom Exp $\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"\r
 !define VERSION_MINOR "0"\r
 !define VERSION_YYYY  "2017"\r
-!define VERSION_MMDD  "0527"\r
+!define VERSION_MMDD  "0603"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 8eac28a2f9cc3d49d9b3bdb5e9e2c666e4428c97..82783ae240fcbb613d72894ea94468a798ad3d83 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.0
-Release: 20170527
+Release: 20170603
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 1c2e15b8ead1cdca5daaf8f0e865eaf2d266b5c4..cc2f441b439c198313c70ac5df23836792d0e7c9 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.0
-Release: 20170527
+Release: 20170603
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 108b3bc1118067e58dcc08337de9e1853ce9d5ad..ba8caa426dbcf179ae179bbe146f21b04c09d49a 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: picsmap.c,v 1.29 2017/05/28 00:19:58 tom Exp $
+ * $Id: picsmap.c,v 1.35 2017/06/04 00:20:15 tom Exp $
  *
  * Author: Thomas E. Dickey
  *
  * TODO write picture left-to-right/top-to-bottom
  * TODO write picture randomly
  * TODO add one-shot option vs repeat-count before exiting
- * TODO add option for assumed palette of terminal
  * TODO add option for init_color
  * TODO add option for init_color vs init_extended_color
  * TODO add option for init_pair vs alloc_pair
  * TODO use pad to allow pictures larger than screen
+ * TODO improve load of image-file's color-table using tsearch.
  */
 #include <test.priv.h>
 
 #include <sys/types.h>
 #include <sys/stat.h>
 
+#undef CUR                     /* use only the curses interface */
+
 #define  L_BLOCK '['
 #define  R_BLOCK ']'
 
 #define  L_CURLY '{'
 #define  R_CURLY '}'
 
+#define okCOLOR(n) ((n) >= 0 && (n) < COLORS)
+#define okRGB(n)   ((n) >= 0 && (n) <= 1000)
+#define Scaled256(n) (NCURSES_COLOR_T) (int)(((n) * 1000.0) / 256)
+#define ScaledColor(n) (NCURSES_COLOR_T) (int)(((n) * 1000.0) / scale)
+
 typedef struct {
     int ch;                    /* nominal character to display */
     int fg;                    /* foreground color */
@@ -76,10 +83,19 @@ typedef struct {
 typedef struct {
     const char *name;
     int value;
+} RGB_NAME;
+
+typedef struct {
+    short red;
+    short green;
+    short blue;
 } RGB_DATA;
 
+static void giveup(const char *fmt,...) GCC_PRINTFLIKE(1, 2);
+
 static bool in_curses = FALSE;
-static RGB_DATA *rgb_table;
+static RGB_NAME *rgb_table;
+static RGB_DATA *all_colors;
 
 static void
 free_data(char **data)
@@ -106,7 +122,11 @@ read_file(const char *filename)
     char **result = 0;
     struct stat sb;
 
+    if (in_curses)
+       endwin();
+
     printf("** %s\n", filename);
+
     if (stat(filename, &sb) == 0
        && (sb.st_mode & S_IFMT) == S_IFREG
        && sb.st_size != 0) {
@@ -149,10 +169,18 @@ usage(void)
 {
     static const char *msg[] =
     {
-       "Usage: picsmap [-x rgb-path] [xbm-file [...]]"
+       "Usage: picsmap [options] [imagefile [...]]",
+       "Read/display one or more xbm/xpm files (possibly use \"convert\")",
+       "",
+       "Options:",
+       "  -p palette",
+       "  -r rgb-path"
     };
     size_t n;
 
+    if (in_curses)
+       endwin();
+
     fflush(stdout);
     for (n = 0; n < SIZEOF(msg); n++)
        fprintf(stderr, "%s\n", msg[n]);
@@ -173,14 +201,118 @@ giveup(const char *fmt,...)
     usage();
 }
 
+static void
+init_palette(const char *palette_file)
+{
+    if (palette_file != 0) {
+       int cp;
+
+       all_colors = typeMalloc(RGB_DATA, (unsigned) COLORS);
+       for (cp = 0; cp < COLORS; ++cp) {
+           color_content(cp,
+                         &all_colors[cp].red,
+                         &all_colors[cp].green,
+                         &all_colors[cp].blue);
+           if (palette_file != 0) {
+               char **data = read_file(palette_file);
+               if (data != 0) {
+                   int n;
+                   int red, green, blue;
+                   int scale = 1000;
+                   int c;
+                   for (n = 0; data[n] != 0; ++n) {
+                       if (sscanf(data[n], "scale:%d", &c) == 1) {
+                           scale = c;
+                       } else if (sscanf(data[n], "%d:%d %d %d",
+                                         &c,
+                                         &red,
+                                         &green,
+                                         &blue) == 4
+                                  && okCOLOR(c)
+                                  && okRGB(red)
+                                  && okRGB(green)
+                                  && okRGB(blue)) {
+                           /* *INDENT-EQLS* */
+                           all_colors[c].red   = ScaledColor(red);
+                           all_colors[c].green = ScaledColor(green);
+                           all_colors[c].blue  = ScaledColor(blue);
+                       }
+                   }
+                   free_data(data);
+               }
+           }
+       }
+    } else if (COLORS   > 1) {
+       /* *INDENT-EQLS* */
+       int power2 = 1;
+       int shift = 0;
+
+       while (power2 < COLORS) {
+           ++shift;
+           power2 <<= 1;
+       }
+
+       if (power2 != COLORS || (shift % 3) != 0) {
+           giveup("With %d colors, you need a palette-file", COLORS);
+       }
+    }
+}
+
+/*
+ * Map the 24-bit RGB value to a color index if using a palette, otherwise to a
+ * direct color value.
+ */
 static int
 map_color(int value)
 {
-    int r = (value & 0xff0000) >> 16;
-    int g = (value & 0x00ff00) >> 8;
-    int b = (value & 0x0000ff) >> 0;
-    /* TODO simple mapping into COLOR_BLACK .. COLOR_WHITE */
-    int result = ((r >= 128) << 2) + ((g >= 128) << 1) + (b >= 128);
+    int result = value;
+
+    if (result < 0) {
+       result = -1;
+    } else {
+       /* *INDENT-EQLS* */
+       int red   = (value & 0xff0000) >> 16;
+       int green = (value & 0x00ff00) >> 8;
+       int blue  = (value & 0x0000ff) >> 0;
+
+       if (all_colors != 0) {
+#define Diff2(n,m) ((m) - all_colors[n].m) * ((m) - all_colors[n].m)
+#define Diff2S(n) Diff2(n,red) + Diff2(n,green) + Diff2(n,blue)
+           int d2 = Diff2S(0);
+           int n;
+
+           /* *INDENT-EQLS* */
+           red   = Scaled256(red);
+           green = Scaled256(green);
+           blue  = Scaled256(blue);
+
+           for (result = 0, n = 1; n < COLORS; ++n) {
+               int d = Diff2(n, red) + Diff2(n, green) + Diff2(n, blue);
+               if (d < d2) {
+                   d2 = d;
+                   result = n;
+               }
+           }
+       } else {                /* direct color */
+           int power2 = 1;
+           int shifts = 8;
+
+           while (power2 < COLORS) {
+               power2 <<= 3;
+               shifts--;
+           }
+
+           if (shifts > 0) {
+               /* TODO: round up */
+               red >>= shifts;
+               green >>= shifts;
+               blue >>= shifts;
+               result = ((red << (2 * (8 - shifts)))
+                         + (green << (8 - shifts))
+                         + blue);
+           }
+       }
+    }
     return result;
 }
 
@@ -332,7 +464,7 @@ match_colors(const char *source, int cpp, char *arg1, char *arg2, char *arg3)
     return result;
 }
 
-static RGB_DATA *
+static RGB_NAME *
 parse_rgb(char **data)
 {
     char buf[BUFSIZ];
@@ -341,10 +473,10 @@ parse_rgb(char **data)
     char *s, *t;
     size_t item = 0;
     size_t need;
-    RGB_DATA *result = 0;
+    RGB_NAME *result = 0;
 
     for (need = 0; data[need] != 0; ++need) ;
-    result = typeCalloc(RGB_DATA, need + 2);
+    result = typeCalloc(RGB_NAME, need + 2);
 
     for (n = 0; data[n] != 0; ++n) {
        if (strlen(t = data[n]) >= sizeof(buf) - 1)
@@ -375,10 +507,10 @@ parse_rgb(char **data)
     return result;
 }
 
-static RGB_DATA *
+static RGB_NAME *
 lookup_rgb(const char *name)
 {
-    RGB_DATA *result = 0;
+    RGB_NAME *result = 0;
     if (rgb_table != 0) {
        int n;
        for (n = 0; rgb_table[n].name != 0; ++n) {
@@ -504,7 +636,7 @@ parse_xpm(char **data)
 {
     int state = 0;
     PICS_HEAD *result = typeCalloc(PICS_HEAD, 1);
-    RGB_DATA *by_name;
+    RGB_NAME *by_name;
     int n;
     int cells = 0;
     int color = 0;
@@ -811,10 +943,14 @@ int
 main(int argc, char *argv[])
 {
     int n;
+    const char *palette_path = 0;
     const char *rgb_path = "/etc/X11/rgb.txt";
 
-    while ((n = getopt(argc, argv, "r:")) != -1) {
+    while ((n = getopt(argc, argv, "p:r:")) != -1) {
        switch (n) {
+       case 'p':
+           palette_path = optarg;
+           break;
        case 'r':
            rgb_path = optarg;
            break;
@@ -824,7 +960,7 @@ main(int argc, char *argv[])
        }
     }
 
-    if (argc > 1) {
+    if (optind < argc) {
        char **rgb_data = read_file(rgb_path);
 
        if (rgb_data)
@@ -835,13 +971,17 @@ main(int argc, char *argv[])
            initscr();
            cbreak();
            noecho();
-           if (has_colors())
+           if (has_colors()) {
                start_color();
+               init_palette(palette_path);
+           }
            scrollok(stdscr, FALSE);
            endwin();
        }
+       if (optind >= argc)
+           giveup("expected at least one image filename");
 
-       for (n = 1; n < argc; ++n) {
+       for (n = optind; n < argc; ++n) {
            PICS_HEAD *pics;
            char **data = read_file(argv[n]);