From: Thomas E. Dickey Date: Sun, 4 Jun 2017 02:00:28 +0000 (+0000) Subject: ncurses 6.0 - patch 20170603 X-Git-Tag: v6.1~34 X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff_plain;h=2560bc3dae7f4919060c02c91a593566c908091c ncurses 6.0 - patch 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. --- diff --git a/MANIFEST b/MANIFEST index 2b165c23..4f72deec 100644 --- a/MANIFEST +++ b/MANIFEST @@ -891,6 +891,7 @@ ./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 e22c2e1c..e996f092 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.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 b1ee4bfc..3ec21987 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:9 6.0 20170527 +5:0:9 6.0 20170603 diff --git a/configure b/configure index 255e9fac..1c088aeb 100755 --- 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 $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 $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 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 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 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 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 int -main () +main (void) { printf("Hello work\n"); ; @@ -6890,7 +6890,7 @@ cat >conftest.$ac_ext <<_ACEOF #include "confdefs.h" #include 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 int -main () +main (void) { #ifndef _XOPEN_SOURCE @@ -8092,7 +8092,7 @@ cf_save="$CPPFLAGS" #include "confdefs.h" #include int -main () +main (void) { #ifdef _XOPEN_SOURCE @@ -8144,7 +8144,7 @@ CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" #include "confdefs.h" #include 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 int -main () +main (void) { #ifndef _POSIX_C_SOURCE @@ -8259,7 +8259,7 @@ cf_want_posix_source=no #include "confdefs.h" #include 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 int -main () +main (void) { #ifndef _POSIX_C_SOURCE @@ -8491,7 +8491,7 @@ else #include int -main () +main (void) { #ifndef _XOPEN_SOURCE @@ -8528,7 +8528,7 @@ cf_save="$CPPFLAGS" #include 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 int -main () +main (void) { #ifndef _POSIX_C_SOURCE @@ -8749,7 +8749,7 @@ cf_want_posix_source=no #include "confdefs.h" #include 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 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 int -main () +main (void) { #ifndef _XOPEN_SOURCE @@ -9095,7 +9095,7 @@ echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6 #include "confdefs.h" #include int -main () +main (void) { #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE @@ -9146,7 +9146,7 @@ else #include int -main () +main (void) { #ifndef _XOPEN_SOURCE @@ -9183,7 +9183,7 @@ cf_save="$CPPFLAGS" #include int -main () +main (void) { #ifdef _XOPEN_SOURCE @@ -9354,7 +9354,7 @@ else #include int -main () +main (void) { int x = SIGWINCH ; @@ -9388,7 +9388,7 @@ cat >conftest.$ac_ext <<_ACEOF #include int -main () +main (void) { int x = SIGWINCH ; @@ -9444,7 +9444,7 @@ do #include int -main () +main (void) { #if SIGWINCH != $cf_sigwinch @@ -9499,7 +9499,7 @@ else #include "confdefs.h" #include 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 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 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 int -main () +main (void) { putwc(0,0); ; @@ -10031,7 +10031,7 @@ cat >conftest.$ac_ext <<_ACEOF #include int -main () +main (void) { putwc(0,0); ; @@ -10067,7 +10067,7 @@ cat >conftest.$ac_ext <<_ACEOF #include int -main () +main (void) { putwc(0,0); ; @@ -10203,7 +10203,7 @@ echo "${as_me:-configure}:10197: testing ... testing $cf_cv_header_path_utf8 ... #include int -main () +main (void) { putwc(0,0); ; @@ -10329,7 +10329,7 @@ echo "${as_me:-configure}:10321: testing ... testing $cf_cv_library_path_utf8 .. #include int -main () +main (void) { putwc(0,0); ; @@ -10432,7 +10432,7 @@ if test -n "$cf_cv_header_path_utf8" ; then #include "confdefs.h" #include int -main () +main (void) { printf("Hello") ; @@ -10551,7 +10551,7 @@ cat >conftest.$ac_ext <<_ACEOF #include #endif int -main () +main (void) { mbstate_t state ; @@ -10586,7 +10586,7 @@ cat >conftest.$ac_ext <<_ACEOF #include #endif int -main () +main (void) { mbstate_t value ; @@ -10650,7 +10650,7 @@ cat >conftest.$ac_ext <<_ACEOF #include #endif int -main () +main (void) { wchar_t state ; @@ -10685,7 +10685,7 @@ cat >conftest.$ac_ext <<_ACEOF #include #endif int -main () +main (void) { wchar_t value ; @@ -10754,7 +10754,7 @@ cat >conftest.$ac_ext <<_ACEOF #include #endif int -main () +main (void) { wint_t state ; @@ -10789,7 +10789,7 @@ cat >conftest.$ac_ext <<_ACEOF #include #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 int -main () +main (void) { return !fseeko; ; @@ -11196,7 +11196,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext #define _LARGEFILE_SOURCE 1 #include int -main () +main (void) { return !fseeko; ; @@ -11248,7 +11248,7 @@ else #include "confdefs.h" #include int -main () +main (void) { return fseeko && fseeko (stdin, 0, 0); ; @@ -11311,7 +11311,7 @@ else #include 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 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 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 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 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 #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 #include 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 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 int -main () +main (void) { char temp[128]; @@ -17520,7 +17520,7 @@ else #include "confdefs.h" #include int -main () +main (void) { int x = isascii(' ') ; @@ -17565,7 +17565,7 @@ cat >conftest.$ac_ext <<_ACEOF #include #include int -main () +main (void) { struct sigaction act ; @@ -17597,7 +17597,7 @@ cat >conftest.$ac_ext <<_ACEOF #include #include 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 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 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 #include int -main () +main (void) { va_list ap; @@ -17990,7 +17990,7 @@ cat >conftest.$ac_ext <<_ACEOF #include #include int -main () +main (void) { FILE strbuf; @@ -18029,7 +18029,7 @@ cat >conftest.$ac_ext <<_ACEOF #include #include 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 /* 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 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 int -main () +main (void) { static va_list dst; @@ -19027,7 +19027,7 @@ cat >conftest.$ac_ext <<_ACEOF #include 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 #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 int -main () +main (void) { printf("Hello") ; @@ -19811,7 +19811,7 @@ if test -n "$cf_item" ; then #include "confdefs.h" #include 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 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 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 int -main () +main (void) { std::cout << "Hello World!" << std::endl; @@ -20449,7 +20449,7 @@ LIBS="$cf_add_libs" #include 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 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 int -main () +main (void) { bool x = false ; @@ -21295,7 +21295,7 @@ cat >conftest.$ac_ext <<_ACEOF #include int -main () +main (void) { ; @@ -21460,7 +21460,7 @@ public: }; int -main () +main (void) { const char* p_UserData = static_cast(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); @@ -23429,8 +23429,10 @@ fi 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 <>$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 ;; diff --git a/configure.in b/configure.in index c3cf1fbe..c28e10c3 100644 --- a/configure.in +++ b/configure.in @@ -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 f5332f8f..21f7d7f0 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.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) diff --git a/doc/html/man/adacurses6-config.1.html b/doc/html/man/adacurses6-config.1.html index 5afe14d8..e9032875 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 20170520).
+       This describes ncurses version 6.0 (patch 20170603).
 
 
 
diff --git a/doc/html/man/captoinfo.1m.html b/doc/html/man/captoinfo.1m.html
index 0cf55f33..96960192 100644
--- a/doc/html/man/captoinfo.1m.html
+++ b/doc/html/man/captoinfo.1m.html
@@ -190,7 +190,7 @@
 

SEE ALSO

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

AUTHOR

diff --git a/doc/html/man/clear.1.html b/doc/html/man/clear.1.html
index 5252f616..6d7f427e 100644
--- a/doc/html/man/clear.1.html
+++ b/doc/html/man/clear.1.html
@@ -138,7 +138,7 @@
 

SEE ALSO

        tput(1), terminfo(5)
 
-       This describes ncurses version 6.0 (patch 20170520).
+       This describes ncurses version 6.0 (patch 20170603).
 
 
 
diff --git a/doc/html/man/curs_getstr.3x.html b/doc/html/man/curs_getstr.3x.html
index 52968d5e..4c9de883 100644
--- a/doc/html/man/curs_getstr.3x.html
+++ b/doc/html/man/curs_getstr.3x.html
@@ -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 @
 -->
 
 
@@ -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  SIGWINCH  in-
        terrupts the function, it will return KEY_RESIZE rather than OK or ERR.
 
        Functions  with  a  "mv"  prefix  first perform a cursor movement using
diff --git a/doc/html/man/curs_initscr.3x.html b/doc/html/man/curs_initscr.3x.html
index 9e04741d..77a1b64e 100644
--- a/doc/html/man/curs_initscr.3x.html
+++ b/doc/html/man/curs_initscr.3x.html
@@ -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 @
 -->
 
 
@@ -188,8 +188,8 @@
        Quoting from X/Open Curses, section 3.1.1:
 
             Curses  implementations  may  provide  for special handling of the
-            SIGINT, SIGQUIT  and  SIGTSTP  signals  if  their  disposition  is
-            SIG_DFL at the time initscr is called ...
+            SIGINT, SIGQUIT  and  SIGTSTP  signals  if  their  disposition  is
+            SIG_DFL at the time initscr is called ...
 
             Any  special  handling  for these signals may remain in effect for
             the life of the process or until the process changes the  disposi-
@@ -229,9 +229,9 @@
             terminal modes with def_shell_mode (see curs_kernel(3x)).
 
        SIGWINCH
-            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 wgetch (see curs_getch(3x)).  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 wgetch (see curs_getch(3x)).  If
             keypad has been enabled for the corresponding window,  wgetch  re-
             turns  the  key symbol KEY_RESIZE.  At the same time, wgetch calls
             resizeterm to adjust the standard screen stdscr, and update  other
diff --git a/doc/html/man/curs_util.3x.html b/doc/html/man/curs_util.3x.html
index b945709e..e4249aa8 100644
--- a/doc/html/man/curs_util.3x.html
+++ b/doc/html/man/curs_util.3x.html
@@ -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 @
 -->
 
 
@@ -140,7 +140,7 @@
            in those to override the results from the operating system or  ter-
            minal database.
 
-           Ncurses  also  updates the screen size in response to SIGWINCH, un-
+           Ncurses  also  updates the screen size in response to SIGWINCH, un-
            less overridden by the LINES or COLUMNS environment variables,
 
 
diff --git a/doc/html/man/form.3x.html b/doc/html/man/form.3x.html
index 2643c134..496f6256 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 20170520).
+       This describes ncurses version 6.0 (patch 20170603).
 
 
 
