]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.0 - patch 20170930
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 1 Oct 2017 01:37:33 +0000 (01:37 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 1 Oct 2017 01:37:33 +0000 (01:37 +0000)
+ fix a symbol conflict that made ncurses.c C/c menu not work with
  Solaris xpg4 curses.
+ add refresh() call to dots_mvcur.c, needed to use mvcur() with
  Solaris xpg4 curses after calling newterm().
+ minor fixes for configure script from work on ncurses-examples and
  tin.
+ improve animation in test/xmas.c by adding a time-delay in blinkit().
+ modify several test programs to reflect that ncurses honors existing
  signal handlers in initscr(), while other implementations do not.
+ modify bs.c to make it easier to quit.
+ change ncurses-examples to use attr_t vs chtype to follow X/Open
  documentation more closely since Solaris xpg4-curses uses different
  values for WA_xxx vs A_xxx that rely on attr_t being an unsigned
  short.  Tru64 aka OSF1, HPUX, AIX did as ncurses does, equating the
  two sets.

42 files changed:
Ada95/aclocal.m4
NEWS
VERSION
aclocal.m4
dist.mk
include/ncurses_defs
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec
test/aclocal.m4
test/background.c
test/blue.c
test/bs.c
test/chgat.c
test/clip_printw.c
test/configure
test/configure.in
test/demo_new_pair.c
test/dots.c
test/dots_curses.c
test/dots_mvcur.c
test/dots_termcap.c
test/echochar.c
test/filter.c
test/firework.c
test/gdc.c
test/hashtest.c
test/key_names.c
test/ncurses.c
test/newdemo.c
test/railroad.c
test/rain.c
test/savescreen.c
test/test.priv.h
test/test_addchstr.c
test/test_get_wstr.c
test/test_getstr.c
test/view.c
test/xmas.c

index 908be31e356d1777a60c45f39805f5e8d0ed51f2..d86b9ec523699a4c958fc5233644e07541525713 100644 (file)
@@ -28,7 +28,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey
 dnl
 dnl
 dnl Author: Thomas E. Dickey
 dnl
-dnl $Id: aclocal.m4,v 1.119 2017/08/12 12:08:48 tom Exp $
+dnl $Id: aclocal.m4,v 1.120 2017/09/30 19:48:36 tom Exp $
 dnl Macros used in NCURSES Ada95 auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
 dnl Macros used in NCURSES Ada95 auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -524,7 +524,7 @@ AC_SUBST(BUILD_EXEEXT)
 AC_SUBST(BUILD_OBJEXT)
 ])dnl
 dnl ---------------------------------------------------------------------------
 AC_SUBST(BUILD_OBJEXT)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_CC_ENV_FLAGS version: 7 updated: 2017/02/25 18:57:40
+dnl CF_CC_ENV_FLAGS version: 8 updated: 2017/09/23 08:50:24
 dnl ---------------
 dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
 dnl into CC.  This will not help with broken scripts that wrap the compiler
 dnl ---------------
 dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
 dnl into CC.  This will not help with broken scripts that wrap the compiler
@@ -548,7 +548,7 @@ case "$CC" in
        AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options)
        # humor him...
        cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'`
        AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options)
        # humor him...
        cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'`
-       cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr([$]0,1+length(prog))); }'`
+       cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", [substr]([$]0,1+length(prog))); }'`
        CC="$cf_prog"
        for cf_arg in $cf_flags
        do
        CC="$cf_prog"
        for cf_arg in $cf_flags
        do
diff --git a/NEWS b/NEWS
index eee1184d4a48327addf3f33f5b80a9d481aa51a9..0dd7fc949c135da645d7b9967a65fe464cbcd2de 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2955 2017/09/23 15:13:23 tom Exp $
+-- $Id: NEWS,v 1.2961 2017/09/30 23:18:33 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,23 @@ 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.
 
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20170930
+       + fix a symbol conflict that made ncurses.c C/c menu not work with
+         Solaris xpg4 curses.
+       + add refresh() call to dots_mvcur.c, needed to use mvcur() with
+         Solaris xpg4 curses after calling newterm().
+       + minor fixes for configure script from work on ncurses-examples and
+         tin.
+       + improve animation in test/xmas.c by adding a time-delay in blinkit().
+       + modify several test programs to reflect that ncurses honors existing
+         signal handlers in initscr(), while other implementations do not.
+       + modify bs.c to make it easier to quit.
+       + change ncurses-examples to use attr_t vs chtype to follow X/Open
+         documentation more closely since Solaris xpg4-curses uses different
+         values for WA_xxx vs A_xxx that rely on attr_t being an unsigned
+         short.  Tru64 aka OSF1, HPUX, AIX did as ncurses does, equating the
+         two sets.
+
 20170923
        + modify menu for test/ncurses.c to fit on 24-line screen.
        + build-fix for configure --with-caps=uwin
 20170923
        + modify menu for test/ncurses.c to fit on 24-line screen.
        + build-fix for configure --with-caps=uwin
diff --git a/VERSION b/VERSION
index 85c480aa80d9c76ff442b58ca822e568869bff59..83d476af1324f38d49ffa76f4c4b20b20a966d20 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:9  6.0     20170923
+5:0:9  6.0     20170930
index 434989891cc02328aaf3400ed4087c080ebdfbcc..770e5b284a2dfb0e6b98643a73f4a2992530d4de 100644 (file)
@@ -28,7 +28,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: aclocal.m4,v 1.811 2017/08/12 12:06:16 tom Exp $
+dnl $Id: aclocal.m4,v 1.812 2017/09/30 19:44:51 tom Exp $
 dnl Macros used in NCURSES auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
 dnl Macros used in NCURSES auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -727,7 +727,7 @@ AC_SUBST(BUILD_EXEEXT)
 AC_SUBST(BUILD_OBJEXT)
 ])dnl
 dnl ---------------------------------------------------------------------------
 AC_SUBST(BUILD_OBJEXT)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_CC_ENV_FLAGS version: 7 updated: 2017/02/25 18:57:40
+dnl CF_CC_ENV_FLAGS version: 8 updated: 2017/09/23 08:50:24
 dnl ---------------
 dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
 dnl into CC.  This will not help with broken scripts that wrap the compiler
 dnl ---------------
 dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
 dnl into CC.  This will not help with broken scripts that wrap the compiler
@@ -751,7 +751,7 @@ case "$CC" in
        AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options)
        # humor him...
        cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'`
        AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options)
        # humor him...
        cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'`
-       cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr([$]0,1+length(prog))); }'`
+       cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", [substr]([$]0,1+length(prog))); }'`
        CC="$cf_prog"
        for cf_arg in $cf_flags
        do
        CC="$cf_prog"
        for cf_arg in $cf_flags
        do
diff --git a/dist.mk b/dist.mk
index ce58b097c3aa95b94efbb7c08b4dc3262920b63f..edb5da814faf1b51abf2f00c8dba8e43f90b9c83 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.1184 2017/09/19 23:16:48 tom Exp $
+# $Id: dist.mk,v 1.1185 2017/09/28 08:10:00 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -37,7 +37,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 6
 NCURSES_MINOR = 0
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 6
 NCURSES_MINOR = 0
-NCURSES_PATCH = 20170923
+NCURSES_PATCH = 20170930
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 26f76460ba9b267096b0ef7618293653f8389003..669950150d0671fe6b431764531b8198459e5989 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncurses_defs,v 1.80 2017/09/04 15:01:23 tom Exp $
+# $Id: ncurses_defs,v 1.81 2017/09/29 23:56:38 tom Exp $
 ##############################################################################
 # Copyright (c) 2000-2016,2017 Free Software Foundation, Inc.                #
 #                                                                            #
 ##############################################################################
 # Copyright (c) 2000-2016,2017 Free Software Foundation, Inc.                #
 #                                                                            #
@@ -54,6 +54,7 @@ HAVE_COLOR_CONTENT    1
 HAVE_COLOR_SET 1
 HAVE_COPYWIN   1
 HAVE_CURSCR    1
 HAVE_COLOR_SET 1
 HAVE_COPYWIN   1
 HAVE_CURSCR    1
+HAVE_CURSES_DATA_TTYTYPE       1
 HAVE_DERWIN    1
 HAVE_DIRENT_H
 HAVE_DUPWIN    1
 HAVE_DERWIN    1
 HAVE_DIRENT_H
 HAVE_DUPWIN    1
index 741abb2ccdd61a1a982acdd93f8c49641eae80b3..dd792386330d08a0957e74622d76e980ccda6132 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20170923) unstable; urgency=low
+ncurses6 (6.0+20170930) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Tue, 19 Sep 2017 19:16:48 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Thu, 28 Sep 2017 04:10:01 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 741abb2ccdd61a1a982acdd93f8c49641eae80b3..dd792386330d08a0957e74622d76e980ccda6132 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20170923) unstable; urgency=low
+ncurses6 (6.0+20170930) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Tue, 19 Sep 2017 19:16:48 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Thu, 28 Sep 2017 04:10:01 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index e86faee97daba1160c7f83f667ebe0362d8a3489..d65c240c13e150ae3fe92c9ae157194e63457798 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20170923) unstable; urgency=low
+ncurses6 (6.0+20170930) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Tue, 19 Sep 2017 19:16:48 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Thu, 28 Sep 2017 04:10:01 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 379de832083cd92cd81e073068200b43d1fd531d..2a3747d851ca6533132fcce1ad763547a0c900bc 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.232 2017/09/19 23:16:48 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.233 2017/09/28 08:10:00 tom Exp $\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"\r
 !define VERSION_MINOR "0"\r
 !define VERSION_YYYY  "2017"\r
 !define VERSION_MAJOR "6"\r
 !define VERSION_MINOR "0"\r
 !define VERSION_YYYY  "2017"\r
-!define VERSION_MMDD  "0923"\r
+!define VERSION_MMDD  "0930"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 94993dc3d809af171c341dd6f6b17ee8aeb0660a..01bc163f181eb8ac46caa9da38de9c1cc5de3c77 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.0
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.0
-Release: 20170923
+Release: 20170930
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 65e1f37baa31d1120bc5c9e660be20a72c2f228d..97079f60b0d8adc7ef077b31220ad9669188a219 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.0
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.0
-Release: 20170923
+Release: 20170930
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 814f030b06c7cdec0f8ed7c8c7a0f4ba95061831..304da8fa851bcf2716e708b4a84dfa5a72de0403 100644 (file)
@@ -26,7 +26,7 @@ dnl sale, use or other dealings in this Software without prior written       *
 dnl authorization.                                                           *
 dnl***************************************************************************
 dnl
 dnl authorization.                                                           *
 dnl***************************************************************************
 dnl
-dnl $Id: aclocal.m4,v 1.144 2017/09/07 21:08:12 tom Exp $
+dnl $Id: aclocal.m4,v 1.146 2017/09/30 19:41:21 tom Exp $
 dnl
 dnl Author: Thomas E. Dickey
 dnl
 dnl
 dnl Author: Thomas E. Dickey
 dnl
@@ -386,7 +386,7 @@ ifelse([$3],,[    :]dnl
 ])dnl
 ])])dnl
 dnl ---------------------------------------------------------------------------
 ])dnl
 ])])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_CC_ENV_FLAGS version: 7 updated: 2017/02/25 18:57:40
+dnl CF_CC_ENV_FLAGS version: 8 updated: 2017/09/23 08:50:24
 dnl ---------------
 dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
 dnl into CC.  This will not help with broken scripts that wrap the compiler
 dnl ---------------
 dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
 dnl into CC.  This will not help with broken scripts that wrap the compiler
@@ -410,7 +410,7 @@ case "$CC" in
        AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options)
        # humor him...
        cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'`
        AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options)
        # humor him...
        cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'`
-       cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr([$]0,1+length(prog))); }'`
+       cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", [substr]([$]0,1+length(prog))); }'`
        CC="$cf_prog"
        for cf_arg in $cf_flags
        do
        CC="$cf_prog"
        for cf_arg in $cf_flags
        do
@@ -1178,7 +1178,7 @@ if test "x$with_string_hacks" = "xyes"; then
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_ENABLE_WARNINGS version: 4 updated: 2009/07/26 17:53:03
+dnl CF_ENABLE_WARNINGS version: 5 updated: 2017/09/29 20:01:16
 dnl ------------------
 dnl Configure-option to enable gcc warnings
 AC_DEFUN([CF_ENABLE_WARNINGS],[
 dnl ------------------
 dnl Configure-option to enable gcc warnings
 AC_DEFUN([CF_ENABLE_WARNINGS],[
@@ -1193,7 +1193,7 @@ AC_MSG_RESULT($with_warnings)
 if test "$with_warnings" = "yes"
 then
        CF_GCC_ATTRIBUTES
 if test "$with_warnings" = "yes"
 then
        CF_GCC_ATTRIBUTES
-       CF_GCC_WARNINGS
+       CF_GCC_WARNINGS($1)
 fi
 fi
 ])dnl
 fi
 fi
 ])dnl
index e9f266e17f92133e3c23e6eb7dc6da87f4e24e4d..b7c2d1fb72c1237c13d60f5d13697b37d376570a 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: background.c,v 1.16 2017/04/15 14:13:30 tom Exp $
+ * $Id: background.c,v 1.17 2017/09/29 22:54:33 tom Exp $
  */
 
 #define NEED_COLOR_CODE 1
  */
 
 #define NEED_COLOR_CODE 1
@@ -65,7 +65,7 @@ test_background(void)
     printw("Initializing pair 3 to %s/cyan (ACS_HLINE)\n", color_name(default_fg));
     init_pair(3, (NCURSES_COLOR_T) default_fg, COLOR_CYAN);
     printw("...and drawing a box which should be followed by lines\n");
     printw("Initializing pair 3 to %s/cyan (ACS_HLINE)\n", color_name(default_fg));
     init_pair(3, (NCURSES_COLOR_T) default_fg, COLOR_CYAN);
     printw("...and drawing a box which should be followed by lines\n");
-    bkgdset(ACS_HLINE | (attr_t) COLOR_PAIR(3));
+    bkgdset(ACS_HLINE | (chtype) COLOR_PAIR(3));
     /*
      * Characters from vt100 line-drawing should be mapped to line-drawing,
      * since A_ALTCHARSET is set in the background, and the character part
     /*
      * Characters from vt100 line-drawing should be mapped to line-drawing,
      * since A_ALTCHARSET is set in the background, and the character part
index cb088ee830d65e08caccc37f68174e1b764cf37f..9c4108a41a6a6d51717bc4ab8c747bfc136914b1 100644 (file)
@@ -36,7 +36,7 @@
  *****************************************************************************/
 
 /*
  *****************************************************************************/
 
 /*
- * $Id: blue.c,v 1.49 2017/04/15 13:36:36 tom Exp $
+ * $Id: blue.c,v 1.51 2017/09/30 17:43:18 tom Exp $
  */
 
 #include <test.priv.h>
  */
 
 #include <test.priv.h>
