From eccca377f55c70b12e3e92621d94d1e1c1fcfb7d Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Tue, 22 Jan 2019 00:49:19 +0000 Subject: [PATCH] ncurses 6.1 - patch 20190121 + add a check in test/configure to work around non-ncurses termcap.h file in Slackware. + corrected flag for "seq" method of db 1.8.5 interface, needed by toe on some of the BSDs. + updated "string-hacks" feature. + minor improvements to manpage typography. + corrected conditionally-compiled limit on color pairs (report by "Hudd"). + add -x option to test/pair_content, test/color_content for testing init_extended_pair, extended_pair_content, init_extended_color, extended_color_content + add -p option to test/pair_content, test/color_content to show the return values from the tested functions. + improve manual page curs_color.3x discussion of error returns and extensions. + add O_INPUT_FIELD extension to form library (patch by Leon Winter). + override/suppress --enable-db-install if --disable-database configure option was given. + change a too-large terminal entry in tic from a fatal error to a warning (prompted by discussion with Gabriele Balducci). --- INSTALL | 6 +- NEWS | 24 +- VERSION | 2 +- configure | 41 +- configure.in | 11 +- dist.mk | 4 +- doc/html/man/adacurses6-config.1.html | 2 +- doc/html/man/captoinfo.1m.html | 2 +- doc/html/man/clear.1.html | 2 +- doc/html/man/curs_color.3x.html | 237 ++++--- doc/html/man/curs_inopts.3x.html | 10 +- doc/html/man/form.3x.html | 8 +- doc/html/man/form_cursor.3x.html | 6 +- doc/html/man/form_driver.3x.html | 6 +- doc/html/man/form_field.3x.html | 6 +- doc/html/man/form_field_attributes.3x.html | 6 +- doc/html/man/form_field_buffer.3x.html | 10 +- doc/html/man/form_field_info.3x.html | 6 +- doc/html/man/form_field_just.3x.html | 6 +- doc/html/man/form_field_opts.3x.html | 11 +- doc/html/man/form_field_validation.3x.html | 14 +- doc/html/man/form_fieldtype.3x.html | 6 +- doc/html/man/form_hook.3x.html | 6 +- doc/html/man/form_opts.3x.html | 6 +- doc/html/man/form_page.3x.html | 6 +- doc/html/man/form_post.3x.html | 6 +- doc/html/man/form_win.3x.html | 6 +- doc/html/man/infocmp.1m.html | 2 +- doc/html/man/infotocap.1m.html | 2 +- doc/html/man/menu.3x.html | 8 +- doc/html/man/menu_attributes.3x.html | 6 +- doc/html/man/menu_cursor.3x.html | 6 +- doc/html/man/menu_driver.3x.html | 6 +- doc/html/man/menu_format.3x.html | 6 +- doc/html/man/menu_hook.3x.html | 6 +- doc/html/man/menu_items.3x.html | 6 +- doc/html/man/menu_mark.3x.html | 6 +- doc/html/man/menu_new.3x.html | 6 +- doc/html/man/menu_opts.3x.html | 6 +- doc/html/man/menu_pattern.3x.html | 6 +- doc/html/man/menu_post.3x.html | 6 +- doc/html/man/menu_win.3x.html | 6 +- doc/html/man/mitem_current.3x.html | 6 +- doc/html/man/mitem_new.3x.html | 6 +- doc/html/man/mitem_opts.3x.html | 6 +- doc/html/man/mitem_value.3x.html | 6 +- doc/html/man/ncurses.3x.html | 2 +- doc/html/man/ncurses6-config.1.html | 2 +- doc/html/man/panel.3x.html | 2 +- doc/html/man/tabs.1.html | 2 +- doc/html/man/terminfo.5.html | 10 +- doc/html/man/tic.1m.html | 2 +- doc/html/man/toe.1m.html | 2 +- doc/html/man/tput.1.html | 2 +- doc/html/man/tset.1.html | 2 +- form/fld_max.c | 11 +- form/form.h | 5 +- form/frm_driver.c | 8 +- man/curs_color.3x | 86 ++- man/curs_inopts.3x | 10 +- man/form.3x | 6 +- man/form_cursor.3x | 6 +- man/form_driver.3x | 6 +- man/form_field.3x | 6 +- man/form_field_attributes.3x | 6 +- man/form_field_buffer.3x | 10 +- man/form_field_info.3x | 6 +- man/form_field_just.3x | 6 +- man/form_field_opts.3x | 11 +- man/form_field_validation.3x | 22 +- man/form_fieldtype.3x | 6 +- man/form_hook.3x | 6 +- man/form_opts.3x | 6 +- man/form_page.3x | 6 +- man/form_post.3x | 6 +- man/form_win.3x | 6 +- man/man_db.renames | 5 +- man/manhtml.externs | 7 +- man/menu.3x | 6 +- man/menu_attributes.3x | 6 +- man/menu_cursor.3x | 6 +- man/menu_driver.3x | 6 +- man/menu_format.3x | 6 +- man/menu_hook.3x | 6 +- man/menu_items.3x | 6 +- man/menu_mark.3x | 6 +- man/menu_new.3x | 6 +- man/menu_opts.3x | 6 +- man/menu_pattern.3x | 6 +- man/menu_post.3x | 6 +- man/menu_win.3x | 6 +- man/mitem_current.3x | 6 +- man/mitem_new.3x | 6 +- man/mitem_opts.3x | 6 +- man/mitem_value.3x | 6 +- man/terminfo.tail | 6 +- misc/Makefile.in | 16 +- ncurses/base/lib_color.c | 6 +- ncurses/base/lib_printw.c | 12 +- ncurses/base/lib_scanw.c | 12 +- ncurses/base/new_pair.c | 16 +- ncurses/curses.priv.h | 15 +- ncurses/tinfo/access.c | 12 +- ncurses/tinfo/comp_error.c | 20 +- ncurses/tinfo/hashed_db.c | 6 +- ncurses/tinfo/lib_tparm.c | 8 +- ncurses/tinfo/read_entry.c | 9 +- ncurses/tinfo/write_entry.c | 111 ++- ncurses/trace/lib_trace.c | 11 +- ncurses/widechar/lib_add_wch.c | 6 +- package/debian-mingw/changelog | 4 +- package/debian-mingw64/changelog | 4 +- package/debian/changelog | 4 +- package/mingw-ncurses.nsi | 4 +- package/mingw-ncurses.spec | 2 +- package/ncurses.spec | 2 +- package/ncursest.spec | 2 +- progs/dump_entry.c | 6 +- test/README | 86 +-- test/color_content.c | 173 +++-- test/configure | 772 +++++++++++---------- test/configure.in | 31 +- test/demo_termcap.c | 10 +- test/dots.c | 11 +- test/dots_curses.c | 11 +- test/dots_mvcur.c | 11 +- test/dots_termcap.c | 11 +- test/dots_xcurses.c | 11 +- test/edit_field.c | 12 +- test/extended_color.c | 8 +- test/movewindow.c | 22 +- test/ncurses.c | 19 +- test/padview.c | 6 +- test/pair_content.c | 157 ++++- test/picsmap.c | 73 +- test/savescreen.c | 6 +- test/test.priv.h | 41 +- 137 files changed, 1636 insertions(+), 1074 deletions(-) diff --git a/INSTALL b/INSTALL index bf1fead6..38dce883 100644 --- a/INSTALL +++ b/INSTALL @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2018,2019 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 -- @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: INSTALL,v 1.211 2018/09/08 23:28:11 tom Exp $ +-- $Id: INSTALL,v 1.212 2019/01/19 17:42:30 tom Exp $ --------------------------------------------------------------------- How to install Ncurses/Terminfo on your system --------------------------------------------------------------------- @@ -310,7 +310,7 @@ SUMMARY OF CONFIGURE OPTIONS: and termcap data from disk. You can configure ncurses to have a built-in database, aka "fallback" entries. Embedded applications may have no need for an external database. Some, but not all of the - programs are useful in this configuration, e.g., reset and tput versus + programs are useful in this configuration, e.g., tset and tput versus infocmp and tic. --disable-db-install diff --git a/NEWS b/NEWS index a676b17f..00c1203c 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.3244 2019/01/12 23:14:23 tom Exp $ +-- $Id: NEWS,v 1.3261 2019/01/21 22:51:52 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,28 @@ 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. +20190121 + + add a check in test/configure to work around non-ncurses termcap.h + file in Slackware. + + corrected flag for "seq" method of db 1.8.5 interface, needed by toe + on some of the BSDs. + + updated "string-hacks" feature. + + minor improvements to manpage typography. + + corrected conditionally-compiled limit on color pairs (report by + "Hudd"). + + add -x option to test/pair_content, test/color_content for testing + init_extended_pair, extended_pair_content, init_extended_color, + extended_color_content + + add -p option to test/pair_content, test/color_content to show the + return values from the tested functions. + + improve manual page curs_color.3x discussion of error returns and + extensions. + + add O_INPUT_FIELD extension to form library (patch by Leon Winter). + + override/suppress --enable-db-install if --disable-database configure + option was given. + + change a too-large terminal entry in tic from a fatal error to a + warning (prompted by discussion with Gabriele Balducci). + 20190112 + fix typo in term(5), improve explanation of format (report by Otto Modinos). diff --git a/VERSION b/VERSION index 073a34bf..b0a98d5e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.1 20190112 +5:0:10 6.1 20190121 diff --git a/configure b/configure index 0c049cff..0880cf10 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.672 . +# From configure.in Revision: 1.674 . # Guess values for system-dependent variables and create Makefiles. # Generated by Autoconf 2.52.20181006. # @@ -25083,10 +25083,12 @@ esac # substitute into misc/Makefile to suppress # (un)install.data from the # (un)install rules. -if test "x$cf_with_db_install" = "xno"; then +if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then + MAKE_DATABASE="#" MISC_INSTALL_DATA= MISC_UNINSTALL_DATA= else + MAKE_DATABASE="" MISC_INSTALL_DATA=install.data MISC_UNINSTALL_DATA=uninstall.data fi @@ -25108,7 +25110,7 @@ then cf_filter_syms=$cf_dft_filter_syms test -n "$verbose" && echo " will map symbols to ABI=$cf_cv_abi_version" 1>&6 -echo "${as_me:-configure}:25111: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5 +echo "${as_me:-configure}:25113: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5 fi @@ -25218,7 +25220,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:25221: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:25223: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL @@ -25394,7 +25396,7 @@ cat >>$CONFIG_STATUS <<\EOF echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:25397: error: ambiguous option: $1 + { { echo "$as_me:25399: 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;} @@ -25413,7 +25415,7 @@ Try \`$0 --help' for more information." >&2;} ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:25416: error: unrecognized option: $1 + -*) { { echo "$as_me:25418: 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;} @@ -25533,7 +25535,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:25536: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:25538: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -25888,6 +25890,7 @@ s,@FORM_NAME@,$FORM_NAME,;t t s,@CXX_NAME@,$CXX_NAME,;t t s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t +s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t 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 @@ -26026,7 +26029,7 @@ done; } esac if test x"$ac_file" != x-; then - { echo "$as_me:26029: creating $ac_file" >&5 + { echo "$as_me:26032: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi @@ -26044,7 +26047,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:26047: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:26050: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -26057,7 +26060,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:26060: error: cannot find input file: $f" >&5 + { { echo "$as_me:26063: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -26073,7 +26076,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:26076: WARNING: datarootdir was used implicitly but not set: + { echo "$as_me:26079: 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;} @@ -26082,7 +26085,7 @@ $ac_seen" >&2;} fi ac_seen=`grep '${datarootdir}' $ac_item` if test -n "$ac_seen"; then - { echo "$as_me:26085: WARNING: datarootdir was used explicitly but not set: + { echo "$as_me:26088: 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;} @@ -26119,7 +26122,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:26122: WARNING: Variable $ac_name is used but was not set: + { echo "$as_me:26125: 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;} @@ -26130,7 +26133,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:26133: WARNING: Some variables may not be substituted: + { echo "$as_me:26136: WARNING: Some variables may not be substituted: $ac_seen" >&5 echo "$as_me: WARNING: Some variables may not be substituted: $ac_seen" >&2;} @@ -26179,7 +26182,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:26182: creating $ac_file" >&5 + test x"$ac_file" != x- && { echo "$as_me:26185: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the @@ -26190,7 +26193,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:26193: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:26196: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -26203,7 +26206,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:26206: error: cannot find input file: $f" >&5 + { { echo "$as_me:26209: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -26261,7 +26264,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:26264: $ac_file is unchanged" >&5 + { echo "$as_me:26267: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ @@ -26606,7 +26609,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}:26609: testing overriding CXX_MODEL to SHARED ..." 1>&5 +echo "${as_me:-configure}:26612: testing overriding CXX_MODEL to SHARED ..." 1>&5 with_shared_cxx=yes ;; diff --git a/configure.in b/configure.in index b2a55082..e76c09da 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl*************************************************************************** -dnl Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. * +dnl Copyright (c) 1998-2018,2019 Free Software Foundation, Inc. * dnl * dnl Permission is hereby granted, free of charge, to any person obtaining a * dnl copy of this software and associated documentation files (the * @@ -28,14 +28,14 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: configure.in,v 1.672 2018/11/24 22:37:01 tom Exp $ +dnl $Id: configure.in,v 1.674 2019/01/20 12:05:04 tom Exp $ dnl Process this file with autoconf to produce a configure script. dnl dnl See https://invisible-island.net/autoconf/ for additional information. dnl dnl --------------------------------------------------------------------------- AC_PREREQ(2.52.20170501) -AC_REVISION($Revision: 1.672 $) +AC_REVISION($Revision: 1.674 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -2313,13 +2313,16 @@ esac # substitute into misc/Makefile to suppress # (un)install.data from the # (un)install rules. -if test "x$cf_with_db_install" = "xno"; then +if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then + MAKE_DATABASE="#" MISC_INSTALL_DATA= MISC_UNINSTALL_DATA= else + MAKE_DATABASE="" MISC_INSTALL_DATA=install.data MISC_UNINSTALL_DATA=uninstall.data fi +AC_SUBST(MAKE_DATABASE) AC_SUBST(MISC_INSTALL_DATA) AC_SUBST(MISC_UNINSTALL_DATA) diff --git a/dist.mk b/dist.mk index b442279d..360f5355 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.1260 2019/01/12 18:35:16 tom Exp $ +# $Id: dist.mk,v 1.1263 2019/01/21 01:57:34 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 = 1 -NCURSES_PATCH = 20190112 +NCURSES_PATCH = 20190121 # 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 1b7b66ca..1a977aac 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.1 (patch 20190112).
+       This describes ncurses version 6.1 (patch 20190121).
 
 
 
diff --git a/doc/html/man/captoinfo.1m.html b/doc/html/man/captoinfo.1m.html
index b8d063ad..1fe16e09 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.1 (patch 20190112).
+       This describes ncurses version 6.1 (patch 20190121).
 
 
 

AUTHOR

diff --git a/doc/html/man/clear.1.html b/doc/html/man/clear.1.html
index caf4109c..405d47ca 100644
--- a/doc/html/man/clear.1.html
+++ b/doc/html/man/clear.1.html
@@ -148,7 +148,7 @@
 

SEE ALSO

        tput(1), terminfo(5)
 
-       This describes ncurses version 6.1 (patch 20190112).
+       This describes ncurses version 6.1 (patch 20190121).
 
 
 
diff --git a/doc/html/man/curs_color.3x.html b/doc/html/man/curs_color.3x.html
index 735c6f95..42ddae7d 100644
--- a/doc/html/man/curs_color.3x.html
+++ b/doc/html/man/curs_color.3x.html
@@ -1,6 +1,6 @@
 
 
 
@@ -47,8 +47,9 @@
 
 

NAME

        start_color, has_colors, can_change_color, init_pair, init_color,
-       color_content, pair_content, reset_color_pairs, COLOR_PAIR, PAIR_NUMBER
-       - curses color manipulation routines
+       init_extended_pair, init_extended_color, color_content, pair_content,
+       extended_color_content, extended_pair_content, reset_color_pairs,
+       COLOR_PAIR, PAIR_NUMBER - curses color manipulation routines
 
 
 

SYNOPSIS

@@ -82,26 +83,26 @@
 
 

Overview

        curses supports color attributes on terminals with that capability.  To
-       use these routines start_color must  be  called,  usually  right  after
+       use  these  routines  start_color  must  be called, usually right after
        initscr.  Colors are always used in pairs (referred to as color-pairs).
-       A color-pair consists of a foreground  color  (for  characters)  and  a
-       background  color (for the blank field on which the characters are dis-
-       played).  A  programmer  initializes  a  color-pair  with  the  routine
+       A  color-pair  consists  of  a  foreground color (for characters) and a
+       background color (for the blank field on which the characters are  dis-
+       played).   A  programmer  initializes  a  color-pair  with  the routine
        init_pair.  After it has been initialized, COLOR_PAIR(n) can be used to
        convert the pair to a video attribute.
 
-       If a terminal is capable of redefining colors, the programmer  can  use
-       the  routine  init_color to change the definition of a color.  The rou-
-       tines has_colors and can_change_color return TRUE or  FALSE,  depending
+       If  a  terminal is capable of redefining colors, the programmer can use
+       the routine init_color to change the definition of a color.   The  rou-
+       tines  has_colors  and can_change_color return TRUE or FALSE, depending
        on whether the terminal has color capabilities and whether the program-
        mer can change the colors.  The routine color_content allows a program-
-       mer  to  extract  the  amounts of red, green, and blue components in an
-       initialized color.  The routine pair_content  allows  a  programmer  to
+       mer to extract the amounts of red, green, and  blue  components  in  an
+       initialized  color.   The  routine  pair_content allows a programmer to
        find out how a given color-pair is currently defined.
 
 
 

Color Rendering

-       The  curses  library  combines these inputs to produce the actual fore-
+       The curses library combines these inputs to produce  the  actual  fore-
        ground and background colors shown on the screen:
 
        o   per-character video attributes (e.g., via waddch),
@@ -111,14 +112,14 @@
        o   the background character (e.g., wbkgdset).
 
        Per-character and window attributes are usually set by a parameter con-
-       taining  video attributes including a color pair value.  Some functions
+       taining video attributes including a color pair value.  Some  functions
        such as wattr_set use a separate parameter which is the color pair num-
        ber.
 
-       The  background  character  is  a special case: it includes a character
+       The background character is a special case:  it  includes  a  character
        value, just as if it were passed to waddch.
 
-       The curses library does the actual work of combining these color  pairs
+       The  curses library does the actual work of combining these color pairs
        in an internal function called from waddch:
 
        o   If the parameter passed to waddch is blank, and it uses the special
@@ -126,17 +127,17 @@
 
            o   curses next checks the window attribute.
 
-           o   If the window attribute does not use color pair 0, curses  uses
+           o   If  the window attribute does not use color pair 0, curses uses
                the color pair from the window attribute.
 
            o   Otherwise, curses uses the background character.
 
-       o   If  the parameter passed to waddch is not blank, or it does not use
-           the special color pair 0, curses prefers the color  pair  from  the
-           parameter,  if  it  is nonzero.  Otherwise, it tries the window at-
+       o   If the parameter passed to waddch is not blank, or it does not  use
+           the  special  color  pair 0, curses prefers the color pair from the
+           parameter, if it is nonzero.  Otherwise, it tries  the  window  at-
            tribute next, and finally the background character.
 
-       Some curses functions such as wprintw call waddch.  Those do  not  com-
+       Some  curses  functions such as wprintw call waddch.  Those do not com-
        bine its parameter with a color pair.  Consequently those calls use on-
        ly the window attribute or the background character.
 
@@ -155,68 +156,74 @@
              COLOR_CYAN
              COLOR_WHITE
 
-       Some terminals support more than the eight (8)  "ANSI"  colors.   There
+       Some  terminals  support  more than the eight (8) "ANSI" colors.  There
        are no standard names for those additional colors.
 
 
 

VARIABLES

 
 

COLORS

-       is  initialized by start_color to the maximum number of colors the ter-
+       is initialized by start_color to the maximum number of colors the  ter-
        minal can support.
 
 
 

COLOR_PAIRS

-       is initialized by start_color to the maximum number of color pairs  the
+       is  initialized by start_color to the maximum number of color pairs the
        terminal can support.
 
 
 

FUNCTIONS

 
 

start_color

-       The  start_color  routine  requires no arguments.  It must be called if
-       the programmer wants to use colors, and before any other color  manipu-
-       lation  routine  is  called.   It is good practice to call this routine
+       The start_color routine requires no arguments.  It must  be  called  if
+       the  programmer wants to use colors, and before any other color manipu-
+       lation routine is called.  It is good practice  to  call  this  routine
        right after initscr.  start_color does this:
 