diff --git a/doc/html/man/infocmp.1m.html b/doc/html/man/infocmp.1m.html
index b35c733d..21bc5a4d 100644
--- a/doc/html/man/infocmp.1m.html
+++ b/doc/html/man/infocmp.1m.html
@@ -470,7 +470,7 @@
 
        http://invisible-island.net/ncurses/tctest.html
 
-       This describes ncurses version 6.0 (patch 20170520).
+       This describes ncurses version 6.0 (patch 20170603).
 
 
 

AUTHOR

diff --git a/doc/html/man/infotocap.1m.html b/doc/html/man/infotocap.1m.html
index 6e72844f..cfc4aa44 100644
--- a/doc/html/man/infotocap.1m.html
+++ b/doc/html/man/infotocap.1m.html
@@ -85,7 +85,7 @@
 

SEE ALSO

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

AUTHOR

diff --git a/doc/html/man/menu.3x.html b/doc/html/man/menu.3x.html
index 2a9f20c8..f3ae8a4c 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 20170520).
+       This describes ncurses version 6.0 (patch 20170603).
 
 
 
diff --git a/doc/html/man/ncurses.3x.html b/doc/html/man/ncurses.3x.html
index b1f5bad6..df8fe1b3 100644
--- a/doc/html/man/ncurses.3x.html
+++ b/doc/html/man/ncurses.3x.html
@@ -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 @
 -->
 
 