@@ -202,7 +202,7 @@ printcard(int value)
     } else {
        int which = (value / SUIT_LENGTH);
        int isuit = (value % SUIT_LENGTH);
     } else {
        int which = (value / SUIT_LENGTH);
        int isuit = (value % SUIT_LENGTH);
-       attr_t color = (attr_t) COLOR_PAIR(((which % 2) == 0)
+       chtype color = (chtype) COLOR_PAIR(((which % 2) == 0)
                                           ? RED_ON_WHITE
                                           : BLACK_ON_WHITE);
 
                                           ? RED_ON_WHITE
                                           : BLACK_ON_WHITE);
 
@@ -467,13 +467,11 @@ use_pc_display(void)
 int
 main(int argc, char *argv[])
 {
 int
 main(int argc, char *argv[])
 {
-    CATCHALL(die);
-
     setlocale(LC_ALL, "");
 
     use_pc_display();
 
     setlocale(LC_ALL, "");
 
     use_pc_display();
 
-    initscr();
+    InitAndCatch(initscr(), die);
 
     start_color();
     init_pair(RED_ON_WHITE, COLOR_RED, COLOR_WHITE);
 
     start_color();
     init_pair(RED_ON_WHITE, COLOR_RED, COLOR_WHITE);
index 5959758858e9c7b284806b12140e17a90c3e36e1..a954d2d2ade23630e2adcaec3ea3f4f5bdf9d77b 100644 (file)
--- a/test/bs.c
+++ b/test/bs.c
@@ -34,7 +34,7 @@
  * v2.0 featuring strict ANSI/POSIX conformance, November 1993.
  * v2.1 with ncurses mouse support, September 1995
  *
  * v2.0 featuring strict ANSI/POSIX conformance, November 1993.
  * v2.1 with ncurses mouse support, September 1995
  *
- * $Id: bs.c,v 1.68 2017/06/17 18:45:40 tom Exp $
+ * $Id: bs.c,v 1.70 2017/09/30 15:40:39 tom Exp $
  */
 
 #include <test.priv.h>
  */
 
 #include <test.priv.h>
@@ -64,6 +64,8 @@ static int getcoord(int);
 #define CTRLC          '\003'  /* used as terminate command */
 #define FF             '\014'  /* used as redraw command */
 
 #define CTRLC          '\003'  /* used as terminate command */
 #define FF             '\014'  /* used as redraw command */
 
+#define is_QUIT(c) ((c) == CTRLC || (c) == QUIT)
+
 /* coordinate handling */
 #define BWIDTH         10
 #define BDEPTH         10
 /* coordinate handling */
 #define BWIDTH         10
 #define BDEPTH         10
@@ -145,6 +147,7 @@ static bool checkplace(int b, ship_t * ss, int vis);
 
 #define SHIPIT(name, symbol, length) { name, 0, symbol, length, 0,0, 0, FALSE }
 
 
 #define SHIPIT(name, symbol, length) { name, 0, symbol, length, 0,0, 0, FALSE }
 
+/* "ply=player", "cpu=computer" */
 static ship_t plyship[SHIPTYPES] =
 {
     SHIPIT(carrier, 'A', 5),
 static ship_t plyship[SHIPTYPES] =
 {
     SHIPIT(carrier, 'A', 5),
@@ -219,8 +222,7 @@ intro(void)
 
     srand((unsigned) (time(0L) + getpid()));   /* Kick the random number generator */
 
 
     srand((unsigned) (time(0L) + getpid()));   /* Kick the random number generator */
 
-    CATCHALL(uninitgame);
-    (void) initscr();
+    InitAndCatch(initscr(), uninitgame);
 
     if ((tmpname = getlogin()) != 0 &&
        (your_name = strdup(tmpname)) != 0) {
 
     if ((tmpname = getlogin()) != 0 &&
        (your_name = strdup(tmpname)) != 0) {
@@ -462,9 +464,11 @@ initgame(void)
        do {
            c = (char) getch();
        } while
        do {
            c = (char) getch();
        } while
-           (!(strchr("hjkl8462rR", c) || c == FF));
+           (!(strchr("hjkl8462rR", c) || c == FF || is_QUIT(c)));
 
 
-       if (c == FF) {
+       if (is_QUIT(c)) {
+           uninitgame(0);
+       } else if (c == FF) {
            (void) clearok(stdscr, TRUE);
            (void) refresh();
        } else if (ss == 0) {
            (void) clearok(stdscr, TRUE);
            (void) refresh();
        } else if (ss == 0) {
@@ -885,7 +889,7 @@ sgetc(const char *s)
        ch = getch();
        if (islower(ch))
            ch = toupper(ch);
        ch = getch();
        if (islower(ch))
            ch = toupper(ch);
-       if (ch == CTRLC)
+       if (is_QUIT(ch))
            uninitgame(0);
        for (s1 = s; *s1 && ch != *s1; ++s1)
            continue;
            uninitgame(0);
        for (s1 = s; *s1 && ch != *s1; ++s1)
            continue;
index 56f6d2cbb8c619ac54eb473932470ed128597e21..72dd48b6afff9765e4a8b48674c06d7f29fdb01f 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: chgat.c,v 1.16 2017/04/16 15:15:34 tom Exp $
+ * $Id: chgat.c,v 1.17 2017/09/28 23:04:14 tom Exp $
  *
  * test-driver for chgat/wchgat/mvchgat/mvwchgat
  */
  *
  * test-driver for chgat/wchgat/mvchgat/mvwchgat
  */
@@ -103,11 +103,11 @@ video_params(size_t state, attr_t *attr)
        attr_t attr;
        const char *msg;
     } table[] = {
        attr_t attr;
        const char *msg;
     } table[] = {
-       { A_NORMAL,     "normal" },
-       { A_BOLD,       "bold" },
-       { A_REVERSE,    "reverse" },
-       { A_UNDERLINE,  "underline" },
-       { A_BLINK,      "blink" },
+       { WA_NORMAL,    "normal" },
+       { WA_BOLD,      "bold" },
+       { WA_REVERSE,   "reverse" },
+       { WA_UNDERLINE, "underline" },
+       { WA_BLINK,     "blink" },
     };
     /* *INDENT-ON* */
 
     };
     /* *INDENT-ON* */
 
index ef55954ee99d4f55779c3a600e381d4912ce9c86..a1ee516bad2f28b1f2dca13881ad37be2d8765f7 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: clip_printw.c,v 1.14 2017/04/15 17:28:10 tom Exp $
+ * $Id: clip_printw.c,v 1.15 2017/09/28 23:07:23 tom Exp $
  *
  * demonstrate how to use printw without wrapping.
  */
  *
  * demonstrate how to use printw without wrapping.
  */
@@ -133,11 +133,11 @@ video_params(unsigned state, attr_t *attr)
        attr_t attr;
        const char *msg;
     } table[] = {
        attr_t attr;
        const char *msg;
     } table[] = {
-       { A_NORMAL,     "normal" },
-       { A_BOLD,       "bold" },
-       { A_REVERSE,    "reverse" },
-       { A_UNDERLINE,  "underline" },
-       { A_BLINK,      "blink" },
+       { WA_NORMAL,    "normal" },
+       { WA_BOLD,      "bold" },
+       { WA_REVERSE,   "reverse" },
+       { WA_UNDERLINE, "underline" },
+       { WA_BLINK,     "blink" },
     };
     /* *INDENT-ON* */
 
     };
     /* *INDENT-ON* */
 
index a5956500f8c4f300e157ffba5b1548daee42ca47..01f9a21adb79917098e51e3abcc04cbfee867e42 100755 (executable)
        fi
 fi
 
        fi
 fi
 
-for cf_data in curscr
+for cf_data in \
+curscr \
+ospeed \
+boolnames \
+boolfnames \
+ttytype
 do
 do
-echo "$as_me:17147: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
+echo "$as_me:17152: 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
 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 17151 "configure"
+#line 17156 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_XCURSES
 #include "confdefs.h"
 
 #ifdef HAVE_XCURSES
@@ -17176,16 +17181,16 @@ void *foo = &($cf_data)
 }
 _ACEOF
 rm -f conftest.$ac_objext
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:17179: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:17184: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:17182: \$? = $ac_status" >&5
+  echo "$as_me:17187: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:17185: \"$ac_try\"") >&5
+  { (eval echo "$as_me:17190: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:17188: \$? = $ac_status" >&5
+  echo "$as_me:17193: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 
   (exit $ac_status); }; }; then
   cf_result=yes
 
@@ -17195,7 +17200,7 @@ cat conftest.$ac_ext >&5
 cf_result=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 cf_result=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:17198: result: $cf_result" >&5
+echo "$as_me:17203: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
 
 if test $cf_result = yes ; then
 echo "${ECHO_T}$cf_result" >&6
 
 if test $cf_result = yes ; then
@@ -17207,14 +17212,14 @@ cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./
 EOF
 
 else
 EOF
 
 else
-       echo "$as_me:17210: checking for data $cf_data in library" >&5
+       echo "$as_me:17215: 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
 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 17217 "configure"
+#line 17222 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_XCURSES
 #include "confdefs.h"
 
 #ifdef HAVE_XCURSES
@@ -17247,16 +17252,16 @@ main (void)
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:17250: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17255: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:17253: \$? = $ac_status" >&5
+  echo "$as_me:17258: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:17256: \"$ac_try\"") >&5
+  { (eval echo "$as_me:17261: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:17259: \$? = $ac_status" >&5
+  echo "$as_me:17264: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 else
   (exit $ac_status); }; }; then
   cf_result=yes
 else
@@ -17268,7 +17273,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
 else
   cat >conftest.$ac_ext <<_ACEOF
 
 else
   cat >conftest.$ac_ext <<_ACEOF
-#line 17271 "configure"
+#line 17276 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_XCURSES
 #include "confdefs.h"
 
 #ifdef HAVE_XCURSES
@@ -17294,763 +17299,15 @@ int main(void)
 }
 _ACEOF
 rm -f conftest$ac_exeext
 }
 _ACEOF
 rm -f conftest$ac_exeext