-       o   It initializes two global variables, COLORS  and  COLOR_PAIRS  (re-
-           spectively  defining  the  maximum number of colors and color-pairs
+       o   It  initializes  two  global variables, COLORS and COLOR_PAIRS (re-
+           spectively defining the maximum number of  colors  and  color-pairs
            the terminal can support).
 
-       o   It initializes the special color pair 0 to the  default  foreground
+       o   It  initializes  the special color pair 0 to the default foreground
            and background colors.  No other color pairs are initialized.
 
-       o   It  restores the colors on the terminal to the values they had when
+       o   It restores the colors on the terminal to the values they had  when
            the terminal was just turned on.
 
-       o   If the terminal supports the initc  (initialize_color)  capability,
-           start_color  initializes  its  internal table representing the red,
-           green and blue components of the color palette.
+       o   If  the  terminal supports the initc (initialize_color) capability,
+           start_color initializes its internal table  representing  the  red,
+           green, and blue components of the color palette.
 
            The components depend on whether the terminal uses CGA (aka "ANSI")
-           or  HLS  (i.e.,  the  hls  (hue_lightness_saturation) capability is
-           set).  The table  is  initialized  first  for  eight  basic  colors
-           (black,  red,  green,  yellow, blue, magenta, cyan, and white), and
-           after that (if the terminal supports more than  eight  colors)  the
-           components are initialized to 1000.
+           or HLS (i.e.,  the  hls  (hue_lightness_saturation)  capability  is
+           set).   The  table  is  initialized  first  for  eight basic colors
+           (black, red, green, yellow, blue, magenta, cyan, and white),  using
+           weights that depend upon the CGA/HLS choice.  For "ANSI" colors the
+           weights are 680 or 0 depending on whether  the  corresponding  red,
+           green,  or  blue component is used or not.  That permits using 1000
+           to represent bold/bright colors.  After the  initial  eight  colors
+           (if  the  terminal  supports more than eight colors) the components
+           are initialized using the same pattern, but with weights  of  1000.
+           SVr4 uses a similar scheme, but uses 1000 for the components of the
+           initial eight colors.
 
            start_color does not attempt to set the terminal's color palette to
            match its built-in table.  An application may use init_color to al-
            ter the internal table along with the terminal's color.
 
-       These  limits  apply  to  color values and color pairs.  Values outside
+       These limits apply to color values and  color  pairs.   Values  outside
        these limits are not legal, and may result in a runtime error:
 
-       o   COLORS corresponds to the terminal database's max_colors  capabili-
+       o   COLORS  corresponds to the terminal database's max_colors capabili-
            ty, (see terminfo(5)).
 
-       o   color  values are expected to be in the range 0 to COLORS-1, inclu-
+       o   color values are expected to be in the range 0 to COLORS-1,  inclu-
            sive (including 0 and COLORS-1).
 
-       o   a special color value -1 is used in certain extended  functions  to
-           denote the default color (see use_default_colors).
+       o   a  special  color value -1 is used in certain extended functions to
+           denote the default color (see use_default_colors(3x)).
 
-       o   COLOR_PAIRS  corresponds to the terminal database's max_pairs capa-
+       o   COLOR_PAIRS corresponds to the terminal database's max_pairs  capa-
            bility, (see terminfo(5)).
 
        o   legal color pair values are in the range 1 to COLOR_PAIRS-1, inclu-
@@ -225,98 +232,131 @@
        o   color pair 0 is special; it denotes "no color".
 
            Color pair 0 is assumed to be white on black, but is actually what-
-           ever the terminal implements before color is initialized.  It  can-
+           ever  the terminal implements before color is initialized.  It can-
            not be modified by the application.
 
 
 

has_colors

-       The  has_colors  routine requires no arguments.  It returns TRUE if the
+       The has_colors routine requires no arguments.  It returns TRUE  if  the
        terminal can manipulate colors; otherwise, it returns FALSE.  This rou-
        tine facilitates writing terminal-independent programs.  For example, a
-       programmer can use it to decide whether to  use  color  or  some  other
+       programmer  can  use  it  to  decide whether to use color or some other
        video attribute.
 
 
 

can_change_color

        The can_change_color routine requires no arguments.  It returns TRUE if
-       the terminal supports colors and can change their  definitions;  other,
-       it  returns  FALSE.  This routine facilitates writing terminal-indepen-
+       the  terminal  supports colors and can change their definitions; other,
+       it returns FALSE.  This routine facilitates  writing  terminal-indepen-
        dent programs.
 
 
 

init_pair

        The init_pair routine changes the definition of a color-pair.  It takes
-       three  arguments: the number of the color-pair to be changed, the fore-
+       three arguments: the number of the color-pair to be changed, the  fore-
        ground color number, and the background color number.  For portable ap-
        plications:
 
-       o   The  first  argument  must be a legal color pair value.  If default
-           colors are used (see use_default_colors) the upper limit is adjust-
-           ed to allow for extra pairs which use a default color in foreground
-           and/or background.
+       o   The first argument must be a legal color pair  value.   If  default
+           colors are used (see use_default_colors(3x)) the upper limit is ad-
+           justed to allow for extra pairs which use a default color in  fore-
+           ground and/or background.
 
        o   The second and third arguments must be legal color values.
 
-       If the color-pair was previously initialized, the screen  is  refreshed
-       and  all  occurrences of that color-pair are changed to the new defini-
+       If  the  color-pair was previously initialized, the screen is refreshed
+       and all occurrences of that color-pair are changed to the  new  defini-
        tion.
 
-       As an extension, ncurses allows you to set color pair  0  via  the  as-
-       sume_default_colors(3x)  routine, or to specify the use of default col-
-       ors (color number -1) if you first  invoke  the  use_default_colors(3x)
+       As  an  extension,  ncurses  allows you to set color pair 0 via the as-
+       sume_default_colors(3x) routine, or to specify the use of default  col-
+       ors  (color  number  -1) if you first invoke the use_default_colors(3x)
        routine.
 
-       The  extension  reset_color_pairs  tells  ncurses to discard all of the
-       color-pair information which was set with init_pair.  It  also  touches
-       the  current-  and  standard-screens, allowing an application to switch
-       color palettes rapidly.
+
+

init_extended_pair

+       Because init_pair uses signed shorts for its  parameters,  that  limits
+       color-pairs  and  color-values to 32767 on modern hardware.  The exten-
+       sion init_extended_pair uses ints for the color-pair  and  color-value,
+       allowing a larger number of colors to be supported.
 
 
 

init_color

-       The init_color routine changes the definition of  a  color.   It  takes
+       The  init_color  routine  changes  the definition of a color.  It takes
        four arguments: the number of the color to be changed followed by three
        RGB values (for the amounts of red, green, and blue components).
 
-       o   The first argument must be a legal color value; default colors  are
-           not  allowed  here.   (See the section Colors for the default color
+       o   The  first argument must be a legal color value; default colors are
+           not allowed here.  (See the section Colors for  the  default  color
            index.)
 
-       o   Each of the last three arguments must be a value  in  the  range  0
+       o   Each  of  the  last  three arguments must be a value in the range 0
            through 1000.
 
-       When  init_color  is  used, all occurrences of that color on the screen
+       When init_color is used, all occurrences of that color  on  the  screen
        immediately change to the new definition.
 
 
+

init_extended_color

+       Because  init_color  uses signed shorts for its parameters, that limits
+       color-values and their red, green, and blue components to 32767 on mod-
+       ern hardware.  The extension init_extended_color uses ints for the col-
+       or value and for setting the red, green, and blue components,  allowing
+       a larger number of colors to be supported.
+
+
 

color_content

        The color_content routine gives programmers a way to find the intensity
-       of  the  red, green, and blue (RGB) components in a color.  It requires
-       four arguments: the color number, and three  addresses  of  shorts  for
-       storing  the information about the amounts of red, green, and blue com-
+       of the red, green, and blue (RGB) components in a color.   It  requires
+       four  arguments:  the  color  number, and three addresses of shorts for
+       storing the information about the amounts of red, green, and blue  com-
        ponents in the given color.
 
-       o   The first argument must be a legal color  value,  i.e.,  0  through
+       o   The  first  argument  must  be a legal color value, i.e., 0 through
            COLORS-1, inclusive.
 
-       o   The  values that are stored at the addresses pointed to by the last
-           three arguments are in the range  0  (no  component)  through  1000
+       o   The values that are stored at the addresses pointed to by the  last
+           three  arguments  are  in  the  range 0 (no component) through 1000
            (maximum amount of component), inclusive.
 
 
+

extended_color_content

+       Because color_content uses signed shorts for its parameters, that  lim-
+       its  color-values and their red, green, and blue components to 32767 on
+       modern hardware.  The extension extended_color_content  uses  ints  for
+       the  color value and for returning the red, green, and blue components,
+       allowing a larger number of colors to be supported.
+
+
 

pair_content

-       The  pair_content  routine allows programmers to find out what colors a
-       given color-pair consists of.  It requires three arguments: the  color-
+       The pair_content routine allows programmers to find out what  colors  a
+       given  color-pair consists of.  It requires three arguments: the color-
        pair number, and two addresses of shorts for storing the foreground and
        the background color numbers.
 
-       o   The first argument must be a legal color value, i.e., in the  range
+       o   The  first argument must be a legal color value, i.e., in the range
            1 through COLOR_PAIRS-1, inclusive.
 
-       o   The  values that are stored at the addresses pointed to by the sec-
-           ond and third arguments are in the range 0 through  COLORS,  inclu-
+       o   The values that are stored at the addresses pointed to by the  sec-
+           ond  and  third arguments are in the range 0 through COLORS, inclu-
            sive.
 
 
+

extended_pair_content

+       Because pair_content uses signed shorts for its parameters, that limits
+       color-pair and color-values to 32767 on modern hardware.  The extension
+       extended_pair_content uses ints for the color pair  and  for  returning
+       the  foreground and background colors, allowing a larger number of col-
+       ors to be supported.
+
+
+

reset_color_pairs

+       The extension reset_color_pairs tells ncurses to  discard  all  of  the
+       color-pair  information  which was set with init_pair.  It also touches
+       the current- and standard-screens, allowing an  application  to  switch
+       color palettes rapidly.
+
+
 

PAIR_NUMBER

        PAIR_NUMBER(attrs)  extracts  the  color value from its attrs parameter
        and returns it as a color pair number.
@@ -337,13 +377,29 @@
        specifies  only "an integer value other than ERR") upon successful com-
        pletion.
 
-       X/Open defines no error conditions.  This  implementation  will  return
-       ERR  on  attempts  to  use color values outside the range 0 to COLORS-1
-       (except for the default colors extension), or use color  pairs  outside
-       the  range 0 to COLOR_PAIRS-1.  Color values used in init_color must be
-       in the range 0 to 1000.  An error is returned from all functions if the
-       terminal has not been initialized.  An error is returned from secondary
-       functions such as init_pair if start_color was not called.
+       X/Open defines no error conditions.  SVr4 does document some error con-
+       ditions which apply in general:
+
+       o   This implementation will return ERR on attempts to use color values
+           outside the range 0 to COLORS-1 (except for the default colors  ex-
+           tension), or use color pairs outside the range 0 to COLOR_PAIRS-1.
+
+           Color values used in init_color must be in the range 0 to 1000.
+
+           An  error  is  returned  from all functions if the terminal has not
+           been initialized.
+
+           An error is returned from secondary functions such as init_pair  if
+           start_color was not called.
+
+       o   SVr4  does much the same, except that it returns ERR from pair_con-
+           tent if the pair was not initialized using init_pairs  and  it  re-
+           turns  ERR  from  color_content  if  the  terminal does not support
+           changing colors.
+
+           This implementation does not return ERR for either case.
+
+       Specific functions make additional checks:
 
           init_color
                returns an error if the terminal does not support this feature,
@@ -440,9 +496,14 @@
 
  • has_colors
  • can_change_color
  • init_pair
  • +
  • init_extended_pair
  • init_color
  • +
  • init_extended_color
  • color_content
  • +
  • extended_color_content
  • pair_content
  • +
  • extended_pair_content
  • +
  • reset_color_pairs
  • PAIR_NUMBER
  • COLOR_PAIR
  • diff --git a/doc/html/man/curs_inopts.3x.html b/doc/html/man/curs_inopts.3x.html index 3968e87b..123fcb2c 100644 --- a/doc/html/man/curs_inopts.3x.html +++ b/doc/html/man/curs_inopts.3x.html @@ -1,6 +1,6 @@ @@ -141,7 +141,7 @@

    meta

            Initially,  whether the terminal returns 7 or 8 significant bits on in-
    -       put depends on the control mode of the tty driver [see termio(7)].   To
    +       put depends on the control mode of the tty driver [see termios(3)].  To
            force  8  bits  to be returned, invoke meta(win, TRUE); this is equiva-
            lent, under POSIX, to setting the CS8 flag on the terminal.  To force 7
            bits to be returned, invoke meta(win, FALSE); this is equivalent, under
    @@ -177,7 +177,7 @@
     

    noqiflush

            When the noqiflush routine is used, normal flush of  input  and  output
            queues  associated  with the INTR, QUIT and SUSP characters will not be
    -       done [see termio(7)].  When qiflush  is  called,  the  queues  will  be
    +       done [see termios(3)].  When qiflush is  called,  the  queues  will  be
            flushed  when  these control characters are read.  You may want to call
            noqiflush in a signal handler if you want output to continue as  though
            the interrupt had not occurred, after the handler exits.
    @@ -274,7 +274,7 @@
     
     

    SEE ALSO

            curses(3x),   curs_getch(3x),   curs_initscr(3x),   curs_util(3x),  de-
    -       fine_key(3x), termio(7)
    +       fine_key(3x), termios(3)
     
     
     
    diff --git a/doc/html/man/form.3x.html b/doc/html/man/form.3x.html
    index f4b8049c..add1da1b 100644
    --- a/doc/html/man/form.3x.html
    +++ b/doc/html/man/form.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -202,7 +202,7 @@
                 The form driver could not process the request.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
            E_UNKNOWN_COMMAND
                 The form driver code saw an unknown request code.
    @@ -246,7 +246,7 @@
            curses(3x)  and  related  pages  whose names begin "form_" for detailed
            descriptions of the entry points.
     
    -       This describes ncurses version 6.1 (patch 20190112).
    +       This describes ncurses version 6.1 (patch 20190121).
     
     
     
    diff --git a/doc/html/man/form_cursor.3x.html b/doc/html/man/form_cursor.3x.html
    index 95f414e4..030ef048 100644
    --- a/doc/html/man/form_cursor.3x.html
    +++ b/doc/html/man/form_cursor.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -74,7 +74,7 @@
                 The form has not been posted.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/form_driver.3x.html b/doc/html/man/form_driver.3x.html
    index 08159b16..3e057c64 100644
    --- a/doc/html/man/form_driver.3x.html
    +++ b/doc/html/man/form_driver.3x.html
    @@ -1,6 +1,6 @@
     
     
     
    @@ -250,7 +250,7 @@
                 The form driver could not process the request.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
            E_UNKNOWN_COMMAND
                 The form driver code saw an unknown request code.
    diff --git a/doc/html/man/form_field.3x.html b/doc/html/man/form_field.3x.html
    index 5ee2af32..486883ab 100644
    --- a/doc/html/man/form_field.3x.html
    +++ b/doc/html/man/form_field.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -91,7 +91,7 @@
                 The form is already posted.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/form_field_attributes.3x.html b/doc/html/man/form_field_attributes.3x.html
    index 86aaee9a..be28a3a1 100644
    --- a/doc/html/man/form_field_attributes.3x.html
    +++ b/doc/html/man/form_field_attributes.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -85,7 +85,7 @@
                 Routine detected an incorrect or out-of-range argument.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/form_field_buffer.3x.html b/doc/html/man/form_field_buffer.3x.html
    index d55906db..8cd7bfab 100644
    --- a/doc/html/man/form_field_buffer.3x.html
    +++ b/doc/html/man/form_field_buffer.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -117,7 +117,7 @@
            E_OK The routine succeeded.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
            E_BAD_ARGUMENT
                 Routine detected an incorrect or out-of-range argument.
    @@ -141,6 +141,10 @@
            These  routines emulate the System V forms library.  They were not sup-
            ported on Version 7 or BSD versions.
     
    +       The  set_max_field   function   checks   for   an   ncurses   extension
    +       O_INPUT_FIELD  which  allows a dynamic field to shrink if the new limit
    +       is smaller than the current field size.
    +
     
     

    AUTHORS

            Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric S.
    diff --git a/doc/html/man/form_field_info.3x.html b/doc/html/man/form_field_info.3x.html
    index 7bfe9c4e..dd2ae4af 100644
    --- a/doc/html/man/form_field_info.3x.html
    +++ b/doc/html/man/form_field_info.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -76,7 +76,7 @@
            E_OK The routine succeeded.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
            E_BAD_ARGUMENT
                 Routine detected an incorrect or out-of-range argument.
    diff --git a/doc/html/man/form_field_just.3x.html b/doc/html/man/form_field_just.3x.html
    index 67ebc155..cb1d9c43 100644
    --- a/doc/html/man/form_field_just.3x.html
    +++ b/doc/html/man/form_field_just.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -72,7 +72,7 @@
            E_OK The routine succeeded.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
            E_BAD_ARGUMENT
                 Routine detected an incorrect or out-of-range argument.
    diff --git a/doc/html/man/form_field_opts.3x.html b/doc/html/man/form_field_opts.3x.html
    index e5877134..0d7c5778 100644
    --- a/doc/html/man/form_field_opts.3x.html
    +++ b/doc/html/man/form_field_opts.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -126,6 +126,11 @@
                 one-character fields as well as allowing the library  to  maintain
                 consistent state.
     
    +       O_INPUT_FIELD
    +            The set_max_field function checks for this extension, which allows
    +            a dynamic field to shrink if the new limit  is  smaller  than  the
    +            current field size.
    +
     
     

    RETURN VALUE

            Except for field_opts, each routine returns one of the following:
    @@ -139,7 +144,7 @@
                 The field is the current field.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/form_field_validation.3x.html b/doc/html/man/form_field_validation.3x.html
    index 143aed92..091fd977 100644
    --- a/doc/html/man/form_field_validation.3x.html
    +++ b/doc/html/man/form_field_validation.3x.html
    @@ -1,6 +1,6 @@
     
     
     
    @@ -105,9 +105,9 @@
                     value is less than or equal to the minimum value, the range is
                     simply  ignored.   On  return,  the  field buffer is formatted
                     according to the printf format specification ".*ld", where the
    -                '*' is replaced by the precision argument.
    +                "*" is replaced by the precision argument.
     
    -                For details of the precision handling see printf's man-page.
    +                For details of the precision handling see printf(3).
     
            TYPE_NUMERIC
                 Numeric data (may have a decimal-point part).  This requires addi-
    @@ -123,10 +123,10 @@
                     or equal to the minimum value, the range is simply ignored.
     
                     On  return,  the  field  buffer  is formatted according to the
    -                printf format specification ".*f", where the '*'  is  replaced
    +                printf format specification ".*f", where the "*"  is  replaced
                     by the precision argument.
     
    -                For details of the precision handling see printf's man-page.
    +                For details of the precision handling see printf(3).
     
            TYPE_REGEXP
                 Regular  expression  data.  Requires a regular expression (char *)
    @@ -164,7 +164,7 @@
            E_OK The routine succeeded.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/form_fieldtype.3x.html b/doc/html/man/form_fieldtype.3x.html
    index 71448a2a..2bf041d2 100644
    --- a/doc/html/man/form_fieldtype.3x.html
    +++ b/doc/html/man/form_fieldtype.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -133,7 +133,7 @@
                 The field is the current field.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/form_hook.3x.html b/doc/html/man/form_hook.3x.html
    index 79b29532..fcabbd40 100644
    --- a/doc/html/man/form_hook.3x.html
    +++ b/doc/html/man/form_hook.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -93,7 +93,7 @@
            E_OK The routine succeeded.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/form_opts.3x.html b/doc/html/man/form_opts.3x.html
    index f32e40b7..d0f6f639 100644
    --- a/doc/html/man/form_opts.3x.html
    +++ b/doc/html/man/form_opts.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -88,7 +88,7 @@
            E_OK The routine succeeded.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/form_page.3x.html b/doc/html/man/form_page.3x.html
    index 451c967a..3700dca9 100644
    --- a/doc/html/man/form_page.3x.html
    +++ b/doc/html/man/form_page.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -96,7 +96,7 @@
                 The form driver could not process the request.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/form_post.3x.html b/doc/html/man/form_post.3x.html
    index cf9614f2..24f7f9b6 100644
    --- a/doc/html/man/form_post.3x.html
    +++ b/doc/html/man/form_post.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -90,7 +90,7 @@
                 The form has already been posted.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/form_win.3x.html b/doc/html/man/form_win.3x.html
    index 60b23b6e..0ab52d37 100644
    --- a/doc/html/man/form_win.3x.html
    +++ b/doc/html/man/form_win.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -84,7 +84,7 @@
            E_OK The routine succeeded.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
            E_BAD_ARGUMENT
                 Routine detected an incorrect or out-of-range argument.
    diff --git a/doc/html/man/infocmp.1m.html b/doc/html/man/infocmp.1m.html
    index f50eccd5..f899bf78 100644
    --- a/doc/html/man/infocmp.1m.html
    +++ b/doc/html/man/infocmp.1m.html
    @@ -481,7 +481,7 @@
     
            https://invisible-island.net/ncurses/tctest.html
     
    -       This describes ncurses version 6.1 (patch 20190112).
    +       This describes ncurses version 6.1 (patch 20190121).
     
     
     

    AUTHOR

    diff --git a/doc/html/man/infotocap.1m.html b/doc/html/man/infotocap.1m.html
    index 2aa26f6c..13cfd50a 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.1 (patch 20190112).
    +       This describes ncurses version 6.1 (patch 20190121).
     
     
     

    AUTHOR

    diff --git a/doc/html/man/menu.3x.html b/doc/html/man/menu.3x.html
    index bf9e15d6..1baa6566 100644
    --- a/doc/html/man/menu.3x.html
    +++ b/doc/html/man/menu.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -181,7 +181,7 @@
                 The menu driver could not process the request.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
            E_UNKNOWN_COMMAND
                 The menu driver code saw an unknown request code.
    @@ -221,7 +221,7 @@
            curses(3x)  and  related  pages  whose names begin "menu_" for detailed
            descriptions of the entry points.
     
    -       This describes ncurses version 6.1 (patch 20190112).
    +       This describes ncurses version 6.1 (patch 20190121).
     
     
     
    diff --git a/doc/html/man/menu_attributes.3x.html b/doc/html/man/menu_attributes.3x.html
    index 3aae7f44..45d3e908 100644
    --- a/doc/html/man/menu_attributes.3x.html
    +++ b/doc/html/man/menu_attributes.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -90,7 +90,7 @@
            E_OK The routine succeeded.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
            E_BAD_ARGUMENT
                 Routine detected an incorrect or out-of-range argument.
    diff --git a/doc/html/man/menu_cursor.3x.html b/doc/html/man/menu_cursor.3x.html
    index bfc72c46..dd772c6b 100644
    --- a/doc/html/man/menu_cursor.3x.html
    +++ b/doc/html/man/menu_cursor.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -68,7 +68,7 @@
            E_OK The routine succeeded.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
            E_BAD_ARGUMENT
                 Routine detected an incorrect or out-of-range argument.
    diff --git a/doc/html/man/menu_driver.3x.html b/doc/html/man/menu_driver.3x.html
    index 338a68ad..e3607a4f 100644
    --- a/doc/html/man/menu_driver.3x.html
    +++ b/doc/html/man/menu_driver.3x.html
    @@ -1,6 +1,6 @@
     
     
     
    @@ -184,7 +184,7 @@
            E_OK The routine succeeded.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
            E_BAD_ARGUMENT
                 Routine detected an incorrect or out-of-range argument.
    diff --git a/doc/html/man/menu_format.3x.html b/doc/html/man/menu_format.3x.html
    index 679b8066..31b86a54 100644
    --- a/doc/html/man/menu_format.3x.html
    +++ b/doc/html/man/menu_format.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -78,7 +78,7 @@
            E_OK The routine succeeded.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
            E_BAD_ARGUMENT
                 Routine detected an incorrect or out-of-range argument.
    diff --git a/doc/html/man/menu_hook.3x.html b/doc/html/man/menu_hook.3x.html
    index a7805fdb..09b77aa7 100644
    --- a/doc/html/man/menu_hook.3x.html
    +++ b/doc/html/man/menu_hook.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -95,7 +95,7 @@
            E_OK The routine succeeded.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/menu_items.3x.html b/doc/html/man/menu_items.3x.html
    index 50a1221c..6834963c 100644
    --- a/doc/html/man/menu_items.3x.html
    +++ b/doc/html/man/menu_items.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -89,7 +89,7 @@
                 The menu is already posted.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/menu_mark.3x.html b/doc/html/man/menu_mark.3x.html
    index 08f0fc85..b111ed57 100644
    --- a/doc/html/man/menu_mark.3x.html
    +++ b/doc/html/man/menu_mark.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -85,7 +85,7 @@
                 Routine detected an incorrect or out-of-range argument.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/menu_new.3x.html b/doc/html/man/menu_new.3x.html
    index 759ccaa1..7437847f 100644
    --- a/doc/html/man/menu_new.3x.html
    +++ b/doc/html/man/menu_new.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -79,7 +79,7 @@
            E_OK The routine succeeded.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
            E_BAD_ARGUMENT
                 Routine detected an incorrect or out-of-range argument.
    diff --git a/doc/html/man/menu_opts.3x.html b/doc/html/man/menu_opts.3x.html
    index e287bbbe..66d44d5e 100644
    --- a/doc/html/man/menu_opts.3x.html
    +++ b/doc/html/man/menu_opts.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -104,7 +104,7 @@
            E_OK The routine succeeded.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
            E_POSTED
                 The menu is already posted.
    diff --git a/doc/html/man/menu_pattern.3x.html b/doc/html/man/menu_pattern.3x.html
    index 8aca2c46..3a63de12 100644
    --- a/doc/html/man/menu_pattern.3x.html
    +++ b/doc/html/man/menu_pattern.3x.html
    @@ -1,6 +1,6 @@
     
     
     
    @@ -89,7 +89,7 @@
                 Character failed to match.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/menu_post.3x.html b/doc/html/man/menu_post.3x.html
    index 4418886f..4ee308ab 100644
    --- a/doc/html/man/menu_post.3x.html
    +++ b/doc/html/man/menu_post.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -73,7 +73,7 @@
            E_OK The routine succeeded.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
            E_BAD_ARGUMENT
                 Routine detected an incorrect or out-of-range argument.
    diff --git a/doc/html/man/menu_win.3x.html b/doc/html/man/menu_win.3x.html
    index 340b314b..76739465 100644
    --- a/doc/html/man/menu_win.3x.html
    +++ b/doc/html/man/menu_win.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -84,7 +84,7 @@
            E_OK The routine succeeded.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
            E_BAD_ARGUMENT
                 Routine detected an incorrect or out-of-range argument.
    diff --git a/doc/html/man/mitem_current.3x.html b/doc/html/man/mitem_current.3x.html
    index 645e7b53..6d946541 100644
    --- a/doc/html/man/mitem_current.3x.html
    +++ b/doc/html/man/mitem_current.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -95,7 +95,7 @@
                 No items are connected to the menu.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/mitem_new.3x.html b/doc/html/man/mitem_new.3x.html
    index d8667069..b6817f7c 100644
    --- a/doc/html/man/mitem_new.3x.html
    +++ b/doc/html/man/mitem_new.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -88,7 +88,7 @@
                 Item is connected to a menu.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/mitem_opts.3x.html b/doc/html/man/mitem_opts.3x.html
    index 1312f108..f580103b 100644
    --- a/doc/html/man/mitem_opts.3x.html
    +++ b/doc/html/man/mitem_opts.3x.html
    @@ -1,7 +1,7 @@
     
     
     
    @@ -82,7 +82,7 @@
            E_OK The routine succeeded.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
     
     

    SEE ALSO

    diff --git a/doc/html/man/mitem_value.3x.html b/doc/html/man/mitem_value.3x.html
    index 52666eba..28d53363 100644
    --- a/doc/html/man/mitem_value.3x.html
    +++ b/doc/html/man/mitem_value.3x.html
    @@ -1,6 +1,6 @@
     
     
     
    @@ -71,7 +71,7 @@
            E_OK The routine succeeded.
     
            E_SYSTEM_ERROR
    -            System error occurred (see errno).
    +            System error occurred (see errno(3)).
     
            E_REQUEST_DENIED
                 The menu driver could not process the request.
    diff --git a/doc/html/man/ncurses.3x.html b/doc/html/man/ncurses.3x.html
    index d4768386..2af18f53 100644
    --- a/doc/html/man/ncurses.3x.html
    +++ b/doc/html/man/ncurses.3x.html
    @@ -59,7 +59,7 @@
            method of updating  character  screens  with  reasonable  optimization.
            This  implementation  is  "new  curses"  (ncurses)  and is the approved
            replacement for 4.4BSD classic curses,  which  has  been  discontinued.
    -       This describes ncurses version 6.1 (patch 20190112).
    +       This describes ncurses version 6.1 (patch 20190121).
     
            The  ncurses  library emulates the curses library of System V Release 4
            UNIX, and XPG4 (X/Open Portability Guide) curses  (also  known  as  XSI
    diff --git a/doc/html/man/ncurses6-config.1.html b/doc/html/man/ncurses6-config.1.html
    index f59f2935..93b05b64 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.1 (patch 20190112).
    +       This describes ncurses version 6.1 (patch 20190121).
     
     
     
    diff --git a/doc/html/man/panel.3x.html b/doc/html/man/panel.3x.html
    index 5c8866d6..0b66b887 100644
    --- a/doc/html/man/panel.3x.html
    +++ b/doc/html/man/panel.3x.html
    @@ -204,7 +204,7 @@
     

    SEE ALSO

            curses(3x), curs_variables(3x),
     
    -       This describes ncurses version 6.1 (patch 20190112).
    +       This describes ncurses version 6.1 (patch 20190121).
     
     
     

    AUTHOR

    diff --git a/doc/html/man/tabs.1.html b/doc/html/man/tabs.1.html
    index 02fb7935..d082112b 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.1 (patch 20190112).
    +       This describes ncurses version 6.1 (patch 20190121).
     
     
     
    diff --git a/doc/html/man/terminfo.5.html b/doc/html/man/terminfo.5.html
    index 4dc11fe6..206ead16 100644
    --- a/doc/html/man/terminfo.5.html
    +++ b/doc/html/man/terminfo.5.html
    @@ -33,7 +33,7 @@
       ****************************************************************************
       * @Id: terminfo.head,v 1.35 2018/07/28 22:29:09 tom Exp @
       * Head of terminfo man page ends here
    -  * @Id: terminfo.tail,v 1.89 2018/05/19 21:01:52 tom Exp @
    +  * @Id: terminfo.tail,v 1.90 2019/01/20 20:21:46 tom Exp @
       * Beginning of terminfo.tail file
       * This file is part of ncurses.
       * See "terminfo.head" for copyright.
    @@ -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.1 (patch 20190112).
    +       ncurses version 6.1 (patch 20190121).
     
     
     

    Terminfo Entry Syntax

    @@ -1401,9 +1401,9 @@
            %%   outputs "%"
     
            %[[:]flags][width[.precision]][doxXs]
    -            as in printf, flags are [-+#] and space.  Use a ":" to  allow  the
    -            next  character to be a "-" flag, avoiding interpreting "%-" as an
    -            operator.
    +            as in printf(3), flags are [-+#] and space.  Use a  ":"  to  allow
    +            the next character to be a "-" flag, avoiding interpreting "%-" as
    +            an operator.
     
            %c   print pop() like %c in printf
     
    diff --git a/doc/html/man/tic.1m.html b/doc/html/man/tic.1m.html
    index 02a0d102..62069c72 100644
    --- a/doc/html/man/tic.1m.html
    +++ b/doc/html/man/tic.1m.html
    @@ -364,7 +364,7 @@
            infocmp(1m),   captoinfo(1m),   infotocap(1m),   toe(1m),   curses(3x),
            term(5).  terminfo(5).
     
    -       This describes ncurses version 6.1 (patch 20190112).
    +       This describes ncurses version 6.1 (patch 20190121).
     
     
     

    AUTHOR

    diff --git a/doc/html/man/toe.1m.html b/doc/html/man/toe.1m.html
    index 9c0f16c5..8ae6f3a2 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.1 (patch 20190112).
    +       This describes ncurses version 6.1 (patch 20190121).
     
     
     
    diff --git a/doc/html/man/tput.1.html b/doc/html/man/tput.1.html
    index 5102298c..02094a7f 100644
    --- a/doc/html/man/tput.1.html
    +++ b/doc/html/man/tput.1.html
    @@ -522,7 +522,7 @@
     

    SEE ALSO

            clear(1), stty(1), tabs(1), tset(1), terminfo(5), curs_termcap(3x).
     
    -       This describes ncurses version 6.1 (patch 20190112).
    +       This describes ncurses version 6.1 (patch 20190121).
     
     
     
    diff --git a/doc/html/man/tset.1.html b/doc/html/man/tset.1.html
    index d9920c6e..a3e17817 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.1 (patch 20190112).
    +       This describes ncurses version 6.1 (patch 20190121).
     
     
     
    diff --git a/form/fld_max.c b/form/fld_max.c
    index 6c7fe728..fc00bc21 100644
    --- a/form/fld_max.c
    +++ b/form/fld_max.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
    + * Copyright (c) 1998-2013,2019 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            *
    @@ -32,7 +32,7 @@
     
     #include "form.priv.h"
     
    -MODULE_ID("$Id: fld_max.c,v 1.13 2013/08/24 22:59:28 tom Exp $")
    +MODULE_ID("$Id: fld_max.c,v 1.14 2019/01/19 21:26:06 Leon.Winter Exp $")
     
     /*---------------------------------------------------------------------------
     |   Facility      :  libnform  
    @@ -57,11 +57,14 @@ set_max_field(FIELD *field, int maxgrow)
     
           if (maxgrow > 0)
     	{
    -	  if ((single_line_field && (maxgrow < field->dcols)) ||
    -	      (!single_line_field && (maxgrow < field->drows)))
    +	  if (((single_line_field && (maxgrow < field->dcols)) ||
    +	       (!single_line_field && (maxgrow < field->drows))) &&
    +	      !Field_Has_Option(field, O_INPUT_LIMIT))
     	    RETURN(E_BAD_ARGUMENT);
     	}
           field->maxgrow = maxgrow;
    +      if (Field_Has_Option(field, O_INPUT_LIMIT) && field->dcols > maxgrow)
    +	field->dcols = maxgrow;
           ClrStatus(field, _MAY_GROW);
           if (!((unsigned)field->opts & O_STATIC))
     	{
    diff --git a/form/form.h b/form/form.h
    index 1d4c241d..c34be75d 100644
    --- a/form/form.h
    +++ b/form/form.h
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    + * Copyright (c) 1998-2018,2019 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            *
    @@ -30,7 +30,7 @@
      *   Author:  Juergen Pfeifer, 1995,1997                                    *
      ****************************************************************************/
     
    -/* $Id: form.h,v 0.28 2018/04/14 21:06:21 Leon.Winter Exp $ */
    +/* $Id: form.h,v 0.29 2019/01/19 21:26:13 Leon.Winter Exp $ */
     
     #ifndef FORM_H
     #define FORM_H
    @@ -223,6 +223,7 @@ typedef void (*Form_Hook)(FORM *);
     #define O_DYNAMIC_JUSTIFY	(0x0400U)	/* ncurses extension	*/
     #define O_NO_LEFT_STRIP		(0x0800U)	/* ncurses extension	*/
     #define O_EDGE_INSERT_STAY      (0x1000U)	/* ncurses extension	*/
    +#define O_INPUT_LIMIT           (0x2000U)	/* ncurses extension	*/
     
     /* form options */
     #define O_NL_OVERLOAD		(0x0001U)
    diff --git a/form/frm_driver.c b/form/frm_driver.c
    index 9d0b7d3e..123127b7 100644
    --- a/form/frm_driver.c
    +++ b/form/frm_driver.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    + * Copyright (c) 1998-2018,2019 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            *
    @@ -32,7 +32,7 @@
     
     #include "form.priv.h"
     
    -MODULE_ID("$Id: frm_driver.c,v 1.127 2018/09/08 19:03:39 tom Exp $")
    +MODULE_ID("$Id: frm_driver.c,v 1.128 2019/01/20 01:25:02 tom Exp $")
     
     /*----------------------------------------------------------------------------
       This is the core module of the form library. It contains the majority
    @@ -866,7 +866,7 @@ _nc_Position_Form_Cursor(FORM *form)
     |                    E_BAD_ARGUMENT    - invalid form pointer
     |                    E_SYSTEM_ERROR    - general error
     +--------------------------------------------------------------------------*/
    -static bool move_after_insert = true;
    +static bool move_after_insert = TRUE;
     NCURSES_EXPORT(int)
     _nc_Refresh_Current_Field(FORM *form)
     {
    @@ -4359,7 +4359,7 @@ form_driver(FORM *form, int c)
       const Binding_Info *BI = (Binding_Info *) 0;
       int res = E_UNKNOWN_COMMAND;
     
    -  move_after_insert = true;
    +  move_after_insert = TRUE;
     
       T((T_CALLED("form_driver(%p,%d)"), (void *)form, c));
     
    diff --git a/man/curs_color.3x b/man/curs_color.3x
    index f5604e03..965af772 100644
    --- a/man/curs_color.3x
    +++ b/man/curs_color.3x
    @@ -1,5 +1,5 @@
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
     .\"                                                                          *
     .\" Permission is hereby granted, free of charge, to any person obtaining a  *
     .\" copy of this software and associated documentation files (the            *
    @@ -26,7 +26,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: curs_color.3x,v 1.55 2018/07/28 22:15:59 tom Exp $
    +.\" $Id: curs_color.3x,v 1.61 2019/01/20 17:04:08 tom Exp $
     .TH curs_color 3X ""
     .ie \n(.g .ds `` \(lq
     .el       .ds `` ``
    @@ -45,8 +45,12 @@
     \fBcan_change_color\fR,
     \fBinit_pair\fR,
     \fBinit_color\fR,
    +\fBinit_extended_pair\fR,
    +\fBinit_extended_color\fR,
     \fBcolor_content\fR,
     \fBpair_content\fR,
    +\fBextended_color_content\fR,
    +\fBextended_pair_content\fR,
     \fBreset_color_pairs\fR,
     \fBCOLOR_PAIR\fR,
     \fBPAIR_NUMBER\fR \- \fBcurses\fR color manipulation routines
    @@ -205,15 +209,24 @@ they had when the terminal was just turned on.
     If the terminal supports the \fBinitc\fP (\fBinitialize_color\fP) capability,
     \fBstart_color\fP
     initializes its internal table representing the
    -red, green and blue components of the color palette.
    +red, green, and blue components of the color palette.
     .IP
     The components depend on whether the terminal uses
     CGA (aka \*(``ANSI\*('') or
     HLS (i.e., the \fBhls\fP (\fBhue_lightness_saturation\fP) capability is set).
     The table is initialized first for eight basic colors
     (black, red, green, yellow, blue, magenta, cyan, and white),
    -and after that (if the terminal supports more than eight colors)
    -the components are initialized to \fB1000\fP.
    +using weights that depend upon the CGA/HLS choice.
    +For \*(``ANSI\*('' colors the weights are \fB680\fP or \fB0\fP
    +depending on whether the corresponding
    +red, green, or blue component is used or not.
    +That permits using \fB1000\fP to represent bold/bright colors.
    +After the initial eight colors
    +(if the terminal supports more than eight colors)
    +the components are initialized using the same pattern,
    +but with weights of \fB1000\fP.
    +SVr4 uses a similar scheme, but uses \fB1000\fP
    +for the components of the initial eight colors.
     .IP
     \fBstart_color\fP does not attempt to set the terminal's color palette
     to match its built-in table.
    @@ -230,7 +243,7 @@ color values are expected to be in the range \fB0\fP to \fBCOLORS\-1\fP,
     inclusive (including \fB0\fP and \fBCOLORS\-1\fP).
     .bP
     a special color value \fB\-1\fP is used in certain extended functions
    -to denote the \fIdefault color\fP (see \fBuse_default_colors\fP).
    +to denote the \fIdefault color\fP (see \fBuse_default_colors\fP(3X)).
     .bP
     \fBCOLOR_PAIRS\fP corresponds to
     the terminal database's \fBmax_pairs\fP capability,
    @@ -268,7 +281,7 @@ color number, and the background color number.
     For portable applications:
     .bP
     The first argument must be a legal color pair value.
    -If default colors are used (see \fBuse_default_colors\fP)
    +If default colors are used (see \fBuse_default_colors\fP(3X))
     the upper limit is adjusted to allow for extra pairs which use
     a default color in foreground and/or background.
     .bP
    @@ -282,11 +295,14 @@ As an extension, ncurses allows you to set color pair \fB0\fP via
     the \fBassume_default_colors\fR(3X) routine, or to specify the use of
     default colors (color number \fB\-1\fR) if you first invoke the
     \fBuse_default_colors\fR(3X) routine.
    +.SS init_extended_pair
     .PP
    -The extension \fBreset_color_pairs\fP tells ncurses to discard all
    -of the color-pair information which was set with \fBinit_pair\fP.
    -It also touches the current- and standard-screens, allowing an application to
    -switch color palettes rapidly.
    +Because \fBinit_pair\fP uses signed \fBshort\fPs for its parameters,
    +that limits color-pairs and color-values
    +to 32767 on modern hardware.
    +The extension \fBinit_extended_pair\fP uses \fBint\fPs
    +for the color-pair and color-value,
    +allowing a larger number of colors to be supported.
     .SS init_color
     .PP
     The \fBinit_color\fR routine changes the definition of a color.
    @@ -304,6 +320,15 @@ must be a value in the range \fB0\fP through \fB1000\fP.
     When \fBinit_color\fR is used, all
     occurrences of that color on the screen immediately change to the new
     definition.
    +.SS init_extended_color
    +.PP
    +Because \fBinit_color\fP uses signed \fBshort\fPs for its parameters,
    +that limits color-values and their red, green, and blue components
    +to 32767 on modern hardware.
    +The extension \fBinit_extended_color\fP uses \fBint\fPs
    +for the color value and
    +for setting the red, green, and blue components,
    +allowing a larger number of colors to be supported.
     .SS color_content
     .PP
     The \fBcolor_content\fR routine gives programmers a way to find the intensity
    @@ -320,6 +345,15 @@ The values that are stored at the addresses pointed to by the
     last three arguments are in the range
     \fB0\fP (no component) through \fB1000\fP
     (maximum amount of component), inclusive.
    +.SS extended_color_content
    +.PP
    +Because \fBcolor_content\fP uses signed \fBshort\fPs for its parameters,
    +that limits color-values and their red, green, and blue components
    +to 32767 on modern hardware.
    +The extension \fBextended_color_content\fP uses \fBint\fPs
    +for the color value and
    +for returning the red, green, and blue components,
    +allowing a larger number of colors to be supported.
     .SS pair_content
     .PP
     The \fBpair_content\fR routine allows programmers to find out what colors a
    @@ -334,6 +368,20 @@ i.e., in the range \fB1\fP through \fBCOLOR_PAIRS\-1\fR, inclusive.
     The values that are stored at the addresses pointed
     to by the second and third arguments are in the
     range \fB0\fP through \fBCOLORS\fR, inclusive.
    +.SS extended_pair_content
    +.PP
    +Because \fBpair_content\fP uses signed \fBshort\fPs for its parameters,
    +that limits color-pair and color-values to 32767 on modern hardware.
    +The extension \fBextended_pair_content\fP uses \fBint\fPs
    +for the color pair and
    +for returning the foreground and background colors,
    +allowing a larger number of colors to be supported.
    +.SS reset_color_pairs
    +.PP
    +The extension \fBreset_color_pairs\fP tells ncurses to discard all
    +of the color-pair information which was set with \fBinit_pair\fP.
    +It also touches the current- and standard-screens, allowing an application to
    +switch color palettes rapidly.
     .SS PAIR_NUMBER
     .PP
     \fBPAIR_NUMBER(\fR\fIattrs\fR) extracts the color
    @@ -354,16 +402,32 @@ All other routines return the integer \fBERR\fR upon failure and an \fBOK\fR
     other than \fBERR\fR\*('') upon successful completion.
     .PP
     X/Open defines no error conditions.
    +SVr4 does document some error conditions which apply in general:
    +.bP
     This implementation will return \fBERR\fR on attempts to
     use color values outside the range \fB0\fP to \fBCOLORS\fP\-1
     (except for the default colors extension),
     or use color pairs outside the range \fB0\fP to \fBCOLOR_PAIRS\-1\fP.
    +.IP
     Color values used in \fBinit_color\fP must be
     in the range \fB0\fP to \fB1000\fP.
    +.IP
     An error is returned from all functions
     if the terminal has not been initialized.
    +.IP
     An error is returned from secondary functions such as \fBinit_pair\fP
     if \fBstart_color\fP was not called.
    +.bP
    +SVr4 does much the same, except that
    +it returns \fBERR\fP from \fBpair_content\fP if the pair was not initialized
    +using \fBinit_pairs\fP
    +and 
    +it returns \fBERR\fP from \fBcolor_content\fP
    +if the terminal does not support changing colors.
    +.IP
    +This implementation does not return \fBERR\fP for either case.
    +.PP
    +Specific functions make additional checks:
     .RS 3
     .TP 5
     \fBinit_color\fP
    diff --git a/man/curs_inopts.3x b/man/curs_inopts.3x
    index a10ce60d..214edd74 100644
    --- a/man/curs_inopts.3x
    +++ b/man/curs_inopts.3x
    @@ -1,5 +1,5 @@
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
     .\"                                                                          *
     .\" Permission is hereby granted, free of charge, to any person obtaining a  *
     .\" copy of this software and associated documentation files (the            *
    @@ -26,7 +26,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: curs_inopts.3x,v 1.27 2018/07/28 22:20:54 tom Exp $
    +.\" $Id: curs_inopts.3x,v 1.28 2019/01/20 20:39:35 tom Exp $
     .TH curs_inopts 3X ""
     .ie \n(.g .ds `` \(lq
     .el       .ds `` ``
    @@ -178,7 +178,7 @@ The default value for keypad is \fBFALSE\fP.
     .SS meta
     .PP
     Initially, whether the terminal returns 7 or 8 significant bits on
    -input depends on the control mode of the tty driver [see termio(7)].
    +input depends on the control mode of the tty driver [see \fBtermios\fP(3)].
     To force 8 bits to be returned, invoke \fBmeta\fR(\fIwin\fR,
     \fBTRUE\fR); this is equivalent, under POSIX, to setting the CS8 flag
     on the terminal.
    @@ -225,7 +225,7 @@ the BREAK key depends on other bits in the tty driver that are not set by
     .PP
     When the \fBnoqiflush\fR routine is used, normal flush of input and
     output queues associated with the \fBINTR\fR, \fBQUIT\fR and
    -\fBSUSP\fR characters will not be done [see termio(7)].
    +\fBSUSP\fR characters will not be done [see \fBtermios\fP(3)].
     When
     \fBqiflush\fR is called, the queues will be flushed when these control
     characters are read.
    @@ -345,4 +345,4 @@ control states that are hard to predict or understand; it is not recommended.
     \fBcurs_initscr\fR(3X),
     \fBcurs_util\fR(3X),
     \fBdefine_key\fR(3X),
    -\fBtermio\fR(7)
    +\fBtermios\fR(3)
    diff --git a/man/form.3x b/man/form.3x
    index e9576b20..96c64489 100644
    --- a/man/form.3x
    +++ b/man/form.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: form.3x,v 1.31 2018/07/28 21:34:56 tom Exp $
    +.\" $Id: form.3x,v 1.32 2019/01/20 20:31:42 tom Exp $
     .TH form 3X ""
     .ie \n(.g .ds `` \(lq
     .el       .ds `` ``
    @@ -198,7 +198,7 @@ The form is already posted.
     The form driver could not process the request.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .TP 5
     .B E_UNKNOWN_COMMAND
     The form driver code saw an unknown request code.
    diff --git a/man/form_cursor.3x b/man/form_cursor.3x
    index fe4d6690..b0073e1f 100644
    --- a/man/form_cursor.3x
    +++ b/man/form_cursor.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2015,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: form_cursor.3x,v 1.10 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: form_cursor.3x,v 1.11 2019/01/20 20:31:42 tom Exp $
     .TH form_cursor 3X ""
     .SH NAME
     \fBpos_form_cursor\fR \- position a form window cursor
    @@ -55,7 +55,7 @@ Routine detected an incorrect or out-of-range argument.
     The form has not been posted.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .
     .SH SEE ALSO
     \fBcurses\fR(3X), \fBform\fR(3X).
    diff --git a/man/form_driver.3x b/man/form_driver.3x
    index 292f93a5..3b8308a9 100644
    --- a/man/form_driver.3x
    +++ b/man/form_driver.3x
    @@ -1,5 +1,5 @@
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
     .\"                                                                          *
     .\" Permission is hereby granted, free of charge, to any person obtaining a  *
     .\" copy of this software and associated documentation files (the            *
    @@ -26,7 +26,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: form_driver.3x,v 1.31 2018/07/28 22:08:59 tom Exp $
    +.\" $Id: form_driver.3x,v 1.32 2019/01/20 20:31:42 tom Exp $
     .TH form_driver 3X ""
     .de bP
     .ie n  .IP \(bu 4
    @@ -245,7 +245,7 @@ No fields are connected to the form.
     The form driver could not process the request.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .TP 5
     .B E_UNKNOWN_COMMAND
     The form driver code saw an unknown request code.
    diff --git a/man/form_field.3x b/man/form_field.3x
    index bd74ee1e..cab42679 100644
    --- a/man/form_field.3x
    +++ b/man/form_field.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2012,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: form_field.3x,v 1.12 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: form_field.3x,v 1.13 2019/01/20 20:31:42 tom Exp $
     .TH form_field 3X ""
     .SH NAME
     \fBform_field\fR \- make and break connections between fields and forms
    @@ -75,7 +75,7 @@ The field is already connected to a form.
     The form is already posted.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .SH SEE ALSO
     \fBcurses\fR(3X), \fBform\fR(3X).
     .SH NOTES
    diff --git a/man/form_field_attributes.3x b/man/form_field_attributes.3x
    index 3fcfddd6..ece4a403 100644
    --- a/man/form_field_attributes.3x
    +++ b/man/form_field_attributes.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2010,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: form_field_attributes.3x,v 1.13 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: form_field_attributes.3x,v 1.14 2019/01/20 20:31:42 tom Exp $
     .TH form_field_attributes 3X ""
     .SH NAME
     \fBform_field_attributes\fR \- color and attribute control for form fields
    @@ -74,7 +74,7 @@ The routine succeeded.
     Routine detected an incorrect or out-of-range argument.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .
     .SH SEE ALSO
     \fBcurses\fR(3X) and related pages whose names begin "form_" for detailed
    diff --git a/man/form_field_buffer.3x b/man/form_field_buffer.3x
    index 749f24c5..4cfc8920 100644
    --- a/man/form_field_buffer.3x
    +++ b/man/form_field_buffer.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: form_field_buffer.3x,v 1.21 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: form_field_buffer.3x,v 1.23 2019/01/20 20:19:03 tom Exp $
     .TH form_field_buffer 3X ""
     .de bP
     .ie n  .IP \(bu 4
    @@ -110,7 +110,7 @@ The remaining routines return one of the following:
     The routine succeeded.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .TP 5
     .B E_BAD_ARGUMENT
     Routine detected an incorrect or out-of-range argument.
    @@ -130,6 +130,10 @@ same buffer.
     These routines emulate the System V forms library.
     They were not supported on
     Version 7 or BSD versions.
    +.PP
    +The \fBset_max_field\fP function checks for an ncurses extension
    +\fBO_INPUT_FIELD\fP which allows a dynamic field to shrink if the new
    +limit is smaller than the current field size.
     .SH AUTHORS
     Juergen Pfeifer.
     Manual pages and adaptation for new curses by Eric S. Raymond.
    diff --git a/man/form_field_info.3x b/man/form_field_info.3x
    index ba2cd884..565b4391 100644
    --- a/man/form_field_info.3x
    +++ b/man/form_field_info.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2015,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: form_field_info.3x,v 1.14 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: form_field_info.3x,v 1.15 2019/01/20 20:31:42 tom Exp $
     .TH form_field_info 3X ""
     .SH NAME
     \fBdynamic_field_info\fP,
    @@ -60,7 +60,7 @@ These routines return one of the following:
     The routine succeeded.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .TP 5
     .B E_BAD_ARGUMENT
     Routine detected an incorrect or out-of-range argument.
    diff --git a/man/form_field_just.3x b/man/form_field_just.3x
    index 60dad701..95637382 100644
    --- a/man/form_field_just.3x
    +++ b/man/form_field_just.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2015,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: form_field_just.3x,v 1.13 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: form_field_just.3x,v 1.14 2019/01/20 20:31:42 tom Exp $
     .TH form_field_just 3X ""
     .SH NAME
     \fBset_field_just\fR,
    @@ -55,7 +55,7 @@ The function \fBset_field_just\fR returns one of the following:
     The routine succeeded.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .TP 5
     .B E_BAD_ARGUMENT
     Routine detected an incorrect or out-of-range argument.
    diff --git a/man/form_field_opts.3x b/man/form_field_opts.3x
    index bffcf057..d1076722 100644
    --- a/man/form_field_opts.3x
    +++ b/man/form_field_opts.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2015,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: form_field_opts.3x,v 1.22 2018/07/28 21:18:11 tom Exp $
    +.\" $Id: form_field_opts.3x,v 1.24 2019/01/20 20:19:03 tom Exp $
     .TH form_field_opts 3X ""
     .SH NAME
     \fBset_field_opts\fP,
    @@ -114,6 +114,11 @@ but advance the cursor to reflect the insertion.
     This allows the form library to display the
     inserted character in one-character fields
     as well as allowing the library to maintain consistent state.
    +.TP 5
    +O_INPUT_FIELD
    +The \fBset_max_field\fP function checks for this extension,
    +which allows a dynamic field to shrink if the new
    +limit is smaller than the current field size.
     .SH RETURN VALUE
     Except for \fBfield_opts\fR, each routine returns one of the following:
     .TP 5
    @@ -127,7 +132,7 @@ Routine detected an incorrect or out-of-range argument.
     The field is the current field.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .SH SEE ALSO
     \fBcurses\fR(3X),
     \fBform\fR(3X).
    diff --git a/man/form_field_validation.3x b/man/form_field_validation.3x
    index 5f78748b..2f78fa45 100644
    --- a/man/form_field_validation.3x
    +++ b/man/form_field_validation.3x
    @@ -1,5 +1,5 @@
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
     .\"                                                                          *
     .\" Permission is hereby granted, free of charge, to any person obtaining a  *
     .\" copy of this software and associated documentation files (the            *
    @@ -26,8 +26,12 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: form_field_validation.3x,v 1.23 2018/07/28 21:18:11 tom Exp $
    +.\" $Id: form_field_validation.3x,v 1.24 2019/01/20 20:31:42 tom Exp $
     .TH form_field_validation 3X ""
    +.ie \n(.g .ds `` \(lq
    +.el       .ds `` ``
    +.ie \n(.g .ds '' \(rq
    +.el       .ds '' ''
     .de bP
     .ie n  .IP \(bu 4
     .el    .IP \(bu 2
    @@ -101,10 +105,10 @@ and a fifth \fBlong\fR constraining maximum value.
     If the maximum value is less than or equal to the minimum value, the range is
     simply ignored.
     On return, the field buffer is formatted according to the
    -\fBprintf\fR format specification ".*ld", where the '*' is replaced by the
    -precision argument.
    +\fBprintf\fR format specification \*(``.*ld\*('',
    +where the \*(``*\*('' is replaced by the precision argument.
     .IP
    -For details of the precision handling see \fBprintf's\fR man-page.
    +For details of the precision handling see \fBprintf\fR(3).
     .RE
     .TP 5
     TYPE_NUMERIC
    @@ -123,10 +127,10 @@ If the maximum value is less than or equal to the minimum value,
     the range is simply ignored.
     .IP
     On return, the field buffer is formatted according to the
    -\fBprintf\fR format specification ".*f", where the '*' is replaced by the
    -precision argument.
    +\fBprintf\fR format specification \*(``.*f\*('',
    +where the \*(``*\*('' is replaced by the precision argument.
     .IP
    -For details of the precision handling see \fBprintf's\fR man-page.
    +For details of the precision handling see \fBprintf\fR(3).
     .RE
     .TP 5
     TYPE_REGEXP
    @@ -168,7 +172,7 @@ The function \fBset_field_type\fR returns one of the following:
     The routine succeeded.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .SH SEE ALSO
     \fBcurses\fR(3X),
     \fBform\fR(3X),
    diff --git a/man/form_fieldtype.3x b/man/form_fieldtype.3x
    index 8572a804..50f86278 100644
    --- a/man/form_fieldtype.3x
    +++ b/man/form_fieldtype.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2010,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: form_fieldtype.3x,v 1.18 2018/07/28 22:08:59 tom Exp $
    +.\" $Id: form_fieldtype.3x,v 1.19 2019/01/20 20:31:42 tom Exp $
     .TH form_fieldtype 3X ""
     .SH NAME
     \fBform_fieldtype\fR \- define validation-field types
    @@ -125,7 +125,7 @@ The field is already connected to a form.
     The field is the current field.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .SH SEE ALSO
     \fBcurses\fR(3X), \fBform\fR(3X).
     .SH NOTES
    diff --git a/man/form_hook.3x b/man/form_hook.3x
    index 7dfa838e..803fadd8 100644
    --- a/man/form_hook.3x
    +++ b/man/form_hook.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2010,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: form_hook.3x,v 1.12 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: form_hook.3x,v 1.13 2019/01/20 20:31:42 tom Exp $
     .TH form_hook 3X ""
     .SH NAME
     \fBform_hook\fR \- set hooks for automatic invocation by applications
    @@ -85,7 +85,7 @@ return one of the following:
     The routine succeeded.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .SH SEE ALSO
     \fBcurses\fR(3X), \fBform\fR(3X).
     .SH NOTES
    diff --git a/man/form_opts.3x b/man/form_opts.3x
    index 7fc52367..ba4a6bd4 100644
    --- a/man/form_opts.3x
    +++ b/man/form_opts.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2015,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: form_opts.3x,v 1.13 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: form_opts.3x,v 1.14 2019/01/20 20:31:42 tom Exp $
     .TH form_opts 3X ""
     .SH NAME
     \fBset_form_opts\fP,
    @@ -73,7 +73,7 @@ Except for \fBform_opts\fR, each routine returns one of the following:
     The routine succeeded.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .SH SEE ALSO
     \fBcurses\fR(3X), \fBform\fR(3X).
     .SH NOTES
    diff --git a/man/form_page.3x b/man/form_page.3x
    index 76159e2b..3e10402c 100644
    --- a/man/form_page.3x
    +++ b/man/form_page.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2016,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: form_page.3x,v 1.15 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: form_page.3x,v 1.16 2019/01/20 20:31:42 tom Exp $
     .TH form_page 3X ""
     .SH NAME
     \fBform_page\fR \- set and get form page number
    @@ -82,7 +82,7 @@ Contents of a field are not valid.
     The form driver could not process the request.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .
     .SH SEE ALSO
     \fBcurses\fR(3X), \fBform\fR(3X).
    diff --git a/man/form_post.3x b/man/form_post.3x
    index 77e4c149..a255af41 100644
    --- a/man/form_post.3x
    +++ b/man/form_post.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: form_post.3x,v 1.12 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: form_post.3x,v 1.13 2019/01/20 20:31:42 tom Exp $
     .TH form_post 3X ""
     .SH NAME
     \fBpost_form\fR,
    @@ -72,7 +72,7 @@ Form is too large for its window.
     The form has already been posted.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .
     .SH SEE ALSO
     \fBcurses\fR(3X), \fBform\fR(3X).
    diff --git a/man/form_win.3x b/man/form_win.3x
    index aa021daa..ecd0a930 100644
    --- a/man/form_win.3x
    +++ b/man/form_win.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2010,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: form_win.3x,v 1.14 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: form_win.3x,v 1.15 2019/01/20 20:31:42 tom Exp $
     .TH form_win 3X ""
     .SH NAME
     \fBform_win\fR \- make and break form window and subwindow associations
    @@ -69,7 +69,7 @@ an integer return one of the following error codes:
     The routine succeeded.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .TP 5
     .B E_BAD_ARGUMENT
     Routine detected an incorrect or out-of-range argument.
    diff --git a/man/man_db.renames b/man/man_db.renames
    index 652666c9..ad17af64 100644
    --- a/man/man_db.renames
    +++ b/man/man_db.renames
    @@ -1,5 +1,5 @@
     ##############################################################################
    -# Copyright (c) 1998-2015,2017 Free Software Foundation, Inc.                #
    +# Copyright (c) 1998-2017,2019 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"), #
    @@ -25,7 +25,7 @@
     # use or other dealings in this Software without prior written               #
     # authorization.                                                             #
     ##############################################################################
    -# $Id: man_db.renames,v 1.52 2017/12/02 20:21:14 tom Exp $
    +# $Id: man_db.renames,v 1.53 2019/01/21 09:25:24 tom Exp $
     # Manual-page renamings for the man_db program
     #
     # Files:
    @@ -176,7 +176,6 @@ tack.1m				tack.1
     getty.1				getty.8
     scanf.3				scanf.3
     ttys.5				ttys.4
    -termio.7			termios.3
     system.3			system.3
     regcomp.3x			regcomp.3
     regexec.3x			regexec.3
    diff --git a/man/manhtml.externs b/man/manhtml.externs
    index a868da26..871d495c 100644
    --- a/man/manhtml.externs
    +++ b/man/manhtml.externs
    @@ -1,7 +1,7 @@
    -# $Id: manhtml.externs,v 1.9 2017/04/17 01:03:16 tom Exp $
    +# $Id: manhtml.externs,v 1.10 2019/01/20 20:34:57 tom Exp $
     # Items in this list will not be linked by man2html
     #***************************************************************************
    -# Copyright (c) 2013,2017 Free Software Foundation, Inc.                   *
    +# Copyright (c) 2013-2017,2019 Free Software Foundation, Inc.              *
     #                                                                          *
     # Permission is hereby granted, free of charge, to any person obtaining a  *
     # copy of this software and associated documentation files (the            *
    @@ -36,6 +36,7 @@ conflict(1)
     csh(1)
     ded(1)
     environ(7)
    +errno(3)
     file(1)
     getty(1)
     nvi(1)
    @@ -53,7 +54,7 @@ sscanf(3)
     stdio(3)
     stty(1)
     system(3)
    -termio(7)
    +termios(3)
     tty(4)
     ttys(5)
     vprintf(3)
    diff --git a/man/menu.3x b/man/menu.3x
    index e182990f..2c2b7efa 100644
    --- a/man/menu.3x
    +++ b/man/menu.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: menu.3x,v 1.25 2018/07/28 21:34:56 tom Exp $
    +.\" $Id: menu.3x,v 1.26 2019/01/20 20:32:23 tom Exp $
     .TH menu 3X ""
     .ie \n(.g .ds `` \(lq
     .el       .ds `` ``
    @@ -175,7 +175,7 @@ The menu is already posted.
     The menu driver could not process the request.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .TP 5
     .B E_UNKNOWN_COMMAND
     The menu driver code saw an unknown request code.
    diff --git a/man/menu_attributes.3x b/man/menu_attributes.3x
    index aed8644a..839de287 100644
    --- a/man/menu_attributes.3x
    +++ b/man/menu_attributes.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2015,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: menu_attributes.3x,v 1.14 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: menu_attributes.3x,v 1.15 2019/01/20 20:32:23 tom Exp $
     .TH menu_attributes 3X ""
     .SH NAME
     \fBmenu_back\fR,
    @@ -89,7 +89,7 @@ These routines return one of the following:
     The routine succeeded.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .TP 5
     .B E_BAD_ARGUMENT
     Routine detected an incorrect or out-of-range argument.
    diff --git a/man/menu_cursor.3x b/man/menu_cursor.3x
    index c0a02936..52f46af0 100644
    --- a/man/menu_cursor.3x
    +++ b/man/menu_cursor.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2015,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: menu_cursor.3x,v 1.10 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: menu_cursor.3x,v 1.11 2019/01/20 20:32:23 tom Exp $
     .TH menu_cursor 3X ""
     .SH NAME
     \fBpos_menu_cursor\fR \- position a menu's cursor
    @@ -48,7 +48,7 @@ This routine returns one of the following:
     The routine succeeded.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .TP 5
     .B E_BAD_ARGUMENT
     Routine detected an incorrect or out-of-range argument.
    diff --git a/man/menu_driver.3x b/man/menu_driver.3x
    index 39c520d7..086381f3 100644
    --- a/man/menu_driver.3x
    +++ b/man/menu_driver.3x
    @@ -1,5 +1,5 @@
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
     .\"                                                                          *
     .\" Permission is hereby granted, free of charge, to any person obtaining a  *
     .\" copy of this software and associated documentation files (the            *
    @@ -26,7 +26,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: menu_driver.3x,v 1.24 2018/07/28 22:08:59 tom Exp $
    +.\" $Id: menu_driver.3x,v 1.25 2019/01/20 20:32:23 tom Exp $
     .TH menu_driver 3X ""
     .de bP
     .ie n  .IP \(bu 4
    @@ -171,7 +171,7 @@ pre-defined requests.
     The routine succeeded.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .TP 5
     .B E_BAD_ARGUMENT
     Routine detected an incorrect or out-of-range argument.
    diff --git a/man/menu_format.3x b/man/menu_format.3x
    index 055c7e77..b3385e8f 100644
    --- a/man/menu_format.3x
    +++ b/man/menu_format.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2016,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: menu_format.3x,v 1.15 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: menu_format.3x,v 1.16 2019/01/20 20:32:23 tom Exp $
     .TH menu_format 3X ""
     .SH NAME
     \fBset_menu_format\fP,
    @@ -63,7 +63,7 @@ These routines returns one of the following:
     The routine succeeded.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .TP 5
     .B E_BAD_ARGUMENT
     Routine detected an incorrect or out-of-range argument.
    diff --git a/man/menu_hook.3x b/man/menu_hook.3x
    index b650e0ff..41d1c74a 100644
    --- a/man/menu_hook.3x
    +++ b/man/menu_hook.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2010,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: menu_hook.3x,v 1.12 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: menu_hook.3x,v 1.13 2019/01/20 20:32:23 tom Exp $
     .TH menu_hook 3X ""
     .SH NAME
     \fBmenu_hook\fR \- set hooks for automatic invocation by applications
    @@ -85,7 +85,7 @@ return one of the following:
     The routine succeeded.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .SH SEE ALSO
     \fBcurses\fR(3X), \fBmenu\fR(3X).
     .SH NOTES
    diff --git a/man/menu_items.3x b/man/menu_items.3x
    index 240f1324..27f203c7 100644
    --- a/man/menu_items.3x
    +++ b/man/menu_items.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2015,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: menu_items.3x,v 1.12 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: menu_items.3x,v 1.13 2019/01/20 20:32:23 tom Exp $
     .TH menu_items 3X ""
     .SH NAME
     \fBset_menu_items\fR,
    @@ -71,7 +71,7 @@ No items are connected to the menu.
     The menu is already posted.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .
     .SH SEE ALSO
     \fBcurses\fR(3X), \fBmenu\fR(3X).
    diff --git a/man/menu_mark.3x b/man/menu_mark.3x
    index 8b4a3830..64e73d0b 100644
    --- a/man/menu_mark.3x
    +++ b/man/menu_mark.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2015,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: menu_mark.3x,v 1.13 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: menu_mark.3x,v 1.14 2019/01/20 20:32:23 tom Exp $
     .TH menu_mark 3X ""
     .SH NAME
     \fBset_menu_mark\fP,
    @@ -68,7 +68,7 @@ The routine succeeded.
     Routine detected an incorrect or out-of-range argument.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .SH SEE ALSO
     \fBcurses\fR(3X), \fBmenu\fR(3X).
     .SH NOTES
    diff --git a/man/menu_new.3x b/man/menu_new.3x
    index 7f119162..9fbab341 100644
    --- a/man/menu_new.3x
    +++ b/man/menu_new.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2015,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: menu_new.3x,v 1.13 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: menu_new.3x,v 1.14 2019/01/20 20:32:23 tom Exp $
     .TH menu_new 3X ""
     .SH NAME
     \fBnew_menu\fP,
    @@ -61,7 +61,7 @@ The function \fBfree_menu\fR returns one of the following:
     The routine succeeded.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .TP 5
     .B E_BAD_ARGUMENT
     Routine detected an incorrect or out-of-range argument.
    diff --git a/man/menu_opts.3x b/man/menu_opts.3x
    index 8a31b059..fec6eab7 100644
    --- a/man/menu_opts.3x
    +++ b/man/menu_opts.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2016,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: menu_opts.3x,v 1.15 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: menu_opts.3x,v 1.16 2019/01/20 20:32:23 tom Exp $
     .TH menu_opts 3X ""
     .SH NAME
     \fBset_menu_opts\fP,
    @@ -90,7 +90,7 @@ Except for \fBmenu_opts\fR, each routine returns one of the following:
     The routine succeeded.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .TP 5
     .B E_POSTED
     The menu is already posted.
    diff --git a/man/menu_pattern.3x b/man/menu_pattern.3x
    index 6b9fbccd..1905fe1a 100644
    --- a/man/menu_pattern.3x
    +++ b/man/menu_pattern.3x
    @@ -1,5 +1,5 @@
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2015,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
     .\"                                                                          *
     .\" Permission is hereby granted, free of charge, to any person obtaining a  *
     .\" copy of this software and associated documentation files (the            *
    @@ -26,7 +26,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: menu_pattern.3x,v 1.16 2018/07/28 22:08:59 tom Exp $
    +.\" $Id: menu_pattern.3x,v 1.17 2019/01/20 20:32:23 tom Exp $
     .TH menu_pattern 3X ""
     .SH NAME
     \fBset_menu_pattern\fP,
    @@ -76,7 +76,7 @@ No items are connected to menu.
     Character failed to match.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .SH SEE ALSO
     \fBcurses\fR(3X), \fBmenu\fR(3X).
     .SH NOTES
    diff --git a/man/menu_post.3x b/man/menu_post.3x
    index db6dff54..f2c46344 100644
    --- a/man/menu_post.3x
    +++ b/man/menu_post.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: menu_post.3x,v 1.16 2018/07/28 22:08:59 tom Exp $
    +.\" $Id: menu_post.3x,v 1.17 2019/01/20 20:32:23 tom Exp $
     .TH menu_post 3X ""
     .SH NAME
     \fBpost_menu\fR,
    @@ -56,7 +56,7 @@ These routines return one of the following:
     The routine succeeded.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .TP 5
     .B E_BAD_ARGUMENT
     Routine detected an incorrect or out-of-range argument.
    diff --git a/man/menu_win.3x b/man/menu_win.3x
    index 263b2655..be1db573 100644
    --- a/man/menu_win.3x
    +++ b/man/menu_win.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2010,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: menu_win.3x,v 1.12 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: menu_win.3x,v 1.13 2019/01/20 20:32:23 tom Exp $
     .TH menu_win 3X ""
     .SH NAME
     \fBmenu_win\fR \- make and break menu window and subwindow associations
    @@ -69,7 +69,7 @@ an integer return one of the following error codes:
     The routine succeeded.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .TP 5
     .B E_BAD_ARGUMENT
     Routine detected an incorrect or out-of-range argument.
    diff --git a/man/mitem_current.3x b/man/mitem_current.3x
    index d52ac653..a231cabe 100644
    --- a/man/mitem_current.3x
    +++ b/man/mitem_current.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2010,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: mitem_current.3x,v 1.14 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: mitem_current.3x,v 1.15 2019/01/20 20:32:23 tom Exp $
     .TH mitem_current 3X ""
     .SH NAME
     \fBmitem_current\fR \- set and get current_menu_item
    @@ -82,7 +82,7 @@ Routine was called from an initialization or termination function.
     No items are connected to the menu.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .SH SEE ALSO
     \fBcurses\fR(3X), \fBmenu\fR(3X).
     .SH NOTES
    diff --git a/man/mitem_new.3x b/man/mitem_new.3x
    index f69e1637..1e6fd0d8 100644
    --- a/man/mitem_new.3x
    +++ b/man/mitem_new.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2015,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: mitem_new.3x,v 1.14 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: mitem_new.3x,v 1.15 2019/01/20 20:32:23 tom Exp $
     .TH mitem_new 3X ""
     .SH NAME
     \fBnew_item\fP,
    @@ -75,7 +75,7 @@ Routine detected an incorrect or out-of-range argument.
     Item is connected to a menu.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .SH SEE ALSO
     \fBcurses\fR(3X), \fBmenu\fR(3X).
     .SH NOTES
    diff --git a/man/mitem_opts.3x b/man/mitem_opts.3x
    index 37913b6b..b7aaff69 100644
    --- a/man/mitem_opts.3x
    +++ b/man/mitem_opts.3x
    @@ -1,6 +1,6 @@
     '\" t
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2015,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 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            *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: mitem_opts.3x,v 1.13 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: mitem_opts.3x,v 1.14 2019/01/20 20:32:23 tom Exp $
     .TH mitem_opts 3X ""
     .SH NAME
     \fBset_item_opts\fP,
    @@ -68,7 +68,7 @@ Except for \fBitem_opts\fR, each routine returns one of the following:
     The routine succeeded.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .SH SEE ALSO
     \fBcurses\fR(3X), \fBmenu\fR(3X).
     .SH NOTES
    diff --git a/man/mitem_value.3x b/man/mitem_value.3x
    index 482292a5..061a5741 100644
    --- a/man/mitem_value.3x
    +++ b/man/mitem_value.3x
    @@ -1,5 +1,5 @@
     .\"***************************************************************************
    -.\" Copyright (c) 1998-2015,2018 Free Software Foundation, Inc.              *
    +.\" Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
     .\"                                                                          *
     .\" Permission is hereby granted, free of charge, to any person obtaining a  *
     .\" copy of this software and associated documentation files (the            *
    @@ -26,7 +26,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: mitem_value.3x,v 1.12 2018/07/28 21:34:06 tom Exp $
    +.\" $Id: mitem_value.3x,v 1.13 2019/01/20 20:32:23 tom Exp $
     .TH mitem_value 3X ""
     .SH NAME
     \fBset_item_value\fP,
    @@ -54,7 +54,7 @@ The function \fBset_item_value\fR returns one of the following:
     The routine succeeded.
     .TP 5
     .B E_SYSTEM_ERROR
    -System error occurred (see \fBerrno\fR).
    +System error occurred (see \fBerrno\fR(3)).
     .TP 5
     .B E_REQUEST_DENIED
     The menu driver could not process the request.
    diff --git a/man/terminfo.tail b/man/terminfo.tail
    index b75da4a4..ef064ed9 100644
    --- a/man/terminfo.tail
    +++ b/man/terminfo.tail
    @@ -1,4 +1,4 @@
    -.\" $Id: terminfo.tail,v 1.89 2018/05/19 21:01:52 tom Exp $
    +.\" $Id: terminfo.tail,v 1.90 2019/01/20 20:21:46 tom Exp $
     .\" Beginning of terminfo.tail file
     .\" This file is part of ncurses.
     .\" See "terminfo.head" for copyright.
    @@ -428,9 +428,9 @@ The \fB%\fR encodings have the following meanings:
     outputs \*(``%\*(''
     .TP
     \fB%\fP\fI[[\fP:\fI]flags][width[.precision]][\fP\fBdoxXs\fP\fI]\fP
    -as in \fBprintf\fP, flags are \fI[\-+#]\fP and \fIspace\fP.
    +as in \fBprintf\fP(3), flags are \fI[\-+#]\fP and \fIspace\fP.
     Use a \*(``:\*('' to allow the next character to be a \*(``\-\*('' flag,
    -avoiding interpreting "%\-" as an operator.
    +avoiding interpreting \*(``%\-\*('' as an operator.
     .TP
     \f(CW%c\fP
     print \fIpop()\fP like %c in \fBprintf\fP
    diff --git a/misc/Makefile.in b/misc/Makefile.in
    index ecb5ab3e..13380736 100644
    --- a/misc/Makefile.in
    +++ b/misc/Makefile.in
    @@ -1,6 +1,6 @@
    -# $Id: Makefile.in,v 1.69 2018/02/10 20:53:47 tom Exp $
    +# $Id: Makefile.in,v 1.71 2019/01/20 12:05:24 tom Exp $
     ##############################################################################
    -# Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.                #
    +# Copyright (c) 1998-2018,2019 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"), #
    @@ -76,11 +76,14 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
     
     ################################################################################
     all \
    -sources :: terminfo.tmp 
    +sources ::
    +
    +@MAKE_DATABASE@all \
    +@MAKE_DATABASE@sources :: terminfo.tmp 
     
     depend :
     
    -install : @MISC_INSTALL_DATA@ install.libs
    +@MAKE_DATABASE@install :: @MISC_INSTALL_DATA@
     
     install.data :	terminfo.tmp \
     		$(DESTDIR)$(libdir) \
    @@ -106,6 +109,7 @@ install.data :	terminfo.tmp \
     
     NCURSES_CONFIG	= ncurses@DFT_ARG_SUFFIX@@cf_cv_abi_version@@cf_config_suffix@-config
     
    +install \
     install.libs :: $(DESTDIR)$(bindir) ncurses-config
     	$(INSTALL_SCRIPT) ncurses-config $(DESTDIR)$(bindir)/$(NCURSES_CONFIG)
     
    @@ -183,8 +187,8 @@ tags :
     @MAKE_UPPER_TAGS@TAGS :
     
     mostlyclean :
    -	-rm -f terminfo.tmp
    -	-rm -f run_tic.sed
    +@MAKE_DATABASE@	-rm -f terminfo.tmp
    +@MAKE_DATABASE@	-rm -f run_tic.sed
     @MAKE_PC_FILES@	-rm -f pc-files $(PC_FILES)
     	-rm -f core tags TAGS *~ *.bak *.ln *.atac trace
     
    diff --git a/ncurses/base/lib_color.c b/ncurses/base/lib_color.c
    index df8424b4..dfb774ba 100644
    --- a/ncurses/base/lib_color.c
    +++ b/ncurses/base/lib_color.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    + * Copyright (c) 1998-2018,2019 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            *
    @@ -48,7 +48,7 @@
     #define CUR SP_TERMTYPE
     #endif
     
    -MODULE_ID("$Id: lib_color.c,v 1.139 2018/12/29 20:10:07 tom Exp $")
    +MODULE_ID("$Id: lib_color.c,v 1.140 2019/01/21 01:55:18 tom Exp $")
     
     #ifdef USE_TERM_DRIVER
     #define CanChange      InfoOf(SP_PARM).canchange
    @@ -396,8 +396,10 @@ NCURSES_SP_NAME(start_color) (NCURSES_SP_DCL0)
     	     * allow for default-color as a component of a color-pair.
     	     */
     	    SP_PARM->_pair_limit += (1 + (2 * maxcolors));
    +#if !NCURSES_EXT_COLORS
     	    SP_PARM->_pair_limit = limit_PAIRS(SP_PARM->_pair_limit);
     #endif
    +#endif /* NCURSES_EXT_FUNCS */
     	    SP_PARM->_pair_count = maxpairs;
     	    SP_PARM->_color_count = maxcolors;
     #if !USE_REENTRANT
    diff --git a/ncurses/base/lib_printw.c b/ncurses/base/lib_printw.c
    index 3bd91c66..41bd2f98 100644
    --- a/ncurses/base/lib_printw.c
    +++ b/ncurses/base/lib_printw.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 1998-2016,2018 Free Software Foundation, Inc.              *
    + * Copyright (c) 1998-2018,2019 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            *
    @@ -39,10 +39,10 @@
     
     #include 
     
    -MODULE_ID("$Id: lib_printw.c,v 1.26 2018/06/09 20:18:24 tom Exp $")
    +MODULE_ID("$Id: lib_printw.c,v 1.27 2019/01/19 15:46:25 tom Exp $")
     
     NCURSES_EXPORT(int)
    -printw(const char *fmt,...)
    +printw(const char *fmt, ...)
     {
         va_list argp;
         int code;
    @@ -63,7 +63,7 @@ printw(const char *fmt,...)
     }
     
     NCURSES_EXPORT(int)
    -wprintw(WINDOW *win, const char *fmt,...)
    +wprintw(WINDOW *win, const char *fmt, ...)
     {
         va_list argp;
         int code;
    @@ -84,7 +84,7 @@ wprintw(WINDOW *win, const char *fmt,...)
     }
     
     NCURSES_EXPORT(int)
    -mvprintw(int y, int x, const char *fmt,...)
    +mvprintw(int y, int x, const char *fmt, ...)
     {
         int code;
     
    @@ -107,7 +107,7 @@ mvprintw(int y, int x, const char *fmt,...)
     }
     
     NCURSES_EXPORT(int)
    -mvwprintw(WINDOW *win, int y, int x, const char *fmt,...)
    +mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...)
     {
         int code;
     
    diff --git a/ncurses/base/lib_scanw.c b/ncurses/base/lib_scanw.c
    index b05bfde1..26a47d1a 100644
    --- a/ncurses/base/lib_scanw.c
    +++ b/ncurses/base/lib_scanw.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 1998-2011,2018 Free Software Foundation, Inc.              *
    + * Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
      *                                                                          *
      * Permission is hereby granted, free of charge, to any person obtaining a  *
      * copy of this software and associated documentation files (the            *
    @@ -40,7 +40,7 @@
     
     #include 
     
    -MODULE_ID("$Id: lib_scanw.c,v 1.17 2018/06/09 20:19:20 tom Exp $")
    +MODULE_ID("$Id: lib_scanw.c,v 1.18 2019/01/19 15:46:25 tom Exp $")
     
     NCURSES_EXPORT(int)
     vwscanw(WINDOW *win, const char *fmt, va_list argp)
    @@ -73,7 +73,7 @@ vw_scanw(WINDOW *win, const char *fmt, va_list argp)
     }
     
     NCURSES_EXPORT(int)
    -scanw(const char *fmt,...)
    +scanw(const char *fmt, ...)
     {
         int code;
         va_list ap;
    @@ -87,7 +87,7 @@ scanw(const char *fmt,...)
     }
     
     NCURSES_EXPORT(int)
    -wscanw(WINDOW *win, const char *fmt,...)
    +wscanw(WINDOW *win, const char *fmt, ...)
     {
         int code;
         va_list ap;
    @@ -101,7 +101,7 @@ wscanw(WINDOW *win, const char *fmt,...)
     }
     
     NCURSES_EXPORT(int)
    -mvscanw(int y, int x, const char *fmt,...)
    +mvscanw(int y, int x, const char *fmt, ...)
     {
         int code;
         va_list ap;
    @@ -113,7 +113,7 @@ mvscanw(int y, int x, const char *fmt,...)
     }
     
     NCURSES_EXPORT(int)
    -mvwscanw(WINDOW *win, int y, int x, const char *fmt,...)
    +mvwscanw(WINDOW *win, int y, int x, const char *fmt, ...)
     {
         int code;
         va_list ap;
    diff --git a/ncurses/base/new_pair.c b/ncurses/base/new_pair.c
    index c47e61e7..2c3c2fb8 100644
    --- a/ncurses/base/new_pair.c
    +++ b/ncurses/base/new_pair.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 2017,2018 Free Software Foundation, Inc.                   *
    + * Copyright (c) 2017-2018,2019 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            *
    @@ -60,7 +60,7 @@
     
     #endif
     
    -MODULE_ID("$Id: new_pair.c,v 1.17 2018/12/29 21:27:21 tom Exp $")
    +MODULE_ID("$Id: new_pair.c,v 1.18 2019/01/21 14:54:47 tom Exp $")
     
     #if NCURSES_EXT_COLORS
     
    @@ -102,13 +102,17 @@ dumpit(SCREEN *sp, int pair, const char *tag)
         char bigbuf[256 * 20];
         char *p = bigbuf;
         int n;
    -    sprintf(p, "%s", tag);
    -    p += strlen(p);
    +    size_t have = sizeof(bigbuf);
    +
    +    _nc_STRCPY(p, tag, have);
         for (n = 0; n < sp->_pair_limit; ++n) {
     	if (list[n].mode != cpFREE) {
    -	    sprintf(p, " %d%c(%d,%d)",
    -		    n, n == pair ? '@' : ':', list[n].next, list[n].prev);
     	    p += strlen(p);
    +	    if ((size_t) (p - bigbuf) + 50 > have)
    +		break;
    +	    _nc_SPRINTF(p, _nc_SLIMIT(have - (p - bigbuf))
    +			" %d%c(%d,%d)",
    +			n, n == pair ? '@' : ':', list[n].next, list[n].prev);
     	}
         }
         T(("(%d/%d) %ld - %s",
    diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h
    index 4519ce95..1ec7e73e 100644
    --- a/ncurses/curses.priv.h
    +++ b/ncurses/curses.priv.h
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    + * Copyright (c) 1998-2018,2019 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            *
    @@ -34,7 +34,7 @@
      ****************************************************************************/
     
     /*
    - * $Id: curses.priv.h,v 1.613 2018/12/29 20:07:04 tom Exp $
    + * $Id: curses.priv.h,v 1.615 2019/01/21 14:50:27 tom Exp $
      *
      *	curses.priv.h
      *
    @@ -1710,6 +1710,14 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
     # endif
     #endif
     
    +#ifdef __TANDEM
    +#define ROOT_UID 65535
    +#endif
    +
    +#ifndef ROOT_UID
    +#define ROOT_UID 0
    +#endif
    +
     /*
      * Standardize/simplify common loops
      */
    @@ -1766,7 +1774,8 @@ extern NCURSES_EXPORT(void)	_nc_locked_tracef (const char *, ...) GCC_PRINTFLIKE
     
     typedef void VoidFunc(void);
     
    -#define TR_FUNC_BFR(max)	char tr_func_data[max][(sizeof(void *) + sizeof(void (*)(void))) * 2 + 4]
    +#define TR_FUNC_LEN		((sizeof(void *) + sizeof(void (*)(void))) * 2 + 4)
    +#define TR_FUNC_BFR(max)	char tr_func_data[max][TR_FUNC_LEN]
     #define TR_FUNC_ARG(num,func)	_nc_fmt_funcptr(&tr_func_data[num][0], (const char *)&(func), sizeof((func)))
     
     #define returnAttr(code)	TRACE_RETURN(code,attr_t)
    diff --git a/ncurses/tinfo/access.c b/ncurses/tinfo/access.c
    index d9876875..e086bd0c 100644
    --- a/ncurses/tinfo/access.c
    +++ b/ncurses/tinfo/access.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc.              *
    + * Copyright (c) 1998-2012,2019 Free Software Foundation, Inc.              *
      *                                                                          *
      * Permission is hereby granted, free of charge, to any person obtaining a  *
      * copy of this software and associated documentation files (the            *
    @@ -36,15 +36,7 @@
     
     #include 
     
    -MODULE_ID("$Id: access.c,v 1.23 2012/09/01 19:21:29 tom Exp $")
    -
    -#ifdef __TANDEM
    -#define ROOT_UID 65535
    -#endif
    -
    -#ifndef ROOT_UID
    -#define ROOT_UID 0
    -#endif
    +MODULE_ID("$Id: access.c,v 1.24 2019/01/19 15:38:07 tom Exp $")
     
     #define LOWERCASE(c) ((isalpha(UChar(c)) && isupper(UChar(c))) ? tolower(UChar(c)) : (c))
     
    diff --git a/ncurses/tinfo/comp_error.c b/ncurses/tinfo/comp_error.c
    index 68d6e48a..48ab9777 100644
    --- a/ncurses/tinfo/comp_error.c
    +++ b/ncurses/tinfo/comp_error.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 1998-2012,2016 Free Software Foundation, Inc.              *
    + * Copyright (c) 1998-2016,2019 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            *
    @@ -41,7 +41,7 @@
     
     #include 
     
    -MODULE_ID("$Id: comp_error.c,v 1.37 2016/09/10 20:26:29 tom Exp $")
    +MODULE_ID("$Id: comp_error.c,v 1.39 2019/01/20 02:31:22 tom Exp $")
     
     NCURSES_EXPORT_VAR(bool) _nc_suppress_warnings = FALSE;
     NCURSES_EXPORT_VAR(int) _nc_curr_line = 0; /* current line # in input */
    @@ -105,7 +105,7 @@ where_is_problem(void)
     }
     
     NCURSES_EXPORT(void)
    -_nc_warning(const char *const fmt,...)
    +_nc_warning(const char *const fmt, ...)
     {
         va_list argp;
     
    @@ -120,7 +120,7 @@ _nc_warning(const char *const fmt,...)
     }
     
     NCURSES_EXPORT(void)
    -_nc_err_abort(const char *const fmt,...)
    +_nc_err_abort(const char *const fmt, ...)
     {
         va_list argp;
     
    @@ -133,7 +133,7 @@ _nc_err_abort(const char *const fmt,...)
     }
     
     NCURSES_EXPORT(void)
    -_nc_syserr_abort(const char *const fmt,...)
    +_nc_syserr_abort(const char *const fmt, ...)
     {
         va_list argp;
     
    @@ -143,16 +143,18 @@ _nc_syserr_abort(const char *const fmt,...)
         fprintf(stderr, "\n");
         va_end(argp);
     
    +#if defined(TRACE) || !defined(NDEBUG)
         /* If we're debugging, try to show where the problem occurred - this
          * will dump core.
          */
    -#if defined(TRACE) || !defined(NDEBUG)
    -    abort();
    -#else
    +#ifndef USE_ROOT_ENVIRON
    +    if (getuid() != ROOT_UID)
    +#endif
    +	abort();
    +#endif
         /* Dumping core in production code is not a good idea.
          */
         exit(EXIT_FAILURE);
    -#endif
     }
     
     #if NO_LEAKS
    diff --git a/ncurses/tinfo/hashed_db.c b/ncurses/tinfo/hashed_db.c
    index b5942058..cc8c9d48 100644
    --- a/ncurses/tinfo/hashed_db.c
    +++ b/ncurses/tinfo/hashed_db.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 2006-2011,2013 Free Software Foundation, Inc.              *
    + * Copyright (c) 2006-2013,2019 Free Software Foundation, Inc.              *
      *                                                                          *
      * Permission is hereby granted, free of charge, to any person obtaining a  *
      * copy of this software and associated documentation files (the            *
    @@ -36,7 +36,7 @@
     
     #if USE_HASHED_DB
     
    -MODULE_ID("$Id: hashed_db.c,v 1.17 2013/12/15 00:33:01 tom Exp $")
    +MODULE_ID("$Id: hashed_db.c,v 1.18 2019/01/21 17:34:49 tom Exp $")
     
     #if HASHED_DB_API >= 2
     static DBC *cursor;
    @@ -273,7 +273,7 @@ _nc_db_next(DB * db, DBT * key, DBT * data)
     	result = -1;
         }
     #else
    -    result = db->seq(db, key, data, 0);
    +    result = db->seq(db, key, data, R_NEXT);
     #endif
         return result;
     }
    diff --git a/ncurses/tinfo/lib_tparm.c b/ncurses/tinfo/lib_tparm.c
    index 6e9baa22..a98cfd86 100644
    --- a/ncurses/tinfo/lib_tparm.c
    +++ b/ncurses/tinfo/lib_tparm.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    + * Copyright (c) 1998-2018,2019 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            *
    @@ -42,7 +42,7 @@
     #include 
     #include 
     
    -MODULE_ID("$Id: lib_tparm.c,v 1.106 2018/07/01 15:23:27 tom Exp $")
    +MODULE_ID("$Id: lib_tparm.c,v 1.107 2019/01/19 15:46:25 tom Exp $")
     
     /*
      *	char *
    @@ -840,7 +840,7 @@ tparam_internal(int use_TPARM_ARG, const char *string, va_list ap)
     #endif
     
     NCURSES_EXPORT(char *)
    -tparm_varargs(const char *string,...)
    +tparm_varargs(const char *string, ...)
     {
         va_list ap;
         char *result;
    @@ -873,7 +873,7 @@ tparm_proto(const char *string,
     #endif /* NCURSES_TPARM_VARARGS */
     
     NCURSES_EXPORT(char *)
    -tiparm(const char *string,...)
    +tiparm(const char *string, ...)
     {
         va_list ap;
         char *result;
    diff --git a/ncurses/tinfo/read_entry.c b/ncurses/tinfo/read_entry.c
    index 3b020992..de953f4e 100644
    --- a/ncurses/tinfo/read_entry.c
    +++ b/ncurses/tinfo/read_entry.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    + * Copyright (c) 1998-2018,2019 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            *
    @@ -41,7 +41,7 @@
     
     #include 
     
    -MODULE_ID("$Id: read_entry.c,v 1.150 2018/11/17 21:40:10 tom Exp $")
    +MODULE_ID("$Id: read_entry.c,v 1.152 2019/01/21 14:56:40 tom Exp $")
     
     #define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
     
    @@ -57,9 +57,9 @@ convert_16bits(char *buf, NCURSES_INT2 *Numbers, int count)
         int i;
         size_t j;
         size_t size = SIZEOF_SHORT;
    -    unsigned char ch;
         for (i = 0; i < count; i++) {
     	unsigned mask = 0xff;
    +	unsigned char ch = 0;
     	Numbers[i] = 0;
     	for (j = 0; j < size; ++j) {
     	    ch = UChar(*buf++);
    @@ -755,7 +755,8 @@ _nc_read_tic_entry(char *filename,
     	&& (code = _nc_read_termtype(tp, buffer, used)) == TGETENT_YES
     	&& (code = _nc_name_match(tp->term_names, name, "|")) == TGETENT_YES) {
     	TR(TRACE_DATABASE, ("loaded quick-dump for %s", name));
    -	strcpy(filename, "$TERMINFO");	/* shorten name shown by infocmp */
    +	/* shorten name shown by infocmp */
    +	_nc_STRCPY(filename, "$TERMINFO", limit);
         } else
     #if USE_HASHED_DB
     	if (make_db_filename(filename, limit, path)
    diff --git a/ncurses/tinfo/write_entry.c b/ncurses/tinfo/write_entry.c
    index d205bdbe..444cf01e 100644
    --- a/ncurses/tinfo/write_entry.c
    +++ b/ncurses/tinfo/write_entry.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    + * Copyright (c) 1998-2018,2019 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            *
    @@ -50,7 +50,7 @@
     #define TRACE_NUM(n)		/* nothing */
     #endif
     
    -MODULE_ID("$Id: write_entry.c,v 1.106 2018/06/23 21:35:06 tom Exp $")
    +MODULE_ID("$Id: write_entry.c,v 1.111 2019/01/20 02:54:14 tom Exp $")
     
     static int total_written;
     static int total_parts;
    @@ -66,19 +66,39 @@ write_file(char *filename, TERMTYPE2 *tp)
         unsigned limit = sizeof(buffer);
         unsigned offset = 0;
     
    -    FILE *fp = (_nc_access(filename, W_OK) == 0) ? fopen(filename, "wb") : 0;
    -    if (fp == 0) {
    -	perror(filename);
    -	_nc_syserr_abort("can't open %s/%s", _nc_tic_dir(0), filename);
    -    }
    -    DEBUG(1, ("Created %s", filename));
    +    if (_nc_write_object(tp, buffer, &offset, limit) == ERR) {
    +	_nc_warning("entry is larger than %u bytes", limit);
    +    } else {
    +	FILE *fp = ((_nc_access(filename, W_OK) == 0)
    +		    ? fopen(filename, "wb")
    +		    : 0);
    +	size_t actual;
    +
    +	if (fp == 0) {
    +	    perror(filename);
    +	    _nc_syserr_abort("can't open %s/%s", _nc_tic_dir(0), filename);
    +	}
     
    -    if (_nc_write_object(tp, buffer, &offset, limit) == ERR
    -	|| fwrite(buffer, sizeof(char), (size_t) offset, fp) != offset) {
    -	_nc_syserr_abort("error writing %s/%s", _nc_tic_dir(0), filename);
    +	actual = fwrite(buffer, sizeof(char), (size_t) offset, fp);
    +	if (actual != offset) {
    +	    int myerr = ferror(fp) ? errno : 0;
    +	    if (myerr) {
    +		_nc_syserr_abort("error writing %s/%s: %s",
    +				 _nc_tic_dir(0),
    +				 filename,
    +				 strerror(myerr));
    +	    } else {
    +		_nc_syserr_abort("error writing %s/%s: %u bytes vs actual %lu",
    +				 _nc_tic_dir(0),
    +				 filename,
    +				 offset,
    +				 (unsigned long) actual);
    +	    }
    +	} else {
    +	    fclose(fp);
    +	    DEBUG(1, ("Created %s", filename));
    +	}
         }
    -
    -    fclose(fp);
     }
     
     /*
    @@ -760,57 +780,69 @@ _nc_write_object(TERMTYPE2 *tp, char *buffer, unsigned *offset, unsigned limit)
         /* write out the header */
         TRACE_OUT(("Header of %s @%d", namelist, *offset));
         if (Write(buf, 12, 1) != 1
    -	|| Write(namelist, sizeof(char), namelen) != namelen)
    -	  return (ERR);
    +	|| Write(namelist, sizeof(char), namelen) != namelen) {
    +	return (ERR);
    +    }
     
    -    for (i = 0; i < boolmax; i++)
    -	if (tp->Booleans[i] == TRUE)
    +    for (i = 0; i < boolmax; i++) {
    +	if (tp->Booleans[i] == TRUE) {
     	    buf[i] = TRUE;
    -	else
    +	} else {
     	    buf[i] = FALSE;
    -    if (Write(buf, sizeof(char), boolmax) != boolmax)
    -	  return (ERR);
    +	}
    +    }
    +    if (Write(buf, sizeof(char), boolmax) != boolmax) {
    +	return (ERR);
    +    }
     
    -    if (even_boundary(namelen + boolmax))
    +    if (even_boundary(namelen + boolmax)) {
     	return (ERR);
    +    }
     
         TRACE_OUT(("Numerics begin at %04x", *offset));
     
         /* the numerics */
         numlen = convert_numbers(buf, tp->Numbers, nummax);
    -    if (Write(buf, numlen, nummax) != nummax)
    +    if (Write(buf, numlen, nummax) != nummax) {
     	return (ERR);
    +    }
     
         TRACE_OUT(("String offsets begin at %04x", *offset));
     
         /* the string offsets */
         convert_shorts(buf, offsets, strmax);
    -    if (Write(buf, SIZEOF_SHORT, strmax) != strmax)
    +    if (Write(buf, SIZEOF_SHORT, strmax) != strmax) {
     	return (ERR);
    +    }
     
         TRACE_OUT(("String table begins at %04x", *offset));
     
         /* the strings */
    -    for (i = 0; i < strmax; i++)
    -	if (VALID_STRING(tp->Strings[i]))
    -	    if (!WRITE_STRING(tp->Strings[i]))
    +    for (i = 0; i < strmax; i++) {
    +	if (VALID_STRING(tp->Strings[i])) {
    +	    if (!WRITE_STRING(tp->Strings[i])) {
     		return (ERR);
    +	    }
    +	}
    +    }
     
     #if NCURSES_XNAMES
         if (extended_object(tp)) {
     	unsigned ext_total = (unsigned) NUM_EXT_NAMES(tp);
     	unsigned ext_usage = ext_total;
     
    -	if (even_boundary(nextfree))
    +	if (even_boundary(nextfree)) {
     	    return (ERR);
    +	}
     
     	nextfree = compute_offsets(tp->Strings + STRCOUNT,
     				   (size_t) tp->ext_Strings,
     				   offsets);
     	TRACE_OUT(("after extended string capabilities, nextfree=%d", nextfree));
     
    -	if (tp->ext_Strings >= SIZEOF(offsets))
    +	if (tp->ext_Strings >= SIZEOF(offsets)) {
     	    return (ERR);
    +	}
     
     	nextfree += compute_offsets(tp->ext_Names,
     				    (size_t) ext_total,
    @@ -833,23 +865,27 @@ _nc_write_object(TERMTYPE2 *tp, char *buffer, unsigned *offset, unsigned limit)
     	LITTLE_ENDIAN(buf + 6, ext_usage);
     	LITTLE_ENDIAN(buf + 8, nextfree);
     	TRACE_OUT(("WRITE extended-header @%d", *offset));
    -	if (Write(buf, 10, 1) != 1)
    +	if (Write(buf, 10, 1) != 1) {
     	    return (ERR);
    +	}
     
     	TRACE_OUT(("WRITE %d booleans @%d", tp->ext_Booleans, *offset));
     	if (tp->ext_Booleans
     	    && Write(tp->Booleans + BOOLCOUNT, sizeof(char),
    -		     tp->ext_Booleans) != tp->ext_Booleans)
    -	      return (ERR);
    +		     tp->ext_Booleans) != tp->ext_Booleans) {
    +	    return (ERR);
    +	}
     
    -	if (even_boundary(tp->ext_Booleans))
    +	if (even_boundary(tp->ext_Booleans)) {
     	    return (ERR);
    +	}
     
     	TRACE_OUT(("WRITE %d numbers @%d", tp->ext_Numbers, *offset));
     	if (tp->ext_Numbers) {
     	    numlen = convert_numbers(buf, tp->Numbers + NUMCOUNT, (size_t) tp->ext_Numbers);
    -	    if (Write(buf, numlen, tp->ext_Numbers) != tp->ext_Numbers)
    +	    if (Write(buf, numlen, tp->ext_Numbers) != tp->ext_Numbers) {
     		return (ERR);
    +	    }
     	}
     
     	/*
    @@ -858,8 +894,9 @@ _nc_write_object(TERMTYPE2 *tp, char *buffer, unsigned *offset, unsigned limit)
     	 */
     	convert_shorts(buf, offsets, strmax);
     	TRACE_OUT(("WRITE offsets @%d", *offset));
    -	if (Write(buf, SIZEOF_SHORT, strmax) != strmax)
    +	if (Write(buf, SIZEOF_SHORT, strmax) != strmax) {
     	    return (ERR);
    +	}
     
     	/*
     	 * Write the string table after the offset tables so we do not
    @@ -869,8 +906,9 @@ _nc_write_object(TERMTYPE2 *tp, char *buffer, unsigned *offset, unsigned limit)
     	    if (VALID_STRING(tp->Strings[i + STRCOUNT])) {
     		TRACE_OUT(("WRITE ext_Strings[%d]=%s", (int) i,
     			   _nc_visbuf(tp->Strings[i + STRCOUNT])));
    -		if (!WRITE_STRING(tp->Strings[i + STRCOUNT]))
    +		if (!WRITE_STRING(tp->Strings[i + STRCOUNT])) {
     		    return (ERR);
    +		}
     	    }
     	}
     
    @@ -879,8 +917,9 @@ _nc_write_object(TERMTYPE2 *tp, char *buffer, unsigned *offset, unsigned limit)
     	 */
     	for (i = 0; i < ext_total; i++) {
     	    TRACE_OUT(("WRITE ext_Names[%d]=%s", (int) i, tp->ext_Names[i]));
    -	    if (!WRITE_STRING(tp->ext_Names[i]))
    +	    if (!WRITE_STRING(tp->ext_Names[i])) {
     		return (ERR);
    +	    }
     	}
     
         }
    diff --git a/ncurses/trace/lib_trace.c b/ncurses/trace/lib_trace.c
    index f16fa153..eda50085 100644
    --- a/ncurses/trace/lib_trace.c
    +++ b/ncurses/trace/lib_trace.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    + * Copyright (c) 1998-2018,2019 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            *
    @@ -47,7 +47,7 @@
     
     #include 
     
    -MODULE_ID("$Id: lib_trace.c,v 1.89 2018/12/16 01:05:30 tom Exp $")
    +MODULE_ID("$Id: lib_trace.c,v 1.91 2019/01/21 14:51:38 tom Exp $")
     
     NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */
     
    @@ -219,7 +219,7 @@ _nc_va_tracef(const char *fmt, va_list ap)
     }
     
     NCURSES_EXPORT(void)
    -_tracef(const char *fmt,...)
    +_tracef(const char *fmt, ...)
     {
         va_list ap;
     
    @@ -332,7 +332,8 @@ _nc_fmt_funcptr(char *target, const char *source, size_t size)
     	if (ch != 0 || (n + 1) >= size)
     	    leading = FALSE;
     	if (!leading) {
    -	    sprintf(dst, "%02x", ch & 0xff);
    +	    _nc_SPRINTF(dst, _nc_SLIMIT(TR_FUNC_LEN - (dst - target))
    +			"%02x", ch & 0xff);
     	    dst += 2;
     	}
         }
    @@ -375,7 +376,7 @@ _nc_use_tracef(unsigned mask)
      * the tracef mutex.
      */
     NCURSES_EXPORT(void)
    -_nc_locked_tracef(const char *fmt,...)
    +_nc_locked_tracef(const char *fmt, ...)
     {
         va_list ap;
     
    diff --git a/ncurses/widechar/lib_add_wch.c b/ncurses/widechar/lib_add_wch.c
    index 0e1f4ea5..a55c2fea 100644
    --- a/ncurses/widechar/lib_add_wch.c
    +++ b/ncurses/widechar/lib_add_wch.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 2004-2011,2016 Free Software Foundation, Inc.              *
    + * Copyright (c) 2004-2016,2019 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            *
    @@ -39,7 +39,7 @@
     #include 
     #endif
     
    -MODULE_ID("$Id: lib_add_wch.c,v 1.13 2016/05/28 23:36:34 tom Exp $")
    +MODULE_ID("$Id: lib_add_wch.c,v 1.14 2019/01/19 15:46:25 tom Exp $")
     
     /* clone/adapt lib_addch.c */
     static const cchar_t blankchar = NewChar(BLANK_TEXT);
    @@ -114,7 +114,7 @@ render_char(WINDOW *win, cchar_t ch)
     #endif
     
     static bool
    -newline_forces_scroll(WINDOW *win, NCURSES_SIZE_T * ypos)
    +newline_forces_scroll(WINDOW *win, NCURSES_SIZE_T *ypos)
     {
         bool result = FALSE;
     
    diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog
    index 5568ff9c..b03c02a7 100644
    --- a/package/debian-mingw/changelog
    +++ b/package/debian-mingw/changelog
    @@ -1,8 +1,8 @@
    -ncurses6 (6.1+20190112) unstable; urgency=low
    +ncurses6 (6.1+20190121) unstable; urgency=low
     
       * latest weekly patch
     
    - -- Thomas E. Dickey   Sat, 12 Jan 2019 13:35:16 -0500
    + -- Thomas E. Dickey   Sun, 20 Jan 2019 20:57:34 -0500
     
     ncurses6 (5.9-20131005) unstable; urgency=low
     
    diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog
    index 5568ff9c..b03c02a7 100644
    --- a/package/debian-mingw64/changelog
    +++ b/package/debian-mingw64/changelog
    @@ -1,8 +1,8 @@
    -ncurses6 (6.1+20190112) unstable; urgency=low
    +ncurses6 (6.1+20190121) unstable; urgency=low
     
       * latest weekly patch
     
    - -- Thomas E. Dickey   Sat, 12 Jan 2019 13:35:16 -0500
    + -- Thomas E. Dickey   Sun, 20 Jan 2019 20:57:34 -0500
     
     ncurses6 (5.9-20131005) unstable; urgency=low
     
    diff --git a/package/debian/changelog b/package/debian/changelog
    index 44bee2fb..3bc7a6d0 100644
    --- a/package/debian/changelog
    +++ b/package/debian/changelog
    @@ -1,8 +1,8 @@
    -ncurses6 (6.1+20190112) unstable; urgency=low
    +ncurses6 (6.1+20190121) unstable; urgency=low
     
       * latest weekly patch
     
    - -- Thomas E. Dickey   Sat, 12 Jan 2019 13:35:16 -0500
    + -- Thomas E. Dickey   Sun, 20 Jan 2019 20:57:34 -0500
     
     ncurses6 (5.9-20120608) unstable; urgency=low
     
    diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi
    index f3443aa6..4c4f9954 100644
    --- a/package/mingw-ncurses.nsi
    +++ b/package/mingw-ncurses.nsi
    @@ -1,4 +1,4 @@
    -; $Id: mingw-ncurses.nsi,v 1.307 2019/01/12 18:35:16 tom Exp $
    +; $Id: mingw-ncurses.nsi,v 1.310 2019/01/21 01:57:34 tom Exp $
     
     ; TODO add examples
     ; TODO bump ABI to 6
    @@ -10,7 +10,7 @@
     !define VERSION_MAJOR "6"
     !define VERSION_MINOR "1"
     !define VERSION_YYYY  "2019"
    -!define VERSION_MMDD  "0112"
    +!define VERSION_MMDD  "0121"
     !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
     
     !define MY_ABI   "5"
    diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec
    index e610813d..3ec5131e 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.1
    -Release: 20190112
    +Release: 20190121
     License: X11
     Group: Development/Libraries
     Source: ncurses-%{version}-%{release}.tgz
    diff --git a/package/ncurses.spec b/package/ncurses.spec
    index eae49d5e..98157423 100644
    --- a/package/ncurses.spec
    +++ b/package/ncurses.spec
    @@ -1,7 +1,7 @@
     Summary: shared libraries for terminal handling
     Name: ncurses6
     Version: 6.1
    -Release: 20190112
    +Release: 20190121
     License: X11
     Group: Development/Libraries
     Source: ncurses-%{version}-%{release}.tgz
    diff --git a/package/ncursest.spec b/package/ncursest.spec
    index bdfe177f..d34a09a6 100644
    --- a/package/ncursest.spec
    +++ b/package/ncursest.spec
    @@ -1,7 +1,7 @@
     Summary: Curses library with POSIX thread support.
     Name: ncursest6
     Version: 6.1
    -Release: 20190112
    +Release: 20190121
     License: X11
     Group: Development/Libraries
     Source: ncurses-%{version}-%{release}.tgz
    diff --git a/progs/dump_entry.c b/progs/dump_entry.c
    index 23fcf896..60a3d956 100644
    --- a/progs/dump_entry.c
    +++ b/progs/dump_entry.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    + * Copyright (c) 1998-2018,2019 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            *
    @@ -39,7 +39,7 @@
     #include "termsort.c"		/* this C file is generated */
     #include 	/* so is this */
     
    -MODULE_ID("$Id: dump_entry.c,v 1.170 2018/12/23 00:37:35 tom Exp $")
    +MODULE_ID("$Id: dump_entry.c,v 1.171 2019/01/21 15:11:51 tom Exp $")
     
     #define DISCARD(string) string = ABSENT_STRING
     #define PRINTF (void) printf
    @@ -530,7 +530,7 @@ fill_spaces(const char *src)
     	for (s = d = 0; src[s] != '\0'; ++s) {
     	    if (src[s] == ' ') {
     		if (pass) {
    -		    strcpy(&result[d], fill);
    +		    _nc_STRCPY(&result[d], fill, need + 1 - d);
     		    d += (int) size;
     		} else {
     		    need += size;
    diff --git a/test/README b/test/README
    index 587bb059..135c31cf 100644
    --- a/test/README
    +++ b/test/README
    @@ -1,5 +1,5 @@
     -------------------------------------------------------------------------------
    --- Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.               --
    +-- Copyright (c) 1998-2018,2019 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             --
    @@ -25,7 +25,7 @@
     -- sale, use or other dealings in this Software without prior written        --
     -- authorization.                                                            --
     -------------------------------------------------------------------------------
    --- $Id: README,v 1.66 2018/06/09 19:03:16 tom Exp $
    +-- $Id: README,v 1.68 2019/01/21 14:18:33 tom Exp $
     -------------------------------------------------------------------------------
     
     The programs in this directory are used to test and demonstrate ncurses.
    @@ -231,22 +231,22 @@ unpost_menu			test: demo_menus ncurses
     libncurses:
     ----------
     BC				test: demo_termcap
    -COLORS				test: demo_new_pair dots_curses dots_xcurses echochar ncurses picsmap savescreen xmas
    +COLORS				test: color_content demo_new_pair dots_curses dots_xcurses echochar ncurses pair_content picsmap savescreen xmas
     COLOR_PAIR			test: background blue bs cardfile clip_printw demo_forms demo_menus demo_panels dots_curses echochar filter firework gdc hanoi ins_wide insdelln inserts knight ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testaddch testcurs view worm xmas
    -COLOR_PAIRS			test: demo_new_pair dots_curses dots_xcurses echochar ncurses newdemo savescreen
    +COLOR_PAIRS			test: demo_new_pair dots_curses dots_xcurses echochar ncurses newdemo pair_content
     COLS				test: cardfile demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_panels ditto dots_curses dots_xcurses echochar filter firework foldkeys hashtest inch_wide inchs ins_wide inserts lrtest movewindow ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm
     ESCDELAY			test: test_opaque
     LINES				test: cardfile demo_defkey demo_keyok demo_menus demo_panels ditto dots_curses dots_xcurses echochar firework hanoi hashtest inch_wide inchs ins_wide inserts lrtest movewindow ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
    -PAIR_NUMBER			test: ncurses
    +PAIR_NUMBER			test: dump_window ncurses
     PC				test: demo_termcap
     SP				lib: form
     TABSIZE				test: test_opaque
     UP				test: demo_termcap
     acs_map				test: background gdc ins_wide inserts knight movewindow ncurses newdemo savescreen test_add_wchstr test_addchstr test_addstr test_addwstr testcurs
    -add_wch				test: demo_new_pair demo_panels ncurses picsmap test_add_wchstr test_addwstr
    +add_wch				test: demo_new_pair demo_panels ncurses picsmap savescreen test_add_wchstr test_addwstr
     add_wchnstr			test: test_add_wchstr
     add_wchstr			test: test_add_wchstr view
    -addch				test: background blue bs dots_curses echochar hashtest ncurses padview picsmap savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_opaque testaddch view worm
    +addch				test: background blue bs color_content dots_curses echochar hashtest ncurses padview pair_content picsmap savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_opaque testaddch view worm
     addchnstr			test: test_addchstr
     addchstr			test: test_addchstr
     addnstr				test: test_addstr
    @@ -279,16 +279,16 @@ border				-
     border_set			-
     box				test: cardfile chgat clip_printw demo_forms demo_menus demo_panels ditto inch_wide inchs ins_wide insdelln inserts lrtest ncurses newdemo popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
     box_set				test: ncurses
    -can_change_color		test: extended_color ncurses
    +can_change_color		test: color_content extended_color ncurses
     can_change_color_sp		test: extended_color
    -cbreak				test: background blue bs cardfile chgat clip_printw color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels ditto extended_color filter firework foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest movewindow ncurses newdemo padview picsmap savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
    +cbreak				test: background blue bs cardfile chgat clip_printw color_content color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels ditto extended_color filter firework foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest movewindow ncurses newdemo padview pair_content picsmap savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
     cbreak_sp			test: sp_tinfo
     chgat				test: chgat
     clear				test: blue bs filter gdc ncurses padview testcurs xmas
     clearok				test: bs knight
     clrtobot			test: demo_menus ncurses view
     clrtoeol			test: blue bs demo_altkeys filter foldkeys form_driver_w hanoi hashtest movewindow ncurses padview view
    -color_content			test: ncurses picsmap
    +color_content			test: color_content ncurses picsmap
     color_content_sp		-
     color_set			test: color_set dots_xcurses extended_color ncurses
     copywin				test: ncurses testcurs
    @@ -319,15 +319,15 @@ echo				test: bs hanoi ncurses test_get_wstr test_getstr testcurs testscanw
     echo_sp				lib: ncurses
     echo_wchar			test: ncurses
     echochar			test: echochar ncurses
    -endwin				test: background blue bs cardfile chgat clip_printw color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels ditto dots_curses dots_mvcur dots_xcurses echochar extended_color filter firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest movewindow ncurses newdemo padview picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testaddch testcurs testscanw view worm xmas
    +endwin				test: background blue bs cardfile chgat clip_printw color_content color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels ditto dots_curses dots_mvcur dots_xcurses echochar extended_color filter firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest movewindow ncurses newdemo padview pair_content picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testaddch testcurs testscanw view worm xmas
     endwin_sp			lib: ncurses
     erase				test: cardfile demo_menus filter firework firstlast hanoi lrtest ncurses picsmap tclock test_opaque testcurs
     erasechar			test: ncurses
     erasechar_sp			test: sp_tinfo
     erasewchar			test: ncurses
    -extended_color_content		test: extended_color
    +extended_color_content		test: color_content extended_color
     extended_color_content_sp	test: extended_color
    -extended_pair_content		test: extended_color
    +extended_pair_content		test: extended_color pair_content
     extended_pair_content_sp	test: extended_color
     extended_slk_color		test: extended_color
     extended_slk_color_sp		test: extended_color
    @@ -346,16 +346,16 @@ get_escdelay_sp			-
     get_wch				test: form_driver_w
     get_wstr			test: test_get_wstr
     getattrs			-
    -getbegx				test: chgat clip_printw demo_menus demo_panels insdelln movewindow ncurses newdemo redraw testcurs
    -getbegy				test: chgat clip_printw demo_menus demo_panels insdelln movewindow ncurses newdemo redraw testcurs
    +getbegx				test: chgat clip_printw demo_menus demo_panels dump_window insdelln movewindow ncurses newdemo redraw testcurs
    +getbegy				test: chgat clip_printw demo_menus demo_panels dump_window insdelln movewindow ncurses newdemo redraw testcurs
     getbkgd				test: ncurses
     getbkgrnd			test: ncurses
     getcchar			test: ncurses savescreen view
    -getch				test: background blue bs chgat color_set demo_altkeys demo_new_pair extended_color filter firework firstlast foldkeys hanoi hashtest insdelln lrtest padview picsmap savescreen tclock test_opaque testaddch testcurs view xmas
    -getcurx				test: bs chgat clip_printw demo_altkeys demo_defkey demo_panels extended_color filter firstlast foldkeys insdelln movewindow ncurses redraw savescreen test_get_wstr test_getstr test_opaque testcurs view
    -getcury				test: bs chgat clip_printw demo_altkeys demo_defkey demo_panels extended_color filter firstlast foldkeys insdelln movewindow ncurses popup_msg redraw savescreen test_opaque testcurs view
    -getmaxx				test: chgat clip_printw demo_panels firstlast inch_wide inchs insdelln movewindow ncurses newdemo popup_msg redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
    -getmaxy				test: chgat clip_printw demo_forms demo_panels firstlast inch_wide inchs insdelln movewindow ncurses newdemo popup_msg redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
    +getch				test: background blue bs chgat color_content color_set demo_altkeys demo_new_pair extended_color filter firework firstlast foldkeys hanoi hashtest insdelln lrtest padview pair_content picsmap savescreen tclock test_opaque testaddch testcurs view xmas
    +getcurx				test: bs chgat clip_printw demo_altkeys demo_defkey demo_panels dump_window extended_color filter firstlast foldkeys insdelln movewindow ncurses redraw savescreen test_get_wstr test_getstr test_opaque testcurs view
    +getcury				test: bs chgat clip_printw demo_altkeys demo_defkey demo_panels dump_window extended_color filter firstlast foldkeys insdelln movewindow ncurses popup_msg redraw savescreen test_opaque testcurs view
    +getmaxx				test: chgat clip_printw demo_panels dump_window firstlast inch_wide inchs insdelln movewindow ncurses newdemo popup_msg redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
    +getmaxy				test: chgat clip_printw demo_forms demo_panels dump_window firstlast inch_wide inchs insdelln movewindow ncurses newdemo popup_msg redraw test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
     getmouse			test: bs demo_menus knight movewindow ncurses testcurs
     getmouse_sp			-
     getn_wstr			test: test_get_wstr
    @@ -367,7 +367,7 @@ getwin				test: ncurses
     getwin_sp			-
     halfdelay			test: padview view
     halfdelay_sp			test: sp_tinfo
    -has_colors			test: background bs cardfile chgat clip_printw color_set demo_forms demo_menus demo_new_pair demo_panels dots_curses dots_xcurses echochar extended_color filter firework gdc hanoi ins_wide insdelln inserts knight ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testcurs view worm xmas
    +has_colors			test: background bs cardfile chgat clip_printw color_content color_set demo_forms demo_menus demo_new_pair demo_panels dots_curses dots_xcurses echochar extended_color filter firework gdc hanoi ins_wide insdelln inserts knight ncurses newdemo padview pair_content picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testcurs view worm xmas
     has_colors_sp			lib: ncurses
     has_ic				test: lrtest ncurses
     has_ic_sp			test: sp_tinfo
    @@ -388,15 +388,15 @@ in_wchstr			test: inch_wide
     inch				test: inchs
     inchnstr			test: inchs
     inchstr				test: inchs
    -init_color			test: ncurses
    +init_color			test: color_content ncurses
     init_color_sp			-
    -init_extended_color		test: extended_color
    +init_extended_color		test: color_content extended_color
     init_extended_color_sp		test: extended_color
    -init_extended_pair		test: extended_color ncurses picsmap
    +init_extended_pair		test: extended_color ncurses pair_content picsmap
     init_extended_pair_sp		test: extended_color
    -init_pair			test: background blue bs cardfile chgat clip_printw color_set demo_forms demo_menus demo_new_pair demo_panels dots_curses dots_xcurses echochar filter firework gdc hanoi ins_wide insdelln inserts knight ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testaddch testcurs view worm xmas
    +init_pair			test: background blue bs cardfile chgat clip_printw color_set demo_forms demo_menus demo_new_pair demo_panels dots_curses dots_xcurses echochar filter firework gdc hanoi ins_wide insdelln inserts knight ncurses newdemo padview pair_content picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testaddch testcurs view worm xmas
     init_pair_sp			-
    -initscr				test: background blue bs cardfile chgat clip_printw color_set demo_defkey demo_forms demo_keyok demo_menus demo_panels dots_curses dots_xcurses echochar filter firework firstlast form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest movewindow ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testaddch testcurs testscanw view worm xmas
    +initscr				test: background blue bs cardfile chgat clip_printw color_content color_set demo_defkey demo_forms demo_keyok demo_menus demo_panels dots_curses dots_xcurses echochar filter firework firstlast form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest movewindow ncurses newdemo padview pair_content picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testaddch testcurs testscanw view worm xmas
     innstr				test: test_instr
     innwstr				test: test_inwstr
     ins_nwstr			test: ins_wide
    @@ -521,7 +521,7 @@ mvwin				test: cardfile demo_menus movewindow ncurses testcurs xmas
     mvwin_wch			test: inch_wide
     mvwin_wchnstr			test: inch_wide
     mvwin_wchstr			test: inch_wide
    -mvwinch				test: inchs newdemo testcurs
    +mvwinch				test: dump_window inchs newdemo testcurs
     mvwinchnstr			test: inchs
     mvwinchstr			test: inchs
     mvwinnstr			test: test_instr testcurs
    @@ -553,7 +553,7 @@ nl_sp				lib: ncurses
     nocbreak			test: testcurs
     nocbreak_sp			test: sp_tinfo
     nodelay				test: demo_new_pair ditto extended_color firework gdc lrtest ncurses newdemo padview rain tclock test_opaque view worm xmas
    -noecho				test: background bs cardfile chgat clip_printw color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels ditto extended_color firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest movewindow ncurses padview picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
    +noecho				test: background bs cardfile chgat clip_printw color_content color_set demo_altkeys demo_defkey demo_forms demo_keyok demo_menus demo_new_pair demo_panels ditto extended_color firework firstlast foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts knight lrtest movewindow ncurses padview pair_content picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm xmas
     noecho_sp			lib: ncurses
     nofilter			-
     nofilter_sp			-
    @@ -570,13 +570,13 @@ numnames			test: demo_terminfo test_arrays progs: dump_entry infocmp
     ospeed				test: demo_termcap progs: tset
     overlay				test: ncurses testcurs xmas
     overwrite			test: ncurses savescreen
    -pair_content			test: background color_set
    +pair_content			test: background color_set pair_content
     pair_content_sp			lib: ncurses
     pecho_wchar			-
     pechochar			-
     pnoutrefresh			test: ncurses padview popup_msg
     prefresh			test: testcurs
    -printw				test: background blue bs color_set demo_altkeys demo_defkey demo_keyok extended_color filter foldkeys ncurses savescreen testcurs testscanw view
    +printw				test: background blue bs color_content color_set demo_altkeys demo_defkey demo_keyok extended_color filter foldkeys ncurses pair_content savescreen testcurs testscanw view
     putp				test: filter test_sgr progs: tput
     putp_sp				test: sp_tinfo
     putwin				test: ncurses
    @@ -585,7 +585,7 @@ qiflush_sp			test: sp_tinfo
     raw				test: demo_forms ncurses redraw testcurs
     raw_sp				test: sp_tinfo
     redrawwin			test: padview redraw view
    -refresh				test: blue bs demo_defkey demo_forms demo_keyok demo_menus demo_panels dots_curses dots_mvcur dots_xcurses echochar filter firstlast form_driver_w gdc hanoi hashtest lrtest movewindow ncurses picsmap savescreen tclock testcurs view xmas
    +refresh				test: blue bs color_content demo_defkey demo_forms demo_keyok demo_menus demo_panels dots_curses dots_mvcur dots_xcurses echochar filter firstlast form_driver_w gdc hanoi hashtest lrtest movewindow ncurses pair_content picsmap savescreen tclock testcurs view xmas
     reset_color_pairs		test: picsmap
     reset_color_pairs_sp		-
     reset_prog_mode			test: filter ncurses
    @@ -614,7 +614,7 @@ scr_set				test: savescreen
     scr_set_sp			-
     scrl				test: view
     scroll				test: testcurs
    -scrollok			test: clip_printw demo_altkeys demo_defkey demo_keyok demo_new_pair demo_panels ditto foldkeys hashtest knight ncurses picsmap redraw test_opaque testcurs testscanw view
    +scrollok			test: clip_printw color_content demo_altkeys demo_defkey demo_keyok demo_new_pair demo_panels ditto foldkeys hashtest knight ncurses pair_content picsmap redraw test_opaque testcurs testscanw view
     set_curterm			test: list_keys sp_tinfo
     set_curterm_sp			test: sp_tinfo
     set_escdelay			test: test_opaque
    @@ -622,7 +622,7 @@ set_escdelay_sp			lib: ncurses
     set_tabsize			test: test_opaque
     set_tabsize_sp			test: sp_tinfo
     set_term			lib: ncurses
    -setcchar			test: demo_new_pair demo_panels ins_wide ncurses picsmap test_add_wchstr test_addwstr
    +setcchar			test: demo_new_pair demo_panels ins_wide ncurses picsmap savescreen test_add_wchstr test_addwstr
     setscrreg			test: view
     setupterm			test: demo_terminfo dots list_keys sp_tinfo test_setupterm test_sgr test_termattrs test_vid_puts test_vidputs progs: clear tabs tput tset
     slk_attr			-
    @@ -658,9 +658,9 @@ slk_touch_sp			lib: ncurses
     slk_wset			test: ncurses
     standend			test: blue gdc ncurses
     standout			test: blue ncurses
    -start_color			test: background blue bs cardfile chgat clip_printw color_set demo_forms demo_menus demo_new_pair demo_panels dots_curses dots_xcurses echochar extended_color filter firework gdc hanoi ins_wide insdelln inserts knight ncurses newdemo padview picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testaddch testcurs view worm xmas
    +start_color			test: background blue bs cardfile chgat clip_printw color_content color_set demo_forms demo_menus demo_new_pair demo_panels dots_curses dots_xcurses echochar extended_color filter firework gdc hanoi ins_wide insdelln inserts knight ncurses newdemo padview pair_content picsmap rain savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr testaddch testcurs view worm xmas
     start_color_sp			-
    -stdscr				test: bs chgat clip_printw demo_altkeys demo_forms demo_menus demo_new_pair demo_panels ditto edit_field extended_color filter firework foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest movewindow ncurses padview picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs testscanw view worm xmas
    +stdscr				test: background bs chgat clip_printw color_content demo_altkeys demo_forms demo_menus demo_new_pair demo_panels ditto edit_field extended_color filter firework foldkeys form_driver_w gdc hanoi hashtest inch_wide inchs ins_wide insdelln inserts key_names keynames knight lrtest movewindow ncurses padview pair_content picsmap rain redraw savescreen tclock test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs testscanw view worm xmas
     strcodes			test: demo_termcap test_arrays progs: dump_entry
     strfnames			test: demo_terminfo list_keys test_arrays progs: dump_entry
     strnames			test: demo_terminfo foldkeys list_keys test_arrays progs: dump_entry infocmp tic
    @@ -682,11 +682,11 @@ tgetnum_sp			test: sp_tinfo
     tgetstr				test: demo_termcap dots_termcap railroad
     tgetstr_sp			test: sp_tinfo
     tgoto				test: dots_termcap railroad progs: tic
    -tigetflag			test: demo_terminfo progs: tic tput
    +tigetflag			test: demo_terminfo savescreen progs: tic tput
     tigetflag_sp			test: sp_tinfo
    -tigetnum			test: demo_terminfo dots dots_mvcur ncurses progs: tput
    +tigetnum			test: demo_terminfo dots dots_mvcur ncurses savescreen progs: tput
     tigetnum_sp			test: sp_tinfo
    -tigetstr			test: blue demo_defkey demo_new_pair demo_terminfo foldkeys list_keys test_sgr testcurs progs: clear_cmd tput
    +tigetstr			test: blue demo_defkey demo_new_pair demo_terminfo foldkeys list_keys savescreen test_sgr testcurs progs: clear_cmd tput
     tigetstr_sp			test: sp_tinfo
     timeout				test: filter rain savescreen
     tiparm				-
    @@ -729,8 +729,8 @@ vidputs				test: test_vidputs
     vidputs_sp			-
     vline				test: gdc ncurses
     vline_set			-
    -vw_printw			test: clip_printw, movewindow
    -vw_scanw			lib: ncurses
    +vw_printw			test: clip_printw movewindow
    +vw_scanw			-
     vwprintw			-
     vwscanw				-
     wadd_wch			test: inch_wide ncurses test_add_wchstr test_addwstr
    @@ -771,7 +771,7 @@ werase				test: cardfile demo_forms demo_menus demo_panels firstlast knight ncur
     wget_wch			test: ins_wide ncurses test_add_wchstr test_addwstr
     wget_wstr			test: test_get_wstr
     wgetbkgrnd			lib: ncurses
    -wgetch				test: cardfile chgat clip_printw demo_defkey demo_keyok demo_menus demo_panels ditto edit_field gdc insdelln inserts knight movewindow ncurses newdemo popup_msg rain redraw test_addchstr test_addstr test_opaque testcurs worm
    +wgetch				test: cardfile chgat clip_printw demo_defkey demo_keyok demo_menus demo_panels ditto dump_window edit_field gdc insdelln inserts knight movewindow ncurses newdemo popup_msg rain redraw test_addchstr test_addstr test_opaque testcurs worm
     wgetdelay			-
     wgetn_wstr			test: ncurses test_get_wstr
     wgetnstr			test: ncurses test_getstr
    @@ -799,7 +799,7 @@ winsstr				test: inserts
     winstr				test: test_instr
     winwstr				test: test_inwstr
     wmouse_trafo			test: ncurses
    -wmove				test: chgat clip_printw demo_altkeys demo_defkey demo_keyok demo_menus demo_panels extended_color firstlast foldkeys inch_wide inchs ins_wide insdelln inserts knight movewindow ncurses newdemo padview picsmap redraw savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm
    +wmove				test: chgat clip_printw demo_altkeys demo_defkey demo_keyok demo_menus demo_panels dump_window extended_color firstlast foldkeys inch_wide inchs ins_wide insdelln inserts knight movewindow ncurses newdemo padview picsmap redraw savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs view worm
     wnoutrefresh			test: demo_menus ditto inch_wide inchs ins_wide inserts knight movewindow ncurses padview popup_msg redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque
     wprintw				test: chgat clip_printw demo_defkey demo_forms demo_keyok demo_menus demo_panels inch_wide inchs ins_wide insdelln inserts knight ncurses test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque testcurs
     wredrawln			test: redraw
    @@ -840,4 +840,4 @@ top_panel			test: cardfile demo_panels ncurses
     update_panels			test: cardfile demo_panels ncurses
     update_panels_sp		-
     
    ---- vile:txtmode
    +-- vile:txtmode
    diff --git a/test/color_content.c b/test/color_content.c
    index 77b04f17..bb1f076a 100644
    --- a/test/color_content.c
    +++ b/test/color_content.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 2018 Free Software Foundation, Inc.                        *
    + * Copyright (c) 2018,2019 Free Software Foundation, Inc.                   *
      *                                                                          *
      * Permission is hereby granted, free of charge, to any person obtaining a  *
      * copy of this software and associated documentation files (the            *
    @@ -26,24 +26,36 @@
      * authorization.                                                           *
      ****************************************************************************/
     /*
    - * $Id: color_content.c,v 1.2 2018/12/30 00:52:58 tom Exp $
    + * $Id: color_content.c,v 1.10 2019/01/21 01:05:44 tom Exp $
      */
     
     #define NEED_TIME_H
     #include 
     
    +#if USE_EXTENDED_COLOR
    +typedef int my_color_t;
    +#else
    +typedef NCURSES_COLOR_T my_color_t;
    +#endif
    +
     typedef struct {
    -    NCURSES_COLOR_T r;
    -    NCURSES_COLOR_T g;
    -    NCURSES_COLOR_T b;
    +    my_color_t r;
    +    my_color_t g;
    +    my_color_t b;
     } MYCOLOR;
     
    +static int f_opt;
     static int i_opt;
     static int l_opt;
     static int n_opt;
    +static int p_opt;
     static int r_opt;
     static int s_opt;
     
    +#if USE_EXTENDED_COLOR
    +static int x_opt;
    +#endif
    +
     static MYCOLOR *expected;
     
     #if HAVE_GETTIMEOFDAY
    @@ -60,10 +72,47 @@ failed(const char *msg)
         ExitProgram(EXIT_FAILURE);
     }
     
    -static NCURSES_COLOR_T
    +#if USE_EXTENDED_COLOR
    +static int
    +InitColor(int pair, int r, int g, int b)
    +{
    +    int rc;
    +    if (x_opt) {
    +	rc = init_extended_color(pair, r, g, b);
    +    } else {
    +	rc = init_color((NCURSES_PAIRS_T) pair,
    +			(NCURSES_COLOR_T) r,
    +			(NCURSES_COLOR_T) g,
    +			(NCURSES_COLOR_T) b);
    +    }
    +    return rc;
    +}
    +
    +static int
    +ColorContent(int color, int *rp, int *gp, int *bp)
    +{
    +    int rc;
    +    if (x_opt) {
    +	rc = extended_color_content(color, rp, gp, bp);
    +    } else {
    +	NCURSES_COLOR_T r, g, b;
    +	if ((rc = color_content((NCURSES_COLOR_T) color, &r, &g, &b)) == OK) {
    +	    *rp = r;
    +	    *gp = g;
    +	    *bp = b;
    +	}
    +    }
    +    return rc;
    +}
    +#else
    +#define InitColor(color,r,g,b)       init_color((NCURSES_COLOR_T)color,(NCURSES_COLOR_T)r,(NCURSES_COLOR_T)g,(NCURSES_COLOR_T)b)
    +#define ColorContent(color,rp,gp,bp) color_content((NCURSES_COLOR_T)color,rp,gp,bp)
    +#endif
    +
    +static my_color_t
     random_color(void)
     {
    -    return (NCURSES_COLOR_T) (rand() % 1000);
    +    return (my_color_t) (rand() % 1000);
     }
     
     static void
    @@ -75,31 +124,34 @@ setup_test(void)
         scrollok(stdscr, TRUE);
         if (has_colors()) {
     	start_color();
    -	if (!can_change_color())
    +	if (!can_change_color() && !p_opt)
     	    failed("this terminal cannot initialize colors");
     
    +	if (!f_opt)
    +	    f_opt = 0;
     	if (!l_opt)
     	    l_opt = COLORS;
     	if (l_opt <= 0)
     	    failed("color limit must be greater than zero");
     
     	if (!n_opt) {
    -	    NCURSES_PAIRS_T color;
    +	    int color;
    +	    size_t need = (size_t) ((l_opt > COLORS) ? l_opt : COLORS) + 1;
     
    -	    expected = typeCalloc(MYCOLOR, l_opt);
    +	    expected = typeCalloc(MYCOLOR, need);
     	    if (s_opt) {
    -		NCURSES_COLOR_T r;
    -		NCURSES_COLOR_T g;
    -		NCURSES_COLOR_T b;
    -		color = 0;
    +		int r;
    +		int g;
    +		int b;
    +		color = f_opt;
     		for (r = 0; r < 1000; ++r) {
     		    for (g = 0; g < 1000; ++g) {
     			for (b = 0; b < 1000; ++b) {
     			    if (color < l_opt) {
    -				init_color(color, r, g, b);
    -				expected[color].r = r;
    -				expected[color].g = g;
    -				expected[color].b = b;
    +				InitColor(color, r, g, b);
    +				expected[color].r = (my_color_t) r;
    +				expected[color].g = (my_color_t) g;
    +				expected[color].b = (my_color_t) b;
     				++color;
     			    } else {
     				break;
    @@ -108,12 +160,14 @@ setup_test(void)
     		    }
     		}
     	    } else {
    -		for (color = 1; color < l_opt; ++color) {
    +		for (color = f_opt; color < l_opt; ++color) {
     		    expected[color].r = random_color();
     		    expected[color].g = random_color();
     		    expected[color].b = random_color();
    -		    init_color(color, expected[color].r, expected[color].g,
    -			       expected[color].b);
    +		    InitColor(color,
    +			      expected[color].r,
    +			      expected[color].g,
    +			      expected[color].b);
     		}
     	    }
     	}
    @@ -128,13 +182,13 @@ setup_test(void)
     static void
     run_test(void)
     {
    -    NCURSES_PAIRS_T color;
    +    int color;
         bool success = TRUE;
    -    for (color = 0; color < l_opt; ++color) {
    -	NCURSES_COLOR_T r;
    -	NCURSES_COLOR_T g;
    -	NCURSES_COLOR_T b;
    -	if (color_content(color, &r, &g, &b) == OK) {
    +    for (color = f_opt; color < l_opt; ++color) {
    +	my_color_t r;
    +	my_color_t g;
    +	my_color_t b;
    +	if (ColorContent(color, &r, &g, &b) == OK) {
     	    if (expected != 0) {
     		if (r != expected[color].r)
     		    success = FALSE;
    @@ -173,14 +227,19 @@ usage(void)
     {
         static const char *msg[] =
         {
    -	"Usage: pair_content [options]"
    +	"Usage: color_content [options]"
     	,""
     	,"Options:"
    +	," -f COLOR first color value to test (default: 0)"
     	," -i       interactive, showing test-progress"
    -	," -l NUM   test NUM color pairs, rather than terminal description"
    +	," -l COLOR last color value to test (default: max_colors-1)"
     	," -n       do not initialize color pairs"
    +	," -p       print data for color content instead of testing"
     	," -r COUNT repeat for given count"
     	," -s       initialize pairs sequentially rather than random"
    +#if USE_EXTENDED_COLOR
    +	," -x       use extended color pairs/values"
    +#endif
         };
         size_t n;
         for (n = 0; n < SIZEOF(msg); n++)
    @@ -194,8 +253,12 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
         int i;
         int repeat;
     
    -    while ((i = getopt(argc, argv, "il:nr:s")) != -1) {
    +    while ((i = getopt(argc, argv, "f:il:npr:sx")) != -1) {
     	switch (i) {
    +	case 'f':
    +	    if ((f_opt = atoi(optarg)) <= 0)
    +		usage();
    +	    break;
     	case 'i':
     	    i_opt = 1;
     	    break;
    @@ -206,6 +269,9 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
     	case 'n':
     	    n_opt = 1;
     	    break;
    +	case 'p':
    +	    p_opt = 1;
    +	    break;
     	case 'r':
     	    if ((r_opt = atoi(optarg)) <= 0)
     		usage();
    @@ -213,6 +279,11 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
     	case 's':
     	    s_opt = 1;
     	    break;
    +#if USE_EXTENDED_COLOR
    +	case 'x':
    +	    x_opt = 1;
    +	    break;
    +#endif
     	default:
     	    usage();
     	}
    @@ -223,26 +294,38 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
     	r_opt = 1;
     
         setup_test();
    +    if (p_opt) {
    +	endwin();
    +	for (i = 0; i < COLORS; ++i) {
    +	    my_color_t r, g, b;
    +	    if (ColorContent(i, &r, &g, &b) == OK) {
    +		printf("%d: %d %d %d\n", i, r, g, b);
    +	    } else {
    +		printf("%d: ? ?\n", i);
    +	    }
    +	}
    +    } else {
     
    -    for (repeat = 0; repeat < r_opt; ++repeat) {
    -	run_test();
    -	if (i_opt) {
    -	    addch('.');
    -	    refresh();
    +	for (repeat = 0; repeat < r_opt; ++repeat) {
    +	    run_test();
    +	    if (i_opt) {
    +		addch('.');
    +		refresh();
    +	    }
     	}
    -    }
     
    -    if (i_opt) {
    -	addch('\n');
    -    }
    -    printw("DONE: ");
    +	if (i_opt) {
    +	    addch('\n');
    +	}
    +	printw("DONE: ");
     #if HAVE_GETTIMEOFDAY
    -    gettimeofday(&finish_time, 0);
    -    printw("%.03f seconds",
    -	   seconds(&finish_time)
    -	   - seconds(&initial_time));
    +	gettimeofday(&finish_time, 0);
    +	printw("%.03f seconds",
    +	       seconds(&finish_time)
    +	       - seconds(&initial_time));
     #endif
    -    finish_test();
    +	finish_test();
    +    }
     
         ExitProgram(EXIT_SUCCESS);
     }
    diff --git a/test/configure b/test/configure
    index a195e2ff..6f9bafcf 100755
    --- a/test/configure
    +++ b/test/configure
    @@ -17037,7 +17037,13 @@ else
     #include "confdefs.h"
     
     #include 
    +#ifdef NCURSES_VERSION
    +#undef NCURSES_VERSION
    +#endif
     #include 
    +#ifndef NCURSES_VERSION
    +#error wrong header
    +#endif
     
     int
     main (void)
    @@ -17048,16 +17054,16 @@ return 0;
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:17051: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:17057: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:17054: \$? = $ac_status" >&5
    +  echo "$as_me:17060: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:17057: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17063: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17060: \$? = $ac_status" >&5
    +  echo "$as_me:17066: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_have_termcap_h=yes
     else
    @@ -17067,14 +17073,72 @@ cf_cv_have_termcap_h=no
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
     fi
    -echo "$as_me:17070: result: $cf_cv_have_termcap_h" >&5
    +echo "$as_me:17076: result: $cf_cv_have_termcap_h" >&5
     echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
    -test "x$cf_cv_have_termcap_h" = xyes && cat >>confdefs.h <<\EOF
    +if test "x$cf_cv_have_termcap_h" = xyes
    +then
    +	cat >>confdefs.h <<\EOF
     #define HAVE_TERMCAP_H 1
     EOF
     
    +else
    +echo "$as_me:17085: checking if we can use ncurses/termcap.h" >&5
    +echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
    +if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
    +  echo $ECHO_N "(cached) $ECHO_C" >&6
    +else
    +
    +	cat >conftest.$ac_ext <<_ACEOF
    +#line 17092 "configure"
    +#include "confdefs.h"
    +
    +#include 
    +#ifdef NCURSES_VERSION
    +#undef NCURSES_VERSION
    +#endif
    +#include 
    +#ifndef NCURSES_VERSION
    +#error wrong header
    +#endif
    +
    +int
    +main (void)
    +{
    +return 0;
    +  ;
    +  return 0;
    +}
    +_ACEOF
    +rm -f conftest.$ac_objext
    +if { (eval echo "$as_me:17113: \"$ac_compile\"") >&5
    +  (eval $ac_compile) 2>&5
    +  ac_status=$?
    +  echo "$as_me:17116: \$? = $ac_status" >&5
    +  (exit $ac_status); } &&
    +         { ac_try='test -s conftest.$ac_objext'
    +  { (eval echo "$as_me:17119: \"$ac_try\"") >&5
    +  (eval $ac_try) 2>&5
    +  ac_status=$?
    +  echo "$as_me:17122: \$? = $ac_status" >&5
    +  (exit $ac_status); }; }; then
    +  cf_cv_have_ncurses_termcap_h=yes
    +else
    +  echo "$as_me: failed program was:" >&5
    +cat conftest.$ac_ext >&5
    +cf_cv_have_ncurses_termcap_h=no
    +fi
    +rm -f conftest.$ac_objext conftest.$ac_ext
    +fi
    +echo "$as_me:17132: result: $cf_cv_have_ncurses_termcap_h" >&5
    +echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
    +test "x$cf_cv_have_ncurses_termcap_h" = xyes && cat >>confdefs.h <<\EOF
    +#define HAVE_NCURSES_TERMCAP_H 1
    +EOF
    +
    +fi
    +
     if test "x$ac_cv_func_getopt" = xno; then
    -	{ { echo "$as_me:17077: error: getopt is required for building programs" >&5
    +	{ { echo "$as_me:17141: error: getopt is required for building programs" >&5
     echo "$as_me: error: getopt is required for building programs" >&2;}
        { (exit 1); exit 1; }; }
     fi
    @@ -17093,13 +17157,13 @@ wcstombs \
     
     do
     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
    -echo "$as_me:17096: checking for $ac_func" >&5
    +echo "$as_me:17160: checking for $ac_func" >&5
     echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
     if eval "test \"\${$as_ac_var+set}\" = set"; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
       cat >conftest.$ac_ext <<_ACEOF
    -#line 17102 "configure"
    +#line 17166 "configure"
     #include "confdefs.h"
     #define $ac_func autoconf_temporary
     #include 	/* least-intrusive standard header which defines gcc2 __stub macros */
    @@ -17130,16 +17194,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:17133: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:17197: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:17136: \$? = $ac_status" >&5
    +  echo "$as_me:17200: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:17139: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17203: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17142: \$? = $ac_status" >&5
    +  echo "$as_me:17206: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       eval "$as_ac_var=yes"
     else
    @@ -17149,7 +17213,7 @@ eval "$as_ac_var=no"
     fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     fi
    -echo "$as_me:17152: result: `eval echo '${'$as_ac_var'}'`" >&5
    +echo "$as_me:17216: result: `eval echo '${'$as_ac_var'}'`" >&5
     echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
     if test `eval echo '${'$as_ac_var'}'` = yes; then
       cat >>confdefs.h <&5
    +echo "$as_me:17228: checking definition to turn on extended curses functions" >&5
     echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
     if test "${cf_cv_need_xopen_extension+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -17169,7 +17233,7 @@ else
     
     cf_cv_need_xopen_extension=unknown
     cat >conftest.$ac_ext <<_ACEOF
    -#line 17172 "configure"
    +#line 17236 "configure"
     #include "confdefs.h"
     
     #include 
    @@ -17195,16 +17259,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:17198: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:17262: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:17201: \$? = $ac_status" >&5
    +  echo "$as_me:17265: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:17204: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17268: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17207: \$? = $ac_status" >&5
    +  echo "$as_me:17271: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_need_xopen_extension=none
     else
    @@ -17214,7 +17278,7 @@ cat conftest.$ac_ext >&5
     	for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
     	do
     		cat >conftest.$ac_ext <<_ACEOF
    -#line 17217 "configure"
    +#line 17281 "configure"
     #include "confdefs.h"
     
     #define $cf_try_xopen_extension 1
    @@ -17236,16 +17300,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:17239: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:17303: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:17242: \$? = $ac_status" >&5
    +  echo "$as_me:17306: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:17245: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17309: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17248: \$? = $ac_status" >&5
    +  echo "$as_me:17312: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
     else
    @@ -17259,7 +17323,7 @@ fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     
     fi
    -echo "$as_me:17262: result: $cf_cv_need_xopen_extension" >&5
    +echo "$as_me:17326: result: $cf_cv_need_xopen_extension" >&5
     echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
     
     case $cf_cv_need_xopen_extension in
    @@ -17271,7 +17335,7 @@ case $cf_cv_need_xopen_extension in
     	;;
     esac
     
    -echo "$as_me:17274: checking for term.h" >&5
    +echo "$as_me:17338: checking for term.h" >&5
     echo $ECHO_N "checking for term.h... $ECHO_C" >&6
     if test "${cf_cv_term_header+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -17292,7 +17356,7 @@ esac
     for cf_header in $cf_header_list
     do
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 17295 "configure"
    +#line 17359 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -17306,16 +17370,16 @@ WINDOW *x
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:17309: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:17373: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:17312: \$? = $ac_status" >&5
    +  echo "$as_me:17376: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:17315: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17379: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17318: \$? = $ac_status" >&5
    +  echo "$as_me:17382: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_term_header=$cf_header
     	 break
    @@ -17334,7 +17398,7 @@ case $cf_cv_term_header in
     	for cf_header in ncurses/term.h ncursesw/term.h
     	do
     		cat >conftest.$ac_ext <<_ACEOF
    -#line 17337 "configure"
    +#line 17401 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -17352,16 +17416,16 @@ WINDOW *x
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:17355: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:17419: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:17358: \$? = $ac_status" >&5
    +  echo "$as_me:17422: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:17361: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17425: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17364: \$? = $ac_status" >&5
    +  echo "$as_me:17428: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_term_header=$cf_header
     			 break
    @@ -17376,7 +17440,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
     esac
     
     fi
    -echo "$as_me:17379: result: $cf_cv_term_header" >&5
    +echo "$as_me:17443: result: $cf_cv_term_header" >&5
     echo "${ECHO_T}$cf_cv_term_header" >&6
     
     case $cf_cv_term_header in
    @@ -17403,7 +17467,7 @@ EOF
     	;;
     esac
     
    -echo "$as_me:17406: checking for unctrl.h" >&5
    +echo "$as_me:17470: checking for unctrl.h" >&5
     echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
     if test "${cf_cv_unctrl_header+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -17424,7 +17488,7 @@ esac
     for cf_header in $cf_header_list
     do
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 17427 "configure"
    +#line 17491 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -17438,16 +17502,16 @@ WINDOW *x
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:17441: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:17505: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:17444: \$? = $ac_status" >&5
    +  echo "$as_me:17508: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:17447: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17511: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17450: \$? = $ac_status" >&5
    +  echo "$as_me:17514: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_unctrl_header=$cf_header
     	 break
    @@ -17460,12 +17524,12 @@ rm -f conftest.$ac_objext conftest.$ac_ext
     done
     
     fi
    -echo "$as_me:17463: result: $cf_cv_unctrl_header" >&5
    +echo "$as_me:17527: result: $cf_cv_unctrl_header" >&5
     echo "${ECHO_T}$cf_cv_unctrl_header" >&6
     
     case $cf_cv_unctrl_header in
     (no)
    -	{ echo "$as_me:17468: WARNING: unctrl.h header not found" >&5
    +	{ echo "$as_me:17532: WARNING: unctrl.h header not found" >&5
     echo "$as_me: WARNING: unctrl.h header not found" >&2;}
     	;;
     esac
    @@ -17554,10 +17618,10 @@ do
     
     cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
     
    -	echo "$as_me:17557: checking for ${cf_func}" >&5
    +	echo "$as_me:17621: checking for ${cf_func}" >&5
     echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
     
    -echo "${as_me:-configure}:17560: testing ${cf_func} ..." 1>&5
    +echo "${as_me:-configure}:17624: testing ${cf_func} ..." 1>&5
     
     	if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -17566,7 +17630,7 @@ else
     		eval cf_result='$ac_cv_func_'$cf_func
     		if test ".$cf_result" != ".no"; then
     			cat >conftest.$ac_ext <<_ACEOF
    -#line 17569 "configure"
    +#line 17633 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -17599,16 +17663,16 @@ if (foo + 1234L > 5678L)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:17602: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:17666: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:17605: \$? = $ac_status" >&5
    +  echo "$as_me:17669: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:17608: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17672: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17611: \$? = $ac_status" >&5
    +  echo "$as_me:17675: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     else
    @@ -17624,7 +17688,7 @@ fi
     
     	# use the computed/retrieved cache-value:
     	eval 'cf_result=$cf_cv_func_'$cf_func
    -	echo "$as_me:17627: result: $cf_result" >&5
    +	echo "$as_me:17691: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     	if test $cf_result != no; then
     		cat >>confdefs.h <&5
    +	echo "$as_me:17706: checking for ${cf_func}" >&5
     echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
     
    -echo "${as_me:-configure}:17645: testing ${cf_func} ..." 1>&5
    +echo "${as_me:-configure}:17709: testing ${cf_func} ..." 1>&5
     
     	if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -17651,7 +17715,7 @@ else
     		eval cf_result='$ac_cv_func_'$cf_func
     		if test ".$cf_result" != ".no"; then
     			cat >conftest.$ac_ext <<_ACEOF
    -#line 17654 "configure"
    +#line 17718 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -17684,16 +17748,16 @@ if (foo + 1234L > 5678L)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:17687: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:17751: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:17690: \$? = $ac_status" >&5
    +  echo "$as_me:17754: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:17693: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17757: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17696: \$? = $ac_status" >&5
    +  echo "$as_me:17760: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     else
    @@ -17709,7 +17773,7 @@ fi
     
     	# use the computed/retrieved cache-value:
     	eval 'cf_result=$cf_cv_func_'$cf_func
    -	echo "$as_me:17712: result: $cf_result" >&5
    +	echo "$as_me:17776: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     	if test $cf_result != no; then
     		cat >>confdefs.h <conftest.$ac_ext <<_ACEOF
    -#line 17736 "configure"
    +#line 17800 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -17753,21 +17817,21 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:17756: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:17820: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:17759: \$? = $ac_status" >&5
    +  echo "$as_me:17823: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:17762: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17826: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17765: \$? = $ac_status" >&5
    +  echo "$as_me:17829: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
     
     		test -n "$verbose" && echo "	prototype $cf_ret func($cf_arg value)" 1>&6
     
    -echo "${as_me:-configure}:17770: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
    +echo "${as_me:-configure}:17834: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
     
     		cat >>confdefs.h <&5
    +echo "$as_me:17854: checking for ncurses extended functions" >&5
     echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
     if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 17797 "configure"
    +#line 17861 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -17809,16 +17873,16 @@ int x = NCURSES_EXT_FUNCS
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:17812: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:17876: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:17815: \$? = $ac_status" >&5
    +  echo "$as_me:17879: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:17818: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17882: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17821: \$? = $ac_status" >&5
    +  echo "$as_me:17885: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_ncurses_ext_funcs=defined
     else
    @@ -17826,7 +17890,7 @@ else
     cat conftest.$ac_ext >&5
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 17829 "configure"
    +#line 17893 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -17851,16 +17915,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:17854: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:17918: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:17857: \$? = $ac_status" >&5
    +  echo "$as_me:17921: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:17860: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17924: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17863: \$? = $ac_status" >&5
    +  echo "$as_me:17927: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_ncurses_ext_funcs=yes
     else
    @@ -17874,7 +17938,7 @@ fi
     rm -f conftest.$ac_objext conftest.$ac_ext
     
     fi
    -echo "$as_me:17877: result: $cf_cv_ncurses_ext_funcs" >&5
    +echo "$as_me:17941: result: $cf_cv_ncurses_ext_funcs" >&5
     echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
     test "$cf_cv_ncurses_ext_funcs" = yes &&
     cat >>confdefs.h <<\EOF
    @@ -17888,11 +17952,11 @@ then
     	if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
     	then
     		cf_define_xpg5=no
    -		echo "$as_me:17891: checking if _XPG5 should be defined to enable wide-characters" >&5
    +		echo "$as_me:17955: checking if _XPG5 should be defined to enable wide-characters" >&5
     echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
     
     		cat >conftest.$ac_ext <<_ACEOF
    -#line 17895 "configure"
    +#line 17959 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -17905,16 +17969,16 @@ int x = _XPG5
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:17908: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:17972: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:17911: \$? = $ac_status" >&5
    +  echo "$as_me:17975: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:17914: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:17978: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17917: \$? = $ac_status" >&5
    +  echo "$as_me:17981: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       :
     else
    @@ -17923,7 +17987,7 @@ cat conftest.$ac_ext >&5
     cf_save_cppflags="$CPPFLAGS"
     			 CPPFLAGS="$CPPFLAGS -D_XPG5"
     			 cat >conftest.$ac_ext <<_ACEOF
    -#line 17926 "configure"
    +#line 17990 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -17936,16 +18000,16 @@ int x = _XPG5
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:17939: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:18003: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:17942: \$? = $ac_status" >&5
    +  echo "$as_me:18006: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:17945: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18009: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:17948: \$? = $ac_status" >&5
    +  echo "$as_me:18012: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_define_xpg5=yes
     else
    @@ -17956,7 +18020,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
     			 CPPFLAGS="$cf_save_cppflags"
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
    -		echo "$as_me:17959: result: $cf_define_xpg5" >&5
    +		echo "$as_me:18023: result: $cf_define_xpg5" >&5
     echo "${ECHO_T}$cf_define_xpg5" >&6
     
     		if test "$cf_define_xpg5" = yes
    @@ -17965,14 +18029,14 @@ echo "${ECHO_T}$cf_define_xpg5" >&6
     		fi
     	fi
     
    -	echo "$as_me:17968: checking for wide-character functions" >&5
    +	echo "$as_me:18032: checking for wide-character functions" >&5
     echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
     if test "${cf_cv_widechar_funcs+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
     
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 17975 "configure"
    +#line 18039 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -17989,16 +18053,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:17992: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:18056: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:17995: \$? = $ac_status" >&5
    +  echo "$as_me:18059: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:17998: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18062: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18001: \$? = $ac_status" >&5
    +  echo "$as_me:18065: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_widechar_funcs=yes
     else
    @@ -18009,7 +18073,7 @@ fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     
     fi
    -echo "$as_me:18012: result: $cf_cv_widechar_funcs" >&5
    +echo "$as_me:18076: result: $cf_cv_widechar_funcs" >&5
     echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
     	if test "$cf_cv_widechar_funcs" != no ; then
     
    @@ -18030,14 +18094,14 @@ EOF
     
     fi
     
    -echo "$as_me:18033: checking if $cf_cv_screen library uses pthreads" >&5
    +echo "$as_me:18097: checking if $cf_cv_screen library uses pthreads" >&5
     echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
     if test "${cf_cv_use_pthreads+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 18040 "configure"
    +#line 18104 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -18055,16 +18119,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:18058: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:18122: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:18061: \$? = $ac_status" >&5
    +  echo "$as_me:18125: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:18064: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18128: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18067: \$? = $ac_status" >&5
    +  echo "$as_me:18131: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_use_pthreads=yes
     else
    @@ -18075,20 +18139,20 @@ fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     
     fi
    -echo "$as_me:18078: result: $cf_cv_use_pthreads" >&5
    +echo "$as_me:18142: result: $cf_cv_use_pthreads" >&5
     echo "${ECHO_T}$cf_cv_use_pthreads" >&6
     test $cf_cv_use_pthreads = yes && cat >>confdefs.h <<\EOF
     #define USE_PTHREADS 1
     EOF
     
    -echo "$as_me:18084: checking if sys/time.h works with sys/select.h" >&5
    +echo "$as_me:18148: checking if sys/time.h works with sys/select.h" >&5
     echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
     if test "${cf_cv_sys_time_select+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 18091 "configure"
    +#line 18155 "configure"
     #include "confdefs.h"
     
     #include 
    @@ -18108,16 +18172,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:18111: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:18175: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:18114: \$? = $ac_status" >&5
    +  echo "$as_me:18178: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:18117: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18181: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18120: \$? = $ac_status" >&5
    +  echo "$as_me:18184: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_sys_time_select=yes
     else
    @@ -18129,7 +18193,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
     
     fi
     
    -echo "$as_me:18132: result: $cf_cv_sys_time_select" >&5
    +echo "$as_me:18196: result: $cf_cv_sys_time_select" >&5
     echo "${ECHO_T}$cf_cv_sys_time_select" >&6
     test "$cf_cv_sys_time_select" = yes &&
     cat >>confdefs.h <<\EOF
    @@ -18138,7 +18202,7 @@ EOF
     
     # special check for test/ditto.c
     
    -echo "$as_me:18141: checking for openpty in -lutil" >&5
    +echo "$as_me:18205: checking for openpty in -lutil" >&5
     echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
     if test "${ac_cv_lib_util_openpty+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -18146,7 +18210,7 @@ else
       ac_check_lib_save_LIBS=$LIBS
     LIBS="-lutil  $LIBS"
     cat >conftest.$ac_ext <<_ACEOF
    -#line 18149 "configure"
    +#line 18213 "configure"
     #include "confdefs.h"
     
     /* Override any gcc2 internal prototype to avoid an error.  */
    @@ -18165,16 +18229,16 @@ openpty ();
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:18168: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:18232: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:18171: \$? = $ac_status" >&5
    +  echo "$as_me:18235: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:18174: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18238: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18177: \$? = $ac_status" >&5
    +  echo "$as_me:18241: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       ac_cv_lib_util_openpty=yes
     else
    @@ -18185,7 +18249,7 @@ fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     LIBS=$ac_check_lib_save_LIBS
     fi
    -echo "$as_me:18188: result: $ac_cv_lib_util_openpty" >&5
    +echo "$as_me:18252: result: $ac_cv_lib_util_openpty" >&5
     echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
     if test $ac_cv_lib_util_openpty = yes; then
       cf_cv_lib_util=yes
    @@ -18193,7 +18257,7 @@ else
       cf_cv_lib_util=no
     fi
     
    -echo "$as_me:18196: checking for openpty header" >&5
    +echo "$as_me:18260: checking for openpty header" >&5
     echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
     if test "${cf_cv_func_openpty+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -18220,7 +18284,7 @@ LIBS="$cf_add_libs"
     	for cf_header in pty.h libutil.h util.h
     	do
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 18223 "configure"
    +#line 18287 "configure"
     #include "confdefs.h"
     
     #include <$cf_header>
    @@ -18237,16 +18301,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:18240: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:18304: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:18243: \$? = $ac_status" >&5
    +  echo "$as_me:18307: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:18246: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18310: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18249: \$? = $ac_status" >&5
    +  echo "$as_me:18313: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
     
     		cf_cv_func_openpty=$cf_header
    @@ -18264,7 +18328,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     	LIBS="$cf_save_LIBS"
     
     fi
    -echo "$as_me:18267: result: $cf_cv_func_openpty" >&5
    +echo "$as_me:18331: result: $cf_cv_func_openpty" >&5
     echo "${ECHO_T}$cf_cv_func_openpty" >&6
     
     if test "$cf_cv_func_openpty" != no ; then
    @@ -18298,7 +18362,7 @@ TEST_LIBS="$cf_add_libs"
     	fi
     fi
     
    -echo "$as_me:18301: checking for function curses_version" >&5
    +echo "$as_me:18365: checking for function curses_version" >&5
     echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
     if test "${cf_cv_func_curses_version+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -18308,7 +18372,7 @@ if test "$cross_compiling" = yes; then
       cf_cv_func_curses_version=unknown
     else
       cat >conftest.$ac_ext <<_ACEOF
    -#line 18311 "configure"
    +#line 18375 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -18321,15 +18385,15 @@ int main(void)
     
     _ACEOF
     rm -f conftest$ac_exeext
    -if { (eval echo "$as_me:18324: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:18388: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:18327: \$? = $ac_status" >&5
    +  echo "$as_me:18391: \$? = $ac_status" >&5
       (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    -  { (eval echo "$as_me:18329: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18393: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18332: \$? = $ac_status" >&5
    +  echo "$as_me:18396: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_func_curses_version=yes
     
    @@ -18344,14 +18408,14 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
     fi
     rm -f core
     fi
    -echo "$as_me:18347: result: $cf_cv_func_curses_version" >&5
    +echo "$as_me:18411: result: $cf_cv_func_curses_version" >&5
     echo "${ECHO_T}$cf_cv_func_curses_version" >&6
     test "$cf_cv_func_curses_version" = yes &&
     cat >>confdefs.h <<\EOF
     #define HAVE_CURSES_VERSION 1
     EOF
     
    -echo "$as_me:18354: checking for alternate character set array" >&5
    +echo "$as_me:18418: checking for alternate character set array" >&5
     echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
     if test "${cf_cv_curses_acs_map+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -18361,7 +18425,7 @@ cf_cv_curses_acs_map=unknown
     for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
     do
     cat >conftest.$ac_ext <<_ACEOF
    -#line 18364 "configure"
    +#line 18428 "configure"
     #include "confdefs.h"
     
     #include <${cf_cv_ncurses_header:-curses.h}>
    @@ -18377,16 +18441,16 @@ $name['k'] = ACS_PLUS
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:18380: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:18444: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:18383: \$? = $ac_status" >&5
    +  echo "$as_me:18447: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:18386: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18450: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18389: \$? = $ac_status" >&5
    +  echo "$as_me:18453: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_curses_acs_map=$name; break
     else
    @@ -18397,7 +18461,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     done
     
     fi
    -echo "$as_me:18400: result: $cf_cv_curses_acs_map" >&5
    +echo "$as_me:18464: result: $cf_cv_curses_acs_map" >&5
     echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
     
     test "$cf_cv_curses_acs_map" != unknown &&
    @@ -18407,7 +18471,7 @@ EOF
     
     if test "$cf_enable_widec" = yes; then
     
    -echo "$as_me:18410: checking for wide alternate character set array" >&5
    +echo "$as_me:18474: checking for wide alternate character set array" >&5
     echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
     if test "${cf_cv_curses_wacs_map+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -18417,7 +18481,7 @@ else
     	for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
     	do
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 18420 "configure"
    +#line 18484 "configure"
     #include "confdefs.h"
     
     #ifndef _XOPEN_SOURCE_EXTENDED
    @@ -18433,16 +18497,16 @@ void *foo = &($name['k'])
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:18436: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:18500: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:18439: \$? = $ac_status" >&5
    +  echo "$as_me:18503: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:18442: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18506: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18445: \$? = $ac_status" >&5
    +  echo "$as_me:18509: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_curses_wacs_map=$name
     	 break
    @@ -18453,7 +18517,7 @@ fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     	done
     fi
    -echo "$as_me:18456: result: $cf_cv_curses_wacs_map" >&5
    +echo "$as_me:18520: result: $cf_cv_curses_wacs_map" >&5
     echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
     
     test "$cf_cv_curses_wacs_map" != unknown &&
    @@ -18461,7 +18525,7 @@ cat >>confdefs.h <&5
    +echo "$as_me:18528: checking for wide alternate character constants" >&5
     echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
     if test "${cf_cv_curses_wacs_symbols+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -18471,7 +18535,7 @@ cf_cv_curses_wacs_symbols=no
     if test "$cf_cv_curses_wacs_map" != unknown
     then
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 18474 "configure"
    +#line 18538 "configure"
     #include "confdefs.h"
     
     #ifndef _XOPEN_SOURCE_EXTENDED
    @@ -18488,16 +18552,16 @@ cchar_t *foo = WACS_PLUS;
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:18491: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:18555: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:18494: \$? = $ac_status" >&5
    +  echo "$as_me:18558: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:18497: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18561: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18500: \$? = $ac_status" >&5
    +  echo "$as_me:18564: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_curses_wacs_symbols=yes
     else
    @@ -18507,7 +18571,7 @@ fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     else
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 18510 "configure"
    +#line 18574 "configure"
     #include "confdefs.h"
     
     #ifndef _XOPEN_SOURCE_EXTENDED
    @@ -18523,16 +18587,16 @@ cchar_t *foo = WACS_PLUS
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:18526: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:18590: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:18529: \$? = $ac_status" >&5
    +  echo "$as_me:18593: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:18532: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18596: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18535: \$? = $ac_status" >&5
    +  echo "$as_me:18599: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_curses_wacs_symbols=yes
     else
    @@ -18543,7 +18607,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     fi
     
     fi
    -echo "$as_me:18546: result: $cf_cv_curses_wacs_symbols" >&5
    +echo "$as_me:18610: result: $cf_cv_curses_wacs_symbols" >&5
     echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
     
     test "$cf_cv_curses_wacs_symbols" != no &&
    @@ -18553,10 +18617,10 @@ EOF
     
     fi
     
    -echo "$as_me:18556: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
    +echo "$as_me:18620: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
     echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
     cat >conftest.$ac_ext <<_ACEOF
    -#line 18559 "configure"
    +#line 18623 "configure"
     #include "confdefs.h"
     
     #ifndef _XOPEN_SOURCE_EXTENDED
    @@ -18574,16 +18638,16 @@ attr_t foo
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:18577: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:18641: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:18580: \$? = $ac_status" >&5
    +  echo "$as_me:18644: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:18583: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18647: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18586: \$? = $ac_status" >&5
    +  echo "$as_me:18650: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     else
    @@ -18592,7 +18656,7 @@ cat conftest.$ac_ext >&5
     cf_result=no
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
    -echo "$as_me:18595: result: $cf_result" >&5
    +echo "$as_me:18659: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     if test $cf_result = yes ; then
     
    @@ -18613,14 +18677,14 @@ fi
     if test "$cf_enable_widec" = yes; then
     
     # This is needed on Tru64 5.0 to declare mbstate_t
    -echo "$as_me:18616: checking if we must include wchar.h to declare mbstate_t" >&5
    +echo "$as_me:18680: checking if we must include wchar.h to declare mbstate_t" >&5
     echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
     if test "${cf_cv_mbstate_t+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 18623 "configure"
    +#line 18687 "configure"
     #include "confdefs.h"
     
     #include 
    @@ -18638,23 +18702,23 @@ mbstate_t state
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:18641: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:18705: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:18644: \$? = $ac_status" >&5
    +  echo "$as_me:18708: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:18647: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18711: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18650: \$? = $ac_status" >&5
    +  echo "$as_me:18714: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_mbstate_t=no
     else
       echo "$as_me: failed program was:" >&5
     cat conftest.$ac_ext >&5
     cat >conftest.$ac_ext <<_ACEOF
    -#line 18657 "configure"
    +#line 18721 "configure"
     #include "confdefs.h"
     
     #include 
    @@ -18673,16 +18737,16 @@ mbstate_t value
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:18676: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:18740: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:18679: \$? = $ac_status" >&5
    +  echo "$as_me:18743: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:18682: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18746: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18685: \$? = $ac_status" >&5
    +  echo "$as_me:18749: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_mbstate_t=yes
     else
    @@ -18694,7 +18758,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
     fi
    -echo "$as_me:18697: result: $cf_cv_mbstate_t" >&5
    +echo "$as_me:18761: result: $cf_cv_mbstate_t" >&5
     echo "${ECHO_T}$cf_cv_mbstate_t" >&6
     
     if test "$cf_cv_mbstate_t" = yes ; then
    @@ -18717,14 +18781,14 @@ if test "$cf_cv_mbstate_t" != unknown ; then
     fi
     
     # This is needed on Tru64 5.0 to declare wchar_t
    -echo "$as_me:18720: checking if we must include wchar.h to declare wchar_t" >&5
    +echo "$as_me:18784: checking if we must include wchar.h to declare wchar_t" >&5
     echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
     if test "${cf_cv_wchar_t+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 18727 "configure"
    +#line 18791 "configure"
     #include "confdefs.h"
     
     #include 
    @@ -18742,23 +18806,23 @@ wchar_t state
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:18745: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:18809: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:18748: \$? = $ac_status" >&5
    +  echo "$as_me:18812: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:18751: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18815: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18754: \$? = $ac_status" >&5
    +  echo "$as_me:18818: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_wchar_t=no
     else
       echo "$as_me: failed program was:" >&5
     cat conftest.$ac_ext >&5
     cat >conftest.$ac_ext <<_ACEOF
    -#line 18761 "configure"
    +#line 18825 "configure"
     #include "confdefs.h"
     
     #include 
    @@ -18777,16 +18841,16 @@ wchar_t value
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:18780: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:18844: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:18783: \$? = $ac_status" >&5
    +  echo "$as_me:18847: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:18786: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18850: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18789: \$? = $ac_status" >&5
    +  echo "$as_me:18853: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_wchar_t=yes
     else
    @@ -18798,7 +18862,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
     fi
    -echo "$as_me:18801: result: $cf_cv_wchar_t" >&5
    +echo "$as_me:18865: result: $cf_cv_wchar_t" >&5
     echo "${ECHO_T}$cf_cv_wchar_t" >&6
     
     if test "$cf_cv_wchar_t" = yes ; then
    @@ -18821,14 +18885,14 @@ if test "$cf_cv_wchar_t" != unknown ; then
     fi
     
     # This is needed on Tru64 5.0 to declare wint_t
    -echo "$as_me:18824: checking if we must include wchar.h to declare wint_t" >&5
    +echo "$as_me:18888: checking if we must include wchar.h to declare wint_t" >&5
     echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
     if test "${cf_cv_wint_t+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 18831 "configure"
    +#line 18895 "configure"
     #include "confdefs.h"
     
     #include 
    @@ -18846,23 +18910,23 @@ wint_t state
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:18849: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:18913: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:18852: \$? = $ac_status" >&5
    +  echo "$as_me:18916: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:18855: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18919: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18858: \$? = $ac_status" >&5
    +  echo "$as_me:18922: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_wint_t=no
     else
       echo "$as_me: failed program was:" >&5
     cat conftest.$ac_ext >&5
     cat >conftest.$ac_ext <<_ACEOF
    -#line 18865 "configure"
    +#line 18929 "configure"
     #include "confdefs.h"
     
     #include 
    @@ -18881,16 +18945,16 @@ wint_t value
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:18884: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:18948: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:18887: \$? = $ac_status" >&5
    +  echo "$as_me:18951: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:18890: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:18954: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18893: \$? = $ac_status" >&5
    +  echo "$as_me:18957: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_cv_wint_t=yes
     else
    @@ -18902,7 +18966,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
     fi
    -echo "$as_me:18905: result: $cf_cv_wint_t" >&5
    +echo "$as_me:18969: result: $cf_cv_wint_t" >&5
     echo "${ECHO_T}$cf_cv_wint_t" >&6
     
     if test "$cf_cv_wint_t" = yes ; then
    @@ -18926,10 +18990,10 @@ fi
     
     	if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
     
    -echo "$as_me:18929: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
    +echo "$as_me:18993: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
     echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
     cat >conftest.$ac_ext <<_ACEOF
    -#line 18932 "configure"
    +#line 18996 "configure"
     #include "confdefs.h"
     
     #ifndef _XOPEN_SOURCE_EXTENDED
    @@ -18947,16 +19011,16 @@ mbstate_t foo
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:18950: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:19014: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:18953: \$? = $ac_status" >&5
    +  echo "$as_me:19017: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:18956: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:19020: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:18959: \$? = $ac_status" >&5
    +  echo "$as_me:19023: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     else
    @@ -18965,7 +19029,7 @@ cat conftest.$ac_ext >&5
     cf_result=no
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
    -echo "$as_me:18968: result: $cf_result" >&5
    +echo "$as_me:19032: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     if test $cf_result = yes ; then
     
    @@ -18987,10 +19051,10 @@ fi
     
     	if test "$NCURSES_OK_WCHAR_T" = 0 ; then
     
    -echo "$as_me:18990: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
    +echo "$as_me:19054: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
     echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
     cat >conftest.$ac_ext <<_ACEOF
    -#line 18993 "configure"
    +#line 19057 "configure"
     #include "confdefs.h"
     
     #ifndef _XOPEN_SOURCE_EXTENDED
    @@ -19008,16 +19072,16 @@ wchar_t foo
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:19011: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:19075: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:19014: \$? = $ac_status" >&5
    +  echo "$as_me:19078: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:19017: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:19081: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:19020: \$? = $ac_status" >&5
    +  echo "$as_me:19084: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     else
    @@ -19026,7 +19090,7 @@ cat conftest.$ac_ext >&5
     cf_result=no
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
    -echo "$as_me:19029: result: $cf_result" >&5
    +echo "$as_me:19093: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     if test $cf_result = yes ; then
     
    @@ -19048,10 +19112,10 @@ fi
     
     	if test "$NCURSES_OK_WINT_T" = 0 ; then
     
    -echo "$as_me:19051: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
    +echo "$as_me:19115: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
     echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
     cat >conftest.$ac_ext <<_ACEOF
    -#line 19054 "configure"
    +#line 19118 "configure"
     #include "confdefs.h"
     
     #ifndef _XOPEN_SOURCE_EXTENDED
    @@ -19069,16 +19133,16 @@ wint_t foo
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:19072: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:19136: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:19075: \$? = $ac_status" >&5
    +  echo "$as_me:19139: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:19078: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:19142: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:19081: \$? = $ac_status" >&5
    +  echo "$as_me:19145: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     else
    @@ -19087,7 +19151,7 @@ cat conftest.$ac_ext >&5
     cf_result=no
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
    -echo "$as_me:19090: result: $cf_result" >&5
    +echo "$as_me:19154: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     if test $cf_result = yes ; then
     
    @@ -19115,11 +19179,11 @@ boolnames \
     boolfnames \
     ttytype
     do
    -echo "$as_me:19118: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
    +echo "$as_me:19182: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
     echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 19122 "configure"
    +#line 19186 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -19147,16 +19211,16 @@ void *foo = &($cf_data)
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:19150: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:19214: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:19153: \$? = $ac_status" >&5
    +  echo "$as_me:19217: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:19156: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:19220: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:19159: \$? = $ac_status" >&5
    +  echo "$as_me:19223: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     
    @@ -19166,7 +19230,7 @@ cat conftest.$ac_ext >&5
     cf_result=no
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
    -echo "$as_me:19169: result: $cf_result" >&5
    +echo "$as_me:19233: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     
     if test $cf_result = yes ; then
    @@ -19178,14 +19242,14 @@ cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./
     EOF
     
     else
    -	echo "$as_me:19181: checking for data $cf_data in library" >&5
    +	echo "$as_me:19245: checking for data $cf_data in library" >&5
     echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
     	# BSD linkers insist on making weak linkage, but resolve at runtime.
     	if test "$cross_compiling" = yes; then
     
     	# cross-compiling
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 19188 "configure"
    +#line 19252 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -19218,16 +19282,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:19221: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:19285: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:19224: \$? = $ac_status" >&5
    +  echo "$as_me:19288: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:19227: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:19291: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:19230: \$? = $ac_status" >&5
    +  echo "$as_me:19294: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     else
    @@ -19239,7 +19303,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     
     else
       cat >conftest.$ac_ext <<_ACEOF
    -#line 19242 "configure"
    +#line 19306 "configure"
     #include "confdefs.h"
     
     #ifdef HAVE_XCURSES
    @@ -19265,15 +19329,15 @@ int main(void)
     }
     _ACEOF
     rm -f conftest$ac_exeext
    -if { (eval echo "$as_me:19268: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:19332: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:19271: \$? = $ac_status" >&5
    +  echo "$as_me:19335: \$? = $ac_status" >&5
       (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    -  { (eval echo "$as_me:19273: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:19337: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:19276: \$? = $ac_status" >&5
    +  echo "$as_me:19340: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_result=yes
     
    @@ -19285,7 +19349,7 @@ cf_result=no
     fi
     rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
     fi
    -	echo "$as_me:19288: result: $cf_result" >&5
    +	echo "$as_me:19352: result: $cf_result" >&5
     echo "${ECHO_T}$cf_result" >&6
     	if test $cf_result = yes ; then
     
    @@ -19302,7 +19366,7 @@ done
     
     if ( test "$GCC" = yes || test "$GXX" = yes )
     then
    -echo "$as_me:19305: checking if you want to turn on gcc warnings" >&5
    +echo "$as_me:19369: checking if you want to turn on gcc warnings" >&5
     echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
     
     # Check whether --enable-warnings or --disable-warnings was given.
    @@ -19319,7 +19383,7 @@ else
     	with_warnings=no
     
     fi;
    -echo "$as_me:19322: result: $with_warnings" >&5
    +echo "$as_me:19386: result: $with_warnings" >&5
     echo "${ECHO_T}$with_warnings" >&6
     if test "$with_warnings" = "yes"
     then
    @@ -19342,10 +19406,10 @@ cat > conftest.i <&5
    +	{ echo "$as_me:19409: checking for $CC __attribute__ directives..." >&5
     echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
     cat > conftest.$ac_ext <&5
    +		if { (eval echo "$as_me:19461: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:19400: \$? = $ac_status" >&5
    +  echo "$as_me:19464: \$? = $ac_status" >&5
       (exit $ac_status); }; then
    -			test -n "$verbose" && echo "$as_me:19402: result: ... $cf_attribute" >&5
    +			test -n "$verbose" && echo "$as_me:19466: result: ... $cf_attribute" >&5
     echo "${ECHO_T}... $cf_attribute" >&6
     			cat conftest.h >>confdefs.h
     			case $cf_attribute in
    @@ -19463,12 +19527,12 @@ INTEL_COMPILER=no
     if test "$GCC" = yes ; then
     	case $host_os in
     	(linux*|gnu*)
    -		echo "$as_me:19466: checking if this is really Intel C compiler" >&5
    +		echo "$as_me:19530: checking if this is really Intel C compiler" >&5
     echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
     		cf_save_CFLAGS="$CFLAGS"
     		CFLAGS="$CFLAGS -no-gcc"
     		cat >conftest.$ac_ext <<_ACEOF
    -#line 19471 "configure"
    +#line 19535 "configure"
     #include "confdefs.h"
     
     int
    @@ -19485,16 +19549,16 @@ make an error
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:19488: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:19552: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:19491: \$? = $ac_status" >&5
    +  echo "$as_me:19555: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:19494: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:19558: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:19497: \$? = $ac_status" >&5
    +  echo "$as_me:19561: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       INTEL_COMPILER=yes
     cf_save_CFLAGS="$cf_save_CFLAGS -we147"
    @@ -19505,7 +19569,7 @@ cat conftest.$ac_ext >&5
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
     		CFLAGS="$cf_save_CFLAGS"
    -		echo "$as_me:19508: result: $INTEL_COMPILER" >&5
    +		echo "$as_me:19572: result: $INTEL_COMPILER" >&5
     echo "${ECHO_T}$INTEL_COMPILER" >&6
     		;;
     	esac
    @@ -19514,12 +19578,12 @@ fi
     CLANG_COMPILER=no
     
     if test "$GCC" = yes ; then
    -	echo "$as_me:19517: checking if this is really Clang C compiler" >&5
    +	echo "$as_me:19581: checking if this is really Clang C compiler" >&5
     echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
     	cf_save_CFLAGS="$CFLAGS"
     	CFLAGS="$CFLAGS -Qunused-arguments"
     	cat >conftest.$ac_ext <<_ACEOF
    -#line 19522 "configure"
    +#line 19586 "configure"
     #include "confdefs.h"
     
     int
    @@ -19536,16 +19600,16 @@ make an error
     }
     _ACEOF
     rm -f conftest.$ac_objext
    -if { (eval echo "$as_me:19539: \"$ac_compile\"") >&5
    +if { (eval echo "$as_me:19603: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:19542: \$? = $ac_status" >&5
    +  echo "$as_me:19606: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest.$ac_objext'
    -  { (eval echo "$as_me:19545: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:19609: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:19548: \$? = $ac_status" >&5
    +  echo "$as_me:19612: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       CLANG_COMPILER=yes
     cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
    @@ -19556,12 +19620,12 @@ cat conftest.$ac_ext >&5
     fi
     rm -f conftest.$ac_objext conftest.$ac_ext
     	CFLAGS="$cf_save_CFLAGS"
    -	echo "$as_me:19559: result: $CLANG_COMPILER" >&5
    +	echo "$as_me:19623: result: $CLANG_COMPILER" >&5
     echo "${ECHO_T}$CLANG_COMPILER" >&6
     fi
     
     cat > conftest.$ac_ext <&5
    +	{ echo "$as_me:19645: checking for $CC warning options..." >&5
     echo "$as_me: checking for $CC warning options..." >&6;}
     	cf_save_CFLAGS="$CFLAGS"
     	EXTRA_CFLAGS="-Wall"
    @@ -19594,12 +19658,12 @@ echo "$as_me: checking for $CC warning options..." >&6;}
     		wd981
     	do
     		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
    -		if { (eval echo "$as_me:19597: \"$ac_compile\"") >&5
    +		if { (eval echo "$as_me:19661: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:19600: \$? = $ac_status" >&5
    +  echo "$as_me:19664: \$? = $ac_status" >&5
       (exit $ac_status); }; then
    -			test -n "$verbose" && echo "$as_me:19602: result: ... -$cf_opt" >&5
    +			test -n "$verbose" && echo "$as_me:19666: result: ... -$cf_opt" >&5
     echo "${ECHO_T}... -$cf_opt" >&6
     			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
     		fi
    @@ -19608,7 +19672,7 @@ echo "${ECHO_T}... -$cf_opt" >&6
     
     elif test "$GCC" = yes
     then
    -	{ echo "$as_me:19611: checking for $CC warning options..." >&5
    +	{ echo "$as_me:19675: checking for $CC warning options..." >&5
     echo "$as_me: checking for $CC warning options..." >&6;}
     	cf_save_CFLAGS="$CFLAGS"
     	EXTRA_CFLAGS=
    @@ -19632,12 +19696,12 @@ echo "$as_me: checking for $CC warning options..." >&6;}
     		Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
     	do
     		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
    -		if { (eval echo "$as_me:19635: \"$ac_compile\"") >&5
    +		if { (eval echo "$as_me:19699: \"$ac_compile\"") >&5
       (eval $ac_compile) 2>&5
       ac_status=$?
    -  echo "$as_me:19638: \$? = $ac_status" >&5
    +  echo "$as_me:19702: \$? = $ac_status" >&5
       (exit $ac_status); }; then
    -			test -n "$verbose" && echo "$as_me:19640: result: ... -$cf_opt" >&5
    +			test -n "$verbose" && echo "$as_me:19704: result: ... -$cf_opt" >&5
     echo "${ECHO_T}... -$cf_opt" >&6
     			case $cf_opt in
     			(Wcast-qual)
    @@ -19651,7 +19715,7 @@ echo "${ECHO_T}... -$cf_opt" >&6
     				([34].*)
     					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
     
    -echo "${as_me:-configure}:19654: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
    +echo "${as_me:-configure}:19718: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
     
     					continue;;
     				esac
    @@ -19661,7 +19725,7 @@ echo "${as_me:-configure}:19654: testing feature is broken in gcc $GCC_VERSION .
     				([12].*)
     					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
     
    -echo "${as_me:-configure}:19664: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
    +echo "${as_me:-configure}:19728: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
     
     					continue;;
     				esac
    @@ -19677,7 +19741,7 @@ rm -rf conftest*
     fi
     fi
     
    -echo "$as_me:19680: checking if you want to use dmalloc for testing" >&5
    +echo "$as_me:19744: checking if you want to use dmalloc for testing" >&5
     echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
     
     # Check whether --with-dmalloc or --without-dmalloc was given.
    @@ -19694,7 +19758,7 @@ EOF
     else
       with_dmalloc=
     fi;
    -echo "$as_me:19697: result: ${with_dmalloc:-no}" >&5
    +echo "$as_me:19761: result: ${with_dmalloc:-no}" >&5
     echo "${ECHO_T}${with_dmalloc:-no}" >&6
     
     case .$with_cflags in
    @@ -19808,23 +19872,23 @@ fi
     esac
     
     if test "$with_dmalloc" = yes ; then
    -	echo "$as_me:19811: checking for dmalloc.h" >&5
    +	echo "$as_me:19875: checking for dmalloc.h" >&5
     echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
     if test "${ac_cv_header_dmalloc_h+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
       cat >conftest.$ac_ext <<_ACEOF
    -#line 19817 "configure"
    +#line 19881 "configure"
     #include "confdefs.h"
     #include 
     _ACEOF
    -if { (eval echo "$as_me:19821: \"$ac_cpp conftest.$ac_ext\"") >&5
    +if { (eval echo "$as_me:19885: \"$ac_cpp conftest.$ac_ext\"") >&5
       (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
       ac_status=$?
       egrep -v '^ *\+' conftest.er1 >conftest.err
       rm -f conftest.er1
       cat conftest.err >&5
    -  echo "$as_me:19827: \$? = $ac_status" >&5
    +  echo "$as_me:19891: \$? = $ac_status" >&5
       (exit $ac_status); } >/dev/null; then
       if test -s conftest.err; then
         ac_cpp_err=$ac_c_preproc_warn_flag
    @@ -19843,11 +19907,11 @@ else
     fi
     rm -f conftest.err conftest.$ac_ext
     fi
    -echo "$as_me:19846: result: $ac_cv_header_dmalloc_h" >&5
    +echo "$as_me:19910: result: $ac_cv_header_dmalloc_h" >&5
     echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
     if test $ac_cv_header_dmalloc_h = yes; then
     
    -echo "$as_me:19850: checking for dmalloc_debug in -ldmalloc" >&5
    +echo "$as_me:19914: checking for dmalloc_debug in -ldmalloc" >&5
     echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
     if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -19855,7 +19919,7 @@ else
       ac_check_lib_save_LIBS=$LIBS
     LIBS="-ldmalloc  $LIBS"
     cat >conftest.$ac_ext <<_ACEOF
    -#line 19858 "configure"
    +#line 19922 "configure"
     #include "confdefs.h"
     
     /* Override any gcc2 internal prototype to avoid an error.  */
    @@ -19874,16 +19938,16 @@ dmalloc_debug ();
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:19877: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:19941: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:19880: \$? = $ac_status" >&5
    +  echo "$as_me:19944: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:19883: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:19947: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:19886: \$? = $ac_status" >&5
    +  echo "$as_me:19950: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       ac_cv_lib_dmalloc_dmalloc_debug=yes
     else
    @@ -19894,7 +19958,7 @@ fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     LIBS=$ac_check_lib_save_LIBS
     fi
    -echo "$as_me:19897: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
    +echo "$as_me:19961: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
     echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
     if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
       cat >>confdefs.h <&5
    +echo "$as_me:19976: checking if you want to use dbmalloc for testing" >&5
     echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
     
     # Check whether --with-dbmalloc or --without-dbmalloc was given.
    @@ -19926,7 +19990,7 @@ EOF
     else
       with_dbmalloc=
     fi;
    -echo "$as_me:19929: result: ${with_dbmalloc:-no}" >&5
    +echo "$as_me:19993: result: ${with_dbmalloc:-no}" >&5
     echo "${ECHO_T}${with_dbmalloc:-no}" >&6
     
     case .$with_cflags in
    @@ -20040,23 +20104,23 @@ fi
     esac
     
     if test "$with_dbmalloc" = yes ; then
    -	echo "$as_me:20043: checking for dbmalloc.h" >&5
    +	echo "$as_me:20107: checking for dbmalloc.h" >&5
     echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
     if test "${ac_cv_header_dbmalloc_h+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
     else
       cat >conftest.$ac_ext <<_ACEOF
    -#line 20049 "configure"
    +#line 20113 "configure"
     #include "confdefs.h"
     #include 
     _ACEOF
    -if { (eval echo "$as_me:20053: \"$ac_cpp conftest.$ac_ext\"") >&5
    +if { (eval echo "$as_me:20117: \"$ac_cpp conftest.$ac_ext\"") >&5
       (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
       ac_status=$?
       egrep -v '^ *\+' conftest.er1 >conftest.err
       rm -f conftest.er1
       cat conftest.err >&5
    -  echo "$as_me:20059: \$? = $ac_status" >&5
    +  echo "$as_me:20123: \$? = $ac_status" >&5
       (exit $ac_status); } >/dev/null; then
       if test -s conftest.err; then
         ac_cpp_err=$ac_c_preproc_warn_flag
    @@ -20075,11 +20139,11 @@ else
     fi
     rm -f conftest.err conftest.$ac_ext
     fi
    -echo "$as_me:20078: result: $ac_cv_header_dbmalloc_h" >&5
    +echo "$as_me:20142: result: $ac_cv_header_dbmalloc_h" >&5
     echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
     if test $ac_cv_header_dbmalloc_h = yes; then
     
    -echo "$as_me:20082: checking for debug_malloc in -ldbmalloc" >&5
    +echo "$as_me:20146: checking for debug_malloc in -ldbmalloc" >&5
     echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
     if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -20087,7 +20151,7 @@ else
       ac_check_lib_save_LIBS=$LIBS
     LIBS="-ldbmalloc  $LIBS"
     cat >conftest.$ac_ext <<_ACEOF
    -#line 20090 "configure"
    +#line 20154 "configure"
     #include "confdefs.h"
     
     /* Override any gcc2 internal prototype to avoid an error.  */
    @@ -20106,16 +20170,16 @@ debug_malloc ();
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:20109: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:20173: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:20112: \$? = $ac_status" >&5
    +  echo "$as_me:20176: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:20115: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:20179: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:20118: \$? = $ac_status" >&5
    +  echo "$as_me:20182: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       ac_cv_lib_dbmalloc_debug_malloc=yes
     else
    @@ -20126,7 +20190,7 @@ fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     LIBS=$ac_check_lib_save_LIBS
     fi
    -echo "$as_me:20129: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
    +echo "$as_me:20193: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
     echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
     if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
       cat >>confdefs.h <&5
    +echo "$as_me:20208: checking if you want to use valgrind for testing" >&5
     echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
     
     # Check whether --with-valgrind or --without-valgrind was given.
    @@ -20158,7 +20222,7 @@ EOF
     else
       with_valgrind=
     fi;
    -echo "$as_me:20161: result: ${with_valgrind:-no}" >&5
    +echo "$as_me:20225: result: ${with_valgrind:-no}" >&5
     echo "${ECHO_T}${with_valgrind:-no}" >&6
     
     case .$with_cflags in
    @@ -20271,7 +20335,7 @@ fi
     	;;
     esac
     
    -echo "$as_me:20274: checking if you want to perform memory-leak testing" >&5
    +echo "$as_me:20338: checking if you want to perform memory-leak testing" >&5
     echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
     
     # Check whether --enable-leaks or --disable-leaks was given.
    @@ -20281,7 +20345,7 @@ if test "${enable_leaks+set}" = set; then
     else
       : ${with_no_leaks:=no}
     fi;
    -echo "$as_me:20284: result: $with_no_leaks" >&5
    +echo "$as_me:20348: result: $with_no_leaks" >&5
     echo "${ECHO_T}$with_no_leaks" >&6
     
     if test "$with_no_leaks" = yes ; then
    @@ -20299,7 +20363,7 @@ fi
     LD_RPATH_OPT=
     if test "x$cf_cv_enable_rpath" != xno
     then
    -	echo "$as_me:20302: checking for an rpath option" >&5
    +	echo "$as_me:20366: checking for an rpath option" >&5
     echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
     	case $cf_cv_system_name in
     	(irix*)
    @@ -20330,12 +20394,12 @@ echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
     	(*)
     		;;
     	esac
    -	echo "$as_me:20333: result: $LD_RPATH_OPT" >&5
    +	echo "$as_me:20397: result: $LD_RPATH_OPT" >&5
     echo "${ECHO_T}$LD_RPATH_OPT" >&6
     
     	case "x$LD_RPATH_OPT" in
     	(x-R*)
    -		echo "$as_me:20338: checking if we need a space after rpath option" >&5
    +		echo "$as_me:20402: checking if we need a space after rpath option" >&5
     echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
     		cf_save_LIBS="$LIBS"
     
    @@ -20356,7 +20420,7 @@ done
     LIBS="$cf_add_libs"
     
     		cat >conftest.$ac_ext <<_ACEOF
    -#line 20359 "configure"
    +#line 20423 "configure"
     #include "confdefs.h"
     
     int
    @@ -20368,16 +20432,16 @@ main (void)
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:20371: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:20435: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:20374: \$? = $ac_status" >&5
    +  echo "$as_me:20438: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:20377: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:20441: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:20380: \$? = $ac_status" >&5
    +  echo "$as_me:20444: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_rpath_space=no
     else
    @@ -20387,14 +20451,14 @@ cf_rpath_space=yes
     fi
     rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     		LIBS="$cf_save_LIBS"
    -		echo "$as_me:20390: result: $cf_rpath_space" >&5
    +		echo "$as_me:20454: result: $cf_rpath_space" >&5
     echo "${ECHO_T}$cf_rpath_space" >&6
     		test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
     		;;
     	esac
     fi
     
    -echo "$as_me:20397: checking if rpath-hack should be disabled" >&5
    +echo "$as_me:20461: checking if rpath-hack should be disabled" >&5
     echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
     
     # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
    @@ -20411,21 +20475,21 @@ else
     	cf_disable_rpath_hack=no
     
     fi;
    -echo "$as_me:20414: result: $cf_disable_rpath_hack" >&5
    +echo "$as_me:20478: result: $cf_disable_rpath_hack" >&5
     echo "${ECHO_T}$cf_disable_rpath_hack" >&6
     if test "$cf_disable_rpath_hack" = no ; then
     
    -echo "$as_me:20418: checking for updated LDFLAGS" >&5
    +echo "$as_me:20482: checking for updated LDFLAGS" >&5
     echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
     if test -n "$LD_RPATH_OPT" ; then
    -	echo "$as_me:20421: result: maybe" >&5
    +	echo "$as_me:20485: result: maybe" >&5
     echo "${ECHO_T}maybe" >&6
     
     	for ac_prog in ldd
     do
       # Extract the first word of "$ac_prog", so it can be a program name with args.
     set dummy $ac_prog; ac_word=$2
    -echo "$as_me:20428: checking for $ac_word" >&5
    +echo "$as_me:20492: checking for $ac_word" >&5
     echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
     if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
       echo $ECHO_N "(cached) $ECHO_C" >&6
    @@ -20440,7 +20504,7 @@ for ac_dir in $ac_dummy; do
       test -z "$ac_dir" && ac_dir=.
       $as_executable_p "$ac_dir/$ac_word" || continue
     ac_cv_prog_cf_ldd_prog="$ac_prog"
    -echo "$as_me:20443: found $ac_dir/$ac_word" >&5
    +echo "$as_me:20507: found $ac_dir/$ac_word" >&5
     break
     done
     
    @@ -20448,10 +20512,10 @@ fi
     fi
     cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
     if test -n "$cf_ldd_prog"; then
    -  echo "$as_me:20451: result: $cf_ldd_prog" >&5
    +  echo "$as_me:20515: result: $cf_ldd_prog" >&5
     echo "${ECHO_T}$cf_ldd_prog" >&6
     else
    -  echo "$as_me:20454: result: no" >&5
    +  echo "$as_me:20518: result: no" >&5
     echo "${ECHO_T}no" >&6
     fi
     
    @@ -20465,7 +20529,7 @@ test -n "$cf_ldd_prog" || cf_ldd_prog="no"
     		cf_rpath_oops=
     
     cat >conftest.$ac_ext <<_ACEOF
    -#line 20468 "configure"
    +#line 20532 "configure"
     #include "confdefs.h"
     #include 
     int
    @@ -20477,16 +20541,16 @@ printf("Hello");
     }
     _ACEOF
     rm -f conftest.$ac_objext conftest$ac_exeext
    -if { (eval echo "$as_me:20480: \"$ac_link\"") >&5
    +if { (eval echo "$as_me:20544: \"$ac_link\"") >&5
       (eval $ac_link) 2>&5
       ac_status=$?
    -  echo "$as_me:20483: \$? = $ac_status" >&5
    +  echo "$as_me:20547: \$? = $ac_status" >&5
       (exit $ac_status); } &&
              { ac_try='test -s conftest$ac_exeext'
    -  { (eval echo "$as_me:20486: \"$ac_try\"") >&5
    +  { (eval echo "$as_me:20550: \"$ac_try\"") >&5
       (eval $ac_try) 2>&5
       ac_status=$?
    -  echo "$as_me:20489: \$? = $ac_status" >&5
    +  echo "$as_me:20553: \$? = $ac_status" >&5
       (exit $ac_status); }; }; then
       cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
     		 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
    @@ -20514,7 +20578,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
     					then
     						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
     
    -echo "${as_me:-configure}:20517: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
    +echo "${as_me:-configure}:20581: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
     
     						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
     						break
    @@ -20526,11 +20590,11 @@ echo "${as_me:-configure}:20517: testing ...adding -L$cf_rpath_dir/lib to LDFLAG
     
     	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
     
    -echo "${as_me:-configure}:20529: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
    +echo "${as_me:-configure}:20593: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
     
     test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
     
    -echo "${as_me:-configure}:20533: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
    +echo "${as_me:-configure}:20597: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
     
     cf_rpath_dst=
     for cf_rpath_src in $LDFLAGS
    @@ -20567,7 +20631,7 @@ do
     			then
     				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
     
    -echo "${as_me:-configure}:20570: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
    +echo "${as_me:-configure}:20634: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
     
     				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
     			fi
    @@ -20580,11 +20644,11 @@ LDFLAGS=$cf_rpath_dst
     
     test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
     
    -echo "${as_me:-configure}:20583: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
    +echo "${as_me:-configure}:20647: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
     
     test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
     
    -echo "${as_me:-configure}:20587: testing ...checking LIBS $LIBS ..." 1>&5
    +echo "${as_me:-configure}:20651: testing ...checking LIBS $LIBS ..." 1>&5
     
     cf_rpath_dst=
     for cf_rpath_src in $LIBS
    @@ -20621,7 +20685,7 @@ do
     			then
     				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
     
    -echo "${as_me:-configure}:20624: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
    +echo "${as_me:-configure}:20688: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
     
     				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
     			fi
    @@ -20634,14 +20698,14 @@ LIBS=$cf_rpath_dst
     
     test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
     
    -echo "${as_me:-configure}:20637: testing ...checked LIBS $LIBS ..." 1>&5
    +echo "${as_me:-configure}:20701: testing ...checked LIBS $LIBS ..." 1>&5
     
     	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
     
    -echo "${as_me:-configure}:20641: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
    +echo "${as_me:-configure}:20705: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
     
     else
    -	echo "$as_me:20644: result: no" >&5
    +	echo "$as_me:20708: result: no" >&5
     echo "${ECHO_T}no" >&6
     fi
     
    @@ -20731,7 +20795,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:20734: creating $CONFIG_STATUS" >&5
    +{ echo "$as_me:20798: creating $CONFIG_STATUS" >&5
     echo "$as_me: creating $CONFIG_STATUS" >&6;}
     cat >$CONFIG_STATUS <<_ACEOF
     #! $SHELL
    @@ -20907,7 +20971,7 @@ cat >>$CONFIG_STATUS <<\EOF
         echo "$ac_cs_version"; exit 0 ;;
       --he | --h)
         # Conflict between --help and --header
    -    { { echo "$as_me:20910: error: ambiguous option: $1
    +    { { echo "$as_me:20974: 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;}
    @@ -20926,7 +20990,7 @@ Try \`$0 --help' for more information." >&2;}
         ac_need_defaults=false;;
     
       # This is an error.
    -  -*) { { echo "$as_me:20929: error: unrecognized option: $1
    +  -*) { { echo "$as_me:20993: 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;}
    @@ -20976,7 +21040,7 @@ do
       "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
       "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
       "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
    -  *) { { echo "$as_me:20979: error: invalid argument: $ac_config_target" >&5
    +  *) { { echo "$as_me:21043: error: invalid argument: $ac_config_target" >&5
     echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
        { (exit 1); exit 1; }; };;
       esac
    @@ -21272,7 +21336,7 @@ done; }
       esac
     
       if test x"$ac_file" != x-; then
    -    { echo "$as_me:21275: creating $ac_file" >&5
    +    { echo "$as_me:21339: creating $ac_file" >&5
     echo "$as_me: creating $ac_file" >&6;}
         rm -f "$ac_file"
       fi
    @@ -21290,7 +21354,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:21293: error: cannot find input file: $f" >&5
    +         test -f "$f" || { { echo "$as_me:21357: error: cannot find input file: $f" >&5
     echo "$as_me: error: cannot find input file: $f" >&2;}
        { (exit 1); exit 1; }; }
              echo $f;;
    @@ -21303,7 +21367,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
                echo $srcdir/$f
              else
                # /dev/null tree
    -           { { echo "$as_me:21306: error: cannot find input file: $f" >&5
    +           { { echo "$as_me:21370: error: cannot find input file: $f" >&5
     echo "$as_me: error: cannot find input file: $f" >&2;}
        { (exit 1); exit 1; }; }
              fi;;
    @@ -21319,7 +21383,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:21322: WARNING: datarootdir was used implicitly but not set:
    +          { echo "$as_me:21386: 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;}
    @@ -21328,7 +21392,7 @@ $ac_seen" >&2;}
           fi
           ac_seen=`grep '${datarootdir}' $ac_item`
           if test -n "$ac_seen"; then
    -        { echo "$as_me:21331: WARNING: datarootdir was used explicitly but not set:
    +        { echo "$as_me:21395: 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;}
    @@ -21365,7 +21429,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:21368: WARNING: Variable $ac_name is used but was not set:
    +              { echo "$as_me:21432: 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;}
    @@ -21376,7 +21440,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:21379: WARNING: Some variables may not be substituted:
    +      { echo "$as_me:21443: WARNING: Some variables may not be substituted:
     $ac_seen" >&5
     echo "$as_me: WARNING: Some variables may not be substituted:
     $ac_seen" >&2;}
    @@ -21425,7 +21489,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:21428: creating $ac_file" >&5
    +  test x"$ac_file" != x- && { echo "$as_me:21492: creating $ac_file" >&5
     echo "$as_me: creating $ac_file" >&6;}
     
       # First look for the input files in the build tree, otherwise in the
    @@ -21436,7 +21500,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:21439: error: cannot find input file: $f" >&5
    +         test -f "$f" || { { echo "$as_me:21503: error: cannot find input file: $f" >&5
     echo "$as_me: error: cannot find input file: $f" >&2;}
        { (exit 1); exit 1; }; }
              echo $f;;
    @@ -21449,7 +21513,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
                echo $srcdir/$f
              else
                # /dev/null tree
    -           { { echo "$as_me:21452: error: cannot find input file: $f" >&5
    +           { { echo "$as_me:21516: error: cannot find input file: $f" >&5
     echo "$as_me: error: cannot find input file: $f" >&2;}
        { (exit 1); exit 1; }; }
              fi;;
    @@ -21507,7 +21571,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:21510: $ac_file is unchanged" >&5
    +      { echo "$as_me:21574: $ac_file is unchanged" >&5
     echo "$as_me: $ac_file is unchanged" >&6;}
         else
           ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
    diff --git a/test/configure.in b/test/configure.in
    index 3d8eebd0..f538523e 100644
    --- a/test/configure.in
    +++ b/test/configure.in
    @@ -1,5 +1,5 @@
     dnl***************************************************************************
    -dnl Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    +dnl Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
     dnl                                                                          *
     dnl Permission is hereby granted, free of charge, to any person obtaining a  *
     dnl copy of this software and associated documentation files (the            *
    @@ -28,7 +28,7 @@ dnl***************************************************************************
     dnl
     dnl Author: Thomas E. Dickey 1996-on
     dnl
    -dnl $Id: configure.in,v 1.150 2018/06/17 01:22:00 tom Exp $
    +dnl $Id: configure.in,v 1.151 2019/01/21 22:50:54 tom Exp $
     dnl This is a simple configuration-script for the ncurses test programs that
     dnl allows the test-directory to be separately configured against a reference
     dnl system (i.e., sysvr4 curses)
    @@ -258,12 +258,37 @@ tsearch \
     AC_CACHE_CHECK(if we can use termcap.h,cf_cv_have_termcap_h,[
     	AC_TRY_COMPILE([
     #include 
    +#ifdef NCURSES_VERSION
    +#undef NCURSES_VERSION
    +#endif
     #include 
    +#ifndef NCURSES_VERSION
    +#error wrong header
    +#endif
     ],
     	[return 0;],
     	[cf_cv_have_termcap_h=yes],
     	[cf_cv_have_termcap_h=no])])
    -test "x$cf_cv_have_termcap_h" = xyes && AC_DEFINE(HAVE_TERMCAP_H)
    +if test "x$cf_cv_have_termcap_h" = xyes
    +then
    +	AC_DEFINE(HAVE_TERMCAP_H)
    +else
    +AC_CACHE_CHECK(if we can use ncurses/termcap.h,cf_cv_have_ncurses_termcap_h,[
    +	AC_TRY_COMPILE([
    +#include 
    +#ifdef NCURSES_VERSION
    +#undef NCURSES_VERSION
    +#endif
    +#include 
    +#ifndef NCURSES_VERSION
    +#error wrong header
    +#endif
    +],
    +	[return 0;],
    +	[cf_cv_have_ncurses_termcap_h=yes],
    +	[cf_cv_have_ncurses_termcap_h=no])])
    +test "x$cf_cv_have_ncurses_termcap_h" = xyes && AC_DEFINE(HAVE_NCURSES_TERMCAP_H)
    +fi
     
     if test "x$ac_cv_func_getopt" = xno; then
     	AC_MSG_ERROR(getopt is required for building programs)
    diff --git a/test/demo_termcap.c b/test/demo_termcap.c
    index e252d1d9..00a64849 100644
    --- a/test/demo_termcap.c
    +++ b/test/demo_termcap.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 2005-2016,2017 Free Software Foundation, Inc.              *
    + * Copyright (c) 2005-2017,2019 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            *
    @@ -29,7 +29,7 @@
     /*
      * Author: Thomas E. Dickey
      *
    - * $Id: demo_termcap.c,v 1.56 2017/12/26 22:41:47 tom Exp $
    + * $Id: demo_termcap.c,v 1.57 2019/01/21 22:50:46 tom Exp $
      *
      * A simple demo of the termcap interface.
      */
    @@ -46,9 +46,13 @@
     #endif
     #endif
     
    -#if defined(NCURSES_VERSION) && HAVE_TERMCAP_H
    +#if defined(NCURSES_VERSION)
    +#if HAVE_NCURSES_TERMCAP_H
    +#include 
    +#elif HAVE_TERMCAP_H
     #include 
     #endif
    +#endif
     
     static void failed(const char *) GCC_NORETURN;
     
    diff --git a/test/dots.c b/test/dots.c
    index 07934237..36509ee0 100644
    --- a/test/dots.c
    +++ b/test/dots.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 1999-2013,2017 Free Software Foundation, Inc.              *
    + * Copyright (c) 1999-2017,2019 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            *
    @@ -29,7 +29,7 @@
     /*
      * Author: Thomas E. Dickey  1999
      *
    - * $Id: dots.c,v 1.33 2017/11/24 19:26:31 tom Exp $
    + * $Id: dots.c,v 1.34 2019/01/21 14:20:18 tom Exp $
      *
      * A simple demo of the terminfo interface.
      */
    @@ -143,11 +143,16 @@ main(int argc,
         int f_option = 0;
         int m_option = 2;
         int s_option = 1;
    +    size_t need;
    +    char *my_env;
     
         while ((x = getopt(argc, argv, "T:efm:s:")) != -1) {
     	switch (x) {
     	case 'T':
    -	    putenv(strcat(strcpy(malloc(6 + strlen(optarg)), "TERM="), optarg));
    +	    need = 6 + strlen(optarg);
    +	    my_env = malloc(need);
    +	    _nc_SPRINTF(my_env, _nc_SLIMIT(need) "TERM=%s", optarg);
    +	    putenv(my_env);
     	    break;
     #if HAVE_USE_ENV
     	case 'e':
    diff --git a/test/dots_curses.c b/test/dots_curses.c
    index 989ce9af..21535181 100644
    --- a/test/dots_curses.c
    +++ b/test/dots_curses.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 2014-2017,2018 Free Software Foundation, Inc.              *
    + * Copyright (c) 2014-2018,2019 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            *
    @@ -29,7 +29,7 @@
     /*
      * Author: Thomas E. Dickey
      *
    - * $Id: dots_curses.c,v 1.13 2018/06/24 00:06:37 tom Exp $
    + * $Id: dots_curses.c,v 1.14 2019/01/21 14:20:18 tom Exp $
      *
      * A simple demo of the curses interface used for comparison with termcap.
      */
    @@ -122,11 +122,16 @@ main(int argc, char *argv[])
     #endif
         int m_option = 2;
         int s_option = 1;
    +    size_t need;
    +    char *my_env;
     
         while ((x = getopt(argc, argv, "T:dem:s:")) != -1) {
     	switch (x) {
     	case 'T':
    -	    putenv(strcat(strcpy(malloc(6 + strlen(optarg)), "TERM="), optarg));
    +	    need = 6 + strlen(optarg);
    +	    my_env = malloc(need);
    +	    _nc_SPRINTF(my_env, _nc_SLIMIT(need) "TERM=%s", optarg);
    +	    putenv(my_env);
     	    break;
     #if HAVE_USE_DEFAULT_COLORS
     	case 'd':
    diff --git a/test/dots_mvcur.c b/test/dots_mvcur.c
    index 7dfae824..d6df3988 100644
    --- a/test/dots_mvcur.c
    +++ b/test/dots_mvcur.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 2007-2013,2017 Free Software Foundation, Inc.              *
    + * Copyright (c) 2007-2017,2019 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            *
    @@ -29,7 +29,7 @@
     /*
      * Author: Thomas E. Dickey - 2007
      *
    - * $Id: dots_mvcur.c,v 1.19 2017/11/24 19:26:31 tom Exp $
    + * $Id: dots_mvcur.c,v 1.20 2019/01/21 14:20:18 tom Exp $
      *
      * A simple demo of the terminfo interface, and mvcur.
      */
    @@ -146,11 +146,16 @@ main(int argc GCC_UNUSED,
         int f_option = 0;
         int m_option = 2;
         int s_option = 1;
    +    size_t need;
    +    char *my_env;
     
         while ((x = getopt(argc, argv, "T:efm:s:")) != -1) {
     	switch (x) {
     	case 'T':
    -	    putenv(strcat(strcpy(malloc(6 + strlen(optarg)), "TERM="), optarg));
    +	    need = 6 + strlen(optarg);
    +	    my_env = malloc(need);
    +	    _nc_SPRINTF(my_env, _nc_SLIMIT(need) "TERM=%s", optarg);
    +	    putenv(my_env);
     	    break;
     #if HAVE_USE_ENV
     	case 'e':
    diff --git a/test/dots_termcap.c b/test/dots_termcap.c
    index b58aec1e..b81a53d7 100644
    --- a/test/dots_termcap.c
    +++ b/test/dots_termcap.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 2013-2017,2018 Free Software Foundation, Inc.              *
    + * Copyright (c) 2013-2018,2019 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            *
    @@ -29,7 +29,7 @@
     /*
      * Author: Thomas E. Dickey
      *
    - * $Id: dots_termcap.c,v 1.17 2018/06/24 00:06:37 tom Exp $
    + * $Id: dots_termcap.c,v 1.18 2019/01/21 14:20:18 tom Exp $
      *
      * A simple demo of the termcap interface.
      */
    @@ -213,11 +213,16 @@ main(int argc, char *argv[])
         char buffer[1024];
         char area[1024];
         char *name;
    +    size_t need;
    +    char *my_env;
     
         while ((x = getopt(argc, argv, "T:em:s:")) != -1) {
     	switch (x) {
     	case 'T':
    -	    putenv(strcat(strcpy(malloc(6 + strlen(optarg)), "TERM="), optarg));
    +	    need = 6 + strlen(optarg);
    +	    my_env = malloc(need);
    +	    _nc_SPRINTF(my_env, _nc_SLIMIT(need) "TERM=%s", optarg);
    +	    putenv(my_env);
     	    break;
     	case 'e':
     	    e_option = 1;
    diff --git a/test/dots_xcurses.c b/test/dots_xcurses.c
    index 3270322d..9e2d5b7f 100644
    --- a/test/dots_xcurses.c
    +++ b/test/dots_xcurses.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 2017,2018 Free Software Foundation, Inc.                   *
    + * Copyright (c) 2017-2018,2019 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            *
    @@ -29,7 +29,7 @@
     /*
      * Author: Thomas E. Dickey
      *
    - * $Id: dots_xcurses.c,v 1.16 2018/06/23 21:35:06 tom Exp $
    + * $Id: dots_xcurses.c,v 1.17 2019/01/21 14:20:18 tom Exp $
      *
      * A simple demo of the wide-curses interface used for comparison with termcap.
      */
    @@ -150,11 +150,16 @@ main(int argc, char *argv[])
     #endif
         int m_option = 2;
         int s_option = 1;
    +    size_t need;
    +    char *my_env;
     
         while ((ch = getopt(argc, argv, "T:dem:s:x")) != -1) {
     	switch (ch) {
     	case 'T':
    -	    putenv(strcat(strcpy(malloc(6 + strlen(optarg)), "TERM="), optarg));
    +	    need = 6 + strlen(optarg);
    +	    my_env = malloc(need);
    +	    _nc_SPRINTF(my_env, _nc_SLIMIT(need) "TERM=%s", optarg);
    +	    putenv(my_env);
     	    break;
     #if HAVE_USE_DEFAULT_COLORS
     	case 'd':
    diff --git a/test/edit_field.c b/test/edit_field.c
    index 72ddc4e7..db917de1 100644
    --- a/test/edit_field.c
    +++ b/test/edit_field.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 2003-2014,2017 Free Software Foundation, Inc.              *
    + * Copyright (c) 2003-2017,2019 Free Software Foundation, Inc.              *
      *                                                                          *
      * Permission is hereby granted, free of charge, to any person obtaining a  *
      * copy of this software and associated documentation files (the            *
    @@ -26,7 +26,7 @@
      * authorization.                                                           *
      ****************************************************************************/
     /*
    - * $Id: edit_field.c,v 1.28 2017/06/24 23:10:08 tom Exp $
    + * $Id: edit_field.c,v 1.30 2019/01/21 20:18:18 tom Exp $
      *
      * A wrapper for form_driver() which keeps track of the user's editing changes
      * for each field, and makes the resulting length available as a
    @@ -192,7 +192,7 @@ help_edit_field(void)
     	    name = commands[n].help;
     	need = 5 + strlen(code) + strlen(name);
     	msg = typeMalloc(char, need);
    -	sprintf(msg, "%s -- %s", code, name);
    +	_nc_SPRINTF(msg, _nc_SLIMIT(need) "%s -- %s", code, name);
     	msgs[used++] = msg;
         }
         msgs[used++] =
    @@ -212,7 +212,7 @@ offset_in_field(FORM *form)
         int currow, curcol;
     
         form_getyx(form, currow, curcol);
    -    return curcol + currow * field->dcols;
    +    return curcol + currow * (int) field->dcols;
     }
     
     static void
    @@ -325,12 +325,12 @@ edit_field(FORM *form, int *result)
     		if (before_col > 0) {
     		    --length;
     		} else if (before_row > 0) {
    -		    length -= before->cols + before_col;
    +		    length -= (int) before->cols + before_col;
     		}
     	    }
     	    break;
     	case REQ_NEW_LINE:
    -	    length += before->cols;
    +	    length += (int) before->cols;
     	    break;
     #if 0
     	    /* FIXME: finish these */
    diff --git a/test/extended_color.c b/test/extended_color.c
    index 63426e81..00b48140 100644
    --- a/test/extended_color.c
    +++ b/test/extended_color.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 2017,2018 Free Software Foundation, Inc.                   *
    + * Copyright (c) 2017-2018,2019 Free Software Foundation, Inc.              *
      *                                                                          *
      * Permission is hereby granted, free of charge, to any person obtaining a  *
      * copy of this software and associated documentation files (the            *
    @@ -26,12 +26,12 @@
      * authorization.                                                           *
      ****************************************************************************/
     /*
    - * $Id: extended_color.c,v 1.11 2018/12/29 21:50:33 tom Exp $
    + * $Id: extended_color.c,v 1.13 2019/01/21 14:59:34 tom Exp $
      */
     
     #include 
     
    -#if HAVE_INIT_EXTENDED_COLOR
    +#if USE_EXTENDED_COLOR
     
     #define SHOW(n) ((n) == ERR ? "ERR" : "OK")
     
    @@ -213,7 +213,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
     		 extended_slk_color(2));
         for (i = 1; i <= 8; ++i) {
     	char temp[80];
    -	sprintf(temp, "(SLK-%d)", i);
    +	_nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp)) "(SLK-%d)", i);
     	slk_set(i, temp, 0);
         }
         slk_touch();
    diff --git a/test/movewindow.c b/test/movewindow.c
    index 1e890fa7..0ce107ca 100644
    --- a/test/movewindow.c
    +++ b/test/movewindow.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 2006-2017,2018 Free Software Foundation, Inc.              *
    + * Copyright (c) 2006-2018,2019 Free Software Foundation, Inc.              *
      *                                                                          *
      * Permission is hereby granted, free of charge, to any person obtaining a  *
      * copy of this software and associated documentation files (the            *
    @@ -26,7 +26,7 @@
      * authorization.                                                           *
      ****************************************************************************/
     /*
    - * $Id: movewindow.c,v 1.48 2018/11/24 21:29:46 tom Exp $
    + * $Id: movewindow.c,v 1.50 2019/01/21 20:11:22 tom Exp $
      *
      * Demonstrate move functions for windows and derived windows from the curses
      * library.
    @@ -54,7 +54,9 @@ TODO:
     #undef derwin
     #endif
     
    -#if defined(NCURSES_VERSION) || defined(PDCURSES)
    +#if defined(NCURSES_CONST)
    +#define CONST_FMT NCURSES_CONST
    +#elif defined(PDCURSES)
     #define CONST_FMT const
     #else
     #define CONST_FMT		/* nothing */
    @@ -76,8 +78,8 @@ typedef struct {
         WINDOW *child;		/* the actual value */
     } FRAME;
     
    -static void head_line(CONST_FMT char *fmt,...) GCC_PRINTFLIKE(1, 2);
    -static void tail_line(CONST_FMT char *fmt,...) GCC_PRINTFLIKE(1, 2);
    +static void head_line(CONST_FMT char *fmt, ...) GCC_PRINTFLIKE(1, 2);
    +static void tail_line(CONST_FMT char *fmt, ...) GCC_PRINTFLIKE(1, 2);
     
     static unsigned num_windows;
     static FRAME *all_windows;
    @@ -116,7 +118,7 @@ message(int lineno, CONST_FMT char *fmt, va_list argp)
     }
     
     static void
    -head_line(CONST_FMT char *fmt,...)
    +head_line(CONST_FMT char *fmt, ...)
     {
         va_list argp;
     
    @@ -126,7 +128,7 @@ head_line(CONST_FMT char *fmt,...)
     }
     
     static void
    -tail_line(CONST_FMT char *fmt,...)
    +tail_line(CONST_FMT char *fmt, ...)
     {
         va_list argp;
     
    @@ -664,8 +666,10 @@ show_help(WINDOW *current)
         size_t n;
     
         for (n = 0; n < SIZEOF(help); ++n) {
    -	msgs[n] = typeMalloc(char, 21 + strlen(help[n].msg));
    -	sprintf(msgs[n], "%-20s%s", keyname(help[n].key), help[n].msg);
    +	size_t need = (21 + strlen(help[n].msg));
    +	msgs[n] = typeMalloc(char, need);
    +	_nc_SPRINTF(msgs[n], _nc_SLIMIT(need)
    +		    "%-20s%s", keyname(help[n].key), help[n].msg);
         }
         popup_msg2(current, msgs);
         for (n = 0; n < SIZEOF(help); ++n) {
    diff --git a/test/ncurses.c b/test/ncurses.c
    index 13fe6df0..c5188e51 100644
    --- a/test/ncurses.c
    +++ b/test/ncurses.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    + * Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
      *                                                                          *
      * Permission is hereby granted, free of charge, to any person obtaining a  *
      * copy of this software and associated documentation files (the            *
    @@ -40,7 +40,7 @@ AUTHOR
        Author: Eric S. Raymond  1993
                Thomas E. Dickey (beginning revision 1.27 in 1996).
     
    -$Id: ncurses.c,v 1.511 2018/12/15 20:34:01 tom Exp $
    +$Id: ncurses.c,v 1.514 2019/01/21 20:15:28 tom Exp $
     
     ***************************************************************************/
     
    @@ -2497,12 +2497,12 @@ color_test(bool recur GCC_UNUSED)
     
     #if USE_WIDEC_SUPPORT
     
    -#if HAVE_INIT_EXTENDED_COLOR
    +#if USE_EXTENDED_COLOR
     #define InitExtendedPair(p,f,g) init_extended_pair((p),(f),(g))
     #define ExtendedColorSet(p)     color_set((NCURSES_PAIRS_T) (p), &(p))
     #define EXTENDED_PAIRS_T int
     #else
    -#define InitExtendedPair(p,f,g) init_pair((NCURSES_PAIRS_T) (p),(f),(g))
    +#define InitExtendedPair(p,f,g) init_pair((NCURSES_PAIRS_T) (p),(NCURSES_COLOR_T)(f),(NCURSES_COLOR_T)(g))
     #define ExtendedColorSet(p)     color_set((NCURSES_PAIRS_T) (p), NULL)
     #define EXTENDED_PAIRS_T NCURSES_PAIRS_T
     #endif
    @@ -4367,7 +4367,7 @@ x_acs_test(bool recur GCC_UNUSED)
         void (*last_show_wacs) (int, attr_t, NCURSES_PAIRS_T) = 0;
         W_ATTR_TBL my_list[SIZEOF(w_attrs_to_test)];
         unsigned my_size = init_w_attr_list(my_list, term_attrs());
    -    char at_page[5];
    +    char at_page[20];
         bool pending_code = FALSE;
     
         at_page[0] = '\0';
    @@ -4405,9 +4405,9 @@ x_acs_test(bool recur GCC_UNUSED)
     	case '@':
     	    pending_code = !pending_code;
     	    if (pending_code) {
    -		sprintf(at_page, "%02x", digit);
    +		_nc_SPRINTF(at_page, _nc_SLIMIT(sizeof(at_page)) "%02x", digit);
     	    } else if (at_page[0] != '\0') {
    -		sscanf(at_page, "%x", &digit);
    +		_nc_SPRINTF(at_page, _nc_SLIMIT(sizeof(at_page)) "%x", digit);
     	    }
     	    break;
     	default:
    @@ -4430,11 +4430,12 @@ x_acs_test(bool recur GCC_UNUSED)
     		last_show_wacs = 0;
     	    } else if (c == '+') {
     		++digit;
    -		sprintf(at_page, "%02x", digit);
    +		_nc_SPRINTF(at_page, _nc_SLIMIT(sizeof(at_page)) "%02x", digit);
     		last_show_wacs = 0;
     	    } else if (c == '-' && digit > 0) {
     		--digit;
    -		sprintf(at_page, "%02x", UChar(digit));
    +		_nc_SPRINTF(at_page, _nc_SLIMIT(sizeof(at_page)) "%02x",
    +			    UChar(digit));
     		last_show_wacs = 0;
     	    } else if (c == '>' && repeat < (COLS / 4)) {
     		++repeat;
    diff --git a/test/padview.c b/test/padview.c
    index 3b4e052a..0445fc74 100644
    --- a/test/padview.c
    +++ b/test/padview.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 2017 Free Software Foundation, Inc.                        *
    + * Copyright (c) 2017,2019 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            *
    @@ -28,7 +28,7 @@
     /*
      * clone of view.c, using pads
      *
    - * $Id: padview.c,v 1.12 2017/10/23 00:37:21 tom Exp $
    + * $Id: padview.c,v 1.13 2019/01/21 19:47:07 tom Exp $
      */
     
     #include 
    @@ -89,7 +89,7 @@ show_all(const char *tag, WINDOW *my_pad, int my_row)
         _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp))
     		"view %.*s", (int) strlen(tag), tag);
         i = (int) strlen(temp);
    -    _nc_SPRINTF(temp + i, _nc_SLIMIT(sizeof(temp) - i)
    +    _nc_SPRINTF(temp + i, _nc_SLIMIT(sizeof(temp) - (size_t) i)
     		" %.*s", (int) sizeof(temp) - i - 2, fname);
         mvprintw(0, 0, "%.*s", COLS, temp);
         this_time = time((time_t *) 0);
    diff --git a/test/pair_content.c b/test/pair_content.c
    index 4e1d0b88..1c9e2ab9 100644
    --- a/test/pair_content.c
    +++ b/test/pair_content.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 2018 Free Software Foundation, Inc.                        *
    + * Copyright (c) 2018,2019 Free Software Foundation, Inc.                   *
      *                                                                          *
      * Permission is hereby granted, free of charge, to any person obtaining a  *
      * copy of this software and associated documentation files (the            *
    @@ -26,23 +26,35 @@
      * authorization.                                                           *
      ****************************************************************************/
     /*
    - * $Id: pair_content.c,v 1.2 2018/12/30 00:54:48 tom Exp $
    + * $Id: pair_content.c,v 1.12 2019/01/21 01:05:22 tom Exp $
      */
     
     #define NEED_TIME_H
     #include 
     
    +#if USE_EXTENDED_COLOR
    +typedef int my_color_t;
    +#else
    +typedef NCURSES_COLOR_T my_color_t;
    +#endif
    +
     typedef struct {
    -    NCURSES_COLOR_T fg;
    -    NCURSES_COLOR_T bg;
    +    my_color_t fg;
    +    my_color_t bg;
     } MYPAIR;
     
    +static int f_opt;
     static int i_opt;
     static int l_opt;
     static int n_opt;
    +static int p_opt;
     static int r_opt;
     static int s_opt;
     
    +#if USE_EXTENDED_COLOR
    +static int x_opt;
    +#endif
    +
     static MYPAIR *expected;
     
     #if HAVE_GETTIMEOFDAY
    @@ -59,10 +71,45 @@ failed(const char *msg)
         ExitProgram(EXIT_FAILURE);
     }
     
    -static NCURSES_COLOR_T
    +#if USE_EXTENDED_COLOR
    +static int
    +InitPair(int pair, int fg, int bg)
    +{
    +    int rc;
    +    if (x_opt) {
    +	rc = init_extended_pair(pair, fg, bg);
    +    } else {
    +	rc = init_pair((NCURSES_PAIRS_T) pair,
    +		       (NCURSES_COLOR_T) fg,
    +		       (NCURSES_COLOR_T) bg);
    +    }
    +    return rc;
    +}
    +
    +static int
    +PairContent(int pair, int *fgp, int *bgp)
    +{
    +    int rc;
    +    if (x_opt) {
    +	rc = extended_pair_content(pair, fgp, bgp);
    +    } else {
    +	short fg, bg;
    +	if ((rc = pair_content((short) pair, &fg, &bg)) == OK) {
    +	    *fgp = fg;
    +	    *bgp = bg;
    +	}
    +    }
    +    return rc;
    +}
    +#else
    +#define InitPair(pair,fg,bg)      init_pair((NCURSES_COLOR_T)pair,(NCURSES_COLOR_T)fg,(NCURSES_COLOR_T)bg)
    +#define PairContent(pair,fgp,bgp) pair_content((NCURSES_PAIRS_T)pair,fgp,bgp)
    +#endif
    +
    +static my_color_t
     random_color(void)
     {
    -    return (NCURSES_COLOR_T) (rand() % COLORS);
    +    return (my_color_t) (rand() % COLORS);
     }
     
     static void
    @@ -75,25 +122,30 @@ setup_test(void)
         if (has_colors()) {
     	start_color();
     
    +	if (!f_opt)
    +	    f_opt = 1;
     	if (!l_opt)
     	    l_opt = COLOR_PAIRS;
     	if (l_opt <= 1)
     	    failed("color-pair limit must be greater than one");
     
     	if (!n_opt) {
    -	    NCURSES_PAIRS_T pair;
    +	    int pair;
    +	    size_t need = (size_t) ((l_opt > COLOR_PAIRS)
    +				    ? l_opt
    +				    : COLOR_PAIRS) + 1;
     
    -	    expected = typeCalloc(MYPAIR, l_opt);
    +	    expected = typeCalloc(MYPAIR, need);
     	    if (s_opt) {
    -		NCURSES_COLOR_T fg;
    -		NCURSES_COLOR_T bg;
    -		pair = 1;
    +		my_color_t fg;
    +		my_color_t bg;
    +		pair = f_opt;
     		for (fg = 0; fg < COLORS; ++fg) {
     		    for (bg = 0; bg < COLORS; ++bg) {
     			if (pair < l_opt) {
    -			    init_pair(pair, fg, bg);
    -			    expected[pair].fg = fg;
    -			    expected[pair].bg = bg;
    +			    InitPair(pair, fg, bg);
    +			    expected[pair].fg = (my_color_t) fg;
    +			    expected[pair].bg = (my_color_t) bg;
     			    ++pair;
     			} else {
     			    break;
    @@ -101,10 +153,10 @@ setup_test(void)
     		    }
     		}
     	    } else {
    -		for (pair = 1; (int) pair < l_opt; ++pair) {
    +		for (pair = f_opt; pair < l_opt; ++pair) {
     		    expected[pair].fg = random_color();
     		    expected[pair].bg = random_color();
    -		    init_pair(pair, expected[pair].fg, expected[pair].bg);
    +		    InitPair(pair, expected[pair].fg, expected[pair].bg);
     		}
     	    }
     	}
    @@ -119,12 +171,12 @@ setup_test(void)
     static void
     run_test(void)
     {
    -    NCURSES_PAIRS_T pair;
    +    int pair;
         bool success = TRUE;
    -    for (pair = 1; (int) pair < l_opt; ++pair) {
    -	NCURSES_COLOR_T fg;
    -	NCURSES_COLOR_T bg;
    -	if (pair_content(pair, &fg, &bg) == OK) {
    +    for (pair = 1; pair < l_opt; ++pair) {
    +	my_color_t fg;
    +	my_color_t bg;
    +	if (PairContent(pair, &fg, &bg) == OK) {
     	    if (expected != 0) {
     		if (fg != expected[pair].fg)
     		    success = FALSE;
    @@ -164,11 +216,16 @@ usage(void)
     	"Usage: pair_content [options]"
     	,""
     	,"Options:"
    +	," -f PAIR  first color pair to test (default: 1)"
     	," -i       interactive, showing test-progress"
    -	," -l NUM   test NUM color pairs, rather than terminal description"
    +	," -l PAIR  last color pair to test (default: max_pairs-1)"
     	," -n       do not initialize color pairs"
    +	," -p       print data for color pairs instead of testing"
     	," -r COUNT repeat for given count"
     	," -s       initialize pairs sequentially rather than random"
    +#if USE_EXTENDED_COLOR
    +	," -x       use extended color pairs/values"
    +#endif
         };
         size_t n;
         for (n = 0; n < SIZEOF(msg); n++)
    @@ -182,8 +239,12 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
         int i;
         int repeat;
     
    -    while ((i = getopt(argc, argv, "il:nr:s")) != -1) {
    +    while ((i = getopt(argc, argv, "f:il:npr:sx")) != -1) {
     	switch (i) {
    +	case 'f':
    +	    if ((f_opt = atoi(optarg)) <= 0)
    +		usage();
    +	    break;
     	case 'i':
     	    i_opt = 1;
     	    break;
    @@ -194,6 +255,9 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
     	case 'n':
     	    n_opt = 1;
     	    break;
    +	case 'p':
    +	    p_opt = 1;
    +	    break;
     	case 'r':
     	    if ((r_opt = atoi(optarg)) <= 0)
     		usage();
    @@ -201,6 +265,11 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
     	case 's':
     	    s_opt = 1;
     	    break;
    +#if USE_EXTENDED_COLOR
    +	case 'x':
    +	    x_opt = 1;
    +	    break;
    +#endif
     	default:
     	    usage();
     	}
    @@ -211,26 +280,38 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
     	r_opt = 1;
     
         setup_test();
    +    if (p_opt) {
    +	endwin();
    +	for (i = f_opt; i < l_opt; ++i) {
    +	    my_color_t fg, bg;
    +	    if (PairContent(i, &fg, &bg) == OK) {
    +		printf("%d: %d %d\n", i, fg, bg);
    +	    } else {
    +		printf("%d: ? ?\n", i);
    +	    }
    +	}
    +    } else {
     
    -    for (repeat = 0; repeat < r_opt; ++repeat) {
    -	run_test();
    -	if (i_opt) {
    -	    addch('.');
    -	    refresh();
    +	for (repeat = 0; repeat < r_opt; ++repeat) {
    +	    run_test();
    +	    if (i_opt) {
    +		addch('.');
    +		refresh();
    +	    }
     	}
    -    }
     
    -    if (i_opt) {
    -	addch('\n');
    -    }
    -    printw("DONE: ");
    +	if (i_opt) {
    +	    addch('\n');
    +	}
    +	printw("DONE: ");
     #if HAVE_GETTIMEOFDAY
    -    gettimeofday(&finish_time, 0);
    -    printw("%.03f seconds",
    -	   seconds(&finish_time)
    -	   - seconds(&initial_time));
    +	gettimeofday(&finish_time, 0);
    +	printw("%.03f seconds",
    +	       seconds(&finish_time)
    +	       - seconds(&initial_time));
     #endif
    -    finish_test();
    +	finish_test();
    +    }
     
         ExitProgram(EXIT_SUCCESS);
     }
    diff --git a/test/picsmap.c b/test/picsmap.c
    index ad9a351b..c9c57701 100644
    --- a/test/picsmap.c
    +++ b/test/picsmap.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 2017,2018 Free Software Foundation, Inc.                   *
    + * Copyright (c) 2017-2018,2019 Free Software Foundation, Inc.              *
      *                                                                          *
      * Permission is hereby granted, free of charge, to any person obtaining a  *
      * copy of this software and associated documentation files (the            *
    @@ -26,7 +26,7 @@
      * authorization.                                                           *
      ****************************************************************************/
     /*
    - * $Id: picsmap.c,v 1.123 2018/06/16 22:55:45 tom Exp $
    + * $Id: picsmap.c,v 1.127 2019/01/21 19:45:57 tom Exp $
      *
      * Author: Thomas E. Dickey
      *
    @@ -113,10 +113,10 @@ typedef struct {
     #define debugmsg2 if (debugging) logmsg2
     
     static void cleanup(int) GCC_NORETURN;
    -static void giveup(const char *fmt,...) GCC_PRINTFLIKE(1, 2);
    -static void logmsg(const char *fmt,...) GCC_PRINTFLIKE(1, 2);
    -static void logmsg2(const char *fmt,...) GCC_PRINTFLIKE(1, 2);
    -static void warning(const char *fmt,...) GCC_PRINTFLIKE(1, 2);
    +static void giveup(const char *fmt, ...) GCC_PRINTFLIKE(1, 2);
    +static void logmsg(const char *fmt, ...) GCC_PRINTFLIKE(1, 2);
    +static void logmsg2(const char *fmt, ...) GCC_PRINTFLIKE(1, 2);
    +static void warning(const char *fmt, ...) GCC_PRINTFLIKE(1, 2);
     static int gather_c_values(int);
     
     static FILE *logfp = 0;
    @@ -137,7 +137,7 @@ static FG_NODE *reading_ncols;
     static void *reading_ntree;
     #endif
     
    -#if HAVE_ALLOC_PAIR && HAVE_INIT_EXTENDED_COLOR
    +#if HAVE_ALLOC_PAIR && USE_EXTENDED_COLOR
     #define USE_EXTENDED_COLORS 1
     static bool use_extended_pairs = FALSE;
     static bool use_extended_colors = FALSE;
    @@ -146,7 +146,7 @@ static bool use_extended_colors = FALSE;
     #endif
     
     static void
    -logmsg(const char *fmt,...)
    +logmsg(const char *fmt, ...)
     {
         if (logfp != 0) {
     	va_list ap;
    @@ -159,7 +159,7 @@ logmsg(const char *fmt,...)
     }
     
     static void
    -logmsg2(const char *fmt,...)
    +logmsg2(const char *fmt, ...)
     {
         if (logfp != 0) {
     	va_list ap;
    @@ -207,7 +207,7 @@ failed(const char *msg)
     }
     
     static void
    -warning(const char *fmt,...)
    +warning(const char *fmt, ...)
     {
         if (logfp != 0) {
     	va_list ap;
    @@ -533,7 +533,7 @@ usage(void)
     }
     
     static void
    -giveup(const char *fmt,...)
    +giveup(const char *fmt, ...)
     {
         va_list ap;
     
    @@ -567,7 +567,9 @@ read_palette(const char *filename)
     {
         static const char *data_dir = DATA_DIR;
         char **result = 0;
    -    char *full_name = malloc(strlen(data_dir) + 20 + strlen(filename));
    +    size_t last = strlen(filename);
    +    size_t need = (strlen(data_dir) + 20 + last);
    +    char *full_name = malloc(need);
         char *s;
         struct stat sb;
     
    @@ -578,14 +580,16 @@ read_palette(const char *filename)
     	    *(s = full_name) = '\0';
     	    if (tries & 1) {
     		if (strchr(filename, '/') == 0) {
    -		    sprintf(full_name, "%s/", data_dir);
    +		    _nc_SPRINTF(full_name, _nc_SLIMIT(need) "%s/", data_dir);
     		} else {
     		    continue;
     		}
     	    }
     	    s += strlen(s);
    +	    if (((size_t) (s - full_name) + last + 1) >= need)
    +		continue;
     
    -	    strcpy(s, filename);
    +	    _nc_STRCAT(full_name, filename, need);
     	    if (tries & 4) {
     		char *t = s;
     		char *tc;
    @@ -606,7 +610,8 @@ read_palette(const char *filename)
     		}
     		if (found && (t != s)
     		    && (strncmp) (s, "xterm", (size_t) (t - s))) {
    -		    sprintf(s, "xterm%s", filename + (t - s));
    +		    _nc_SPRINTF(s, _nc_SLIMIT(need - (size_t) (s - full_name))
    +				"xterm%s", filename + (t - s));
     		} else {
     		    continue;
     		}
    @@ -616,7 +621,7 @@ read_palette(const char *filename)
     	    if (tries & 2) {
     		int len = (int) strlen(filename);
     		if (len <= 4 || strcmp(filename + len - 4, ".dat")) {
    -		    strcpy(s, ".dat");
    +		    _nc_STRCAT(full_name, ".dat", need);
     		} else {
     		    continue;
     		}
    @@ -769,7 +774,7 @@ bytes_of(int value)
         return value;
     }
     
    -static int match_c(const char *, const char *,...) GCC_SCANFLIKE(2,3);
    +static int match_c(const char *, const char *, ...) GCC_SCANFLIKE(2,3);
     
     static char *
     skip_s(char *s)
    @@ -797,7 +802,7 @@ skip_word(char *s)
     }
     
     static int
    -match_c(const char *source, const char *pattern,...)
    +match_c(const char *source, const char *pattern, ...)
     {
         int limit = (int) strlen(source);
         const char *last_s = source + limit;
    @@ -1265,7 +1270,8 @@ parse_xpm(char **data)
     static PICS_HEAD *
     parse_img(const char *filename)
     {
    -    char *cmd = malloc(strlen(filename) + 256);
    +    size_t need = strlen(filename) + 256;
    +    char *cmd = malloc(need);
         FILE *pp;
         char buffer[BUFSIZ];
         char dummy[BUFSIZ];
    @@ -1275,9 +1281,9 @@ parse_img(const char *filename)
         int pic_y = 0;
         int width = in_curses ? COLS : 80;
     
    -    sprintf(cmd, "identify \"%s\"", filename);
    +    _nc_SPRINTF(cmd, _nc_SLIMIT(need) "identify \"%s\"", filename);
         if (quiet)
    -	strcat(cmd, " 2>/dev/null");
    +	_nc_STRCAT(cmd, " 2>/dev/null", need);
     
         logmsg("...opening pipe to %s", cmd);
     
    @@ -1303,11 +1309,12 @@ parse_img(const char *filename)
         if (pic_x <= 0 || pic_y <= 0)
     	goto finish;
     
    -    sprintf(cmd, "convert " "-resize %dx%d\\! " "-thumbnail %dx \"%s\" "
    -	    "-define txt:compliance=SVG txt:-",
    -	    pic_x, pic_y, width, filename);
    +    _nc_SPRINTF(cmd, _nc_SLIMIT(need)
    +		"convert " "-resize %dx%d\\! " "-thumbnail %dx \"%s\" "
    +		"-define txt:compliance=SVG txt:-",
    +		pic_x, pic_y, width, filename);
         if (quiet)
    -	strcat(cmd, " 2>/dev/null");
    +	_nc_STRCAT(cmd, " 2>/dev/null", need);
     
         logmsg("...opening pipe to %s", cmd);
         if ((pp = popen(cmd, "r")) != 0) {
    @@ -1596,22 +1603,26 @@ report_colors(PICS_HEAD * pics)
     	    *s = '\0';
     	    for (k = 0; k < wide; ++k) {
     		int n = j + (k * high);
    +		size_t want = (sizeof(buffer) - (size_t) (s - buffer));
    +		if (want < 100)
    +		    break;
     		if (n >= pics->colors)
     		    break;
     		if (k) {
     		    *s++ = ' ';
     		    if (digits < 8) {
    -			sprintf(s, "%*s", 8 - digits, " ");
    +			_nc_SPRINTF(s, _nc_SLIMIT(want) "%*s", 8 - digits,
    +				    " ");
     			s += strlen(s);
     		    }
     		}
     		if (pics->fgcol[n].fgcol >= 0) {
    -		    sprintf(s, "%3d #%06X %*d", n,
    -			    pics->fgcol[n].fgcol,
    -			    digits, pics->fgcol[n].count);
    +		    _nc_SPRINTF(s, _nc_SLIMIT(want) "%3d #%06X %*d", n,
    +				pics->fgcol[n].fgcol,
    +				digits, pics->fgcol[n].count);
     		} else {
    -		    sprintf(s, "%3d (empty) %*d", n,
    -			    digits, pics->fgcol[n].count);
    +		    _nc_SPRINTF(s, _nc_SLIMIT(want) "%3d (empty) %*d", n,
    +				digits, pics->fgcol[n].count);
     		}
     		s += strlen(s);
     		if ((s - buffer) > 100)
    diff --git a/test/savescreen.c b/test/savescreen.c
    index d96089da..408020a6 100644
    --- a/test/savescreen.c
    +++ b/test/savescreen.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 2007-2017,2018 Free Software Foundation, Inc.              *
    + * Copyright (c) 2007-2018,2019 Free Software Foundation, Inc.              *
      *                                                                          *
      * Permission is hereby granted, free of charge, to any person obtaining a  *
      * copy of this software and associated documentation files (the            *
    @@ -26,7 +26,7 @@
      * authorization.                                                           *
      ****************************************************************************/
     /*
    - * $Id: savescreen.c,v 1.54 2018/12/29 17:25:56 tom Exp $
    + * $Id: savescreen.c,v 1.55 2019/01/20 15:59:28 tom Exp $
      *
      * Demonstrate save/restore functions from the curses library.
      * Thomas Dickey - 2007/7/14
    @@ -387,7 +387,7 @@ main(int argc, char *argv[])
     			while (col++ < cols) {
     			    int color = (((r * (g_max + 1)) + g) * (b_max + 1)
     					 + b + MAX_ANSI);
    -#if HAVE_INIT_EXTENDED_COLOR
    +#if USE_EXTENDED_COLOR
     			    init_extended_pair(pair, color, color);
     #else
     			    init_pair(pair, color, color);
    diff --git a/test/test.priv.h b/test/test.priv.h
    index f1ac8774..7d115e59 100644
    --- a/test/test.priv.h
    +++ b/test/test.priv.h
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
    + * Copyright (c) 1998-2018,2019 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            *
    @@ -29,7 +29,7 @@
     /****************************************************************************
      *  Author: Thomas E. Dickey                    1996-on                     *
      ****************************************************************************/
    -/* $Id: test.priv.h,v 1.171 2018/12/29 21:44:07 tom Exp $ */
    +/* $Id: test.priv.h,v 1.176 2019/01/21 22:42:35 tom Exp $ */
     
     #ifndef __TEST_PRIV_H
     #define __TEST_PRIV_H 1
    @@ -453,6 +453,12 @@ extern int optind;
     #define getnstr(s,n) getstr(s)
     #endif
     
    +#if HAVE_INIT_EXTENDED_COLOR
    +#define USE_EXTENDED_COLOR 1
    +#else
    +#define USE_EXTENDED_COLOR 0
    +#endif
    +
     #ifndef USE_SOFTKEYS
     #if HAVE_SLK_INIT
     #define USE_SOFTKEYS 1
    @@ -508,9 +514,9 @@ extern int optind;
     
     /* workaround, to build against NetBSD's variant of the form library */
     #ifdef HAVE_NETBSD_FORM_H
    -#define form_getyx(form, y, x) y = current_field(form)->cursor_ypos, x = current_field(form)->cursor_xpos
    +#define form_getyx(form, y, x) y = (int)current_field(form)->cursor_ypos, x = (int)current_field(form)->cursor_xpos
     #else
    -#define form_getyx(form, y, x) y = (form)->currow, x = (form)->curcol
    +#define form_getyx(form, y, x) y = (int)(form)->currow, x = (int)(form)->curcol
     #endif
     
     /* workaround, to build against NetBSD's variant of the form library */
    @@ -682,6 +688,15 @@ extern int optind;
     #define USE_STRING_HACKS 0
     #endif
     
    +#ifndef NCURSES_CAST
    +#ifdef __cplusplus
    +extern "C" {
    +#define NCURSES_CAST(type,value) static_cast(value)
    +#else
    +#define NCURSES_CAST(type,value) (type)(value)
    +#endif
    +#endif
    +
     #if USE_STRING_HACKS && HAVE_STRLCAT
     #define _nc_STRCAT(d,s,n)	NCURSES_VOID strlcat((d),(s),NCURSES_CAST(size_t,n))
     #define _nc_STRNCAT(d,s,m,n)	NCURSES_VOID strlcat((d),(s),NCURSES_CAST(size_t,m))
    @@ -1009,10 +1024,26 @@ extern char *tgoto(char *, int, int);	/* available, but not prototyped */
     #endif
     #endif
     
    +/*
    + * ncurses provides a termcap interface; a few packagers replace or displace
    + * its header file with an incompatible one.  The demo_termcap program uses
    + * the ncurses file, if available.
    + */
    +#ifdef NCURSES_VERSION
    +#ifndef HAVE_NCURSES_TERMCAP_H
    +#define HAVE_NCURSES_TERMCAP_H 0
    +#endif
    +#ifndef HAVE_TERMCAP_H
    +#define HAVE_TERMCAP_H 0
    +#endif
    +#endif
    +
     /*
      * ncurses uses const in some places where X/Open does (or did) not allow.
      */
    -#if defined(NCURSES_VERSION) || defined(PDCURSES)
    +#if defined(NCURSES_CONST)
    +#define CONST_MENUS NCURSES_CONST
    +#elif defined(PDCURSES)
     #define CONST_MENUS const
     #else
     #define CONST_MENUS		/* nothing */
    -- 
    2.44.0