@@ -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 20170520).
+       This describes ncurses version 6.0 (patch 20170603).
 
        The  ncurses  library emulates the curses library of System V Release 4
        UNIX, and XPG4 (X/Open Portability Guide) curses  (also  known  as  XSI
@@ -1222,7 +1222,7 @@
        The ncurses library includes facilities for responding to window resiz-
        ing events, e.g., when running in an xterm.  See the resizeterm(3x) and
        wresize(3x) manual pages for details.  In addition, the library may  be
-       configured with a SIGWINCH handler.
+       configured with a SIGWINCH handler.
 
        The  ncurses library extends the fixed set of function key capabilities
        of terminals by allowing the application designer to define  additional
diff --git a/doc/html/man/ncurses6-config.1.html b/doc/html/man/ncurses6-config.1.html
index 184ffd74..22e6e995 100644
--- a/doc/html/man/ncurses6-config.1.html
+++ b/doc/html/man/ncurses6-config.1.html
@@ -112,7 +112,7 @@
 

SEE ALSO

        curses(3x)
 
-       This describes ncurses version 6.0 (patch 20170520).
+       This describes ncurses version 6.0 (patch 20170603).
 
 
 
diff --git a/doc/html/man/panel.3x.html b/doc/html/man/panel.3x.html
index edad3965..78a74654 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 20170520).
+       This describes ncurses version 6.0 (patch 20170603).
 
 
 