-if { (eval echo "$as_me:17297: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17302: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:17300: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:17302: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
   echo "$as_me:17305: \$? = $ac_status" >&5
   echo "$as_me:17305: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_result=yes
-
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_result=no
-fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-       echo "$as_me:17317: result: $cf_result" >&5
-echo "${ECHO_T}$cf_result" >&6
-       if test $cf_result = yes ; then
-
-cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-
-               cat >>confdefs.h <<EOF
-#define $cf_result 1
-EOF
-
-               # do not exit loop here, since we prefer system's declarations
-       fi
-fi
-done
-
-for cf_data in ospeed
-do
-echo "$as_me:17334: 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 17338 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_XCURSES
-#include <xcurses.h>
-char * XCursesProgramName = "test";
-#else
-#include <${cf_cv_ncurses_header:-curses.h}>
-#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-#include <ncursesw/term.h>
-#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-#include <ncurses/term.h>
-#elif defined(HAVE_TERM_H)
-#include <term.h>
-#endif
-#endif
-
-int
-main (void)
-{
-
-void *foo = &($cf_data)
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:17366: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:17369: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:17372: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:17375: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_result=yes
-
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_result=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:17385: result: $cf_result" >&5
-echo "${ECHO_T}$cf_result" >&6
-
-if test $cf_result = yes ; then
-
-cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-
-       cat >>confdefs.h <<EOF
-#define $cf_result 1
-EOF
-
-else
-       echo "$as_me:17397: 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 17404 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_XCURSES
-#include <xcurses.h>
-char * XCursesProgramName = "test";
-#else
-#include <${cf_cv_ncurses_header:-curses.h}>
-#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-#include <ncursesw/term.h>
-#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-#include <ncurses/term.h>
-#elif defined(HAVE_TERM_H)
-#include <term.h>
-#endif
-#endif
-
-extern char $cf_data;
-int
-main (void)
-{
-
-       do {
-               void *foo = &($cf_data);
-               fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
-               ${cf_cv_main_return:-return}(foo == 0);
-       } while (0)
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:17437: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:17440: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:17443: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:17446: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_result=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_result=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 17458 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_XCURSES
-#include <xcurses.h>
-char * XCursesProgramName = "test";
-#else
-#include <${cf_cv_ncurses_header:-curses.h}>
-#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-#include <ncursesw/term.h>
-#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-#include <ncurses/term.h>
-#elif defined(HAVE_TERM_H)
-#include <term.h>
-#endif
-#endif
-
-extern char $cf_data;
-int main(void)
-{
-       void *foo = &($cf_data);
-       fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
-       ${cf_cv_main_return:-return}(foo == 0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:17484: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:17487: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:17489: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:17492: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_result=yes
-
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_result=no
-fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-       echo "$as_me:17504: result: $cf_result" >&5
-echo "${ECHO_T}$cf_result" >&6
-       if test $cf_result = yes ; then
-
-cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-
-               cat >>confdefs.h <<EOF
-#define $cf_result 1
-EOF
-
-               # do not exit loop here, since we prefer system's declarations
-       fi
-fi
-done
-
-for cf_data in boolnames
-do
-echo "$as_me:17521: 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 17525 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_XCURSES
-#include <xcurses.h>
-char * XCursesProgramName = "test";
-#else
-#include <${cf_cv_ncurses_header:-curses.h}>
-#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-#include <ncursesw/term.h>
-#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-#include <ncurses/term.h>
-#elif defined(HAVE_TERM_H)
-#include <term.h>
-#endif
-#endif
-
-int
-main (void)
-{
-
-void *foo = &($cf_data)
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:17553: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:17556: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:17559: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:17562: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_result=yes
-
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_result=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:17572: result: $cf_result" >&5
-echo "${ECHO_T}$cf_result" >&6
-
-if test $cf_result = yes ; then
-
-cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-
-       cat >>confdefs.h <<EOF
-#define $cf_result 1
-EOF
-
-else
-       echo "$as_me:17584: 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 17591 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_XCURSES
-#include <xcurses.h>
-char * XCursesProgramName = "test";
-#else
-#include <${cf_cv_ncurses_header:-curses.h}>
-#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-#include <ncursesw/term.h>
-#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-#include <ncurses/term.h>
-#elif defined(HAVE_TERM_H)
-#include <term.h>
-#endif
-#endif
-
-extern char $cf_data;
-int
-main (void)
-{
-
-       do {
-               void *foo = &($cf_data);
-               fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
-               ${cf_cv_main_return:-return}(foo == 0);
-       } while (0)
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:17624: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:17627: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:17630: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:17633: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_result=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_result=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 17645 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_XCURSES
-#include <xcurses.h>
-char * XCursesProgramName = "test";
-#else
-#include <${cf_cv_ncurses_header:-curses.h}>
-#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-#include <ncursesw/term.h>
-#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-#include <ncurses/term.h>
-#elif defined(HAVE_TERM_H)
-#include <term.h>
-#endif
-#endif
-
-extern char $cf_data;
-int main(void)
-{
-       void *foo = &($cf_data);
-       fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
-       ${cf_cv_main_return:-return}(foo == 0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:17671: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:17674: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:17676: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:17679: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_result=yes
-
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_result=no
-fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-       echo "$as_me:17691: result: $cf_result" >&5
-echo "${ECHO_T}$cf_result" >&6
-       if test $cf_result = yes ; then
-
-cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-
-               cat >>confdefs.h <<EOF
-#define $cf_result 1
-EOF
-
-               # do not exit loop here, since we prefer system's declarations
-       fi
-fi
-done
-
-for cf_data in boolfnames
-do
-echo "$as_me:17708: 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 17712 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_XCURSES
-#include <xcurses.h>
-char * XCursesProgramName = "test";
-#else
-#include <${cf_cv_ncurses_header:-curses.h}>
-#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-#include <ncursesw/term.h>
-#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-#include <ncurses/term.h>
-#elif defined(HAVE_TERM_H)
-#include <term.h>
-#endif
-#endif
-
-int
-main (void)
-{
-
-void *foo = &($cf_data)
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:17740: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:17743: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:17746: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:17749: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_result=yes
-
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_result=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:17759: result: $cf_result" >&5
-echo "${ECHO_T}$cf_result" >&6
-
-if test $cf_result = yes ; then
-
-cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-
-       cat >>confdefs.h <<EOF
-#define $cf_result 1
-EOF
-
-else
-       echo "$as_me:17771: 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 17778 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_XCURSES
-#include <xcurses.h>
-char * XCursesProgramName = "test";
-#else
-#include <${cf_cv_ncurses_header:-curses.h}>
-#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-#include <ncursesw/term.h>
-#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-#include <ncurses/term.h>
-#elif defined(HAVE_TERM_H)
-#include <term.h>
-#endif
-#endif
-
-extern char $cf_data;
-int
-main (void)
-{
-
-       do {
-               void *foo = &($cf_data);
-               fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
-               ${cf_cv_main_return:-return}(foo == 0);
-       } while (0)
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:17811: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:17814: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:17817: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:17820: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_result=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_result=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 17832 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_XCURSES
-#include <xcurses.h>
-char * XCursesProgramName = "test";
-#else
-#include <${cf_cv_ncurses_header:-curses.h}>
-#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-#include <ncursesw/term.h>
-#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-#include <ncurses/term.h>
-#elif defined(HAVE_TERM_H)
-#include <term.h>
-#endif
-#endif
-
-extern char $cf_data;
-int main(void)
-{
-       void *foo = &($cf_data);
-       fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
-       ${cf_cv_main_return:-return}(foo == 0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:17858: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:17861: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:17863: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:17866: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_result=yes
-
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_result=no
-fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-       echo "$as_me:17878: result: $cf_result" >&5
-echo "${ECHO_T}$cf_result" >&6
-       if test $cf_result = yes ; then
-
-cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-
-               cat >>confdefs.h <<EOF
-#define $cf_result 1
-EOF
-
-               # do not exit loop here, since we prefer system's declarations
-       fi
-fi
-done
-
-for cf_data in ttytype
-do
-echo "$as_me:17895: 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 17899 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_XCURSES
-#include <xcurses.h>
-char * XCursesProgramName = "test";
-#else
-#include <${cf_cv_ncurses_header:-curses.h}>
-#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-#include <ncursesw/term.h>
-#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-#include <ncurses/term.h>
-#elif defined(HAVE_TERM_H)
-#include <term.h>
-#endif
-#endif
-
-int
-main (void)
-{
-
-void *foo = &($cf_data)
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:17927: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:17930: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:17933: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:17936: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_result=yes
-
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_result=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:17946: result: $cf_result" >&5
-echo "${ECHO_T}$cf_result" >&6
-
-if test $cf_result = yes ; then
-
-cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-
-       cat >>confdefs.h <<EOF
-#define $cf_result 1
-EOF
-
-else
-       echo "$as_me:17958: 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 17965 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_XCURSES
-#include <xcurses.h>
-char * XCursesProgramName = "test";
-#else
-#include <${cf_cv_ncurses_header:-curses.h}>
-#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-#include <ncursesw/term.h>
-#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-#include <ncurses/term.h>
-#elif defined(HAVE_TERM_H)
-#include <term.h>
-#endif
-#endif
-
-extern char $cf_data;
-int
-main (void)
-{
-
-       do {
-               void *foo = &($cf_data);
-               fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
-               ${cf_cv_main_return:-return}(foo == 0);
-       } while (0)
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:17998: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:18001: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:18004: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:18007: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  cf_result=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_result=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line 18019 "configure"
-#include "confdefs.h"
-
-#ifdef HAVE_XCURSES
-#include <xcurses.h>
-char * XCursesProgramName = "test";
-#else
-#include <${cf_cv_ncurses_header:-curses.h}>
-#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
-#include <ncursesw/term.h>
-#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
-#include <ncurses/term.h>
-#elif defined(HAVE_TERM_H)
-#include <term.h>
-#endif
-#endif
-
-extern char $cf_data;
-int main(void)
-{
-       void *foo = &($cf_data);
-       fprintf(stderr, "testing linkage of $cf_data:%p\n", foo);
-       ${cf_cv_main_return:-return}(foo == 0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:18045: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:18048: \$? = $ac_status" >&5
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:18050: \"$ac_try\"") >&5
+  { (eval echo "$as_me:17307: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:18053: \$? = $ac_status" >&5
+  echo "$as_me:17310: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_result=yes
 
   (exit $ac_status); }; }; then
   cf_result=yes
 
@@ -18062,7 +17319,7 @@ cf_result=no
 fi
 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 fi
 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-       echo "$as_me:18065: result: $cf_result" >&5
+       echo "$as_me:17322: result: $cf_result" >&5
 echo "${ECHO_T}$cf_result" >&6
        if test $cf_result = yes ; then
 
 echo "${ECHO_T}$cf_result" >&6
        if test $cf_result = yes ; then
 
@@ -18079,7 +17336,7 @@ done
 
 if ( test "$GCC" = yes || test "$GXX" = yes )
 then
 
 if ( test "$GCC" = yes || test "$GXX" = yes )
 then
-echo "$as_me:18082: checking if you want to turn on gcc warnings" >&5
+echo "$as_me:17339: 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.
 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
 
 # Check whether --enable-warnings or --disable-warnings was given.
@@ -18096,7 +17353,7 @@ else
        with_warnings=no
 
 fi;
        with_warnings=no
 
 fi;
-echo "$as_me:18099: result: $with_warnings" >&5
+echo "$as_me:17356: result: $with_warnings" >&5
 echo "${ECHO_T}$with_warnings" >&6
 if test "$with_warnings" = "yes"
 then
 echo "${ECHO_T}$with_warnings" >&6
 if test "$with_warnings" = "yes"
 then
@@ -18119,10 +17376,10 @@ cat > conftest.i <<EOF
 EOF
 if test "$GCC" = yes
 then
 EOF
 if test "$GCC" = yes
 then
-       { echo "$as_me:18122: checking for $CC __attribute__ directives..." >&5
+       { echo "$as_me:17379: checking for $CC __attribute__ directives..." >&5
 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
 cat > conftest.$ac_ext <<EOF
 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
 cat > conftest.$ac_ext <<EOF
-#line 18125 "${as_me:-configure}"
+#line 17382 "${as_me:-configure}"
 #include "confdefs.h"
 #include "conftest.h"
 #include "conftest.i"
 #include "confdefs.h"
 #include "conftest.h"
 #include "conftest.i"
@@ -18171,12 +17428,12 @@ EOF
                        ;;
                esac
 
                        ;;
                esac
 
-               if { (eval echo "$as_me:18174: \"$ac_compile\"") >&5
+               if { (eval echo "$as_me:17431: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:18177: \$? = $ac_status" >&5
+  echo "$as_me:17434: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   (exit $ac_status); }; then
-                       test -n "$verbose" && echo "$as_me:18179: result: ... $cf_attribute" >&5
+                       test -n "$verbose" && echo "$as_me:17436: result: ... $cf_attribute" >&5
 echo "${ECHO_T}... $cf_attribute" >&6
                        cat conftest.h >>confdefs.h
                        case $cf_attribute in
 echo "${ECHO_T}... $cf_attribute" >&6
                        cat conftest.h >>confdefs.h
                        case $cf_attribute in
@@ -18240,12 +17497,12 @@ INTEL_COMPILER=no
 if test "$GCC" = yes ; then
        case $host_os in
        (linux*|gnu*)
 if test "$GCC" = yes ; then
        case $host_os in
        (linux*|gnu*)
-               echo "$as_me:18243: checking if this is really Intel C compiler" >&5
+               echo "$as_me:17500: 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
 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 18248 "configure"
+#line 17505 "configure"
 #include "confdefs.h"
 
 int
 #include "confdefs.h"
 
 int
@@ -18262,16 +17519,16 @@ make an error
 }
 _ACEOF
 rm -f conftest.$ac_objext
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:18265: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:17522: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:18268: \$? = $ac_status" >&5
+  echo "$as_me:17525: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:18271: \"$ac_try\"") >&5
+  { (eval echo "$as_me:17528: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:18274: \$? = $ac_status" >&5
+  echo "$as_me:17531: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   INTEL_COMPILER=yes
 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
   (exit $ac_status); }; }; then
   INTEL_COMPILER=yes
 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
@@ -18282,7 +17539,7 @@ cat conftest.$ac_ext >&5
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
                CFLAGS="$cf_save_CFLAGS"
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
                CFLAGS="$cf_save_CFLAGS"
-               echo "$as_me:18285: result: $INTEL_COMPILER" >&5
+               echo "$as_me:17542: result: $INTEL_COMPILER" >&5
 echo "${ECHO_T}$INTEL_COMPILER" >&6
                ;;
        esac
 echo "${ECHO_T}$INTEL_COMPILER" >&6
                ;;
        esac
 CLANG_COMPILER=no
 
 if test "$GCC" = yes ; then
 CLANG_COMPILER=no
 
 if test "$GCC" = yes ; then
-       echo "$as_me:18294: checking if this is really Clang C compiler" >&5
+       echo "$as_me:17551: 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
 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 18299 "configure"
+#line 17556 "configure"
 #include "confdefs.h"
 
 int
 #include "confdefs.h"
 
 int
@@ -18313,16 +17570,16 @@ make an error
 }
 _ACEOF
 rm -f conftest.$ac_objext
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:18316: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:17573: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:18319: \$? = $ac_status" >&5
+  echo "$as_me:17576: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
   (exit $ac_status); } &&
          { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:18322: \"$ac_try\"") >&5
+  { (eval echo "$as_me:17579: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:18325: \$? = $ac_status" >&5
+  echo "$as_me:17582: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   CLANG_COMPILER=yes
 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
   (exit $ac_status); }; }; then
   CLANG_COMPILER=yes
 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
@@ -18333,12 +17590,12 @@ cat conftest.$ac_ext >&5
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
        CFLAGS="$cf_save_CFLAGS"
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
        CFLAGS="$cf_save_CFLAGS"
-       echo "$as_me:18336: result: $CLANG_COMPILER" >&5
+       echo "$as_me:17593: result: $CLANG_COMPILER" >&5
 echo "${ECHO_T}$CLANG_COMPILER" >&6
 fi
 
 cat > conftest.$ac_ext <<EOF
 echo "${ECHO_T}$CLANG_COMPILER" >&6
 fi
 
 cat > conftest.$ac_ext <<EOF
-#line 18341 "${as_me:-configure}"
+#line 17598 "${as_me:-configure}"
 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
 EOF
 
 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
 EOF
 
@@ -18355,7 +17612,7 @@ then
 # remark #981: operands are evaluated in unspecified order
 # warning #279: controlling expression is constant
 
 # remark #981: operands are evaluated in unspecified order
 # warning #279: controlling expression is constant
 
-       { echo "$as_me:18358: checking for $CC warning options..." >&5
+       { echo "$as_me:17615: checking for $CC warning options..." >&5
 echo "$as_me: checking for $CC warning options..." >&6;}
        cf_save_CFLAGS="$CFLAGS"
        EXTRA_CFLAGS="-Wall"
 echo "$as_me: checking for $CC warning options..." >&6;}
        cf_save_CFLAGS="$CFLAGS"
        EXTRA_CFLAGS="-Wall"
@@ -18371,12 +17628,12 @@ echo "$as_me: checking for $CC warning options..." >&6;}
                wd981
        do
                CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
                wd981
        do
                CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
-               if { (eval echo "$as_me:18374: \"$ac_compile\"") >&5
+               if { (eval echo "$as_me:17631: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:18377: \$? = $ac_status" >&5
+  echo "$as_me:17634: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   (exit $ac_status); }; then
-                       test -n "$verbose" && echo "$as_me:18379: result: ... -$cf_opt" >&5
+                       test -n "$verbose" && echo "$as_me:17636: result: ... -$cf_opt" >&5
 echo "${ECHO_T}... -$cf_opt" >&6
                        EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
                fi
 echo "${ECHO_T}... -$cf_opt" >&6
                        EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
                fi
@@ -18385,7 +17642,7 @@ echo "${ECHO_T}... -$cf_opt" >&6
 
 elif test "$GCC" = yes
 then
 
 elif test "$GCC" = yes
 then
-       { echo "$as_me:18388: checking for $CC warning options..." >&5
+       { echo "$as_me:17645: checking for $CC warning options..." >&5
 echo "$as_me: checking for $CC warning options..." >&6;}
        cf_save_CFLAGS="$CFLAGS"
        EXTRA_CFLAGS=
 echo "$as_me: checking for $CC warning options..." >&6;}
        cf_save_CFLAGS="$CFLAGS"
        EXTRA_CFLAGS=
@@ -18406,15 +17663,15 @@ echo "$as_me: checking for $CC warning options..." >&6;}
                Wpointer-arith \
                Wshadow \
                Wstrict-prototypes \
                Wpointer-arith \
                Wshadow \
                Wstrict-prototypes \
-               Wundef $cf_gcc_warnings $cf_warn_CONST
+               Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
        do
                CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
        do
                CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
-               if { (eval echo "$as_me:18412: \"$ac_compile\"") >&5
+               if { (eval echo "$as_me:17669: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:18415: \$? = $ac_status" >&5
+  echo "$as_me:17672: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   (exit $ac_status); }; then
-                       test -n "$verbose" && echo "$as_me:18417: result: ... -$cf_opt" >&5
+                       test -n "$verbose" && echo "$as_me:17674: result: ... -$cf_opt" >&5
 echo "${ECHO_T}... -$cf_opt" >&6
                        case $cf_opt in
                        (Wcast-qual)
 echo "${ECHO_T}... -$cf_opt" >&6
                        case $cf_opt in
                        (Wcast-qual)
@@ -18425,7 +17682,7 @@ echo "${ECHO_T}... -$cf_opt" >&6
                                ([34].*)
                                        test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
 
                                ([34].*)
                                        test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
 
-echo "${as_me:-configure}:18428: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
+echo "${as_me:-configure}:17685: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
 
                                        continue;;
                                esac
 
                                        continue;;
                                esac
@@ -18435,7 +17692,7 @@ echo "${as_me:-configure}:18428: testing feature is broken in gcc $GCC_VERSION .
                                ([12].*)
                                        test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
 
                                ([12].*)
                                        test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
 
-echo "${as_me:-configure}:18438: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
+echo "${as_me:-configure}:17695: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
 
                                        continue;;
                                esac
 
                                        continue;;
                                esac
@@ -18451,7 +17708,7 @@ rm -rf conftest*
 fi
 fi
 
 fi
 fi
 
-echo "$as_me:18454: checking if you want to use dmalloc for testing" >&5
+echo "$as_me:17711: 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.
 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
 
 # Check whether --with-dmalloc or --without-dmalloc was given.
@@ -18468,7 +17725,7 @@ EOF
 else
   with_dmalloc=
 fi;
 else
   with_dmalloc=
 fi;
-echo "$as_me:18471: result: ${with_dmalloc:-no}" >&5
+echo "$as_me:17728: result: ${with_dmalloc:-no}" >&5
 echo "${ECHO_T}${with_dmalloc:-no}" >&6
 
 case .$with_cflags in
 echo "${ECHO_T}${with_dmalloc:-no}" >&6
 
 case .$with_cflags in
 esac
 
 if test "$with_dmalloc" = yes ; then
 esac
 
 if test "$with_dmalloc" = yes ; then
-       echo "$as_me:18585: checking for dmalloc.h" >&5
+       echo "$as_me:17842: 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
 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 18591 "configure"
+#line 17848 "configure"
 #include "confdefs.h"
 #include <dmalloc.h>
 _ACEOF
 #include "confdefs.h"
 #include <dmalloc.h>
 _ACEOF
-if { (eval echo "$as_me:18595: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:17852: \"$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
   (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:18601: \$? = $ac_status" >&5
+  echo "$as_me:17858: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -18617,11 +17874,11 @@ else
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:18620: result: $ac_cv_header_dmalloc_h" >&5
+echo "$as_me:17877: 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 "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
 if test $ac_cv_header_dmalloc_h = yes; then
 
-echo "$as_me:18624: checking for dmalloc_debug in -ldmalloc" >&5
+echo "$as_me:17881: 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
 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
@@ -18629,7 +17886,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldmalloc  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldmalloc  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 18632 "configure"
+#line 17889 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -18648,16 +17905,16 @@ dmalloc_debug ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:18651: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17908: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:18654: \$? = $ac_status" >&5
+  echo "$as_me:17911: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:18657: \"$ac_try\"") >&5
+  { (eval echo "$as_me:17914: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:18660: \$? = $ac_status" >&5
+  echo "$as_me:17917: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_dmalloc_dmalloc_debug=yes
 else
   (exit $ac_status); }; }; then
   ac_cv_lib_dmalloc_dmalloc_debug=yes
 else
@@ -18668,7 +17925,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:18671: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
+echo "$as_me:17928: 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 <<EOF
 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
   cat >>confdefs.h <<EOF
@@ -18683,7 +17940,7 @@ fi
 
 fi
 
 
 fi
 
-echo "$as_me:18686: checking if you want to use dbmalloc for testing" >&5
+echo "$as_me:17943: 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.
 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
 
 # Check whether --with-dbmalloc or --without-dbmalloc was given.
@@ -18700,7 +17957,7 @@ EOF
 else
   with_dbmalloc=
 fi;
 else
   with_dbmalloc=
 fi;
-echo "$as_me:18703: result: ${with_dbmalloc:-no}" >&5
+echo "$as_me:17960: result: ${with_dbmalloc:-no}" >&5
 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
 
 case .$with_cflags in
 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
 
 case .$with_cflags in
 esac
 
 if test "$with_dbmalloc" = yes ; then
 esac
 
 if test "$with_dbmalloc" = yes ; then
-       echo "$as_me:18817: checking for dbmalloc.h" >&5
+       echo "$as_me:18074: 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
 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 18823 "configure"
+#line 18080 "configure"
 #include "confdefs.h"
 #include <dbmalloc.h>
 _ACEOF
 #include "confdefs.h"
 #include <dbmalloc.h>
 _ACEOF
-if { (eval echo "$as_me:18827: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:18084: \"$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
   (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:18833: \$? = $ac_status" >&5
+  echo "$as_me:18090: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
   (exit $ac_status); } >/dev/null; then
   if test -s conftest.err; then
     ac_cpp_err=$ac_c_preproc_warn_flag
@@ -18849,11 +18106,11 @@ else
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
 fi
 rm -f conftest.err conftest.$ac_ext
 fi
-echo "$as_me:18852: result: $ac_cv_header_dbmalloc_h" >&5
+echo "$as_me:18109: 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 "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
 if test $ac_cv_header_dbmalloc_h = yes; then
 
-echo "$as_me:18856: checking for debug_malloc in -ldbmalloc" >&5
+echo "$as_me:18113: 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
 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
@@ -18861,7 +18118,7 @@ else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldbmalloc  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-ldbmalloc  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line 18864 "configure"
+#line 18121 "configure"
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
 #include "confdefs.h"
 
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -18880,16 +18137,16 @@ debug_malloc ();
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:18883: \"$ac_link\"") >&5
+if { (eval echo "$as_me:18140: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:18886: \$? = $ac_status" >&5
+  echo "$as_me:18143: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:18889: \"$ac_try\"") >&5
+  { (eval echo "$as_me:18146: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:18892: \$? = $ac_status" >&5
+  echo "$as_me:18149: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_cv_lib_dbmalloc_debug_malloc=yes
 else
   (exit $ac_status); }; }; then
   ac_cv_lib_dbmalloc_debug_malloc=yes
 else
@@ -18900,7 +18157,7 @@ fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:18903: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
+echo "$as_me:18160: 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 <<EOF
 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
   cat >>confdefs.h <<EOF
@@ -18915,7 +18172,7 @@ fi
 
 fi
 
 
 fi
 
-echo "$as_me:18918: checking if you want to use valgrind for testing" >&5
+echo "$as_me:18175: 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.
 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
 
 # Check whether --with-valgrind or --without-valgrind was given.
@@ -18932,7 +18189,7 @@ EOF
 else
   with_valgrind=
 fi;
 else
   with_valgrind=
 fi;
-echo "$as_me:18935: result: ${with_valgrind:-no}" >&5
+echo "$as_me:18192: result: ${with_valgrind:-no}" >&5
 echo "${ECHO_T}${with_valgrind:-no}" >&6
 
 case .$with_cflags in
 echo "${ECHO_T}${with_valgrind:-no}" >&6
 
 case .$with_cflags in
@@ -19045,7 +18302,7 @@ fi
        ;;
 esac
 
        ;;
 esac
 
-echo "$as_me:19048: checking if you want to perform memory-leak testing" >&5
+echo "$as_me:18305: 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.
 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
 
 # Check whether --enable-leaks or --disable-leaks was given.
@@ -19055,7 +18312,7 @@ if test "${enable_leaks+set}" = set; then
 else
   : ${with_no_leaks:=no}
 fi;
 else
   : ${with_no_leaks:=no}
 fi;
-echo "$as_me:19058: result: $with_no_leaks" >&5
+echo "$as_me:18315: result: $with_no_leaks" >&5
 echo "${ECHO_T}$with_no_leaks" >&6
 
 if test "$with_no_leaks" = yes ; then
 echo "${ECHO_T}$with_no_leaks" >&6
 
 if test "$with_no_leaks" = yes ; then
@@ -19071,7 +18328,7 @@ EOF
 fi
 
 LD_RPATH_OPT=
 fi
 
 LD_RPATH_OPT=
-echo "$as_me:19074: checking for an rpath option" >&5
+echo "$as_me:18331: checking for an rpath option" >&5
 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
 case $cf_cv_system_name in
 (irix*)
 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
 case $cf_cv_system_name in
 (irix*)
@@ -19102,12 +18359,12 @@ case $cf_cv_system_name in
 (*)
        ;;
 esac
 (*)
        ;;
 esac
-echo "$as_me:19105: result: $LD_RPATH_OPT" >&5
+echo "$as_me:18362: result: $LD_RPATH_OPT" >&5
 echo "${ECHO_T}$LD_RPATH_OPT" >&6
 
 case "x$LD_RPATH_OPT" in
 (x-R*)
 echo "${ECHO_T}$LD_RPATH_OPT" >&6
 
 case "x$LD_RPATH_OPT" in
 (x-R*)
-       echo "$as_me:19110: checking if we need a space after rpath option" >&5
+       echo "$as_me:18367: 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"
 
 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
        cf_save_LIBS="$LIBS"
 
@@ -19128,7 +18385,7 @@ done
 LIBS="$cf_add_libs"
 
        cat >conftest.$ac_ext <<_ACEOF
 LIBS="$cf_add_libs"
 
        cat >conftest.$ac_ext <<_ACEOF
-#line 19131 "configure"
+#line 18388 "configure"
 #include "confdefs.h"
 
 int
 #include "confdefs.h"
 
 int
@@ -19140,16 +18397,16 @@ main (void)
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:19143: \"$ac_link\"") >&5
+if { (eval echo "$as_me:18400: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:19146: \$? = $ac_status" >&5
+  echo "$as_me:18403: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:19149: \"$ac_try\"") >&5
+  { (eval echo "$as_me:18406: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:19152: \$? = $ac_status" >&5
+  echo "$as_me:18409: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   cf_rpath_space=no
 else
   (exit $ac_status); }; }; then
   cf_rpath_space=no
 else
@@ -19159,13 +18416,13 @@ cf_rpath_space=yes
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
        LIBS="$cf_save_LIBS"
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
        LIBS="$cf_save_LIBS"
-       echo "$as_me:19162: result: $cf_rpath_space" >&5
+       echo "$as_me:18419: result: $cf_rpath_space" >&5
 echo "${ECHO_T}$cf_rpath_space" >&6
        test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
        ;;
 esac
 
 echo "${ECHO_T}$cf_rpath_space" >&6
        test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
        ;;
 esac
 
-echo "$as_me:19168: checking if rpath-hack should be disabled" >&5
+echo "$as_me:18425: 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.
 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
 
 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
@@ -19182,21 +18439,21 @@ else
        cf_disable_rpath_hack=no
 
 fi;
        cf_disable_rpath_hack=no
 
 fi;
-echo "$as_me:19185: result: $cf_disable_rpath_hack" >&5
+echo "$as_me:18442: result: $cf_disable_rpath_hack" >&5
 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
 if test "$cf_disable_rpath_hack" = no ; then
 
 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
 if test "$cf_disable_rpath_hack" = no ; then
 
-echo "$as_me:19189: checking for updated LDFLAGS" >&5
+echo "$as_me:18446: checking for updated LDFLAGS" >&5
 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
 if test -n "$LD_RPATH_OPT" ; then
 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
 if test -n "$LD_RPATH_OPT" ; then
-       echo "$as_me:19192: result: maybe" >&5
+       echo "$as_me:18449: 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 "${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:19199: checking for $ac_word" >&5
+echo "$as_me:18456: 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
 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
@@ -19211,7 +18468,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"
   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:19214: found $ac_dir/$ac_word" >&5
+echo "$as_me:18471: found $ac_dir/$ac_word" >&5
 break
 done
 
 break
 done
 
 fi
 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
 if test -n "$cf_ldd_prog"; then
 fi
 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
 if test -n "$cf_ldd_prog"; then
-  echo "$as_me:19222: result: $cf_ldd_prog" >&5
+  echo "$as_me:18479: result: $cf_ldd_prog" >&5
 echo "${ECHO_T}$cf_ldd_prog" >&6
 else
 echo "${ECHO_T}$cf_ldd_prog" >&6
 else
-  echo "$as_me:19225: result: no" >&5
+  echo "$as_me:18482: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
 echo "${ECHO_T}no" >&6
 fi
 
@@ -19236,7 +18493,7 @@ test -n "$cf_ldd_prog" || cf_ldd_prog="no"
                cf_rpath_oops=
 
 cat >conftest.$ac_ext <<_ACEOF
                cf_rpath_oops=
 
 cat >conftest.$ac_ext <<_ACEOF
-#line 19239 "configure"
+#line 18496 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 int
 #include "confdefs.h"
 #include <stdio.h>
 int
@@ -19248,16 +18505,16 @@ printf("Hello");
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:19251: \"$ac_link\"") >&5
+if { (eval echo "$as_me:18508: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:19254: \$? = $ac_status" >&5
+  echo "$as_me:18511: \$? = $ac_status" >&5
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
   (exit $ac_status); } &&
          { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:19257: \"$ac_try\"") >&5
+  { (eval echo "$as_me:18514: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:19260: \$? = $ac_status" >&5
+  echo "$as_me:18517: \$? = $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`
   (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`
@@ -19285,7 +18542,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
 
                                        then
                                                test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
 
-echo "${as_me:-configure}:19288: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
+echo "${as_me:-configure}:18545: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
 
                                                LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
                                                break
 
                                                LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
                                                break
@@ -19297,11 +18554,11 @@ echo "${as_me:-configure}:19288: testing ...adding -L$cf_rpath_dir/lib to LDFLAG
 
        test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
 
 
        test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
 
-echo "${as_me:-configure}:19300: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:18557: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
 
 test -n "$verbose" && echo "   ...checking LDFLAGS $LDFLAGS" 1>&6
 
 
 test -n "$verbose" && echo "   ...checking LDFLAGS $LDFLAGS" 1>&6
 
-echo "${as_me:-configure}:19304: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:18561: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
 
 cf_rpath_dst=
 for cf_rpath_src in $LDFLAGS
 
 cf_rpath_dst=
 for cf_rpath_src in $LDFLAGS
@@ -19338,7 +18595,7 @@ do
                        then
                                test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
 
                        then
                                test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
 
-echo "${as_me:-configure}:19341: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
+echo "${as_me:-configure}:18598: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
 
                                EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
                        fi
 
                                EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
                        fi
@@ -19351,11 +18608,11 @@ LDFLAGS=$cf_rpath_dst
 
 test -n "$verbose" && echo "   ...checked LDFLAGS $LDFLAGS" 1>&6
 
 
 test -n "$verbose" && echo "   ...checked LDFLAGS $LDFLAGS" 1>&6
 
-echo "${as_me:-configure}:19354: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:18611: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
 
 test -n "$verbose" && echo "   ...checking LIBS $LIBS" 1>&6
 
 
 test -n "$verbose" && echo "   ...checking LIBS $LIBS" 1>&6
 
-echo "${as_me:-configure}:19358: testing ...checking LIBS $LIBS ..." 1>&5
+echo "${as_me:-configure}:18615: testing ...checking LIBS $LIBS ..." 1>&5
 
 cf_rpath_dst=
 for cf_rpath_src in $LIBS
 
 cf_rpath_dst=
 for cf_rpath_src in $LIBS
@@ -19392,7 +18649,7 @@ do
                        then
                                test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
 
                        then
                                test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
 
-echo "${as_me:-configure}:19395: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
+echo "${as_me:-configure}:18652: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
 
                                EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
                        fi
 
                                EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
                        fi
@@ -19405,14 +18662,14 @@ LIBS=$cf_rpath_dst
 
 test -n "$verbose" && echo "   ...checked LIBS $LIBS" 1>&6
 
 
 test -n "$verbose" && echo "   ...checked LIBS $LIBS" 1>&6
 
-echo "${as_me:-configure}:19408: testing ...checked LIBS $LIBS ..." 1>&5
+echo "${as_me:-configure}:18665: testing ...checked LIBS $LIBS ..." 1>&5
 
        test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
 
 
        test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
 
-echo "${as_me:-configure}:19412: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:18669: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
 
 else
 
 else
-       echo "$as_me:19415: result: no" >&5
+       echo "$as_me:18672: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
 echo "${ECHO_T}no" >&6
 fi
 
@@ -19502,7 +18759,7 @@ DEFS=-DHAVE_CONFIG_H
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:19505: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:18762: creating $CONFIG_STATUS" >&5
 echo "$as_me: creating $CONFIG_STATUS" >&6;}
 cat >$CONFIG_STATUS <<_ACEOF
 #! $SHELL
 echo "$as_me: creating $CONFIG_STATUS" >&6;}
 cat >$CONFIG_STATUS <<_ACEOF
 #! $SHELL
@@ -19678,7 +18935,7 @@ cat >>$CONFIG_STATUS <<\EOF
     echo "$ac_cs_version"; exit 0 ;;
   --he | --h)
     # Conflict between --help and --header
     echo "$ac_cs_version"; exit 0 ;;
   --he | --h)
     # Conflict between --help and --header
-    { { echo "$as_me:19681: error: ambiguous option: $1
+    { { echo "$as_me:18938: 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;}
 Try \`$0 --help' for more information." >&5
 echo "$as_me: error: ambiguous option: $1
 Try \`$0 --help' for more information." >&2;}
@@ -19697,7 +18954,7 @@ Try \`$0 --help' for more information." >&2;}
     ac_need_defaults=false;;
 
   # This is an error.
     ac_need_defaults=false;;
 
   # This is an error.
-  -*) { { echo "$as_me:19700: error: unrecognized option: $1
+  -*) { { echo "$as_me:18957: 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;}
 Try \`$0 --help' for more information." >&5
 echo "$as_me: error: unrecognized option: $1
 Try \`$0 --help' for more information." >&2;}
@@ -19747,7 +19004,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" ;;
   "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:19750: error: invalid argument: $ac_config_target" >&5
+  *) { { echo "$as_me:19007: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
   esac
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    { (exit 1); exit 1; }; };;
   esac
@@ -20038,7 +19295,7 @@ done; }
   esac
 
   if test x"$ac_file" != x-; then
   esac
 
   if test x"$ac_file" != x-; then
-    { echo "$as_me:20041: creating $ac_file" >&5
+    { echo "$as_me:19298: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
     rm -f "$ac_file"
   fi
 echo "$as_me: creating $ac_file" >&6;}
     rm -f "$ac_file"
   fi
@@ -20056,7 +19313,7 @@ echo "$as_me: creating $ac_file" >&6;}
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:20059: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:19316: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -20069,7 +19326,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
            echo $srcdir/$f
          else
            # /dev/null tree
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:20072: error: cannot find input file: $f" >&5
+           { { echo "$as_me:19329: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -20085,7 +19342,7 @@ cat >>$CONFIG_STATUS <<\EOF
       if test -n "$ac_seen"; then
         ac_used=`grep '@datarootdir@' $ac_item`
         if test -z "$ac_used"; then
       if test -n "$ac_seen"; then
         ac_used=`grep '@datarootdir@' $ac_item`
         if test -z "$ac_used"; then
-          { echo "$as_me:20088: WARNING: datarootdir was used implicitly but not set:
+          { echo "$as_me:19345: 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;}
 $ac_seen" >&5
 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
 $ac_seen" >&2;}
@@ -20094,7 +19351,7 @@ $ac_seen" >&2;}
       fi
       ac_seen=`grep '${datarootdir}' $ac_item`
       if test -n "$ac_seen"; then
       fi
       ac_seen=`grep '${datarootdir}' $ac_item`
       if test -n "$ac_seen"; then
-        { echo "$as_me:20097: WARNING: datarootdir was used explicitly but not set:
+        { echo "$as_me:19354: 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;}
 $ac_seen" >&5
 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
 $ac_seen" >&2;}
@@ -20131,7 +19388,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':,'`
             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:20134: WARNING: Variable $ac_name is used but was not set:
+              { echo "$as_me:19391: 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;}
 $ac_seen" >&5
 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
 $ac_seen" >&2;}
@@ -20142,7 +19399,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`
     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:20145: WARNING: Some variables may not be substituted:
+      { echo "$as_me:19402: WARNING: Some variables may not be substituted:
 $ac_seen" >&5
 echo "$as_me: WARNING: Some variables may not be substituted:
 $ac_seen" >&2;}
 $ac_seen" >&5
 echo "$as_me: WARNING: Some variables may not be substituted:
 $ac_seen" >&2;}
@@ -20191,7 +19448,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
   * )   ac_file_in=$ac_file.in ;;
   esac
 
   * )   ac_file_in=$ac_file.in ;;
   esac
 
-  test x"$ac_file" != x- && { echo "$as_me:20194: creating $ac_file" >&5
+  test x"$ac_file" != x- && { echo "$as_me:19451: creating $ac_file" >&5
 echo "$as_me: creating $ac_file" >&6;}
 
   # First look for the input files in the build tree, otherwise in the
 echo "$as_me: creating $ac_file" >&6;}
 
   # First look for the input files in the build tree, otherwise in the
@@ -20202,7 +19459,7 @@ echo "$as_me: creating $ac_file" >&6;}
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
       -) echo $tmp/stdin ;;
       [\\/$]*)
          # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:20205: error: cannot find input file: $f" >&5
+         test -f "$f" || { { echo "$as_me:19462: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          echo $f;;
@@ -20215,7 +19472,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
            echo $srcdir/$f
          else
            # /dev/null tree
            echo $srcdir/$f
          else
            # /dev/null tree
-           { { echo "$as_me:20218: error: cannot find input file: $f" >&5
+           { { echo "$as_me:19475: error: cannot find input file: $f" >&5
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
 echo "$as_me: error: cannot find input file: $f" >&2;}
    { (exit 1); exit 1; }; }
          fi;;
@@ -20273,7 +19530,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
   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:20276: $ac_file is unchanged" >&5
+      { echo "$as_me:19533: $ac_file is unchanged" >&5
 echo "$as_me: $ac_file is unchanged" >&6;}
     else
       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 echo "$as_me: $ac_file is unchanged" >&6;}
     else
       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
index a73771b4a8ec278160156f9f497c86306e829faa..49298f51830d2174a25a80ffd93abaf91c50f1e8 100644 (file)
@@ -28,7 +28,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1996-on
 dnl
 dnl
 dnl Author: Thomas E. Dickey 1996-on
 dnl
-dnl $Id: configure.in,v 1.142 2017/09/09 23:07:56 tom Exp $
+dnl $Id: configure.in,v 1.143 2017/09/30 00:00:56 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)
 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)
@@ -427,15 +427,16 @@ if test "$cf_enable_widec" = yes; then
        fi
 fi
 
        fi
 fi
 
-CF_CURSES_CHECK_DATA(curscr)
-CF_CURSES_CHECK_DATA(ospeed)
-CF_CURSES_CHECK_DATA(boolnames)
-CF_CURSES_CHECK_DATA(boolfnames)
-CF_CURSES_CHECK_DATA(ttytype)
+CF_CURSES_CHECK_DATA(\
+curscr \
+ospeed \
+boolnames \
+boolfnames \
+ttytype)
 
 dnl ---------------------------------------------------------------------------
 CF_HELP_MESSAGE(Testing/development Options:)
 
 dnl ---------------------------------------------------------------------------
 CF_HELP_MESSAGE(Testing/development Options:)
-CF_ENABLE_WARNINGS
+CF_ENABLE_WARNINGS(Wno-unknown-pragmas)
 CF_DISABLE_LEAKS
 CF_DISABLE_RPATH_HACK
 
 CF_DISABLE_LEAKS
 CF_DISABLE_RPATH_HACK
 
index 5f8e8e66a63ae8db4dfbac327b729f7d805666fe..a0beb85c40dbfc2cb7c7c3dff98a4a984fcdff40 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: demo_new_pair.c,v 1.16 2017/09/04 11:47:44 tom Exp $
+ * $Id: demo_new_pair.c,v 1.17 2017/09/28 23:17:56 tom Exp $
  *
  * Demonstrate the alloc_pair() function.
  */
  *
  * Demonstrate the alloc_pair() function.
  */
@@ -63,19 +63,19 @@ next_attr(int now)
        attr_t bits[MAX_BITS];
 
        init = TRUE;
        attr_t bits[MAX_BITS];
 
        init = TRUE;
-       bits[limit++] = A_NORMAL;
+       bits[limit++] = WA_NORMAL;
        if (valid_cap("smso"))
        if (valid_cap("smso"))
-           bits[limit++] = A_STANDOUT;
+           bits[limit++] = WA_STANDOUT;
        if (valid_cap("smul"))
        if (valid_cap("smul"))
-           bits[limit++] = A_UNDERLINE;
+           bits[limit++] = WA_UNDERLINE;
        if (valid_cap("rev"))
        if (valid_cap("rev"))
-           bits[limit++] = A_REVERSE;
+           bits[limit++] = WA_REVERSE;
        if (valid_cap("blink"))
        if (valid_cap("blink"))
-           bits[limit++] = A_BLINK;
+           bits[limit++] = WA_BLINK;
        if (valid_cap("dim"))
        if (valid_cap("dim"))
-           bits[limit++] = A_DIM;
+           bits[limit++] = WA_DIM;
        if (valid_cap("bold"))
        if (valid_cap("bold"))
-           bits[limit++] = A_BOLD;
+           bits[limit++] = WA_BOLD;
        for (j = 0; j < limit; ++j) {
            for (k = 0; k < limit; ++k) {
                table[j * limit + k] = bits[j] | bits[k];
        for (j = 0; j < limit; ++j) {
            for (k = 0; k < limit; ++k) {
                table[j * limit + k] = bits[j] | bits[k];
index 474d8805179efbc69225a08bc515fe9fbc401d22..f9d2ef693fc0aec70b67ecdbc58b14bf6709b23c 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1999-2011,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1999-2013,2017 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * 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 <dickey@clark.net> 1999
  *
 /*
  * Author: Thomas E. Dickey <dickey@clark.net> 1999
  *
- * $Id: dots.c,v 1.25 2013/09/28 22:12:09 tom Exp $
+ * $Id: dots.c,v 1.26 2017/09/30 17:55:22 tom Exp $
  *
  * A simple demo of the terminfo interface.
  */
  *
  * A simple demo of the terminfo interface.
  */
@@ -107,10 +107,8 @@ main(int argc GCC_UNUSED,
     double c;
     int my_colors;
 
     double c;
     int my_colors;
 
-    CATCHALL(onsig);
-
     srand((unsigned) time(0));
     srand((unsigned) time(0));
-    setupterm((char *) 0, 1, (int *) 0);
+    InitAndCatch(setupterm((char *) 0, 1, (int *) 0), onsig);
     outs(clear_screen);
     outs(cursor_invisible);
     my_colors = max_colors;
     outs(clear_screen);
     outs(cursor_invisible);
     my_colors = max_colors;
index b3713888a3cf97c5136ff9e56551402cb5a33c6f..d27f2e2303d77492f8607bb101fd413fd3f4b574 100644 (file)
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey
  *
 /*
  * Author: Thomas E. Dickey
  *
- * $Id: dots_curses.c,v 1.4 2017/04/15 14:13:30 tom Exp $
+ * $Id: dots_curses.c,v 1.5 2017/09/30 15:41:17 tom Exp $
  *
  * A simple demo of the curses interface used for comparison with termcap.
  */
  *
  * A simple demo of the curses interface used for comparison with termcap.
  */
@@ -95,11 +95,9 @@ main(int argc GCC_UNUSED,
     double r;
     double c;
 
     double r;
     double c;
 
-    CATCHALL(onsig);
-
     srand((unsigned) time(0));
 
     srand((unsigned) time(0));
 
-    initscr();
+    InitAndCatch(initscr(), onsig);
     if (has_colors()) {
        start_color();
        for (fg = 0; fg < COLORS; fg++) {
     if (has_colors()) {
        start_color();
        for (fg = 0; fg < COLORS; fg++) {
index 4812282ecebfdf57949fe6c156cd9e7578d662b9..ed9de8c289e4e20c2115d491f37cbe374db3ef88 100644 (file)
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey - 2007
  *
 /*
  * Author: Thomas E. Dickey - 2007
  *
- * $Id: dots_mvcur.c,v 1.11 2017/06/17 18:25:30 tom Exp $
+ * $Id: dots_mvcur.c,v 1.13 2017/09/30 21:34:15 tom Exp $
  *
  * A simple demo of the terminfo interface, and mvcur.
  */
  *
  * A simple demo of the terminfo interface, and mvcur.
  */
@@ -110,13 +110,16 @@ main(int argc GCC_UNUSED,
     SCREEN *sp;
     int my_colors;
 
     SCREEN *sp;
     int my_colors;
 
-    CATCHALL(onsig);
+    InitAndCatch((sp = newterm((char *) 0, stdout, stdin)), onsig);
+    refresh();                 /* needed with Solaris curses to cancel endwin */
 
 
-    srand((unsigned) time(0));
-    if ((sp = newterm((char *) 0, stdout, stdin)) == 0) {
+    if (sp == 0) {
        fprintf(stderr, "Cannot initialize terminal\n");
        ExitProgram(EXIT_FAILURE);
     }
        fprintf(stderr, "Cannot initialize terminal\n");
        ExitProgram(EXIT_FAILURE);
     }
+
+    srand((unsigned) time(0));
+
     outs(clear_screen);
     outs(cursor_home);
     outs(cursor_invisible);
     outs(clear_screen);
     outs(cursor_home);
     outs(cursor_invisible);
index 53829e246012e97230af66f855abfca3e7db2097..cd88b3eb2b2ef710c81e583900e2cc8453cc5131 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 2013,2014 Free Software Foundation, Inc.                   *
+ * Copyright (c) 2013-2014,2017 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * 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
  *
 /*
  * Author: Thomas E. Dickey
  *
- * $Id: dots_termcap.c,v 1.9 2014/09/25 09:00:56 tom Exp $
+ * $Id: dots_termcap.c,v 1.10 2017/09/30 17:55:22 tom Exp $
  *
  * A simple demo of the termcap interface.
  */
  *
  * A simple demo of the termcap interface.
  */
@@ -177,14 +177,14 @@ main(int argc GCC_UNUSED,
     char area[1024];
     char *name;
 
     char area[1024];
     char *name;
 
-    CATCHALL(onsig);
-
     srand((unsigned) time(0));
 
     if ((name = getenv("TERM")) == 0) {
        fprintf(stderr, "TERM is not set\n");
        ExitProgram(EXIT_FAILURE);
     srand((unsigned) time(0));
 
     if ((name = getenv("TERM")) == 0) {
        fprintf(stderr, "TERM is not set\n");
        ExitProgram(EXIT_FAILURE);
-    } else if (tgetent(buffer, name) < 0) {
+    }
+    InitAndCatch(z = tgetent(buffer, name), onsig);
+    if (z < 0) {
        fprintf(stderr, "terminal description not found\n");
        ExitProgram(EXIT_FAILURE);
     } else {
        fprintf(stderr, "terminal description not found\n");
        ExitProgram(EXIT_FAILURE);
     } else {
index ef649ca4f87246b188b39a8bc5ac6cebe58e8def..1a3fd7d3a7833d68ef0b8ed9452f71aa7e96d75a 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: echochar.c,v 1.14 2017/09/04 11:48:15 tom Exp $
+ * $Id: echochar.c,v 1.15 2017/09/30 15:42:10 tom Exp $
  *
  * Demonstrate the echochar function (compare to dots.c).
  * Thomas Dickey - 2006/11/4
  *
  * Demonstrate the echochar function (compare to dots.c).
  * Thomas Dickey - 2006/11/4
@@ -103,8 +103,7 @@ main(int argc GCC_UNUSED,
        }
     }
 
        }
     }
 
-    CATCHALL(onsig);
-    initscr();
+    InitAndCatch(initscr(), onsig);
 
     use_colors = has_colors();
     if (use_colors) {
 
     use_colors = has_colors();
     if (use_colors) {
index 2bd9b20f881d4a1651b48d3035c259c70bc8c7da..e070620b27201996ab4cb77d1bd90b33c1de2091 100644 (file)
@@ -29,7 +29,7 @@
 /*
  * Author:  Thomas E. Dickey 1998
  *
 /*
  * Author:  Thomas E. Dickey 1998
  *
- * $Id: filter.c,v 1.31 2017/09/10 19:49:55 tom Exp $
+ * $Id: filter.c,v 1.32 2017/09/28 23:40:39 tom Exp $
  *
  * An example of the 'filter()' function in ncurses, this program prompts
  * for commands and executes them (like a command shell).  It illustrates
  *
  * An example of the 'filter()' function in ncurses, this program prompts
  * for commands and executes them (like a command shell).  It illustrates
@@ -105,7 +105,7 @@ new_command(char *buffer, int length, int underline, bool clocked, bool polled)
     if (polled) {
        bool done = FALSE;
        bool first = TRUE;
     if (polled) {
        bool done = FALSE;
        bool first = TRUE;
-       int y, x;
+       int y = 0, x = 0;
        int n;
        int mark = 0;
        int used = 0;
        int n;
        int mark = 0;
        int used = 0;
index 198c58d7dbe43d4d89187f314a35afd560cbfd52..9fb236bf806d65014b5773e133875cadd8b13ec6 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: firework.c,v 1.34 2017/09/09 00:35:56 tom Exp $
+ * $Id: firework.c,v 1.35 2017/09/30 15:42:24 tom Exp $
  */
 #include <test.priv.h>
 
  */
 #include <test.priv.h>
 
@@ -183,9 +183,7 @@ main(int argc, char *argv[])
     if (optind < argc)
        usage();
 
     if (optind < argc)
        usage();
 
-    CATCHALL(onsig);
-
-    initscr();
+    InitAndCatch(initscr(), onsig);
     noecho();
     cbreak();
     keypad(stdscr, TRUE);
     noecho();
     cbreak();
     keypad(stdscr, TRUE);
index c70efba8c1cb4ca6bf445510e293c8b89247f82c..deecdf7e49f3f1619ccf024072c696ecae5730ef 100644 (file)
@@ -33,7 +33,7 @@
  * modified 10-18-89 for curses (jrl)
  * 10-18-89 added signal handling
  *
  * modified 10-18-89 for curses (jrl)
  * 10-18-89 added signal handling
  *
- * $Id: gdc.c,v 1.50 2017/09/09 20:23:09 tom Exp $
+ * $Id: gdc.c,v 1.51 2017/09/30 18:10:05 tom Exp $
  */
 
 #include <test.priv.h>
  */
 
 #include <test.priv.h>
@@ -227,8 +227,6 @@ main(int argc, char *argv[])
 
     setlocale(LC_ALL, "");
 
 
     setlocale(LC_ALL, "");
 
-    CATCHALL(sighndl);
-
     while ((k = getopt(argc, argv, "dnst:")) != -1) {
        switch (k) {
 #if HAVE_USE_DEFAULT_COLORS
     while ((k = getopt(argc, argv, "dnst:")) != -1) {
        switch (k) {
 #if HAVE_USE_DEFAULT_COLORS
@@ -257,17 +255,20 @@ main(int argc, char *argv[])
     if (optind < argc)
        usage();
 
     if (optind < argc)
        usage();
 
-    if (redirected) {
-       char *name = getenv("TERM");
-       if (name == 0
-           || newterm(name, ofp, ifp) == 0) {
-           fprintf(stderr, "cannot open terminal\n");
-           ExitProgram(EXIT_FAILURE);
+    InitAndCatch({
+       if (redirected) {
+           char *name = getenv("TERM");
+           if (name == 0
+               || newterm(name, ofp, ifp) == 0) {
+               fprintf(stderr, "cannot open terminal\n");
+               ExitProgram(EXIT_FAILURE);
+           }
+       } else {
+           initscr();
        }
        }
-
-    } else {
-       initscr();
     }
     }
+    ,sighndl);
+
     cbreak();
     noecho();
     nodelay(stdscr, 1);
     cbreak();
     noecho();
     nodelay(stdscr, 1);
index 658681540fd19c7075e3d368e6ece49978920bd2..9a3300b26b9b64fda5d90e6212f07ef7deafcd62 100644 (file)
@@ -30,7 +30,7 @@
  *
  * Generate timing statistics for vertical-motion optimization.
  *
  *
  * Generate timing statistics for vertical-motion optimization.
  *
- * $Id: hashtest.c,v 1.33 2017/04/15 14:13:40 tom Exp $
+ * $Id: hashtest.c,v 1.34 2017/09/30 15:42:53 tom Exp $
  */
 
 #include <test.priv.h>
  */
 
 #include <test.priv.h>
@@ -225,9 +225,7 @@ main(int argc, char *argv[])
     trace(TRACE_TIMES);
 #endif
 
     trace(TRACE_TIMES);
 #endif
 
-    CATCHALL(finish);          /* arrange interrupts to terminate */
-
-    (void) initscr();          /* initialize the curses library */
+    InitAndCatch(initscr(), finish);
     keypad(stdscr, TRUE);      /* enable keyboard mapping */
     (void) nonl();             /* tell curses not to do NL->CR/NL on output */
     (void) cbreak();           /* take input chars one at a time, no wait for \n */
     keypad(stdscr, TRUE);      /* enable keyboard mapping */
     (void) nonl();             /* tell curses not to do NL->CR/NL on output */
     (void) cbreak();           /* take input chars one at a time, no wait for \n */
index 579f02fc4537128a3f685a9daf824b98d4a4463b..f770edba4ade2d06fd194a528a9c68171bde5c23 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 2007-2008,2014 Free Software Foundation, Inc.              *
+ * Copyright (c) 2007-2014,2017 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * 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.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: key_names.c,v 1.5 2014/08/02 17:24:55 tom Exp $
+ * $Id: key_names.c,v 1.6 2017/09/29 09:16:42 tom Exp $
  */
 
 #include <test.priv.h>
  */
 
 #include <test.priv.h>
@@ -77,7 +77,8 @@ main(int argc, char *argv[])
        endwin();
     }
     for (n = -1; n < KEY_MAX + 512; n++) {
        endwin();
     }
     for (n = -1; n < KEY_MAX + 512; n++) {
-       const char *result = key_name((wchar_t) n);
+       int check = wcwidth(n);
+       const char *result = check >= 0 ? key_name((wchar_t) n) : "?";
        if (result != 0)
            printf("%d(%5o):%s\n", n, n, result);
     }
        if (result != 0)
            printf("%d(%5o):%s\n", n, n, result);
     }
index 67696372b9284b919ecd3df10cc8736dc6ee63d7..8e75a200d18d32e544d2b70c74b2412d67295cac 100644 (file)
@@ -40,7 +40,7 @@ AUTHOR
    Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
            Thomas E. Dickey (beginning revision 1.27 in 1996).
 
    Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
            Thomas E. Dickey (beginning revision 1.27 in 1996).
 
-$Id: ncurses.c,v 1.465 2017/09/23 15:42:49 tom Exp $
+$Id: ncurses.c,v 1.468 2017/10/01 00:14:01 tom Exp $
 
 ***************************************************************************/
 
 
 ***************************************************************************/
 
@@ -147,10 +147,9 @@ static unsigned save_trace = TRACE_ORDINARY | TRACE_ICALLS | TRACE_CALLS;
 
 #define BLANK          ' '     /* this is the background character */
 
 
 #define BLANK          ' '     /* this is the background character */
 
-#undef max_colors
-static int max_colors;         /* the actual number of colors we'll use */
-static int min_colors;         /* the minimum color code */
-static bool use_colors;                /* true if we use colors */
+static int MaxColors;          /* the actual number of colors we'll use */
+static int MinColors;          /* the minimum color code */
+static bool UseColors;         /* true if we use colors */
 
 #undef max_pairs
 static int max_pairs;          /* ...and the number of color pairs */
 
 #undef max_pairs
 static int max_pairs;          /* ...and the number of color pairs */
@@ -222,6 +221,7 @@ wGetchar(WINDOW *win)
 }
 #define Getchar() wGetchar(stdscr)
 
 }
 #define Getchar() wGetchar(stdscr)
 
+#if HAVE_SLK_COLOR
 /* replaces wgetnstr(), since we want to be able to edit values */
 static void
 wGetstring(WINDOW *win, char *buffer, int limit)
 /* replaces wgetnstr(), since we want to be able to edit values */
 static void
 wGetstring(WINDOW *win, char *buffer, int limit)
@@ -289,6 +289,7 @@ wGetstring(WINDOW *win, char *buffer, int limit)
     wmove(win, y0, x0);
     noecho();
 }
     wmove(win, y0, x0);
     noecho();
 }
+#endif
 
 #if USE_WIDEC_SUPPORT
 static wchar_t
 
 #if USE_WIDEC_SUPPORT
 static wchar_t
@@ -1300,7 +1301,7 @@ attr_legend(WINDOW *helpwin)
     ++row;
     MvWPrintw(helpwin, row++, col,
              "Toggles:");
     ++row;
     MvWPrintw(helpwin, row++, col,
              "Toggles:");
-    if (use_colors) {
+    if (UseColors) {
        MvWPrintw(helpwin, row++, col,
                  "  f/F/b/B toggle foreground/background background color");
        MvWPrintw(helpwin, row++, col,
        MvWPrintw(helpwin, row++, col,
                  "  f/F/b/B toggle foreground/background background color");
        MvWPrintw(helpwin, row++, col,
@@ -1319,7 +1320,7 @@ attr_legend(WINDOW *helpwin)
 static void
 show_color_attr(int fg, int bg, int tx)
 {
 static void
 show_color_attr(int fg, int bg, int tx)
 {
-    if (use_colors) {
+    if (UseColors) {
        printw("  Colors (fg %d, bg %d", fg, bg);
        if (tx >= 0)
            printw(", text %d", tx);
        printw("  Colors (fg %d, bg %d", fg, bg);
        if (tx >= 0)
            printw(", text %d", tx);
@@ -1332,7 +1333,7 @@ cycle_color_attr(int ch, NCURSES_COLOR_T *fg, NCURSES_COLOR_T *bg, NCURSES_COLOR
 {
     bool error = FALSE;
 
 {
     bool error = FALSE;
 
-    if (use_colors) {
+    if (UseColors) {
        switch (ch) {
        case 'f':
            *fg = (NCURSES_COLOR_T) (*fg + 1);
        switch (ch) {
        case 'f':
            *fg = (NCURSES_COLOR_T) (*fg + 1);
@@ -1358,12 +1359,12 @@ cycle_color_attr(int ch, NCURSES_COLOR_T *fg, NCURSES_COLOR_T *bg, NCURSES_COLOR
            break;
        }
        if (*fg >= COLORS)
            break;
        }
        if (*fg >= COLORS)
-           *fg = (NCURSES_COLOR_T) min_colors;
-       if (*fg < min_colors)
+           *fg = (NCURSES_COLOR_T) MinColors;
+       if (*fg < MinColors)
            *fg = (NCURSES_COLOR_T) (COLORS - 1);
        if (*bg >= COLORS)
            *fg = (NCURSES_COLOR_T) (COLORS - 1);
        if (*bg >= COLORS)
-           *bg = (NCURSES_COLOR_T) min_colors;
-       if (*bg < min_colors)
+           *bg = (NCURSES_COLOR_T) MinColors;
+       if (*bg < MinColors)
            *bg = (NCURSES_COLOR_T) (COLORS - 1);
        if (*tx >= COLORS)
            *tx = -1;
            *bg = (NCURSES_COLOR_T) (COLORS - 1);
        if (*tx >= COLORS)
            *tx = -1;
@@ -1504,7 +1505,7 @@ show_attr(WINDOW *win, int row, int skip, bool arrow, chtype attr, const char *n
 }
 
 typedef struct {
 }
 
 typedef struct {
-    attr_t attr;
+    chtype attr;
     NCURSES_CONST char *name;
 } ATTR_TBL;
 /* *INDENT-OFF* */
     NCURSES_CONST char *name;
 } ATTR_TBL;
 /* *INDENT-OFF* */
@@ -1541,6 +1542,46 @@ init_attr_list(ATTR_TBL * target, attr_t attrs)
     return result;
 }
 
     return result;
 }
 
+#if USE_WIDEC_SUPPORT
+typedef struct {
+    attr_t attr;
+    NCURSES_CONST char *name;
+} W_ATTR_TBL;
+/* *INDENT-OFF* */
+static const W_ATTR_TBL w_attrs_to_test[] = {
+    { WA_STANDOUT,     "STANDOUT" },
+    { WA_REVERSE,      "REVERSE" },
+    { WA_BOLD,         "BOLD" },
+    { WA_UNDERLINE,    "UNDERLINE" },
+    { WA_DIM,          "DIM" },
+    { WA_BLINK,                "BLINK" },
+    { WA_PROTECT,      "PROTECT" },
+#ifdef WA_INVIS
+    { WA_INVIS,                "INVISIBLE" },
+#endif
+#ifdef WA_ITALIC
+    { WA_ITALIC,       "ITALIC" },
+#endif
+    { WA_NORMAL,       "NORMAL" },
+};
+/* *INDENT-ON* */
+
+static unsigned
+init_w_attr_list(W_ATTR_TBL * target, attr_t attrs)
+{
+    unsigned result = 0;
+    size_t n;
+
+    for (n = 0; n < SIZEOF(w_attrs_to_test); ++n) {
+       attr_t test = w_attrs_to_test[n].attr;
+       if (test == WA_NORMAL || (test & attrs) != 0) {
+           target[result++] = w_attrs_to_test[n];
+       }
+    }
+    return result;
+}
+#endif
+
 static bool
 attr_getc(int *skip,
          NCURSES_COLOR_T *fg,
 static bool
 attr_getc(int *skip,
          NCURSES_COLOR_T *fg,
@@ -1643,7 +1684,7 @@ attr_test(bool recur GCC_UNUSED)
            chtype normal = A_NORMAL | BLANK;
            chtype extras = (chtype) ac;
 
            chtype normal = A_NORMAL | BLANK;
            chtype extras = (chtype) ac;
 
-           if (use_colors) {
+           if (UseColors) {
                NCURSES_PAIRS_T pair = 0;
                if ((fg != COLOR_BLACK) || (bg != COLOR_BLACK)) {
                    pair = 1;
                NCURSES_PAIRS_T pair = 0;
                if ((fg != COLOR_BLACK) || (bg != COLOR_BLACK)) {
                    pair = 1;
@@ -1795,7 +1836,7 @@ set_wide_background(NCURSES_PAIRS_T pair)
 static attr_t
 get_wide_background(void)
 {
 static attr_t
 get_wide_background(void)
 {
-    attr_t result = A_NORMAL;
+    attr_t result = WA_NORMAL;
     attr_t attr;
     cchar_t ch;
     NCURSES_PAIRS_T pair;
     attr_t attr;
     cchar_t ch;
     NCURSES_PAIRS_T pair;
@@ -1815,12 +1856,12 @@ wide_show_attr(WINDOW *win,
               int row,
               int skip,
               bool arrow,
               int row,
               int skip,
               bool arrow,
-              chtype attr,
+              attr_t attr,
               NCURSES_PAIRS_T pair,
               const char *name)
 {
     int ncv = get_ncv();
               NCURSES_PAIRS_T pair,
               const char *name)
 {
     int ncv = get_ncv();
-    chtype test = attr & ~WA_ALTCHARSET;
+    attr_t test = attr & ~WA_ALTCHARSET;
 
     if (arrow)
        MvPrintw(row, COLS_PRE_ATTRS - 3, "-->");
 
     if (arrow)
        MvPrintw(row, COLS_PRE_ATTRS - 3, "-->");
@@ -1979,9 +2020,9 @@ x_attr_test(bool recur GCC_UNUSED)
     NCURSES_COLOR_T tx = -1;
     int ac = 0;
     unsigned j, k;
     NCURSES_COLOR_T tx = -1;
     int ac = 0;
     unsigned j, k;
-    ATTR_TBL my_list[SIZEOF(attrs_to_test)];
-    WINDOW *my_wins[SIZEOF(attrs_to_test)];
-    unsigned my_size = init_attr_list(my_list, term_attrs());
+    W_ATTR_TBL my_list[SIZEOF(w_attrs_to_test)];
+    WINDOW *my_wins[SIZEOF(w_attrs_to_test)];
+    unsigned my_size = init_w_attr_list(my_list, term_attrs());
 
     if (my_size > 1) {
        for (j = 0; j < my_size; ++j) {
 
     if (my_size > 1) {
        for (j = 0; j < my_size; ++j) {
@@ -2003,7 +2044,7 @@ x_attr_test(bool recur GCC_UNUSED)
            NCURSES_PAIRS_T pair = 0;
            NCURSES_PAIRS_T extras = 0;
 
            NCURSES_PAIRS_T pair = 0;
            NCURSES_PAIRS_T extras = 0;
 
-           if (use_colors) {
+           if (UseColors) {
                pair = (NCURSES_PAIRS_T) (fg != COLOR_BLACK || bg != COLOR_BLACK);
                if (pair != 0) {
                    pair = 1;
                pair = (NCURSES_PAIRS_T) (fg != COLOR_BLACK || bg != COLOR_BLACK);
                if (pair != 0) {
                    pair = 1;
@@ -2206,7 +2247,7 @@ color_test(bool recur GCC_UNUSED)
     bool opt_wide = FALSE;
     WINDOW *helpwin;
 
     bool opt_wide = FALSE;
     WINDOW *helpwin;
 
-    if (!use_colors) {
+    if (!UseColors) {
        Cannot("does not support color.");
        return ERR;
     }
        Cannot("does not support color.");
        return ERR;
     }
@@ -2225,7 +2266,7 @@ color_test(bool recur GCC_UNUSED)
 
        pairs_max = PAIR_NUMBER(A_COLOR) + 1;
        if (colors_max * colors_max <= COLOR_PAIRS) {
 
        pairs_max = PAIR_NUMBER(A_COLOR) + 1;
        if (colors_max * colors_max <= COLOR_PAIRS) {
-           int limit = (colors_max - min_colors) * (colors_max - min_colors);
+           int limit = (colors_max - MinColors) * (colors_max - MinColors);
            if (pairs_max > limit)
                pairs_max = limit;
        } else {
            if (pairs_max > limit)
                pairs_max = limit;
        } else {
@@ -2243,7 +2284,7 @@ color_test(bool recur GCC_UNUSED)
            hello = "Hello";
            per_row = (col_limit / 8);
        }
            hello = "Hello";
            per_row = (col_limit / 8);
        }
-       per_row -= min_colors;
+       per_row -= MinColors;
 
        row_limit = (pairs_max + per_row - 1) / per_row;
 
 
        row_limit = (pairs_max + per_row - 1) / per_row;
 
@@ -2252,7 +2293,7 @@ color_test(bool recur GCC_UNUSED)
                      pairs_max, COLORS);
        if (colors_max != COLORS)
            (void) printw(" (using %d colors)", colors_max);
                      pairs_max, COLORS);
        if (colors_max != COLORS)
            (void) printw(" (using %d colors)", colors_max);
-       if (min_colors)
+       if (MinColors)
            (void) addstr(" besides 'default'");
 
        clrtobot();
            (void) addstr(" besides 'default'");
 
        clrtobot();
@@ -2264,7 +2305,7 @@ color_test(bool recur GCC_UNUSED)
 
        /* show color names/numbers across the top */
        for (i = 0; i < per_row; i++)
 
        /* show color names/numbers across the top */
        for (i = 0; i < per_row; i++)
-           show_color_name(top + 2, (i + 1) * width, i + min_colors, opt_wide);
+           show_color_name(top + 2, (i + 1) * width, i + MinColors, opt_wide);
 
        /* show a grid of colors, with color names/ numbers on the left */
        for (i = (NCURSES_PAIRS_T) (base_row * per_row); i < pairs_max; i++) {
 
        /* show a grid of colors, with color names/ numbers on the left */
        for (i = (NCURSES_PAIRS_T) (base_row * per_row); i < pairs_max; i++) {
@@ -2275,8 +2316,8 @@ color_test(bool recur GCC_UNUSED)
            if ((i / per_row) > row_limit)
                break;
 
            if ((i / per_row) > row_limit)
                break;
 
-#define InxToFG(i) (NCURSES_COLOR_T) ((i % (colors_max - min_colors)) + min_colors)
-#define InxToBG(i) (NCURSES_COLOR_T) ((i / (colors_max - min_colors)) + min_colors)
+#define InxToFG(i) (NCURSES_COLOR_T) ((i % (colors_max - MinColors)) + MinColors)
+#define InxToBG(i) (NCURSES_COLOR_T) ((i / (colors_max - MinColors)) + MinColors)
            if (row >= 0 && move(row, col) != ERR) {
                NCURSES_COLOR_T fg = InxToFG(i);
                NCURSES_COLOR_T bg = InxToBG(i);
            if (row >= 0 && move(row, col) != ERR) {
                NCURSES_COLOR_T fg = InxToFG(i);
                NCURSES_COLOR_T bg = InxToBG(i);
@@ -2298,7 +2339,7 @@ color_test(bool recur GCC_UNUSED)
                printw("%-*.*s", width, width, hello);
                (void) attrset(A_NORMAL);
 
                printw("%-*.*s", width, width, hello);
                (void) attrset(A_NORMAL);
 
-               if ((i % per_row) == 0 && InxToFG(i) == min_colors) {
+               if ((i % per_row) == 0 && InxToFG(i) == MinColors) {
                    show_color_name(row, 0, InxToBG(i), opt_wide);
                }
                ++shown;
                    show_color_name(row, 0, InxToBG(i), opt_wide);
                }
                ++shown;
@@ -2434,7 +2475,7 @@ x_color_test(bool recur GCC_UNUSED)
     wchar_t *buffer = 0;
     WINDOW *helpwin;
 
     wchar_t *buffer = 0;
     WINDOW *helpwin;
 
-    if (!use_colors) {
+    if (!UseColors) {
        Cannot("does not support color.");
        return ERR;
     }
        Cannot("does not support color.");
        return ERR;
     }
@@ -2453,7 +2494,7 @@ x_color_test(bool recur GCC_UNUSED)
 
        pairs_max = (unsigned short) (-1);
        if (colors_max * colors_max <= COLOR_PAIRS) {
 
        pairs_max = (unsigned short) (-1);
        if (colors_max * colors_max <= COLOR_PAIRS) {
-           int limit = (colors_max - min_colors) * (colors_max - min_colors);
+           int limit = (colors_max - MinColors) * (colors_max - MinColors);
            if (pairs_max > limit)
                pairs_max = limit;
        } else {
            if (pairs_max > limit)
                pairs_max = limit;
        } else {
@@ -2470,7 +2511,7 @@ x_color_test(bool recur GCC_UNUSED)
            hello = "Hello";
            per_row = (col_limit / 8);
        }
            hello = "Hello";
            per_row = (col_limit / 8);
        }
-       per_row -= min_colors;
+       per_row -= MinColors;
 
        if (opt_xchr) {
            make_fullwidth_text(buffer, hello);
 
        if (opt_xchr) {
            make_fullwidth_text(buffer, hello);
@@ -2487,7 +2528,7 @@ x_color_test(bool recur GCC_UNUSED)
                      pairs_max, COLORS);
        if (colors_max != COLORS)
            (void) printw(" (using %d colors)", colors_max);
                      pairs_max, COLORS);
        if (colors_max != COLORS)
            (void) printw(" (using %d colors)", colors_max);
-       if (min_colors)
+       if (MinColors)
            (void) addstr(" besides 'default'");
 
        clrtobot();
            (void) addstr(" besides 'default'");
 
        clrtobot();
@@ -2499,7 +2540,7 @@ x_color_test(bool recur GCC_UNUSED)
 
        /* show color names/numbers across the top */
        for (i = 0; i < per_row; i++)
 
        /* show color names/numbers across the top */
        for (i = 0; i < per_row; i++)
-           show_color_name(top + 2, (i + 1) * width, i + min_colors, opt_wide);
+           show_color_name(top + 2, (i + 1) * width, i + MinColors, opt_wide);
 
        /* show a grid of colors, with color names/ numbers on the left */
        for (i = (base_row * per_row); i < pairs_max; i++) {
 
        /* show a grid of colors, with color names/ numbers on the left */
        for (i = (base_row * per_row); i < pairs_max; i++) {
@@ -2514,11 +2555,11 @@ x_color_test(bool recur GCC_UNUSED)
                init_pair(pair, InxToFG(i), InxToBG(i));
                (void) color_set(pair, NULL);
                if (opt_acsc)
                init_pair(pair, InxToFG(i), InxToBG(i));
                (void) color_set(pair, NULL);
                if (opt_acsc)
-                   attr_on(A_ALTCHARSET, NULL);
+                   attr_on(WA_ALTCHARSET, NULL);
                if (opt_bold)
                if (opt_bold)
-                   attr_on(A_BOLD, NULL);
+                   attr_on(WA_BOLD, NULL);
                if (opt_revs)
                if (opt_revs)
-                   attr_on(A_REVERSE, NULL);
+                   attr_on(WA_REVERSE, NULL);
 
                if (opt_nums) {
                    _nc_SPRINTF(numbered,
 
                if (opt_nums) {
                    _nc_SPRINTF(numbered,
@@ -2533,7 +2574,7 @@ x_color_test(bool recur GCC_UNUSED)
                addnwstr(buffer, width);
                (void) attr_set(A_NORMAL, 0, NULL);
 
                addnwstr(buffer, width);
                (void) attr_set(A_NORMAL, 0, NULL);
 
-               if ((i % per_row) == 0 && InxToFG(i) == min_colors) {
+               if ((i % per_row) == 0 && InxToFG(i) == MinColors) {
                    show_color_name(row, 0, InxToBG(i), opt_wide);
                }
                ++shown;
                    show_color_name(row, 0, InxToBG(i), opt_wide);
                }
                ++shown;
@@ -2686,7 +2727,7 @@ reset_all_colors(void)
                   all_colors[c].blue);
 }
 
                   all_colors[c].blue);
 }
 
-#define okCOLOR(n) ((n) >= 0 && (n) < max_colors)
+#define okCOLOR(n) ((n) >= 0 && (n) < MaxColors)
 #define okRGB(n)   ((n) >= 0 && (n) <= 1000)
 #define DecodeRGB(n) (NCURSES_COLOR_T) ((n * 1000) / 0xffff)
 
 #define okRGB(n)   ((n) >= 0 && (n) <= 1000)
 #define DecodeRGB(n) (NCURSES_COLOR_T) ((n * 1000) / 0xffff)
 
@@ -2694,10 +2735,10 @@ static void
 init_all_colors(bool xterm_colors, char *palette_file)
 {
     NCURSES_PAIRS_T cp;
 init_all_colors(bool xterm_colors, char *palette_file)
 {
     NCURSES_PAIRS_T cp;
-    all_colors = typeMalloc(RGB_DATA, (unsigned) max_colors);
+    all_colors = typeMalloc(RGB_DATA, (unsigned) MaxColors);
     if (!all_colors)
        failed("all_colors");
     if (!all_colors)
        failed("all_colors");
-    for (cp = 0; cp < max_colors; ++cp) {
+    for (cp = 0; cp < MaxColors; ++cp) {
        color_content(cp,
                      &all_colors[cp].red,
                      &all_colors[cp].green,
        color_content(cp,
                      &all_colors[cp].red,
                      &all_colors[cp].green,
@@ -2715,7 +2756,7 @@ init_all_colors(bool xterm_colors, char *palette_file)
 
        raw();
        noecho();
 
        raw();
        noecho();
-       for (n = 0; n < max_colors; ++n) {
+       for (n = 0; n < MaxColors; ++n) {
            fprintf(stderr, "\033]4;%d;?\007", n);
            got = (int) read(0, result, sizeof(result) - 1);
            if (got < 0)
            fprintf(stderr, "\033]4;%d;?\007", n);
            got = (int) read(0, result, sizeof(result) - 1);
            if (got < 0)
@@ -2779,7 +2820,7 @@ color_edit(bool recur GCC_UNUSED)
     int top_color;
     int page_size;
 
     int top_color;
     int page_size;
 
-    if (!use_colors) {
+    if (!UseColors) {
        Cannot("does not support color.");
        return ERR;
     } else if (!can_change_color()) {
        Cannot("does not support color.");
        return ERR;
     } else if (!can_change_color()) {
@@ -2799,7 +2840,7 @@ color_edit(bool recur GCC_UNUSED)
     page_size = (LINES - 6);
     erase();
 
     page_size = (LINES - 6);
     erase();
 
-    for (i = 0; i < max_colors; i++)
+    for (i = 0; i < MaxColors; i++)
        init_pair((NCURSES_PAIRS_T) i,
                  (NCURSES_COLOR_T) COLOR_WHITE,
                  (NCURSES_COLOR_T) i);
        init_pair((NCURSES_PAIRS_T) i,
                  (NCURSES_COLOR_T) COLOR_WHITE,
                  (NCURSES_COLOR_T) i);
@@ -2815,7 +2856,7 @@ color_edit(bool recur GCC_UNUSED)
 
        for (i = (NCURSES_COLOR_T) top_color;
             (i - top_color < page_size)
 
        for (i = (NCURSES_COLOR_T) top_color;
             (i - top_color < page_size)
-            && (i < max_colors); i++) {
+            && (i < MaxColors); i++) {
            char numeric[80];
 
            _nc_SPRINTF(numeric, _nc_SLIMIT(sizeof(numeric)) "[%d]", i);
            char numeric[80];
 
            _nc_SPRINTF(numeric, _nc_SLIMIT(sizeof(numeric)) "[%d]", i);
@@ -2891,7 +2932,7 @@ color_edit(bool recur GCC_UNUSED)
 
        case CTRL('f'):
        case KEY_NPAGE:
 
        case CTRL('f'):
        case KEY_NPAGE:
-           if (current < (max_colors - 1))
+           if (current < (MaxColors - 1))
                current += (page_size - 1);
            else
                beep();
                current += (page_size - 1);
            else
                beep();
@@ -2899,12 +2940,12 @@ color_edit(bool recur GCC_UNUSED)
 
        case CTRL('p'):
        case KEY_UP:
 
        case CTRL('p'):
        case KEY_UP:
-           current = (current == 0 ? (max_colors - 1) : current - 1);
+           current = (current == 0 ? (MaxColors - 1) : current - 1);
            break;
 
        case CTRL('n'):
        case KEY_DOWN:
            break;
 
        case CTRL('n'):
        case KEY_DOWN:
-           current = (current == (max_colors - 1) ? 0 : current + 1);
+           current = (current == (MaxColors - 1) ? 0 : current + 1);
            break;
 
        case '\t':
            break;
 
        case '\t':
@@ -2967,7 +3008,7 @@ color_edit(bool recur GCC_UNUSED)
        case 'm':
            endwin();
            main_menu(FALSE);
        case 'm':
            endwin();
            main_menu(FALSE);
-           for (i = 0; i < max_colors; i++)
+           for (i = 0; i < MaxColors; i++)
                init_pair((NCURSES_PAIRS_T) i,
                          (NCURSES_COLOR_T) COLOR_WHITE,
                          (NCURSES_COLOR_T) i);
                init_pair((NCURSES_PAIRS_T) i,
                          (NCURSES_COLOR_T) COLOR_WHITE,
                          (NCURSES_COLOR_T) i);
@@ -2984,8 +3025,8 @@ color_edit(bool recur GCC_UNUSED)
 
        if (current < 0)
            current = 0;
 
        if (current < 0)
            current = 0;
-       if (current >= max_colors)
-           current = max_colors - 1;
+       if (current >= MaxColors)
+           current = MaxColors - 1;
        if (current < top_color)
            top_color = current;
        if (current - top_color >= page_size)
        if (current < top_color)
            top_color = current;
        if (current - top_color >= page_size)
@@ -3038,12 +3079,39 @@ cycle_attr(int ch, unsigned *at_code, chtype *attr, ATTR_TBL * list, unsigned li
     return result;
 }
 
     return result;
 }
 
+#if USE_WIDEC_SUPPORT
+static bool
+cycle_w_attr(int ch, unsigned *at_code, attr_t *attr, W_ATTR_TBL * list, unsigned limit)
+{
+    bool result = TRUE;
+
+    switch (ch) {
+    case 'v':
+       if ((*at_code += 1) >= limit)
+           *at_code = 0;
+       break;
+    case 'V':
+       if (*at_code == 0)
+           *at_code = limit - 1;
+       else
+           *at_code -= 1;
+       break;
+    default:
+       result = FALSE;
+       break;
+    }
+    if (result)
+       *attr = list[*at_code].attr;
+    return result;
+}
+#endif
+
 static bool
 cycle_colors(int ch, int *fg, int *bg, NCURSES_PAIRS_T *pair)
 {
     bool result = FALSE;
 
 static bool
 cycle_colors(int ch, int *fg, int *bg, NCURSES_PAIRS_T *pair)
 {
     bool result = FALSE;
 
-    if (use_colors) {
+    if (UseColors) {
        result = TRUE;
        switch (ch) {
        case 'F':
        result = TRUE;
        switch (ch) {
        case 'F':
@@ -3160,7 +3228,7 @@ slk_test(bool recur GCC_UNUSED)
 
     c = CTRL('l');
 #if HAVE_SLK_COLOR
 
     c = CTRL('l');
 #if HAVE_SLK_COLOR
-    if (use_colors) {
+    if (UseColors) {
        call_slk_color(fg, bg);
     }
 #endif
        call_slk_color(fg, bg);
     }
 #endif
@@ -3245,7 +3313,7 @@ slk_test(bool recur GCC_UNUSED)
            }
 #if HAVE_SLK_COLOR
            if (cycle_colors(c, &fg, &bg, &pair)) {
            }
 #if HAVE_SLK_COLOR
            if (cycle_colors(c, &fg, &bg, &pair)) {
-               if (use_colors) {
+               if (UseColors) {
                    call_slk_color(fg, bg);
                } else {
                    beep();
                    call_slk_color(fg, bg);
                } else {
                    beep();
@@ -3274,16 +3342,16 @@ x_slk_test(bool recur GCC_UNUSED)
     int c, fmt = 1;
     wchar_t buf[SLKLEN + 1];
     char *s;
     int c, fmt = 1;
     wchar_t buf[SLKLEN + 1];
     char *s;
-    chtype attr = A_NORMAL;
+    attr_t attr = WA_NORMAL;
     unsigned at_code = 0;
     int fg = COLOR_BLACK;
     int bg = COLOR_WHITE;
     NCURSES_PAIRS_T pair = 0;
     unsigned at_code = 0;
     int fg = COLOR_BLACK;
     int bg = COLOR_WHITE;
     NCURSES_PAIRS_T pair = 0;
-    ATTR_TBL my_list[SIZEOF(attrs_to_test)];
-    unsigned my_size = init_attr_list(my_list, term_attrs());
+    W_ATTR_TBL my_list[SIZEOF(w_attrs_to_test)];
+    unsigned my_size = init_w_attr_list(my_list, term_attrs());
 
     c = CTRL('l');
 
     c = CTRL('l');
-    if (use_colors) {
+    if (UseColors) {
        call_slk_color(fg, bg);
     }
     do {
        call_slk_color(fg, bg);
     }
     do {
@@ -3375,13 +3443,13 @@ x_slk_test(bool recur GCC_UNUSED)
            goto done;
 
        case 'F':
            goto done;
 
        case 'F':
-           if (use_colors) {
+           if (UseColors) {
                fg = (NCURSES_COLOR_T) ((fg + 1) % COLORS);
                call_slk_color(fg, bg);
            }
            break;
        case 'B':
                fg = (NCURSES_COLOR_T) ((fg + 1) % COLORS);
                call_slk_color(fg, bg);
            }
            break;
        case 'B':
-           if (use_colors) {
+           if (UseColors) {
                bg = (NCURSES_COLOR_T) ((bg + 1) % COLORS);
                call_slk_color(fg, bg);
            }
                bg = (NCURSES_COLOR_T) ((bg + 1) % COLORS);
                call_slk_color(fg, bg);
            }
@@ -3392,7 +3460,7 @@ x_slk_test(bool recur GCC_UNUSED)
            break;
 #endif
        default:
            break;
 #endif
        default:
-           if (cycle_attr(c, &at_code, &attr, my_list, my_size)) {
+           if (cycle_w_attr(c, &at_code, &attr, my_list, my_size)) {
                slk_attr_set(attr, (NCURSES_COLOR_T) (fg || bg), NULL);
                slk_touch();
                slk_noutrefresh();
                slk_attr_set(attr, (NCURSES_COLOR_T) (fg || bg), NULL);
                slk_touch();
                slk_noutrefresh();
@@ -3400,7 +3468,7 @@ x_slk_test(bool recur GCC_UNUSED)
            }
 #if HAVE_SLK_COLOR
            if (cycle_colors(c, &fg, &bg, &pair)) {
            }
 #if HAVE_SLK_COLOR
            if (cycle_colors(c, &fg, &bg, &pair)) {
-               if (use_colors) {
+               if (UseColors) {
                    call_slk_color(fg, bg);
                } else {
                    beep();
                    call_slk_color(fg, bg);
                } else {
                    beep();
@@ -3742,7 +3810,7 @@ acs_test(bool recur GCC_UNUSED)
        MvPrintw(LINES - 2, 0,
                 "Select: a=ACS, w=all x=box, %s0=C1, 1-3,+/- non-ASCII, </> repeat, ESC=quit",
                 pch_kludge);
        MvPrintw(LINES - 2, 0,
                 "Select: a=ACS, w=all x=box, %s0=C1, 1-3,+/- non-ASCII, </> repeat, ESC=quit",
                 pch_kludge);
-       if (use_colors) {
+       if (UseColors) {
            MvPrintw(LINES - 1, 0,
                     "v/V, f/F, b/B cycle through video attributes (%s) and color %d/%d.",
                     my_list[at_code].name,
            MvPrintw(LINES - 1, 0,
                     "v/V, f/F, b/B cycle through video attributes (%s) and color %d/%d.",
                     my_list[at_code].name,
@@ -4201,14 +4269,14 @@ x_acs_test(bool recur GCC_UNUSED)
     int repeat = 1;
     int space = ' ';
     int pagesize = 32;
     int repeat = 1;
     int space = ' ';
     int pagesize = 32;
-    chtype attr = A_NORMAL;
+    attr_t attr = WA_NORMAL;
     int fg = COLOR_BLACK;
     int bg = COLOR_BLACK;
     unsigned at_code = 0;
     NCURSES_PAIRS_T pair = 0;
     void (*last_show_wacs) (int, attr_t, NCURSES_PAIRS_T) = 0;
     int fg = COLOR_BLACK;
     int bg = COLOR_BLACK;
     unsigned at_code = 0;
     NCURSES_PAIRS_T pair = 0;
     void (*last_show_wacs) (int, attr_t, NCURSES_PAIRS_T) = 0;
-    ATTR_TBL my_list[SIZEOF(attrs_to_test)];
-    unsigned my_size = init_attr_list(my_list, term_attrs());
+    W_ATTR_TBL my_list[SIZEOF(w_attrs_to_test)];
+    unsigned my_size = init_w_attr_list(my_list, term_attrs());
 
     do {
        switch (c) {
 
     do {
        switch (c) {
@@ -4258,7 +4326,7 @@ x_acs_test(bool recur GCC_UNUSED)
            } else if (c == '_') {
                space = (space == ' ') ? '_' : ' ';
                last_show_wacs = 0;
            } else if (c == '_') {
                space = (space == ' ') ? '_' : ' ';
                last_show_wacs = 0;
-           } else if (cycle_attr(c, &at_code, &attr, my_list, my_size)
+           } else if (cycle_w_attr(c, &at_code, &attr, my_list, my_size)
                       || cycle_colors(c, &fg, &bg, &pair)) {
                if (last_show_wacs != 0)
                    break;
                       || cycle_colors(c, &fg, &bg, &pair)) {
                if (last_show_wacs != 0)
                    break;
@@ -4280,7 +4348,7 @@ x_acs_test(bool recur GCC_UNUSED)
                 "Select: a/d/t WACS, w=all x=box, u UTF-8, ^L repaint");
        MvPrintw(LINES - 3, 2,
                 "0-9,+/- non-ASCII, </> repeat, _ space, ESC=quit");
                 "Select: a/d/t WACS, w=all x=box, u UTF-8, ^L repaint");
        MvPrintw(LINES - 3, 2,
                 "0-9,+/- non-ASCII, </> repeat, _ space, ESC=quit");
-       if (use_colors) {
+       if (UseColors) {
            MvPrintw(LINES - 2, 2,
                     "v/V, f/F, b/B cycle through video attributes (%s) and color %d/%d.",
                     my_list[at_code].name,
            MvPrintw(LINES - 2, 2,
                     "v/V, f/F, b/B cycle through video attributes (%s) and color %d/%d.",
                     my_list[at_code].name,
@@ -4313,7 +4381,7 @@ sgr_attr_test(bool recur GCC_UNUSED)
        chtype normal = ((pass == 0 ? A_NORMAL : A_REVERSE)) | BLANK;
 
        /* Use non-default colors if possible to exercise bce a little */
        chtype normal = ((pass == 0 ? A_NORMAL : A_REVERSE)) | BLANK;
 
        /* Use non-default colors if possible to exercise bce a little */
-       if (use_colors) {
+       if (UseColors) {
            init_pair(1, COLOR_WHITE, COLOR_BLUE);
            normal |= (chtype) COLOR_PAIR(1);
        }
            init_pair(1, COLOR_WHITE, COLOR_BLUE);
            normal |= (chtype) COLOR_PAIR(1);
        }
@@ -4994,7 +5062,7 @@ mkpanel(NCURSES_COLOR_T color, int rows, int cols, int tly, int tlx)
     if ((win = newwin(rows, cols, tly, tlx)) != 0) {
        if ((pan = new_panel(win)) == 0) {
            delwin(win);
     if ((win = newwin(rows, cols, tly, tlx)) != 0) {
        if ((pan = new_panel(win)) == 0) {
            delwin(win);
-       } else if (use_colors) {
+       } else if (UseColors) {
            NCURSES_COLOR_T fg = (NCURSES_COLOR_T) ((color == COLOR_BLUE)
                                                    ? COLOR_WHITE
                                                    : COLOR_BLACK);
            NCURSES_COLOR_T fg = (NCURSES_COLOR_T) ((color == COLOR_BLUE)
                                                    ? COLOR_WHITE
                                                    : COLOR_BLACK);
@@ -5738,7 +5806,7 @@ pad_test(bool recur GCC_UNUSED)
        return ERR;
     }
 #ifdef A_COLOR
        return ERR;
     }
 #ifdef A_COLOR
-    if (use_colors) {
+    if (UseColors) {
        init_pair(1, COLOR_BLACK, COLOR_GREEN);
        init_pair(2, COLOR_CYAN, COLOR_BLUE);
        wbkgd(panpad, (chtype) (COLOR_PAIR(2) | ' '));
        init_pair(1, COLOR_BLACK, COLOR_GREEN);
        init_pair(2, COLOR_CYAN, COLOR_BLUE);
        wbkgd(panpad, (chtype) (COLOR_PAIR(2) | ' '));
@@ -5800,7 +5868,7 @@ flushinp_test(bool recur GCC_UNUSED)
        return ERR;
 
 #ifdef A_COLOR
        return ERR;
 
 #ifdef A_COLOR
-    if (use_colors) {
+    if (UseColors) {
        init_pair(2, COLOR_CYAN, COLOR_BLUE);
        wbkgd(subWin, (chtype) (COLOR_PAIR(2) | ' '));
     }
        init_pair(2, COLOR_CYAN, COLOR_BLUE);
        wbkgd(subWin, (chtype) (COLOR_PAIR(2) | ' '));
     }
@@ -6704,7 +6772,7 @@ overlap_help(int state, int flavors[OVERLAP_FLAVORS])
                        "refresh %s, then %s, then doupdate.", ths, tht);
            break;
        case 1:
                        "refresh %s, then %s, then doupdate.", ths, tht);
            break;
        case 1:
-           if (use_colors) {
+           if (UseColors) {
                flavors[row] %= 4;
            } else {
                flavors[row] %= 2;
                flavors[row] %= 4;
            } else {
                flavors[row] %= 2;
@@ -6714,7 +6782,7 @@ overlap_help(int state, int flavors[OVERLAP_FLAVORS])
                        "fill window %s with letter %s.", ths, ths);
            break;
        case 2:
                        "fill window %s with letter %s.", ths, ths);
            break;
        case 2:
-           if (use_colors) {
+           if (UseColors) {
                flavors[row] %= 4;
            } else {
                flavors[row] %= 2;
                flavors[row] %= 4;
            } else {
                flavors[row] %= 2;
@@ -7013,6 +7081,10 @@ settings_test(bool recur GCC_UNUSED)
 #endif
     show_boolean_setting("has_ic", has_ic());
     show_boolean_setting("has_il", has_il());
 #endif
     show_boolean_setting("has_ic", has_ic());
     show_boolean_setting("has_il", has_il());
+    show_boolean_setting("has_colors", has_colors());
+#if HAVE_COLOR_CONTENT
+    show_boolean_setting("can_change_color", can_change_color());
+#endif
     Pause();
     erase();
     exit_curses();
     Pause();
     erase();
     exit_curses();
@@ -7396,16 +7468,16 @@ main(int argc, char *argv[])
     def_prog_mode();
 
     /* tests, in general, will want these modes */
     def_prog_mode();
 
     /* tests, in general, will want these modes */
-    use_colors = (bool) (monochrome ? FALSE : has_colors());
+    UseColors = (bool) (monochrome ? FALSE : has_colors());
 
 
-    if (use_colors) {
+    if (UseColors) {
        start_color();
 #ifdef NCURSES_VERSION_PATCH
        start_color();
 #ifdef NCURSES_VERSION_PATCH
-       max_colors = COLORS;    /* was > 16 ? 16 : COLORS */
+       MaxColors = COLORS;     /* was > 16 ? 16 : COLORS */
 #if HAVE_USE_DEFAULT_COLORS
        if (default_colors) {
            use_default_colors();
 #if HAVE_USE_DEFAULT_COLORS
        if (default_colors) {
            use_default_colors();
-           min_colors = -1;
+           MinColors = -1;
        }
 #if HAVE_ASSUME_DEFAULT_COLORS
        if (assumed_colors)
        }
 #if HAVE_ASSUME_DEFAULT_COLORS
        if (assumed_colors)
@@ -7413,7 +7485,7 @@ main(int argc, char *argv[])
 #endif
 #endif
 #else /* normal SVr4 curses */
 #endif
 #endif
 #else /* normal SVr4 curses */
-       max_colors = COLORS;    /* was > 8 ? 8 : COLORS */
+       MaxColors = COLORS;     /* was > 8 ? 8 : COLORS */
 #endif
        max_pairs = COLOR_PAIRS;        /* was > 256 ? 256 : COLOR_PAIRS */
 
 #endif
        max_pairs = COLOR_PAIRS;        /* was > 256 ? 256 : COLOR_PAIRS */
 
index 462e340bc8a42493e813ddc550e620f2fcfbe503..20b26d024e4ae32e38de030572ce86c4fda6cf78 100644 (file)
@@ -2,7 +2,7 @@
  *  newdemo.c  -       A demo program using PDCurses. The program illustrate
  *                     the use of colours for text output.
  *
  *  newdemo.c  -       A demo program using PDCurses. The program illustrate
  *                     the use of colours for text output.
  *
- * $Id: newdemo.c,v 1.44 2017/09/04 11:49:55 tom Exp $
+ * $Id: newdemo.c,v 1.45 2017/09/30 15:43:08 tom Exp $
  */
 
 #include <test.priv.h>
  */
 
 #include <test.priv.h>
@@ -230,9 +230,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
 
     setlocale(LC_ALL, "");
 
 
     setlocale(LC_ALL, "");
 
-    CATCHALL(trap);
-
-    initscr();
+    InitAndCatch(initscr(), trap);
     if (has_colors())
        start_color();
     cbreak();
     if (has_colors())
        start_color();
     cbreak();
index 33dc46f1dd1cb907d71cff3e892267b46c74dbd5..12844cbdd7041009e528fc61884d5f77b80df51a 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 2000-2011,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 2000-2013,2017 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
  *                                                                          *
  * 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 - 2000
  *
 /*
  * Author: Thomas E. Dickey - 2000
  *
- * $Id: railroad.c,v 1.21 2013/09/28 22:02:17 tom Exp $
+ * $Id: railroad.c,v 1.22 2017/09/30 17:55:22 tom Exp $
  *
  * A simple demo of the termcap interface.
  */
  *
  * A simple demo of the termcap interface.
  */
@@ -187,10 +187,13 @@ railroad(char **args)
     NCURSES_CONST char *name = getenv("TERM");
     char buffer[1024];
     char area[1024], *ap = area;
     NCURSES_CONST char *name = getenv("TERM");
     char buffer[1024];
     char area[1024], *ap = area;
+    int z;
 
     if (name == 0)
        name = "dumb";
 
     if (name == 0)
        name = "dumb";
-    if (tgetent(buffer, name) >= 0) {
+
+    InitAndCatch(z = tgetent(buffer, name), onsig);
+    if (z >= 0) {
 
        wipeit = tgetstr("ce", &ap);
        height = tgetnum("li");
 
        wipeit = tgetstr("ce", &ap);
        height = tgetnum("li");
@@ -220,8 +223,6 @@ railroad(char **args)
 
        MyShowCursor(0);
 
 
        MyShowCursor(0);
 
-       CATCHALL(onsig);
-
        while (*args) {
            ShowSign(*args++);
        }
        while (*args) {
            ShowSign(*args++);
        }
index c51c7b0a9cde01f71337daadb3e4fa766082591d..cd51336ef6257f1000fa496ad9c496ba99d2db11 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: rain.c,v 1.46 2017/09/09 00:37:51 tom Exp $
+ * $Id: rain.c,v 1.47 2017/09/30 18:10:05 tom Exp $
  */
 #include <test.priv.h>
 #include <popup_msg.h>
  */
 #include <test.priv.h>
 #include <popup_msg.h>
@@ -349,9 +349,7 @@ main(int argc, char *argv[])
 
     setlocale(LC_ALL, "");
 
 
     setlocale(LC_ALL, "");
 
-    CATCHALL(onsig);
-
-    initscr();
+    InitAndCatch(initscr(), onsig);
     if (has_colors()) {
        int bg = COLOR_BLACK;
        start_color();
     if (has_colors()) {
        int bg = COLOR_BLACK;
        start_color();
index e48800dbabd13b93471a0bbcc5d16f51f5d729a5..6cd4c60811f5fc3630cbbe2f88bd3f1ee66da3b8 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: savescreen.c,v 1.34 2017/09/04 15:01:45 tom Exp $
+ * $Id: savescreen.c,v 1.35 2017/09/29 23:42:22 tom Exp $
  *
  * Demonstrate save/restore functions from the curses library.
  * Thomas Dickey - 2007/7/14
  *
  * Demonstrate save/restore functions from the curses library.
  * Thomas Dickey - 2007/7/14
@@ -475,7 +475,7 @@ main(int argc, char *argv[])
                continue;
            }
            if (!done) {
                continue;
            }
            if (!done) {
-               attr_t attr = (A_REVERSE | (attr_t) COLOR_PAIR(color * COLORS));
+               chtype attr = (A_REVERSE | (chtype) COLOR_PAIR(color * COLORS));
                chtype ch2 = (altchars ? MyMarker : '#');
                move(y, x);
                AddCh(ch2 | attr);
                chtype ch2 = (altchars ? MyMarker : '#');
                move(y, x);
                AddCh(ch2 | attr);
index dcfa8e753e0259841cb38952267a39bb50dc086f..a7cc109cf9f8b2561f8d35ed1ca5d0136bd8458c 100644 (file)
@@ -29,7 +29,7 @@
 /****************************************************************************
  *  Author: Thomas E. Dickey                    1996-on                     *
  ****************************************************************************/
 /****************************************************************************
  *  Author: Thomas E. Dickey                    1996-on                     *
  ****************************************************************************/
-/* $Id: test.priv.h,v 1.154 2017/09/06 20:07:40 tom Exp $ */
+/* $Id: test.priv.h,v 1.158 2017/09/30 17:58:37 tom Exp $ */
 
 #ifndef __TEST_PRIV_H
 #define __TEST_PRIV_H 1
 
 #ifndef __TEST_PRIV_H
 #define __TEST_PRIV_H 1
@@ -683,7 +683,15 @@ extern char *numnames[], *numcodes[], *numfnames[];
 extern char *strnames[], *strcodes[], *strfnames[];
 #endif
 
 extern char *strnames[], *strcodes[], *strfnames[];
 #endif
 
-#ifdef DECL_CURSES_DATA_TTYTYPE
+#ifndef HAVE_CURSES_DATA_TTYTYPE
+#define HAVE_CURSES_DATA_TTYTYPE 0
+#endif
+
+#ifndef DECL_CURSES_DATA_TTYTYPE
+#define DECL_CURSES_DATA_TTYTYPE 0
+#endif
+
+#if !HAVE_CURSES_DATA_TTYTYPE || DECL_CURSES_DATA_TTYTYPE
 #define ttytype termname()
 #endif
 
 #define ttytype termname()
 #endif
 
@@ -890,12 +898,18 @@ extern char *strnames[], *strcodes[], *strfnames[];
 
 #define VT_ACSC "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~"
 
 
 #define VT_ACSC "``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~"
 
-#define CATCHALL(handler) { \
+#define CATCHALL(handler) do { \
                int nsig; \
                for (nsig = SIGHUP; nsig < SIGTERM; ++nsig) \
                    if (nsig != SIGKILL) \
                        signal(nsig, handler); \
                int nsig; \
                for (nsig = SIGHUP; nsig < SIGTERM; ++nsig) \
                    if (nsig != SIGKILL) \
                        signal(nsig, handler); \
-           }
+           } while(0)
+
+#ifdef NCURSES_VERSION
+#define InitAndCatch(init,handler) do { CATCHALL(handler); init; } while (0)
+#else
+#define InitAndCatch(init,handler) do { init; CATCHALL(handler); } while (0)
+#endif
 
 /*
  * Workaround for clean(er) compile with Solaris's legacy curses.
 
 /*
  * Workaround for clean(er) compile with Solaris's legacy curses.
@@ -1018,9 +1032,9 @@ extern int _nc_getenv_num(const char *);
  * The macro likely uses unsigned values, while X/Open prototype uses int.
  */
 #if defined(wattrset) || defined(PDCURSES)
  * The macro likely uses unsigned values, while X/Open prototype uses int.
  */
 #if defined(wattrset) || defined(PDCURSES)
-#define AttrArg(p,a)    (attr_t) ((attr_t)(p) | (attr_t)(a))
+#define AttrArg(p,a)    (chtype) ((chtype)(p) | (chtype)(a))
 #else
 #else
-#define AttrArg(p,a)    (int) ((attr_t)(p) | (attr_t)(a))
+#define AttrArg(p,a)    (int) ((chtype)(p) | (chtype)(a))
 #endif
 
 /*
 #endif
 
 /*
index 0a1a1290367ee05baf2e490ac5c4b4077b062f40..2158d147982ec48498786adf4f2e4534edb45777 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: test_addchstr.c,v 1.23 2017/09/06 09:27:20 tom Exp $
+ * $Id: test_addchstr.c,v 1.24 2017/09/28 23:10:29 tom Exp $
  *
  * Demonstrate the waddchstr() and waddch functions.
  * Thomas Dickey - 2009/9/12
  *
  * Demonstrate the waddchstr() and waddch functions.
  * Thomas Dickey - 2009/9/12
@@ -64,7 +64,7 @@ static bool pass_ctls = FALSE;
 static bool w_opt = FALSE;
 static int n_opt = -1;
 
 static bool w_opt = FALSE;
 static int n_opt = -1;
 
-static attr_t show_attr;
+static chtype show_attr;
 static chtype *temp_buffer;
 static size_t temp_length;
 
 static chtype *temp_buffer;
 static size_t temp_length;
 
@@ -282,7 +282,7 @@ recursive_test(int level)
     doupdate();
 
     if (has_colors()) {
     doupdate();
 
     if (has_colors()) {
-       show_attr = (attr_t) COLOR_PAIR(1);
+       show_attr = (chtype) COLOR_PAIR(1);
        wbkgdset(work, show_attr | ' ');
     } else {
        show_attr = A_STANDOUT;
        wbkgdset(work, show_attr | ' ');
     } else {
        show_attr = A_STANDOUT;
index 5d560bb6dad652da81afe0083055b283ad8e0bcb..f07c2e05d1ef1faecfdb1cc389fcf9351bfa243f 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: test_get_wstr.c,v 1.10 2017/07/01 20:41:03 tom Exp $
+ * $Id: test_get_wstr.c,v 1.11 2017/09/28 23:10:54 tom Exp $
  *
  * Author: Thomas E Dickey
  *
  *
  * Author: Thomas E Dickey
  *
@@ -80,14 +80,14 @@ Remainder(WINDOW *txtwin)
 static void
 ShowPrompt(WINDOW *txtwin, int limit)
 {
 static void
 ShowPrompt(WINDOW *txtwin, int limit)
 {
-    wchgat(txtwin, limit, A_REVERSE, 0, NULL);
+    wchgat(txtwin, limit, WA_REVERSE, 0, NULL);
     wnoutrefresh(txtwin);
 }
 
 static void
 MovePrompt(WINDOW *txtwin, int limit, int y, int x)
 {
     wnoutrefresh(txtwin);
 }
 
 static void
 MovePrompt(WINDOW *txtwin, int limit, int y, int x)
 {
-    wchgat(txtwin, Remainder(txtwin), A_NORMAL, 0, NULL);
+    wchgat(txtwin, Remainder(txtwin), WA_NORMAL, 0, NULL);
     wmove(txtwin, y, x);
     ShowPrompt(txtwin, limit);
 }
     wmove(txtwin, y, x);
     ShowPrompt(txtwin, limit);
 }
index bb1c12656fcbbebda53fa0a5e840337d076bd23c..227394b1ef92b9d6f0193920a63ac4f2b71ef570 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: test_getstr.c,v 1.12 2017/07/01 20:34:55 tom Exp $
+ * $Id: test_getstr.c,v 1.13 2017/09/28 23:11:12 tom Exp $
  *
  * Author: Thomas E Dickey
  *
  *
  * Author: Thomas E Dickey
  *
@@ -87,14 +87,14 @@ Remainder(WINDOW *txtwin)
 static void
 ShowPrompt(WINDOW *txtwin, int limit)
 {
 static void
 ShowPrompt(WINDOW *txtwin, int limit)
 {
-    wchgat(txtwin, limit, A_REVERSE, 0, NULL);
+    wchgat(txtwin, limit, WA_REVERSE, 0, NULL);
     wnoutrefresh(txtwin);
 }
 
 static void
 MovePrompt(WINDOW *txtwin, int limit, int y, int x)
 {
     wnoutrefresh(txtwin);
 }
 
 static void
 MovePrompt(WINDOW *txtwin, int limit, int y, int x)
 {
-    wchgat(txtwin, Remainder(txtwin), A_NORMAL, 0, NULL);
+    wchgat(txtwin, Remainder(txtwin), WA_NORMAL, 0, NULL);
     wmove(txtwin, y, x);
     ShowPrompt(txtwin, limit);
 }
     wmove(txtwin, y, x);
     ShowPrompt(txtwin, limit);
 }
index 1f960b9aa2b846affa5d54bc610176057b2becfd..e24628e2fb263f4b1e66e46ecfd1db9d94e81813 100644 (file)
@@ -50,7 +50,7 @@
  * scroll operation worked, and the refresh() code only had to do a
  * partial repaint.
  *
  * scroll operation worked, and the refresh() code only had to do a
  * partial repaint.
  *
- * $Id: view.c,v 1.102 2017/09/04 00:39:24 tom Exp $
+ * $Id: view.c,v 1.104 2017/09/30 17:50:38 tom Exp $
  */
 
 #include <test.priv.h>
  */
 
 #include <test.priv.h>
@@ -259,6 +259,7 @@ main(int argc, char *argv[])
     int value = 0;
     bool done = FALSE;
     bool got_number = FALSE;
     int value = 0;
     bool done = FALSE;
     bool got_number = FALSE;
+    bool ignore_sigs = FALSE;
     bool single_step = FALSE;
 #if CAN_RESIZE
     bool nonposix_resize = FALSE;
     bool single_step = FALSE;
 #if CAN_RESIZE
     bool nonposix_resize = FALSE;
@@ -281,7 +282,7 @@ main(int argc, char *argv[])
            try_color = TRUE;
            break;
        case 'i':
            try_color = TRUE;
            break;
        case 'i':
-           CATCHALL(SIG_IGN);
+           ignore_sigs = TRUE;
            break;
        case 'n':
            if ((MAXLINES = atoi(optarg)) < 1 ||
            break;
        case 'n':
            if ((MAXLINES = atoi(optarg)) < 1 ||
@@ -388,7 +389,11 @@ main(int argc, char *argv[])
     (void) fclose(fp);
     num_lines = (int) (lptr - vec_lines);
 
     (void) fclose(fp);
     num_lines = (int) (lptr - vec_lines);
 
-    (void) initscr();          /* initialize the curses library */
+    if (ignore_sigs) {
+       InitAndCatch(initscr(), SIG_IGN);
+    } else {
+       initscr();
+    }
     keypad(stdscr, TRUE);      /* enable keyboard mapping */
     (void) nonl();             /* tell curses not to do NL->CR/NL on output */
     (void) cbreak();           /* take input chars one at a time, no wait for \n */
     keypad(stdscr, TRUE);      /* enable keyboard mapping */
     (void) nonl();             /* tell curses not to do NL->CR/NL on output */
     (void) cbreak();           /* take input chars one at a time, no wait for \n */
@@ -641,7 +646,7 @@ show_all(const char *tag)
            }
 #if defined(NCURSES_VERSION) || defined(HAVE_WCHGAT)
            if (try_color)
            }
 #if defined(NCURSES_VERSION) || defined(HAVE_WCHGAT)
            if (try_color)
-               wchgat(stdscr, -1, A_NORMAL, my_pair, NULL);
+               wchgat(stdscr, -1, WA_NORMAL, my_pair, NULL);
 #endif
        }
     }
 #endif
        }
     }
index fbbf4f4fa796b469fa5b9a292dfa9979baf124f2..f66ba6f04c612b8e70dcd5f189d115804c023d7b 100644 (file)
@@ -92,7 +92,7 @@
 /******************************************************************************/
 
 /*
 /******************************************************************************/
 
 /*
- * $Id: xmas.c,v 1.31 2017/09/08 09:21:02 tom Exp $
+ * $Id: xmas.c,v 1.33 2017/09/30 19:14:13 tom Exp $
  */
 #include <test.priv.h>
 
  */
 #include <test.priv.h>
 
@@ -454,37 +454,31 @@ blinkit(void)
     switch (cycle) {
     case 0:
        overlay(treescrn3, treescrn8);
     switch (cycle) {
     case 0:
        overlay(treescrn3, treescrn8);
-       wrefresh(treescrn8);
-       wrefresh(w_del_msg);
        break;
     case 1:
        overlay(treescrn4, treescrn8);
        break;
     case 1:
        overlay(treescrn4, treescrn8);
-       wrefresh(treescrn8);
-       wrefresh(w_del_msg);
        break;
     case 2:
        overlay(treescrn5, treescrn8);
        break;
     case 2:
        overlay(treescrn5, treescrn8);
-       wrefresh(treescrn8);
-       wrefresh(w_del_msg);
        break;
     case 3:
        overlay(treescrn6, treescrn8);
        break;
     case 3:
        overlay(treescrn6, treescrn8);
-       wrefresh(treescrn8);
-       wrefresh(w_del_msg);
        break;
     case 4:
        overlay(treescrn7, treescrn8);
        break;
     case 4:
        overlay(treescrn7, treescrn8);
-       wrefresh(treescrn8);
-       wrefresh(w_del_msg);
        break;
     }
     touchwin(treescrn8);
        break;
     }
     touchwin(treescrn8);
+    wrefresh(treescrn8);
+    wrefresh(w_del_msg);
+    look_out(50);
 
     /*ALL ON************************************************** */
 
     overlay(treescrn, treescrn8);
     wrefresh(treescrn8);
     wrefresh(w_del_msg);
 
     /*ALL ON************************************************** */
 
     overlay(treescrn, treescrn8);
     wrefresh(treescrn8);
     wrefresh(w_del_msg);
+    look_out(50);
 
     ++cycle;
     return (0);
 
     ++cycle;
     return (0);
@@ -642,8 +636,6 @@ reindeer(void)
 static void
 done(int sig GCC_UNUSED)
 {
 static void
 done(int sig GCC_UNUSED)
 {
-    CATCHALL(done);
-
     move(LINES - 1, 0);
     refresh();
     exit_curses();
     move(LINES - 1, 0);
     refresh();
     exit_curses();
@@ -705,13 +697,11 @@ main(int argc, char *argv[])
 
     setlocale(LC_ALL, "");
 
 
     setlocale(LC_ALL, "");
 
-    initscr();
+    InitAndCatch(initscr(), done);
     noecho();
     nonl();
     refresh();
 
     noecho();
     nonl();
     refresh();
 
-    CATCHALL(done);
-
     if (has_colors()) {
        start_color();
 #if HAVE_USE_DEFAULT_COLORS
     if (has_colors()) {
        start_color();
 #if HAVE_USE_DEFAULT_COLORS