AUTHOR

diff --git a/doc/html/man/resizeterm.3x.html b/doc/html/man/resizeterm.3x.html
index c4a5bcfb..aa4e2fab 100644
--- a/doc/html/man/resizeterm.3x.html
+++ b/doc/html/man/resizeterm.3x.html
@@ -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 @
 -->
 
 
@@ -74,7 +74,7 @@
 
 

resize_term

        Most  of the work is done by the inner function resize_term.  The outer
-       function resizeterm adds bookkeeping for the  SIGWINCH  handler.   When
+       function resizeterm adds bookkeeping for the  SIGWINCH  handler.   When
        resizing  the  windows,  resize_term  blank-fills  the  areas  that are
        extended.  The calling application should  fill  in  these  areas  with
        appropriate data.  The resize_term function attempts to resize all win-
@@ -98,13 +98,13 @@
 
 

NOTES

        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 SIGWINCH), care should be taken to avoid invoking  them
        in  a  context where malloc or realloc 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 SIGWINCH handler,
 
-       o   on receipt of a SIGWINCH, the handler sets a flag
+       o   on receipt of a SIGWINCH, the handler sets a flag
 
        o   which is tested in wgetch(3x) and doupdate,
 
@@ -123,7 +123,7 @@
 
        If  the  environment variables LINES or COLUMNS 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 SIGWINCH is received, no screen size change may
        be recorded.
 
 
diff --git a/doc/html/man/tabs.1.html b/doc/html/man/tabs.1.html
index f3d9b8a5..725f26a1 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 20170520).
+       This describes ncurses version 6.0 (patch 20170603).
 
 
 
diff --git a/doc/html/man/terminfo.5.html b/doc/html/man/terminfo.5.html
index 50a9cf3f..db126514 100644
--- a/doc/html/man/terminfo.5.html
+++ b/doc/html/man/terminfo.5.html
@@ -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 20170520).
+       ncurses version 6.0 (patch 20170603).
 
 
 

Terminfo Entry Syntax

diff --git a/doc/html/man/tic.1m.html b/doc/html/man/tic.1m.html
index 83c220a4..65eb2b35 100644
--- a/doc/html/man/tic.1m.html
+++ b/doc/html/man/tic.1m.html
@@ -361,7 +361,7 @@
        infocmp(1m),   captoinfo(1m),   infotocap(1m),   toe(1m),   curses(3x),
        term(5).  terminfo(5).
 
-       This describes ncurses version 6.0 (patch 20170520).
+       This describes ncurses version 6.0 (patch 20170603).
 
 
 

AUTHOR

diff --git a/doc/html/man/toe.1m.html b/doc/html/man/toe.1m.html
index 3e01cae0..18b0d07e 100644
--- a/doc/html/man/toe.1m.html
+++ b/doc/html/man/toe.1m.html
@@ -113,7 +113,7 @@
        tic(1m), infocmp(1m), captoinfo(1m),  infotocap(1m),  curses(3x),  ter-
        minfo(5).
 
-       This describes ncurses version 6.0 (patch 20170520).
+       This describes ncurses version 6.0 (patch 20170603).
 
 
 
diff --git a/doc/html/man/tput.1.html b/doc/html/man/tput.1.html
index b2c39229..da9841f8 100644
--- a/doc/html/man/tput.1.html
+++ b/doc/html/man/tput.1.html
@@ -478,7 +478,7 @@
 

SEE ALSO

        clear(1), stty(1), tabs(1), tset(1), terminfo(5), curs_termcap(3x).
 
-       This describes ncurses version 6.0 (patch 20170520).
+       This describes ncurses version 6.0 (patch 20170603).
 
 
 
diff --git a/doc/html/man/tset.1.html b/doc/html/man/tset.1.html
index 4fec77d8..527a3514 100644
--- a/doc/html/man/tset.1.html
+++ b/doc/html/man/tset.1.html
@@ -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 20170520).
+       This describes ncurses version 6.0 (patch 20170603).
 
 
 
diff --git a/man/curs_getstr.3x b/man/curs_getstr.3x
index ee8ae92d..5f160130 100644
--- a/man/curs_getstr.3x
+++ b/man/curs_getstr.3x
@@ -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
diff --git a/man/curs_initscr.3x b/man/curs_initscr.3x
index 24b6fc52..0082b03e 100644
--- a/man/curs_initscr.3x
+++ b/man/curs_initscr.3x
@@ -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)).
diff --git a/man/curs_util.3x b/man/curs_util.3x
index 77807d9e..719beabd 100644
--- a/man/curs_util.3x
+++ b/man/curs_util.3x
@@ -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
diff --git a/man/ncurses.3x b/man/ncurses.3x
index 87cfb9af..2b7df3e6 100644
--- a/man/ncurses.3x
+++ b/man/ncurses.3x
@@ -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
diff --git a/man/resizeterm.3x b/man/resizeterm.3x
index 9ab3b011..be0756ce 100644
--- a/man/resizeterm.3x
+++ b/man/resizeterm.3x
@@ -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
diff --git a/ncurses/Makefile.in b/ncurses/Makefile.in
index d761af1d..9bb8bb87 100644
--- a/ncurses/Makefile.in
+++ b/ncurses/Makefile.in
@@ -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
diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h
index abe2139d..f6c4879f 100644
--- a/ncurses/curses.priv.h
+++ b/ncurses/curses.priv.h
@@ -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
index 00000000..ed39b51e
--- /dev/null
+++ b/ncurses/report_offsets.c
@@ -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 
+
+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;
+}
diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog
index f9776615..cdff83f4 100644
--- a/package/debian-mingw/changelog
+++ b/package/debian-mingw/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20170527) unstable; urgency=low
+ncurses6 (6.0+20170603) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Sun, 21 May 2017 12:57:02 -0400
+ -- Thomas E. Dickey   Mon, 29 May 2017 19:10:42 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog
index f9776615..cdff83f4 100644
--- a/package/debian-mingw64/changelog
+++ b/package/debian-mingw64/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20170527) unstable; urgency=low
+ncurses6 (6.0+20170603) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Sun, 21 May 2017 12:57:02 -0400
+ -- Thomas E. Dickey   Mon, 29 May 2017 19:10:42 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
diff --git a/package/debian/changelog b/package/debian/changelog
index 5b00cdba..d642403d 100644
--- a/package/debian/changelog
+++ b/package/debian/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20170527) unstable; urgency=low
+ncurses6 (6.0+20170603) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Sun, 21 May 2017 12:57:02 -0400
+ -- Thomas E. Dickey   Mon, 29 May 2017 19:10:42 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi
index 112fb58e..0bf54948 100644
--- a/package/mingw-ncurses.nsi
+++ b/package/mingw-ncurses.nsi
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.213 2017/05/21 16:57:02 tom Exp $
+; $Id: mingw-ncurses.nsi,v 1.214 2017/05/29 23:10:42 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  "0527"
+!define VERSION_MMDD  "0603"
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
 
 !define MY_ABI   "5"
diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec
index 8eac28a2..82783ae2 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: 20170527
+Release: 20170603
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
diff --git a/package/ncurses.spec b/package/ncurses.spec
index 1c2e15b8..cc2f441b 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: 20170527
+Release: 20170603
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
diff --git a/test/picsmap.c b/test/picsmap.c
index 108b3bc1..ba8caa42 100644
--- a/test/picsmap.c
+++ b/test/picsmap.c
@@ -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
  *
@@ -37,23 +37,30 @@
  * 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 
 
 #include 
 #include 
 
+#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]);