Changeset 8ec404e6


Ignore:
Timestamp:
Jun 5, 2009, 2:04:05 PM (15 years ago)
Author:
Jim Gifford <clfs@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
613a326
Parents:
b057cfe
Message:

Updated Ncurses Branch Update Patch to -14

File:
1 moved

Legend:

Unmodified
Added
Removed
  • patches/ncurses-5.7-branch_update-14.patch

    rb057cfe r8ec404e6  
    11Submitted By: Jim Gifford (jim at cross-lfs dot org)
    2 Date: 03-22-2009
     2Date: 06-05-2009
    33Initial Package Version: 5.7
    44Origin: Upstream
    55Upstream Status: Applied
    66Description: This is a branch update for NCurses-5.7, and should be
    7              rechecked periodically. This patch covers up to 5.7-20090321.
     7             rechecked periodically. This patch covers up to 5.7-20090530.
    88
    99diff -Naur ncurses-5.7.orig/aclocal.m4 ncurses-5.7/aclocal.m4
    1010--- ncurses-5.7.orig/aclocal.m4 2008-10-25 15:15:32.000000000 -0700
    11 +++ ncurses-5.7/aclocal.m4      2009-03-22 21:17:11.616376588 -0700
     11+++ ncurses-5.7/aclocal.m4      2009-06-05 14:01:31.000000000 -0700
    1212@@ -1,5 +1,5 @@
    1313 dnl***************************************************************************
     
    2222 dnl
    2323-dnl $Id: aclocal.m4,v 1.470 2008/10/25 22:15:32 tom Exp $
    24 +dnl $Id: aclocal.m4,v 1.485 2009/03/21 23:15:19 tom Exp $
     24+dnl $Id: aclocal.m4,v 1.487 2009/04/04 22:32:42 tom Exp $
    2525 dnl Macros used in NCURSES auto-configuration script.
    2626 dnl
     
    297297 dnl ---------------------------------------------------------------------------
    298298-dnl CF_LDFLAGS_STATIC version: 4 updated: 2008/10/18 17:58:20
    299 +dnl CF_LDFLAGS_STATIC version: 6 updated: 2009/03/14 14:03:25
     299+dnl CF_LDFLAGS_STATIC version: 7 updated: 2009/04/04 18:31:04
    300300 dnl -----------------
    301301 dnl Check for compiler/linker flags used to temporarily force usage of static
     
    306306        case $cf_cv_system_name in #(
    307307-       OS/2*|os2*|aix[[45]]*)  #( vi
    308 +       OS/2*|os2*|aix[[4]]*|solaris2.1[[0-9]])         #( vi
     308+       OS/2*|os2*|aix[[4]]*|solaris2.1[[0-9]]|darwin*)         #( vi
    309309                LDFLAGS_STATIC=
    310310                LDFLAGS_SHARED=
     
    829829 dnl ---------------------------------------------------------------------------
    830830-dnl CF_WITH_LIBTOOL version: 19 updated: 2008/03/29 15:46:43
    831 +dnl CF_WITH_LIBTOOL version: 22 updated: 2009/03/21 19:14:56
     831+dnl CF_WITH_LIBTOOL version: 23 updated: 2009/03/28 14:26:27
    832832 dnl ---------------
    833833 dnl Provide a configure option to incorporate libtool.  Define several useful
     
    856856 dnl
    857857 AC_DEFUN([CF_WITH_LIBTOOL],
    858 @@ -5306,15 +5455,15 @@
     858@@ -5306,17 +5455,17 @@
    859859        AC_PROG_LIBTOOL
    860860        # missing_content_AC_PROG_LIBTOOL}}
     
    876876+       fi
    877877 ])dnl
    878         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
     878-       LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
     879+       LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
    879880        LIB_OBJECT='${OBJECTS:.o=.lo}'
    880 @@ -5331,16 +5480,23 @@
     881        LIB_SUFFIX=.la
     882        LIB_CLEAN='${LIBTOOL} --mode=clean'
     883@@ -5331,16 +5480,25 @@
    881884 
    882885        # Save the version in a cache variable - this is not entirely a good
     
    891894 
    892895+       # special hack to add -no-undefined (which libtool should do for itself)
     896+       LT_UNDEF=
    893897+       case "$cf_cv_system_name" in #(vi
    894898+       cygwin*|mingw32*|uwin*|aix[[456]]) #(vi
    895 +               LIBTOOL="$LIBTOOL -no-undefined"
     899+               LT_UNDEF=-no-undefined
    896900+               ;;
    897901+       esac
     902+       AC_SUBST([LT_UNDEF])
    898903+
    899904        # special hack to add --tag option for C++ compiler
     
    901906-       1.[[5-9]]*|[[2-9]]*)
    902907+       case $cf_cv_libtool_version in #(vi
    903 +       1.[[5-9]]*|[[2-9]]*) #(vi
     908+       1.[[5-9]]*|[[2-9]].[[0-9.a-z]]*) #(vi
    904909                LIBTOOL_CXX="$LIBTOOL --tag=CXX"
    905910                LIBTOOL="$LIBTOOL --tag=CC"
    906911                ;;
    907 @@ -5393,7 +5549,7 @@
     912@@ -5393,7 +5551,7 @@
    908913 AC_SUBST($3)dnl
    909914 ])dnl
     
    914919 dnl Process an option specifying a list of colon-separated paths.
    915920 dnl
    916 @@ -5409,7 +5565,7 @@
     921@@ -5409,7 +5567,7 @@
    917922 AC_ARG_WITH($1,[$2 ](default: ifelse($4,,empty,$4)),,
    918923 ifelse($4,,[withval=${$3}],[withval=${$3-ifelse($5,,$4,$5)}]))dnl
     
    923928 for cf_src_path in $withval
    924929 do
    925 @@ -5535,7 +5691,7 @@
     930@@ -5535,7 +5693,7 @@
    926931        [USE_VALGRIND])
    927932 ])dnl
     
    932937 dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
    933938 dnl or adapt to the vendor's definitions to get equivalent functionality,
    934 @@ -5552,7 +5708,7 @@
     939@@ -5552,7 +5710,7 @@
    935940 cf_POSIX_C_SOURCE=ifelse($2,,199506L,$2)
    936941 
     
    941946        ;;
    942947 freebsd*|dragonfly*) #(vi
    943 @@ -5569,7 +5725,7 @@
     948@@ -5569,7 +5727,7 @@
    944949 irix[[56]].*) #(vi
    945950        CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
     
    952957diff -Naur ncurses-5.7.orig/Ada95/gen/adacurses-config.in ncurses-5.7/Ada95/gen/adacurses-config.in
    953958--- ncurses-5.7.orig/Ada95/gen/adacurses-config.in      2007-04-07 14:06:50.000000000 -0700
    954 +++ ncurses-5.7/Ada95/gen/adacurses-config.in   2009-03-22 21:16:59.575606928 -0700
     959+++ ncurses-5.7/Ada95/gen/adacurses-config.in   2009-06-05 14:01:07.000000000 -0700
    955960@@ -1,18 +1,47 @@
    956961 #! /bin/sh
     
    10261031diff -Naur ncurses-5.7.orig/Ada95/gen/gen.c ncurses-5.7/Ada95/gen/gen.c
    10271032--- ncurses-5.7.orig/Ada95/gen/gen.c    2008-10-04 14:59:37.000000000 -0700
    1028 +++ ncurses-5.7/Ada95/gen/gen.c 2009-03-22 21:17:11.612376588 -0700
     1033+++ ncurses-5.7/Ada95/gen/gen.c 2009-06-05 14:01:24.000000000 -0700
    10291034@@ -1,5 +1,5 @@
    10301035 /****************************************************************************
     
    10651070diff -Naur ncurses-5.7.orig/Ada95/gen/Makefile.in ncurses-5.7/Ada95/gen/Makefile.in
    10661071--- ncurses-5.7.orig/Ada95/gen/Makefile.in      2008-10-04 15:58:31.000000000 -0700
    1067 +++ ncurses-5.7/Ada95/gen/Makefile.in   2009-03-22 21:16:59.575606928 -0700
     1072+++ ncurses-5.7/Ada95/gen/Makefile.in   2009-06-05 14:01:07.000000000 -0700
    10681073@@ -1,5 +1,5 @@
    10691074 ##############################################################################
     
    11211126diff -Naur ncurses-5.7.orig/Ada95/samples/Makefile.in ncurses-5.7/Ada95/samples/Makefile.in
    11221127--- ncurses-5.7.orig/Ada95/samples/Makefile.in  2006-12-17 08:45:02.000000000 -0800
    1123 +++ ncurses-5.7/Ada95/samples/Makefile.in       2009-03-22 21:16:59.579606090 -0700
     1128+++ ncurses-5.7/Ada95/samples/Makefile.in       2009-06-05 14:01:07.000000000 -0700
    11241129@@ -1,5 +1,5 @@
    11251130 ##############################################################################
     
    11601165diff -Naur ncurses-5.7.orig/Ada95/src/Makefile.in ncurses-5.7/Ada95/src/Makefile.in
    11611166--- ncurses-5.7.orig/Ada95/src/Makefile.in      2007-09-15 11:22:24.000000000 -0700
    1162 +++ ncurses-5.7/Ada95/src/Makefile.in   2009-03-22 21:16:59.579606090 -0700
     1167+++ ncurses-5.7/Ada95/src/Makefile.in   2009-06-05 14:01:07.000000000 -0700
    11631168@@ -1,5 +1,5 @@
    11641169 ##############################################################################
     
    12521257diff -Naur ncurses-5.7.orig/Ada95/src/terminal_interface-curses-mouse.adb ncurses-5.7/Ada95/src/terminal_interface-curses-mouse.adb
    12531258--- ncurses-5.7.orig/Ada95/src/terminal_interface-curses-mouse.adb      2008-07-26 11:51:11.000000000 -0700
    1254 +++ ncurses-5.7/Ada95/src/terminal_interface-curses-mouse.adb   2009-03-22 21:16:46.486767984 -0700
     1259+++ ncurses-5.7/Ada95/src/terminal_interface-curses-mouse.adb   2009-06-05 14:00:52.000000000 -0700
    12551260@@ -35,8 +35,8 @@
    12561261 ------------------------------------------------------------------------------
     
    12751280diff -Naur ncurses-5.7.orig/c++/cursesw.cc ncurses-5.7/c++/cursesw.cc
    12761281--- ncurses-5.7.orig/c++/cursesw.cc     2007-12-15 15:01:57.000000000 -0800
    1277 +++ ncurses-5.7/c++/cursesw.cc  2009-03-22 21:16:46.490769660 -0700
     1282+++ ncurses-5.7/c++/cursesw.cc  2009-06-05 14:01:30.000000000 -0700
    12781283@@ -1,6 +1,6 @@
    12791284 // * this is for making emacs happy: -*-Mode: C++;-*-
    12801285 /****************************************************************************
    12811286- * Copyright (c) 2007 Free Software Foundation, Inc.                        *
    1282 + * Copyright (c) 2007,2008 Free Software Foundation, Inc.                   *
     1287+ * Copyright (c) 2007-2008,2009 Free Software Foundation, Inc.              *
    12831288  *                                                                          *
    12841289  * Permission is hereby granted, free of charge, to any person obtaining a  *
     
    12891294 
    12901295-MODULE_ID("$Id: cursesw.cc,v 1.49 2007/12/15 23:01:57 tom Exp $")
    1291 +MODULE_ID("$Id: cursesw.cc,v 1.50 2008/11/23 00:17:31 juergen Exp $")
     1296+MODULE_ID("$Id: cursesw.cc,v 1.51 2009/03/28 21:31:37 tom Exp $")
    12921297 
    12931298 #define COLORS_NEED_INITIALIZATION  -1
     
    13011306 
    13021307 int _nc_xx_ripoff_init(WINDOW *w, int ncols)
    1303 @@ -464,7 +463,7 @@
     1308@@ -296,8 +295,7 @@
     1309 
     1310     RIPOFFINIT init = *prip++;
     1311     if (init) {
     1312-       NCursesWindow* W = new NCursesWindow(w,ncols);
     1313-       res = init(*W);
     1314+       res = init(*(new NCursesWindow(w,ncols)));
     1315     }
     1316     return res;
     1317 }
     1318@@ -464,7 +462,7 @@
    13041319 #if HAVE_HAS_KEY
    13051320 bool NCursesWindow::has_mouse() const
     
    13101325 }
    13111326 #endif
     1327diff -Naur ncurses-5.7.orig/c++/demo.cc ncurses-5.7/c++/demo.cc
     1328--- ncurses-5.7.orig/c++/demo.cc        2008-08-04 10:16:57.000000000 -0700
     1329+++ ncurses-5.7/c++/demo.cc     2009-06-05 14:01:49.000000000 -0700
     1330@@ -35,7 +35,7 @@
     1331  *   Demo code for NCursesMenu and NCursesForm written by
     1332  *   Juergen Pfeifer
     1333  *
     1334- * $Id: demo.cc,v 1.38 2008/08/04 17:16:57 tom Exp $
     1335+ * $Id: demo.cc,v 1.39 2008/12/07 02:07:34 juergen Exp $
     1336  */
     1337 
     1338 #include "internal.h"
     1339@@ -43,7 +43,13 @@
     1340 #include "cursesm.h"
     1341 #include "cursesf.h"
     1342 
     1343+#ifdef __MINGW32__
     1344+#undef KEY_EVENT
     1345+#endif
     1346+
     1347+#ifndef __MINGW32__
     1348 extern "C" unsigned int sleep(unsigned int);
     1349+#endif
     1350 
     1351 #undef index // needed for NeXT
     1352 
     1353diff -Naur ncurses-5.7.orig/c++/internal.h ncurses-5.7/c++/internal.h
     1354--- ncurses-5.7.orig/c++/internal.h     2008-10-25 14:35:44.000000000 -0700
     1355+++ ncurses-5.7/c++/internal.h  2009-06-05 14:01:49.000000000 -0700
     1356@@ -31,7 +31,7 @@
     1357  *   Author: Juergen Pfeifer, 1997                                          *
     1358  ****************************************************************************/
     1359 
     1360-// $Id: internal.h,v 1.16 2008/10/25 21:35:44 tom Exp $
     1361+// $Id: internal.h,v 1.17 2008/12/07 02:07:34 juergen Exp $
     1362 
     1363 #ifndef NCURSES_CPLUS_INTERNAL_H
     1364 #define NCURSES_CPLUS_INTERNAL_H 1
     1365@@ -44,6 +44,11 @@
     1366 #define MODULE_ID(id) /*nothing*/
     1367 #endif
     1368 
     1369+#ifdef __MINGW32__
     1370+#include <nc_mingw.h>
     1371+#undef KEY_EVENT
     1372+#endif
     1373+
     1374 #ifndef _QNX_SOURCE
     1375 #include <stdlib.h>
     1376 #include <string.h>
    13121377diff -Naur ncurses-5.7.orig/c++/Makefile.in ncurses-5.7/c++/Makefile.in
    13131378--- ncurses-5.7.orig/c++/Makefile.in    2007-04-28 08:29:12.000000000 -0700
    1314 +++ ncurses-5.7/c++/Makefile.in 2009-03-22 21:17:11.616376588 -0700
     1379+++ ncurses-5.7/c++/Makefile.in 2009-06-05 14:01:30.000000000 -0700
    13151380@@ -1,6 +1,6 @@
    13161381-# $Id: Makefile.in,v 1.84 2007/04/28 15:29:12 tom Exp $
    1317 +# $Id: Makefile.in,v 1.86 2009/03/21 20:02:11 Charles.Wilson Exp $
     1382+# $Id: Makefile.in,v 1.87 2009/03/28 18:22:39 Charles.Wilson Exp $
    13181383 ##############################################################################
    13191384-# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                #
     
    13221387 # Permission is hereby granted, free of charge, to any person obtaining a    #
    13231388 # copy of this software and associated documentation files (the "Software"), #
    1324 @@ -61,10 +61,10 @@
     1389@@ -55,16 +55,17 @@
     1390 LIBTOOL_LINK   = @LIB_LINK@
     1391 LIBTOOL_INSTALL        = @LIB_INSTALL@
     1392 LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
     1393+LT_UNDEF       = @LT_UNDEF@
     1394 
     1395 INSTALL                = @INSTALL@
     1396 INSTALL_LIB    = @INSTALL@ @INSTALL_LIB@
    13251397 INSTALL_DATA   = @INSTALL_DATA@
    13261398 
     
    13351407 
    13361408 CXX            = @CXX@
    1337 @@ -95,7 +95,7 @@
     1409@@ -95,7 +96,7 @@
    13381410 
    13391411 LINK           = @LINK_PROGS@ $(LIBTOOL_LINK) @CXXLDFLAGS@
     
    13441416 LIBROOT                = ncurses++
    13451417 
    1346 @@ -153,7 +153,7 @@
     1418@@ -153,14 +154,14 @@
    13471419        $(MODEL)/cursesmain$o
    13481420 
     
    13531425 
    13541426 ../lib/$(LIBNAME_LIBTOOL) : $(LIB_OBJS)
     1427        cd ../lib && $(LIBTOOL_LINK) $(CXX) $(CXXFLAGS) \
     1428                -o $(LIBNAME) $(LIB_OBJS:$o=.lo) \
     1429                -rpath $(INSTALL_PREFIX)$(libdir) \
     1430-               -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(SHLIB_LIST)
     1431+               -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(LT_UNDEF) $(SHLIB_LIST)
     1432 
     1433 OBJS_DEMO = $(MODEL)/demo$o
     1434 
    13551435diff -Naur ncurses-5.7.orig/config.guess ncurses-5.7/config.guess
    13561436--- ncurses-5.7.orig/config.guess       2008-08-30 13:25:07.000000000 -0700
    1357 +++ ncurses-5.7/config.guess    2009-03-22 21:16:55.651353540 -0700
     1437+++ ncurses-5.7/config.guess    2009-06-05 14:01:03.000000000 -0700
    13581438@@ -4,7 +4,7 @@
    13591439 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
     
    14251505diff -Naur ncurses-5.7.orig/config.sub ncurses-5.7/config.sub
    14261506--- ncurses-5.7.orig/config.sub 2008-08-30 13:25:02.000000000 -0700
    1427 +++ ncurses-5.7/config.sub      2009-03-22 21:16:55.651353540 -0700
     1507+++ ncurses-5.7/config.sub      2009-06-05 14:01:03.000000000 -0700
    14281508@@ -4,7 +4,7 @@
    14291509 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
     
    15091589diff -Naur ncurses-5.7.orig/configure ncurses-5.7/configure
    15101590--- ncurses-5.7.orig/configure  2008-10-25 17:04:38.000000000 -0700
    1511 +++ ncurses-5.7/configure       2009-03-22 21:17:11.632377985 -0700
     1591+++ ncurses-5.7/configure       2009-06-05 14:01:31.000000000 -0700
    15121592@@ -1,7 +1,7 @@
    15131593 #! /bin/sh
    15141594-# From configure.in Revision: 1.454 .
    1515 +# From configure.in Revision: 1.469 .
     1595+# From configure.in Revision: 1.470 .
    15161596 # Guess values for system-dependent variables and create Makefiles.
    15171597-# Generated by Autoconf 2.52.20080325.
     
    38203900+echo "${ECHO_T}no" >&6
    38213901+fi
    3822 +
     3902 
     3903-if test -z "$AR_OPTS" ; then
     3904-       AR_OPTS=rv
    38233905+fi
    38243906+if test -z "$ac_cv_prog_AR"; then
     
    38453927+done
    38463928 
    3847 -if test -z "$AR_OPTS" ; then
    3848 -       AR_OPTS=rv
    38493929+  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
    38503930+fi
    3851 +fi
     3931 fi
    38523932+ac_ct_AR=$ac_cv_prog_ac_ct_AR
    38533933+if test -n "$ac_ct_AR"; then
     
    38583938+echo "${ECHO_T}no" >&6
    38593939+fi
    3860  
     3940+
    38613941+  AR=$ac_ct_AR
    38623942+else
    38633943+  AR="$ac_cv_prog_AR"
    3864  fi
    3865  
    3866 -cf_cv_subst_AR_OPTS=$AR_OPTS
    3867 -echo "$as_me:3840: result: $AR_OPTS" >&5
    3868 -echo "${ECHO_T}$AR_OPTS" >&6
     3944+fi
     3945+
    38693946+echo "$as_me:4048: checking for options to update archives" >&5
    38703947+echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
     
    38783955+               rm -f conftest.$ac_cv_objext
    38793956+               rm -f conftest.a
    3880 +
     3957 
     3958-cf_cv_subst_AR_OPTS=$AR_OPTS
     3959-echo "$as_me:3840: result: $AR_OPTS" >&5
     3960-echo "${ECHO_T}$AR_OPTS" >&6
    38813961+               cat >conftest.$ac_ext <<EOF
    38823962+#line 4061 "configure"
     
    40934173 fi
    40944174 done
    4095 @@ -4106,19 +4351,19 @@
     4175@@ -4106,20 +4351,20 @@
    40964176 LIBTOOL=$ac_cv_path_LIBTOOL
    40974177 
     
    41154195    { (exit 1); exit 1; }; }
    41164196-       fi
     4197-       LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
    41174198+       fi
    4118         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
     4199+       LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
    41194200        LIB_OBJECT='${OBJECTS:.o=.lo}'
    41204201        LIB_SUFFIX=.la
    4121 @@ -4130,24 +4375,31 @@
     4202        LIB_CLEAN='${LIBTOOL} --mode=clean'
     4203@@ -4130,24 +4375,32 @@
    41224204        LIB_PREP=:
    41234205 
     
    41434225 
    41444226+       # special hack to add -no-undefined (which libtool should do for itself)
     4227+       LT_UNDEF=
    41454228+       case "$cf_cv_system_name" in #(vi
    41464229+       cygwin*|mingw32*|uwin*|aix[456]) #(vi
    4147 +               LIBTOOL="$LIBTOOL -no-undefined"
     4230+               LT_UNDEF=-no-undefined
    41484231+               ;;
    41494232+       esac
     
    41534236-       1.[5-9]*|[2-9]*)
    41544237+       case $cf_cv_libtool_version in #(vi
    4155 +       1.[5-9]*|[2-9]*) #(vi
     4238+       1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
    41564239                LIBTOOL_CXX="$LIBTOOL --tag=CXX"
    41574240                LIBTOOL="$LIBTOOL --tag=CC"
    41584241                ;;
    4159 @@ -4168,7 +4420,7 @@
     4242@@ -4168,7 +4421,7 @@
    41604243 
    41614244 else
    41624245 
    41634246-echo "$as_me:4171: checking if you want to build shared libraries" >&5
    4164 +echo "$as_me:4423: checking if you want to build shared libraries" >&5
     4247+echo "$as_me:4424: checking if you want to build shared libraries" >&5
    41654248 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
    41664249 
    41674250 # Check whether --with-shared or --without-shared was given.
    4168 @@ -4178,11 +4430,11 @@
     4251@@ -4178,11 +4431,11 @@
    41694252 else
    41704253   with_shared=no
    41714254 fi;
    41724255-echo "$as_me:4181: result: $with_shared" >&5
    4173 +echo "$as_me:4433: result: $with_shared" >&5
     4256+echo "$as_me:4434: result: $with_shared" >&5
    41744257 echo "${ECHO_T}$with_shared" >&6
    41754258 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
    41764259 
    41774260-echo "$as_me:4185: checking if you want to build static libraries" >&5
    4178 +echo "$as_me:4437: checking if you want to build static libraries" >&5
     4261+echo "$as_me:4438: checking if you want to build static libraries" >&5
    41794262 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
    41804263 
    41814264 # Check whether --with-normal or --without-normal was given.
    4182 @@ -4192,11 +4444,11 @@
     4265@@ -4192,11 +4445,11 @@
    41834266 else
    41844267   with_normal=yes
    41854268 fi;
    41864269-echo "$as_me:4195: result: $with_normal" >&5
    4187 +echo "$as_me:4447: result: $with_normal" >&5
     4270+echo "$as_me:4448: result: $with_normal" >&5
    41884271 echo "${ECHO_T}$with_normal" >&6
    41894272 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
    41904273 
    41914274-echo "$as_me:4199: checking if you want to build debug libraries" >&5
    4192 +echo "$as_me:4451: checking if you want to build debug libraries" >&5
     4275+echo "$as_me:4452: checking if you want to build debug libraries" >&5
    41934276 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
    41944277 
    41954278 # Check whether --with-debug or --without-debug was given.
    4196 @@ -4206,11 +4458,11 @@
     4279@@ -4206,11 +4459,11 @@
    41974280 else
    41984281   with_debug=yes
    41994282 fi;
    42004283-echo "$as_me:4209: result: $with_debug" >&5
    4201 +echo "$as_me:4461: result: $with_debug" >&5
     4284+echo "$as_me:4462: result: $with_debug" >&5
    42024285 echo "${ECHO_T}$with_debug" >&6
    42034286 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
    42044287 
    42054288-echo "$as_me:4213: checking if you want to build profiling libraries" >&5
    4206 +echo "$as_me:4465: checking if you want to build profiling libraries" >&5
     4289+echo "$as_me:4466: checking if you want to build profiling libraries" >&5
    42074290 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
    42084291 
    42094292 # Check whether --with-profile or --without-profile was given.
    4210 @@ -4220,7 +4472,7 @@
     4293@@ -4220,7 +4473,7 @@
    42114294 else
    42124295   with_profile=no
    42134296 fi;
    42144297-echo "$as_me:4223: result: $with_profile" >&5
    4215 +echo "$as_me:4475: result: $with_profile" >&5
     4298+echo "$as_me:4476: result: $with_profile" >&5
    42164299 echo "${ECHO_T}$with_profile" >&6
    42174300 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
    42184301 
    4219 @@ -4228,19 +4480,19 @@
     4302@@ -4228,19 +4481,19 @@
    42204303 
    42214304 ###############################################################################
    42224305 
    42234306-echo "$as_me:4231: checking for specified models" >&5
    4224 +echo "$as_me:4483: checking for specified models" >&5
     4307+echo "$as_me:4484: checking for specified models" >&5
    42254308 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
    42264309 test -z "$cf_list_models" && cf_list_models=normal
    42274310 test "$with_libtool" != "no" && cf_list_models=libtool
    42284311-echo "$as_me:4235: result: $cf_list_models" >&5
    4229 +echo "$as_me:4487: result: $cf_list_models" >&5
     4312+echo "$as_me:4488: result: $cf_list_models" >&5
    42304313 echo "${ECHO_T}$cf_list_models" >&6
    42314314 
     
    42334316 ### up test-applications.
    42344317-echo "$as_me:4240: checking for default model" >&5
    4235 +echo "$as_me:4492: checking for default model" >&5
     4318+echo "$as_me:4493: checking for default model" >&5
    42364319 echo $ECHO_N "checking for default model... $ECHO_C" >&6
    42374320 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
    42384321-echo "$as_me:4243: result: $DFT_LWR_MODEL" >&5
    4239 +echo "$as_me:4495: result: $DFT_LWR_MODEL" >&5
     4322+echo "$as_me:4496: result: $DFT_LWR_MODEL" >&5
    42404323 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
    42414324 
    42424325 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
    4243 @@ -4269,7 +4521,7 @@
     4326@@ -4269,7 +4522,7 @@
    42444327 
    42454328 ###############################################################################
    42464329 
    42474330-echo "$as_me:4272: checking if you want to build a separate terminfo library" >&5
    4248 +echo "$as_me:4524: checking if you want to build a separate terminfo library" >&5
     4331+echo "$as_me:4525: checking if you want to build a separate terminfo library" >&5
    42494332 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
    42504333 
    42514334 # Check whether --with-termlib or --without-termlib was given.
    4252 @@ -4279,10 +4531,10 @@
     4335@@ -4279,10 +4532,10 @@
    42534336 else
    42544337   with_termlib=no
    42554338 fi;
    42564339-echo "$as_me:4282: result: $with_termlib" >&5
    4257 +echo "$as_me:4534: result: $with_termlib" >&5
     4340+echo "$as_me:4535: result: $with_termlib" >&5
    42584341 echo "${ECHO_T}$with_termlib" >&6
    42594342 
    42604343-echo "$as_me:4285: checking if you want to build a separate tic library" >&5
    4261 +echo "$as_me:4537: checking if you want to build a separate tic library" >&5
     4344+echo "$as_me:4538: checking if you want to build a separate tic library" >&5
    42624345 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
    42634346 
    42644347 # Check whether --with-ticlib or --without-ticlib was given.
    4265 @@ -4292,13 +4544,13 @@
     4348@@ -4292,13 +4545,13 @@
    42664349 else
    42674350   with_ticlib=no
    42684351 fi;
    42694352-echo "$as_me:4295: result: $with_ticlib" >&5
    4270 +echo "$as_me:4547: result: $with_ticlib" >&5
     4353+echo "$as_me:4548: result: $with_ticlib" >&5
    42714354 echo "${ECHO_T}$with_ticlib" >&6
    42724355 
     
    42754358 
    42764359-echo "$as_me:4301: checking if you want to link with the GPM mouse library" >&5
    4277 +echo "$as_me:4553: checking if you want to link with the GPM mouse library" >&5
     4360+echo "$as_me:4554: checking if you want to link with the GPM mouse library" >&5
    42784361 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
    42794362 
    42804363 # Check whether --with-gpm or --without-gpm was given.
    4281 @@ -4308,27 +4560,27 @@
     4364@@ -4308,27 +4561,27 @@
    42824365 else
    42834366   with_gpm=maybe
    42844367 fi;
    42854368-echo "$as_me:4311: result: $with_gpm" >&5
    4286 +echo "$as_me:4563: result: $with_gpm" >&5
     4369+echo "$as_me:4564: result: $with_gpm" >&5
    42874370 echo "${ECHO_T}$with_gpm" >&6
    42884371 
    42894372 if test "$with_gpm" != no ; then
    42904373-       echo "$as_me:4315: checking for gpm.h" >&5
    4291 +       echo "$as_me:4567: checking for gpm.h" >&5
     4374+       echo "$as_me:4568: checking for gpm.h" >&5
    42924375 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
    42934376 if test "${ac_cv_header_gpm_h+set}" = set; then
     
    42964379   cat >conftest.$ac_ext <<_ACEOF
    42974380-#line 4321 "configure"
    4298 +#line 4573 "configure"
     4381+#line 4574 "configure"
    42994382 #include "confdefs.h"
    43004383 #include <gpm.h>
    43014384 _ACEOF
    43024385-if { (eval echo "$as_me:4325: \"$ac_cpp conftest.$ac_ext\"") >&5
    4303 +if { (eval echo "$as_me:4577: \"$ac_cpp conftest.$ac_ext\"") >&5
     4386+if { (eval echo "$as_me:4578: \"$ac_cpp conftest.$ac_ext\"") >&5
    43044387   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
    43054388   ac_status=$?
     
    43084391   cat conftest.err >&5
    43094392-  echo "$as_me:4331: \$? = $ac_status" >&5
    4310 +  echo "$as_me:4583: \$? = $ac_status" >&5
     4393+  echo "$as_me:4584: \$? = $ac_status" >&5
    43114394   (exit $ac_status); } >/dev/null; then
    43124395   if test -s conftest.err; then
    43134396     ac_cpp_err=$ac_c_preproc_warn_flag
    4314 @@ -4347,7 +4599,7 @@
     4397@@ -4347,7 +4600,7 @@
    43154398 fi
    43164399 rm -f conftest.err conftest.$ac_ext
    43174400 fi
    43184401-echo "$as_me:4350: result: $ac_cv_header_gpm_h" >&5
    4319 +echo "$as_me:4602: result: $ac_cv_header_gpm_h" >&5
     4402+echo "$as_me:4603: result: $ac_cv_header_gpm_h" >&5
    43204403 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
    43214404 if test $ac_cv_header_gpm_h = yes; then
    43224405 
    4323 @@ -4358,14 +4610,14 @@
     4406@@ -4358,14 +4611,14 @@
    43244407                if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
    43254408                        test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
    43264409 
    43274410-echo "${as_me-configure}:4361: testing assuming we really have GPM library ..." 1>&5
    4328 +echo "${as_me-configure}:4613: testing assuming we really have GPM library ..." 1>&5
     4411+echo "${as_me-configure}:4614: testing assuming we really have GPM library ..." 1>&5
    43294412 
    43304413                        cat >>confdefs.h <<\EOF
     
    43344417                else
    43354418-                       echo "$as_me:4368: checking for Gpm_Open in -lgpm" >&5
    4336 +                       echo "$as_me:4620: checking for Gpm_Open in -lgpm" >&5
     4419+                       echo "$as_me:4621: checking for Gpm_Open in -lgpm" >&5
    43374420 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
    43384421 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
    43394422   echo $ECHO_N "(cached) $ECHO_C" >&6
    4340 @@ -4373,7 +4625,7 @@
     4423@@ -4373,7 +4626,7 @@
    43414424   ac_check_lib_save_LIBS=$LIBS
    43424425 LIBS="-lgpm  $LIBS"
    43434426 cat >conftest.$ac_ext <<_ACEOF
    43444427-#line 4376 "configure"
    4345 +#line 4628 "configure"
     4428+#line 4629 "configure"
    43464429 #include "confdefs.h"
    43474430 
    43484431 /* Override any gcc2 internal prototype to avoid an error.  */
    4349 @@ -4392,16 +4644,16 @@
     4432@@ -4392,16 +4645,16 @@
    43504433 }
    43514434 _ACEOF
    43524435 rm -f conftest.$ac_objext conftest$ac_exeext
    43534436-if { (eval echo "$as_me:4395: \"$ac_link\"") >&5
    4354 +if { (eval echo "$as_me:4647: \"$ac_link\"") >&5
     4437+if { (eval echo "$as_me:4648: \"$ac_link\"") >&5
    43554438   (eval $ac_link) 2>&5
    43564439   ac_status=$?
    43574440-  echo "$as_me:4398: \$? = $ac_status" >&5
    4358 +  echo "$as_me:4650: \$? = $ac_status" >&5
     4441+  echo "$as_me:4651: \$? = $ac_status" >&5
    43594442   (exit $ac_status); } &&
    43604443          { ac_try='test -s conftest$ac_exeext'
    43614444-  { (eval echo "$as_me:4401: \"$ac_try\"") >&5
    4362 +  { (eval echo "$as_me:4653: \"$ac_try\"") >&5
     4445+  { (eval echo "$as_me:4654: \"$ac_try\"") >&5
    43634446   (eval $ac_try) 2>&5
    43644447   ac_status=$?
    43654448-  echo "$as_me:4404: \$? = $ac_status" >&5
    4366 +  echo "$as_me:4656: \$? = $ac_status" >&5
     4449+  echo "$as_me:4657: \$? = $ac_status" >&5
    43674450   (exit $ac_status); }; }; then
    43684451   ac_cv_lib_gpm_Gpm_Open=yes
    43694452 else
    4370 @@ -4412,13 +4664,13 @@
     4453@@ -4412,13 +4665,13 @@
    43714454 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    43724455 LIBS=$ac_check_lib_save_LIBS
    43734456 fi
    43744457-echo "$as_me:4415: result: $ac_cv_lib_gpm_Gpm_Open" >&5
    4375 +echo "$as_me:4667: result: $ac_cv_lib_gpm_Gpm_Open" >&5
     4458+echo "$as_me:4668: result: $ac_cv_lib_gpm_Gpm_Open" >&5
    43764459 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
    43774460 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
     
    43804463 
    43814464-                               { { echo "$as_me:4421: error: Cannot link with GPM library" >&5
    4382 +                               { { echo "$as_me:4673: error: Cannot link with GPM library" >&5
     4465+                               { { echo "$as_me:4674: error: Cannot link with GPM library" >&5
    43834466 echo "$as_me: error: Cannot link with GPM library" >&2;}
    43844467    { (exit 1); exit 1; }; }
    43854468                fi
    4386 @@ -4428,7 +4680,7 @@
     4469@@ -4428,7 +4681,7 @@
    43874470 
    43884471 else
    43894472 
    43904473-               test "$with_gpm" != maybe && { echo "$as_me:4431: WARNING: Cannot find GPM header" >&5
    4391 +               test "$with_gpm" != maybe && { echo "$as_me:4683: WARNING: Cannot find GPM header" >&5
     4474+               test "$with_gpm" != maybe && { echo "$as_me:4684: WARNING: Cannot find GPM header" >&5
    43924475 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
    43934476                with_gpm=no
    43944477 
    4395 @@ -4437,7 +4689,7 @@
     4478@@ -4437,7 +4690,7 @@
    43964479 fi
    43974480 
    43984481 if test "$with_gpm" != no ; then
    43994482-       echo "$as_me:4440: checking if you want to load GPM dynamically" >&5
    4400 +       echo "$as_me:4692: checking if you want to load GPM dynamically" >&5
     4483+       echo "$as_me:4693: checking if you want to load GPM dynamically" >&5
    44014484 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
    44024485 
    44034486 # Check whether --with-dlsym or --without-dlsym was given.
    4404 @@ -4447,18 +4699,18 @@
     4487@@ -4447,18 +4700,18 @@
    44054488 else
    44064489   with_dlsym=yes
    44074490 fi;
    44084491-       echo "$as_me:4450: result: $with_dlsym" >&5
    4409 +       echo "$as_me:4702: result: $with_dlsym" >&5
     4492+       echo "$as_me:4703: result: $with_dlsym" >&5
    44104493 echo "${ECHO_T}$with_dlsym" >&6
    44114494        if test "$with_dlsym" = yes ; then
     
    44134496 cf_have_dlsym=no
    44144497-echo "$as_me:4455: checking for dlsym" >&5
    4415 +echo "$as_me:4707: checking for dlsym" >&5
     4498+echo "$as_me:4708: checking for dlsym" >&5
    44164499 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
    44174500 if test "${ac_cv_func_dlsym+set}" = set; then
     
    44204503   cat >conftest.$ac_ext <<_ACEOF
    44214504-#line 4461 "configure"
    4422 +#line 4713 "configure"
     4505+#line 4714 "configure"
    44234506 #include "confdefs.h"
    44244507 /* System header to define __stub macros and hopefully few prototypes,
    44254508     which can conflict with char dlsym (); below.  */
    4426 @@ -4489,16 +4741,16 @@
     4509@@ -4489,16 +4742,16 @@
    44274510 }
    44284511 _ACEOF
    44294512 rm -f conftest.$ac_objext conftest$ac_exeext
    44304513-if { (eval echo "$as_me:4492: \"$ac_link\"") >&5
    4431 +if { (eval echo "$as_me:4744: \"$ac_link\"") >&5
     4514+if { (eval echo "$as_me:4745: \"$ac_link\"") >&5
    44324515   (eval $ac_link) 2>&5
    44334516   ac_status=$?
    44344517-  echo "$as_me:4495: \$? = $ac_status" >&5
    4435 +  echo "$as_me:4747: \$? = $ac_status" >&5
     4518+  echo "$as_me:4748: \$? = $ac_status" >&5
    44364519   (exit $ac_status); } &&
    44374520          { ac_try='test -s conftest$ac_exeext'
    44384521-  { (eval echo "$as_me:4498: \"$ac_try\"") >&5
    4439 +  { (eval echo "$as_me:4750: \"$ac_try\"") >&5
     4522+  { (eval echo "$as_me:4751: \"$ac_try\"") >&5
    44404523   (eval $ac_try) 2>&5
    44414524   ac_status=$?
    44424525-  echo "$as_me:4501: \$? = $ac_status" >&5
    4443 +  echo "$as_me:4753: \$? = $ac_status" >&5
     4526+  echo "$as_me:4754: \$? = $ac_status" >&5
    44444527   (exit $ac_status); }; }; then
    44454528   ac_cv_func_dlsym=yes
    44464529 else
    4447 @@ -4508,14 +4760,14 @@
     4530@@ -4508,14 +4761,14 @@
    44484531 fi
    44494532 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    44504533 fi
    44514534-echo "$as_me:4511: result: $ac_cv_func_dlsym" >&5
    4452 +echo "$as_me:4763: result: $ac_cv_func_dlsym" >&5
     4535+echo "$as_me:4764: result: $ac_cv_func_dlsym" >&5
    44534536 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
    44544537 if test $ac_cv_func_dlsym = yes; then
     
    44584541 cf_have_libdl=no
    44594542-echo "$as_me:4518: checking for dlsym in -ldl" >&5
    4460 +echo "$as_me:4770: checking for dlsym in -ldl" >&5
     4543+echo "$as_me:4771: checking for dlsym in -ldl" >&5
    44614544 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
    44624545 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
    44634546   echo $ECHO_N "(cached) $ECHO_C" >&6
    4464 @@ -4523,7 +4775,7 @@
     4547@@ -4523,7 +4776,7 @@
    44654548   ac_check_lib_save_LIBS=$LIBS
    44664549 LIBS="-ldl  $LIBS"
    44674550 cat >conftest.$ac_ext <<_ACEOF
    44684551-#line 4526 "configure"
    4469 +#line 4778 "configure"
     4552+#line 4779 "configure"
    44704553 #include "confdefs.h"
    44714554 
    44724555 /* Override any gcc2 internal prototype to avoid an error.  */
    4473 @@ -4542,16 +4794,16 @@
     4556@@ -4542,16 +4795,16 @@
    44744557 }
    44754558 _ACEOF
    44764559 rm -f conftest.$ac_objext conftest$ac_exeext
    44774560-if { (eval echo "$as_me:4545: \"$ac_link\"") >&5
    4478 +if { (eval echo "$as_me:4797: \"$ac_link\"") >&5
     4561+if { (eval echo "$as_me:4798: \"$ac_link\"") >&5
    44794562   (eval $ac_link) 2>&5
    44804563   ac_status=$?
    44814564-  echo "$as_me:4548: \$? = $ac_status" >&5
    4482 +  echo "$as_me:4800: \$? = $ac_status" >&5
     4565+  echo "$as_me:4801: \$? = $ac_status" >&5
    44834566   (exit $ac_status); } &&
    44844567          { ac_try='test -s conftest$ac_exeext'
    44854568-  { (eval echo "$as_me:4551: \"$ac_try\"") >&5
    4486 +  { (eval echo "$as_me:4803: \"$ac_try\"") >&5
     4569+  { (eval echo "$as_me:4804: \"$ac_try\"") >&5
    44874570   (eval $ac_try) 2>&5
    44884571   ac_status=$?
    44894572-  echo "$as_me:4554: \$? = $ac_status" >&5
    4490 +  echo "$as_me:4806: \$? = $ac_status" >&5
     4573+  echo "$as_me:4807: \$? = $ac_status" >&5
    44914574   (exit $ac_status); }; }; then
    44924575   ac_cv_lib_dl_dlsym=yes
    44934576 else
    4494 @@ -4562,7 +4814,7 @@
     4577@@ -4562,7 +4815,7 @@
    44954578 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    44964579 LIBS=$ac_check_lib_save_LIBS
    44974580 fi
    44984581-echo "$as_me:4565: result: $ac_cv_lib_dl_dlsym" >&5
    4499 +echo "$as_me:4817: result: $ac_cv_lib_dl_dlsym" >&5
     4582+echo "$as_me:4818: result: $ac_cv_lib_dl_dlsym" >&5
    45004583 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
    45014584 if test $ac_cv_lib_dl_dlsym = yes; then
    45024585 
    4503 @@ -4575,10 +4827,10 @@
     4586@@ -4575,10 +4828,10 @@
    45044587 if test "$cf_have_dlsym" = yes ; then
    45054588        test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
    45064589 
    45074590-       echo "$as_me:4578: checking whether able to link to dl*() functions" >&5
    4508 +       echo "$as_me:4830: checking whether able to link to dl*() functions" >&5
     4591+       echo "$as_me:4831: checking whether able to link to dl*() functions" >&5
    45094592 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
    45104593        cat >conftest.$ac_ext <<_ACEOF
    45114594-#line 4581 "configure"
    4512 +#line 4833 "configure"
     4595+#line 4834 "configure"
    45134596 #include "confdefs.h"
    45144597 #include <dlfcn.h>
    45154598 int
    4516 @@ -4596,16 +4848,16 @@
     4599@@ -4596,16 +4849,16 @@
    45174600 }
    45184601 _ACEOF
    45194602 rm -f conftest.$ac_objext conftest$ac_exeext
    45204603-if { (eval echo "$as_me:4599: \"$ac_link\"") >&5
    4521 +if { (eval echo "$as_me:4851: \"$ac_link\"") >&5
     4604+if { (eval echo "$as_me:4852: \"$ac_link\"") >&5
    45224605   (eval $ac_link) 2>&5
    45234606   ac_status=$?
    45244607-  echo "$as_me:4602: \$? = $ac_status" >&5
    4525 +  echo "$as_me:4854: \$? = $ac_status" >&5
     4608+  echo "$as_me:4855: \$? = $ac_status" >&5
    45264609   (exit $ac_status); } &&
    45274610          { ac_try='test -s conftest$ac_exeext'
    45284611-  { (eval echo "$as_me:4605: \"$ac_try\"") >&5
    4529 +  { (eval echo "$as_me:4857: \"$ac_try\"") >&5
     4612+  { (eval echo "$as_me:4858: \"$ac_try\"") >&5
    45304613   (eval $ac_try) 2>&5
    45314614   ac_status=$?
    45324615-  echo "$as_me:4608: \$? = $ac_status" >&5
    4533 +  echo "$as_me:4860: \$? = $ac_status" >&5
     4616+  echo "$as_me:4861: \$? = $ac_status" >&5
    45344617   (exit $ac_status); }; }; then
    45354618 
    45364619                cat >>confdefs.h <<\EOF
    4537 @@ -4616,15 +4868,15 @@
     4620@@ -4616,15 +4869,15 @@
    45384621   echo "$as_me: failed program was:" >&5
    45394622 cat conftest.$ac_ext >&5
    45404623 
    45414624-               { { echo "$as_me:4619: error: Cannot link test program for libdl" >&5
    4542 +               { { echo "$as_me:4871: error: Cannot link test program for libdl" >&5
     4625+               { { echo "$as_me:4872: error: Cannot link test program for libdl" >&5
    45434626 echo "$as_me: error: Cannot link test program for libdl" >&2;}
    45444627    { (exit 1); exit 1; }; }
     
    45464629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    45474630-       echo "$as_me:4624: result: ok" >&5
    4548 +       echo "$as_me:4876: result: ok" >&5
     4631+       echo "$as_me:4877: result: ok" >&5
    45494632 echo "${ECHO_T}ok" >&6
    45504633 else
    45514634-       { { echo "$as_me:4627: error: Cannot find dlsym function" >&5
    4552 +       { { echo "$as_me:4879: error: Cannot find dlsym function" >&5
     4635+       { { echo "$as_me:4880: error: Cannot find dlsym function" >&5
    45534636 echo "$as_me: error: Cannot find dlsym function" >&2;}
    45544637    { (exit 1); exit 1; }; }
    45554638 fi
    4556 @@ -4632,12 +4884,12 @@
     4639@@ -4632,12 +4885,12 @@
    45574640                if test "$with_gpm" != yes ; then
    45584641                        test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
    45594642 
    45604643-echo "${as_me-configure}:4635: testing assuming soname for gpm is $with_gpm ..." 1>&5
    4561 +echo "${as_me-configure}:4887: testing assuming soname for gpm is $with_gpm ..." 1>&5
     4644+echo "${as_me-configure}:4888: testing assuming soname for gpm is $with_gpm ..." 1>&5
    45624645 
    45634646                        cf_cv_gpm_soname="$with_gpm"
     
    45654648 
    45664649-echo "$as_me:4640: checking for soname of gpm library" >&5
    4567 +echo "$as_me:4892: checking for soname of gpm library" >&5
     4650+echo "$as_me:4893: checking for soname of gpm library" >&5
    45684651 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
    45694652 if test "${cf_cv_gpm_soname+set}" = set; then
    45704653   echo $ECHO_N "(cached) $ECHO_C" >&6
    4571 @@ -4655,15 +4907,15 @@
     4654@@ -4655,15 +4908,15 @@
    45724655 CF_EOF
    45734656 cf_save_LIBS="$LIBS"
    45744657        LIBS="-lgpm $LIBS"
    45754658-       if { (eval echo "$as_me:4658: \"$ac_compile\"") >&5
    4576 +       if { (eval echo "$as_me:4910: \"$ac_compile\"") >&5
     4659+       if { (eval echo "$as_me:4911: \"$ac_compile\"") >&5
    45774660   (eval $ac_compile) 2>&5
    45784661   ac_status=$?
    45794662-  echo "$as_me:4661: \$? = $ac_status" >&5
    4580 +  echo "$as_me:4913: \$? = $ac_status" >&5
     4663+  echo "$as_me:4914: \$? = $ac_status" >&5
    45814664   (exit $ac_status); } ; then
    45824665-               if { (eval echo "$as_me:4663: \"$ac_link\"") >&5
    4583 +               if { (eval echo "$as_me:4915: \"$ac_link\"") >&5
     4666+               if { (eval echo "$as_me:4916: \"$ac_link\"") >&5
    45844667   (eval $ac_link) 2>&5
    45854668   ac_status=$?
    45864669-  echo "$as_me:4666: \$? = $ac_status" >&5
    4587 +  echo "$as_me:4918: \$? = $ac_status" >&5
     4670+  echo "$as_me:4919: \$? = $ac_status" >&5
    45884671   (exit $ac_status); } ; then
    45894672                        cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
    45904673                        test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
    4591 @@ -4674,7 +4926,7 @@
     4674@@ -4674,7 +4927,7 @@
    45924675 fi
    45934676 
    45944677 fi
    45954678-echo "$as_me:4677: result: $cf_cv_gpm_soname" >&5
    4596 +echo "$as_me:4929: result: $cf_cv_gpm_soname" >&5
     4679+echo "$as_me:4930: result: $cf_cv_gpm_soname" >&5
    45974680 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
    45984681 
    45994682                fi
    4600 @@ -4690,7 +4942,7 @@
     4683@@ -4690,7 +4943,7 @@
    46014684 #define HAVE_LIBGPM 1
    46024685 EOF
    46034686 
    46044687-echo "$as_me:4693: checking for Gpm_Wgetch in -lgpm" >&5
    4605 +echo "$as_me:4945: checking for Gpm_Wgetch in -lgpm" >&5
     4688+echo "$as_me:4946: checking for Gpm_Wgetch in -lgpm" >&5
    46064689 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
    46074690 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
    46084691   echo $ECHO_N "(cached) $ECHO_C" >&6
    4609 @@ -4698,7 +4950,7 @@
     4692@@ -4698,7 +4951,7 @@
    46104693   ac_check_lib_save_LIBS=$LIBS
    46114694 LIBS="-lgpm  $LIBS"
    46124695 cat >conftest.$ac_ext <<_ACEOF
    46134696-#line 4701 "configure"
    4614 +#line 4953 "configure"
     4697+#line 4954 "configure"
    46154698 #include "confdefs.h"
    46164699 
    46174700 /* Override any gcc2 internal prototype to avoid an error.  */
    4618 @@ -4717,16 +4969,16 @@
     4701@@ -4717,16 +4970,16 @@
    46194702 }
    46204703 _ACEOF
    46214704 rm -f conftest.$ac_objext conftest$ac_exeext
    46224705-if { (eval echo "$as_me:4720: \"$ac_link\"") >&5
    4623 +if { (eval echo "$as_me:4972: \"$ac_link\"") >&5
     4706+if { (eval echo "$as_me:4973: \"$ac_link\"") >&5
    46244707   (eval $ac_link) 2>&5
    46254708   ac_status=$?
    46264709-  echo "$as_me:4723: \$? = $ac_status" >&5
    4627 +  echo "$as_me:4975: \$? = $ac_status" >&5
     4710+  echo "$as_me:4976: \$? = $ac_status" >&5
    46284711   (exit $ac_status); } &&
    46294712          { ac_try='test -s conftest$ac_exeext'
    46304713-  { (eval echo "$as_me:4726: \"$ac_try\"") >&5
    4631 +  { (eval echo "$as_me:4978: \"$ac_try\"") >&5
     4714+  { (eval echo "$as_me:4979: \"$ac_try\"") >&5
    46324715   (eval $ac_try) 2>&5
    46334716   ac_status=$?
    46344717-  echo "$as_me:4729: \$? = $ac_status" >&5
    4635 +  echo "$as_me:4981: \$? = $ac_status" >&5
     4718+  echo "$as_me:4982: \$? = $ac_status" >&5
    46364719   (exit $ac_status); }; }; then
    46374720   ac_cv_lib_gpm_Gpm_Wgetch=yes
    46384721 else
    4639 @@ -4737,11 +4989,11 @@
     4722@@ -4737,11 +4990,11 @@
    46404723 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    46414724 LIBS=$ac_check_lib_save_LIBS
    46424725 fi
    46434726-echo "$as_me:4740: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
    4644 +echo "$as_me:4992: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
     4727+echo "$as_me:4993: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
    46454728 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
    46464729 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
    46474730 
    46484731-echo "$as_me:4744: checking if GPM is weakly bound to curses library" >&5
    4649 +echo "$as_me:4996: checking if GPM is weakly bound to curses library" >&5
     4732+echo "$as_me:4997: checking if GPM is weakly bound to curses library" >&5
    46504733 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
    46514734 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
    46524735   echo $ECHO_N "(cached) $ECHO_C" >&6
    4653 @@ -4765,15 +5017,15 @@
     4736@@ -4765,15 +5018,15 @@
    46544737        # to rely on the static library, noting that some packagers may not
    46554738        # include it.
    46564739        LIBS="-static -lgpm -dynamic $LIBS"
    46574740-       if { (eval echo "$as_me:4768: \"$ac_compile\"") >&5
    4658 +       if { (eval echo "$as_me:5020: \"$ac_compile\"") >&5
     4741+       if { (eval echo "$as_me:5021: \"$ac_compile\"") >&5
    46594742   (eval $ac_compile) 2>&5
    46604743   ac_status=$?
    46614744-  echo "$as_me:4771: \$? = $ac_status" >&5
    4662 +  echo "$as_me:5023: \$? = $ac_status" >&5
     4745+  echo "$as_me:5024: \$? = $ac_status" >&5
    46634746   (exit $ac_status); } ; then
    46644747-               if { (eval echo "$as_me:4773: \"$ac_link\"") >&5
    4665 +               if { (eval echo "$as_me:5025: \"$ac_link\"") >&5
     4748+               if { (eval echo "$as_me:5026: \"$ac_link\"") >&5
    46664749   (eval $ac_link) 2>&5
    46674750   ac_status=$?
    46684751-  echo "$as_me:4776: \$? = $ac_status" >&5
    4669 +  echo "$as_me:5028: \$? = $ac_status" >&5
     4752+  echo "$as_me:5029: \$? = $ac_status" >&5
    46704753   (exit $ac_status); } ; then
    46714754                        cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
    46724755                        test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
    4673 @@ -4785,11 +5037,11 @@
     4756@@ -4785,11 +5038,11 @@
    46744757 fi
    46754758 
    46764759 fi
    46774760-echo "$as_me:4788: result: $cf_cv_check_gpm_wgetch" >&5
    4678 +echo "$as_me:5040: result: $cf_cv_check_gpm_wgetch" >&5
     4761+echo "$as_me:5041: result: $cf_cv_check_gpm_wgetch" >&5
    46794762 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
    46804763 
    46814764 if test "$cf_cv_check_gpm_wgetch" != yes ; then
    46824765-       { echo "$as_me:4792: WARNING: GPM library is already linked with curses - read the FAQ" >&5
    4683 +       { echo "$as_me:5044: WARNING: GPM library is already linked with curses - read the FAQ" >&5
     4766+       { echo "$as_me:5045: WARNING: GPM library is already linked with curses - read the FAQ" >&5
    46844767 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
    46854768 fi
    46864769 
    4687 @@ -4799,7 +5051,7 @@
     4770@@ -4799,7 +5052,7 @@
    46884771 
    46894772 # not everyone has "test -c"
    46904773 if test -c /dev/sysmouse 2>/dev/null ; then
    46914774-echo "$as_me:4802: checking if you want to use sysmouse" >&5
    4692 +echo "$as_me:5054: checking if you want to use sysmouse" >&5
     4775+echo "$as_me:5055: checking if you want to use sysmouse" >&5
    46934776 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
    46944777 
    46954778 # Check whether --with-sysmouse or --without-sysmouse was given.
    4696 @@ -4811,7 +5063,7 @@
     4779@@ -4811,7 +5064,7 @@
    46974780 fi;
    46984781        if test "$cf_with_sysmouse" != no ; then
    46994782        cat >conftest.$ac_ext <<_ACEOF
    47004783-#line 4814 "configure"
    4701 +#line 5066 "configure"
     4784+#line 5067 "configure"
    47024785 #include "confdefs.h"
    47034786 
    47044787 #include <osreldate.h>
    4705 @@ -4834,16 +5086,16 @@
     4788@@ -4834,16 +5087,16 @@
    47064789 }
    47074790 _ACEOF
    47084791 rm -f conftest.$ac_objext
    47094792-if { (eval echo "$as_me:4837: \"$ac_compile\"") >&5
    4710 +if { (eval echo "$as_me:5089: \"$ac_compile\"") >&5
     4793+if { (eval echo "$as_me:5090: \"$ac_compile\"") >&5
    47114794   (eval $ac_compile) 2>&5
    47124795   ac_status=$?
    47134796-  echo "$as_me:4840: \$? = $ac_status" >&5
    4714 +  echo "$as_me:5092: \$? = $ac_status" >&5
     4797+  echo "$as_me:5093: \$? = $ac_status" >&5
    47154798   (exit $ac_status); } &&
    47164799          { ac_try='test -s conftest.$ac_objext'
    47174800-  { (eval echo "$as_me:4843: \"$ac_try\"") >&5
    4718 +  { (eval echo "$as_me:5095: \"$ac_try\"") >&5
     4801+  { (eval echo "$as_me:5096: \"$ac_try\"") >&5
    47194802   (eval $ac_try) 2>&5
    47204803   ac_status=$?
    47214804-  echo "$as_me:4846: \$? = $ac_status" >&5
    4722 +  echo "$as_me:5098: \$? = $ac_status" >&5
     4805+  echo "$as_me:5099: \$? = $ac_status" >&5
    47234806   (exit $ac_status); }; }; then
    47244807   cf_with_sysmouse=yes
    47254808 else
    4726 @@ -4853,7 +5105,7 @@
     4809@@ -4853,7 +5106,7 @@
    47274810 fi
    47284811 rm -f conftest.$ac_objext conftest.$ac_ext
    47294812        fi
    47304813-echo "$as_me:4856: result: $cf_with_sysmouse" >&5
    4731 +echo "$as_me:5108: result: $cf_with_sysmouse" >&5
     4814+echo "$as_me:5109: result: $cf_with_sysmouse" >&5
    47324815 echo "${ECHO_T}$cf_with_sysmouse" >&6
    47334816 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
    47344817 #define USE_SYSMOUSE 1
    4735 @@ -4871,7 +5123,7 @@
     4818@@ -4871,7 +5124,7 @@
    47364819        test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
    47374820 fi
    47384821 
    47394822-echo "$as_me:4874: checking for default loader flags" >&5
    4740 +echo "$as_me:5126: checking for default loader flags" >&5
     4823+echo "$as_me:5127: checking for default loader flags" >&5
    47414824 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
    47424825 case $DFT_LWR_MODEL in
    47434826 libtool) LD_MODEL=''   ;;
    4744 @@ -4880,13 +5132,13 @@
     4827@@ -4880,13 +5133,13 @@
    47454828 profile) LD_MODEL='-pg';;
    47464829 shared)  LD_MODEL=''   ;;
    47474830 esac
    47484831-echo "$as_me:4883: result: $LD_MODEL" >&5
    4749 +echo "$as_me:5135: result: $LD_MODEL" >&5
     4832+echo "$as_me:5136: result: $LD_MODEL" >&5
    47504833 echo "${ECHO_T}$LD_MODEL" >&6
    47514834 
     
    47544837 
    47554838-echo "$as_me:4889: checking if rpath option should be used" >&5
    4756 +echo "$as_me:5141: checking if rpath option should be used" >&5
     4839+echo "$as_me:5142: checking if rpath option should be used" >&5
    47574840 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
    47584841 
    47594842 # Check whether --enable-rpath or --disable-rpath was given.
    4760 @@ -4896,10 +5148,10 @@
     4843@@ -4896,10 +5149,10 @@
    47614844 else
    47624845   cf_cv_ld_rpath=no
    47634846 fi;
    47644847-echo "$as_me:4899: result: $cf_cv_ld_rpath" >&5
    4765 +echo "$as_me:5151: result: $cf_cv_ld_rpath" >&5
     4848+echo "$as_me:5152: result: $cf_cv_ld_rpath" >&5
    47664849 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
    47674850 
    47684851-echo "$as_me:4902: checking if shared libraries should be relinked during install" >&5
    4769 +echo "$as_me:5154: checking if shared libraries should be relinked during install" >&5
     4852+echo "$as_me:5155: checking if shared libraries should be relinked during install" >&5
    47704853 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
    47714854 
    47724855 # Check whether --enable-relink or --disable-relink was given.
    4773 @@ -4909,19 +5161,20 @@
     4856@@ -4909,19 +5162,20 @@
    47744857 else
    47754858   cf_cv_do_relink=yes
    47764859 fi;
    47774860-echo "$as_me:4912: result: $cf_cv_do_relink" >&5
    4778 +echo "$as_me:5164: result: $cf_cv_do_relink" >&5
     4861+echo "$as_me:5165: result: $cf_cv_do_relink" >&5
    47794862 echo "${ECHO_T}$cf_cv_do_relink" >&6
    47804863        ;;
     
    47904873 
    47914874-       echo "$as_me:4924: checking if release/abi version should be used for shared libs" >&5
    4792 +       echo "$as_me:5177: checking if release/abi version should be used for shared libs" >&5
     4875+       echo "$as_me:5178: checking if release/abi version should be used for shared libs" >&5
    47934876 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
    47944877 
    47954878 # Check whether --with-shlib-version or --without-shlib-version was given.
    4796 @@ -4936,7 +5189,7 @@
     4879@@ -4936,7 +5190,7 @@
    47974880                cf_cv_shlib_version=$withval
    47984881                ;;
    47994882        *)
    48004883-               { { echo "$as_me:4939: error: option value must be one of: rel, abi, auto or no" >&5
    4801 +               { { echo "$as_me:5192: error: option value must be one of: rel, abi, auto or no" >&5
     4884+               { { echo "$as_me:5193: error: option value must be one of: rel, abi, auto or no" >&5
    48024885 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
    48034886    { (exit 1); exit 1; }; }
    48044887                ;;
    4805 @@ -4945,7 +5198,7 @@
     4888@@ -4945,7 +5199,7 @@
    48064889 else
    48074890   cf_cv_shlib_version=auto
    48084891 fi;
    48094892-       echo "$as_me:4948: result: $cf_cv_shlib_version" >&5
    4810 +       echo "$as_me:5201: result: $cf_cv_shlib_version" >&5
     4893+       echo "$as_me:5202: result: $cf_cv_shlib_version" >&5
    48114894 echo "${ECHO_T}$cf_cv_shlib_version" >&6
    48124895 
    48134896        cf_cv_rm_so_locs=no
    4814 @@ -4954,14 +5207,14 @@
     4897@@ -4954,14 +5208,14 @@
    48154898        CC_SHARED_OPTS=
    48164899        if test "$GCC" = yes
    48174900        then
    48184901-               echo "$as_me:4957: checking which $CC option to use" >&5
    4819 +               echo "$as_me:5210: checking which $CC option to use" >&5
     4902+               echo "$as_me:5211: checking which $CC option to use" >&5
    48204903 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
    48214904                cf_save_CFLAGS="$CFLAGS"
     
    48254908                        cat >conftest.$ac_ext <<_ACEOF
    48264909-#line 4964 "configure"
    4827 +#line 5217 "configure"
     4910+#line 5218 "configure"
    48284911 #include "confdefs.h"
    48294912 #include <stdio.h>
    48304913 int
    4831 @@ -4973,16 +5226,16 @@
     4914@@ -4973,16 +5227,16 @@
    48324915 }
    48334916 _ACEOF
    48344917 rm -f conftest.$ac_objext
    48354918-if { (eval echo "$as_me:4976: \"$ac_compile\"") >&5
    4836 +if { (eval echo "$as_me:5229: \"$ac_compile\"") >&5
     4919+if { (eval echo "$as_me:5230: \"$ac_compile\"") >&5
    48374920   (eval $ac_compile) 2>&5
    48384921   ac_status=$?
    48394922-  echo "$as_me:4979: \$? = $ac_status" >&5
    4840 +  echo "$as_me:5232: \$? = $ac_status" >&5
     4923+  echo "$as_me:5233: \$? = $ac_status" >&5
    48414924   (exit $ac_status); } &&
    48424925          { ac_try='test -s conftest.$ac_objext'
    48434926-  { (eval echo "$as_me:4982: \"$ac_try\"") >&5
    4844 +  { (eval echo "$as_me:5235: \"$ac_try\"") >&5
     4927+  { (eval echo "$as_me:5236: \"$ac_try\"") >&5
    48454928   (eval $ac_try) 2>&5
    48464929   ac_status=$?
    48474930-  echo "$as_me:4985: \$? = $ac_status" >&5
    4848 +  echo "$as_me:5238: \$? = $ac_status" >&5
     4931+  echo "$as_me:5239: \$? = $ac_status" >&5
    48494932   (exit $ac_status); }; }; then
    48504933   break
    48514934 else
    4852 @@ -4991,7 +5244,7 @@
     4935@@ -4991,7 +5245,7 @@
    48534936 fi
    48544937 rm -f conftest.$ac_objext conftest.$ac_ext
    48554938                done
    48564939-               echo "$as_me:4994: result: $CC_SHARED_OPTS" >&5
    4857 +               echo "$as_me:5247: result: $CC_SHARED_OPTS" >&5
     4940+               echo "$as_me:5248: result: $CC_SHARED_OPTS" >&5
    48584941 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
    48594942                CFLAGS="$cf_save_CFLAGS"
    48604943        fi
    4861 @@ -4999,6 +5252,12 @@
     4944@@ -4999,6 +5253,12 @@
    48624945        cf_cv_shlib_version_infix=no
    48634946 
     
    48724955                MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
    48734956                ;;
    4874 @@ -5027,7 +5286,7 @@
     4957@@ -5027,7 +5287,7 @@
    48754958                MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
    48764959                test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
    48774960                cf_cv_shlib_version_infix=yes
    48784961-               echo "$as_me:5030: checking if ld -search_paths_first works" >&5
    4879 +               echo "$as_me:5289: checking if ld -search_paths_first works" >&5
     4962+               echo "$as_me:5290: checking if ld -search_paths_first works" >&5
    48804963 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
    48814964 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
    48824965   echo $ECHO_N "(cached) $ECHO_C" >&6
    4883 @@ -5036,7 +5295,7 @@
     4966@@ -5036,7 +5296,7 @@
    48844967                        cf_save_LDFLAGS=$LDFLAGS
    48854968                        LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
    48864969                        cat >conftest.$ac_ext <<_ACEOF
    48874970-#line 5039 "configure"
    4888 +#line 5298 "configure"
     4971+#line 5299 "configure"
    48894972 #include "confdefs.h"
    48904973 
    48914974 int
    4892 @@ -5048,16 +5307,16 @@
     4975@@ -5048,16 +5308,16 @@
    48934976 }
    48944977 _ACEOF
    48954978 rm -f conftest.$ac_objext conftest$ac_exeext
    48964979-if { (eval echo "$as_me:5051: \"$ac_link\"") >&5
    4897 +if { (eval echo "$as_me:5310: \"$ac_link\"") >&5
     4980+if { (eval echo "$as_me:5311: \"$ac_link\"") >&5
    48984981   (eval $ac_link) 2>&5
    48994982   ac_status=$?
    49004983-  echo "$as_me:5054: \$? = $ac_status" >&5
    4901 +  echo "$as_me:5313: \$? = $ac_status" >&5
     4984+  echo "$as_me:5314: \$? = $ac_status" >&5
    49024985   (exit $ac_status); } &&
    49034986          { ac_try='test -s conftest$ac_exeext'
    49044987-  { (eval echo "$as_me:5057: \"$ac_try\"") >&5
    4905 +  { (eval echo "$as_me:5316: \"$ac_try\"") >&5
     4988+  { (eval echo "$as_me:5317: \"$ac_try\"") >&5
    49064989   (eval $ac_try) 2>&5
    49074990   ac_status=$?
    49084991-  echo "$as_me:5060: \$? = $ac_status" >&5
    4909 +  echo "$as_me:5319: \$? = $ac_status" >&5
     4992+  echo "$as_me:5320: \$? = $ac_status" >&5
    49104993   (exit $ac_status); }; }; then
    49114994   cf_cv_ldflags_search_paths_first=yes
    49124995 else
    4913 @@ -5068,7 +5327,7 @@
     4996@@ -5068,7 +5328,7 @@
    49144997 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    49154998                                LDFLAGS=$cf_save_LDFLAGS
    49164999 fi
    49175000-echo "$as_me:5071: result: $cf_cv_ldflags_search_paths_first" >&5
    4918 +echo "$as_me:5330: result: $cf_cv_ldflags_search_paths_first" >&5
     5001+echo "$as_me:5331: result: $cf_cv_ldflags_search_paths_first" >&5
    49195002 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
    49205003                if test $cf_cv_ldflags_search_paths_first = yes; then
    49215004                        LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
    4922 @@ -5090,10 +5349,10 @@
     5005@@ -5090,10 +5350,10 @@
    49235006        irix*)
    49245007                if test "$cf_cv_ld_rpath" = yes ; then
     
    49335016                        fi
    49345017                fi
    4935 @@ -5112,7 +5371,7 @@
     5018@@ -5112,7 +5372,7 @@
    49365019                        LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
    49375020                fi
     
    49425025                fi
    49435026 
    4944 @@ -5131,7 +5390,7 @@
     5027@@ -5131,7 +5391,7 @@
    49455028                        LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
    49465029                fi
     
    49515034                fi
    49525035                CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
    4953 @@ -5143,7 +5402,7 @@
     5036@@ -5143,7 +5403,7 @@
    49545037                cf_cv_shared_soname='`basename $@`'
    49555038        fi
     
    49605043        nto-qnx*|openbsd*|freebsd[12].*)
    49615044                CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
    4962 @@ -5155,7 +5414,7 @@
     5045@@ -5155,7 +5415,7 @@
    49635046                if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
    49645047                        LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
     
    49695052                fi
    49705053 
    4971 @@ -5166,11 +5425,11 @@
     5054@@ -5166,11 +5426,11 @@
    49725055                cf_cv_shared_soname='`basename $@`'
    49735056        fi
     
    49835066                        LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
    49845067                        LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
    4985 @@ -5192,7 +5451,7 @@
     5068@@ -5192,7 +5452,7 @@
    49865069 
    49875070                        MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
     
    49925075                ;;
    49935076        osf*|mls+*)
    4994 @@ -5211,7 +5470,7 @@
     5077@@ -5211,7 +5471,7 @@
    49955078                        LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
    49965079                fi
     
    50015084                fi
    50025085                cf_cv_rm_so_locs=yes
    5003 @@ -5246,7 +5505,7 @@
     5086@@ -5246,7 +5506,7 @@
    50045087                        LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
    50055088                fi
     
    50105093                fi
    50115094 
    5012 @@ -5258,7 +5517,43 @@
     5095@@ -5258,7 +5518,43 @@
    50135096        fi
    50145097 
     
    50205103+                               CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
    50215104+                               cat >conftest.$ac_ext <<_ACEOF
    5022 +#line 5525 "configure"
     5105+#line 5526 "configure"
    50235106+#include "confdefs.h"
    50245107+#include <stdio.h>
     
    50325115+_ACEOF
    50335116+rm -f conftest.$ac_objext
    5034 +if { (eval echo "$as_me:5537: \"$ac_compile\"") >&5
     5117+if { (eval echo "$as_me:5538: \"$ac_compile\"") >&5
    50355118+  (eval $ac_compile) 2>&5
    50365119+  ac_status=$?
    5037 +  echo "$as_me:5540: \$? = $ac_status" >&5
     5120+  echo "$as_me:5541: \$? = $ac_status" >&5
    50385121+  (exit $ac_status); } &&
    50395122+         { ac_try='test -s conftest.$ac_objext'
    5040 +  { (eval echo "$as_me:5543: \"$ac_try\"") >&5
     5123+  { (eval echo "$as_me:5544: \"$ac_try\"") >&5
    50415124+  (eval $ac_try) 2>&5
    50425125+  ac_status=$?
    5043 +  echo "$as_me:5546: \$? = $ac_status" >&5
     5126+  echo "$as_me:5547: \$? = $ac_status" >&5
    50445127+  (exit $ac_status); }; }; then
    50455128+  break
     
    50555138                else
    50565139                        MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
    5057 @@ -5285,20 +5580,20 @@
     5140@@ -5285,20 +5581,20 @@
    50585141                        test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
    50595142                        ;;
    50605143                *)
    50615144-                       { echo "$as_me:5288: WARNING: ignored --with-shlib-version" >&5
    5062 +                       { echo "$as_me:5583: WARNING: ignored --with-shlib-version" >&5
     5145+                       { echo "$as_me:5584: WARNING: ignored --with-shlib-version" >&5
    50635146 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
    50645147                        ;;
     
    50705153-               echo "$as_me:5296: checking if we need a space after rpath option" >&5
    50715154+       if test -n "$LD_RPATH_OPT" ; then
    5072 +               echo "$as_me:5591: checking if we need a space after rpath option" >&5
     5155+               echo "$as_me:5592: checking if we need a space after rpath option" >&5
    50735156 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
    50745157                cf_save_LIBS="$LIBS"
     
    50775160                cat >conftest.$ac_ext <<_ACEOF
    50785161-#line 5301 "configure"
    5079 +#line 5596 "configure"
     5162+#line 5597 "configure"
    50805163 #include "confdefs.h"
    50815164 
    50825165 int
    5083 @@ -5310,16 +5605,16 @@
     5166@@ -5310,16 +5606,16 @@
    50845167 }
    50855168 _ACEOF
    50865169 rm -f conftest.$ac_objext conftest$ac_exeext
    50875170-if { (eval echo "$as_me:5313: \"$ac_link\"") >&5
    5088 +if { (eval echo "$as_me:5608: \"$ac_link\"") >&5
     5171+if { (eval echo "$as_me:5609: \"$ac_link\"") >&5
    50895172   (eval $ac_link) 2>&5
    50905173   ac_status=$?
    50915174-  echo "$as_me:5316: \$? = $ac_status" >&5
    5092 +  echo "$as_me:5611: \$? = $ac_status" >&5
     5175+  echo "$as_me:5612: \$? = $ac_status" >&5
    50935176   (exit $ac_status); } &&
    50945177          { ac_try='test -s conftest$ac_exeext'
    50955178-  { (eval echo "$as_me:5319: \"$ac_try\"") >&5
    5096 +  { (eval echo "$as_me:5614: \"$ac_try\"") >&5
     5179+  { (eval echo "$as_me:5615: \"$ac_try\"") >&5
    50975180   (eval $ac_try) 2>&5
    50985181   ac_status=$?
    50995182-  echo "$as_me:5322: \$? = $ac_status" >&5
    5100 +  echo "$as_me:5617: \$? = $ac_status" >&5
     5183+  echo "$as_me:5618: \$? = $ac_status" >&5
    51015184   (exit $ac_status); }; }; then
    51025185   cf_rpath_space=no
    51035186 else
    5104 @@ -5329,16 +5624,16 @@
     5187@@ -5329,16 +5625,16 @@
    51055188 fi
    51065189 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    51075190                LIBS="$cf_save_LIBS"
    51085191-               echo "$as_me:5332: result: $cf_rpath_space" >&5
    5109 +               echo "$as_me:5627: result: $cf_rpath_space" >&5
     5192+               echo "$as_me:5628: result: $cf_rpath_space" >&5
    51105193 echo "${ECHO_T}$cf_rpath_space" >&6
    51115194-               test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
     
    51195202                if test "$model" = "shared"; then
    51205203-                       { { echo "$as_me:5341: error: Shared libraries are not supported in this version" >&5
    5121 +                       { { echo "$as_me:5636: error: Shared libraries are not supported in this version" >&5
     5204+                       { { echo "$as_me:5637: error: Shared libraries are not supported in this version" >&5
    51225205 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
    51235206    { (exit 1); exit 1; }; }
    51245207                fi
    5125 @@ -5348,7 +5643,7 @@
     5208@@ -5348,7 +5644,7 @@
    51265209 ###############################################################################
    51275210 
    51285211 ###    use option --disable-overwrite to leave out the link to -lcurses
    51295212-echo "$as_me:5351: checking if you wish to install ncurses overwriting curses" >&5
    5130 +echo "$as_me:5646: checking if you wish to install ncurses overwriting curses" >&5
     5213+echo "$as_me:5647: checking if you wish to install ncurses overwriting curses" >&5
    51315214 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
    51325215 
    51335216 # Check whether --enable-overwrite or --disable-overwrite was given.
    5134 @@ -5358,10 +5653,10 @@
     5217@@ -5358,10 +5654,10 @@
    51355218 else
    51365219   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
    51375220 fi;
    51385221-echo "$as_me:5361: result: $with_overwrite" >&5
    5139 +echo "$as_me:5656: result: $with_overwrite" >&5
     5222+echo "$as_me:5657: result: $with_overwrite" >&5
    51405223 echo "${ECHO_T}$with_overwrite" >&6
    51415224 
    51425225-echo "$as_me:5364: checking if external terminfo-database is used" >&5
    5143 +echo "$as_me:5659: checking if external terminfo-database is used" >&5
     5226+echo "$as_me:5660: checking if external terminfo-database is used" >&5
    51445227 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
    51455228 
    51465229 # Check whether --enable-database or --disable-database was given.
    5147 @@ -5371,7 +5666,7 @@
     5230@@ -5371,7 +5667,7 @@
    51485231 else
    51495232   use_database=yes
    51505233 fi;
    51515234-echo "$as_me:5374: result: $use_database" >&5
    5152 +echo "$as_me:5669: result: $use_database" >&5
     5235+echo "$as_me:5670: result: $use_database" >&5
    51535236 echo "${ECHO_T}$use_database" >&6
    51545237 
    51555238 case $host_os in #(vi
    5156 @@ -5384,8 +5679,8 @@
     5239@@ -5384,8 +5680,8 @@
    51575240 esac
    51585241 
     
    51655248 
    51665249 if test "$use_database" != no ; then
    5167 @@ -5393,7 +5688,7 @@
     5250@@ -5393,7 +5689,7 @@
    51685251 #define USE_DATABASE 1
    51695252 EOF
    51705253 
    51715254-       echo "$as_me:5396: checking which terminfo source-file will be installed" >&5
    5172 +       echo "$as_me:5691: checking which terminfo source-file will be installed" >&5
     5255+       echo "$as_me:5692: checking which terminfo source-file will be installed" >&5
    51735256 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
    51745257 
    51755258 # Check whether --enable-database or --disable-database was given.
    5176 @@ -5401,10 +5696,10 @@
     5259@@ -5401,10 +5697,10 @@
    51775260   enableval="$enable_database"
    51785261   TERMINFO_SRC=$withval
    51795262 fi;
    51805263-       echo "$as_me:5404: result: $TERMINFO_SRC" >&5
    5181 +       echo "$as_me:5699: result: $TERMINFO_SRC" >&5
     5264+       echo "$as_me:5700: result: $TERMINFO_SRC" >&5
    51825265 echo "${ECHO_T}$TERMINFO_SRC" >&6
    51835266 
    51845267-       echo "$as_me:5407: checking whether to use hashed database instead of directory/tree" >&5
    5185 +       echo "$as_me:5702: checking whether to use hashed database instead of directory/tree" >&5
     5268+       echo "$as_me:5703: checking whether to use hashed database instead of directory/tree" >&5
    51865269 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
    51875270 
    51885271 # Check whether --with-hashed-db or --without-hashed-db was given.
    5189 @@ -5414,13 +5709,13 @@
     5272@@ -5414,13 +5710,13 @@
    51905273 else
    51915274   with_hashed_db=no
    51925275 fi;
    51935276-       echo "$as_me:5417: result: $with_hashed_db" >&5
    5194 +       echo "$as_me:5712: result: $with_hashed_db" >&5
     5277+       echo "$as_me:5713: result: $with_hashed_db" >&5
    51955278 echo "${ECHO_T}$with_hashed_db" >&6
    51965279 else
     
    51995282 
    52005283-echo "$as_me:5423: checking for list of fallback descriptions" >&5
    5201 +echo "$as_me:5718: checking for list of fallback descriptions" >&5
     5284+echo "$as_me:5719: checking for list of fallback descriptions" >&5
    52025285 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
    52035286 
    52045287 # Check whether --with-fallbacks or --without-fallbacks was given.
    5205 @@ -5430,11 +5725,11 @@
     5288@@ -5430,11 +5726,11 @@
    52065289 else
    52075290   with_fallback=
    52085291 fi;
    52095292-echo "$as_me:5433: result: $with_fallback" >&5
    5210 +echo "$as_me:5728: result: $with_fallback" >&5
     5293+echo "$as_me:5729: result: $with_fallback" >&5
    52115294 echo "${ECHO_T}$with_fallback" >&6
    52125295 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
    52135296 
    52145297-echo "$as_me:5437: checking if you want modern xterm or antique" >&5
    5215 +echo "$as_me:5732: checking if you want modern xterm or antique" >&5
     5298+echo "$as_me:5733: checking if you want modern xterm or antique" >&5
    52165299 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
    52175300 
    52185301 # Check whether --with-xterm-new or --without-xterm-new was given.
    5219 @@ -5448,7 +5743,7 @@
     5302@@ -5448,7 +5744,7 @@
    52205303 no)    with_xterm_new=xterm-old;;
    52215304 *)     with_xterm_new=xterm-new;;
    52225305 esac
    52235306-echo "$as_me:5451: result: $with_xterm_new" >&5
    5224 +echo "$as_me:5746: result: $with_xterm_new" >&5
     5307+echo "$as_me:5747: result: $with_xterm_new" >&5
    52255308 echo "${ECHO_T}$with_xterm_new" >&6
    52265309 WHICH_XTERM=$with_xterm_new
    52275310 
    5228 @@ -5458,7 +5753,7 @@
     5311@@ -5458,7 +5754,7 @@
    52295312        MAKE_TERMINFO="#"
    52305313 else
    52315314 
    52325315-echo "$as_me:5461: checking for list of terminfo directories" >&5
    5233 +echo "$as_me:5756: checking for list of terminfo directories" >&5
     5316+echo "$as_me:5757: checking for list of terminfo directories" >&5
    52345317 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
    52355318 
    52365319 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
    5237 @@ -5468,7 +5763,7 @@
     5320@@ -5468,7 +5764,7 @@
    52385321 else
    52395322   withval=${TERMINFO_DIRS-${datadir}/terminfo}
     
    52445327 for cf_src_path in $withval
    52455328 do
    5246 @@ -5498,7 +5793,7 @@
     5329@@ -5498,7 +5794,7 @@
    52475330   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
    52485331   ;;
    52495332 *)
    52505333-  { { echo "$as_me:5501: error: expected a pathname, not \"$cf_src_path\"" >&5
    5251 +  { { echo "$as_me:5796: error: expected a pathname, not \"$cf_src_path\"" >&5
     5334+  { { echo "$as_me:5797: error: expected a pathname, not \"$cf_src_path\"" >&5
    52525335 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
    52535336    { (exit 1); exit 1; }; }
    52545337   ;;
    5255 @@ -5511,13 +5806,13 @@
     5338@@ -5511,13 +5807,13 @@
    52565339 
    52575340 eval 'TERMINFO_DIRS="$cf_dst_path"'
    52585341 
    52595342-echo "$as_me:5514: result: $TERMINFO_DIRS" >&5
    5260 +echo "$as_me:5809: result: $TERMINFO_DIRS" >&5
     5343+echo "$as_me:5810: result: $TERMINFO_DIRS" >&5
    52615344 echo "${ECHO_T}$TERMINFO_DIRS" >&6
    52625345 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
     
    52655348 
    52665349-echo "$as_me:5520: checking for default terminfo directory" >&5
    5267 +echo "$as_me:5815: checking for default terminfo directory" >&5
     5350+echo "$as_me:5816: checking for default terminfo directory" >&5
    52685351 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
    52695352 
    52705353 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
    5271 @@ -5553,7 +5848,7 @@
     5354@@ -5553,7 +5849,7 @@
    52725355   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
    52735356   ;;
    52745357 *)
    52755358-  { { echo "$as_me:5556: error: expected a pathname, not \"$withval\"" >&5
    5276 +  { { echo "$as_me:5851: error: expected a pathname, not \"$withval\"" >&5
     5359+  { { echo "$as_me:5852: error: expected a pathname, not \"$withval\"" >&5
    52775360 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
    52785361    { (exit 1); exit 1; }; }
    52795362   ;;
    5280 @@ -5562,7 +5857,7 @@
     5363@@ -5562,7 +5858,7 @@
    52815364 fi
    52825365 TERMINFO="$withval"
    52835366 
    52845367-echo "$as_me:5565: result: $TERMINFO" >&5
    5285 +echo "$as_me:5860: result: $TERMINFO" >&5
     5368+echo "$as_me:5861: result: $TERMINFO" >&5
    52865369 echo "${ECHO_T}$TERMINFO" >&6
    52875370 cat >>confdefs.h <<EOF
    52885371 #define TERMINFO "$TERMINFO"
    5289 @@ -5572,7 +5867,7 @@
     5372@@ -5572,7 +5868,7 @@
    52905373 
    52915374 ###    use option --disable-big-core to make tic run on small machines
    52925375 ###    We need 4Mb, check if we can allocate 50% more than that.
    52935376-echo "$as_me:5575: checking if big-core option selected" >&5
    5294 +echo "$as_me:5870: checking if big-core option selected" >&5
     5377+echo "$as_me:5871: checking if big-core option selected" >&5
    52955378 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
    52965379 
    52975380 # Check whether --enable-big-core or --disable-big-core was given.
    5298 @@ -5584,7 +5879,7 @@
     5381@@ -5584,7 +5880,7 @@
    52995382   with_big_core=no
    53005383 else
    53015384   cat >conftest.$ac_ext <<_ACEOF
    53025385-#line 5587 "configure"
    5303 +#line 5882 "configure"
     5386+#line 5883 "configure"
    53045387 #include "confdefs.h"
    53055388 
    53065389 #include <stdlib.h>
    5307 @@ -5598,15 +5893,15 @@
     5390@@ -5598,15 +5894,15 @@
    53085391 }
    53095392 _ACEOF
    53105393 rm -f conftest$ac_exeext
    53115394-if { (eval echo "$as_me:5601: \"$ac_link\"") >&5
    5312 +if { (eval echo "$as_me:5896: \"$ac_link\"") >&5
     5395+if { (eval echo "$as_me:5897: \"$ac_link\"") >&5
    53135396   (eval $ac_link) 2>&5
    53145397   ac_status=$?
    53155398-  echo "$as_me:5604: \$? = $ac_status" >&5
    5316 +  echo "$as_me:5899: \$? = $ac_status" >&5
     5399+  echo "$as_me:5900: \$? = $ac_status" >&5
    53175400   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    53185401-  { (eval echo "$as_me:5606: \"$ac_try\"") >&5
    5319 +  { (eval echo "$as_me:5901: \"$ac_try\"") >&5
     5402+  { (eval echo "$as_me:5902: \"$ac_try\"") >&5
    53205403   (eval $ac_try) 2>&5
    53215404   ac_status=$?
    53225405-  echo "$as_me:5609: \$? = $ac_status" >&5
    5323 +  echo "$as_me:5904: \$? = $ac_status" >&5
     5406+  echo "$as_me:5905: \$? = $ac_status" >&5
    53245407   (exit $ac_status); }; }; then
    53255408   with_big_core=yes
    53265409 else
    5327 @@ -5618,7 +5913,7 @@
     5410@@ -5618,7 +5914,7 @@
    53285411 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
    53295412 fi
    53305413 fi;
    53315414-echo "$as_me:5621: result: $with_big_core" >&5
    5332 +echo "$as_me:5916: result: $with_big_core" >&5
     5415+echo "$as_me:5917: result: $with_big_core" >&5
    53335416 echo "${ECHO_T}$with_big_core" >&6
    53345417 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
    53355418 #define HAVE_BIG_CORE 1
    5336 @@ -5627,7 +5922,7 @@
     5419@@ -5627,7 +5923,7 @@
    53375420 ### ISO C only guarantees 512-char strings, we have tables which load faster
    53385421 ### when constructed using "big" strings.  More than the C compiler, the awk
    53395422 ### program is a limit on most vendor UNIX systems.  Check that we can build.
    53405423-echo "$as_me:5630: checking if big-strings option selected" >&5
    5341 +echo "$as_me:5925: checking if big-strings option selected" >&5
     5424+echo "$as_me:5926: checking if big-strings option selected" >&5
    53425425 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
    53435426 
    53445427 # Check whether --enable-big-strings or --disable-big-strings was given.
    5345 @@ -5636,29 +5931,29 @@
     5428@@ -5636,29 +5932,29 @@
    53465429   with_big_strings=$enableval
    53475430 else
     
    53765459 fi;
    53775460-echo "$as_me:5654: result: $with_big_strings" >&5
    5378 +echo "$as_me:5949: result: $with_big_strings" >&5
     5461+echo "$as_me:5950: result: $with_big_strings" >&5
    53795462 echo "${ECHO_T}$with_big_strings" >&6
    53805463 
     
    53845467 ###    use option --enable-termcap to compile in the termcap fallback support
    53855468-echo "$as_me:5661: checking if you want termcap-fallback support" >&5
    5386 +echo "$as_me:5956: checking if you want termcap-fallback support" >&5
     5469+echo "$as_me:5957: checking if you want termcap-fallback support" >&5
    53875470 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
    53885471 
    53895472 # Check whether --enable-termcap or --disable-termcap was given.
    5390 @@ -5668,13 +5963,13 @@
     5473@@ -5668,13 +5964,13 @@
    53915474 else
    53925475   with_termcap=no
    53935476 fi;
    53945477-echo "$as_me:5671: result: $with_termcap" >&5
    5395 +echo "$as_me:5966: result: $with_termcap" >&5
     5478+echo "$as_me:5967: result: $with_termcap" >&5
    53965479 echo "${ECHO_T}$with_termcap" >&6
    53975480 
     
    54005483                if test -z "$with_fallback" ; then
    54015484-                       { { echo "$as_me:5677: error: You have disabled the database w/o specifying fallbacks" >&5
    5402 +                       { { echo "$as_me:5972: error: You have disabled the database w/o specifying fallbacks" >&5
     5485+                       { { echo "$as_me:5973: error: You have disabled the database w/o specifying fallbacks" >&5
    54035486 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
    54045487    { (exit 1); exit 1; }; }
    54055488                fi
    5406 @@ -5686,7 +5981,7 @@
     5489@@ -5686,7 +5982,7 @@
    54075490 else
    54085491 
    54095492 if test "$with_ticlib" != no ; then
    54105493-       { { echo "$as_me:5689: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
    5411 +       { { echo "$as_me:5984: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
     5494+       { { echo "$as_me:5985: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
    54125495 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
    54135496    { (exit 1); exit 1; }; }
    54145497 fi
    5415 @@ -5695,7 +5990,7 @@
     5498@@ -5695,7 +5991,7 @@
    54165499 #define USE_TERMCAP 1
    54175500 EOF
    54185501 
    54195502-echo "$as_me:5698: checking for list of termcap files" >&5
    5420 +echo "$as_me:5993: checking for list of termcap files" >&5
     5503+echo "$as_me:5994: checking for list of termcap files" >&5
    54215504 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
    54225505 
    54235506 # Check whether --with-termpath or --without-termpath was given.
    5424 @@ -5705,7 +6000,7 @@
     5507@@ -5705,7 +6001,7 @@
    54255508 else
    54265509   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
     
    54315514 for cf_src_path in $withval
    54325515 do
    5433 @@ -5735,7 +6030,7 @@
     5516@@ -5735,7 +6031,7 @@
    54345517   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
    54355518   ;;
    54365519 *)
    54375520-  { { echo "$as_me:5738: error: expected a pathname, not \"$cf_src_path\"" >&5
    5438 +  { { echo "$as_me:6033: error: expected a pathname, not \"$cf_src_path\"" >&5
     5521+  { { echo "$as_me:6034: error: expected a pathname, not \"$cf_src_path\"" >&5
    54395522 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
    54405523    { (exit 1); exit 1; }; }
    54415524   ;;
    5442 @@ -5748,14 +6043,14 @@
     5525@@ -5748,14 +6044,14 @@
    54435526 
    54445527 eval 'TERMPATH="$cf_dst_path"'
    54455528 
    54465529-echo "$as_me:5751: result: $TERMPATH" >&5
    5447 +echo "$as_me:6046: result: $TERMPATH" >&5
     5530+echo "$as_me:6047: result: $TERMPATH" >&5
    54485531 echo "${ECHO_T}$TERMPATH" >&6
    54495532 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
     
    54535536 ###    use option --enable-getcap to use a hacked getcap for reading termcaps
    54545537-echo "$as_me:5758: checking if fast termcap-loader is needed" >&5
    5455 +echo "$as_me:6053: checking if fast termcap-loader is needed" >&5
     5538+echo "$as_me:6054: checking if fast termcap-loader is needed" >&5
    54565539 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
    54575540 
    54585541 # Check whether --enable-getcap or --disable-getcap was given.
    5459 @@ -5765,13 +6060,13 @@
     5542@@ -5765,13 +6061,13 @@
    54605543 else
    54615544   with_getcap=no
    54625545 fi;
    54635546-echo "$as_me:5768: result: $with_getcap" >&5
    5464 +echo "$as_me:6063: result: $with_getcap" >&5
     5547+echo "$as_me:6064: result: $with_getcap" >&5
    54655548 echo "${ECHO_T}$with_getcap" >&6
    54665549 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
     
    54695552 
    54705553-echo "$as_me:5774: checking if translated termcaps will be cached in ~/.terminfo" >&5
    5471 +echo "$as_me:6069: checking if translated termcaps will be cached in ~/.terminfo" >&5
     5554+echo "$as_me:6070: checking if translated termcaps will be cached in ~/.terminfo" >&5
    54725555 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
    54735556 
    54745557 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
    5475 @@ -5781,7 +6076,7 @@
     5558@@ -5781,7 +6077,7 @@
    54765559 else
    54775560   with_getcap_cache=no
    54785561 fi;
    54795562-echo "$as_me:5784: result: $with_getcap_cache" >&5
    5480 +echo "$as_me:6079: result: $with_getcap_cache" >&5
     5563+echo "$as_me:6080: result: $with_getcap_cache" >&5
    54815564 echo "${ECHO_T}$with_getcap_cache" >&6
    54825565 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
    54835566 #define USE_GETCAP_CACHE 1
    5484 @@ -5790,7 +6085,7 @@
     5567@@ -5790,7 +6086,7 @@
    54855568 fi
    54865569 
    54875570 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
    54885571-echo "$as_me:5793: checking if ~/.terminfo is wanted" >&5
    5489 +echo "$as_me:6088: checking if ~/.terminfo is wanted" >&5
     5572+echo "$as_me:6089: checking if ~/.terminfo is wanted" >&5
    54905573 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
    54915574 
    54925575 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
    5493 @@ -5800,13 +6095,13 @@
     5576@@ -5800,13 +6096,13 @@
    54945577 else
    54955578   with_home_terminfo=yes
    54965579 fi;
    54975580-echo "$as_me:5803: result: $with_home_terminfo" >&5
    5498 +echo "$as_me:6098: result: $with_home_terminfo" >&5
     5581+echo "$as_me:6099: result: $with_home_terminfo" >&5
    54995582 echo "${ECHO_T}$with_home_terminfo" >&6
    55005583 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
     
    55035586 
    55045587-echo "$as_me:5809: checking if you want to use restricted environment when running as root" >&5
    5505 +echo "$as_me:6104: checking if you want to use restricted environment when running as root" >&5
     5588+echo "$as_me:6105: checking if you want to use restricted environment when running as root" >&5
    55065589 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
    55075590 
    55085591 # Check whether --enable-root-environ or --disable-root-environ was given.
    5509 @@ -5816,7 +6111,7 @@
     5592@@ -5816,7 +6112,7 @@
    55105593 else
    55115594   with_root_environ=yes
    55125595 fi;
    55135596-echo "$as_me:5819: result: $with_root_environ" >&5
    5514 +echo "$as_me:6114: result: $with_root_environ" >&5
     5597+echo "$as_me:6115: result: $with_root_environ" >&5
    55155598 echo "${ECHO_T}$with_root_environ" >&6
    55165599 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
    55175600 #define USE_ROOT_ENVIRON 1
    5518 @@ -5830,13 +6125,13 @@
     5601@@ -5830,13 +6126,13 @@
    55195602        unlink
    55205603 do
    55215604 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
    55225605-echo "$as_me:5833: checking for $ac_func" >&5
    5523 +echo "$as_me:6128: checking for $ac_func" >&5
     5606+echo "$as_me:6129: checking for $ac_func" >&5
    55245607 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
    55255608 if eval "test \"\${$as_ac_var+set}\" = set"; then
     
    55285611   cat >conftest.$ac_ext <<_ACEOF
    55295612-#line 5839 "configure"
    5530 +#line 6134 "configure"
     5613+#line 6135 "configure"
    55315614 #include "confdefs.h"
    55325615 /* System header to define __stub macros and hopefully few prototypes,
    55335616     which can conflict with char $ac_func (); below.  */
    5534 @@ -5867,16 +6162,16 @@
     5617@@ -5867,16 +6163,16 @@
    55355618 }
    55365619 _ACEOF
    55375620 rm -f conftest.$ac_objext conftest$ac_exeext
    55385621-if { (eval echo "$as_me:5870: \"$ac_link\"") >&5
    5539 +if { (eval echo "$as_me:6165: \"$ac_link\"") >&5
     5622+if { (eval echo "$as_me:6166: \"$ac_link\"") >&5
    55405623   (eval $ac_link) 2>&5
    55415624   ac_status=$?
    55425625-  echo "$as_me:5873: \$? = $ac_status" >&5
    5543 +  echo "$as_me:6168: \$? = $ac_status" >&5
     5626+  echo "$as_me:6169: \$? = $ac_status" >&5
    55445627   (exit $ac_status); } &&
    55455628          { ac_try='test -s conftest$ac_exeext'
    55465629-  { (eval echo "$as_me:5876: \"$ac_try\"") >&5
    5547 +  { (eval echo "$as_me:6171: \"$ac_try\"") >&5
     5630+  { (eval echo "$as_me:6172: \"$ac_try\"") >&5
    55485631   (eval $ac_try) 2>&5
    55495632   ac_status=$?
    55505633-  echo "$as_me:5879: \$? = $ac_status" >&5
    5551 +  echo "$as_me:6174: \$? = $ac_status" >&5
     5634+  echo "$as_me:6175: \$? = $ac_status" >&5
    55525635   (exit $ac_status); }; }; then
    55535636   eval "$as_ac_var=yes"
    55545637 else
    5555 @@ -5886,7 +6181,7 @@
     5638@@ -5886,7 +6182,7 @@
    55565639 fi
    55575640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    55585641 fi
    55595642-echo "$as_me:5889: result: `eval echo '${'$as_ac_var'}'`" >&5
    5560 +echo "$as_me:6184: result: `eval echo '${'$as_ac_var'}'`" >&5
     5643+echo "$as_me:6185: result: `eval echo '${'$as_ac_var'}'`" >&5
    55615644 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
    55625645 if test `eval echo '${'$as_ac_var'}'` = yes; then
    55635646   cat >>confdefs.h <<EOF
    5564 @@ -5903,13 +6198,13 @@
     5647@@ -5903,13 +6199,13 @@
    55655648                symlink
    55665649 do
    55675650 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
    55685651-echo "$as_me:5906: checking for $ac_func" >&5
    5569 +echo "$as_me:6201: checking for $ac_func" >&5
     5652+echo "$as_me:6202: checking for $ac_func" >&5
    55705653 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
    55715654 if eval "test \"\${$as_ac_var+set}\" = set"; then
     
    55745657   cat >conftest.$ac_ext <<_ACEOF
    55755658-#line 5912 "configure"
    5576 +#line 6207 "configure"
     5659+#line 6208 "configure"
    55775660 #include "confdefs.h"
    55785661 /* System header to define __stub macros and hopefully few prototypes,
    55795662     which can conflict with char $ac_func (); below.  */
    5580 @@ -5940,16 +6235,16 @@
     5663@@ -5940,16 +6236,16 @@
    55815664 }
    55825665 _ACEOF
    55835666 rm -f conftest.$ac_objext conftest$ac_exeext
    55845667-if { (eval echo "$as_me:5943: \"$ac_link\"") >&5
    5585 +if { (eval echo "$as_me:6238: \"$ac_link\"") >&5
     5668+if { (eval echo "$as_me:6239: \"$ac_link\"") >&5
    55865669   (eval $ac_link) 2>&5
    55875670   ac_status=$?
    55885671-  echo "$as_me:5946: \$? = $ac_status" >&5
    5589 +  echo "$as_me:6241: \$? = $ac_status" >&5
     5672+  echo "$as_me:6242: \$? = $ac_status" >&5
    55905673   (exit $ac_status); } &&
    55915674          { ac_try='test -s conftest$ac_exeext'
    55925675-  { (eval echo "$as_me:5949: \"$ac_try\"") >&5
    5593 +  { (eval echo "$as_me:6244: \"$ac_try\"") >&5
     5676+  { (eval echo "$as_me:6245: \"$ac_try\"") >&5
    55945677   (eval $ac_try) 2>&5
    55955678   ac_status=$?
    55965679-  echo "$as_me:5952: \$? = $ac_status" >&5
    5597 +  echo "$as_me:6247: \$? = $ac_status" >&5
     5680+  echo "$as_me:6248: \$? = $ac_status" >&5
    55985681   (exit $ac_status); }; }; then
    55995682   eval "$as_ac_var=yes"
    56005683 else
    5601 @@ -5959,7 +6254,7 @@
     5684@@ -5959,7 +6255,7 @@
    56025685 fi
    56035686 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    56045687 fi
    56055688-echo "$as_me:5962: result: `eval echo '${'$as_ac_var'}'`" >&5
    5606 +echo "$as_me:6257: result: `eval echo '${'$as_ac_var'}'`" >&5
     5689+echo "$as_me:6258: result: `eval echo '${'$as_ac_var'}'`" >&5
    56075690 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
    56085691 if test `eval echo '${'$as_ac_var'}'` = yes; then
    56095692   cat >>confdefs.h <<EOF
    5610 @@ -5970,7 +6265,7 @@
     5693@@ -5970,7 +6266,7 @@
    56115694 done
    56125695 
    56135696 else
    56145697-       echo "$as_me:5973: checking if link/symlink functions work" >&5
    5615 +       echo "$as_me:6268: checking if link/symlink functions work" >&5
     5698+       echo "$as_me:6269: checking if link/symlink functions work" >&5
    56165699 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
    56175700 if test "${cf_cv_link_funcs+set}" = set; then
    56185701   echo $ECHO_N "(cached) $ECHO_C" >&6
    5619 @@ -5983,7 +6278,7 @@
     5702@@ -5983,7 +6279,7 @@
    56205703                        eval 'ac_cv_func_'$cf_func'=error'
    56215704 else
    56225705   cat >conftest.$ac_ext <<_ACEOF
    56235706-#line 5986 "configure"
    5624 +#line 6281 "configure"
     5707+#line 6282 "configure"
    56255708 #include "confdefs.h"
    56265709 
    56275710 #include <sys/types.h>
    5628 @@ -6013,15 +6308,15 @@
     5711@@ -6013,15 +6309,15 @@
    56295712 
    56305713 _ACEOF
    56315714 rm -f conftest$ac_exeext
    56325715-if { (eval echo "$as_me:6016: \"$ac_link\"") >&5
    5633 +if { (eval echo "$as_me:6311: \"$ac_link\"") >&5
     5716+if { (eval echo "$as_me:6312: \"$ac_link\"") >&5
    56345717   (eval $ac_link) 2>&5
    56355718   ac_status=$?
    56365719-  echo "$as_me:6019: \$? = $ac_status" >&5
    5637 +  echo "$as_me:6314: \$? = $ac_status" >&5
     5720+  echo "$as_me:6315: \$? = $ac_status" >&5
    56385721   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    56395722-  { (eval echo "$as_me:6021: \"$ac_try\"") >&5
    5640 +  { (eval echo "$as_me:6316: \"$ac_try\"") >&5
     5723+  { (eval echo "$as_me:6317: \"$ac_try\"") >&5
    56415724   (eval $ac_try) 2>&5
    56425725   ac_status=$?
    56435726-  echo "$as_me:6024: \$? = $ac_status" >&5
    5644 +  echo "$as_me:6319: \$? = $ac_status" >&5
     5727+  echo "$as_me:6320: \$? = $ac_status" >&5
    56455728   (exit $ac_status); }; }; then
    56465729 
    56475730                        cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
    5648 @@ -6039,7 +6334,7 @@
     5731@@ -6039,7 +6335,7 @@
    56495732                test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
    56505733 
    56515734 fi
    56525735-echo "$as_me:6042: result: $cf_cv_link_funcs" >&5
    5653 +echo "$as_me:6337: result: $cf_cv_link_funcs" >&5
     5736+echo "$as_me:6338: result: $cf_cv_link_funcs" >&5
    56545737 echo "${ECHO_T}$cf_cv_link_funcs" >&6
    56555738        test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
    56565739 #define HAVE_LINK 1
    5657 @@ -6057,7 +6352,7 @@
     5740@@ -6057,7 +6353,7 @@
    56585741 # soft links (symbolic links) are useful for some systems where hard links do
    56595742 # not work, or to make it simpler to copy terminfo trees around.
    56605743 if test "$ac_cv_func_symlink" = yes ; then
    56615744-    echo "$as_me:6060: checking if tic should use symbolic links" >&5
    5662 +    echo "$as_me:6355: checking if tic should use symbolic links" >&5
     5745+    echo "$as_me:6356: checking if tic should use symbolic links" >&5
    56635746 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
    56645747 
    56655748 # Check whether --enable-symlinks or --disable-symlinks was given.
    5666 @@ -6067,21 +6362,21 @@
     5749@@ -6067,21 +6363,21 @@
    56675750 else
    56685751   with_symlinks=no
    56695752 fi;
    56705753-    echo "$as_me:6070: result: $with_symlinks" >&5
    5671 +    echo "$as_me:6365: result: $with_symlinks" >&5
     5754+    echo "$as_me:6366: result: $with_symlinks" >&5
    56725755 echo "${ECHO_T}$with_symlinks" >&6
    56735756 fi
     
    56775760 if test "$with_symlinks" = no ; then
    56785761-    echo "$as_me:6077: checking if tic should use hard links" >&5
    5679 +    echo "$as_me:6372: checking if tic should use hard links" >&5
     5762+    echo "$as_me:6373: checking if tic should use hard links" >&5
    56805763 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
    56815764     if test "$ac_cv_func_link" = yes ; then
     
    56855768     fi
    56865769-    echo "$as_me:6084: result: $with_links" >&5
    5687 +    echo "$as_me:6379: result: $with_links" >&5
     5770+    echo "$as_me:6380: result: $with_links" >&5
    56885771 echo "${ECHO_T}$with_links" >&6
    56895772 fi
    56905773 
    5691 @@ -6094,7 +6389,7 @@
     5774@@ -6094,7 +6390,7 @@
    56925775 EOF
    56935776 
    56945777 ###   use option --enable-broken-linker to force on use of broken-linker support
    56955778-echo "$as_me:6097: checking if you want broken-linker support code" >&5
    5696 +echo "$as_me:6392: checking if you want broken-linker support code" >&5
     5779+echo "$as_me:6393: checking if you want broken-linker support code" >&5
    56975780 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
    56985781 
    56995782 # Check whether --enable-broken_linker or --disable-broken_linker was given.
    5700 @@ -6104,7 +6399,7 @@
     5783@@ -6104,7 +6400,7 @@
    57015784 else
    57025785   with_broken_linker=${BROKEN_LINKER-no}
    57035786 fi;
    57045787-echo "$as_me:6107: result: $with_broken_linker" >&5
    5705 +echo "$as_me:6402: result: $with_broken_linker" >&5
     5788+echo "$as_me:6403: result: $with_broken_linker" >&5
    57065789 echo "${ECHO_T}$with_broken_linker" >&6
    57075790 
    57085791 BROKEN_LINKER=0
    5709 @@ -6124,14 +6419,14 @@
     5792@@ -6124,14 +6420,14 @@
    57105793                BROKEN_LINKER=1
    57115794                test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
    57125795 
    57135796-echo "${as_me-configure}:6127: testing cygwin linker is broken anyway ..." 1>&5
    5714 +echo "${as_me-configure}:6422: testing cygwin linker is broken anyway ..." 1>&5
     5797+echo "${as_me-configure}:6423: testing cygwin linker is broken anyway ..." 1>&5
    57155798 
    57165799                ;;
     
    57205803 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
    57215804-echo "$as_me:6134: checking if tputs should process BSD-style prefix padding" >&5
    5722 +echo "$as_me:6429: checking if tputs should process BSD-style prefix padding" >&5
     5805+echo "$as_me:6430: checking if tputs should process BSD-style prefix padding" >&5
    57235806 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
    57245807 
    57255808 # Check whether --enable-bsdpad or --disable-bsdpad was given.
    5726 @@ -6141,7 +6436,7 @@
     5809@@ -6141,7 +6437,7 @@
    57275810 else
    57285811   with_bsdpad=no
    57295812 fi;
    57305813-echo "$as_me:6144: result: $with_bsdpad" >&5
    5731 +echo "$as_me:6439: result: $with_bsdpad" >&5
     5814+echo "$as_me:6440: result: $with_bsdpad" >&5
    57325815 echo "${ECHO_T}$with_bsdpad" >&6
    57335816 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
    57345817 #define BSD_TPUTS 1
    5735 @@ -6158,7 +6453,7 @@
     5818@@ -6158,7 +6454,7 @@
    57365819 
    57375820 # Check to define _XOPEN_SOURCE "automatically"
    57385821 
    57395822-echo "$as_me:6161: checking if $CC -U and -D options work together" >&5
    5740 +echo "$as_me:6456: checking if $CC -U and -D options work together" >&5
     5823+echo "$as_me:6457: checking if $CC -U and -D options work together" >&5
    57415824 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
    57425825 if test "${cf_cv_cc_u_d_options+set}" = set; then
    57435826   echo $ECHO_N "(cached) $ECHO_C" >&6
    5744 @@ -6167,7 +6462,7 @@
     5827@@ -6167,7 +6463,7 @@
    57455828        cf_save_CPPFLAGS="$CPPFLAGS"
    57465829        CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
    57475830        cat >conftest.$ac_ext <<_ACEOF
    57485831-#line 6170 "configure"
    5749 +#line 6465 "configure"
     5832+#line 6466 "configure"
    57505833 #include "confdefs.h"
    57515834 
    57525835 int
    5753 @@ -6186,16 +6481,16 @@
     5836@@ -6186,16 +6482,16 @@
    57545837 }
    57555838 _ACEOF
    57565839 rm -f conftest.$ac_objext
    57575840-if { (eval echo "$as_me:6189: \"$ac_compile\"") >&5
    5758 +if { (eval echo "$as_me:6484: \"$ac_compile\"") >&5
     5841+if { (eval echo "$as_me:6485: \"$ac_compile\"") >&5
    57595842   (eval $ac_compile) 2>&5
    57605843   ac_status=$?
    57615844-  echo "$as_me:6192: \$? = $ac_status" >&5
    5762 +  echo "$as_me:6487: \$? = $ac_status" >&5
     5845+  echo "$as_me:6488: \$? = $ac_status" >&5
    57635846   (exit $ac_status); } &&
    57645847          { ac_try='test -s conftest.$ac_objext'
    57655848-  { (eval echo "$as_me:6195: \"$ac_try\"") >&5
    5766 +  { (eval echo "$as_me:6490: \"$ac_try\"") >&5
     5849+  { (eval echo "$as_me:6491: \"$ac_try\"") >&5
    57675850   (eval $ac_try) 2>&5
    57685851   ac_status=$?
    57695852-  echo "$as_me:6198: \$? = $ac_status" >&5
    5770 +  echo "$as_me:6493: \$? = $ac_status" >&5
     5853+  echo "$as_me:6494: \$? = $ac_status" >&5
    57715854   (exit $ac_status); }; }; then
    57725855 
    57735856        cf_cv_cc_u_d_options=yes
    5774 @@ -6209,14 +6504,14 @@
     5857@@ -6209,14 +6505,14 @@
    57755858        CPPFLAGS="$cf_save_CPPFLAGS"
    57765859 
    57775860 fi
    57785861-echo "$as_me:6212: result: $cf_cv_cc_u_d_options" >&5
    5779 +echo "$as_me:6507: result: $cf_cv_cc_u_d_options" >&5
     5862+echo "$as_me:6508: result: $cf_cv_cc_u_d_options" >&5
    57805863 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
    57815864 
     
    57895872        ;;
    57905873 freebsd*|dragonfly*) #(vi
    5791 @@ -6233,16 +6528,16 @@
     5874@@ -6233,16 +6529,16 @@
    57925875 irix[56].*) #(vi
    57935876        CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
     
    57975880 
    57985881-echo "$as_me:6238: checking if we must define _GNU_SOURCE" >&5
    5799 +echo "$as_me:6533: checking if we must define _GNU_SOURCE" >&5
     5882+echo "$as_me:6534: checking if we must define _GNU_SOURCE" >&5
    58005883 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
    58015884 if test "${cf_cv_gnu_source+set}" = set; then
     
    58055888 cat >conftest.$ac_ext <<_ACEOF
    58065889-#line 6245 "configure"
    5807 +#line 6540 "configure"
     5890+#line 6541 "configure"
    58085891 #include "confdefs.h"
    58095892 #include <sys/types.h>
    58105893 int
    5811 @@ -6257,16 +6552,16 @@
     5894@@ -6257,16 +6553,16 @@
    58125895 }
    58135896 _ACEOF
    58145897 rm -f conftest.$ac_objext
    58155898-if { (eval echo "$as_me:6260: \"$ac_compile\"") >&5
    5816 +if { (eval echo "$as_me:6555: \"$ac_compile\"") >&5
     5899+if { (eval echo "$as_me:6556: \"$ac_compile\"") >&5
    58175900   (eval $ac_compile) 2>&5
    58185901   ac_status=$?
    58195902-  echo "$as_me:6263: \$? = $ac_status" >&5
    5820 +  echo "$as_me:6558: \$? = $ac_status" >&5
     5903+  echo "$as_me:6559: \$? = $ac_status" >&5
    58215904   (exit $ac_status); } &&
    58225905          { ac_try='test -s conftest.$ac_objext'
    58235906-  { (eval echo "$as_me:6266: \"$ac_try\"") >&5
    5824 +  { (eval echo "$as_me:6561: \"$ac_try\"") >&5
     5907+  { (eval echo "$as_me:6562: \"$ac_try\"") >&5
    58255908   (eval $ac_try) 2>&5
    58265909   ac_status=$?
    58275910-  echo "$as_me:6269: \$? = $ac_status" >&5
    5828 +  echo "$as_me:6564: \$? = $ac_status" >&5
     5911+  echo "$as_me:6565: \$? = $ac_status" >&5
    58295912   (exit $ac_status); }; }; then
    58305913   cf_cv_gnu_source=no
    58315914 else
    5832 @@ -6275,7 +6570,7 @@
     5915@@ -6275,7 +6571,7 @@
    58335916 cf_save="$CPPFLAGS"
    58345917         CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
    58355918         cat >conftest.$ac_ext <<_ACEOF
    58365919-#line 6278 "configure"
    5837 +#line 6573 "configure"
     5920+#line 6574 "configure"
    58385921 #include "confdefs.h"
    58395922 #include <sys/types.h>
    58405923 int
    5841 @@ -6290,16 +6585,16 @@
     5924@@ -6290,16 +6586,16 @@
    58425925 }
    58435926 _ACEOF
    58445927 rm -f conftest.$ac_objext
    58455928-if { (eval echo "$as_me:6293: \"$ac_compile\"") >&5
    5846 +if { (eval echo "$as_me:6588: \"$ac_compile\"") >&5
     5929+if { (eval echo "$as_me:6589: \"$ac_compile\"") >&5
    58475930   (eval $ac_compile) 2>&5
    58485931   ac_status=$?
    58495932-  echo "$as_me:6296: \$? = $ac_status" >&5
    5850 +  echo "$as_me:6591: \$? = $ac_status" >&5
     5933+  echo "$as_me:6592: \$? = $ac_status" >&5
    58515934   (exit $ac_status); } &&
    58525935          { ac_try='test -s conftest.$ac_objext'
    58535936-  { (eval echo "$as_me:6299: \"$ac_try\"") >&5
    5854 +  { (eval echo "$as_me:6594: \"$ac_try\"") >&5
     5937+  { (eval echo "$as_me:6595: \"$ac_try\"") >&5
    58555938   (eval $ac_try) 2>&5
    58565939   ac_status=$?
    58575940-  echo "$as_me:6302: \$? = $ac_status" >&5
    5858 +  echo "$as_me:6597: \$? = $ac_status" >&5
     5941+  echo "$as_me:6598: \$? = $ac_status" >&5
    58595942   (exit $ac_status); }; }; then
    58605943   cf_cv_gnu_source=no
    58615944 else
    5862 @@ -6314,7 +6609,7 @@
     5945@@ -6314,7 +6610,7 @@
    58635946 rm -f conftest.$ac_objext conftest.$ac_ext
    58645947 
    58655948 fi
    58665949-echo "$as_me:6317: result: $cf_cv_gnu_source" >&5
    5867 +echo "$as_me:6612: result: $cf_cv_gnu_source" >&5
     5950+echo "$as_me:6613: result: $cf_cv_gnu_source" >&5
    58685951 echo "${ECHO_T}$cf_cv_gnu_source" >&6
    58695952 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
    58705953 
    5871 @@ -6341,14 +6636,14 @@
     5954@@ -6341,14 +6637,14 @@
    58725955        CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
    58735956        ;;
    58745957 *)
    58755958-       echo "$as_me:6344: checking if we should define _XOPEN_SOURCE" >&5
    5876 +       echo "$as_me:6639: checking if we should define _XOPEN_SOURCE" >&5
     5959+       echo "$as_me:6640: checking if we should define _XOPEN_SOURCE" >&5
    58775960 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
    58785961 if test "${cf_cv_xopen_source+set}" = set; then
     
    58825965        cat >conftest.$ac_ext <<_ACEOF
    58835966-#line 6351 "configure"
    5884 +#line 6646 "configure"
     5967+#line 6647 "configure"
    58855968 #include "confdefs.h"
    58865969 #include <sys/types.h>
    58875970 int
    5888 @@ -6363,16 +6658,16 @@
     5971@@ -6363,16 +6659,16 @@
    58895972 }
    58905973 _ACEOF
    58915974 rm -f conftest.$ac_objext
    58925975-if { (eval echo "$as_me:6366: \"$ac_compile\"") >&5
    5893 +if { (eval echo "$as_me:6661: \"$ac_compile\"") >&5
     5976+if { (eval echo "$as_me:6662: \"$ac_compile\"") >&5
    58945977   (eval $ac_compile) 2>&5
    58955978   ac_status=$?
    58965979-  echo "$as_me:6369: \$? = $ac_status" >&5
    5897 +  echo "$as_me:6664: \$? = $ac_status" >&5
     5980+  echo "$as_me:6665: \$? = $ac_status" >&5
    58985981   (exit $ac_status); } &&
    58995982          { ac_try='test -s conftest.$ac_objext'
    59005983-  { (eval echo "$as_me:6372: \"$ac_try\"") >&5
    5901 +  { (eval echo "$as_me:6667: \"$ac_try\"") >&5
     5984+  { (eval echo "$as_me:6668: \"$ac_try\"") >&5
    59025985   (eval $ac_try) 2>&5
    59035986   ac_status=$?
    59045987-  echo "$as_me:6375: \$? = $ac_status" >&5
    5905 +  echo "$as_me:6670: \$? = $ac_status" >&5
     5988+  echo "$as_me:6671: \$? = $ac_status" >&5
    59065989   (exit $ac_status); }; }; then
    59075990   cf_cv_xopen_source=no
    59085991 else
    5909 @@ -6381,7 +6676,7 @@
     5992@@ -6381,7 +6677,7 @@
    59105993 cf_save="$CPPFLAGS"
    59115994         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
    59125995         cat >conftest.$ac_ext <<_ACEOF
    59135996-#line 6384 "configure"
    5914 +#line 6679 "configure"
     5997+#line 6680 "configure"
    59155998 #include "confdefs.h"
    59165999 #include <sys/types.h>
    59176000 int
    5918 @@ -6396,16 +6691,16 @@
     6001@@ -6396,16 +6692,16 @@
    59196002 }
    59206003 _ACEOF
    59216004 rm -f conftest.$ac_objext
    59226005-if { (eval echo "$as_me:6399: \"$ac_compile\"") >&5
    5923 +if { (eval echo "$as_me:6694: \"$ac_compile\"") >&5
     6006+if { (eval echo "$as_me:6695: \"$ac_compile\"") >&5
    59246007   (eval $ac_compile) 2>&5
    59256008   ac_status=$?
    59266009-  echo "$as_me:6402: \$? = $ac_status" >&5
    5927 +  echo "$as_me:6697: \$? = $ac_status" >&5
     6010+  echo "$as_me:6698: \$? = $ac_status" >&5
    59286011   (exit $ac_status); } &&
    59296012          { ac_try='test -s conftest.$ac_objext'
    59306013-  { (eval echo "$as_me:6405: \"$ac_try\"") >&5
    5931 +  { (eval echo "$as_me:6700: \"$ac_try\"") >&5
     6014+  { (eval echo "$as_me:6701: \"$ac_try\"") >&5
    59326015   (eval $ac_try) 2>&5
    59336016   ac_status=$?
    59346017-  echo "$as_me:6408: \$? = $ac_status" >&5
    5935 +  echo "$as_me:6703: \$? = $ac_status" >&5
     6018+  echo "$as_me:6704: \$? = $ac_status" >&5
    59366019   (exit $ac_status); }; }; then
    59376020   cf_cv_xopen_source=no
    59386021 else
    5939 @@ -6420,7 +6715,7 @@
     6022@@ -6420,7 +6716,7 @@
    59406023 rm -f conftest.$ac_objext conftest.$ac_ext
    59416024 
    59426025 fi
    59436026-echo "$as_me:6423: result: $cf_cv_xopen_source" >&5
    5944 +echo "$as_me:6718: result: $cf_cv_xopen_source" >&5
     6027+echo "$as_me:6719: result: $cf_cv_xopen_source" >&5
    59456028 echo "${ECHO_T}$cf_cv_xopen_source" >&6
    59466029        if test "$cf_cv_xopen_source" != no ; then
    59476030 
    5948 @@ -6454,16 +6749,16 @@
     6031@@ -6454,16 +6750,16 @@
    59496032        sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
    59506033                -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
    59516034 
    59526035-echo "$as_me:6457: checking if we should define _POSIX_C_SOURCE" >&5
    5953 +echo "$as_me:6752: checking if we should define _POSIX_C_SOURCE" >&5
     6036+echo "$as_me:6753: checking if we should define _POSIX_C_SOURCE" >&5
    59546037 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
    59556038 if test "${cf_cv_posix_c_source+set}" = set; then
     
    59586041 
    59596042-echo "${as_me-configure}:6463: testing if the symbol is already defined go no further ..." 1>&5
    5960 +echo "${as_me-configure}:6758: testing if the symbol is already defined go no further ..." 1>&5
     6043+echo "${as_me-configure}:6759: testing if the symbol is already defined go no further ..." 1>&5
    59616044 
    59626045        cat >conftest.$ac_ext <<_ACEOF
    59636046-#line 6466 "configure"
    5964 +#line 6761 "configure"
     6047+#line 6762 "configure"
    59656048 #include "confdefs.h"
    59666049 #include <sys/types.h>
    59676050 int
    5968 @@ -6478,16 +6773,16 @@
     6051@@ -6478,16 +6774,16 @@
    59696052 }
    59706053 _ACEOF
    59716054 rm -f conftest.$ac_objext
    59726055-if { (eval echo "$as_me:6481: \"$ac_compile\"") >&5
    5973 +if { (eval echo "$as_me:6776: \"$ac_compile\"") >&5
     6056+if { (eval echo "$as_me:6777: \"$ac_compile\"") >&5
    59746057   (eval $ac_compile) 2>&5
    59756058   ac_status=$?
    59766059-  echo "$as_me:6484: \$? = $ac_status" >&5
    5977 +  echo "$as_me:6779: \$? = $ac_status" >&5
     6060+  echo "$as_me:6780: \$? = $ac_status" >&5
    59786061   (exit $ac_status); } &&
    59796062          { ac_try='test -s conftest.$ac_objext'
    59806063-  { (eval echo "$as_me:6487: \"$ac_try\"") >&5
    5981 +  { (eval echo "$as_me:6782: \"$ac_try\"") >&5
     6064+  { (eval echo "$as_me:6783: \"$ac_try\"") >&5
    59826065   (eval $ac_try) 2>&5
    59836066   ac_status=$?
    59846067-  echo "$as_me:6490: \$? = $ac_status" >&5
    5985 +  echo "$as_me:6785: \$? = $ac_status" >&5
     6068+  echo "$as_me:6786: \$? = $ac_status" >&5
    59866069   (exit $ac_status); }; }; then
    59876070   cf_cv_posix_c_source=no
    59886071 else
    5989 @@ -6508,7 +6803,7 @@
     6072@@ -6508,7 +6804,7 @@
    59906073         esac
    59916074         if test "$cf_want_posix_source" = yes ; then
    59926075                cat >conftest.$ac_ext <<_ACEOF
    59936076-#line 6511 "configure"
    5994 +#line 6806 "configure"
     6077+#line 6807 "configure"
    59956078 #include "confdefs.h"
    59966079 #include <sys/types.h>
    59976080 int
    5998 @@ -6523,16 +6818,16 @@
     6081@@ -6523,16 +6819,16 @@
    59996082 }
    60006083 _ACEOF
    60016084 rm -f conftest.$ac_objext
    60026085-if { (eval echo "$as_me:6526: \"$ac_compile\"") >&5
    6003 +if { (eval echo "$as_me:6821: \"$ac_compile\"") >&5
     6086+if { (eval echo "$as_me:6822: \"$ac_compile\"") >&5
    60046087   (eval $ac_compile) 2>&5
    60056088   ac_status=$?
    60066089-  echo "$as_me:6529: \$? = $ac_status" >&5
    6007 +  echo "$as_me:6824: \$? = $ac_status" >&5
     6090+  echo "$as_me:6825: \$? = $ac_status" >&5
    60086091   (exit $ac_status); } &&
    60096092          { ac_try='test -s conftest.$ac_objext'
    60106093-  { (eval echo "$as_me:6532: \"$ac_try\"") >&5
    6011 +  { (eval echo "$as_me:6827: \"$ac_try\"") >&5
     6094+  { (eval echo "$as_me:6828: \"$ac_try\"") >&5
    60126095   (eval $ac_try) 2>&5
    60136096   ac_status=$?
    60146097-  echo "$as_me:6535: \$? = $ac_status" >&5
    6015 +  echo "$as_me:6830: \$? = $ac_status" >&5
     6098+  echo "$as_me:6831: \$? = $ac_status" >&5
    60166099   (exit $ac_status); }; }; then
    60176100   :
    60186101 else
    6019 @@ -6543,15 +6838,15 @@
     6102@@ -6543,15 +6839,15 @@
    60206103 rm -f conftest.$ac_objext conftest.$ac_ext
    60216104         fi
    60226105 
    60236106-echo "${as_me-configure}:6546: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
    6024 +echo "${as_me-configure}:6841: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
     6107+echo "${as_me-configure}:6842: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
    60256108 
    60266109         CFLAGS="$cf_trim_CFLAGS"
     
    60286111 
    60296112-echo "${as_me-configure}:6551: testing if the second compile does not leave our definition intact error ..." 1>&5
    6030 +echo "${as_me-configure}:6846: testing if the second compile does not leave our definition intact error ..." 1>&5
     6113+echo "${as_me-configure}:6847: testing if the second compile does not leave our definition intact error ..." 1>&5
    60316114 
    60326115         cat >conftest.$ac_ext <<_ACEOF
    60336116-#line 6554 "configure"
    6034 +#line 6849 "configure"
     6117+#line 6850 "configure"
    60356118 #include "confdefs.h"
    60366119 #include <sys/types.h>
    60376120 int
    6038 @@ -6566,16 +6861,16 @@
     6121@@ -6566,16 +6862,16 @@
    60396122 }
    60406123 _ACEOF
    60416124 rm -f conftest.$ac_objext
    60426125-if { (eval echo "$as_me:6569: \"$ac_compile\"") >&5
    6043 +if { (eval echo "$as_me:6864: \"$ac_compile\"") >&5
     6126+if { (eval echo "$as_me:6865: \"$ac_compile\"") >&5
    60446127   (eval $ac_compile) 2>&5
    60456128   ac_status=$?
    60466129-  echo "$as_me:6572: \$? = $ac_status" >&5
    6047 +  echo "$as_me:6867: \$? = $ac_status" >&5
     6130+  echo "$as_me:6868: \$? = $ac_status" >&5
    60486131   (exit $ac_status); } &&
    60496132          { ac_try='test -s conftest.$ac_objext'
    60506133-  { (eval echo "$as_me:6575: \"$ac_try\"") >&5
    6051 +  { (eval echo "$as_me:6870: \"$ac_try\"") >&5
     6134+  { (eval echo "$as_me:6871: \"$ac_try\"") >&5
    60526135   (eval $ac_try) 2>&5
    60536136   ac_status=$?
    60546137-  echo "$as_me:6578: \$? = $ac_status" >&5
    6055 +  echo "$as_me:6873: \$? = $ac_status" >&5
     6138+  echo "$as_me:6874: \$? = $ac_status" >&5
    60566139   (exit $ac_status); }; }; then
    60576140   :
    60586141 else
    6059 @@ -6591,7 +6886,7 @@
     6142@@ -6591,7 +6887,7 @@
    60606143 rm -f conftest.$ac_objext conftest.$ac_ext
    60616144 
    60626145 fi
    60636146-echo "$as_me:6594: result: $cf_cv_posix_c_source" >&5
    6064 +echo "$as_me:6889: result: $cf_cv_posix_c_source" >&5
     6147+echo "$as_me:6890: result: $cf_cv_posix_c_source" >&5
    60656148 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
    60666149 
    60676150 if test "$cf_cv_posix_c_source" != no ; then
    6068 @@ -6610,14 +6905,14 @@
     6151@@ -6610,14 +6906,14 @@
    60696152 
    60706153 # Work around breakage on OS X
    60716154 
    60726155-echo "$as_me:6613: checking if SIGWINCH is defined" >&5
    6073 +echo "$as_me:6908: checking if SIGWINCH is defined" >&5
     6156+echo "$as_me:6909: checking if SIGWINCH is defined" >&5
    60746157 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
    60756158 if test "${cf_cv_define_sigwinch+set}" = set; then
     
    60796162        cat >conftest.$ac_ext <<_ACEOF
    60806163-#line 6620 "configure"
    6081 +#line 6915 "configure"
     6164+#line 6916 "configure"
    60826165 #include "confdefs.h"
    60836166 
    60846167 #include <sys/types.h>
    6085 @@ -6632,23 +6927,23 @@
     6168@@ -6632,23 +6928,23 @@
    60866169 }
    60876170 _ACEOF
    60886171 rm -f conftest.$ac_objext
    60896172-if { (eval echo "$as_me:6635: \"$ac_compile\"") >&5
    6090 +if { (eval echo "$as_me:6930: \"$ac_compile\"") >&5
     6173+if { (eval echo "$as_me:6931: \"$ac_compile\"") >&5
    60916174   (eval $ac_compile) 2>&5
    60926175   ac_status=$?
    60936176-  echo "$as_me:6638: \$? = $ac_status" >&5
    6094 +  echo "$as_me:6933: \$? = $ac_status" >&5
     6177+  echo "$as_me:6934: \$? = $ac_status" >&5
    60956178   (exit $ac_status); } &&
    60966179          { ac_try='test -s conftest.$ac_objext'
    60976180-  { (eval echo "$as_me:6641: \"$ac_try\"") >&5
    6098 +  { (eval echo "$as_me:6936: \"$ac_try\"") >&5
     6181+  { (eval echo "$as_me:6937: \"$ac_try\"") >&5
    60996182   (eval $ac_try) 2>&5
    61006183   ac_status=$?
    61016184-  echo "$as_me:6644: \$? = $ac_status" >&5
    6102 +  echo "$as_me:6939: \$? = $ac_status" >&5
     6185+  echo "$as_me:6940: \$? = $ac_status" >&5
    61036186   (exit $ac_status); }; }; then
    61046187   cf_cv_define_sigwinch=yes
     
    61086191 cat >conftest.$ac_ext <<_ACEOF
    61096192-#line 6651 "configure"
    6110 +#line 6946 "configure"
     6193+#line 6947 "configure"
    61116194 #include "confdefs.h"
    61126195 
    61136196 #undef _XOPEN_SOURCE
    6114 @@ -6666,16 +6961,16 @@
     6197@@ -6666,16 +6962,16 @@
    61156198 }
    61166199 _ACEOF
    61176200 rm -f conftest.$ac_objext
    61186201-if { (eval echo "$as_me:6669: \"$ac_compile\"") >&5
    6119 +if { (eval echo "$as_me:6964: \"$ac_compile\"") >&5
     6202+if { (eval echo "$as_me:6965: \"$ac_compile\"") >&5
    61206203   (eval $ac_compile) 2>&5
    61216204   ac_status=$?
    61226205-  echo "$as_me:6672: \$? = $ac_status" >&5
    6123 +  echo "$as_me:6967: \$? = $ac_status" >&5
     6206+  echo "$as_me:6968: \$? = $ac_status" >&5
    61246207   (exit $ac_status); } &&
    61256208          { ac_try='test -s conftest.$ac_objext'
    61266209-  { (eval echo "$as_me:6675: \"$ac_try\"") >&5
    6127 +  { (eval echo "$as_me:6970: \"$ac_try\"") >&5
     6210+  { (eval echo "$as_me:6971: \"$ac_try\"") >&5
    61286211   (eval $ac_try) 2>&5
    61296212   ac_status=$?
    61306213-  echo "$as_me:6678: \$? = $ac_status" >&5
    6131 +  echo "$as_me:6973: \$? = $ac_status" >&5
     6214+  echo "$as_me:6974: \$? = $ac_status" >&5
    61326215   (exit $ac_status); }; }; then
    61336216   cf_cv_define_sigwinch=maybe
    61346217 else
    6135 @@ -6689,11 +6984,11 @@
     6218@@ -6689,11 +6985,11 @@
    61366219 rm -f conftest.$ac_objext conftest.$ac_ext
    61376220 
    61386221 fi
    61396222-echo "$as_me:6692: result: $cf_cv_define_sigwinch" >&5
    6140 +echo "$as_me:6987: result: $cf_cv_define_sigwinch" >&5
     6223+echo "$as_me:6988: result: $cf_cv_define_sigwinch" >&5
    61416224 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
    61426225 
    61436226 if test "$cf_cv_define_sigwinch" = maybe ; then
    61446227-echo "$as_me:6696: checking for actual SIGWINCH definition" >&5
    6145 +echo "$as_me:6991: checking for actual SIGWINCH definition" >&5
     6228+echo "$as_me:6992: checking for actual SIGWINCH definition" >&5
    61466229 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
    61476230 if test "${cf_cv_fixup_sigwinch+set}" = set; then
    61486231   echo $ECHO_N "(cached) $ECHO_C" >&6
    6149 @@ -6704,7 +6999,7 @@
     6232@@ -6704,7 +7000,7 @@
    61506233 while test $cf_sigwinch != 1
    61516234 do
    61526235        cat >conftest.$ac_ext <<_ACEOF
    61536236-#line 6707 "configure"
    6154 +#line 7002 "configure"
     6237+#line 7003 "configure"
    61556238 #include "confdefs.h"
    61566239 
    61576240 #undef _XOPEN_SOURCE
    6158 @@ -6726,16 +7021,16 @@
     6241@@ -6726,16 +7022,16 @@
    61596242 }
    61606243 _ACEOF
    61616244 rm -f conftest.$ac_objext
    61626245-if { (eval echo "$as_me:6729: \"$ac_compile\"") >&5
    6163 +if { (eval echo "$as_me:7024: \"$ac_compile\"") >&5
     6246+if { (eval echo "$as_me:7025: \"$ac_compile\"") >&5
    61646247   (eval $ac_compile) 2>&5
    61656248   ac_status=$?
    61666249-  echo "$as_me:6732: \$? = $ac_status" >&5
    6167 +  echo "$as_me:7027: \$? = $ac_status" >&5
     6250+  echo "$as_me:7028: \$? = $ac_status" >&5
    61686251   (exit $ac_status); } &&
    61696252          { ac_try='test -s conftest.$ac_objext'
    61706253-  { (eval echo "$as_me:6735: \"$ac_try\"") >&5
    6171 +  { (eval echo "$as_me:7030: \"$ac_try\"") >&5
     6254+  { (eval echo "$as_me:7031: \"$ac_try\"") >&5
    61726255   (eval $ac_try) 2>&5
    61736256   ac_status=$?
    61746257-  echo "$as_me:6738: \$? = $ac_status" >&5
    6175 +  echo "$as_me:7033: \$? = $ac_status" >&5
     6258+  echo "$as_me:7034: \$? = $ac_status" >&5
    61766259   (exit $ac_status); }; }; then
    61776260   cf_cv_fixup_sigwinch=$cf_sigwinch
    61786261         break
    6179 @@ -6749,7 +7044,7 @@
     6262@@ -6749,7 +7045,7 @@
    61806263 done
    61816264 
    61826265 fi
    61836266-echo "$as_me:6752: result: $cf_cv_fixup_sigwinch" >&5
    6184 +echo "$as_me:7047: result: $cf_cv_fixup_sigwinch" >&5
     6267+echo "$as_me:7048: result: $cf_cv_fixup_sigwinch" >&5
    61856268 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
    61866269 
    61876270        if test "$cf_cv_fixup_sigwinch" != unknown ; then
    6188 @@ -6759,13 +7054,13 @@
     6271@@ -6759,13 +7055,13 @@
    61896272 
    61906273 # Checks for CODESET support.
    61916274 
    61926275-  echo "$as_me:6762: checking for nl_langinfo and CODESET" >&5
    6193 +  echo "$as_me:7057: checking for nl_langinfo and CODESET" >&5
     6276+  echo "$as_me:7058: checking for nl_langinfo and CODESET" >&5
    61946277 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
    61956278 if test "${am_cv_langinfo_codeset+set}" = set; then
     
    61986281   cat >conftest.$ac_ext <<_ACEOF
    61996282-#line 6768 "configure"
    6200 +#line 7063 "configure"
     6283+#line 7064 "configure"
    62016284 #include "confdefs.h"
    62026285 #include <langinfo.h>
    62036286 int
    6204 @@ -6777,16 +7072,16 @@
     6287@@ -6777,16 +7073,16 @@
    62056288 }
    62066289 _ACEOF
    62076290 rm -f conftest.$ac_objext conftest$ac_exeext
    62086291-if { (eval echo "$as_me:6780: \"$ac_link\"") >&5
    6209 +if { (eval echo "$as_me:7075: \"$ac_link\"") >&5
     6292+if { (eval echo "$as_me:7076: \"$ac_link\"") >&5
    62106293   (eval $ac_link) 2>&5
    62116294   ac_status=$?
    62126295-  echo "$as_me:6783: \$? = $ac_status" >&5
    6213 +  echo "$as_me:7078: \$? = $ac_status" >&5
     6296+  echo "$as_me:7079: \$? = $ac_status" >&5
    62146297   (exit $ac_status); } &&
    62156298          { ac_try='test -s conftest$ac_exeext'
    62166299-  { (eval echo "$as_me:6786: \"$ac_try\"") >&5
    6217 +  { (eval echo "$as_me:7081: \"$ac_try\"") >&5
     6300+  { (eval echo "$as_me:7082: \"$ac_try\"") >&5
    62186301   (eval $ac_try) 2>&5
    62196302   ac_status=$?
    62206303-  echo "$as_me:6789: \$? = $ac_status" >&5
    6221 +  echo "$as_me:7084: \$? = $ac_status" >&5
     6304+  echo "$as_me:7085: \$? = $ac_status" >&5
    62226305   (exit $ac_status); }; }; then
    62236306   am_cv_langinfo_codeset=yes
    62246307 else
    6225 @@ -6797,7 +7092,7 @@
     6308@@ -6797,7 +7093,7 @@
    62266309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    62276310 
    62286311 fi
    62296312-echo "$as_me:6800: result: $am_cv_langinfo_codeset" >&5
    6230 +echo "$as_me:7095: result: $am_cv_langinfo_codeset" >&5
     6313+echo "$as_me:7096: result: $am_cv_langinfo_codeset" >&5
    62316314 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
    62326315   if test $am_cv_langinfo_codeset = yes; then
    62336316 
    6234 @@ -6811,7 +7106,7 @@
     6317@@ -6811,7 +7107,7 @@
    62356318 NCURSES_OK_WCHAR_T=
    62366319 NCURSES_OK_WINT_T=
    62376320 
    62386321-echo "$as_me:6814: checking if you want wide-character code" >&5
    6239 +echo "$as_me:7109: checking if you want wide-character code" >&5
     6322+echo "$as_me:7110: checking if you want wide-character code" >&5
    62406323 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
    62416324 
    62426325 # Check whether --enable-widec or --disable-widec was given.
    6243 @@ -6821,7 +7116,7 @@
     6326@@ -6821,7 +7117,7 @@
    62446327 else
    62456328   with_widec=no
    62466329 fi;
    62476330-echo "$as_me:6824: result: $with_widec" >&5
    6248 +echo "$as_me:7119: result: $with_widec" >&5
     6331+echo "$as_me:7120: result: $with_widec" >&5
    62496332 echo "${ECHO_T}$with_widec" >&6
    62506333 if test "$with_widec" = yes ; then
    62516334        LIB_SUFFIX="w${LIB_SUFFIX}"
    6252 @@ -6829,10 +7124,10 @@
     6335@@ -6829,10 +7125,10 @@
    62536336 #define USE_WIDEC_SUPPORT 1
    62546337 EOF
    62556338 
    62566339-echo "$as_me:6832: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
    6257 +echo "$as_me:7127: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
     6340+echo "$as_me:7128: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
    62586341 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
    62596342 cat >conftest.$ac_ext <<_ACEOF
    62606343-#line 6835 "configure"
    6261 +#line 7130 "configure"
     6344+#line 7131 "configure"
    62626345 #include "confdefs.h"
    62636346 #include <sys/types.h>
    62646347 
    6265 @@ -6848,16 +7143,16 @@
     6348@@ -6848,16 +7144,16 @@
    62666349 }
    62676350 _ACEOF
    62686351 rm -f conftest.$ac_objext
    62696352-if { (eval echo "$as_me:6851: \"$ac_compile\"") >&5
    6270 +if { (eval echo "$as_me:7146: \"$ac_compile\"") >&5
     6353+if { (eval echo "$as_me:7147: \"$ac_compile\"") >&5
    62716354   (eval $ac_compile) 2>&5
    62726355   ac_status=$?
    62736356-  echo "$as_me:6854: \$? = $ac_status" >&5
    6274 +  echo "$as_me:7149: \$? = $ac_status" >&5
     6357+  echo "$as_me:7150: \$? = $ac_status" >&5
    62756358   (exit $ac_status); } &&
    62766359          { ac_try='test -s conftest.$ac_objext'
    62776360-  { (eval echo "$as_me:6857: \"$ac_try\"") >&5
    6278 +  { (eval echo "$as_me:7152: \"$ac_try\"") >&5
     6361+  { (eval echo "$as_me:7153: \"$ac_try\"") >&5
    62796362   (eval $ac_try) 2>&5
    62806363   ac_status=$?
    62816364-  echo "$as_me:6860: \$? = $ac_status" >&5
    6282 +  echo "$as_me:7155: \$? = $ac_status" >&5
     6365+  echo "$as_me:7156: \$? = $ac_status" >&5
    62836366   (exit $ac_status); }; }; then
    62846367   cf_result=no
    62856368 else
    6286 @@ -6866,16 +7161,16 @@
     6369@@ -6866,16 +7162,16 @@
    62876370 cf_result=yes
    62886371 fi
    62896372 rm -f conftest.$ac_objext conftest.$ac_ext
    62906373-echo "$as_me:6869: result: $cf_result" >&5
    6291 +echo "$as_me:7164: result: $cf_result" >&5
     6374+echo "$as_me:7165: result: $cf_result" >&5
    62926375 echo "${ECHO_T}$cf_result" >&6
    62936376 
     
    62966379 elif test "x" != "x" ; then
    62976380-       echo "$as_me:6875: checking checking for compatible value versus " >&5
    6298 +       echo "$as_me:7170: checking checking for compatible value versus " >&5
     6381+       echo "$as_me:7171: checking checking for compatible value versus " >&5
    62996382 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
    63006383        cat >conftest.$ac_ext <<_ACEOF
    63016384-#line 6878 "configure"
    6302 +#line 7173 "configure"
     6385+#line 7174 "configure"
    63036386 #include "confdefs.h"
    63046387 #include <sys/types.h>
    63056388 
    6306 @@ -6891,16 +7186,16 @@
     6389@@ -6891,16 +7187,16 @@
    63076390 }
    63086391 _ACEOF
    63096392 rm -f conftest.$ac_objext
    63106393-if { (eval echo "$as_me:6894: \"$ac_compile\"") >&5
    6311 +if { (eval echo "$as_me:7189: \"$ac_compile\"") >&5
     6394+if { (eval echo "$as_me:7190: \"$ac_compile\"") >&5
    63126395   (eval $ac_compile) 2>&5
    63136396   ac_status=$?
    63146397-  echo "$as_me:6897: \$? = $ac_status" >&5
    6315 +  echo "$as_me:7192: \$? = $ac_status" >&5
     6398+  echo "$as_me:7193: \$? = $ac_status" >&5
    63166399   (exit $ac_status); } &&
    63176400          { ac_try='test -s conftest.$ac_objext'
    63186401-  { (eval echo "$as_me:6900: \"$ac_try\"") >&5
    6319 +  { (eval echo "$as_me:7195: \"$ac_try\"") >&5
     6402+  { (eval echo "$as_me:7196: \"$ac_try\"") >&5
    63206403   (eval $ac_try) 2>&5
    63216404   ac_status=$?
    63226405-  echo "$as_me:6903: \$? = $ac_status" >&5
    6323 +  echo "$as_me:7198: \$? = $ac_status" >&5
     6406+  echo "$as_me:7199: \$? = $ac_status" >&5
    63246407   (exit $ac_status); }; }; then
    63256408   cf_result=yes
    63266409 else
    6327 @@ -6909,7 +7204,7 @@
     6410@@ -6909,7 +7205,7 @@
    63286411 cf_result=no
    63296412 fi
    63306413 rm -f conftest.$ac_objext conftest.$ac_ext
    63316414-       echo "$as_me:6912: result: $cf_result" >&5
    6332 +       echo "$as_me:7207: result: $cf_result" >&5
     6415+       echo "$as_me:7208: result: $cf_result" >&5
    63336416 echo "${ECHO_T}$cf_result" >&6
    63346417        if test "$cf_result" = no ; then
    63356418                # perhaps we can override it - try...
    6336 @@ -6923,13 +7218,13 @@
     6419@@ -6923,13 +7219,13 @@
    63376420 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
    63386421 do
    63396422 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
    63406423-echo "$as_me:6926: checking for $ac_func" >&5
    6341 +echo "$as_me:7221: checking for $ac_func" >&5
     6424+echo "$as_me:7222: checking for $ac_func" >&5
    63426425 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
    63436426 if eval "test \"\${$as_ac_var+set}\" = set"; then
     
    63466429   cat >conftest.$ac_ext <<_ACEOF
    63476430-#line 6932 "configure"
    6348 +#line 7227 "configure"
     6431+#line 7228 "configure"
    63496432 #include "confdefs.h"
    63506433 /* System header to define __stub macros and hopefully few prototypes,
    63516434     which can conflict with char $ac_func (); below.  */
    6352 @@ -6960,16 +7255,16 @@
     6435@@ -6960,16 +7256,16 @@
    63536436 }
    63546437 _ACEOF
    63556438 rm -f conftest.$ac_objext conftest$ac_exeext
    63566439-if { (eval echo "$as_me:6963: \"$ac_link\"") >&5
    6357 +if { (eval echo "$as_me:7258: \"$ac_link\"") >&5
     6440+if { (eval echo "$as_me:7259: \"$ac_link\"") >&5
    63586441   (eval $ac_link) 2>&5
    63596442   ac_status=$?
    63606443-  echo "$as_me:6966: \$? = $ac_status" >&5
    6361 +  echo "$as_me:7261: \$? = $ac_status" >&5
     6444+  echo "$as_me:7262: \$? = $ac_status" >&5
    63626445   (exit $ac_status); } &&
    63636446          { ac_try='test -s conftest$ac_exeext'
    63646447-  { (eval echo "$as_me:6969: \"$ac_try\"") >&5
    6365 +  { (eval echo "$as_me:7264: \"$ac_try\"") >&5
     6448+  { (eval echo "$as_me:7265: \"$ac_try\"") >&5
    63666449   (eval $ac_try) 2>&5
    63676450   ac_status=$?
    63686451-  echo "$as_me:6972: \$? = $ac_status" >&5
    6369 +  echo "$as_me:7267: \$? = $ac_status" >&5
     6452+  echo "$as_me:7268: \$? = $ac_status" >&5
    63706453   (exit $ac_status); }; }; then
    63716454   eval "$as_ac_var=yes"
    63726455 else
    6373 @@ -6979,7 +7274,7 @@
     6456@@ -6979,7 +7275,7 @@
    63746457 fi
    63756458 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    63766459 fi
    63776460-echo "$as_me:6982: result: `eval echo '${'$as_ac_var'}'`" >&5
    6378 +echo "$as_me:7277: result: `eval echo '${'$as_ac_var'}'`" >&5
     6461+echo "$as_me:7278: result: `eval echo '${'$as_ac_var'}'`" >&5
    63796462 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
    63806463 if test `eval echo '${'$as_ac_var'}'` = yes; then
    63816464   cat >>confdefs.h <<EOF
    6382 @@ -6991,7 +7286,7 @@
     6465@@ -6991,7 +7287,7 @@
    63836466 
    63846467        if test "$ac_cv_func_putwc" != yes ; then
    63856468 
    63866469-echo "$as_me:6994: checking for multibyte character support" >&5
    6387 +echo "$as_me:7289: checking for multibyte character support" >&5
     6470+echo "$as_me:7290: checking for multibyte character support" >&5
    63886471 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
    63896472 if test "${cf_cv_utf8_lib+set}" = set; then
    63906473   echo $ECHO_N "(cached) $ECHO_C" >&6
    6391 @@ -6999,7 +7294,7 @@
     6474@@ -6999,7 +7295,7 @@
    63926475 
    63936476        cf_save_LIBS="$LIBS"
    63946477        cat >conftest.$ac_ext <<_ACEOF
    63956478-#line 7002 "configure"
    6396 +#line 7297 "configure"
     6479+#line 7298 "configure"
    63976480 #include "confdefs.h"
    63986481 
    63996482 #include <stdlib.h>
    6400 @@ -7012,16 +7307,16 @@
     6483@@ -7012,16 +7308,16 @@
    64016484 }
    64026485 _ACEOF
    64036486 rm -f conftest.$ac_objext conftest$ac_exeext
    64046487-if { (eval echo "$as_me:7015: \"$ac_link\"") >&5
    6405 +if { (eval echo "$as_me:7310: \"$ac_link\"") >&5
     6488+if { (eval echo "$as_me:7311: \"$ac_link\"") >&5
    64066489   (eval $ac_link) 2>&5
    64076490   ac_status=$?
    64086491-  echo "$as_me:7018: \$? = $ac_status" >&5
    6409 +  echo "$as_me:7313: \$? = $ac_status" >&5
     6492+  echo "$as_me:7314: \$? = $ac_status" >&5
    64106493   (exit $ac_status); } &&
    64116494          { ac_try='test -s conftest$ac_exeext'
    64126495-  { (eval echo "$as_me:7021: \"$ac_try\"") >&5
    6413 +  { (eval echo "$as_me:7316: \"$ac_try\"") >&5
     6496+  { (eval echo "$as_me:7317: \"$ac_try\"") >&5
    64146497   (eval $ac_try) 2>&5
    64156498   ac_status=$?
    64166499-  echo "$as_me:7024: \$? = $ac_status" >&5
    6417 +  echo "$as_me:7319: \$? = $ac_status" >&5
     6500+  echo "$as_me:7320: \$? = $ac_status" >&5
    64186501   (exit $ac_status); }; }; then
    64196502   cf_cv_utf8_lib=yes
    64206503 else
    6421 @@ -7033,10 +7328,10 @@
     6504@@ -7033,10 +7329,10 @@
    64226505 cf_cv_header_path_utf8=
    64236506 cf_cv_library_path_utf8=
    64246507 
    64256508-echo "${as_me-configure}:7036: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
    6426 +echo "${as_me-configure}:7331: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
     6509+echo "${as_me-configure}:7332: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
    64276510 
    64286511 cat >conftest.$ac_ext <<_ACEOF
    64296512-#line 7039 "configure"
    6430 +#line 7334 "configure"
     6513+#line 7335 "configure"
    64316514 #include "confdefs.h"
    64326515 
    64336516 #include <libutf8.h>
    6434 @@ -7049,16 +7344,16 @@
     6517@@ -7049,16 +7345,16 @@
    64356518 }
    64366519 _ACEOF
    64376520 rm -f conftest.$ac_objext conftest$ac_exeext
    64386521-if { (eval echo "$as_me:7052: \"$ac_link\"") >&5
    6439 +if { (eval echo "$as_me:7347: \"$ac_link\"") >&5
     6522+if { (eval echo "$as_me:7348: \"$ac_link\"") >&5
    64406523   (eval $ac_link) 2>&5
    64416524   ac_status=$?
    64426525-  echo "$as_me:7055: \$? = $ac_status" >&5
    6443 +  echo "$as_me:7350: \$? = $ac_status" >&5
     6526+  echo "$as_me:7351: \$? = $ac_status" >&5
    64446527   (exit $ac_status); } &&
    64456528          { ac_try='test -s conftest$ac_exeext'
    64466529-  { (eval echo "$as_me:7058: \"$ac_try\"") >&5
    6447 +  { (eval echo "$as_me:7353: \"$ac_try\"") >&5
     6530+  { (eval echo "$as_me:7354: \"$ac_try\"") >&5
    64486531   (eval $ac_try) 2>&5
    64496532   ac_status=$?
    64506533-  echo "$as_me:7061: \$? = $ac_status" >&5
    6451 +  echo "$as_me:7356: \$? = $ac_status" >&5
     6534+  echo "$as_me:7357: \$? = $ac_status" >&5
    64526535   (exit $ac_status); }; }; then
    64536536   cf_cv_find_linkage_utf8=yes
    64546537 else
    6455 @@ -7067,12 +7362,41 @@
     6538@@ -7067,12 +7363,41 @@
    64566539 
    64576540     cf_cv_find_linkage_utf8=no
     
    64606543+    test -n "$verbose" && echo "       find linkage for utf8 library" 1>&6
    64616544+
    6462 +echo "${as_me-configure}:7367: testing find linkage for utf8 library ..." 1>&5
    6463 +
    6464 +echo "${as_me-configure}:7369: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
     6545+echo "${as_me-configure}:7368: testing find linkage for utf8 library ..." 1>&5
     6546+
     6547+echo "${as_me-configure}:7370: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
    64656548 
    64666549     cf_save_CPPFLAGS="$CPPFLAGS"
     
    64976580 test "/usr" != "$prefix" && \
    64986581 test -d "/usr" && \
    6499 @@ -7143,16 +7467,18 @@
     6582@@ -7143,16 +7468,18 @@
    65006583        test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
    65016584 }
     
    65096592 
    65106593-echo "${as_me-configure}:7151: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
    6511 +echo "${as_me-configure}:7477: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
     6594+echo "${as_me-configure}:7478: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
    65126595 
    65136596         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
    65146597         cat >conftest.$ac_ext <<_ACEOF
    65156598-#line 7155 "configure"
    6516 +#line 7481 "configure"
     6599+#line 7482 "configure"
    65176600 #include "confdefs.h"
    65186601 
    65196602 #include <libutf8.h>
    6520 @@ -7165,21 +7491,21 @@
     6603@@ -7165,21 +7492,21 @@
    65216604 }
    65226605 _ACEOF
    65236606 rm -f conftest.$ac_objext
    65246607-if { (eval echo "$as_me:7168: \"$ac_compile\"") >&5
    6525 +if { (eval echo "$as_me:7494: \"$ac_compile\"") >&5
     6608+if { (eval echo "$as_me:7495: \"$ac_compile\"") >&5
    65266609   (eval $ac_compile) 2>&5
    65276610   ac_status=$?
    65286611-  echo "$as_me:7171: \$? = $ac_status" >&5
    6529 +  echo "$as_me:7497: \$? = $ac_status" >&5
     6612+  echo "$as_me:7498: \$? = $ac_status" >&5
    65306613   (exit $ac_status); } &&
    65316614          { ac_try='test -s conftest.$ac_objext'
    65326615-  { (eval echo "$as_me:7174: \"$ac_try\"") >&5
    6533 +  { (eval echo "$as_me:7500: \"$ac_try\"") >&5
     6616+  { (eval echo "$as_me:7501: \"$ac_try\"") >&5
    65346617   (eval $ac_try) 2>&5
    65356618   ac_status=$?
    65366619-  echo "$as_me:7177: \$? = $ac_status" >&5
    6537 +  echo "$as_me:7503: \$? = $ac_status" >&5
     6620+  echo "$as_me:7504: \$? = $ac_status" >&5
    65386621   (exit $ac_status); }; }; then
    65396622 
     
    65416624 
    65426625-echo "${as_me-configure}:7182: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
    6543 +echo "${as_me-configure}:7508: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
     6626+echo "${as_me-configure}:7509: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
    65446627 
    65456628             cf_cv_find_linkage_utf8=maybe
    65466629             cf_test_CPPFLAGS="$CPPFLAGS"
    6547 @@ -7197,13 +7523,39 @@
     6630@@ -7197,13 +7524,39 @@
    65486631 
    65496632     if test "$cf_cv_find_linkage_utf8" = maybe ; then
    65506633 
    65516634-echo "${as_me-configure}:7200: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
    6552 +echo "${as_me-configure}:7526: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
     6635+echo "${as_me-configure}:7527: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
    65536636 
    65546637       cf_save_LIBS="$LIBS"
     
    65876670 test "/usr" != "$prefix" && \
    65886671 test -d "/usr" && \
    6589 @@ -7260,18 +7612,20 @@
     6672@@ -7260,18 +7613,20 @@
    65906673        test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
    65916674 }
     
    65996682 
    66006683-echo "${as_me-configure}:7268: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
    6601 +echo "${as_me-configure}:7622: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
     6684+echo "${as_me-configure}:7623: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
    66026685 
    66036686             CPPFLAGS="$cf_test_CPPFLAGS"
     
    66066689             cat >conftest.$ac_ext <<_ACEOF
    66076690-#line 7274 "configure"
    6608 +#line 7628 "configure"
     6691+#line 7629 "configure"
    66096692 #include "confdefs.h"
    66106693 
    66116694 #include <libutf8.h>
    6612 @@ -7284,21 +7638,21 @@
     6695@@ -7284,21 +7639,21 @@
    66136696 }
    66146697 _ACEOF
    66156698 rm -f conftest.$ac_objext conftest$ac_exeext
    66166699-if { (eval echo "$as_me:7287: \"$ac_link\"") >&5
    6617 +if { (eval echo "$as_me:7641: \"$ac_link\"") >&5
     6700+if { (eval echo "$as_me:7642: \"$ac_link\"") >&5
    66186701   (eval $ac_link) 2>&5
    66196702   ac_status=$?
    66206703-  echo "$as_me:7290: \$? = $ac_status" >&5
    6621 +  echo "$as_me:7644: \$? = $ac_status" >&5
     6704+  echo "$as_me:7645: \$? = $ac_status" >&5
    66226705   (exit $ac_status); } &&
    66236706          { ac_try='test -s conftest$ac_exeext'
    66246707-  { (eval echo "$as_me:7293: \"$ac_try\"") >&5
    6625 +  { (eval echo "$as_me:7647: \"$ac_try\"") >&5
     6708+  { (eval echo "$as_me:7648: \"$ac_try\"") >&5
    66266709   (eval $ac_try) 2>&5
    66276710   ac_status=$?
    66286711-  echo "$as_me:7296: \$? = $ac_status" >&5
    6629 +  echo "$as_me:7650: \$? = $ac_status" >&5
     6712+  echo "$as_me:7651: \$? = $ac_status" >&5
    66306713   (exit $ac_status); }; }; then
    66316714 
     
    66336716 
    66346717-echo "${as_me-configure}:7301: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
    6635 +echo "${as_me-configure}:7655: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
     6718+echo "${as_me-configure}:7656: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
    66366719 
    66376720                 cf_cv_find_linkage_utf8=yes
    66386721                 cf_cv_library_file_utf8="-lutf8"
    6639 @@ -7336,7 +7690,7 @@
     6722@@ -7336,7 +7691,7 @@
    66406723 fi
    66416724 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    66426725 fi
    66436726-echo "$as_me:7339: result: $cf_cv_utf8_lib" >&5
    6644 +echo "$as_me:7693: result: $cf_cv_utf8_lib" >&5
     6727+echo "$as_me:7694: result: $cf_cv_utf8_lib" >&5
    66456728 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
    66466729 
    66476730 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
    6648 @@ -7364,13 +7718,13 @@
     6731@@ -7364,13 +7719,13 @@
    66496732                fi
    66506733 
     
    66586741                          cat >conftest.$ac_ext <<_ACEOF
    66596742-#line 7373 "configure"
    6660 +#line 7727 "configure"
     6743+#line 7728 "configure"
    66616744 #include "confdefs.h"
    66626745 #include <stdio.h>
    66636746 int
    6664 @@ -7382,16 +7736,16 @@
     6747@@ -7382,16 +7737,16 @@
    66656748 }
    66666749 _ACEOF
    66676750 rm -f conftest.$ac_objext
    66686751-if { (eval echo "$as_me:7385: \"$ac_compile\"") >&5
    6669 +if { (eval echo "$as_me:7739: \"$ac_compile\"") >&5
     6752+if { (eval echo "$as_me:7740: \"$ac_compile\"") >&5
    66706753   (eval $ac_compile) 2>&5
    66716754   ac_status=$?
    66726755-  echo "$as_me:7388: \$? = $ac_status" >&5
    6673 +  echo "$as_me:7742: \$? = $ac_status" >&5
     6756+  echo "$as_me:7743: \$? = $ac_status" >&5
    66746757   (exit $ac_status); } &&
    66756758          { ac_try='test -s conftest.$ac_objext'
    66766759-  { (eval echo "$as_me:7391: \"$ac_try\"") >&5
    6677 +  { (eval echo "$as_me:7745: \"$ac_try\"") >&5
     6760+  { (eval echo "$as_me:7746: \"$ac_try\"") >&5
    66786761   (eval $ac_try) 2>&5
    66796762   ac_status=$?
    66806763-  echo "$as_me:7394: \$? = $ac_status" >&5
    6681 +  echo "$as_me:7748: \$? = $ac_status" >&5
     6764+  echo "$as_me:7749: \$? = $ac_status" >&5
    66826765   (exit $ac_status); }; }; then
    66836766   :
    66846767 else
    6685 @@ -7408,13 +7762,13 @@
     6768@@ -7408,13 +7763,13 @@
    66866769                if test "$cf_have_incdir" = no ; then
    66876770                  test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
    66886771 
    66896772-echo "${as_me-configure}:7411: testing adding $cf_add_incdir to include-path ..." 1>&5
    6690 +echo "${as_me-configure}:7765: testing adding $cf_add_incdir to include-path ..." 1>&5
     6773+echo "${as_me-configure}:7766: testing adding $cf_add_incdir to include-path ..." 1>&5
    66916774 
    66926775-                 CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
     
    67026785                  break
    67036786                fi
    6704 @@ -7442,7 +7796,7 @@
     6787@@ -7442,7 +7797,7 @@
    67056788       if test "$cf_have_libdir" = no ; then
    67066789         test -n "$verbose" && echo "   adding $cf_add_libdir to library-path" 1>&6
    67076790 
    67086791-echo "${as_me-configure}:7445: testing adding $cf_add_libdir to library-path ..." 1>&5
    6709 +echo "${as_me-configure}:7799: testing adding $cf_add_libdir to library-path ..." 1>&5
     6792+echo "${as_me-configure}:7800: testing adding $cf_add_libdir to library-path ..." 1>&5
    67106793 
    67116794         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
    67126795       fi
    6713 @@ -7459,14 +7813,14 @@
     6796@@ -7459,14 +7814,14 @@
    67146797        fi
    67156798 
    67166799 # This is needed on Tru64 5.0 to declare mbstate_t
    67176800-echo "$as_me:7462: checking if we must include wchar.h to declare mbstate_t" >&5
    6718 +echo "$as_me:7816: checking if we must include wchar.h to declare mbstate_t" >&5
     6801+echo "$as_me:7817: checking if we must include wchar.h to declare mbstate_t" >&5
    67196802 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
    67206803 if test "${cf_cv_mbstate_t+set}" = set; then
     
    67246807 cat >conftest.$ac_ext <<_ACEOF
    67256808-#line 7469 "configure"
    6726 +#line 7823 "configure"
     6809+#line 7824 "configure"
    67276810 #include "confdefs.h"
    67286811 
    67296812 #include <stdlib.h>
    6730 @@ -7484,23 +7838,23 @@
     6813@@ -7484,23 +7839,23 @@
    67316814 }
    67326815 _ACEOF
    67336816 rm -f conftest.$ac_objext
    67346817-if { (eval echo "$as_me:7487: \"$ac_compile\"") >&5
    6735 +if { (eval echo "$as_me:7841: \"$ac_compile\"") >&5
     6818+if { (eval echo "$as_me:7842: \"$ac_compile\"") >&5
    67366819   (eval $ac_compile) 2>&5
    67376820   ac_status=$?
    67386821-  echo "$as_me:7490: \$? = $ac_status" >&5
    6739 +  echo "$as_me:7844: \$? = $ac_status" >&5
     6822+  echo "$as_me:7845: \$? = $ac_status" >&5
    67406823   (exit $ac_status); } &&
    67416824          { ac_try='test -s conftest.$ac_objext'
    67426825-  { (eval echo "$as_me:7493: \"$ac_try\"") >&5
    6743 +  { (eval echo "$as_me:7847: \"$ac_try\"") >&5
     6826+  { (eval echo "$as_me:7848: \"$ac_try\"") >&5
    67446827   (eval $ac_try) 2>&5
    67456828   ac_status=$?
    67466829-  echo "$as_me:7496: \$? = $ac_status" >&5
    6747 +  echo "$as_me:7850: \$? = $ac_status" >&5
     6830+  echo "$as_me:7851: \$? = $ac_status" >&5
    67486831   (exit $ac_status); }; }; then
    67496832   cf_cv_mbstate_t=no
     
    67536836 cat >conftest.$ac_ext <<_ACEOF
    67546837-#line 7503 "configure"
    6755 +#line 7857 "configure"
     6838+#line 7858 "configure"
    67566839 #include "confdefs.h"
    67576840 
    67586841 #include <stdlib.h>
    6759 @@ -7519,16 +7873,16 @@
     6842@@ -7519,16 +7874,16 @@
    67606843 }
    67616844 _ACEOF
    67626845 rm -f conftest.$ac_objext
    67636846-if { (eval echo "$as_me:7522: \"$ac_compile\"") >&5
    6764 +if { (eval echo "$as_me:7876: \"$ac_compile\"") >&5
     6847+if { (eval echo "$as_me:7877: \"$ac_compile\"") >&5
    67656848   (eval $ac_compile) 2>&5
    67666849   ac_status=$?
    67676850-  echo "$as_me:7525: \$? = $ac_status" >&5
    6768 +  echo "$as_me:7879: \$? = $ac_status" >&5
     6851+  echo "$as_me:7880: \$? = $ac_status" >&5
    67696852   (exit $ac_status); } &&
    67706853          { ac_try='test -s conftest.$ac_objext'
    67716854-  { (eval echo "$as_me:7528: \"$ac_try\"") >&5
    6772 +  { (eval echo "$as_me:7882: \"$ac_try\"") >&5
     6855+  { (eval echo "$as_me:7883: \"$ac_try\"") >&5
    67736856   (eval $ac_try) 2>&5
    67746857   ac_status=$?
    67756858-  echo "$as_me:7531: \$? = $ac_status" >&5
    6776 +  echo "$as_me:7885: \$? = $ac_status" >&5
     6859+  echo "$as_me:7886: \$? = $ac_status" >&5
    67776860   (exit $ac_status); }; }; then
    67786861   cf_cv_mbstate_t=yes
    67796862 else
    6780 @@ -7540,7 +7894,7 @@
     6863@@ -7540,7 +7895,7 @@
    67816864 fi
    67826865 rm -f conftest.$ac_objext conftest.$ac_ext
    67836866 fi
    67846867-echo "$as_me:7543: result: $cf_cv_mbstate_t" >&5
    6785 +echo "$as_me:7897: result: $cf_cv_mbstate_t" >&5
     6868+echo "$as_me:7898: result: $cf_cv_mbstate_t" >&5
    67866869 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
    67876870 
    67886871 if test "$cf_cv_mbstate_t" = yes ; then
    6789 @@ -7557,14 +7911,14 @@
     6872@@ -7557,14 +7912,14 @@
    67906873 fi
    67916874 
    67926875 # This is needed on Tru64 5.0 to declare wchar_t
    67936876-echo "$as_me:7560: checking if we must include wchar.h to declare wchar_t" >&5
    6794 +echo "$as_me:7914: checking if we must include wchar.h to declare wchar_t" >&5
     6877+echo "$as_me:7915: checking if we must include wchar.h to declare wchar_t" >&5
    67956878 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
    67966879 if test "${cf_cv_wchar_t+set}" = set; then
     
    68006883 cat >conftest.$ac_ext <<_ACEOF
    68016884-#line 7567 "configure"
    6802 +#line 7921 "configure"
     6885+#line 7922 "configure"
    68036886 #include "confdefs.h"
    68046887 
    68056888 #include <stdlib.h>
    6806 @@ -7582,23 +7936,23 @@
     6889@@ -7582,23 +7937,23 @@
    68076890 }
    68086891 _ACEOF
    68096892 rm -f conftest.$ac_objext
    68106893-if { (eval echo "$as_me:7585: \"$ac_compile\"") >&5
    6811 +if { (eval echo "$as_me:7939: \"$ac_compile\"") >&5
     6894+if { (eval echo "$as_me:7940: \"$ac_compile\"") >&5
    68126895   (eval $ac_compile) 2>&5
    68136896   ac_status=$?
    68146897-  echo "$as_me:7588: \$? = $ac_status" >&5
    6815 +  echo "$as_me:7942: \$? = $ac_status" >&5
     6898+  echo "$as_me:7943: \$? = $ac_status" >&5
    68166899   (exit $ac_status); } &&
    68176900          { ac_try='test -s conftest.$ac_objext'
    68186901-  { (eval echo "$as_me:7591: \"$ac_try\"") >&5
    6819 +  { (eval echo "$as_me:7945: \"$ac_try\"") >&5
     6902+  { (eval echo "$as_me:7946: \"$ac_try\"") >&5
    68206903   (eval $ac_try) 2>&5
    68216904   ac_status=$?
    68226905-  echo "$as_me:7594: \$? = $ac_status" >&5
    6823 +  echo "$as_me:7948: \$? = $ac_status" >&5
     6906+  echo "$as_me:7949: \$? = $ac_status" >&5
    68246907   (exit $ac_status); }; }; then
    68256908   cf_cv_wchar_t=no
     
    68296912 cat >conftest.$ac_ext <<_ACEOF
    68306913-#line 7601 "configure"
    6831 +#line 7955 "configure"
     6914+#line 7956 "configure"
    68326915 #include "confdefs.h"
    68336916 
    68346917 #include <stdlib.h>
    6835 @@ -7617,16 +7971,16 @@
     6918@@ -7617,16 +7972,16 @@
    68366919 }
    68376920 _ACEOF
    68386921 rm -f conftest.$ac_objext
    68396922-if { (eval echo "$as_me:7620: \"$ac_compile\"") >&5
    6840 +if { (eval echo "$as_me:7974: \"$ac_compile\"") >&5
     6923+if { (eval echo "$as_me:7975: \"$ac_compile\"") >&5
    68416924   (eval $ac_compile) 2>&5
    68426925   ac_status=$?
    68436926-  echo "$as_me:7623: \$? = $ac_status" >&5
    6844 +  echo "$as_me:7977: \$? = $ac_status" >&5
     6927+  echo "$as_me:7978: \$? = $ac_status" >&5
    68456928   (exit $ac_status); } &&
    68466929          { ac_try='test -s conftest.$ac_objext'
    68476930-  { (eval echo "$as_me:7626: \"$ac_try\"") >&5
    6848 +  { (eval echo "$as_me:7980: \"$ac_try\"") >&5
     6931+  { (eval echo "$as_me:7981: \"$ac_try\"") >&5
    68496932   (eval $ac_try) 2>&5
    68506933   ac_status=$?
    68516934-  echo "$as_me:7629: \$? = $ac_status" >&5
    6852 +  echo "$as_me:7983: \$? = $ac_status" >&5
     6935+  echo "$as_me:7984: \$? = $ac_status" >&5
    68536936   (exit $ac_status); }; }; then
    68546937   cf_cv_wchar_t=yes
    68556938 else
    6856 @@ -7638,7 +7992,7 @@
     6939@@ -7638,7 +7993,7 @@
    68576940 fi
    68586941 rm -f conftest.$ac_objext conftest.$ac_ext
    68596942 fi
    68606943-echo "$as_me:7641: result: $cf_cv_wchar_t" >&5
    6861 +echo "$as_me:7995: result: $cf_cv_wchar_t" >&5
     6944+echo "$as_me:7996: result: $cf_cv_wchar_t" >&5
    68626945 echo "${ECHO_T}$cf_cv_wchar_t" >&6
    68636946 
    68646947 if test "$cf_cv_wchar_t" = yes ; then
    6865 @@ -7660,14 +8014,14 @@
     6948@@ -7660,14 +8015,14 @@
    68666949 fi
    68676950 
    68686951 # This is needed on Tru64 5.0 to declare wint_t
    68696952-echo "$as_me:7663: checking if we must include wchar.h to declare wint_t" >&5
    6870 +echo "$as_me:8017: checking if we must include wchar.h to declare wint_t" >&5
     6953+echo "$as_me:8018: checking if we must include wchar.h to declare wint_t" >&5
    68716954 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
    68726955 if test "${cf_cv_wint_t+set}" = set; then
     
    68766959 cat >conftest.$ac_ext <<_ACEOF
    68776960-#line 7670 "configure"
    6878 +#line 8024 "configure"
     6961+#line 8025 "configure"
    68796962 #include "confdefs.h"
    68806963 
    68816964 #include <stdlib.h>
    6882 @@ -7685,23 +8039,23 @@
     6965@@ -7685,23 +8040,23 @@
    68836966 }
    68846967 _ACEOF
    68856968 rm -f conftest.$ac_objext
    68866969-if { (eval echo "$as_me:7688: \"$ac_compile\"") >&5
    6887 +if { (eval echo "$as_me:8042: \"$ac_compile\"") >&5
     6970+if { (eval echo "$as_me:8043: \"$ac_compile\"") >&5
    68886971   (eval $ac_compile) 2>&5
    68896972   ac_status=$?
    68906973-  echo "$as_me:7691: \$? = $ac_status" >&5
    6891 +  echo "$as_me:8045: \$? = $ac_status" >&5
     6974+  echo "$as_me:8046: \$? = $ac_status" >&5
    68926975   (exit $ac_status); } &&
    68936976          { ac_try='test -s conftest.$ac_objext'
    68946977-  { (eval echo "$as_me:7694: \"$ac_try\"") >&5
    6895 +  { (eval echo "$as_me:8048: \"$ac_try\"") >&5
     6978+  { (eval echo "$as_me:8049: \"$ac_try\"") >&5
    68966979   (eval $ac_try) 2>&5
    68976980   ac_status=$?
    68986981-  echo "$as_me:7697: \$? = $ac_status" >&5
    6899 +  echo "$as_me:8051: \$? = $ac_status" >&5
     6982+  echo "$as_me:8052: \$? = $ac_status" >&5
    69006983   (exit $ac_status); }; }; then
    69016984   cf_cv_wint_t=no
     
    69056988 cat >conftest.$ac_ext <<_ACEOF
    69066989-#line 7704 "configure"
    6907 +#line 8058 "configure"
     6990+#line 8059 "configure"
    69086991 #include "confdefs.h"
    69096992 
    69106993 #include <stdlib.h>
    6911 @@ -7720,16 +8074,16 @@
     6994@@ -7720,16 +8075,16 @@
    69126995 }
    69136996 _ACEOF
    69146997 rm -f conftest.$ac_objext
    69156998-if { (eval echo "$as_me:7723: \"$ac_compile\"") >&5
    6916 +if { (eval echo "$as_me:8077: \"$ac_compile\"") >&5
     6999+if { (eval echo "$as_me:8078: \"$ac_compile\"") >&5
    69177000   (eval $ac_compile) 2>&5
    69187001   ac_status=$?
    69197002-  echo "$as_me:7726: \$? = $ac_status" >&5
    6920 +  echo "$as_me:8080: \$? = $ac_status" >&5
     7003+  echo "$as_me:8081: \$? = $ac_status" >&5
    69217004   (exit $ac_status); } &&
    69227005          { ac_try='test -s conftest.$ac_objext'
    69237006-  { (eval echo "$as_me:7729: \"$ac_try\"") >&5
    6924 +  { (eval echo "$as_me:8083: \"$ac_try\"") >&5
     7007+  { (eval echo "$as_me:8084: \"$ac_try\"") >&5
    69257008   (eval $ac_try) 2>&5
    69267009   ac_status=$?
    69277010-  echo "$as_me:7732: \$? = $ac_status" >&5
    6928 +  echo "$as_me:8086: \$? = $ac_status" >&5
     7011+  echo "$as_me:8087: \$? = $ac_status" >&5
    69297012   (exit $ac_status); }; }; then
    69307013   cf_cv_wint_t=yes
    69317014 else
    6932 @@ -7741,7 +8095,7 @@
     7015@@ -7741,7 +8096,7 @@
    69337016 fi
    69347017 rm -f conftest.$ac_objext conftest.$ac_ext
    69357018 fi
    69367019-echo "$as_me:7744: result: $cf_cv_wint_t" >&5
    6937 +echo "$as_me:8098: result: $cf_cv_wint_t" >&5
     7020+echo "$as_me:8099: result: $cf_cv_wint_t" >&5
    69387021 echo "${ECHO_T}$cf_cv_wint_t" >&6
    69397022 
    69407023 if test "$cf_cv_wint_t" = yes ; then
    6941 @@ -7780,7 +8134,7 @@
     7024@@ -7780,7 +8135,7 @@
    69427025        ;;
    69437026 esac
    69447027 
    69457028-echo "$as_me:7783: checking whether to enable _LP64 definition in curses.h" >&5
    6946 +echo "$as_me:8137: checking whether to enable _LP64 definition in curses.h" >&5
     7029+echo "$as_me:8138: checking whether to enable _LP64 definition in curses.h" >&5
    69477030 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
    69487031 
    69497032 # Check whether --enable-lp64 or --disable-lp64 was given.
    6950 @@ -7790,7 +8144,7 @@
     7033@@ -7790,7 +8145,7 @@
    69517034 else
    69527035   with_lp64=$default_with_lp64
    69537036 fi;
    69547037-echo "$as_me:7793: result: $with_lp64" >&5
    6955 +echo "$as_me:8147: result: $with_lp64" >&5
     7038+echo "$as_me:8148: result: $with_lp64" >&5
    69567039 echo "${ECHO_T}$with_lp64" >&6
    69577040 
    69587041 if test "$with_lp64" = yes ; then
    6959 @@ -7806,7 +8160,7 @@
     7042@@ -7806,7 +8161,7 @@
    69607043 fi;
    69617044 if test "$enable_largefile" != no; then
    69627045 
    69637046-  echo "$as_me:7809: checking for special C compiler options needed for large files" >&5
    6964 +  echo "$as_me:8163: checking for special C compiler options needed for large files" >&5
     7047+  echo "$as_me:8164: checking for special C compiler options needed for large files" >&5
    69657048 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
    69667049 if test "${ac_cv_sys_largefile_CC+set}" = set; then
    69677050   echo $ECHO_N "(cached) $ECHO_C" >&6
    6968 @@ -7818,7 +8172,7 @@
     7051@@ -7818,7 +8173,7 @@
    69697052         # IRIX 6.2 and later do not support large files by default,
    69707053         # so use the C compiler's -n32 option if that helps.
    69717054          cat >conftest.$ac_ext <<_ACEOF
    69727055-#line 7821 "configure"
    6973 +#line 8175 "configure"
     7056+#line 8176 "configure"
    69747057 #include "confdefs.h"
    69757058 #include <sys/types.h>
    69767059  /* Check that off_t can represent 2**63 - 1 correctly.
    6977 @@ -7838,16 +8192,16 @@
     7060@@ -7838,16 +8193,16 @@
    69787061 }
    69797062 _ACEOF
    69807063         rm -f conftest.$ac_objext
    69817064-if { (eval echo "$as_me:7841: \"$ac_compile\"") >&5
    6982 +if { (eval echo "$as_me:8195: \"$ac_compile\"") >&5
     7065+if { (eval echo "$as_me:8196: \"$ac_compile\"") >&5
    69837066   (eval $ac_compile) 2>&5
    69847067   ac_status=$?
    69857068-  echo "$as_me:7844: \$? = $ac_status" >&5
    6986 +  echo "$as_me:8198: \$? = $ac_status" >&5
     7069+  echo "$as_me:8199: \$? = $ac_status" >&5
    69877070   (exit $ac_status); } &&
    69887071          { ac_try='test -s conftest.$ac_objext'
    69897072-  { (eval echo "$as_me:7847: \"$ac_try\"") >&5
    6990 +  { (eval echo "$as_me:8201: \"$ac_try\"") >&5
     7073+  { (eval echo "$as_me:8202: \"$ac_try\"") >&5
    69917074   (eval $ac_try) 2>&5
    69927075   ac_status=$?
    69937076-  echo "$as_me:7850: \$? = $ac_status" >&5
    6994 +  echo "$as_me:8204: \$? = $ac_status" >&5
     7077+  echo "$as_me:8205: \$? = $ac_status" >&5
    69957078   (exit $ac_status); }; }; then
    69967079   break
    69977080 else
    6998 @@ -7857,16 +8211,16 @@
     7081@@ -7857,16 +8212,16 @@
    69997082 rm -f conftest.$ac_objext
    70007083         CC="$CC -n32"
    70017084         rm -f conftest.$ac_objext
    70027085-if { (eval echo "$as_me:7860: \"$ac_compile\"") >&5
    7003 +if { (eval echo "$as_me:8214: \"$ac_compile\"") >&5
     7086+if { (eval echo "$as_me:8215: \"$ac_compile\"") >&5
    70047087   (eval $ac_compile) 2>&5
    70057088   ac_status=$?
    70067089-  echo "$as_me:7863: \$? = $ac_status" >&5
    7007 +  echo "$as_me:8217: \$? = $ac_status" >&5
     7090+  echo "$as_me:8218: \$? = $ac_status" >&5
    70087091   (exit $ac_status); } &&
    70097092          { ac_try='test -s conftest.$ac_objext'
    70107093-  { (eval echo "$as_me:7866: \"$ac_try\"") >&5
    7011 +  { (eval echo "$as_me:8220: \"$ac_try\"") >&5
     7094+  { (eval echo "$as_me:8221: \"$ac_try\"") >&5
    70127095   (eval $ac_try) 2>&5
    70137096   ac_status=$?
    70147097-  echo "$as_me:7869: \$? = $ac_status" >&5
    7015 +  echo "$as_me:8223: \$? = $ac_status" >&5
     7098+  echo "$as_me:8224: \$? = $ac_status" >&5
    70167099   (exit $ac_status); }; }; then
    70177100   ac_cv_sys_largefile_CC=' -n32'; break
    70187101 else
    7019 @@ -7880,13 +8234,13 @@
     7102@@ -7880,13 +8235,13 @@
    70207103        rm -f conftest.$ac_ext
    70217104     fi
    70227105 fi
    70237106-echo "$as_me:7883: result: $ac_cv_sys_largefile_CC" >&5
    7024 +echo "$as_me:8237: result: $ac_cv_sys_largefile_CC" >&5
     7107+echo "$as_me:8238: result: $ac_cv_sys_largefile_CC" >&5
    70257108 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
    70267109   if test "$ac_cv_sys_largefile_CC" != no; then
     
    70297112 
    70307113-  echo "$as_me:7889: checking for _FILE_OFFSET_BITS value needed for large files" >&5
    7031 +  echo "$as_me:8243: checking for _FILE_OFFSET_BITS value needed for large files" >&5
     7114+  echo "$as_me:8244: checking for _FILE_OFFSET_BITS value needed for large files" >&5
    70327115 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
    70337116 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
    70347117   echo $ECHO_N "(cached) $ECHO_C" >&6
    7035 @@ -7894,7 +8248,7 @@
     7118@@ -7894,7 +8249,7 @@
    70367119   while :; do
    70377120   ac_cv_sys_file_offset_bits=no
    70387121   cat >conftest.$ac_ext <<_ACEOF
    70397122-#line 7897 "configure"
    7040 +#line 8251 "configure"
     7123+#line 8252 "configure"
    70417124 #include "confdefs.h"
    70427125 #include <sys/types.h>
    70437126  /* Check that off_t can represent 2**63 - 1 correctly.
    7044 @@ -7914,16 +8268,16 @@
     7127@@ -7914,16 +8269,16 @@
    70457128 }
    70467129 _ACEOF
    70477130 rm -f conftest.$ac_objext
    70487131-if { (eval echo "$as_me:7917: \"$ac_compile\"") >&5
    7049 +if { (eval echo "$as_me:8271: \"$ac_compile\"") >&5
     7132+if { (eval echo "$as_me:8272: \"$ac_compile\"") >&5
    70507133   (eval $ac_compile) 2>&5
    70517134   ac_status=$?
    70527135-  echo "$as_me:7920: \$? = $ac_status" >&5
    7053 +  echo "$as_me:8274: \$? = $ac_status" >&5
     7136+  echo "$as_me:8275: \$? = $ac_status" >&5
    70547137   (exit $ac_status); } &&
    70557138          { ac_try='test -s conftest.$ac_objext'
    70567139-  { (eval echo "$as_me:7923: \"$ac_try\"") >&5
    7057 +  { (eval echo "$as_me:8277: \"$ac_try\"") >&5
     7140+  { (eval echo "$as_me:8278: \"$ac_try\"") >&5
    70587141   (eval $ac_try) 2>&5
    70597142   ac_status=$?
    70607143-  echo "$as_me:7926: \$? = $ac_status" >&5
    7061 +  echo "$as_me:8280: \$? = $ac_status" >&5
     7144+  echo "$as_me:8281: \$? = $ac_status" >&5
    70627145   (exit $ac_status); }; }; then
    70637146   break
    70647147 else
    7065 @@ -7932,7 +8286,7 @@
     7148@@ -7932,7 +8287,7 @@
    70667149 fi
    70677150 rm -f conftest.$ac_objext conftest.$ac_ext
    70687151   cat >conftest.$ac_ext <<_ACEOF
    70697152-#line 7935 "configure"
    7070 +#line 8289 "configure"
     7153+#line 8290 "configure"
    70717154 #include "confdefs.h"
    70727155 #define _FILE_OFFSET_BITS 64
    70737156 #include <sys/types.h>
    7074 @@ -7953,16 +8307,16 @@
     7157@@ -7953,16 +8308,16 @@
    70757158 }
    70767159 _ACEOF
    70777160 rm -f conftest.$ac_objext
    70787161-if { (eval echo "$as_me:7956: \"$ac_compile\"") >&5
    7079 +if { (eval echo "$as_me:8310: \"$ac_compile\"") >&5
     7162+if { (eval echo "$as_me:8311: \"$ac_compile\"") >&5
    70807163   (eval $ac_compile) 2>&5
    70817164   ac_status=$?
    70827165-  echo "$as_me:7959: \$? = $ac_status" >&5
    7083 +  echo "$as_me:8313: \$? = $ac_status" >&5
     7166+  echo "$as_me:8314: \$? = $ac_status" >&5
    70847167   (exit $ac_status); } &&
    70857168          { ac_try='test -s conftest.$ac_objext'
    70867169-  { (eval echo "$as_me:7962: \"$ac_try\"") >&5
    7087 +  { (eval echo "$as_me:8316: \"$ac_try\"") >&5
     7170+  { (eval echo "$as_me:8317: \"$ac_try\"") >&5
    70887171   (eval $ac_try) 2>&5
    70897172   ac_status=$?
    70907173-  echo "$as_me:7965: \$? = $ac_status" >&5
    7091 +  echo "$as_me:8319: \$? = $ac_status" >&5
     7174+  echo "$as_me:8320: \$? = $ac_status" >&5
    70927175   (exit $ac_status); }; }; then
    70937176   ac_cv_sys_file_offset_bits=64; break
    70947177 else
    7095 @@ -7973,7 +8327,7 @@
     7178@@ -7973,7 +8328,7 @@
    70967179   break
    70977180 done
    70987181 fi
    70997182-echo "$as_me:7976: result: $ac_cv_sys_file_offset_bits" >&5
    7100 +echo "$as_me:8330: result: $ac_cv_sys_file_offset_bits" >&5
     7183+echo "$as_me:8331: result: $ac_cv_sys_file_offset_bits" >&5
    71017184 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
    71027185 if test "$ac_cv_sys_file_offset_bits" != no; then
    71037186 
    7104 @@ -7983,7 +8337,7 @@
     7187@@ -7983,7 +8338,7 @@
    71057188 
    71067189 fi
    71077190 rm -f conftest*
    71087191-  echo "$as_me:7986: checking for _LARGE_FILES value needed for large files" >&5
    7109 +  echo "$as_me:8340: checking for _LARGE_FILES value needed for large files" >&5
     7192+  echo "$as_me:8341: checking for _LARGE_FILES value needed for large files" >&5
    71107193 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
    71117194 if test "${ac_cv_sys_large_files+set}" = set; then
    71127195   echo $ECHO_N "(cached) $ECHO_C" >&6
    7113 @@ -7991,7 +8345,7 @@
     7196@@ -7991,7 +8346,7 @@
    71147197   while :; do
    71157198   ac_cv_sys_large_files=no
    71167199   cat >conftest.$ac_ext <<_ACEOF
    71177200-#line 7994 "configure"
    7118 +#line 8348 "configure"
     7201+#line 8349 "configure"
    71197202 #include "confdefs.h"
    71207203 #include <sys/types.h>
    71217204  /* Check that off_t can represent 2**63 - 1 correctly.
    7122 @@ -8011,16 +8365,16 @@
     7205@@ -8011,16 +8366,16 @@
    71237206 }
    71247207 _ACEOF
    71257208 rm -f conftest.$ac_objext
    71267209-if { (eval echo "$as_me:8014: \"$ac_compile\"") >&5
    7127 +if { (eval echo "$as_me:8368: \"$ac_compile\"") >&5
     7210+if { (eval echo "$as_me:8369: \"$ac_compile\"") >&5
    71287211   (eval $ac_compile) 2>&5
    71297212   ac_status=$?
    71307213-  echo "$as_me:8017: \$? = $ac_status" >&5
    7131 +  echo "$as_me:8371: \$? = $ac_status" >&5
     7214+  echo "$as_me:8372: \$? = $ac_status" >&5
    71327215   (exit $ac_status); } &&
    71337216          { ac_try='test -s conftest.$ac_objext'
    71347217-  { (eval echo "$as_me:8020: \"$ac_try\"") >&5
    7135 +  { (eval echo "$as_me:8374: \"$ac_try\"") >&5
     7218+  { (eval echo "$as_me:8375: \"$ac_try\"") >&5
    71367219   (eval $ac_try) 2>&5
    71377220   ac_status=$?
    71387221-  echo "$as_me:8023: \$? = $ac_status" >&5
    7139 +  echo "$as_me:8377: \$? = $ac_status" >&5
     7222+  echo "$as_me:8378: \$? = $ac_status" >&5
    71407223   (exit $ac_status); }; }; then
    71417224   break
    71427225 else
    7143 @@ -8029,7 +8383,7 @@
     7226@@ -8029,7 +8384,7 @@
    71447227 fi
    71457228 rm -f conftest.$ac_objext conftest.$ac_ext
    71467229   cat >conftest.$ac_ext <<_ACEOF
    71477230-#line 8032 "configure"
    7148 +#line 8386 "configure"
     7231+#line 8387 "configure"
    71497232 #include "confdefs.h"
    71507233 #define _LARGE_FILES 1
    71517234 #include <sys/types.h>
    7152 @@ -8050,16 +8404,16 @@
     7235@@ -8050,16 +8405,16 @@
    71537236 }
    71547237 _ACEOF
    71557238 rm -f conftest.$ac_objext
    71567239-if { (eval echo "$as_me:8053: \"$ac_compile\"") >&5
    7157 +if { (eval echo "$as_me:8407: \"$ac_compile\"") >&5
     7240+if { (eval echo "$as_me:8408: \"$ac_compile\"") >&5
    71587241   (eval $ac_compile) 2>&5
    71597242   ac_status=$?
    71607243-  echo "$as_me:8056: \$? = $ac_status" >&5
    7161 +  echo "$as_me:8410: \$? = $ac_status" >&5
     7244+  echo "$as_me:8411: \$? = $ac_status" >&5
    71627245   (exit $ac_status); } &&
    71637246          { ac_try='test -s conftest.$ac_objext'
    71647247-  { (eval echo "$as_me:8059: \"$ac_try\"") >&5
    7165 +  { (eval echo "$as_me:8413: \"$ac_try\"") >&5
     7248+  { (eval echo "$as_me:8414: \"$ac_try\"") >&5
    71667249   (eval $ac_try) 2>&5
    71677250   ac_status=$?
    71687251-  echo "$as_me:8062: \$? = $ac_status" >&5
    7169 +  echo "$as_me:8416: \$? = $ac_status" >&5
     7252+  echo "$as_me:8417: \$? = $ac_status" >&5
    71707253   (exit $ac_status); }; }; then
    71717254   ac_cv_sys_large_files=1; break
    71727255 else
    7173 @@ -8070,7 +8424,7 @@
     7256@@ -8070,7 +8425,7 @@
    71747257   break
    71757258 done
    71767259 fi
    71777260-echo "$as_me:8073: result: $ac_cv_sys_large_files" >&5
    7178 +echo "$as_me:8427: result: $ac_cv_sys_large_files" >&5
     7261+echo "$as_me:8428: result: $ac_cv_sys_large_files" >&5
    71797262 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
    71807263 if test "$ac_cv_sys_large_files" != no; then
    71817264 
    7182 @@ -8083,7 +8437,7 @@
     7265@@ -8083,7 +8438,7 @@
    71837266 fi
    71847267 
    71857268     if test "$enable_largefile" != no ; then
    71867269-       echo "$as_me:8086: checking for _LARGEFILE_SOURCE value needed for large files" >&5
    7187 +       echo "$as_me:8440: checking for _LARGEFILE_SOURCE value needed for large files" >&5
     7270+       echo "$as_me:8441: checking for _LARGEFILE_SOURCE value needed for large files" >&5
    71887271 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
    71897272 if test "${ac_cv_sys_largefile_source+set}" = set; then
    71907273   echo $ECHO_N "(cached) $ECHO_C" >&6
    7191 @@ -8091,7 +8445,7 @@
     7274@@ -8091,7 +8446,7 @@
    71927275   while :; do
    71937276   ac_cv_sys_largefile_source=no
    71947277   cat >conftest.$ac_ext <<_ACEOF
    71957278-#line 8094 "configure"
    7196 +#line 8448 "configure"
     7279+#line 8449 "configure"
    71977280 #include "confdefs.h"
    71987281 #include <stdio.h>
    71997282 int
    7200 @@ -8103,16 +8457,16 @@
     7283@@ -8103,16 +8458,16 @@
    72017284 }
    72027285 _ACEOF
    72037286 rm -f conftest.$ac_objext
    72047287-if { (eval echo "$as_me:8106: \"$ac_compile\"") >&5
    7205 +if { (eval echo "$as_me:8460: \"$ac_compile\"") >&5
     7288+if { (eval echo "$as_me:8461: \"$ac_compile\"") >&5
    72067289   (eval $ac_compile) 2>&5
    72077290   ac_status=$?
    72087291-  echo "$as_me:8109: \$? = $ac_status" >&5
    7209 +  echo "$as_me:8463: \$? = $ac_status" >&5
     7292+  echo "$as_me:8464: \$? = $ac_status" >&5
    72107293   (exit $ac_status); } &&
    72117294          { ac_try='test -s conftest.$ac_objext'
    72127295-  { (eval echo "$as_me:8112: \"$ac_try\"") >&5
    7213 +  { (eval echo "$as_me:8466: \"$ac_try\"") >&5
     7296+  { (eval echo "$as_me:8467: \"$ac_try\"") >&5
    72147297   (eval $ac_try) 2>&5
    72157298   ac_status=$?
    72167299-  echo "$as_me:8115: \$? = $ac_status" >&5
    7217 +  echo "$as_me:8469: \$? = $ac_status" >&5
     7300+  echo "$as_me:8470: \$? = $ac_status" >&5
    72187301   (exit $ac_status); }; }; then
    72197302   break
    72207303 else
    7221 @@ -8121,7 +8475,7 @@
     7304@@ -8121,7 +8476,7 @@
    72227305 fi
    72237306 rm -f conftest.$ac_objext conftest.$ac_ext
    72247307   cat >conftest.$ac_ext <<_ACEOF
    72257308-#line 8124 "configure"
    7226 +#line 8478 "configure"
     7309+#line 8479 "configure"
    72277310 #include "confdefs.h"
    72287311 #define _LARGEFILE_SOURCE 1
    72297312 #include <stdio.h>
    7230 @@ -8134,16 +8488,16 @@
     7313@@ -8134,16 +8489,16 @@
    72317314 }
    72327315 _ACEOF
    72337316 rm -f conftest.$ac_objext
    72347317-if { (eval echo "$as_me:8137: \"$ac_compile\"") >&5
    7235 +if { (eval echo "$as_me:8491: \"$ac_compile\"") >&5
     7318+if { (eval echo "$as_me:8492: \"$ac_compile\"") >&5
    72367319   (eval $ac_compile) 2>&5
    72377320   ac_status=$?
    72387321-  echo "$as_me:8140: \$? = $ac_status" >&5
    7239 +  echo "$as_me:8494: \$? = $ac_status" >&5
     7322+  echo "$as_me:8495: \$? = $ac_status" >&5
    72407323   (exit $ac_status); } &&
    72417324          { ac_try='test -s conftest.$ac_objext'
    72427325-  { (eval echo "$as_me:8143: \"$ac_try\"") >&5
    7243 +  { (eval echo "$as_me:8497: \"$ac_try\"") >&5
     7326+  { (eval echo "$as_me:8498: \"$ac_try\"") >&5
    72447327   (eval $ac_try) 2>&5
    72457328   ac_status=$?
    72467329-  echo "$as_me:8146: \$? = $ac_status" >&5
    7247 +  echo "$as_me:8500: \$? = $ac_status" >&5
     7330+  echo "$as_me:8501: \$? = $ac_status" >&5
    72487331   (exit $ac_status); }; }; then
    72497332   ac_cv_sys_largefile_source=1; break
    72507333 else
    7251 @@ -8154,7 +8508,7 @@
     7334@@ -8154,7 +8509,7 @@
    72527335   break
    72537336 done
    72547337 fi
    72557338-echo "$as_me:8157: result: $ac_cv_sys_largefile_source" >&5
    7256 +echo "$as_me:8511: result: $ac_cv_sys_largefile_source" >&5
     7339+echo "$as_me:8512: result: $ac_cv_sys_largefile_source" >&5
    72577340 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
    72587341 if test "$ac_cv_sys_largefile_source" != no; then
    72597342 
    7260 @@ -8168,13 +8522,13 @@
     7343@@ -8168,13 +8523,13 @@
    72617344 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
    72627345 # in glibc 2.1.3, but that breaks too many other things.
    72637346 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
    72647347-echo "$as_me:8171: checking for fseeko" >&5
    7265 +echo "$as_me:8525: checking for fseeko" >&5
     7348+echo "$as_me:8526: checking for fseeko" >&5
    72667349 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
    72677350 if test "${ac_cv_func_fseeko+set}" = set; then
     
    72707353   cat >conftest.$ac_ext <<_ACEOF
    72717354-#line 8177 "configure"
    7272 +#line 8531 "configure"
     7355+#line 8532 "configure"
    72737356 #include "confdefs.h"
    72747357 #include <stdio.h>
    72757358 int
    7276 @@ -8186,16 +8540,16 @@
     7359@@ -8186,16 +8541,16 @@
    72777360 }
    72787361 _ACEOF
    72797362 rm -f conftest.$ac_objext conftest$ac_exeext
    72807363-if { (eval echo "$as_me:8189: \"$ac_link\"") >&5
    7281 +if { (eval echo "$as_me:8543: \"$ac_link\"") >&5
     7364+if { (eval echo "$as_me:8544: \"$ac_link\"") >&5
    72827365   (eval $ac_link) 2>&5
    72837366   ac_status=$?
    72847367-  echo "$as_me:8192: \$? = $ac_status" >&5
    7285 +  echo "$as_me:8546: \$? = $ac_status" >&5
     7368+  echo "$as_me:8547: \$? = $ac_status" >&5
    72867369   (exit $ac_status); } &&
    72877370          { ac_try='test -s conftest$ac_exeext'
    72887371-  { (eval echo "$as_me:8195: \"$ac_try\"") >&5
    7289 +  { (eval echo "$as_me:8549: \"$ac_try\"") >&5
     7372+  { (eval echo "$as_me:8550: \"$ac_try\"") >&5
    72907373   (eval $ac_try) 2>&5
    72917374   ac_status=$?
    72927375-  echo "$as_me:8198: \$? = $ac_status" >&5
    7293 +  echo "$as_me:8552: \$? = $ac_status" >&5
     7376+  echo "$as_me:8553: \$? = $ac_status" >&5
    72947377   (exit $ac_status); }; }; then
    72957378   ac_cv_func_fseeko=yes
    72967379 else
    7297 @@ -8205,7 +8559,7 @@
     7380@@ -8205,7 +8560,7 @@
    72987381 fi
    72997382 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    73007383 fi
    73017384-echo "$as_me:8208: result: $ac_cv_func_fseeko" >&5
    7302 +echo "$as_me:8562: result: $ac_cv_func_fseeko" >&5
     7385+echo "$as_me:8563: result: $ac_cv_func_fseeko" >&5
    73037386 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
    73047387 if test $ac_cv_func_fseeko = yes; then
    73057388 
    7306 @@ -8226,14 +8580,14 @@
     7389@@ -8226,14 +8581,14 @@
    73077390        test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
    73087391        test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
    73097392 
    73107393-       echo "$as_me:8229: checking whether to use struct dirent64" >&5
    7311 +       echo "$as_me:8583: checking whether to use struct dirent64" >&5
     7394+       echo "$as_me:8584: checking whether to use struct dirent64" >&5
    73127395 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
    73137396 if test "${cf_cv_struct_dirent64+set}" = set; then
     
    73177400                cat >conftest.$ac_ext <<_ACEOF
    73187401-#line 8236 "configure"
    7319 +#line 8590 "configure"
     7402+#line 8591 "configure"
    73207403 #include "confdefs.h"
    73217404 
    73227405 #include <sys/types.h>
    7323 @@ -8254,16 +8608,16 @@
     7406@@ -8254,16 +8609,16 @@
    73247407 }
    73257408 _ACEOF
    73267409 rm -f conftest.$ac_objext
    73277410-if { (eval echo "$as_me:8257: \"$ac_compile\"") >&5
    7328 +if { (eval echo "$as_me:8611: \"$ac_compile\"") >&5
     7411+if { (eval echo "$as_me:8612: \"$ac_compile\"") >&5
    73297412   (eval $ac_compile) 2>&5
    73307413   ac_status=$?
    73317414-  echo "$as_me:8260: \$? = $ac_status" >&5
    7332 +  echo "$as_me:8614: \$? = $ac_status" >&5
     7415+  echo "$as_me:8615: \$? = $ac_status" >&5
    73337416   (exit $ac_status); } &&
    73347417          { ac_try='test -s conftest.$ac_objext'
    73357418-  { (eval echo "$as_me:8263: \"$ac_try\"") >&5
    7336 +  { (eval echo "$as_me:8617: \"$ac_try\"") >&5
     7419+  { (eval echo "$as_me:8618: \"$ac_try\"") >&5
    73377420   (eval $ac_try) 2>&5
    73387421   ac_status=$?
    73397422-  echo "$as_me:8266: \$? = $ac_status" >&5
    7340 +  echo "$as_me:8620: \$? = $ac_status" >&5
     7423+  echo "$as_me:8621: \$? = $ac_status" >&5
    73417424   (exit $ac_status); }; }; then
    73427425   cf_cv_struct_dirent64=yes
    73437426 else
    7344 @@ -8274,7 +8628,7 @@
     7427@@ -8274,7 +8629,7 @@
    73457428 rm -f conftest.$ac_objext conftest.$ac_ext
    73467429 
    73477430 fi
    73487431-echo "$as_me:8277: result: $cf_cv_struct_dirent64" >&5
    7349 +echo "$as_me:8631: result: $cf_cv_struct_dirent64" >&5
     7432+echo "$as_me:8632: result: $cf_cv_struct_dirent64" >&5
    73507433 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
    73517434        test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
    73527435 #define HAVE_STRUCT_DIRENT64 1
    7353 @@ -8283,7 +8637,7 @@
     7436@@ -8283,7 +8638,7 @@
    73547437     fi
    73557438 
    73567439 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
    73577440-echo "$as_me:8286: checking if you want tparm not to use X/Open fixed-parameter list" >&5
    7358 +echo "$as_me:8640: checking if you want tparm not to use X/Open fixed-parameter list" >&5
     7441+echo "$as_me:8641: checking if you want tparm not to use X/Open fixed-parameter list" >&5
    73597442 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
    73607443 
    73617444 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
    7362 @@ -8293,14 +8647,14 @@
     7445@@ -8293,14 +8648,14 @@
    73637446 else
    73647447   with_tparm_varargs=yes
    73657448 fi;
    73667449-echo "$as_me:8296: result: $with_tparm_varargs" >&5
    7367 +echo "$as_me:8650: result: $with_tparm_varargs" >&5
     7450+echo "$as_me:8651: result: $with_tparm_varargs" >&5
    73687451 echo "${ECHO_T}$with_tparm_varargs" >&6
    73697452 NCURSES_TPARM_VARARGS=0
     
    73737456 if test "$with_ticlib" != no ; then
    73747457-echo "$as_me:8303: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
    7375 +echo "$as_me:8657: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
     7458+echo "$as_me:8658: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
    73767459 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
    73777460 
    73787461 # Check whether --enable-tic-depends or --disable-tic-depends was given.
    7379 @@ -8310,14 +8664,14 @@
     7462@@ -8310,14 +8665,14 @@
    73807463 else
    73817464   with_tic_depends=yes
    73827465 fi;
    73837466-echo "$as_me:8313: result: $with_tic_depends" >&5
    7384 +echo "$as_me:8667: result: $with_tic_depends" >&5
     7467+echo "$as_me:8668: result: $with_tic_depends" >&5
    73857468 echo "${ECHO_T}$with_tic_depends" >&6
    73867469 else
     
    73907473 ###   use option --with-bool to override bool's type
    73917474-echo "$as_me:8320: checking for type of bool" >&5
    7392 +echo "$as_me:8674: checking for type of bool" >&5
     7475+echo "$as_me:8675: checking for type of bool" >&5
    73937476 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
    73947477 
    73957478 # Check whether --with-bool or --without-bool was given.
    7396 @@ -8327,10 +8681,10 @@
     7479@@ -8327,10 +8682,10 @@
    73977480 else
    73987481   NCURSES_BOOL=auto
    73997482 fi;
    74007483-echo "$as_me:8330: result: $NCURSES_BOOL" >&5
    7401 +echo "$as_me:8684: result: $NCURSES_BOOL" >&5
     7484+echo "$as_me:8685: result: $NCURSES_BOOL" >&5
    74027485 echo "${ECHO_T}$NCURSES_BOOL" >&6
    74037486 
    74047487-echo "$as_me:8333: checking for alternate terminal capabilities file" >&5
    7405 +echo "$as_me:8687: checking for alternate terminal capabilities file" >&5
     7488+echo "$as_me:8688: checking for alternate terminal capabilities file" >&5
    74067489 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
    74077490 
    74087491 # Check whether --with-caps or --without-caps was given.
    7409 @@ -8341,11 +8695,11 @@
     7492@@ -8341,11 +8696,11 @@
    74107493   TERMINFO_CAPS=Caps
    74117494 fi;
    74127495 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
    74137496-echo "$as_me:8344: result: $TERMINFO_CAPS" >&5
    7414 +echo "$as_me:8698: result: $TERMINFO_CAPS" >&5
     7497+echo "$as_me:8699: result: $TERMINFO_CAPS" >&5
    74157498 echo "${ECHO_T}$TERMINFO_CAPS" >&6
    74167499 
    74177500 ###   use option --with-chtype to override chtype's type
    74187501-echo "$as_me:8348: checking for type of chtype" >&5
    7419 +echo "$as_me:8702: checking for type of chtype" >&5
     7502+echo "$as_me:8703: checking for type of chtype" >&5
    74207503 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
    74217504 
    74227505 # Check whether --with-chtype or --without-chtype was given.
    7423 @@ -8355,11 +8709,11 @@
     7506@@ -8355,11 +8710,11 @@
    74247507 else
    74257508   NCURSES_CHTYPE=auto
    74267509 fi;
    74277510-echo "$as_me:8358: result: $NCURSES_CHTYPE" >&5
    7428 +echo "$as_me:8712: result: $NCURSES_CHTYPE" >&5
     7511+echo "$as_me:8713: result: $NCURSES_CHTYPE" >&5
    74297512 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
    74307513 
    74317514 ###   use option --with-ospeed to override ospeed's type
    74327515-echo "$as_me:8362: checking for type of ospeed" >&5
    7433 +echo "$as_me:8716: checking for type of ospeed" >&5
     7516+echo "$as_me:8717: checking for type of ospeed" >&5
    74347517 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
    74357518 
    74367519 # Check whether --with-ospeed or --without-ospeed was given.
    7437 @@ -8369,11 +8723,11 @@
     7520@@ -8369,11 +8724,11 @@
    74387521 else
    74397522   NCURSES_OSPEED=short
    74407523 fi;
    74417524-echo "$as_me:8372: result: $NCURSES_OSPEED" >&5
    7442 +echo "$as_me:8726: result: $NCURSES_OSPEED" >&5
     7525+echo "$as_me:8727: result: $NCURSES_OSPEED" >&5
    74437526 echo "${ECHO_T}$NCURSES_OSPEED" >&6
    74447527 
    74457528 ###   use option --with-mmask-t to override mmask_t's type
    74467529-echo "$as_me:8376: checking for type of mmask_t" >&5
    7447 +echo "$as_me:8730: checking for type of mmask_t" >&5
     7530+echo "$as_me:8731: checking for type of mmask_t" >&5
    74487531 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
    74497532 
    74507533 # Check whether --with-mmask-t or --without-mmask-t was given.
    7451 @@ -8383,11 +8737,11 @@
     7534@@ -8383,11 +8738,11 @@
    74527535 else
    74537536   NCURSES_MMASK_T=auto
    74547537 fi;
    74557538-echo "$as_me:8386: result: $NCURSES_MMASK_T" >&5
    7456 +echo "$as_me:8740: result: $NCURSES_MMASK_T" >&5
     7539+echo "$as_me:8741: result: $NCURSES_MMASK_T" >&5
    74577540 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
    74587541 
    74597542 ### Enable compiling-in rcs id's
    74607543-echo "$as_me:8390: checking if RCS identifiers should be compiled-in" >&5
    7461 +echo "$as_me:8744: checking if RCS identifiers should be compiled-in" >&5
     7544+echo "$as_me:8745: checking if RCS identifiers should be compiled-in" >&5
    74627545 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
    74637546 
    74647547 # Check whether --with-rcs-ids or --without-rcs-ids was given.
    7465 @@ -8397,7 +8751,7 @@
     7548@@ -8397,7 +8752,7 @@
    74667549 else
    74677550   with_rcs_ids=no
    74687551 fi;
    74697552-echo "$as_me:8400: result: $with_rcs_ids" >&5
    7470 +echo "$as_me:8754: result: $with_rcs_ids" >&5
     7553+echo "$as_me:8755: result: $with_rcs_ids" >&5
    74717554 echo "${ECHO_T}$with_rcs_ids" >&6
    74727555 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
    74737556 #define USE_RCS_IDS 1
    7474 @@ -8405,7 +8759,7 @@
     7557@@ -8405,7 +8760,7 @@
    74757558 
    74767559 ###############################################################################
    74777560 
    74787561-echo "$as_me:8408: checking format of man-pages" >&5
    7479 +echo "$as_me:8762: checking format of man-pages" >&5
     7562+echo "$as_me:8763: checking format of man-pages" >&5
    74807563 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
    74817564 
    74827565 # Check whether --with-manpage-format or --without-manpage-format was given.
    7483 @@ -8433,7 +8787,7 @@
     7566@@ -8433,7 +8788,7 @@
    74847567   cf_catonly=yes
    74857568   cf_example=date
     
    74907573     test -z "$cf_dir" && cf_dir=/usr/man
    74917574     for cf_name in $cf_dir/man*/$cf_example.[01]* $cf_dir/cat*/$cf_example.[01]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
    7492 @@ -8494,14 +8848,14 @@
     7575@@ -8494,14 +8849,14 @@
    74937576   ;;
    74947577 esac
    74957578 
    74967579-echo "$as_me:8497: result: $MANPAGE_FORMAT" >&5
    7497 +echo "$as_me:8851: result: $MANPAGE_FORMAT" >&5
     7580+echo "$as_me:8852: result: $MANPAGE_FORMAT" >&5
    74987581 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
    74997582 if test -n "$cf_unknown" ; then
    75007583-  { echo "$as_me:8500: WARNING: Unexpected manpage-format $cf_unknown" >&5
    7501 +  { echo "$as_me:8854: WARNING: Unexpected manpage-format $cf_unknown" >&5
     7584+  { echo "$as_me:8855: WARNING: Unexpected manpage-format $cf_unknown" >&5
    75027585 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
    75037586 fi
    75047587 
    75057588-echo "$as_me:8504: checking for manpage renaming" >&5
    7506 +echo "$as_me:8858: checking for manpage renaming" >&5
     7589+echo "$as_me:8859: checking for manpage renaming" >&5
    75077590 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
    75087591 
    75097592 # Check whether --with-manpage-renames or --without-manpage-renames was given.
    7510 @@ -8529,7 +8883,7 @@
     7593@@ -8529,7 +8884,7 @@
    75117594   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
    75127595     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
    75137596   elif test ! -f $MANPAGE_RENAMES ; then
    75147597-    { { echo "$as_me:8532: error: not a filename: $MANPAGE_RENAMES" >&5
    7515 +    { { echo "$as_me:8886: error: not a filename: $MANPAGE_RENAMES" >&5
     7598+    { { echo "$as_me:8887: error: not a filename: $MANPAGE_RENAMES" >&5
    75167599 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
    75177600    { (exit 1); exit 1; }; }
    75187601   fi
    7519 @@ -8543,10 +8897,10 @@
     7602@@ -8543,10 +8898,10 @@
    75207603   fi
    75217604 fi
    75227605 
    75237606-echo "$as_me:8546: result: $MANPAGE_RENAMES" >&5
    7524 +echo "$as_me:8900: result: $MANPAGE_RENAMES" >&5
     7607+echo "$as_me:8901: result: $MANPAGE_RENAMES" >&5
    75257608 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
    75267609 
    75277610-echo "$as_me:8549: checking if manpage aliases will be installed" >&5
    7528 +echo "$as_me:8903: checking if manpage aliases will be installed" >&5
     7611+echo "$as_me:8904: checking if manpage aliases will be installed" >&5
    75297612 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
    75307613 
    75317614 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
    7532 @@ -8557,7 +8911,7 @@
     7615@@ -8557,7 +8912,7 @@
    75337616   MANPAGE_ALIASES=yes
    75347617 fi;
    75357618 
    75367619-echo "$as_me:8560: result: $MANPAGE_ALIASES" >&5
    7537 +echo "$as_me:8914: result: $MANPAGE_ALIASES" >&5
     7620+echo "$as_me:8915: result: $MANPAGE_ALIASES" >&5
    75387621 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
    75397622 
    75407623 if test "$LN_S" = "ln -s"; then
    7541 @@ -8568,7 +8922,7 @@
     7624@@ -8568,7 +8923,7 @@
    75427625 
    75437626 MANPAGE_SYMLINKS=no
    75447627 if test "$MANPAGE_ALIASES" = yes ; then
    75457628-echo "$as_me:8571: checking if manpage symlinks should be used" >&5
    7546 +echo "$as_me:8925: checking if manpage symlinks should be used" >&5
     7629+echo "$as_me:8926: checking if manpage symlinks should be used" >&5
    75477630 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
    75487631 
    75497632 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
    7550 @@ -8581,17 +8935,17 @@
     7633@@ -8581,17 +8936,17 @@
    75517634 
    75527635 if test "$$cf_use_symlinks" = no; then
    75537636 if test "$MANPAGE_SYMLINKS" = yes ; then
    75547637-       { echo "$as_me:8584: WARNING: cannot make symlinks" >&5
    7555 +       { echo "$as_me:8938: WARNING: cannot make symlinks" >&5
     7638+       { echo "$as_me:8939: WARNING: cannot make symlinks" >&5
    75567639 echo "$as_me: WARNING: cannot make symlinks" >&2;}
    75577640        MANPAGE_SYMLINKS=no
     
    75607643 
    75617644-echo "$as_me:8590: result: $MANPAGE_SYMLINKS" >&5
    7562 +echo "$as_me:8944: result: $MANPAGE_SYMLINKS" >&5
     7645+echo "$as_me:8945: result: $MANPAGE_SYMLINKS" >&5
    75637646 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
    75647647 fi
    75657648 
    75667649-echo "$as_me:8594: checking for manpage tbl" >&5
    7567 +echo "$as_me:8948: checking for manpage tbl" >&5
     7650+echo "$as_me:8949: checking for manpage tbl" >&5
    75687651 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
    75697652 
    75707653 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
    7571 @@ -8602,7 +8956,7 @@
     7654@@ -8602,7 +8957,7 @@
    75727655   MANPAGE_TBL=no
    75737656 fi;
    75747657 
    75757658-echo "$as_me:8605: result: $MANPAGE_TBL" >&5
    7576 +echo "$as_me:8959: result: $MANPAGE_TBL" >&5
     7659+echo "$as_me:8960: result: $MANPAGE_TBL" >&5
    75777660 echo "${ECHO_T}$MANPAGE_TBL" >&6
    75787661 
    75797662   if test "$prefix" = "NONE" ; then
    7580 @@ -8718,7 +9072,7 @@
     7663@@ -8718,7 +9073,7 @@
    75817664                s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
    75827665 CF_EOF
     
    75877670                cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
    75887671                cf_name=`echo $cf_name|sed "$program_transform_name"`
    7589 @@ -8913,7 +9267,7 @@
     7672@@ -8913,7 +9268,7 @@
    75907673 ###############################################################################
    75917674 
    75927675 ### Note that some functions (such as const) are normally disabled anyway.
    75937676-echo "$as_me:8916: checking if you want to build with function extensions" >&5
    7594 +echo "$as_me:9270: checking if you want to build with function extensions" >&5
     7677+echo "$as_me:9271: checking if you want to build with function extensions" >&5
    75957678 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
    75967679 
    75977680 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
    7598 @@ -8923,7 +9277,7 @@
     7681@@ -8923,7 +9278,7 @@
    75997682 else
    76007683   with_ext_funcs=yes
    76017684 fi;
    76027685-echo "$as_me:8926: result: $with_ext_funcs" >&5
    7603 +echo "$as_me:9280: result: $with_ext_funcs" >&5
     7686+echo "$as_me:9281: result: $with_ext_funcs" >&5
    76047687 echo "${ECHO_T}$with_ext_funcs" >&6
    76057688 if test "$with_ext_funcs" = yes ; then
    76067689        NCURSES_EXT_FUNCS=1
    7607 @@ -8955,12 +9309,38 @@
     7690@@ -8955,12 +9310,38 @@
    76087691 #define NCURSES_EXT_FUNCS 1
    76097692 EOF
     
    76157698+fi
    76167699+
    7617 +echo "$as_me:9318: checking if you want to build with experimental SCREEN extensions" >&5
     7700+echo "$as_me:9319: checking if you want to build with experimental SCREEN extensions" >&5
    76187701+echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
    76197702+
     
    76257708+  with_sp_funcs=no
    76267709+fi;
    7627 +echo "$as_me:9328: result: $with_sp_funcs" >&5
     7710+echo "$as_me:9329: result: $with_sp_funcs" >&5
    76287711+echo "${ECHO_T}$with_sp_funcs" >&6
    76297712+if test "$with_sp_funcs" = yes ; then
     
    76417724 ###   use option --enable-const to turn on use of const beyond that in XSI.
    76427725-echo "$as_me:8963: checking for extended use of const keyword" >&5
    7643 +echo "$as_me:9343: checking for extended use of const keyword" >&5
     7726+echo "$as_me:9344: checking for extended use of const keyword" >&5
    76447727 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
    76457728 
    76467729 # Check whether --enable-const or --disable-const was given.
    7647 @@ -8970,7 +9350,7 @@
     7730@@ -8970,7 +9351,7 @@
    76487731 else
    76497732   with_ext_const=no
    76507733 fi;
    76517734-echo "$as_me:8973: result: $with_ext_const" >&5
    7652 +echo "$as_me:9353: result: $with_ext_const" >&5
     7735+echo "$as_me:9354: result: $with_ext_const" >&5
    76537736 echo "${ECHO_T}$with_ext_const" >&6
    76547737 NCURSES_CONST='/*nothing*/'
    76557738 if test "$with_ext_const" = yes ; then
    7656 @@ -8978,7 +9358,7 @@
     7739@@ -8978,7 +9359,7 @@
    76577740 fi
    76587741 
    76597742 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
    76607743-echo "$as_me:8981: checking if you want to use extended colors" >&5
    7661 +echo "$as_me:9361: checking if you want to use extended colors" >&5
     7744+echo "$as_me:9362: checking if you want to use extended colors" >&5
    76627745 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
    76637746 
    76647747 # Check whether --enable-ext-colors or --disable-ext-colors was given.
    7665 @@ -8988,12 +9368,12 @@
     7748@@ -8988,12 +9369,12 @@
    76667749 else
    76677750   with_ext_colors=no
    76687751 fi;
    76697752-echo "$as_me:8991: result: $with_ext_colors" >&5
    7670 +echo "$as_me:9371: result: $with_ext_colors" >&5
     7753+echo "$as_me:9372: result: $with_ext_colors" >&5
    76717754 echo "${ECHO_T}$with_ext_colors" >&6
    76727755 NCURSES_EXT_COLORS=0
     
    76747757        if test "$with_widec" != yes ; then
    76757758-               { { echo "$as_me:8996: error: This option applies only to wide-character library" >&5
    7676 +               { { echo "$as_me:9376: error: This option applies only to wide-character library" >&5
     7759+               { { echo "$as_me:9377: error: This option applies only to wide-character library" >&5
    76777760 echo "$as_me: error: This option applies only to wide-character library" >&2;}
    76787761    { (exit 1); exit 1; }; }
    76797762        else
    7680 @@ -9004,7 +9384,7 @@
     7763@@ -9004,7 +9385,7 @@
    76817764        5.*)
    76827765                cf_cv_rel_version=6.0
    76837766                cf_cv_abi_version=6
    76847767-               { echo "$as_me:9007: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
    7685 +               { echo "$as_me:9387: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
     7768+               { echo "$as_me:9388: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
    76867769 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
    76877770                ;;
    76887771        esac
    7689 @@ -9019,7 +9399,7 @@
     7772@@ -9019,7 +9400,7 @@
    76907773 fi
    76917774 
    76927775 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
    76937776-echo "$as_me:9022: checking if you want to use extended mouse encoding" >&5
    7694 +echo "$as_me:9402: checking if you want to use extended mouse encoding" >&5
     7777+echo "$as_me:9403: checking if you want to use extended mouse encoding" >&5
    76957778 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
    76967779 
    76977780 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
    7698 @@ -9029,7 +9409,7 @@
     7781@@ -9029,7 +9410,7 @@
    76997782 else
    77007783   with_ext_mouse=no
    77017784 fi;
    77027785-echo "$as_me:9032: result: $with_ext_mouse" >&5
    7703 +echo "$as_me:9412: result: $with_ext_mouse" >&5
     7786+echo "$as_me:9413: result: $with_ext_mouse" >&5
    77047787 echo "${ECHO_T}$with_ext_mouse" >&6
    77057788 NCURSES_MOUSE_VERSION=1
    77067789 if test "$with_ext_mouse" = yes ; then
    7707 @@ -9040,7 +9420,7 @@
     7790@@ -9040,7 +9421,7 @@
    77087791        5.*)
    77097792                cf_cv_rel_version=6.0
    77107793                cf_cv_abi_version=6
    77117794-               { echo "$as_me:9043: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
    7712 +               { echo "$as_me:9423: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
     7795+               { echo "$as_me:9424: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
    77137796 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
    77147797                ;;
    77157798        esac
    7716 @@ -9048,7 +9428,7 @@
     7799@@ -9048,7 +9429,7 @@
    77177800 
    77187801 fi
    77197802 
    77207803-echo "$as_me:9051: checking if you want \$NCURSES_NO_PADDING code" >&5
    7721 +echo "$as_me:9431: checking if you want \$NCURSES_NO_PADDING code" >&5
     7804+echo "$as_me:9432: checking if you want \$NCURSES_NO_PADDING code" >&5
    77227805 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
    77237806 
    77247807 # Check whether --enable-no-padding or --disable-no-padding was given.
    7725 @@ -9058,19 +9438,19 @@
     7808@@ -9058,19 +9439,19 @@
    77267809 else
    77277810   with_no_padding=$with_ext_funcs
    77287811 fi;
    77297812-echo "$as_me:9061: result: $with_no_padding" >&5
    7730 +echo "$as_me:9441: result: $with_no_padding" >&5
     7813+echo "$as_me:9442: result: $with_no_padding" >&5
    77317814 echo "${ECHO_T}$with_no_padding" >&6
    77327815 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
     
    77357818 
    77367819-echo "$as_me:9067: checking for ANSI C header files" >&5
    7737 +echo "$as_me:9447: checking for ANSI C header files" >&5
     7820+echo "$as_me:9448: checking for ANSI C header files" >&5
    77387821 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
    77397822 if test "${ac_cv_header_stdc+set}" = set; then
     
    77427825   cat >conftest.$ac_ext <<_ACEOF
    77437826-#line 9073 "configure"
    7744 +#line 9453 "configure"
     7827+#line 9454 "configure"
    77457828 #include "confdefs.h"
    77467829 #include <stdlib.h>
    77477830 #include <stdarg.h>
    7748 @@ -9078,13 +9458,13 @@
     7831@@ -9078,13 +9459,13 @@
    77497832 #include <float.h>
    77507833 
    77517834 _ACEOF
    77527835-if { (eval echo "$as_me:9081: \"$ac_cpp conftest.$ac_ext\"") >&5
    7753 +if { (eval echo "$as_me:9461: \"$ac_cpp conftest.$ac_ext\"") >&5
     7836+if { (eval echo "$as_me:9462: \"$ac_cpp conftest.$ac_ext\"") >&5
    77547837   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
    77557838   ac_status=$?
     
    77587841   cat conftest.err >&5
    77597842-  echo "$as_me:9087: \$? = $ac_status" >&5
    7760 +  echo "$as_me:9467: \$? = $ac_status" >&5
     7843+  echo "$as_me:9468: \$? = $ac_status" >&5
    77617844   (exit $ac_status); } >/dev/null; then
    77627845   if test -s conftest.err; then
    77637846     ac_cpp_err=$ac_c_preproc_warn_flag
    7764 @@ -9106,7 +9486,7 @@
     7847@@ -9106,7 +9487,7 @@
    77657848 if test $ac_cv_header_stdc = yes; then
    77667849   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    77677850   cat >conftest.$ac_ext <<_ACEOF
    77687851-#line 9109 "configure"
    7769 +#line 9489 "configure"
     7852+#line 9490 "configure"
    77707853 #include "confdefs.h"
    77717854 #include <string.h>
    77727855 
    7773 @@ -9124,7 +9504,7 @@
     7856@@ -9124,7 +9505,7 @@
    77747857 if test $ac_cv_header_stdc = yes; then
    77757858   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    77767859   cat >conftest.$ac_ext <<_ACEOF
    77777860-#line 9127 "configure"
    7778 +#line 9507 "configure"
     7861+#line 9508 "configure"
    77797862 #include "confdefs.h"
    77807863 #include <stdlib.h>
    77817864 
    7782 @@ -9145,7 +9525,7 @@
     7865@@ -9145,7 +9526,7 @@
    77837866   :
    77847867 else
    77857868   cat >conftest.$ac_ext <<_ACEOF
    77867869-#line 9148 "configure"
    7787 +#line 9528 "configure"
     7870+#line 9529 "configure"
    77887871 #include "confdefs.h"
    77897872 #include <ctype.h>
    77907873 #if ((' ' & 0x0FF) == 0x020)
    7791 @@ -9171,15 +9551,15 @@
     7874@@ -9171,15 +9552,15 @@
    77927875 }
    77937876 _ACEOF
    77947877 rm -f conftest$ac_exeext
    77957878-if { (eval echo "$as_me:9174: \"$ac_link\"") >&5
    7796 +if { (eval echo "$as_me:9554: \"$ac_link\"") >&5
     7879+if { (eval echo "$as_me:9555: \"$ac_link\"") >&5
    77977880   (eval $ac_link) 2>&5
    77987881   ac_status=$?
    77997882-  echo "$as_me:9177: \$? = $ac_status" >&5
    7800 +  echo "$as_me:9557: \$? = $ac_status" >&5
     7883+  echo "$as_me:9558: \$? = $ac_status" >&5
    78017884   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    78027885-  { (eval echo "$as_me:9179: \"$ac_try\"") >&5
    7803 +  { (eval echo "$as_me:9559: \"$ac_try\"") >&5
     7886+  { (eval echo "$as_me:9560: \"$ac_try\"") >&5
    78047887   (eval $ac_try) 2>&5
    78057888   ac_status=$?
    78067889-  echo "$as_me:9182: \$? = $ac_status" >&5
    7807 +  echo "$as_me:9562: \$? = $ac_status" >&5
     7890+  echo "$as_me:9563: \$? = $ac_status" >&5
    78087891   (exit $ac_status); }; }; then
    78097892   :
    78107893 else
    7811 @@ -9192,7 +9572,7 @@
     7894@@ -9192,7 +9573,7 @@
    78127895 fi
    78137896 fi
    78147897 fi
    78157898-echo "$as_me:9195: result: $ac_cv_header_stdc" >&5
    7816 +echo "$as_me:9575: result: $ac_cv_header_stdc" >&5
     7899+echo "$as_me:9576: result: $ac_cv_header_stdc" >&5
    78177900 echo "${ECHO_T}$ac_cv_header_stdc" >&6
    78187901 if test $ac_cv_header_stdc = yes; then
    78197902 
    7820 @@ -9208,28 +9588,28 @@
     7903@@ -9208,28 +9589,28 @@
    78217904                   inttypes.h stdint.h unistd.h
    78227905 do
    78237906 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
    78247907-echo "$as_me:9211: checking for $ac_header" >&5
    7825 +echo "$as_me:9591: checking for $ac_header" >&5
     7908+echo "$as_me:9592: checking for $ac_header" >&5
    78267909 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
    78277910 if eval "test \"\${$as_ac_Header+set}\" = set"; then
     
    78307913   cat >conftest.$ac_ext <<_ACEOF
    78317914-#line 9217 "configure"
    7832 +#line 9597 "configure"
     7915+#line 9598 "configure"
    78337916 #include "confdefs.h"
    78347917 $ac_includes_default
     
    78377920 rm -f conftest.$ac_objext
    78387921-if { (eval echo "$as_me:9223: \"$ac_compile\"") >&5
    7839 +if { (eval echo "$as_me:9603: \"$ac_compile\"") >&5
     7922+if { (eval echo "$as_me:9604: \"$ac_compile\"") >&5
    78407923   (eval $ac_compile) 2>&5
    78417924   ac_status=$?
    78427925-  echo "$as_me:9226: \$? = $ac_status" >&5
    7843 +  echo "$as_me:9606: \$? = $ac_status" >&5
     7926+  echo "$as_me:9607: \$? = $ac_status" >&5
    78447927   (exit $ac_status); } &&
    78457928          { ac_try='test -s conftest.$ac_objext'
    78467929-  { (eval echo "$as_me:9229: \"$ac_try\"") >&5
    7847 +  { (eval echo "$as_me:9609: \"$ac_try\"") >&5
     7930+  { (eval echo "$as_me:9610: \"$ac_try\"") >&5
    78487931   (eval $ac_try) 2>&5
    78497932   ac_status=$?
    78507933-  echo "$as_me:9232: \$? = $ac_status" >&5
    7851 +  echo "$as_me:9612: \$? = $ac_status" >&5
     7934+  echo "$as_me:9613: \$? = $ac_status" >&5
    78527935   (exit $ac_status); }; }; then
    78537936   eval "$as_ac_Header=yes"
    78547937 else
    7855 @@ -9239,7 +9619,7 @@
     7938@@ -9239,7 +9620,7 @@
    78567939 fi
    78577940 rm -f conftest.$ac_objext conftest.$ac_ext
    78587941 fi
    78597942-echo "$as_me:9242: result: `eval echo '${'$as_ac_Header'}'`" >&5
    7860 +echo "$as_me:9622: result: `eval echo '${'$as_ac_Header'}'`" >&5
     7943+echo "$as_me:9623: result: `eval echo '${'$as_ac_Header'}'`" >&5
    78617944 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
    78627945 if test `eval echo '${'$as_ac_Header'}'` = yes; then
    78637946   cat >>confdefs.h <<EOF
    7864 @@ -9249,13 +9629,13 @@
     7947@@ -9249,13 +9630,13 @@
    78657948 fi
    78667949 done
    78677950 
    78687951-echo "$as_me:9252: checking for signed char" >&5
    7869 +echo "$as_me:9632: checking for signed char" >&5
     7952+echo "$as_me:9633: checking for signed char" >&5
    78707953 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
    78717954 if test "${ac_cv_type_signed_char+set}" = set; then
     
    78747957   cat >conftest.$ac_ext <<_ACEOF
    78757958-#line 9258 "configure"
    7876 +#line 9638 "configure"
     7959+#line 9639 "configure"
    78777960 #include "confdefs.h"
    78787961 $ac_includes_default
    78797962 int
    7880 @@ -9270,16 +9650,16 @@
     7963@@ -9270,16 +9651,16 @@
    78817964 }
    78827965 _ACEOF
    78837966 rm -f conftest.$ac_objext
    78847967-if { (eval echo "$as_me:9273: \"$ac_compile\"") >&5
    7885 +if { (eval echo "$as_me:9653: \"$ac_compile\"") >&5
     7968+if { (eval echo "$as_me:9654: \"$ac_compile\"") >&5
    78867969   (eval $ac_compile) 2>&5
    78877970   ac_status=$?
    78887971-  echo "$as_me:9276: \$? = $ac_status" >&5
    7889 +  echo "$as_me:9656: \$? = $ac_status" >&5
     7972+  echo "$as_me:9657: \$? = $ac_status" >&5
    78907973   (exit $ac_status); } &&
    78917974          { ac_try='test -s conftest.$ac_objext'
    78927975-  { (eval echo "$as_me:9279: \"$ac_try\"") >&5
    7893 +  { (eval echo "$as_me:9659: \"$ac_try\"") >&5
     7976+  { (eval echo "$as_me:9660: \"$ac_try\"") >&5
    78947977   (eval $ac_try) 2>&5
    78957978   ac_status=$?
    78967979-  echo "$as_me:9282: \$? = $ac_status" >&5
    7897 +  echo "$as_me:9662: \$? = $ac_status" >&5
     7980+  echo "$as_me:9663: \$? = $ac_status" >&5
    78987981   (exit $ac_status); }; }; then
    78997982   ac_cv_type_signed_char=yes
    79007983 else
    7901 @@ -9289,10 +9669,10 @@
     7984@@ -9289,10 +9670,10 @@
    79027985 fi
    79037986 rm -f conftest.$ac_objext conftest.$ac_ext
    79047987 fi
    79057988-echo "$as_me:9292: result: $ac_cv_type_signed_char" >&5
    7906 +echo "$as_me:9672: result: $ac_cv_type_signed_char" >&5
     7989+echo "$as_me:9673: result: $ac_cv_type_signed_char" >&5
    79077990 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
    79087991 
    79097992-echo "$as_me:9295: checking size of signed char" >&5
    7910 +echo "$as_me:9675: checking size of signed char" >&5
     7993+echo "$as_me:9676: checking size of signed char" >&5
    79117994 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
    79127995 if test "${ac_cv_sizeof_signed_char+set}" = set; then
    79137996   echo $ECHO_N "(cached) $ECHO_C" >&6
    7914 @@ -9301,7 +9681,7 @@
     7997@@ -9301,7 +9682,7 @@
    79157998   if test "$cross_compiling" = yes; then
    79167999   # Depending upon the size, compute the lo and hi bounds.
    79178000 cat >conftest.$ac_ext <<_ACEOF
    79188001-#line 9304 "configure"
    7919 +#line 9684 "configure"
     8002+#line 9685 "configure"
    79208003 #include "confdefs.h"
    79218004 $ac_includes_default
    79228005 int
    7923 @@ -9313,21 +9693,21 @@
     8006@@ -9313,21 +9694,21 @@
    79248007 }
    79258008 _ACEOF
    79268009 rm -f conftest.$ac_objext
    79278010-if { (eval echo "$as_me:9316: \"$ac_compile\"") >&5
    7928 +if { (eval echo "$as_me:9696: \"$ac_compile\"") >&5
     8011+if { (eval echo "$as_me:9697: \"$ac_compile\"") >&5
    79298012   (eval $ac_compile) 2>&5
    79308013   ac_status=$?
    79318014-  echo "$as_me:9319: \$? = $ac_status" >&5
    7932 +  echo "$as_me:9699: \$? = $ac_status" >&5
     8015+  echo "$as_me:9700: \$? = $ac_status" >&5
    79338016   (exit $ac_status); } &&
    79348017          { ac_try='test -s conftest.$ac_objext'
    79358018-  { (eval echo "$as_me:9322: \"$ac_try\"") >&5
    7936 +  { (eval echo "$as_me:9702: \"$ac_try\"") >&5
     8019+  { (eval echo "$as_me:9703: \"$ac_try\"") >&5
    79378020   (eval $ac_try) 2>&5
    79388021   ac_status=$?
    79398022-  echo "$as_me:9325: \$? = $ac_status" >&5
    7940 +  echo "$as_me:9705: \$? = $ac_status" >&5
     8023+  echo "$as_me:9706: \$? = $ac_status" >&5
    79418024   (exit $ac_status); }; }; then
    79428025   ac_lo=0 ac_mid=0
     
    79448027     cat >conftest.$ac_ext <<_ACEOF
    79458028-#line 9330 "configure"
    7946 +#line 9710 "configure"
     8029+#line 9711 "configure"
    79478030 #include "confdefs.h"
    79488031 $ac_includes_default
    79498032 int
    7950 @@ -9339,16 +9719,16 @@
     8033@@ -9339,16 +9720,16 @@
    79518034 }
    79528035 _ACEOF
    79538036 rm -f conftest.$ac_objext
    79548037-if { (eval echo "$as_me:9342: \"$ac_compile\"") >&5
    7955 +if { (eval echo "$as_me:9722: \"$ac_compile\"") >&5
     8038+if { (eval echo "$as_me:9723: \"$ac_compile\"") >&5
    79568039   (eval $ac_compile) 2>&5
    79578040   ac_status=$?
    79588041-  echo "$as_me:9345: \$? = $ac_status" >&5
    7959 +  echo "$as_me:9725: \$? = $ac_status" >&5
     8042+  echo "$as_me:9726: \$? = $ac_status" >&5
    79608043   (exit $ac_status); } &&
    79618044          { ac_try='test -s conftest.$ac_objext'
    79628045-  { (eval echo "$as_me:9348: \"$ac_try\"") >&5
    7963 +  { (eval echo "$as_me:9728: \"$ac_try\"") >&5
     8046+  { (eval echo "$as_me:9729: \"$ac_try\"") >&5
    79648047   (eval $ac_try) 2>&5
    79658048   ac_status=$?
    79668049-  echo "$as_me:9351: \$? = $ac_status" >&5
    7967 +  echo "$as_me:9731: \$? = $ac_status" >&5
     8050+  echo "$as_me:9732: \$? = $ac_status" >&5
    79688051   (exit $ac_status); }; }; then
    79698052   ac_hi=$ac_mid; break
    79708053 else
    7971 @@ -9364,7 +9744,7 @@
     8054@@ -9364,7 +9745,7 @@
    79728055 ac_hi=-1 ac_mid=-1
    79738056   while :; do
    79748057     cat >conftest.$ac_ext <<_ACEOF
    79758058-#line 9367 "configure"
    7976 +#line 9747 "configure"
     8059+#line 9748 "configure"
    79778060 #include "confdefs.h"
    79788061 $ac_includes_default
    79798062 int
    7980 @@ -9376,16 +9756,16 @@
     8063@@ -9376,16 +9757,16 @@
    79818064 }
    79828065 _ACEOF
    79838066 rm -f conftest.$ac_objext
    79848067-if { (eval echo "$as_me:9379: \"$ac_compile\"") >&5
    7985 +if { (eval echo "$as_me:9759: \"$ac_compile\"") >&5
     8068+if { (eval echo "$as_me:9760: \"$ac_compile\"") >&5
    79868069   (eval $ac_compile) 2>&5
    79878070   ac_status=$?
    79888071-  echo "$as_me:9382: \$? = $ac_status" >&5
    7989 +  echo "$as_me:9762: \$? = $ac_status" >&5
     8072+  echo "$as_me:9763: \$? = $ac_status" >&5
    79908073   (exit $ac_status); } &&
    79918074          { ac_try='test -s conftest.$ac_objext'
    79928075-  { (eval echo "$as_me:9385: \"$ac_try\"") >&5
    7993 +  { (eval echo "$as_me:9765: \"$ac_try\"") >&5
     8076+  { (eval echo "$as_me:9766: \"$ac_try\"") >&5
    79948077   (eval $ac_try) 2>&5
    79958078   ac_status=$?
    79968079-  echo "$as_me:9388: \$? = $ac_status" >&5
    7997 +  echo "$as_me:9768: \$? = $ac_status" >&5
     8080+  echo "$as_me:9769: \$? = $ac_status" >&5
    79988081   (exit $ac_status); }; }; then
    79998082   ac_lo=$ac_mid; break
    80008083 else
    8001 @@ -9401,7 +9781,7 @@
     8084@@ -9401,7 +9782,7 @@
    80028085 while test "x$ac_lo" != "x$ac_hi"; do
    80038086   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
    80048087   cat >conftest.$ac_ext <<_ACEOF
    80058088-#line 9404 "configure"
    8006 +#line 9784 "configure"
     8089+#line 9785 "configure"
    80078090 #include "confdefs.h"
    80088091 $ac_includes_default
    80098092 int
    8010 @@ -9413,16 +9793,16 @@
     8093@@ -9413,16 +9794,16 @@
    80118094 }
    80128095 _ACEOF
    80138096 rm -f conftest.$ac_objext
    80148097-if { (eval echo "$as_me:9416: \"$ac_compile\"") >&5
    8015 +if { (eval echo "$as_me:9796: \"$ac_compile\"") >&5
     8098+if { (eval echo "$as_me:9797: \"$ac_compile\"") >&5
    80168099   (eval $ac_compile) 2>&5
    80178100   ac_status=$?
    80188101-  echo "$as_me:9419: \$? = $ac_status" >&5
    8019 +  echo "$as_me:9799: \$? = $ac_status" >&5
     8102+  echo "$as_me:9800: \$? = $ac_status" >&5
    80208103   (exit $ac_status); } &&
    80218104          { ac_try='test -s conftest.$ac_objext'
    80228105-  { (eval echo "$as_me:9422: \"$ac_try\"") >&5
    8023 +  { (eval echo "$as_me:9802: \"$ac_try\"") >&5
     8106+  { (eval echo "$as_me:9803: \"$ac_try\"") >&5
    80248107   (eval $ac_try) 2>&5
    80258108   ac_status=$?
    80268109-  echo "$as_me:9425: \$? = $ac_status" >&5
    8027 +  echo "$as_me:9805: \$? = $ac_status" >&5
     8110+  echo "$as_me:9806: \$? = $ac_status" >&5
    80288111   (exit $ac_status); }; }; then
    80298112   ac_hi=$ac_mid
    80308113 else
    8031 @@ -9435,12 +9815,12 @@
     8114@@ -9435,12 +9816,12 @@
    80328115 ac_cv_sizeof_signed_char=$ac_lo
    80338116 else
    80348117   if test "$cross_compiling" = yes; then
    80358118-  { { echo "$as_me:9438: error: cannot run test program while cross compiling" >&5
    8036 +  { { echo "$as_me:9818: error: cannot run test program while cross compiling" >&5
     8119+  { { echo "$as_me:9819: error: cannot run test program while cross compiling" >&5
    80378120 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
    80388121    { (exit 1); exit 1; }; }
     
    80408123   cat >conftest.$ac_ext <<_ACEOF
    80418124-#line 9443 "configure"
    8042 +#line 9823 "configure"
     8125+#line 9824 "configure"
    80438126 #include "confdefs.h"
    80448127 $ac_includes_default
    80458128 int
    8046 @@ -9456,15 +9836,15 @@
     8129@@ -9456,15 +9837,15 @@
    80478130 }
    80488131 _ACEOF
    80498132 rm -f conftest$ac_exeext
    80508133-if { (eval echo "$as_me:9459: \"$ac_link\"") >&5
    8051 +if { (eval echo "$as_me:9839: \"$ac_link\"") >&5
     8134+if { (eval echo "$as_me:9840: \"$ac_link\"") >&5
    80528135   (eval $ac_link) 2>&5
    80538136   ac_status=$?
    80548137-  echo "$as_me:9462: \$? = $ac_status" >&5
    8055 +  echo "$as_me:9842: \$? = $ac_status" >&5
     8138+  echo "$as_me:9843: \$? = $ac_status" >&5
    80568139   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    80578140-  { (eval echo "$as_me:9464: \"$ac_try\"") >&5
    8058 +  { (eval echo "$as_me:9844: \"$ac_try\"") >&5
     8141+  { (eval echo "$as_me:9845: \"$ac_try\"") >&5
    80598142   (eval $ac_try) 2>&5
    80608143   ac_status=$?
    80618144-  echo "$as_me:9467: \$? = $ac_status" >&5
    8062 +  echo "$as_me:9847: \$? = $ac_status" >&5
     8145+  echo "$as_me:9848: \$? = $ac_status" >&5
    80638146   (exit $ac_status); }; }; then
    80648147   ac_cv_sizeof_signed_char=`cat conftest.val`
    80658148 else
    8066 @@ -9480,7 +9860,7 @@
     8149@@ -9480,7 +9861,7 @@
    80678150   ac_cv_sizeof_signed_char=0
    80688151 fi
    80698152 fi
    80708153-echo "$as_me:9483: result: $ac_cv_sizeof_signed_char" >&5
    8071 +echo "$as_me:9863: result: $ac_cv_sizeof_signed_char" >&5
     8154+echo "$as_me:9864: result: $ac_cv_sizeof_signed_char" >&5
    80728155 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
    80738156 cat >>confdefs.h <<EOF
    80748157 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
    8075 @@ -9491,7 +9871,7 @@
     8158@@ -9491,7 +9872,7 @@
    80768159 else
    80778160        NCURSES_SBOOL="char"
    80788161 fi
    80798162-echo "$as_me:9494: checking if you want to use signed Boolean array in term.h" >&5
    8080 +echo "$as_me:9874: checking if you want to use signed Boolean array in term.h" >&5
     8163+echo "$as_me:9875: checking if you want to use signed Boolean array in term.h" >&5
    80818164 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
    80828165 
    80838166 # Check whether --enable-signed-char or --disable-signed-char was given.
    8084 @@ -9501,12 +9881,12 @@
     8167@@ -9501,12 +9882,12 @@
    80858168 else
    80868169   with_signed_char=no
    80878170 fi;
    80888171-echo "$as_me:9504: result: $with_signed_char" >&5
    8089 +echo "$as_me:9884: result: $with_signed_char" >&5
     8172+echo "$as_me:9885: result: $with_signed_char" >&5
    80908173 echo "${ECHO_T}$with_signed_char" >&6
    80918174 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
     
    80938176 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
    80948177-echo "$as_me:9509: checking if you want SIGWINCH handler" >&5
    8095 +echo "$as_me:9889: checking if you want SIGWINCH handler" >&5
     8178+echo "$as_me:9890: checking if you want SIGWINCH handler" >&5
    80968179 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
    80978180 
    80988181 # Check whether --enable-sigwinch or --disable-sigwinch was given.
    8099 @@ -9516,14 +9896,14 @@
     8182@@ -9516,14 +9897,14 @@
    81008183 else
    81018184   with_sigwinch=$with_ext_funcs
    81028185 fi;
    81038186-echo "$as_me:9519: result: $with_sigwinch" >&5
    8104 +echo "$as_me:9899: result: $with_sigwinch" >&5
     8187+echo "$as_me:9900: result: $with_sigwinch" >&5
    81058188 echo "${ECHO_T}$with_sigwinch" >&6
    81068189 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
     
    81108193 ###   use option --enable-tcap-names to allow user to define new capabilities
    81118194-echo "$as_me:9526: checking if you want user-definable terminal capabilities like termcap" >&5
    8112 +echo "$as_me:9906: checking if you want user-definable terminal capabilities like termcap" >&5
     8195+echo "$as_me:9907: checking if you want user-definable terminal capabilities like termcap" >&5
    81138196 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
    81148197 
    81158198 # Check whether --enable-tcap-names or --disable-tcap-names was given.
    8116 @@ -9533,7 +9913,7 @@
     8199@@ -9533,7 +9914,7 @@
    81178200 else
    81188201   with_tcap_names=$with_ext_funcs
    81198202 fi;
    81208203-echo "$as_me:9536: result: $with_tcap_names" >&5
    8121 +echo "$as_me:9916: result: $with_tcap_names" >&5
     8204+echo "$as_me:9917: result: $with_tcap_names" >&5
    81228205 echo "${ECHO_T}$with_tcap_names" >&6
    81238206 NCURSES_XNAMES=0
    81248207 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
    8125 @@ -9541,7 +9921,7 @@
     8208@@ -9541,7 +9922,7 @@
    81268209 ###############################################################################
    81278210 # These options are relatively safe to experiment with.
    81288211 
    81298212-echo "$as_me:9544: checking if you want all development code" >&5
    8130 +echo "$as_me:9924: checking if you want all development code" >&5
     8213+echo "$as_me:9925: checking if you want all development code" >&5
    81318214 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
    81328215 
    81338216 # Check whether --with-develop or --without-develop was given.
    8134 @@ -9551,11 +9931,11 @@
     8217@@ -9551,11 +9932,11 @@
    81358218 else
    81368219   with_develop=no
    81378220 fi;
    81388221-echo "$as_me:9554: result: $with_develop" >&5
    8139 +echo "$as_me:9934: result: $with_develop" >&5
     8222+echo "$as_me:9935: result: $with_develop" >&5
    81408223 echo "${ECHO_T}$with_develop" >&6
    81418224 
    81428225 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
    81438226-echo "$as_me:9558: checking if you want hard-tabs code" >&5
    8144 +echo "$as_me:9938: checking if you want hard-tabs code" >&5
     8227+echo "$as_me:9939: checking if you want hard-tabs code" >&5
    81458228 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
    81468229 
    81478230 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
    8148 @@ -9565,14 +9945,14 @@
     8231@@ -9565,14 +9946,14 @@
    81498232 else
    81508233   enable_hard_tabs=$with_develop
    81518234 fi;
    81528235-echo "$as_me:9568: result: $enable_hard_tabs" >&5
    8153 +echo "$as_me:9948: result: $enable_hard_tabs" >&5
     8236+echo "$as_me:9949: result: $enable_hard_tabs" >&5
    81548237 echo "${ECHO_T}$enable_hard_tabs" >&6
    81558238 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
     
    81598242 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
    81608243-echo "$as_me:9575: checking if you want limited support for xmc" >&5
    8161 +echo "$as_me:9955: checking if you want limited support for xmc" >&5
     8244+echo "$as_me:9956: checking if you want limited support for xmc" >&5
    81628245 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
    81638246 
    81648247 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
    8165 @@ -9582,7 +9962,7 @@
     8248@@ -9582,7 +9963,7 @@
    81668249 else
    81678250   enable_xmc_glitch=$with_develop
    81688251 fi;
    81698252-echo "$as_me:9585: result: $enable_xmc_glitch" >&5
    8170 +echo "$as_me:9965: result: $enable_xmc_glitch" >&5
     8253+echo "$as_me:9966: result: $enable_xmc_glitch" >&5
    81718254 echo "${ECHO_T}$enable_xmc_glitch" >&6
    81728255 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
    81738256 #define USE_XMC_SUPPORT 1
    8174 @@ -9591,7 +9971,7 @@
     8257@@ -9591,7 +9972,7 @@
    81758258 ###############################################################################
    81768259 # These are just experimental, probably should not be in a package:
    81778260 
    81788261-echo "$as_me:9594: checking if you do not want to assume colors are white-on-black" >&5
    8179 +echo "$as_me:9974: checking if you do not want to assume colors are white-on-black" >&5
     8262+echo "$as_me:9975: checking if you do not want to assume colors are white-on-black" >&5
    81808263 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
    81818264 
    81828265 # Check whether --enable-assumed-color or --disable-assumed-color was given.
    8183 @@ -9601,14 +9981,14 @@
     8266@@ -9601,14 +9982,14 @@
    81848267 else
    81858268   with_assumed_color=yes
    81868269 fi;
    81878270-echo "$as_me:9604: result: $with_assumed_color" >&5
    8188 +echo "$as_me:9984: result: $with_assumed_color" >&5
     8271+echo "$as_me:9985: result: $with_assumed_color" >&5
    81898272 echo "${ECHO_T}$with_assumed_color" >&6
    81908273 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
     
    81948277 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
    81958278-echo "$as_me:9611: checking if you want hashmap scrolling-optimization code" >&5
    8196 +echo "$as_me:9991: checking if you want hashmap scrolling-optimization code" >&5
     8279+echo "$as_me:9992: checking if you want hashmap scrolling-optimization code" >&5
    81978280 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
    81988281 
    81998282 # Check whether --enable-hashmap or --disable-hashmap was given.
    8200 @@ -9618,14 +9998,14 @@
     8283@@ -9618,14 +9999,14 @@
    82018284 else
    82028285   with_hashmap=yes
    82038286 fi;
    82048287-echo "$as_me:9621: result: $with_hashmap" >&5
    8205 +echo "$as_me:10001: result: $with_hashmap" >&5
     8288+echo "$as_me:10002: result: $with_hashmap" >&5
    82068289 echo "${ECHO_T}$with_hashmap" >&6
    82078290 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
     
    82118294 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
    82128295-echo "$as_me:9628: checking if you want colorfgbg code" >&5
    8213 +echo "$as_me:10008: checking if you want colorfgbg code" >&5
     8296+echo "$as_me:10009: checking if you want colorfgbg code" >&5
    82148297 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
    82158298 
    82168299 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
    8217 @@ -9635,7 +10015,7 @@
     8300@@ -9635,7 +10016,7 @@
    82188301 else
    82198302   with_colorfgbg=no
    82208303 fi;
    82218304-echo "$as_me:9638: result: $with_colorfgbg" >&5
    8222 +echo "$as_me:10018: result: $with_colorfgbg" >&5
     8305+echo "$as_me:10019: result: $with_colorfgbg" >&5
    82238306 echo "${ECHO_T}$with_colorfgbg" >&6
    82248307 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
    82258308 #define USE_COLORFGBG 1
    8226 @@ -9644,7 +10024,7 @@
     8309@@ -9644,7 +10025,7 @@
    82278310 # This is still experimental (20080329), but should ultimately be moved to
    82288311 # the script-block --with-normal, etc.
    82298312 
    82308313-echo "$as_me:9647: checking if you want to link with the pthread library" >&5
    8231 +echo "$as_me:10027: checking if you want to link with the pthread library" >&5
     8314+echo "$as_me:10028: checking if you want to link with the pthread library" >&5
    82328315 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
    82338316 
    82348317 # Check whether --with-pthread or --without-pthread was given.
    8235 @@ -9654,27 +10034,27 @@
     8318@@ -9654,27 +10035,27 @@
    82368319 else
    82378320   with_pthread=no
    82388321 fi;
    82398322-echo "$as_me:9657: result: $with_pthread" >&5
    8240 +echo "$as_me:10037: result: $with_pthread" >&5
     8323+echo "$as_me:10038: result: $with_pthread" >&5
    82418324 echo "${ECHO_T}$with_pthread" >&6
    82428325 
    82438326 if test "$with_pthread" != no ; then
    82448327-    echo "$as_me:9661: checking for pthread.h" >&5
    8245 +    echo "$as_me:10041: checking for pthread.h" >&5
     8328+    echo "$as_me:10042: checking for pthread.h" >&5
    82468329 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
    82478330 if test "${ac_cv_header_pthread_h+set}" = set; then
     
    82508333   cat >conftest.$ac_ext <<_ACEOF
    82518334-#line 9667 "configure"
    8252 +#line 10047 "configure"
     8335+#line 10048 "configure"
    82538336 #include "confdefs.h"
    82548337 #include <pthread.h>
    82558338 _ACEOF
    82568339-if { (eval echo "$as_me:9671: \"$ac_cpp conftest.$ac_ext\"") >&5
    8257 +if { (eval echo "$as_me:10051: \"$ac_cpp conftest.$ac_ext\"") >&5
     8340+if { (eval echo "$as_me:10052: \"$ac_cpp conftest.$ac_ext\"") >&5
    82588341   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
    82598342   ac_status=$?
     
    82628345   cat conftest.err >&5
    82638346-  echo "$as_me:9677: \$? = $ac_status" >&5
    8264 +  echo "$as_me:10057: \$? = $ac_status" >&5
     8347+  echo "$as_me:10058: \$? = $ac_status" >&5
    82658348   (exit $ac_status); } >/dev/null; then
    82668349   if test -s conftest.err; then
    82678350     ac_cpp_err=$ac_c_preproc_warn_flag
    8268 @@ -9693,7 +10073,7 @@
     8351@@ -9693,7 +10074,7 @@
    82698352 fi
    82708353 rm -f conftest.err conftest.$ac_ext
    82718354 fi
    82728355-echo "$as_me:9696: result: $ac_cv_header_pthread_h" >&5
    8273 +echo "$as_me:10076: result: $ac_cv_header_pthread_h" >&5
     8356+echo "$as_me:10077: result: $ac_cv_header_pthread_h" >&5
    82748357 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
    82758358 if test $ac_cv_header_pthread_h = yes; then
    82768359 
    8277 @@ -9701,12 +10081,12 @@
     8360@@ -9701,12 +10082,12 @@
    82788361 #define HAVE_PTHREADS_H 1
    82798362 EOF
    82808363 
    82818364-        echo "$as_me:9704: checking if we can link with the pthread library" >&5
    8282 +        echo "$as_me:10084: checking if we can link with the pthread library" >&5
     8365+        echo "$as_me:10085: checking if we can link with the pthread library" >&5
    82838366 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
    82848367         cf_save_LIBS="$LIBS"
     
    82868369         cat >conftest.$ac_ext <<_ACEOF
    82878370-#line 9709 "configure"
    8288 +#line 10089 "configure"
     8371+#line 10090 "configure"
    82898372 #include "confdefs.h"
    82908373 
    82918374 #include <pthread.h>
    8292 @@ -9722,16 +10102,16 @@
     8375@@ -9722,16 +10103,16 @@
    82938376 }
    82948377 _ACEOF
    82958378 rm -f conftest.$ac_objext conftest$ac_exeext
    82968379-if { (eval echo "$as_me:9725: \"$ac_link\"") >&5
    8297 +if { (eval echo "$as_me:10105: \"$ac_link\"") >&5
     8380+if { (eval echo "$as_me:10106: \"$ac_link\"") >&5
    82988381   (eval $ac_link) 2>&5
    82998382   ac_status=$?
    83008383-  echo "$as_me:9728: \$? = $ac_status" >&5
    8301 +  echo "$as_me:10108: \$? = $ac_status" >&5
     8384+  echo "$as_me:10109: \$? = $ac_status" >&5
    83028385   (exit $ac_status); } &&
    83038386          { ac_try='test -s conftest$ac_exeext'
    83048387-  { (eval echo "$as_me:9731: \"$ac_try\"") >&5
    8305 +  { (eval echo "$as_me:10111: \"$ac_try\"") >&5
     8388+  { (eval echo "$as_me:10112: \"$ac_try\"") >&5
    83068389   (eval $ac_try) 2>&5
    83078390   ac_status=$?
    83088391-  echo "$as_me:9734: \$? = $ac_status" >&5
    8309 +  echo "$as_me:10114: \$? = $ac_status" >&5
     8392+  echo "$as_me:10115: \$? = $ac_status" >&5
    83108393   (exit $ac_status); }; }; then
    83118394   with_pthread=yes
    83128395 else
    8313 @@ -9741,7 +10121,7 @@
     8396@@ -9741,7 +10122,7 @@
    83148397 fi
    83158398 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    83168399         LIBS="$cf_save_LIBS"
    83178400-        echo "$as_me:9744: result: $with_pthread" >&5
    8318 +        echo "$as_me:10124: result: $with_pthread" >&5
     8401+        echo "$as_me:10125: result: $with_pthread" >&5
    83198402 echo "${ECHO_T}$with_pthread" >&6
    83208403 
    83218404         if test "$with_pthread" = yes ; then
    8322 @@ -9751,7 +10131,7 @@
     8405@@ -9751,7 +10132,7 @@
    83238406 EOF
    83248407 
    83258408         else
    83268409-            { { echo "$as_me:9754: error: Cannot link with pthread library" >&5
    8327 +            { { echo "$as_me:10134: error: Cannot link with pthread library" >&5
     8410+            { { echo "$as_me:10135: error: Cannot link with pthread library" >&5
    83288411 echo "$as_me: error: Cannot link with pthread library" >&2;}
    83298412    { (exit 1); exit 1; }; }
    83308413         fi
    8331 @@ -9760,7 +10140,7 @@
     8414@@ -9760,7 +10141,7 @@
    83328415 
    83338416 fi
    83348417 
    83358418-echo "$as_me:9763: checking if you want to use weak-symbols for pthreads" >&5
    8336 +echo "$as_me:10143: checking if you want to use weak-symbols for pthreads" >&5
     8419+echo "$as_me:10144: checking if you want to use weak-symbols for pthreads" >&5
    83378420 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
    83388421 
    83398422 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
    8340 @@ -9770,18 +10150,18 @@
     8423@@ -9770,18 +10151,18 @@
    83418424 else
    83428425   use_weak_symbols=no
    83438426 fi;
    83448427-echo "$as_me:9773: result: $use_weak_symbols" >&5
    8345 +echo "$as_me:10153: result: $use_weak_symbols" >&5
     8428+echo "$as_me:10154: result: $use_weak_symbols" >&5
    83468429 echo "${ECHO_T}$use_weak_symbols" >&6
    83478430 if test "$use_weak_symbols" = yes ; then
    83488431 
    83498432-echo "$as_me:9777: checking if $CC supports weak symbols" >&5
    8350 +echo "$as_me:10157: checking if $CC supports weak symbols" >&5
     8433+echo "$as_me:10158: checking if $CC supports weak symbols" >&5
    83518434 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
    83528435 if test "${cf_cv_weak_symbols+set}" = set; then
     
    83568439 cat >conftest.$ac_ext <<_ACEOF
    83578440-#line 9784 "configure"
    8358 +#line 10164 "configure"
     8441+#line 10165 "configure"
    83598442 #include "confdefs.h"
    83608443 
    83618444 #include <stdio.h>
    8362 @@ -9807,16 +10187,16 @@
     8445@@ -9807,16 +10188,16 @@
    83638446 }
    83648447 _ACEOF
    83658448 rm -f conftest.$ac_objext
    83668449-if { (eval echo "$as_me:9810: \"$ac_compile\"") >&5
    8367 +if { (eval echo "$as_me:10190: \"$ac_compile\"") >&5
     8450+if { (eval echo "$as_me:10191: \"$ac_compile\"") >&5
    83688451   (eval $ac_compile) 2>&5
    83698452   ac_status=$?
    83708453-  echo "$as_me:9813: \$? = $ac_status" >&5
    8371 +  echo "$as_me:10193: \$? = $ac_status" >&5
     8454+  echo "$as_me:10194: \$? = $ac_status" >&5
    83728455   (exit $ac_status); } &&
    83738456          { ac_try='test -s conftest.$ac_objext'
    83748457-  { (eval echo "$as_me:9816: \"$ac_try\"") >&5
    8375 +  { (eval echo "$as_me:10196: \"$ac_try\"") >&5
     8458+  { (eval echo "$as_me:10197: \"$ac_try\"") >&5
    83768459   (eval $ac_try) 2>&5
    83778460   ac_status=$?
    83788461-  echo "$as_me:9819: \$? = $ac_status" >&5
    8379 +  echo "$as_me:10199: \$? = $ac_status" >&5
     8462+  echo "$as_me:10200: \$? = $ac_status" >&5
    83808463   (exit $ac_status); }; }; then
    83818464   cf_cv_weak_symbols=yes
    83828465 else
    8383 @@ -9827,7 +10207,7 @@
     8466@@ -9827,7 +10208,7 @@
    83848467 rm -f conftest.$ac_objext conftest.$ac_ext
    83858468 
    83868469 fi
    83878470-echo "$as_me:9830: result: $cf_cv_weak_symbols" >&5
    8388 +echo "$as_me:10210: result: $cf_cv_weak_symbols" >&5
     8471+echo "$as_me:10211: result: $cf_cv_weak_symbols" >&5
    83898472 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
    83908473 
    83918474 else
    8392 @@ -9857,7 +10237,7 @@
     8475@@ -9857,7 +10238,7 @@
    83938476 # opaque outside of that, so there is no --enable-opaque option.  We can use
    83948477 # this option without --with-pthreads, but this will be always set for
    83958478 # pthreads.
    83968479-echo "$as_me:9860: checking if you want experimental reentrant code" >&5
    8397 +echo "$as_me:10240: checking if you want experimental reentrant code" >&5
     8480+echo "$as_me:10241: checking if you want experimental reentrant code" >&5
    83988481 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
    83998482 
    84008483 # Check whether --enable-reentrant or --disable-reentrant was given.
    8401 @@ -9867,21 +10247,21 @@
     8484@@ -9867,21 +10248,21 @@
    84028485 else
    84038486   with_reentrant=no
    84048487 fi;
    84058488-echo "$as_me:9870: result: $with_reentrant" >&5
    8406 +echo "$as_me:10250: result: $with_reentrant" >&5
     8489+echo "$as_me:10251: result: $with_reentrant" >&5
    84078490 echo "${ECHO_T}$with_reentrant" >&6
    84088491 if test "$with_reentrant" = yes ; then
     
    84268509 #define USE_REENTRANT 1
    84278510 EOF
    8428 @@ -9891,7 +10271,7 @@
     8511@@ -9891,7 +10272,7 @@
    84298512        5.*)
    84308513                cf_cv_rel_version=6.0
    84318514                cf_cv_abi_version=6
    84328515-               { echo "$as_me:9894: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
    8433 +               { echo "$as_me:10274: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
     8516+               { echo "$as_me:10275: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
    84348517 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
    84358518                ;;
    84368519        esac
    8437 @@ -9904,7 +10284,29 @@
     8520@@ -9904,7 +10285,29 @@
    84388521        NCURSES_SIZE_T=short
    84398522 fi
     
    84418524-echo "$as_me:9907: checking if you want experimental safe-sprintf code" >&5
    84428525+### Allow using a different wrap-prefix
    8443 +if test "$cf_cv_enable_reentrant" != 0 ; then
    8444 +       echo "$as_me:10289: checking for prefix used to wrap public variables" >&5
     8526+if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
     8527+       echo "$as_me:10290: checking for prefix used to wrap public variables" >&5
    84458528+echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
    84468529+
     
    84528535+  NCURSES_WRAP_PREFIX=_nc_
    84538536+fi;
    8454 +       echo "$as_me:10299: result: $NCURSES_WRAP_PREFIX" >&5
     8537+       echo "$as_me:10300: result: $NCURSES_WRAP_PREFIX" >&5
    84558538+echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
    84568539+else
     
    84628545+EOF
    84638546+
    8464 +echo "$as_me:10309: checking if you want experimental safe-sprintf code" >&5
     8547+echo "$as_me:10310: checking if you want experimental safe-sprintf code" >&5
    84658548 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
    84668549 
    84678550 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
    8468 @@ -9914,7 +10316,7 @@
     8551@@ -9914,7 +10317,7 @@
    84698552 else
    84708553   with_safe_sprintf=no
    84718554 fi;
    84728555-echo "$as_me:9917: result: $with_safe_sprintf" >&5
    8473 +echo "$as_me:10319: result: $with_safe_sprintf" >&5
     8556+echo "$as_me:10320: result: $with_safe_sprintf" >&5
    84748557 echo "${ECHO_T}$with_safe_sprintf" >&6
    84758558 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
    84768559 #define USE_SAFE_SPRINTF 1
    8477 @@ -9923,7 +10325,7 @@
     8560@@ -9923,7 +10326,7 @@
    84788561 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
    84798562 # when hashmap is used scroll hints are useless
    84808563 if test "$with_hashmap" = no ; then
    84818564-echo "$as_me:9926: checking if you want to experiment without scrolling-hints code" >&5
    8482 +echo "$as_me:10328: checking if you want to experiment without scrolling-hints code" >&5
     8565+echo "$as_me:10329: checking if you want to experiment without scrolling-hints code" >&5
    84838566 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
    84848567 
    84858568 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
    8486 @@ -9933,7 +10335,7 @@
     8569@@ -9933,7 +10336,7 @@
    84878570 else
    84888571   with_scroll_hints=yes
    84898572 fi;
    84908573-echo "$as_me:9936: result: $with_scroll_hints" >&5
    8491 +echo "$as_me:10338: result: $with_scroll_hints" >&5
     8574+echo "$as_me:10339: result: $with_scroll_hints" >&5
    84928575 echo "${ECHO_T}$with_scroll_hints" >&6
    84938576 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
    84948577 #define USE_SCROLL_HINTS 1
    8495 @@ -9941,7 +10343,7 @@
     8578@@ -9941,7 +10344,7 @@
    84968579 
    84978580 fi
    84988581 
    84998582-echo "$as_me:9944: checking if you want experimental wgetch-events code" >&5
    8500 +echo "$as_me:10346: checking if you want experimental wgetch-events code" >&5
     8583+echo "$as_me:10347: checking if you want experimental wgetch-events code" >&5
    85018584 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
    85028585 
    85038586 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
    8504 @@ -9951,7 +10353,7 @@
     8587@@ -9951,7 +10354,7 @@
    85058588 else
    85068589   with_wgetch_events=no
    85078590 fi;
    85088591-echo "$as_me:9954: result: $with_wgetch_events" >&5
    8509 +echo "$as_me:10356: result: $with_wgetch_events" >&5
     8592+echo "$as_me:10357: result: $with_wgetch_events" >&5
    85108593 echo "${ECHO_T}$with_wgetch_events" >&6
    85118594 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
    85128595 #define NCURSES_WGETCH_EVENTS 1
    8513 @@ -9960,7 +10362,7 @@
     8596@@ -9960,7 +10363,7 @@
    85148597 ###############################################################################
    85158598 
    85168599 ###    use option --disable-echo to suppress full display compiling commands
    85178600-echo "$as_me:9963: checking if you want to display full commands during build" >&5
    8518 +echo "$as_me:10365: checking if you want to display full commands during build" >&5
     8601+echo "$as_me:10366: checking if you want to display full commands during build" >&5
    85198602 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
    85208603 
    85218604 # Check whether --enable-echo or --disable-echo was given.
    8522 @@ -9977,11 +10379,11 @@
     8605@@ -9977,11 +10380,11 @@
    85238606        test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
    85248607        test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
    85258608 fi
    85268609-echo "$as_me:9980: result: $with_echo" >&5
    8527 +echo "$as_me:10382: result: $with_echo" >&5
     8610+echo "$as_me:10383: result: $with_echo" >&5
    85288611 echo "${ECHO_T}$with_echo" >&6
    85298612 
    85308613 ###    use option --enable-warnings to turn on all gcc warnings
    85318614-echo "$as_me:9984: checking if you want to see compiler warnings" >&5
    8532 +echo "$as_me:10386: checking if you want to see compiler warnings" >&5
     8615+echo "$as_me:10387: checking if you want to see compiler warnings" >&5
    85338616 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
    85348617 
    85358618 # Check whether --enable-warnings or --disable-warnings was given.
    8536 @@ -9989,7 +10391,7 @@
     8619@@ -9989,7 +10392,7 @@
    85378620   enableval="$enable_warnings"
    85388621   with_warnings=$enableval
    85398622 fi;
    85408623-echo "$as_me:9992: result: $with_warnings" >&5
    8541 +echo "$as_me:10394: result: $with_warnings" >&5
     8624+echo "$as_me:10395: result: $with_warnings" >&5
    85428625 echo "${ECHO_T}$with_warnings" >&6
    85438626 
    85448627 if test "x$with_warnings" = "xyes"; then
    8545 @@ -10000,12 +10402,12 @@
     8628@@ -10000,12 +10403,12 @@
    85468629 if test "$GCC" = yes ; then
    85478630        case $host_os in
    85488631        linux*|gnu*)
    85498632-               echo "$as_me:10003: checking if this is really Intel C compiler" >&5
    8550 +               echo "$as_me:10405: checking if this is really Intel C compiler" >&5
     8633+               echo "$as_me:10406: checking if this is really Intel C compiler" >&5
    85518634 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
    85528635                cf_save_CFLAGS="$CFLAGS"
     
    85548637                cat >conftest.$ac_ext <<_ACEOF
    85558638-#line 10008 "configure"
    8556 +#line 10410 "configure"
     8639+#line 10411 "configure"
    85578640 #include "confdefs.h"
    85588641 
    85598642 int
    8560 @@ -10022,16 +10424,16 @@
     8643@@ -10022,16 +10425,16 @@
    85618644 }
    85628645 _ACEOF
    85638646 rm -f conftest.$ac_objext
    85648647-if { (eval echo "$as_me:10025: \"$ac_compile\"") >&5
    8565 +if { (eval echo "$as_me:10427: \"$ac_compile\"") >&5
     8648+if { (eval echo "$as_me:10428: \"$ac_compile\"") >&5
    85668649   (eval $ac_compile) 2>&5
    85678650   ac_status=$?
    85688651-  echo "$as_me:10028: \$? = $ac_status" >&5
    8569 +  echo "$as_me:10430: \$? = $ac_status" >&5
     8652+  echo "$as_me:10431: \$? = $ac_status" >&5
    85708653   (exit $ac_status); } &&
    85718654          { ac_try='test -s conftest.$ac_objext'
    85728655-  { (eval echo "$as_me:10031: \"$ac_try\"") >&5
    8573 +  { (eval echo "$as_me:10433: \"$ac_try\"") >&5
     8656+  { (eval echo "$as_me:10434: \"$ac_try\"") >&5
    85748657   (eval $ac_try) 2>&5
    85758658   ac_status=$?
    85768659-  echo "$as_me:10034: \$? = $ac_status" >&5
    8577 +  echo "$as_me:10436: \$? = $ac_status" >&5
     8660+  echo "$as_me:10437: \$? = $ac_status" >&5
    85788661   (exit $ac_status); }; }; then
    85798662   INTEL_COMPILER=yes
    85808663 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
    8581 @@ -10042,14 +10444,14 @@
     8664@@ -10042,14 +10445,14 @@
    85828665 fi
    85838666 rm -f conftest.$ac_objext conftest.$ac_ext
    85848667                CFLAGS="$cf_save_CFLAGS"
    85858668-               echo "$as_me:10045: result: $INTEL_COMPILER" >&5
    8586 +               echo "$as_me:10447: result: $INTEL_COMPILER" >&5
     8669+               echo "$as_me:10448: result: $INTEL_COMPILER" >&5
    85878670 echo "${ECHO_T}$INTEL_COMPILER" >&6
    85888671                ;;
     
    85928675 cat > conftest.$ac_ext <<EOF
    85938676-#line 10052 "${as_me-configure}"
    8594 +#line 10454 "${as_me-configure}"
     8677+#line 10455 "${as_me-configure}"
    85958678 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
    85968679 EOF
    85978680 
    8598 @@ -10057,7 +10459,6 @@
     8681@@ -10057,7 +10460,6 @@
    85998682 then
    86008683 # The "-wdXXX" options suppress warnings:
     
    86048687 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
    86058688 # remark #193: zero used for undefined preprocessing identifier
    8606 @@ -10065,31 +10466,30 @@
     8689@@ -10065,31 +10467,30 @@
    86078690 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
    86088691 # remark #869: parameter "tw" was never referenced
     
    86128695 
    86138696-       { echo "$as_me:10070: checking for $CC warning options..." >&5
    8614 +       { echo "$as_me:10471: checking for $CC warning options..." >&5
     8697+       { echo "$as_me:10472: checking for $CC warning options..." >&5
    86158698 echo "$as_me: checking for $CC warning options..." >&6;}
    86168699        cf_save_CFLAGS="$CFLAGS"
     
    86318714                CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
    86328715-               if { (eval echo "$as_me:10087: \"$ac_compile\"") >&5
    8633 +               if { (eval echo "$as_me:10487: \"$ac_compile\"") >&5
     8716+               if { (eval echo "$as_me:10488: \"$ac_compile\"") >&5
    86348717   (eval $ac_compile) 2>&5
    86358718   ac_status=$?
    86368719-  echo "$as_me:10090: \$? = $ac_status" >&5
    8637 +  echo "$as_me:10490: \$? = $ac_status" >&5
     8720+  echo "$as_me:10491: \$? = $ac_status" >&5
    86388721   (exit $ac_status); }; then
    86398722-                       test -n "$verbose" && echo "$as_me:10092: result: ... -$cf_opt" >&5
    8640 +                       test -n "$verbose" && echo "$as_me:10492: result: ... -$cf_opt" >&5
     8723+                       test -n "$verbose" && echo "$as_me:10493: result: ... -$cf_opt" >&5
    86418724 echo "${ECHO_T}... -$cf_opt" >&6
    86428725                        EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
    86438726                fi
    8644 @@ -10098,7 +10498,7 @@
     8727@@ -10098,7 +10499,7 @@
    86458728 
    86468729 elif test "$GCC" = yes
    86478730 then
    86488731-       { echo "$as_me:10101: checking for $CC warning options..." >&5
    8649 +       { echo "$as_me:10501: checking for $CC warning options..." >&5
     8732+       { echo "$as_me:10502: checking for $CC warning options..." >&5
    86508733 echo "$as_me: checking for $CC warning options..." >&6;}
    86518734        cf_save_CFLAGS="$CFLAGS"
    86528735        EXTRA_CFLAGS="-W -Wall"
    8653 @@ -10118,12 +10518,12 @@
     8736@@ -10118,12 +10519,12 @@
    86548737                Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
    86558738        do
    86568739                CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
    86578740-               if { (eval echo "$as_me:10121: \"$ac_compile\"") >&5
    8658 +               if { (eval echo "$as_me:10521: \"$ac_compile\"") >&5
     8741+               if { (eval echo "$as_me:10522: \"$ac_compile\"") >&5
    86598742   (eval $ac_compile) 2>&5
    86608743   ac_status=$?
    86618744-  echo "$as_me:10124: \$? = $ac_status" >&5
    8662 +  echo "$as_me:10524: \$? = $ac_status" >&5
     8745+  echo "$as_me:10525: \$? = $ac_status" >&5
    86638746   (exit $ac_status); }; then
    86648747-                       test -n "$verbose" && echo "$as_me:10126: result: ... -$cf_opt" >&5
    8665 +                       test -n "$verbose" && echo "$as_me:10526: result: ... -$cf_opt" >&5
     8748+                       test -n "$verbose" && echo "$as_me:10527: result: ... -$cf_opt" >&5
    86668749 echo "${ECHO_T}... -$cf_opt" >&6
    86678750                        case $cf_opt in #(vi
    86688751                        Wcast-qual) #(vi
    8669 @@ -10134,7 +10534,7 @@
     8752@@ -10134,7 +10535,7 @@
    86708753                                [34].*)
    86718754                                        test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
    86728755 
    86738756-echo "${as_me-configure}:10137: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
    8674 +echo "${as_me-configure}:10537: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
     8757+echo "${as_me-configure}:10538: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
    86758758 
    86768759                                        continue;;
    86778760                                esac
    8678 @@ -10154,12 +10554,12 @@
     8761@@ -10154,12 +10555,12 @@
    86798762 if test "$GCC" = yes ; then
    86808763        case $host_os in
    86818764        linux*|gnu*)
    86828765-               echo "$as_me:10157: checking if this is really Intel C++ compiler" >&5
    8683 +               echo "$as_me:10557: checking if this is really Intel C++ compiler" >&5
     8766+               echo "$as_me:10558: checking if this is really Intel C++ compiler" >&5
    86848767 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
    86858768                cf_save_CFLAGS="$CXXFLAGS"
     
    86878770                cat >conftest.$ac_ext <<_ACEOF
    86888771-#line 10162 "configure"
    8689 +#line 10562 "configure"
     8772+#line 10563 "configure"
    86908773 #include "confdefs.h"
    86918774 
    86928775 int
    8693 @@ -10176,16 +10576,16 @@
     8776@@ -10176,16 +10577,16 @@
    86948777 }
    86958778 _ACEOF
    86968779 rm -f conftest.$ac_objext
    86978780-if { (eval echo "$as_me:10179: \"$ac_compile\"") >&5
    8698 +if { (eval echo "$as_me:10579: \"$ac_compile\"") >&5
     8781+if { (eval echo "$as_me:10580: \"$ac_compile\"") >&5
    86998782   (eval $ac_compile) 2>&5
    87008783   ac_status=$?
    87018784-  echo "$as_me:10182: \$? = $ac_status" >&5
    8702 +  echo "$as_me:10582: \$? = $ac_status" >&5
     8785+  echo "$as_me:10583: \$? = $ac_status" >&5
    87038786   (exit $ac_status); } &&
    87048787          { ac_try='test -s conftest.$ac_objext'
    87058788-  { (eval echo "$as_me:10185: \"$ac_try\"") >&5
    8706 +  { (eval echo "$as_me:10585: \"$ac_try\"") >&5
     8789+  { (eval echo "$as_me:10586: \"$ac_try\"") >&5
    87078790   (eval $ac_try) 2>&5
    87088791   ac_status=$?
    87098792-  echo "$as_me:10188: \$? = $ac_status" >&5
    8710 +  echo "$as_me:10588: \$? = $ac_status" >&5
     8793+  echo "$as_me:10589: \$? = $ac_status" >&5
    87118794   (exit $ac_status); }; }; then
    87128795   INTEL_CPLUSPLUS=yes
    87138796 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
    8714 @@ -10196,7 +10596,7 @@
     8797@@ -10196,7 +10597,7 @@
    87158798 fi
    87168799 rm -f conftest.$ac_objext conftest.$ac_ext
    87178800                CXXFLAGS="$cf_save_CFLAGS"
    87188801-               echo "$as_me:10199: result: $INTEL_CPLUSPLUS" >&5
    8719 +               echo "$as_me:10599: result: $INTEL_CPLUSPLUS" >&5
     8802+               echo "$as_me:10600: result: $INTEL_CPLUSPLUS" >&5
    87208803 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
    87218804                ;;
    87228805        esac
    8723 @@ -10210,7 +10610,7 @@
     8806@@ -10210,7 +10611,7 @@
    87248807 ac_main_return=return
    87258808 
    87268809 cat > conftest.$ac_ext <<EOF
    87278810-#line 10213 "configure"
    8728 +#line 10613 "configure"
     8811+#line 10614 "configure"
    87298812 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
    87308813 EOF
    87318814 
    8732 @@ -10228,7 +10628,7 @@
     8815@@ -10228,7 +10629,7 @@
    87338816 # remark #981: operands are evaluated in unspecified order
    87348817 # warning #269: invalid format string conversion
    87358818 
    87368819-       { echo "$as_me:10231: checking for $CC warning options..." >&5
    8737 +       { echo "$as_me:10631: checking for $CC warning options..." >&5
     8820+       { echo "$as_me:10632: checking for $CC warning options..." >&5
    87388821 echo "$as_me: checking for $CC warning options..." >&6;}
    87398822        cf_save_CXXFLAGS="$CXXFLAGS"
    87408823        EXTRA_CXXFLAGS="-Wall"
    8741 @@ -10245,12 +10645,12 @@
     8824@@ -10245,12 +10646,12 @@
    87428825                wd981
    87438826        do
    87448827                CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
    87458828-               if { (eval echo "$as_me:10248: \"$ac_compile\"") >&5
    8746 +               if { (eval echo "$as_me:10648: \"$ac_compile\"") >&5
     8829+               if { (eval echo "$as_me:10649: \"$ac_compile\"") >&5
    87478830   (eval $ac_compile) 2>&5
    87488831   ac_status=$?
    87498832-  echo "$as_me:10251: \$? = $ac_status" >&5
    8750 +  echo "$as_me:10651: \$? = $ac_status" >&5
     8833+  echo "$as_me:10652: \$? = $ac_status" >&5
    87518834   (exit $ac_status); }; then
    87528835-                       test -n "$verbose" && echo "$as_me:10253: result: ... -$cf_opt" >&5
    8753 +                       test -n "$verbose" && echo "$as_me:10653: result: ... -$cf_opt" >&5
     8836+                       test -n "$verbose" && echo "$as_me:10654: result: ... -$cf_opt" >&5
    87548837 echo "${ECHO_T}... -$cf_opt" >&6
    87558838                        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
    87568839                fi
    8757 @@ -10259,7 +10659,7 @@
     8840@@ -10259,7 +10660,7 @@
    87588841 
    87598842 elif test "$GXX" = yes
    87608843 then
    87618844-       { echo "$as_me:10262: checking for $CXX warning options..." >&5
    8762 +       { echo "$as_me:10662: checking for $CXX warning options..." >&5
     8845+       { echo "$as_me:10663: checking for $CXX warning options..." >&5
    87638846 echo "$as_me: checking for $CXX warning options..." >&6;}
    87648847        cf_save_CXXFLAGS="$CXXFLAGS"
    87658848        EXTRA_CXXFLAGS="-W -Wall"
    8766 @@ -10288,16 +10688,16 @@
     8849@@ -10288,16 +10689,16 @@
    87678850                Wundef $cf_gxx_extra_warnings Wno-unused
    87688851        do
    87698852                CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
    87708853-               if { (eval echo "$as_me:10291: \"$ac_compile\"") >&5
    8771 +               if { (eval echo "$as_me:10691: \"$ac_compile\"") >&5
     8854+               if { (eval echo "$as_me:10692: \"$ac_compile\"") >&5
    87728855   (eval $ac_compile) 2>&5
    87738856   ac_status=$?
    87748857-  echo "$as_me:10294: \$? = $ac_status" >&5
    8775 +  echo "$as_me:10694: \$? = $ac_status" >&5
     8858+  echo "$as_me:10695: \$? = $ac_status" >&5
    87768859   (exit $ac_status); }; then
    87778860-                       test -n "$verbose" && echo "$as_me:10296: result: ... -$cf_opt" >&5
    8778 +                       test -n "$verbose" && echo "$as_me:10696: result: ... -$cf_opt" >&5
     8861+                       test -n "$verbose" && echo "$as_me:10697: result: ... -$cf_opt" >&5
    87798862 echo "${ECHO_T}... -$cf_opt" >&6
    87808863                        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
    87818864                else
    87828865-                       test -n "$verbose" && echo "$as_me:10300: result: ... no -$cf_opt" >&5
    8783 +                       test -n "$verbose" && echo "$as_me:10700: result: ... no -$cf_opt" >&5
     8866+                       test -n "$verbose" && echo "$as_me:10701: result: ... no -$cf_opt" >&5
    87848867 echo "${ECHO_T}... no -$cf_opt" >&6
    87858868                fi
    87868869        done
    8787 @@ -10333,10 +10733,10 @@
     8870@@ -10333,10 +10734,10 @@
    87888871 EOF
    87898872 if test "$GCC" = yes
    87908873 then
    87918874-       { echo "$as_me:10336: checking for $CC __attribute__ directives..." >&5
    8792 +       { echo "$as_me:10736: checking for $CC __attribute__ directives..." >&5
     8875+       { echo "$as_me:10737: checking for $CC __attribute__ directives..." >&5
    87938876 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
    87948877 cat > conftest.$ac_ext <<EOF
    87958878-#line 10339 "${as_me-configure}"
    8796 +#line 10739 "${as_me-configure}"
     8879+#line 10740 "${as_me-configure}"
    87978880 #include "confdefs.h"
    87988881 #include "conftest.h"
    87998882 #include "conftest.i"
    8800 @@ -10374,12 +10774,12 @@
     8883@@ -10374,12 +10775,12 @@
    88018884 EOF
    88028885                        ;;
    88038886                esac
    88048887-               if { (eval echo "$as_me:10377: \"$ac_compile\"") >&5
    8805 +               if { (eval echo "$as_me:10777: \"$ac_compile\"") >&5
     8888+               if { (eval echo "$as_me:10778: \"$ac_compile\"") >&5
    88068889   (eval $ac_compile) 2>&5
    88078890   ac_status=$?
    88088891-  echo "$as_me:10380: \$? = $ac_status" >&5
    8809 +  echo "$as_me:10780: \$? = $ac_status" >&5
     8892+  echo "$as_me:10781: \$? = $ac_status" >&5
    88108893   (exit $ac_status); }; then
    88118894-                       test -n "$verbose" && echo "$as_me:10382: result: ... $cf_attribute" >&5
    8812 +                       test -n "$verbose" && echo "$as_me:10782: result: ... $cf_attribute" >&5
     8895+                       test -n "$verbose" && echo "$as_me:10783: result: ... $cf_attribute" >&5
    88138896 echo "${ECHO_T}... $cf_attribute" >&6
    88148897                        cat conftest.h >>confdefs.h
    88158898                fi
    8816 @@ -10391,7 +10791,7 @@
     8899@@ -10391,7 +10792,7 @@
    88178900 fi
    88188901 
    88198902 ###    use option --enable-assertions to turn on generation of assertion code
    88208903-echo "$as_me:10394: checking if you want to enable runtime assertions" >&5
    8821 +echo "$as_me:10794: checking if you want to enable runtime assertions" >&5
     8904+echo "$as_me:10795: checking if you want to enable runtime assertions" >&5
    88228905 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
    88238906 
    88248907 # Check whether --enable-assertions or --disable-assertions was given.
    8825 @@ -10401,7 +10801,7 @@
     8908@@ -10401,7 +10802,7 @@
    88268909 else
    88278910   with_assertions=no
    88288911 fi;
    88298912-echo "$as_me:10404: result: $with_assertions" >&5
    8830 +echo "$as_me:10804: result: $with_assertions" >&5
     8913+echo "$as_me:10805: result: $with_assertions" >&5
    88318914 echo "${ECHO_T}$with_assertions" >&6
    88328915 if test -n "$GCC"
    88338916 then
    8834 @@ -10419,7 +10819,7 @@
     8917@@ -10419,7 +10820,7 @@
    88358918 
    88368919 ###    use option --disable-leaks to suppress "permanent" leaks, for testing
    88378920 
    88388921-echo "$as_me:10422: checking if you want to use dmalloc for testing" >&5
    8839 +echo "$as_me:10822: checking if you want to use dmalloc for testing" >&5
     8922+echo "$as_me:10823: checking if you want to use dmalloc for testing" >&5
    88408923 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
    88418924 
    88428925 # Check whether --with-dmalloc or --without-dmalloc was given.
    8843 @@ -10435,7 +10835,7 @@
     8926@@ -10435,7 +10836,7 @@
    88448927 else
    88458928   with_dmalloc=
    88468929 fi;
    88478930-echo "$as_me:10438: result: ${with_dmalloc:-no}" >&5
    8848 +echo "$as_me:10838: result: ${with_dmalloc:-no}" >&5
     8931+echo "$as_me:10839: result: ${with_dmalloc:-no}" >&5
    88498932 echo "${ECHO_T}${with_dmalloc:-no}" >&6
    88508933 
    88518934 case .$with_cflags in #(vi
    8852 @@ -10505,7 +10905,7 @@
     8935@@ -10505,7 +10906,7 @@
    88538936 
    88548937 if test -n "$cf_new_cppflags" ; then
     
    88598942 
    88608943 if test -n "$cf_new_extra_cppflags" ; then
    8861 @@ -10519,23 +10919,23 @@
     8944@@ -10519,23 +10920,23 @@
    88628945 esac
    88638946 
    88648947 if test "$with_dmalloc" = yes ; then
    88658948-       echo "$as_me:10522: checking for dmalloc.h" >&5
    8866 +       echo "$as_me:10922: checking for dmalloc.h" >&5
     8949+       echo "$as_me:10923: checking for dmalloc.h" >&5
    88678950 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
    88688951 if test "${ac_cv_header_dmalloc_h+set}" = set; then
     
    88718954   cat >conftest.$ac_ext <<_ACEOF
    88728955-#line 10528 "configure"
    8873 +#line 10928 "configure"
     8956+#line 10929 "configure"
    88748957 #include "confdefs.h"
    88758958 #include <dmalloc.h>
    88768959 _ACEOF
    88778960-if { (eval echo "$as_me:10532: \"$ac_cpp conftest.$ac_ext\"") >&5
    8878 +if { (eval echo "$as_me:10932: \"$ac_cpp conftest.$ac_ext\"") >&5
     8961+if { (eval echo "$as_me:10933: \"$ac_cpp conftest.$ac_ext\"") >&5
    88798962   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
    88808963   ac_status=$?
     
    88838966   cat conftest.err >&5
    88848967-  echo "$as_me:10538: \$? = $ac_status" >&5
    8885 +  echo "$as_me:10938: \$? = $ac_status" >&5
     8968+  echo "$as_me:10939: \$? = $ac_status" >&5
    88868969   (exit $ac_status); } >/dev/null; then
    88878970   if test -s conftest.err; then
    88888971     ac_cpp_err=$ac_c_preproc_warn_flag
    8889 @@ -10554,11 +10954,11 @@
     8972@@ -10554,11 +10955,11 @@
    88908973 fi
    88918974 rm -f conftest.err conftest.$ac_ext
    88928975 fi
    88938976-echo "$as_me:10557: result: $ac_cv_header_dmalloc_h" >&5
    8894 +echo "$as_me:10957: result: $ac_cv_header_dmalloc_h" >&5
     8977+echo "$as_me:10958: result: $ac_cv_header_dmalloc_h" >&5
    88958978 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
    88968979 if test $ac_cv_header_dmalloc_h = yes; then
    88978980 
    88988981-echo "$as_me:10561: checking for dmalloc_debug in -ldmalloc" >&5
    8899 +echo "$as_me:10961: checking for dmalloc_debug in -ldmalloc" >&5
     8982+echo "$as_me:10962: checking for dmalloc_debug in -ldmalloc" >&5
    89008983 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
    89018984 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
    89028985   echo $ECHO_N "(cached) $ECHO_C" >&6
    8903 @@ -10566,7 +10966,7 @@
     8986@@ -10566,7 +10967,7 @@
    89048987   ac_check_lib_save_LIBS=$LIBS
    89058988 LIBS="-ldmalloc  $LIBS"
    89068989 cat >conftest.$ac_ext <<_ACEOF
    89078990-#line 10569 "configure"
    8908 +#line 10969 "configure"
     8991+#line 10970 "configure"
    89098992 #include "confdefs.h"
    89108993 
    89118994 /* Override any gcc2 internal prototype to avoid an error.  */
    8912 @@ -10585,16 +10985,16 @@
     8995@@ -10585,16 +10986,16 @@
    89138996 }
    89148997 _ACEOF
    89158998 rm -f conftest.$ac_objext conftest$ac_exeext
    89168999-if { (eval echo "$as_me:10588: \"$ac_link\"") >&5
    8917 +if { (eval echo "$as_me:10988: \"$ac_link\"") >&5
     9000+if { (eval echo "$as_me:10989: \"$ac_link\"") >&5
    89189001   (eval $ac_link) 2>&5
    89199002   ac_status=$?
    89209003-  echo "$as_me:10591: \$? = $ac_status" >&5
    8921 +  echo "$as_me:10991: \$? = $ac_status" >&5
     9004+  echo "$as_me:10992: \$? = $ac_status" >&5
    89229005   (exit $ac_status); } &&
    89239006          { ac_try='test -s conftest$ac_exeext'
    89249007-  { (eval echo "$as_me:10594: \"$ac_try\"") >&5
    8925 +  { (eval echo "$as_me:10994: \"$ac_try\"") >&5
     9008+  { (eval echo "$as_me:10995: \"$ac_try\"") >&5
    89269009   (eval $ac_try) 2>&5
    89279010   ac_status=$?
    89289011-  echo "$as_me:10597: \$? = $ac_status" >&5
    8929 +  echo "$as_me:10997: \$? = $ac_status" >&5
     9012+  echo "$as_me:10998: \$? = $ac_status" >&5
    89309013   (exit $ac_status); }; }; then
    89319014   ac_cv_lib_dmalloc_dmalloc_debug=yes
    89329015 else
    8933 @@ -10605,7 +11005,7 @@
     9016@@ -10605,7 +11006,7 @@
    89349017 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    89359018 LIBS=$ac_check_lib_save_LIBS
    89369019 fi
    89379020-echo "$as_me:10608: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
    8938 +echo "$as_me:11008: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
     9021+echo "$as_me:11009: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
    89399022 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
    89409023 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
    89419024   cat >>confdefs.h <<EOF
    8942 @@ -10620,7 +11020,7 @@
     9025@@ -10620,7 +11021,7 @@
    89439026 
    89449027 fi
    89459028 
    89469029-echo "$as_me:10623: checking if you want to use dbmalloc for testing" >&5
    8947 +echo "$as_me:11023: checking if you want to use dbmalloc for testing" >&5
     9030+echo "$as_me:11024: checking if you want to use dbmalloc for testing" >&5
    89489031 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
    89499032 
    89509033 # Check whether --with-dbmalloc or --without-dbmalloc was given.
    8951 @@ -10636,7 +11036,7 @@
     9034@@ -10636,7 +11037,7 @@
    89529035 else
    89539036   with_dbmalloc=
    89549037 fi;
    89559038-echo "$as_me:10639: result: ${with_dbmalloc:-no}" >&5
    8956 +echo "$as_me:11039: result: ${with_dbmalloc:-no}" >&5
     9039+echo "$as_me:11040: result: ${with_dbmalloc:-no}" >&5
    89579040 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
    89589041 
    89599042 case .$with_cflags in #(vi
    8960 @@ -10706,7 +11106,7 @@
     9043@@ -10706,7 +11107,7 @@
    89619044 
    89629045 if test -n "$cf_new_cppflags" ; then
     
    89679050 
    89689051 if test -n "$cf_new_extra_cppflags" ; then
    8969 @@ -10720,23 +11120,23 @@
     9052@@ -10720,23 +11121,23 @@
    89709053 esac
    89719054 
    89729055 if test "$with_dbmalloc" = yes ; then
    89739056-       echo "$as_me:10723: checking for dbmalloc.h" >&5
    8974 +       echo "$as_me:11123: checking for dbmalloc.h" >&5
     9057+       echo "$as_me:11124: checking for dbmalloc.h" >&5
    89759058 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
    89769059 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
     
    89799062   cat >conftest.$ac_ext <<_ACEOF
    89809063-#line 10729 "configure"
    8981 +#line 11129 "configure"
     9064+#line 11130 "configure"
    89829065 #include "confdefs.h"
    89839066 #include <dbmalloc.h>
    89849067 _ACEOF
    89859068-if { (eval echo "$as_me:10733: \"$ac_cpp conftest.$ac_ext\"") >&5
    8986 +if { (eval echo "$as_me:11133: \"$ac_cpp conftest.$ac_ext\"") >&5
     9069+if { (eval echo "$as_me:11134: \"$ac_cpp conftest.$ac_ext\"") >&5
    89879070   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
    89889071   ac_status=$?
     
    89919074   cat conftest.err >&5
    89929075-  echo "$as_me:10739: \$? = $ac_status" >&5
    8993 +  echo "$as_me:11139: \$? = $ac_status" >&5
     9076+  echo "$as_me:11140: \$? = $ac_status" >&5
    89949077   (exit $ac_status); } >/dev/null; then
    89959078   if test -s conftest.err; then
    89969079     ac_cpp_err=$ac_c_preproc_warn_flag
    8997 @@ -10755,11 +11155,11 @@
     9080@@ -10755,11 +11156,11 @@
    89989081 fi
    89999082 rm -f conftest.err conftest.$ac_ext
    90009083 fi
    90019084-echo "$as_me:10758: result: $ac_cv_header_dbmalloc_h" >&5
    9002 +echo "$as_me:11158: result: $ac_cv_header_dbmalloc_h" >&5
     9085+echo "$as_me:11159: result: $ac_cv_header_dbmalloc_h" >&5
    90039086 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
    90049087 if test $ac_cv_header_dbmalloc_h = yes; then
    90059088 
    90069089-echo "$as_me:10762: checking for debug_malloc in -ldbmalloc" >&5
    9007 +echo "$as_me:11162: checking for debug_malloc in -ldbmalloc" >&5
     9090+echo "$as_me:11163: checking for debug_malloc in -ldbmalloc" >&5
    90089091 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
    90099092 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
    90109093   echo $ECHO_N "(cached) $ECHO_C" >&6
    9011 @@ -10767,7 +11167,7 @@
     9094@@ -10767,7 +11168,7 @@
    90129095   ac_check_lib_save_LIBS=$LIBS
    90139096 LIBS="-ldbmalloc  $LIBS"
    90149097 cat >conftest.$ac_ext <<_ACEOF
    90159098-#line 10770 "configure"
    9016 +#line 11170 "configure"
     9099+#line 11171 "configure"
    90179100 #include "confdefs.h"
    90189101 
    90199102 /* Override any gcc2 internal prototype to avoid an error.  */
    9020 @@ -10786,16 +11186,16 @@
     9103@@ -10786,16 +11187,16 @@
    90219104 }
    90229105 _ACEOF
    90239106 rm -f conftest.$ac_objext conftest$ac_exeext
    90249107-if { (eval echo "$as_me:10789: \"$ac_link\"") >&5
    9025 +if { (eval echo "$as_me:11189: \"$ac_link\"") >&5
     9108+if { (eval echo "$as_me:11190: \"$ac_link\"") >&5
    90269109   (eval $ac_link) 2>&5
    90279110   ac_status=$?
    90289111-  echo "$as_me:10792: \$? = $ac_status" >&5
    9029 +  echo "$as_me:11192: \$? = $ac_status" >&5
     9112+  echo "$as_me:11193: \$? = $ac_status" >&5
    90309113   (exit $ac_status); } &&
    90319114          { ac_try='test -s conftest$ac_exeext'
    90329115-  { (eval echo "$as_me:10795: \"$ac_try\"") >&5
    9033 +  { (eval echo "$as_me:11195: \"$ac_try\"") >&5
     9116+  { (eval echo "$as_me:11196: \"$ac_try\"") >&5
    90349117   (eval $ac_try) 2>&5
    90359118   ac_status=$?
    90369119-  echo "$as_me:10798: \$? = $ac_status" >&5
    9037 +  echo "$as_me:11198: \$? = $ac_status" >&5
     9120+  echo "$as_me:11199: \$? = $ac_status" >&5
    90389121   (exit $ac_status); }; }; then
    90399122   ac_cv_lib_dbmalloc_debug_malloc=yes
    90409123 else
    9041 @@ -10806,7 +11206,7 @@
     9124@@ -10806,7 +11207,7 @@
    90429125 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    90439126 LIBS=$ac_check_lib_save_LIBS
    90449127 fi
    90459128-echo "$as_me:10809: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
    9046 +echo "$as_me:11209: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
     9129+echo "$as_me:11210: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
    90479130 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
    90489131 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
    90499132   cat >>confdefs.h <<EOF
    9050 @@ -10821,7 +11221,7 @@
     9133@@ -10821,7 +11222,7 @@
    90519134 
    90529135 fi
    90539136 
    90549137-echo "$as_me:10824: checking if you want to use valgrind for testing" >&5
    9055 +echo "$as_me:11224: checking if you want to use valgrind for testing" >&5
     9138+echo "$as_me:11225: checking if you want to use valgrind for testing" >&5
    90569139 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
    90579140 
    90589141 # Check whether --with-valgrind or --without-valgrind was given.
    9059 @@ -10837,7 +11237,7 @@
     9142@@ -10837,7 +11238,7 @@
    90609143 else
    90619144   with_valgrind=
    90629145 fi;
    90639146-echo "$as_me:10840: result: ${with_valgrind:-no}" >&5
    9064 +echo "$as_me:11240: result: ${with_valgrind:-no}" >&5
     9147+echo "$as_me:11241: result: ${with_valgrind:-no}" >&5
    90659148 echo "${ECHO_T}${with_valgrind:-no}" >&6
    90669149 
    90679150 case .$with_cflags in #(vi
    9068 @@ -10907,7 +11307,7 @@
     9151@@ -10907,7 +11308,7 @@
    90699152 
    90709153 if test -n "$cf_new_cppflags" ; then
     
    90759158 
    90769159 if test -n "$cf_new_extra_cppflags" ; then
    9077 @@ -10920,7 +11320,7 @@
     9160@@ -10920,7 +11321,7 @@
    90789161        ;;
    90799162 esac
    90809163 
    90819164-echo "$as_me:10923: checking if you want to perform memory-leak testing" >&5
    9082 +echo "$as_me:11323: checking if you want to perform memory-leak testing" >&5
     9165+echo "$as_me:11324: checking if you want to perform memory-leak testing" >&5
    90839166 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
    90849167 
    90859168 # Check whether --enable-leaks or --disable-leaks was given.
    9086 @@ -10930,7 +11330,7 @@
     9169@@ -10930,7 +11331,7 @@
    90879170 else
    90889171   : ${with_no_leaks:=no}
    90899172 fi;
    90909173-echo "$as_me:10933: result: $with_no_leaks" >&5
    9091 +echo "$as_me:11333: result: $with_no_leaks" >&5
     9174+echo "$as_me:11334: result: $with_no_leaks" >&5
    90929175 echo "${ECHO_T}$with_no_leaks" >&6
    90939176 
    90949177 if test "$with_no_leaks" = yes ; then
    9095 @@ -10975,7 +11375,7 @@
     9178@@ -10975,7 +11376,7 @@
    90969179        ;;
    90979180 esac
    90989181 
    90999182-echo "$as_me:10978: checking whether to add trace feature to all models" >&5
    9100 +echo "$as_me:11378: checking whether to add trace feature to all models" >&5
     9183+echo "$as_me:11379: checking whether to add trace feature to all models" >&5
    91019184 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
    91029185 
    91039186 # Check whether --with-trace or --without-trace was given.
    9104 @@ -10985,7 +11385,7 @@
     9187@@ -10985,7 +11386,7 @@
    91059188 else
    91069189   cf_with_trace=$cf_all_traces
    91079190 fi;
    91089191-echo "$as_me:10988: result: $cf_with_trace" >&5
    9109 +echo "$as_me:11388: result: $cf_with_trace" >&5
     9192+echo "$as_me:11389: result: $cf_with_trace" >&5
    91109193 echo "${ECHO_T}$cf_with_trace" >&6
    91119194 
    91129195 if test "$cf_with_trace" = yes ; then
    9113 @@ -11052,7 +11452,7 @@
     9196@@ -11052,7 +11453,7 @@
    91149197 
    91159198 if test -n "$cf_new_cppflags" ; then
     
    91209203 
    91219204 if test -n "$cf_new_extra_cppflags" ; then
    9122 @@ -11066,13 +11466,17 @@
     9205@@ -11066,13 +11467,17 @@
    91239206 fi
    91249207 
     
    91299212+       ;;
    91309213+*)
    9131 +echo "$as_me:11473: checking for gettimeofday" >&5
     9214+echo "$as_me:11474: checking for gettimeofday" >&5
    91329215 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
    91339216 if test "${ac_cv_func_gettimeofday+set}" = set; then
     
    91369219   cat >conftest.$ac_ext <<_ACEOF
    91379220-#line 11075 "configure"
    9138 +#line 11479 "configure"
     9221+#line 11480 "configure"
    91399222 #include "confdefs.h"
    91409223 /* System header to define __stub macros and hopefully few prototypes,
    91419224     which can conflict with char gettimeofday (); below.  */
    9142 @@ -11103,16 +11507,16 @@
     9225@@ -11103,16 +11508,16 @@
    91439226 }
    91449227 _ACEOF
    91459228 rm -f conftest.$ac_objext conftest$ac_exeext
    91469229-if { (eval echo "$as_me:11106: \"$ac_link\"") >&5
    9147 +if { (eval echo "$as_me:11510: \"$ac_link\"") >&5
     9230+if { (eval echo "$as_me:11511: \"$ac_link\"") >&5
    91489231   (eval $ac_link) 2>&5
    91499232   ac_status=$?
    91509233-  echo "$as_me:11109: \$? = $ac_status" >&5
    9151 +  echo "$as_me:11513: \$? = $ac_status" >&5
     9234+  echo "$as_me:11514: \$? = $ac_status" >&5
    91529235   (exit $ac_status); } &&
    91539236          { ac_try='test -s conftest$ac_exeext'
    91549237-  { (eval echo "$as_me:11112: \"$ac_try\"") >&5
    9155 +  { (eval echo "$as_me:11516: \"$ac_try\"") >&5
     9238+  { (eval echo "$as_me:11517: \"$ac_try\"") >&5
    91569239   (eval $ac_try) 2>&5
    91579240   ac_status=$?
    91589241-  echo "$as_me:11115: \$? = $ac_status" >&5
    9159 +  echo "$as_me:11519: \$? = $ac_status" >&5
     9242+  echo "$as_me:11520: \$? = $ac_status" >&5
    91609243   (exit $ac_status); }; }; then
    91619244   ac_cv_func_gettimeofday=yes
    91629245 else
    9163 @@ -11122,7 +11526,7 @@
     9246@@ -11122,7 +11527,7 @@
    91649247 fi
    91659248 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    91669249 fi
    91679250-echo "$as_me:11125: result: $ac_cv_func_gettimeofday" >&5
    9168 +echo "$as_me:11529: result: $ac_cv_func_gettimeofday" >&5
     9251+echo "$as_me:11530: result: $ac_cv_func_gettimeofday" >&5
    91699252 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
    91709253 if test $ac_cv_func_gettimeofday = yes; then
    91719254   cat >>confdefs.h <<\EOF
    9172 @@ -11131,7 +11535,7 @@
     9255@@ -11131,7 +11536,7 @@
    91739256 
    91749257 else
    91759258 
    91769259-echo "$as_me:11134: checking for gettimeofday in -lbsd" >&5
    9177 +echo "$as_me:11538: checking for gettimeofday in -lbsd" >&5
     9260+echo "$as_me:11539: checking for gettimeofday in -lbsd" >&5
    91789261 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
    91799262 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
    91809263   echo $ECHO_N "(cached) $ECHO_C" >&6
    9181 @@ -11139,7 +11543,7 @@
     9264@@ -11139,7 +11544,7 @@
    91829265   ac_check_lib_save_LIBS=$LIBS
    91839266 LIBS="-lbsd  $LIBS"
    91849267 cat >conftest.$ac_ext <<_ACEOF
    91859268-#line 11142 "configure"
    9186 +#line 11546 "configure"
     9269+#line 11547 "configure"
    91879270 #include "confdefs.h"
    91889271 
    91899272 /* Override any gcc2 internal prototype to avoid an error.  */
    9190 @@ -11158,16 +11562,16 @@
     9273@@ -11158,16 +11563,16 @@
    91919274 }
    91929275 _ACEOF
    91939276 rm -f conftest.$ac_objext conftest$ac_exeext
    91949277-if { (eval echo "$as_me:11161: \"$ac_link\"") >&5
    9195 +if { (eval echo "$as_me:11565: \"$ac_link\"") >&5
     9278+if { (eval echo "$as_me:11566: \"$ac_link\"") >&5
    91969279   (eval $ac_link) 2>&5
    91979280   ac_status=$?
    91989281-  echo "$as_me:11164: \$? = $ac_status" >&5
    9199 +  echo "$as_me:11568: \$? = $ac_status" >&5
     9282+  echo "$as_me:11569: \$? = $ac_status" >&5
    92009283   (exit $ac_status); } &&
    92019284          { ac_try='test -s conftest$ac_exeext'
    92029285-  { (eval echo "$as_me:11167: \"$ac_try\"") >&5
    9203 +  { (eval echo "$as_me:11571: \"$ac_try\"") >&5
     9286+  { (eval echo "$as_me:11572: \"$ac_try\"") >&5
    92049287   (eval $ac_try) 2>&5
    92059288   ac_status=$?
    92069289-  echo "$as_me:11170: \$? = $ac_status" >&5
    9207 +  echo "$as_me:11574: \$? = $ac_status" >&5
     9290+  echo "$as_me:11575: \$? = $ac_status" >&5
    92089291   (exit $ac_status); }; }; then
    92099292   ac_cv_lib_bsd_gettimeofday=yes
    92109293 else
    9211 @@ -11178,7 +11582,7 @@
     9294@@ -11178,7 +11583,7 @@
    92129295 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    92139296 LIBS=$ac_check_lib_save_LIBS
    92149297 fi
    92159298-echo "$as_me:11181: result: $ac_cv_lib_bsd_gettimeofday" >&5
    9216 +echo "$as_me:11585: result: $ac_cv_lib_bsd_gettimeofday" >&5
     9299+echo "$as_me:11586: result: $ac_cv_lib_bsd_gettimeofday" >&5
    92179300 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
    92189301 if test $ac_cv_lib_bsd_gettimeofday = yes; then
    92199302   cat >>confdefs.h <<\EOF
    9220 @@ -11189,15 +11593,17 @@
     9303@@ -11189,15 +11594,17 @@
    92219304 fi
    92229305 
     
    92269309 
    92279310-echo "$as_me:11193: checking if -lm needed for math functions" >&5
    9228 +echo "$as_me:11599: checking if -lm needed for math functions" >&5
     9311+echo "$as_me:11600: checking if -lm needed for math functions" >&5
    92299312 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
    92309313 if test "${cf_cv_need_libm+set}" = set; then
     
    92349317        cat >conftest.$ac_ext <<_ACEOF
    92359318-#line 11200 "configure"
    9236 +#line 11606 "configure"
     9319+#line 11607 "configure"
    92379320 #include "confdefs.h"
    92389321 
    92399322        #include <stdio.h>
    9240 @@ -11212,16 +11618,16 @@
     9323@@ -11212,16 +11619,16 @@
    92419324 }
    92429325 _ACEOF
    92439326 rm -f conftest.$ac_objext conftest$ac_exeext
    92449327-if { (eval echo "$as_me:11215: \"$ac_link\"") >&5
    9245 +if { (eval echo "$as_me:11621: \"$ac_link\"") >&5
     9328+if { (eval echo "$as_me:11622: \"$ac_link\"") >&5
    92469329   (eval $ac_link) 2>&5
    92479330   ac_status=$?
    92489331-  echo "$as_me:11218: \$? = $ac_status" >&5
    9249 +  echo "$as_me:11624: \$? = $ac_status" >&5
     9332+  echo "$as_me:11625: \$? = $ac_status" >&5
    92509333   (exit $ac_status); } &&
    92519334          { ac_try='test -s conftest$ac_exeext'
    92529335-  { (eval echo "$as_me:11221: \"$ac_try\"") >&5
    9253 +  { (eval echo "$as_me:11627: \"$ac_try\"") >&5
     9336+  { (eval echo "$as_me:11628: \"$ac_try\"") >&5
    92549337   (eval $ac_try) 2>&5
    92559338   ac_status=$?
    92569339-  echo "$as_me:11224: \$? = $ac_status" >&5
    9257 +  echo "$as_me:11630: \$? = $ac_status" >&5
     9340+  echo "$as_me:11631: \$? = $ac_status" >&5
    92589341   (exit $ac_status); }; }; then
    92599342   cf_cv_need_libm=no
    92609343 else
    9261 @@ -11231,7 +11637,7 @@
     9344@@ -11231,7 +11638,7 @@
    92629345 fi
    92639346 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    92649347 fi
    92659348-echo "$as_me:11234: result: $cf_cv_need_libm" >&5
    9266 +echo "$as_me:11640: result: $cf_cv_need_libm" >&5
     9349+echo "$as_me:11641: result: $cf_cv_need_libm" >&5
    92679350 echo "${ECHO_T}$cf_cv_need_libm" >&6
    92689351 if test "$cf_cv_need_libm" = yes
    92699352 then
    9270 @@ -11239,13 +11645,13 @@
     9353@@ -11239,13 +11646,13 @@
    92719354 fi
    92729355 
    92739356 ###    Checks for header files.
    92749357-echo "$as_me:11242: checking for ANSI C header files" >&5
    9275 +echo "$as_me:11648: checking for ANSI C header files" >&5
     9358+echo "$as_me:11649: checking for ANSI C header files" >&5
    92769359 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
    92779360 if test "${ac_cv_header_stdc+set}" = set; then
     
    92809363   cat >conftest.$ac_ext <<_ACEOF
    92819364-#line 11248 "configure"
    9282 +#line 11654 "configure"
     9365+#line 11655 "configure"
    92839366 #include "confdefs.h"
    92849367 #include <stdlib.h>
    92859368 #include <stdarg.h>
    9286 @@ -11253,13 +11659,13 @@
     9369@@ -11253,13 +11660,13 @@
    92879370 #include <float.h>
    92889371 
    92899372 _ACEOF
    92909373-if { (eval echo "$as_me:11256: \"$ac_cpp conftest.$ac_ext\"") >&5
    9291 +if { (eval echo "$as_me:11662: \"$ac_cpp conftest.$ac_ext\"") >&5
     9374+if { (eval echo "$as_me:11663: \"$ac_cpp conftest.$ac_ext\"") >&5
    92929375   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
    92939376   ac_status=$?
     
    92969379   cat conftest.err >&5
    92979380-  echo "$as_me:11262: \$? = $ac_status" >&5
    9298 +  echo "$as_me:11668: \$? = $ac_status" >&5
     9381+  echo "$as_me:11669: \$? = $ac_status" >&5
    92999382   (exit $ac_status); } >/dev/null; then
    93009383   if test -s conftest.err; then
    93019384     ac_cpp_err=$ac_c_preproc_warn_flag
    9302 @@ -11281,7 +11687,7 @@
     9385@@ -11281,7 +11688,7 @@
    93039386 if test $ac_cv_header_stdc = yes; then
    93049387   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    93059388   cat >conftest.$ac_ext <<_ACEOF
    93069389-#line 11284 "configure"
    9307 +#line 11690 "configure"
     9390+#line 11691 "configure"
    93089391 #include "confdefs.h"
    93099392 #include <string.h>
    93109393 
    9311 @@ -11299,7 +11705,7 @@
     9394@@ -11299,7 +11706,7 @@
    93129395 if test $ac_cv_header_stdc = yes; then
    93139396   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    93149397   cat >conftest.$ac_ext <<_ACEOF
    93159398-#line 11302 "configure"
    9316 +#line 11708 "configure"
     9399+#line 11709 "configure"
    93179400 #include "confdefs.h"
    93189401 #include <stdlib.h>
    93199402 
    9320 @@ -11320,7 +11726,7 @@
     9403@@ -11320,7 +11727,7 @@
    93219404   :
    93229405 else
    93239406   cat >conftest.$ac_ext <<_ACEOF
    93249407-#line 11323 "configure"
    9325 +#line 11729 "configure"
     9408+#line 11730 "configure"
    93269409 #include "confdefs.h"
    93279410 #include <ctype.h>
    93289411 #if ((' ' & 0x0FF) == 0x020)
    9329 @@ -11346,15 +11752,15 @@
     9412@@ -11346,15 +11753,15 @@
    93309413 }
    93319414 _ACEOF
    93329415 rm -f conftest$ac_exeext
    93339416-if { (eval echo "$as_me:11349: \"$ac_link\"") >&5
    9334 +if { (eval echo "$as_me:11755: \"$ac_link\"") >&5
     9417+if { (eval echo "$as_me:11756: \"$ac_link\"") >&5
    93359418   (eval $ac_link) 2>&5
    93369419   ac_status=$?
    93379420-  echo "$as_me:11352: \$? = $ac_status" >&5
    9338 +  echo "$as_me:11758: \$? = $ac_status" >&5
     9421+  echo "$as_me:11759: \$? = $ac_status" >&5
    93399422   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    93409423-  { (eval echo "$as_me:11354: \"$ac_try\"") >&5
    9341 +  { (eval echo "$as_me:11760: \"$ac_try\"") >&5
     9424+  { (eval echo "$as_me:11761: \"$ac_try\"") >&5
    93429425   (eval $ac_try) 2>&5
    93439426   ac_status=$?
    93449427-  echo "$as_me:11357: \$? = $ac_status" >&5
    9345 +  echo "$as_me:11763: \$? = $ac_status" >&5
     9428+  echo "$as_me:11764: \$? = $ac_status" >&5
    93469429   (exit $ac_status); }; }; then
    93479430   :
    93489431 else
    9349 @@ -11367,7 +11773,7 @@
     9432@@ -11367,7 +11774,7 @@
    93509433 fi
    93519434 fi
    93529435 fi
    93539436-echo "$as_me:11370: result: $ac_cv_header_stdc" >&5
    9354 +echo "$as_me:11776: result: $ac_cv_header_stdc" >&5
     9437+echo "$as_me:11777: result: $ac_cv_header_stdc" >&5
    93559438 echo "${ECHO_T}$ac_cv_header_stdc" >&6
    93569439 if test $ac_cv_header_stdc = yes; then
    93579440 
    9358 @@ -11380,13 +11786,13 @@
     9441@@ -11380,13 +11787,13 @@
    93599442 ac_header_dirent=no
    93609443 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
    93619444   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
    93629445-echo "$as_me:11383: checking for $ac_hdr that defines DIR" >&5
    9363 +echo "$as_me:11789: checking for $ac_hdr that defines DIR" >&5
     9446+echo "$as_me:11790: checking for $ac_hdr that defines DIR" >&5
    93649447 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
    93659448 if eval "test \"\${$as_ac_Header+set}\" = set"; then
     
    93689451   cat >conftest.$ac_ext <<_ACEOF
    93699452-#line 11389 "configure"
    9370 +#line 11795 "configure"
     9453+#line 11796 "configure"
    93719454 #include "confdefs.h"
    93729455 #include <sys/types.h>
    93739456 #include <$ac_hdr>
    9374 @@ -11401,16 +11807,16 @@
     9457@@ -11401,16 +11808,16 @@
    93759458 }
    93769459 _ACEOF
    93779460 rm -f conftest.$ac_objext
    93789461-if { (eval echo "$as_me:11404: \"$ac_compile\"") >&5
    9379 +if { (eval echo "$as_me:11810: \"$ac_compile\"") >&5
     9462+if { (eval echo "$as_me:11811: \"$ac_compile\"") >&5
    93809463   (eval $ac_compile) 2>&5
    93819464   ac_status=$?
    93829465-  echo "$as_me:11407: \$? = $ac_status" >&5
    9383 +  echo "$as_me:11813: \$? = $ac_status" >&5
     9466+  echo "$as_me:11814: \$? = $ac_status" >&5
    93849467   (exit $ac_status); } &&
    93859468          { ac_try='test -s conftest.$ac_objext'
    93869469-  { (eval echo "$as_me:11410: \"$ac_try\"") >&5
    9387 +  { (eval echo "$as_me:11816: \"$ac_try\"") >&5
     9470+  { (eval echo "$as_me:11817: \"$ac_try\"") >&5
    93889471   (eval $ac_try) 2>&5
    93899472   ac_status=$?
    93909473-  echo "$as_me:11413: \$? = $ac_status" >&5
    9391 +  echo "$as_me:11819: \$? = $ac_status" >&5
     9474+  echo "$as_me:11820: \$? = $ac_status" >&5
    93929475   (exit $ac_status); }; }; then
    93939476   eval "$as_ac_Header=yes"
    93949477 else
    9395 @@ -11420,7 +11826,7 @@
     9478@@ -11420,7 +11827,7 @@
    93969479 fi
    93979480 rm -f conftest.$ac_objext conftest.$ac_ext
    93989481 fi
    93999482-echo "$as_me:11423: result: `eval echo '${'$as_ac_Header'}'`" >&5
    9400 +echo "$as_me:11829: result: `eval echo '${'$as_ac_Header'}'`" >&5
     9483+echo "$as_me:11830: result: `eval echo '${'$as_ac_Header'}'`" >&5
    94019484 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
    94029485 if test `eval echo '${'$as_ac_Header'}'` = yes; then
    94039486   cat >>confdefs.h <<EOF
    9404 @@ -11433,7 +11839,7 @@
     9487@@ -11433,7 +11840,7 @@
    94059488 done
    94069489 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
    94079490 if test $ac_header_dirent = dirent.h; then
    94089491-  echo "$as_me:11436: checking for opendir in -ldir" >&5
    9409 +  echo "$as_me:11842: checking for opendir in -ldir" >&5
     9492+  echo "$as_me:11843: checking for opendir in -ldir" >&5
    94109493 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
    94119494 if test "${ac_cv_lib_dir_opendir+set}" = set; then
    94129495   echo $ECHO_N "(cached) $ECHO_C" >&6
    9413 @@ -11441,7 +11847,7 @@
     9496@@ -11441,7 +11848,7 @@
    94149497   ac_check_lib_save_LIBS=$LIBS
    94159498 LIBS="-ldir  $LIBS"
    94169499 cat >conftest.$ac_ext <<_ACEOF
    94179500-#line 11444 "configure"
    9418 +#line 11850 "configure"
     9501+#line 11851 "configure"
    94199502 #include "confdefs.h"
    94209503 
    94219504 /* Override any gcc2 internal prototype to avoid an error.  */
    9422 @@ -11460,16 +11866,16 @@
     9505@@ -11460,16 +11867,16 @@
    94239506 }
    94249507 _ACEOF
    94259508 rm -f conftest.$ac_objext conftest$ac_exeext
    94269509-if { (eval echo "$as_me:11463: \"$ac_link\"") >&5
    9427 +if { (eval echo "$as_me:11869: \"$ac_link\"") >&5
     9510+if { (eval echo "$as_me:11870: \"$ac_link\"") >&5
    94289511   (eval $ac_link) 2>&5
    94299512   ac_status=$?
    94309513-  echo "$as_me:11466: \$? = $ac_status" >&5
    9431 +  echo "$as_me:11872: \$? = $ac_status" >&5
     9514+  echo "$as_me:11873: \$? = $ac_status" >&5
    94329515   (exit $ac_status); } &&
    94339516          { ac_try='test -s conftest$ac_exeext'
    94349517-  { (eval echo "$as_me:11469: \"$ac_try\"") >&5
    9435 +  { (eval echo "$as_me:11875: \"$ac_try\"") >&5
     9518+  { (eval echo "$as_me:11876: \"$ac_try\"") >&5
    94369519   (eval $ac_try) 2>&5
    94379520   ac_status=$?
    94389521-  echo "$as_me:11472: \$? = $ac_status" >&5
    9439 +  echo "$as_me:11878: \$? = $ac_status" >&5
     9522+  echo "$as_me:11879: \$? = $ac_status" >&5
    94409523   (exit $ac_status); }; }; then
    94419524   ac_cv_lib_dir_opendir=yes
    94429525 else
    9443 @@ -11480,14 +11886,14 @@
     9526@@ -11480,14 +11887,14 @@
    94449527 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    94459528 LIBS=$ac_check_lib_save_LIBS
    94469529 fi
    94479530-echo "$as_me:11483: result: $ac_cv_lib_dir_opendir" >&5
    9448 +echo "$as_me:11889: result: $ac_cv_lib_dir_opendir" >&5
     9531+echo "$as_me:11890: result: $ac_cv_lib_dir_opendir" >&5
    94499532 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
    94509533 if test $ac_cv_lib_dir_opendir = yes; then
     
    94549537 else
    94559538-  echo "$as_me:11490: checking for opendir in -lx" >&5
    9456 +  echo "$as_me:11896: checking for opendir in -lx" >&5
     9539+  echo "$as_me:11897: checking for opendir in -lx" >&5
    94579540 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
    94589541 if test "${ac_cv_lib_x_opendir+set}" = set; then
    94599542   echo $ECHO_N "(cached) $ECHO_C" >&6
    9460 @@ -11495,7 +11901,7 @@
     9543@@ -11495,7 +11902,7 @@
    94619544   ac_check_lib_save_LIBS=$LIBS
    94629545 LIBS="-lx  $LIBS"
    94639546 cat >conftest.$ac_ext <<_ACEOF
    94649547-#line 11498 "configure"
    9465 +#line 11904 "configure"
     9548+#line 11905 "configure"
    94669549 #include "confdefs.h"
    94679550 
    94689551 /* Override any gcc2 internal prototype to avoid an error.  */
    9469 @@ -11514,16 +11920,16 @@
     9552@@ -11514,16 +11921,16 @@
    94709553 }
    94719554 _ACEOF
    94729555 rm -f conftest.$ac_objext conftest$ac_exeext
    94739556-if { (eval echo "$as_me:11517: \"$ac_link\"") >&5
    9474 +if { (eval echo "$as_me:11923: \"$ac_link\"") >&5
     9557+if { (eval echo "$as_me:11924: \"$ac_link\"") >&5
    94759558   (eval $ac_link) 2>&5
    94769559   ac_status=$?
    94779560-  echo "$as_me:11520: \$? = $ac_status" >&5
    9478 +  echo "$as_me:11926: \$? = $ac_status" >&5
     9561+  echo "$as_me:11927: \$? = $ac_status" >&5
    94799562   (exit $ac_status); } &&
    94809563          { ac_try='test -s conftest$ac_exeext'
    94819564-  { (eval echo "$as_me:11523: \"$ac_try\"") >&5
    9482 +  { (eval echo "$as_me:11929: \"$ac_try\"") >&5
     9565+  { (eval echo "$as_me:11930: \"$ac_try\"") >&5
    94839566   (eval $ac_try) 2>&5
    94849567   ac_status=$?
    94859568-  echo "$as_me:11526: \$? = $ac_status" >&5
    9486 +  echo "$as_me:11932: \$? = $ac_status" >&5
     9569+  echo "$as_me:11933: \$? = $ac_status" >&5
    94879570   (exit $ac_status); }; }; then
    94889571   ac_cv_lib_x_opendir=yes
    94899572 else
    9490 @@ -11534,7 +11940,7 @@
     9573@@ -11534,7 +11941,7 @@
    94919574 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    94929575 LIBS=$ac_check_lib_save_LIBS
    94939576 fi
    94949577-echo "$as_me:11537: result: $ac_cv_lib_x_opendir" >&5
    9495 +echo "$as_me:11943: result: $ac_cv_lib_x_opendir" >&5
     9578+echo "$as_me:11944: result: $ac_cv_lib_x_opendir" >&5
    94969579 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
    94979580 if test $ac_cv_lib_x_opendir = yes; then
    94989581   LIBS="$LIBS -lx"
    9499 @@ -11542,13 +11948,13 @@
     9582@@ -11542,13 +11949,13 @@
    95009583 
    95019584 fi
    95029585 
    95039586-echo "$as_me:11545: checking whether time.h and sys/time.h may both be included" >&5
    9504 +echo "$as_me:11951: checking whether time.h and sys/time.h may both be included" >&5
     9587+echo "$as_me:11952: checking whether time.h and sys/time.h may both be included" >&5
    95059588 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
    95069589 if test "${ac_cv_header_time+set}" = set; then
     
    95099592   cat >conftest.$ac_ext <<_ACEOF
    95109593-#line 11551 "configure"
    9511 +#line 11957 "configure"
     9594+#line 11958 "configure"
    95129595 #include "confdefs.h"
    95139596 #include <sys/types.h>
    95149597 #include <sys/time.h>
    9515 @@ -11564,16 +11970,16 @@
     9598@@ -11564,16 +11971,16 @@
    95169599 }
    95179600 _ACEOF
    95189601 rm -f conftest.$ac_objext
    95199602-if { (eval echo "$as_me:11567: \"$ac_compile\"") >&5
    9520 +if { (eval echo "$as_me:11973: \"$ac_compile\"") >&5
     9603+if { (eval echo "$as_me:11974: \"$ac_compile\"") >&5
    95219604   (eval $ac_compile) 2>&5
    95229605   ac_status=$?
    95239606-  echo "$as_me:11570: \$? = $ac_status" >&5
    9524 +  echo "$as_me:11976: \$? = $ac_status" >&5
     9607+  echo "$as_me:11977: \$? = $ac_status" >&5
    95259608   (exit $ac_status); } &&
    95269609          { ac_try='test -s conftest.$ac_objext'
    95279610-  { (eval echo "$as_me:11573: \"$ac_try\"") >&5
    9528 +  { (eval echo "$as_me:11979: \"$ac_try\"") >&5
     9611+  { (eval echo "$as_me:11980: \"$ac_try\"") >&5
    95299612   (eval $ac_try) 2>&5
    95309613   ac_status=$?
    95319614-  echo "$as_me:11576: \$? = $ac_status" >&5
    9532 +  echo "$as_me:11982: \$? = $ac_status" >&5
     9615+  echo "$as_me:11983: \$? = $ac_status" >&5
    95339616   (exit $ac_status); }; }; then
    95349617   ac_cv_header_time=yes
    95359618 else
    9536 @@ -11583,7 +11989,7 @@
     9619@@ -11583,7 +11990,7 @@
    95379620 fi
    95389621 rm -f conftest.$ac_objext conftest.$ac_ext
    95399622 fi
    95409623-echo "$as_me:11586: result: $ac_cv_header_time" >&5
    9541 +echo "$as_me:11992: result: $ac_cv_header_time" >&5
     9624+echo "$as_me:11993: result: $ac_cv_header_time" >&5
    95429625 echo "${ECHO_T}$ac_cv_header_time" >&6
    95439626 if test $ac_cv_header_time = yes; then
    95449627 
    9545 @@ -11593,14 +11999,14 @@
     9628@@ -11593,14 +12000,14 @@
    95469629 
    95479630 fi
    95489631 
    95499632-echo "$as_me:11596: checking for regular-expression headers" >&5
    9550 +echo "$as_me:12002: checking for regular-expression headers" >&5
     9633+echo "$as_me:12003: checking for regular-expression headers" >&5
    95519634 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
    95529635 if test "${cf_cv_regex+set}" = set; then
     
    95569639 cat >conftest.$ac_ext <<_ACEOF
    95579640-#line 11603 "configure"
    9558 +#line 12009 "configure"
     9641+#line 12010 "configure"
    95599642 #include "confdefs.h"
    95609643 #include <sys/types.h>
    95619644 #include <regex.h>
    9562 @@ -11618,16 +12024,16 @@
     9645@@ -11618,16 +12025,16 @@
    95639646 }
    95649647 _ACEOF
    95659648 rm -f conftest.$ac_objext conftest$ac_exeext
    95669649-if { (eval echo "$as_me:11621: \"$ac_link\"") >&5
    9567 +if { (eval echo "$as_me:12027: \"$ac_link\"") >&5
     9650+if { (eval echo "$as_me:12028: \"$ac_link\"") >&5
    95689651   (eval $ac_link) 2>&5
    95699652   ac_status=$?
    95709653-  echo "$as_me:11624: \$? = $ac_status" >&5
    9571 +  echo "$as_me:12030: \$? = $ac_status" >&5
     9654+  echo "$as_me:12031: \$? = $ac_status" >&5
    95729655   (exit $ac_status); } &&
    95739656          { ac_try='test -s conftest$ac_exeext'
    95749657-  { (eval echo "$as_me:11627: \"$ac_try\"") >&5
    9575 +  { (eval echo "$as_me:12033: \"$ac_try\"") >&5
     9658+  { (eval echo "$as_me:12034: \"$ac_try\"") >&5
    95769659   (eval $ac_try) 2>&5
    95779660   ac_status=$?
    95789661-  echo "$as_me:11630: \$? = $ac_status" >&5
    9579 +  echo "$as_me:12036: \$? = $ac_status" >&5
     9662+  echo "$as_me:12037: \$? = $ac_status" >&5
    95809663   (exit $ac_status); }; }; then
    95819664   cf_cv_regex="regex.h"
    95829665 else
    9583 @@ -11635,7 +12041,7 @@
     9666@@ -11635,7 +12042,7 @@
    95849667 cat conftest.$ac_ext >&5
    95859668 
    95869669        cat >conftest.$ac_ext <<_ACEOF
    95879670-#line 11638 "configure"
    9588 +#line 12044 "configure"
     9671+#line 12045 "configure"
    95899672 #include "confdefs.h"
    95909673 #include <regexp.h>
    95919674 int
    9592 @@ -11650,16 +12056,16 @@
     9675@@ -11650,16 +12057,16 @@
    95939676 }
    95949677 _ACEOF
    95959678 rm -f conftest.$ac_objext conftest$ac_exeext
    95969679-if { (eval echo "$as_me:11653: \"$ac_link\"") >&5
    9597 +if { (eval echo "$as_me:12059: \"$ac_link\"") >&5
     9680+if { (eval echo "$as_me:12060: \"$ac_link\"") >&5
    95989681   (eval $ac_link) 2>&5
    95999682   ac_status=$?
    96009683-  echo "$as_me:11656: \$? = $ac_status" >&5
    9601 +  echo "$as_me:12062: \$? = $ac_status" >&5
     9684+  echo "$as_me:12063: \$? = $ac_status" >&5
    96029685   (exit $ac_status); } &&
    96039686          { ac_try='test -s conftest$ac_exeext'
    96049687-  { (eval echo "$as_me:11659: \"$ac_try\"") >&5
    9605 +  { (eval echo "$as_me:12065: \"$ac_try\"") >&5
     9688+  { (eval echo "$as_me:12066: \"$ac_try\"") >&5
    96069689   (eval $ac_try) 2>&5
    96079690   ac_status=$?
    96089691-  echo "$as_me:11662: \$? = $ac_status" >&5
    9609 +  echo "$as_me:12068: \$? = $ac_status" >&5
     9692+  echo "$as_me:12069: \$? = $ac_status" >&5
    96109693   (exit $ac_status); }; }; then
    96119694   cf_cv_regex="regexp.h"
    96129695 else
    9613 @@ -11669,7 +12075,7 @@
     9696@@ -11669,7 +12076,7 @@
    96149697                cf_save_LIBS="$LIBS"
    96159698                LIBS="-lgen $LIBS"
    96169699                cat >conftest.$ac_ext <<_ACEOF
    96179700-#line 11672 "configure"
    9618 +#line 12078 "configure"
     9701+#line 12079 "configure"
    96199702 #include "confdefs.h"
    96209703 #include <regexpr.h>
    96219704 int
    9622 @@ -11684,16 +12090,16 @@
     9705@@ -11684,16 +12091,16 @@
    96239706 }
    96249707 _ACEOF
    96259708 rm -f conftest.$ac_objext conftest$ac_exeext
    96269709-if { (eval echo "$as_me:11687: \"$ac_link\"") >&5
    9627 +if { (eval echo "$as_me:12093: \"$ac_link\"") >&5
     9710+if { (eval echo "$as_me:12094: \"$ac_link\"") >&5
    96289711   (eval $ac_link) 2>&5
    96299712   ac_status=$?
    96309713-  echo "$as_me:11690: \$? = $ac_status" >&5
    9631 +  echo "$as_me:12096: \$? = $ac_status" >&5
     9714+  echo "$as_me:12097: \$? = $ac_status" >&5
    96329715   (exit $ac_status); } &&
    96339716          { ac_try='test -s conftest$ac_exeext'
    96349717-  { (eval echo "$as_me:11693: \"$ac_try\"") >&5
    9635 +  { (eval echo "$as_me:12099: \"$ac_try\"") >&5
     9718+  { (eval echo "$as_me:12100: \"$ac_try\"") >&5
    96369719   (eval $ac_try) 2>&5
    96379720   ac_status=$?
    96389721-  echo "$as_me:11696: \$? = $ac_status" >&5
    9639 +  echo "$as_me:12102: \$? = $ac_status" >&5
     9722+  echo "$as_me:12103: \$? = $ac_status" >&5
    96409723   (exit $ac_status); }; }; then
    96419724   cf_cv_regex="regexpr.h"
    96429725 else
    9643 @@ -11709,7 +12115,7 @@
     9726@@ -11709,7 +12116,7 @@
    96449727 
    96459728 fi
    96469729 
    96479730-echo "$as_me:11712: result: $cf_cv_regex" >&5
    9648 +echo "$as_me:12118: result: $cf_cv_regex" >&5
     9731+echo "$as_me:12119: result: $cf_cv_regex" >&5
    96499732 echo "${ECHO_T}$cf_cv_regex" >&6
    96509733 case $cf_cv_regex in
    96519734        regex.h)   cat >>confdefs.h <<\EOF
    9652 @@ -11745,23 +12151,23 @@
     9735@@ -11745,23 +12152,23 @@
    96539736 
    96549737 do
    96559738 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
    96569739-echo "$as_me:11748: checking for $ac_header" >&5
    9657 +echo "$as_me:12154: checking for $ac_header" >&5
     9740+echo "$as_me:12155: checking for $ac_header" >&5
    96589741 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
    96599742 if eval "test \"\${$as_ac_Header+set}\" = set"; then
     
    96629745   cat >conftest.$ac_ext <<_ACEOF
    96639746-#line 11754 "configure"
    9664 +#line 12160 "configure"
     9747+#line 12161 "configure"
    96659748 #include "confdefs.h"
    96669749 #include <$ac_header>
    96679750 _ACEOF
    96689751-if { (eval echo "$as_me:11758: \"$ac_cpp conftest.$ac_ext\"") >&5
    9669 +if { (eval echo "$as_me:12164: \"$ac_cpp conftest.$ac_ext\"") >&5
     9752+if { (eval echo "$as_me:12165: \"$ac_cpp conftest.$ac_ext\"") >&5
    96709753   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
    96719754   ac_status=$?
     
    96749757   cat conftest.err >&5
    96759758-  echo "$as_me:11764: \$? = $ac_status" >&5
    9676 +  echo "$as_me:12170: \$? = $ac_status" >&5
     9759+  echo "$as_me:12171: \$? = $ac_status" >&5
    96779760   (exit $ac_status); } >/dev/null; then
    96789761   if test -s conftest.err; then
    96799762     ac_cpp_err=$ac_c_preproc_warn_flag
    9680 @@ -11780,7 +12186,7 @@
     9763@@ -11780,7 +12187,7 @@
    96819764 fi
    96829765 rm -f conftest.err conftest.$ac_ext
    96839766 fi
    96849767-echo "$as_me:11783: result: `eval echo '${'$as_ac_Header'}'`" >&5
    9685 +echo "$as_me:12189: result: `eval echo '${'$as_ac_Header'}'`" >&5
     9768+echo "$as_me:12190: result: `eval echo '${'$as_ac_Header'}'`" >&5
    96869769 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
    96879770 if test `eval echo '${'$as_ac_Header'}'` = yes; then
    96889771   cat >>confdefs.h <<EOF
    9689 @@ -11794,7 +12200,7 @@
     9772@@ -11794,7 +12201,7 @@
    96909773 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
    96919774 if test "$ISC" = yes ; then
    96929775 
    96939776-echo "$as_me:11797: checking for main in -lcposix" >&5
    9694 +echo "$as_me:12203: checking for main in -lcposix" >&5
     9777+echo "$as_me:12204: checking for main in -lcposix" >&5
    96959778 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
    96969779 if test "${ac_cv_lib_cposix_main+set}" = set; then
    96979780   echo $ECHO_N "(cached) $ECHO_C" >&6
    9698 @@ -11802,7 +12208,7 @@
     9781@@ -11802,7 +12209,7 @@
    96999782   ac_check_lib_save_LIBS=$LIBS
    97009783 LIBS="-lcposix  $LIBS"
    97019784 cat >conftest.$ac_ext <<_ACEOF
    97029785-#line 11805 "configure"
    9703 +#line 12211 "configure"
     9786+#line 12212 "configure"
    97049787 #include "confdefs.h"
    97059788 
    97069789 int
    9707 @@ -11814,16 +12220,16 @@
     9790@@ -11814,16 +12221,16 @@
    97089791 }
    97099792 _ACEOF
    97109793 rm -f conftest.$ac_objext conftest$ac_exeext
    97119794-if { (eval echo "$as_me:11817: \"$ac_link\"") >&5
    9712 +if { (eval echo "$as_me:12223: \"$ac_link\"") >&5
     9795+if { (eval echo "$as_me:12224: \"$ac_link\"") >&5
    97139796   (eval $ac_link) 2>&5
    97149797   ac_status=$?
    97159798-  echo "$as_me:11820: \$? = $ac_status" >&5
    9716 +  echo "$as_me:12226: \$? = $ac_status" >&5
     9799+  echo "$as_me:12227: \$? = $ac_status" >&5
    97179800   (exit $ac_status); } &&
    97189801          { ac_try='test -s conftest$ac_exeext'
    97199802-  { (eval echo "$as_me:11823: \"$ac_try\"") >&5
    9720 +  { (eval echo "$as_me:12229: \"$ac_try\"") >&5
     9803+  { (eval echo "$as_me:12230: \"$ac_try\"") >&5
    97219804   (eval $ac_try) 2>&5
    97229805   ac_status=$?
    97239806-  echo "$as_me:11826: \$? = $ac_status" >&5
    9724 +  echo "$as_me:12232: \$? = $ac_status" >&5
     9807+  echo "$as_me:12233: \$? = $ac_status" >&5
    97259808   (exit $ac_status); }; }; then
    97269809   ac_cv_lib_cposix_main=yes
    97279810 else
    9728 @@ -11834,7 +12240,7 @@
     9811@@ -11834,7 +12241,7 @@
    97299812 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    97309813 LIBS=$ac_check_lib_save_LIBS
    97319814 fi
    97329815-echo "$as_me:11837: result: $ac_cv_lib_cposix_main" >&5
    9733 +echo "$as_me:12243: result: $ac_cv_lib_cposix_main" >&5
     9816+echo "$as_me:12244: result: $ac_cv_lib_cposix_main" >&5
    97349817 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
    97359818 if test $ac_cv_lib_cposix_main = yes; then
    97369819   cat >>confdefs.h <<EOF
    9737 @@ -11845,7 +12251,7 @@
     9820@@ -11845,7 +12252,7 @@
    97389821 
    97399822 fi
    97409823 
    97419824-       echo "$as_me:11848: checking for bzero in -linet" >&5
    9742 +       echo "$as_me:12254: checking for bzero in -linet" >&5
     9825+       echo "$as_me:12255: checking for bzero in -linet" >&5
    97439826 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
    97449827 if test "${ac_cv_lib_inet_bzero+set}" = set; then
    97459828   echo $ECHO_N "(cached) $ECHO_C" >&6
    9746 @@ -11853,7 +12259,7 @@
     9829@@ -11853,7 +12260,7 @@
    97479830   ac_check_lib_save_LIBS=$LIBS
    97489831 LIBS="-linet  $LIBS"
    97499832 cat >conftest.$ac_ext <<_ACEOF
    97509833-#line 11856 "configure"
    9751 +#line 12262 "configure"
     9834+#line 12263 "configure"
    97529835 #include "confdefs.h"
    97539836 
    97549837 /* Override any gcc2 internal prototype to avoid an error.  */
    9755 @@ -11872,16 +12278,16 @@
     9838@@ -11872,16 +12279,16 @@
    97569839 }
    97579840 _ACEOF
    97589841 rm -f conftest.$ac_objext conftest$ac_exeext
    97599842-if { (eval echo "$as_me:11875: \"$ac_link\"") >&5
    9760 +if { (eval echo "$as_me:12281: \"$ac_link\"") >&5
     9843+if { (eval echo "$as_me:12282: \"$ac_link\"") >&5
    97619844   (eval $ac_link) 2>&5
    97629845   ac_status=$?
    97639846-  echo "$as_me:11878: \$? = $ac_status" >&5
    9764 +  echo "$as_me:12284: \$? = $ac_status" >&5
     9847+  echo "$as_me:12285: \$? = $ac_status" >&5
    97659848   (exit $ac_status); } &&
    97669849          { ac_try='test -s conftest$ac_exeext'
    97679850-  { (eval echo "$as_me:11881: \"$ac_try\"") >&5
    9768 +  { (eval echo "$as_me:12287: \"$ac_try\"") >&5
     9851+  { (eval echo "$as_me:12288: \"$ac_try\"") >&5
    97699852   (eval $ac_try) 2>&5
    97709853   ac_status=$?
    97719854-  echo "$as_me:11884: \$? = $ac_status" >&5
    9772 +  echo "$as_me:12290: \$? = $ac_status" >&5
     9855+  echo "$as_me:12291: \$? = $ac_status" >&5
    97739856   (exit $ac_status); }; }; then
    97749857   ac_cv_lib_inet_bzero=yes
    97759858 else
    9776 @@ -11892,21 +12298,21 @@
     9859@@ -11892,21 +12299,21 @@
    97779860 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    97789861 LIBS=$ac_check_lib_save_LIBS
    97799862 fi
    97809863-echo "$as_me:11895: result: $ac_cv_lib_inet_bzero" >&5
    9781 +echo "$as_me:12301: result: $ac_cv_lib_inet_bzero" >&5
     9864+echo "$as_me:12302: result: $ac_cv_lib_inet_bzero" >&5
    97829865 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
    97839866 if test $ac_cv_lib_inet_bzero = yes; then
     
    97879870 
    97889871-echo "$as_me:11902: checking if sys/time.h works with sys/select.h" >&5
    9789 +echo "$as_me:12308: checking if sys/time.h works with sys/select.h" >&5
     9872+echo "$as_me:12309: checking if sys/time.h works with sys/select.h" >&5
    97909873 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
    97919874 if test "${cf_cv_sys_time_select+set}" = set; then
     
    97959878 cat >conftest.$ac_ext <<_ACEOF
    97969879-#line 11909 "configure"
    9797 +#line 12315 "configure"
     9880+#line 12316 "configure"
    97989881 #include "confdefs.h"
    97999882 
    98009883 #include <sys/types.h>
    9801 @@ -11926,16 +12332,16 @@
     9884@@ -11926,16 +12333,16 @@
    98029885 }
    98039886 _ACEOF
    98049887 rm -f conftest.$ac_objext
    98059888-if { (eval echo "$as_me:11929: \"$ac_compile\"") >&5
    9806 +if { (eval echo "$as_me:12335: \"$ac_compile\"") >&5
     9889+if { (eval echo "$as_me:12336: \"$ac_compile\"") >&5
    98079890   (eval $ac_compile) 2>&5
    98089891   ac_status=$?
    98099892-  echo "$as_me:11932: \$? = $ac_status" >&5
    9810 +  echo "$as_me:12338: \$? = $ac_status" >&5
     9893+  echo "$as_me:12339: \$? = $ac_status" >&5
    98119894   (exit $ac_status); } &&
    98129895          { ac_try='test -s conftest.$ac_objext'
    98139896-  { (eval echo "$as_me:11935: \"$ac_try\"") >&5
    9814 +  { (eval echo "$as_me:12341: \"$ac_try\"") >&5
     9897+  { (eval echo "$as_me:12342: \"$ac_try\"") >&5
    98159898   (eval $ac_try) 2>&5
    98169899   ac_status=$?
    98179900-  echo "$as_me:11938: \$? = $ac_status" >&5
    9818 +  echo "$as_me:12344: \$? = $ac_status" >&5
     9901+  echo "$as_me:12345: \$? = $ac_status" >&5
    98199902   (exit $ac_status); }; }; then
    98209903   cf_cv_sys_time_select=yes
    98219904 else
    9822 @@ -11947,7 +12353,7 @@
     9905@@ -11947,7 +12354,7 @@
    98239906 
    98249907 fi
    98259908 
    98269909-echo "$as_me:11950: result: $cf_cv_sys_time_select" >&5
    9827 +echo "$as_me:12356: result: $cf_cv_sys_time_select" >&5
     9910+echo "$as_me:12357: result: $cf_cv_sys_time_select" >&5
    98289911 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
    98299912 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
    98309913 #define HAVE_SYS_TIME_SELECT 1
    9831 @@ -11961,7 +12367,7 @@
     9914@@ -11961,7 +12368,7 @@
    98329915 ac_compiler_gnu=$ac_cv_c_compiler_gnu
    98339916 ac_main_return=return
    98349917 
    98359918-echo "$as_me:11964: checking for $CC option to accept ANSI C" >&5
    9836 +echo "$as_me:12370: checking for $CC option to accept ANSI C" >&5
     9919+echo "$as_me:12371: checking for $CC option to accept ANSI C" >&5
    98379920 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
    98389921 if test "${ac_cv_prog_cc_stdc+set}" = set; then
    98399922   echo $ECHO_N "(cached) $ECHO_C" >&6
    9840 @@ -11969,7 +12375,7 @@
     9923@@ -11969,7 +12376,7 @@
    98419924   ac_cv_prog_cc_stdc=no
    98429925 ac_save_CC=$CC
    98439926 cat >conftest.$ac_ext <<_ACEOF
    98449927-#line 11972 "configure"
    9845 +#line 12378 "configure"
     9928+#line 12379 "configure"
    98469929 #include "confdefs.h"
    98479930 #include <stdarg.h>
    98489931 #include <stdio.h>
    9849 @@ -12018,16 +12424,16 @@
     9932@@ -12018,16 +12425,16 @@
    98509933 do
    98519934   CC="$ac_save_CC $ac_arg"
    98529935   rm -f conftest.$ac_objext
    98539936-if { (eval echo "$as_me:12021: \"$ac_compile\"") >&5
    9854 +if { (eval echo "$as_me:12427: \"$ac_compile\"") >&5
     9937+if { (eval echo "$as_me:12428: \"$ac_compile\"") >&5
    98559938   (eval $ac_compile) 2>&5
    98569939   ac_status=$?
    98579940-  echo "$as_me:12024: \$? = $ac_status" >&5
    9858 +  echo "$as_me:12430: \$? = $ac_status" >&5
     9941+  echo "$as_me:12431: \$? = $ac_status" >&5
    98599942   (exit $ac_status); } &&
    98609943          { ac_try='test -s conftest.$ac_objext'
    98619944-  { (eval echo "$as_me:12027: \"$ac_try\"") >&5
    9862 +  { (eval echo "$as_me:12433: \"$ac_try\"") >&5
     9945+  { (eval echo "$as_me:12434: \"$ac_try\"") >&5
    98639946   (eval $ac_try) 2>&5
    98649947   ac_status=$?
    98659948-  echo "$as_me:12030: \$? = $ac_status" >&5
    9866 +  echo "$as_me:12436: \$? = $ac_status" >&5
     9949+  echo "$as_me:12437: \$? = $ac_status" >&5
    98679950   (exit $ac_status); }; }; then
    98689951   ac_cv_prog_cc_stdc=$ac_arg
    98699952 break
    9870 @@ -12044,21 +12450,21 @@
     9953@@ -12044,21 +12451,21 @@
    98719954 
    98729955 case "x$ac_cv_prog_cc_stdc" in
    98739956   x|xno)
    98749957-    echo "$as_me:12047: result: none needed" >&5
    9875 +    echo "$as_me:12453: result: none needed" >&5
     9958+    echo "$as_me:12454: result: none needed" >&5
    98769959 echo "${ECHO_T}none needed" >&6 ;;
    98779960   *)
    98789961-    echo "$as_me:12050: result: $ac_cv_prog_cc_stdc" >&5
    9879 +    echo "$as_me:12456: result: $ac_cv_prog_cc_stdc" >&5
     9962+    echo "$as_me:12457: result: $ac_cv_prog_cc_stdc" >&5
    98809963 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
    98819964     CC="$CC $ac_cv_prog_cc_stdc" ;;
     
    98839966 
    98849967-echo "$as_me:12055: checking for an ANSI C-conforming const" >&5
    9885 +echo "$as_me:12461: checking for an ANSI C-conforming const" >&5
     9968+echo "$as_me:12462: checking for an ANSI C-conforming const" >&5
    98869969 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
    98879970 if test "${ac_cv_c_const+set}" = set; then
     
    98909973   cat >conftest.$ac_ext <<_ACEOF
    98919974-#line 12061 "configure"
    9892 +#line 12467 "configure"
     9975+#line 12468 "configure"
    98939976 #include "confdefs.h"
    98949977 
    98959978 int
    9896 @@ -12116,16 +12522,16 @@
     9979@@ -12116,16 +12523,16 @@
    98979980 }
    98989981 _ACEOF
    98999982 rm -f conftest.$ac_objext
    99009983-if { (eval echo "$as_me:12119: \"$ac_compile\"") >&5
    9901 +if { (eval echo "$as_me:12525: \"$ac_compile\"") >&5
     9984+if { (eval echo "$as_me:12526: \"$ac_compile\"") >&5
    99029985   (eval $ac_compile) 2>&5
    99039986   ac_status=$?
    99049987-  echo "$as_me:12122: \$? = $ac_status" >&5
    9905 +  echo "$as_me:12528: \$? = $ac_status" >&5
     9988+  echo "$as_me:12529: \$? = $ac_status" >&5
    99069989   (exit $ac_status); } &&
    99079990          { ac_try='test -s conftest.$ac_objext'
    99089991-  { (eval echo "$as_me:12125: \"$ac_try\"") >&5
    9909 +  { (eval echo "$as_me:12531: \"$ac_try\"") >&5
     9992+  { (eval echo "$as_me:12532: \"$ac_try\"") >&5
    99109993   (eval $ac_try) 2>&5
    99119994   ac_status=$?
    99129995-  echo "$as_me:12128: \$? = $ac_status" >&5
    9913 +  echo "$as_me:12534: \$? = $ac_status" >&5
     9996+  echo "$as_me:12535: \$? = $ac_status" >&5
    99149997   (exit $ac_status); }; }; then
    99159998   ac_cv_c_const=yes
    99169999 else
    9917 @@ -12135,7 +12541,7 @@
     10000@@ -12135,7 +12542,7 @@
    991810001 fi
    991910002 rm -f conftest.$ac_objext conftest.$ac_ext
    992010003 fi
    992110004-echo "$as_me:12138: result: $ac_cv_c_const" >&5
    9922 +echo "$as_me:12544: result: $ac_cv_c_const" >&5
     10005+echo "$as_me:12545: result: $ac_cv_c_const" >&5
    992310006 echo "${ECHO_T}$ac_cv_c_const" >&6
    992410007 if test $ac_cv_c_const = no; then
    992510008 
    9926 @@ -12145,7 +12551,7 @@
     10009@@ -12145,7 +12552,7 @@
    992710010 
    992810011 fi
    992910012 
    993010013-echo "$as_me:12148: checking for inline" >&5
    9931 +echo "$as_me:12554: checking for inline" >&5
     10014+echo "$as_me:12555: checking for inline" >&5
    993210015 echo $ECHO_N "checking for inline... $ECHO_C" >&6
    993310016 if test "${ac_cv_c_inline+set}" = set; then
    993410017   echo $ECHO_N "(cached) $ECHO_C" >&6
    9935 @@ -12153,7 +12559,7 @@
     10018@@ -12153,7 +12560,7 @@
    993610019   ac_cv_c_inline=no
    993710020 for ac_kw in inline __inline__ __inline; do
    993810021   cat >conftest.$ac_ext <<_ACEOF
    993910022-#line 12156 "configure"
    9940 +#line 12562 "configure"
     10023+#line 12563 "configure"
    994110024 #include "confdefs.h"
    994210025 #ifndef __cplusplus
    994310026 static $ac_kw int static_foo () {return 0; }
    9944 @@ -12162,16 +12568,16 @@
     10027@@ -12162,16 +12569,16 @@
    994510028 
    994610029 _ACEOF
    994710030 rm -f conftest.$ac_objext
    994810031-if { (eval echo "$as_me:12165: \"$ac_compile\"") >&5
    9949 +if { (eval echo "$as_me:12571: \"$ac_compile\"") >&5
     10032+if { (eval echo "$as_me:12572: \"$ac_compile\"") >&5
    995010033   (eval $ac_compile) 2>&5
    995110034   ac_status=$?
    995210035-  echo "$as_me:12168: \$? = $ac_status" >&5
    9953 +  echo "$as_me:12574: \$? = $ac_status" >&5
     10036+  echo "$as_me:12575: \$? = $ac_status" >&5
    995410037   (exit $ac_status); } &&
    995510038          { ac_try='test -s conftest.$ac_objext'
    995610039-  { (eval echo "$as_me:12171: \"$ac_try\"") >&5
    9957 +  { (eval echo "$as_me:12577: \"$ac_try\"") >&5
     10040+  { (eval echo "$as_me:12578: \"$ac_try\"") >&5
    995810041   (eval $ac_try) 2>&5
    995910042   ac_status=$?
    996010043-  echo "$as_me:12174: \$? = $ac_status" >&5
    9961 +  echo "$as_me:12580: \$? = $ac_status" >&5
     10044+  echo "$as_me:12581: \$? = $ac_status" >&5
    996210045   (exit $ac_status); }; }; then
    996310046   ac_cv_c_inline=$ac_kw; break
    996410047 else
    9965 @@ -12182,7 +12588,7 @@
     10048@@ -12182,7 +12589,7 @@
    996610049 done
    996710050 
    996810051 fi
    996910052-echo "$as_me:12185: result: $ac_cv_c_inline" >&5
    9970 +echo "$as_me:12591: result: $ac_cv_c_inline" >&5
     10053+echo "$as_me:12592: result: $ac_cv_c_inline" >&5
    997110054 echo "${ECHO_T}$ac_cv_c_inline" >&6
    997210055 case $ac_cv_c_inline in
    997310056   inline | yes) ;;
    9974 @@ -12205,7 +12611,7 @@
     10057@@ -12205,7 +12612,7 @@
    997510058     :
    997610059   elif test "$GCC" = yes
    997710060   then
    997810061-    echo "$as_me:12208: checking if gcc supports options to tune inlining" >&5
    9979 +    echo "$as_me:12614: checking if gcc supports options to tune inlining" >&5
     10062+    echo "$as_me:12615: checking if gcc supports options to tune inlining" >&5
    998010063 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
    998110064 if test "${cf_cv_gcc_inline+set}" = set; then
    998210065   echo $ECHO_N "(cached) $ECHO_C" >&6
    9983 @@ -12214,7 +12620,7 @@
     10066@@ -12214,7 +12621,7 @@
    998410067       cf_save_CFLAGS=$CFLAGS
    998510068       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
    998610069       cat >conftest.$ac_ext <<_ACEOF
    998710070-#line 12217 "configure"
    9988 +#line 12623 "configure"
     10071+#line 12624 "configure"
    998910072 #include "confdefs.h"
    999010073 inline int foo(void) { return 1; }
    999110074 int
    9992 @@ -12226,16 +12632,16 @@
     10075@@ -12226,16 +12633,16 @@
    999310076 }
    999410077 _ACEOF
    999510078 rm -f conftest.$ac_objext
    999610079-if { (eval echo "$as_me:12229: \"$ac_compile\"") >&5
    9997 +if { (eval echo "$as_me:12635: \"$ac_compile\"") >&5
     10080+if { (eval echo "$as_me:12636: \"$ac_compile\"") >&5
    999810081   (eval $ac_compile) 2>&5
    999910082   ac_status=$?
    1000010083-  echo "$as_me:12232: \$? = $ac_status" >&5
    10001 +  echo "$as_me:12638: \$? = $ac_status" >&5
     10084+  echo "$as_me:12639: \$? = $ac_status" >&5
    1000210085   (exit $ac_status); } &&
    1000310086          { ac_try='test -s conftest.$ac_objext'
    1000410087-  { (eval echo "$as_me:12235: \"$ac_try\"") >&5
    10005 +  { (eval echo "$as_me:12641: \"$ac_try\"") >&5
     10088+  { (eval echo "$as_me:12642: \"$ac_try\"") >&5
    1000610089   (eval $ac_try) 2>&5
    1000710090   ac_status=$?
    1000810091-  echo "$as_me:12238: \$? = $ac_status" >&5
    10009 +  echo "$as_me:12644: \$? = $ac_status" >&5
     10092+  echo "$as_me:12645: \$? = $ac_status" >&5
    1001010093   (exit $ac_status); }; }; then
    1001110094   cf_cv_gcc_inline=yes
    1001210095 else
    10013 @@ -12247,7 +12653,7 @@
     10096@@ -12247,7 +12654,7 @@
    1001410097       CFLAGS=$cf_save_CFLAGS
    1001510098 
    1001610099 fi
    1001710100-echo "$as_me:12250: result: $cf_cv_gcc_inline" >&5
    10018 +echo "$as_me:12656: result: $cf_cv_gcc_inline" >&5
     10101+echo "$as_me:12657: result: $cf_cv_gcc_inline" >&5
    1001910102 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
    1002010103     if test "$cf_cv_gcc_inline" = yes ; then
    1002110104 
    10022 @@ -12311,7 +12717,7 @@
     10105@@ -12311,7 +12718,7 @@
    1002310106 
    1002410107 if test -n "$cf_new_cppflags" ; then
     
    1002910112 
    1003010113 if test -n "$cf_new_extra_cppflags" ; then
    10031 @@ -12323,7 +12729,7 @@
     10114@@ -12323,7 +12730,7 @@
    1003210115   fi
    1003310116 fi
    1003410117 
    1003510118-echo "$as_me:12326: checking for signal global datatype" >&5
    10036 +echo "$as_me:12732: checking for signal global datatype" >&5
     10119+echo "$as_me:12733: checking for signal global datatype" >&5
    1003710120 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
    1003810121 if test "${cf_cv_sig_atomic_t+set}" = set; then
    1003910122   echo $ECHO_N "(cached) $ECHO_C" >&6
    10040 @@ -12335,7 +12741,7 @@
     10123@@ -12335,7 +12742,7 @@
    1004110124                "int"
    1004210125        do
    1004310126        cat >conftest.$ac_ext <<_ACEOF
    1004410127-#line 12338 "configure"
    10045 +#line 12744 "configure"
     10128+#line 12745 "configure"
    1004610129 #include "confdefs.h"
    1004710130 
    1004810131 #include <sys/types.h>
    10049 @@ -12358,16 +12764,16 @@
     10132@@ -12358,16 +12765,16 @@
    1005010133 }
    1005110134 _ACEOF
    1005210135 rm -f conftest.$ac_objext
    1005310136-if { (eval echo "$as_me:12361: \"$ac_compile\"") >&5
    10054 +if { (eval echo "$as_me:12767: \"$ac_compile\"") >&5
     10137+if { (eval echo "$as_me:12768: \"$ac_compile\"") >&5
    1005510138   (eval $ac_compile) 2>&5
    1005610139   ac_status=$?
    1005710140-  echo "$as_me:12364: \$? = $ac_status" >&5
    10058 +  echo "$as_me:12770: \$? = $ac_status" >&5
     10141+  echo "$as_me:12771: \$? = $ac_status" >&5
    1005910142   (exit $ac_status); } &&
    1006010143          { ac_try='test -s conftest.$ac_objext'
    1006110144-  { (eval echo "$as_me:12367: \"$ac_try\"") >&5
    10062 +  { (eval echo "$as_me:12773: \"$ac_try\"") >&5
     10145+  { (eval echo "$as_me:12774: \"$ac_try\"") >&5
    1006310146   (eval $ac_try) 2>&5
    1006410147   ac_status=$?
    1006510148-  echo "$as_me:12370: \$? = $ac_status" >&5
    10066 +  echo "$as_me:12776: \$? = $ac_status" >&5
     10149+  echo "$as_me:12777: \$? = $ac_status" >&5
    1006710150   (exit $ac_status); }; }; then
    1006810151   cf_cv_sig_atomic_t=$cf_type
    1006910152 else
    10070 @@ -12381,7 +12787,7 @@
     10153@@ -12381,7 +12788,7 @@
    1007110154 
    1007210155 fi
    1007310156 
    1007410157-echo "$as_me:12384: result: $cf_cv_sig_atomic_t" >&5
    10075 +echo "$as_me:12790: result: $cf_cv_sig_atomic_t" >&5
     10158+echo "$as_me:12791: result: $cf_cv_sig_atomic_t" >&5
    1007610159 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
    1007710160 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
    1007810161 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
    10079 @@ -12389,7 +12795,7 @@
     10162@@ -12389,7 +12796,7 @@
    1008010163 
    1008110164 if test $NCURSES_CHTYPE = auto ; then
    1008210165 
    1008310166-echo "$as_me:12392: checking for type of chtype" >&5
    10084 +echo "$as_me:12798: checking for type of chtype" >&5
     10167+echo "$as_me:12799: checking for type of chtype" >&5
    1008510168 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
    1008610169 if test "${cf_cv_typeof_chtype+set}" = set; then
    1008710170   echo $ECHO_N "(cached) $ECHO_C" >&6
    10088 @@ -12399,7 +12805,7 @@
     10171@@ -12399,7 +12806,7 @@
    1008910172   cf_cv_typeof_chtype=long
    1009010173 else
    1009110174   cat >conftest.$ac_ext <<_ACEOF
    1009210175-#line 12402 "configure"
    10093 +#line 12808 "configure"
     10176+#line 12809 "configure"
    1009410177 #include "confdefs.h"
    1009510178 
    1009610179 #define WANT_BITS 31
    10097 @@ -12434,15 +12840,15 @@
     10180@@ -12434,15 +12841,15 @@
    1009810181 
    1009910182 _ACEOF
    1010010183 rm -f conftest$ac_exeext
    1010110184-if { (eval echo "$as_me:12437: \"$ac_link\"") >&5
    10102 +if { (eval echo "$as_me:12843: \"$ac_link\"") >&5
     10185+if { (eval echo "$as_me:12844: \"$ac_link\"") >&5
    1010310186   (eval $ac_link) 2>&5
    1010410187   ac_status=$?
    1010510188-  echo "$as_me:12440: \$? = $ac_status" >&5
    10106 +  echo "$as_me:12846: \$? = $ac_status" >&5
     10189+  echo "$as_me:12847: \$? = $ac_status" >&5
    1010710190   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    1010810191-  { (eval echo "$as_me:12442: \"$ac_try\"") >&5
    10109 +  { (eval echo "$as_me:12848: \"$ac_try\"") >&5
     10192+  { (eval echo "$as_me:12849: \"$ac_try\"") >&5
    1011010193   (eval $ac_try) 2>&5
    1011110194   ac_status=$?
    1011210195-  echo "$as_me:12445: \$? = $ac_status" >&5
    10113 +  echo "$as_me:12851: \$? = $ac_status" >&5
     10196+  echo "$as_me:12852: \$? = $ac_status" >&5
    1011410197   (exit $ac_status); }; }; then
    1011510198   cf_cv_typeof_chtype=`cat cf_test.out`
    1011610199 else
    10117 @@ -12457,7 +12863,7 @@
     10200@@ -12457,7 +12864,7 @@
    1011810201 
    1011910202 fi
    1012010203 
    1012110204-echo "$as_me:12460: result: $cf_cv_typeof_chtype" >&5
    10122 +echo "$as_me:12866: result: $cf_cv_typeof_chtype" >&5
     10205+echo "$as_me:12867: result: $cf_cv_typeof_chtype" >&5
    1012310206 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
    1012410207 
    1012510208 cat >>confdefs.h <<EOF
    10126 @@ -12469,14 +12875,14 @@
     10209@@ -12469,14 +12876,14 @@
    1012710210 fi
    1012810211 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
    1012910212 
    1013010213-echo "$as_me:12472: checking if unsigned literals are legal" >&5
    10131 +echo "$as_me:12878: checking if unsigned literals are legal" >&5
     10214+echo "$as_me:12879: checking if unsigned literals are legal" >&5
    1013210215 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
    1013310216 if test "${cf_cv_unsigned_literals+set}" = set; then
     
    1013710220        cat >conftest.$ac_ext <<_ACEOF
    1013810221-#line 12479 "configure"
    10139 +#line 12885 "configure"
     10222+#line 12886 "configure"
    1014010223 #include "confdefs.h"
    1014110224 
    1014210225 int
    10143 @@ -12488,16 +12894,16 @@
     10226@@ -12488,16 +12895,16 @@
    1014410227 }
    1014510228 _ACEOF
    1014610229 rm -f conftest.$ac_objext
    1014710230-if { (eval echo "$as_me:12491: \"$ac_compile\"") >&5
    10148 +if { (eval echo "$as_me:12897: \"$ac_compile\"") >&5
     10231+if { (eval echo "$as_me:12898: \"$ac_compile\"") >&5
    1014910232   (eval $ac_compile) 2>&5
    1015010233   ac_status=$?
    1015110234-  echo "$as_me:12494: \$? = $ac_status" >&5
    10152 +  echo "$as_me:12900: \$? = $ac_status" >&5
     10235+  echo "$as_me:12901: \$? = $ac_status" >&5
    1015310236   (exit $ac_status); } &&
    1015410237          { ac_try='test -s conftest.$ac_objext'
    1015510238-  { (eval echo "$as_me:12497: \"$ac_try\"") >&5
    10156 +  { (eval echo "$as_me:12903: \"$ac_try\"") >&5
     10239+  { (eval echo "$as_me:12904: \"$ac_try\"") >&5
    1015710240   (eval $ac_try) 2>&5
    1015810241   ac_status=$?
    1015910242-  echo "$as_me:12500: \$? = $ac_status" >&5
    10160 +  echo "$as_me:12906: \$? = $ac_status" >&5
     10243+  echo "$as_me:12907: \$? = $ac_status" >&5
    1016110244   (exit $ac_status); }; }; then
    1016210245   cf_cv_unsigned_literals=yes
    1016310246 else
    10164 @@ -12509,7 +12915,7 @@
     10247@@ -12509,7 +12916,7 @@
    1016510248 
    1016610249 fi
    1016710250 
    1016810251-echo "$as_me:12512: result: $cf_cv_unsigned_literals" >&5
    10169 +echo "$as_me:12918: result: $cf_cv_unsigned_literals" >&5
     10252+echo "$as_me:12919: result: $cf_cv_unsigned_literals" >&5
    1017010253 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
    1017110254 
    1017210255 cf_cv_1UL="1"
    10173 @@ -12525,14 +12931,14 @@
     10256@@ -12525,14 +12932,14 @@
    1017410257 
    1017510258 ###    Checks for external-data
    1017610259 
    1017710260-echo "$as_me:12528: checking if external errno is declared" >&5
    10178 +echo "$as_me:12934: checking if external errno is declared" >&5
     10261+echo "$as_me:12935: checking if external errno is declared" >&5
    1017910262 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
    1018010263 if test "${cf_cv_dcl_errno+set}" = set; then
     
    1018410267     cat >conftest.$ac_ext <<_ACEOF
    1018510268-#line 12535 "configure"
    10186 +#line 12941 "configure"
     10269+#line 12942 "configure"
    1018710270 #include "confdefs.h"
    1018810271 
    1018910272 #ifdef HAVE_STDLIB_H
    10190 @@ -12550,16 +12956,16 @@
     10273@@ -12550,16 +12957,16 @@
    1019110274 }
    1019210275 _ACEOF
    1019310276 rm -f conftest.$ac_objext
    1019410277-if { (eval echo "$as_me:12553: \"$ac_compile\"") >&5
    10195 +if { (eval echo "$as_me:12959: \"$ac_compile\"") >&5
     10278+if { (eval echo "$as_me:12960: \"$ac_compile\"") >&5
    1019610279   (eval $ac_compile) 2>&5
    1019710280   ac_status=$?
    1019810281-  echo "$as_me:12556: \$? = $ac_status" >&5
    10199 +  echo "$as_me:12962: \$? = $ac_status" >&5
     10282+  echo "$as_me:12963: \$? = $ac_status" >&5
    1020010283   (exit $ac_status); } &&
    1020110284          { ac_try='test -s conftest.$ac_objext'
    1020210285-  { (eval echo "$as_me:12559: \"$ac_try\"") >&5
    10203 +  { (eval echo "$as_me:12965: \"$ac_try\"") >&5
     10286+  { (eval echo "$as_me:12966: \"$ac_try\"") >&5
    1020410287   (eval $ac_try) 2>&5
    1020510288   ac_status=$?
    1020610289-  echo "$as_me:12562: \$? = $ac_status" >&5
    10207 +  echo "$as_me:12968: \$? = $ac_status" >&5
     10290+  echo "$as_me:12969: \$? = $ac_status" >&5
    1020810291   (exit $ac_status); }; }; then
    1020910292   cf_cv_dcl_errno=yes
    1021010293 else
    10211 @@ -12570,7 +12976,7 @@
     10294@@ -12570,7 +12977,7 @@
    1021210295 rm -f conftest.$ac_objext conftest.$ac_ext
    1021310296 
    1021410297 fi
    1021510298-echo "$as_me:12573: result: $cf_cv_dcl_errno" >&5
    10216 +echo "$as_me:12979: result: $cf_cv_dcl_errno" >&5
     10299+echo "$as_me:12980: result: $cf_cv_dcl_errno" >&5
    1021710300 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
    1021810301 
    1021910302 if test "$cf_cv_dcl_errno" = no ; then
    10220 @@ -12585,14 +12991,14 @@
     10303@@ -12585,14 +12992,14 @@
    1022110304 
    1022210305 # It's possible (for near-UNIX clones) that the data doesn't exist
    1022310306 
    1022410307-echo "$as_me:12588: checking if external errno exists" >&5
    10225 +echo "$as_me:12994: checking if external errno exists" >&5
     10308+echo "$as_me:12995: checking if external errno exists" >&5
    1022610309 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
    1022710310 if test "${cf_cv_have_errno+set}" = set; then
     
    1023110314     cat >conftest.$ac_ext <<_ACEOF
    1023210315-#line 12595 "configure"
    10233 +#line 13001 "configure"
     10316+#line 13002 "configure"
    1023410317 #include "confdefs.h"
    1023510318 
    1023610319 #undef errno
    10237 @@ -12607,16 +13013,16 @@
     10320@@ -12607,16 +13014,16 @@
    1023810321 }
    1023910322 _ACEOF
    1024010323 rm -f conftest.$ac_objext conftest$ac_exeext
    1024110324-if { (eval echo "$as_me:12610: \"$ac_link\"") >&5
    10242 +if { (eval echo "$as_me:13016: \"$ac_link\"") >&5
     10325+if { (eval echo "$as_me:13017: \"$ac_link\"") >&5
    1024310326   (eval $ac_link) 2>&5
    1024410327   ac_status=$?
    1024510328-  echo "$as_me:12613: \$? = $ac_status" >&5
    10246 +  echo "$as_me:13019: \$? = $ac_status" >&5
     10329+  echo "$as_me:13020: \$? = $ac_status" >&5
    1024710330   (exit $ac_status); } &&
    1024810331          { ac_try='test -s conftest$ac_exeext'
    1024910332-  { (eval echo "$as_me:12616: \"$ac_try\"") >&5
    10250 +  { (eval echo "$as_me:13022: \"$ac_try\"") >&5
     10333+  { (eval echo "$as_me:13023: \"$ac_try\"") >&5
    1025110334   (eval $ac_try) 2>&5
    1025210335   ac_status=$?
    1025310336-  echo "$as_me:12619: \$? = $ac_status" >&5
    10254 +  echo "$as_me:13025: \$? = $ac_status" >&5
     10337+  echo "$as_me:13026: \$? = $ac_status" >&5
    1025510338   (exit $ac_status); }; }; then
    1025610339   cf_cv_have_errno=yes
    1025710340 else
    10258 @@ -12627,7 +13033,7 @@
     10341@@ -12627,7 +13034,7 @@
    1025910342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    1026010343 
    1026110344 fi
    1026210345-echo "$as_me:12630: result: $cf_cv_have_errno" >&5
    10263 +echo "$as_me:13036: result: $cf_cv_have_errno" >&5
     10346+echo "$as_me:13037: result: $cf_cv_have_errno" >&5
    1026410347 echo "${ECHO_T}$cf_cv_have_errno" >&6
    1026510348 
    1026610349 if test "$cf_cv_have_errno" = yes ; then
    10267 @@ -12640,7 +13046,7 @@
     10350@@ -12640,7 +13047,7 @@
    1026810351 
    1026910352 fi
    1027010353 
    1027110354-echo "$as_me:12643: checking if data-only library module links" >&5
    10272 +echo "$as_me:13049: checking if data-only library module links" >&5
     10355+echo "$as_me:13050: checking if data-only library module links" >&5
    1027310356 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
    1027410357 if test "${cf_cv_link_dataonly+set}" = set; then
    1027510358   echo $ECHO_N "(cached) $ECHO_C" >&6
    10276 @@ -12648,20 +13054,20 @@
     10359@@ -12648,20 +13055,20 @@
    1027710360 
    1027810361        rm -f conftest.a
    1027910362        cat >conftest.$ac_ext <<EOF
    1028010363-#line 12651 "configure"
    10281 +#line 13057 "configure"
     10364+#line 13058 "configure"
    1028210365 int    testdata[3] = { 123, 456, 789 };
    1028310366 EOF
    1028410367-       if { (eval echo "$as_me:12654: \"$ac_compile\"") >&5
    10285 +       if { (eval echo "$as_me:13060: \"$ac_compile\"") >&5
     10368+       if { (eval echo "$as_me:13061: \"$ac_compile\"") >&5
    1028610369   (eval $ac_compile) 2>&5
    1028710370   ac_status=$?
    1028810371-  echo "$as_me:12657: \$? = $ac_status" >&5
    10289 +  echo "$as_me:13063: \$? = $ac_status" >&5
     10372+  echo "$as_me:13064: \$? = $ac_status" >&5
    1029010373   (exit $ac_status); } ; then
    1029110374                mv conftest.o data.o && \
     
    1029610379        cat >conftest.$ac_ext <<EOF
    1029710380-#line 12664 "configure"
    10298 +#line 13070 "configure"
     10381+#line 13071 "configure"
    1029910382 int    testfunc()
    1030010383 {
    1030110384 #if defined(NeXT)
    10302 @@ -12674,13 +13080,13 @@
     10385@@ -12674,13 +13081,13 @@
    1030310386 #endif
    1030410387 }
    1030510388 EOF
    1030610389-       if { (eval echo "$as_me:12677: \"$ac_compile\"") >&5
    10307 +       if { (eval echo "$as_me:13083: \"$ac_compile\"") >&5
     10390+       if { (eval echo "$as_me:13084: \"$ac_compile\"") >&5
    1030810391   (eval $ac_compile) 2>&5
    1030910392   ac_status=$?
    1031010393-  echo "$as_me:12680: \$? = $ac_status" >&5
    10311 +  echo "$as_me:13086: \$? = $ac_status" >&5
     10394+  echo "$as_me:13087: \$? = $ac_status" >&5
    1031210395   (exit $ac_status); }; then
    1031310396                mv conftest.o func.o && \
     
    1031710400        rm -f conftest.$ac_ext func.o
    1031810401        ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
    10319 @@ -12690,7 +13096,7 @@
     10402@@ -12690,7 +13097,7 @@
    1032010403   cf_cv_link_dataonly=unknown
    1032110404 else
    1032210405   cat >conftest.$ac_ext <<_ACEOF
    1032310406-#line 12693 "configure"
    10324 +#line 13099 "configure"
     10407+#line 13100 "configure"
    1032510408 #include "confdefs.h"
    1032610409 
    1032710410        int main()
    10328 @@ -12701,15 +13107,15 @@
     10411@@ -12701,15 +13108,15 @@
    1032910412 
    1033010413 _ACEOF
    1033110414 rm -f conftest$ac_exeext
    1033210415-if { (eval echo "$as_me:12704: \"$ac_link\"") >&5
    10333 +if { (eval echo "$as_me:13110: \"$ac_link\"") >&5
     10416+if { (eval echo "$as_me:13111: \"$ac_link\"") >&5
    1033410417   (eval $ac_link) 2>&5
    1033510418   ac_status=$?
    1033610419-  echo "$as_me:12707: \$? = $ac_status" >&5
    10337 +  echo "$as_me:13113: \$? = $ac_status" >&5
     10420+  echo "$as_me:13114: \$? = $ac_status" >&5
    1033810421   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    1033910422-  { (eval echo "$as_me:12709: \"$ac_try\"") >&5
    10340 +  { (eval echo "$as_me:13115: \"$ac_try\"") >&5
     10423+  { (eval echo "$as_me:13116: \"$ac_try\"") >&5
    1034110424   (eval $ac_try) 2>&5
    1034210425   ac_status=$?
    1034310426-  echo "$as_me:12712: \$? = $ac_status" >&5
    10344 +  echo "$as_me:13118: \$? = $ac_status" >&5
     10427+  echo "$as_me:13119: \$? = $ac_status" >&5
    1034510428   (exit $ac_status); }; }; then
    1034610429   cf_cv_link_dataonly=yes
    1034710430 else
    10348 @@ -12724,7 +13130,7 @@
     10431@@ -12724,7 +13131,7 @@
    1034910432 
    1035010433 fi
    1035110434 
    1035210435-echo "$as_me:12727: result: $cf_cv_link_dataonly" >&5
    10353 +echo "$as_me:13133: result: $cf_cv_link_dataonly" >&5
     10436+echo "$as_me:13134: result: $cf_cv_link_dataonly" >&5
    1035410437 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
    1035510438 
    1035610439 if test "$cf_cv_link_dataonly" = no ; then
    10357 @@ -12759,13 +13165,13 @@
     10440@@ -12759,13 +13166,13 @@
    1035810441 
    1035910442 do
    1036010443 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
    1036110444-echo "$as_me:12762: checking for $ac_func" >&5
    10362 +echo "$as_me:13168: checking for $ac_func" >&5
     10445+echo "$as_me:13169: checking for $ac_func" >&5
    1036310446 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
    1036410447 if eval "test \"\${$as_ac_var+set}\" = set"; then
     
    1036710450   cat >conftest.$ac_ext <<_ACEOF
    1036810451-#line 12768 "configure"
    10369 +#line 13174 "configure"
     10452+#line 13175 "configure"
    1037010453 #include "confdefs.h"
    1037110454 /* System header to define __stub macros and hopefully few prototypes,
    1037210455     which can conflict with char $ac_func (); below.  */
    10373 @@ -12796,16 +13202,16 @@
     10456@@ -12796,16 +13203,16 @@
    1037410457 }
    1037510458 _ACEOF
    1037610459 rm -f conftest.$ac_objext conftest$ac_exeext
    1037710460-if { (eval echo "$as_me:12799: \"$ac_link\"") >&5
    10378 +if { (eval echo "$as_me:13205: \"$ac_link\"") >&5
     10461+if { (eval echo "$as_me:13206: \"$ac_link\"") >&5
    1037910462   (eval $ac_link) 2>&5
    1038010463   ac_status=$?
    1038110464-  echo "$as_me:12802: \$? = $ac_status" >&5
    10382 +  echo "$as_me:13208: \$? = $ac_status" >&5
     10465+  echo "$as_me:13209: \$? = $ac_status" >&5
    1038310466   (exit $ac_status); } &&
    1038410467          { ac_try='test -s conftest$ac_exeext'
    1038510468-  { (eval echo "$as_me:12805: \"$ac_try\"") >&5
    10386 +  { (eval echo "$as_me:13211: \"$ac_try\"") >&5
     10469+  { (eval echo "$as_me:13212: \"$ac_try\"") >&5
    1038710470   (eval $ac_try) 2>&5
    1038810471   ac_status=$?
    1038910472-  echo "$as_me:12808: \$? = $ac_status" >&5
    10390 +  echo "$as_me:13214: \$? = $ac_status" >&5
     10473+  echo "$as_me:13215: \$? = $ac_status" >&5
    1039110474   (exit $ac_status); }; }; then
    1039210475   eval "$as_ac_var=yes"
    1039310476 else
    10394 @@ -12815,7 +13221,7 @@
     10477@@ -12815,7 +13222,7 @@
    1039510478 fi
    1039610479 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    1039710480 fi
    1039810481-echo "$as_me:12818: result: `eval echo '${'$as_ac_var'}'`" >&5
    10399 +echo "$as_me:13224: result: `eval echo '${'$as_ac_var'}'`" >&5
     10482+echo "$as_me:13225: result: `eval echo '${'$as_ac_var'}'`" >&5
    1040010483 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
    1040110484 if test `eval echo '${'$as_ac_var'}'` = yes; then
    1040210485   cat >>confdefs.h <<EOF
    10403 @@ -12827,14 +13233,14 @@
     10486@@ -12827,14 +13234,14 @@
    1040410487 
    1040510488 if test "$with_getcap" = "yes" ; then
    1040610489 
    1040710490-echo "$as_me:12830: checking for terminal-capability database functions" >&5
    10408 +echo "$as_me:13236: checking for terminal-capability database functions" >&5
     10491+echo "$as_me:13237: checking for terminal-capability database functions" >&5
    1040910492 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
    1041010493 if test "${cf_cv_cgetent+set}" = set; then
     
    1041410497 cat >conftest.$ac_ext <<_ACEOF
    1041510498-#line 12837 "configure"
    10416 +#line 13243 "configure"
     10499+#line 13244 "configure"
    1041710500 #include "confdefs.h"
    1041810501 
    1041910502 #include <stdlib.h>
    10420 @@ -12854,16 +13260,16 @@
     10503@@ -12854,16 +13261,16 @@
    1042110504 }
    1042210505 _ACEOF
    1042310506 rm -f conftest.$ac_objext conftest$ac_exeext
    1042410507-if { (eval echo "$as_me:12857: \"$ac_link\"") >&5
    10425 +if { (eval echo "$as_me:13263: \"$ac_link\"") >&5
     10508+if { (eval echo "$as_me:13264: \"$ac_link\"") >&5
    1042610509   (eval $ac_link) 2>&5
    1042710510   ac_status=$?
    1042810511-  echo "$as_me:12860: \$? = $ac_status" >&5
    10429 +  echo "$as_me:13266: \$? = $ac_status" >&5
     10512+  echo "$as_me:13267: \$? = $ac_status" >&5
    1043010513   (exit $ac_status); } &&
    1043110514          { ac_try='test -s conftest$ac_exeext'
    1043210515-  { (eval echo "$as_me:12863: \"$ac_try\"") >&5
    10433 +  { (eval echo "$as_me:13269: \"$ac_try\"") >&5
     10516+  { (eval echo "$as_me:13270: \"$ac_try\"") >&5
    1043410517   (eval $ac_try) 2>&5
    1043510518   ac_status=$?
    1043610519-  echo "$as_me:12866: \$? = $ac_status" >&5
    10437 +  echo "$as_me:13272: \$? = $ac_status" >&5
     10520+  echo "$as_me:13273: \$? = $ac_status" >&5
    1043810521   (exit $ac_status); }; }; then
    1043910522   cf_cv_cgetent=yes
    1044010523 else
    10441 @@ -12875,7 +13281,7 @@
     10524@@ -12875,7 +13282,7 @@
    1044210525 
    1044310526 fi
    1044410527 
    1044510528-echo "$as_me:12878: result: $cf_cv_cgetent" >&5
    10446 +echo "$as_me:13284: result: $cf_cv_cgetent" >&5
     10529+echo "$as_me:13285: result: $cf_cv_cgetent" >&5
    1044710530 echo "${ECHO_T}$cf_cv_cgetent" >&6
    1044810531 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
    1044910532 #define HAVE_BSD_CGETENT 1
    10450 @@ -12883,14 +13289,14 @@
     10533@@ -12883,14 +13290,14 @@
    1045110534 
    1045210535 fi
    1045310536 
    1045410537-echo "$as_me:12886: checking for isascii" >&5
    10455 +echo "$as_me:13292: checking for isascii" >&5
     10538+echo "$as_me:13293: checking for isascii" >&5
    1045610539 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
    1045710540 if test "${cf_cv_have_isascii+set}" = set; then
     
    1046110544        cat >conftest.$ac_ext <<_ACEOF
    1046210545-#line 12893 "configure"
    10463 +#line 13299 "configure"
     10546+#line 13300 "configure"
    1046410547 #include "confdefs.h"
    1046510548 #include <ctype.h>
    1046610549 int
    10467 @@ -12902,16 +13308,16 @@
     10550@@ -12902,16 +13309,16 @@
    1046810551 }
    1046910552 _ACEOF
    1047010553 rm -f conftest.$ac_objext conftest$ac_exeext
    1047110554-if { (eval echo "$as_me:12905: \"$ac_link\"") >&5
    10472 +if { (eval echo "$as_me:13311: \"$ac_link\"") >&5
     10555+if { (eval echo "$as_me:13312: \"$ac_link\"") >&5
    1047310556   (eval $ac_link) 2>&5
    1047410557   ac_status=$?
    1047510558-  echo "$as_me:12908: \$? = $ac_status" >&5
    10476 +  echo "$as_me:13314: \$? = $ac_status" >&5
     10559+  echo "$as_me:13315: \$? = $ac_status" >&5
    1047710560   (exit $ac_status); } &&
    1047810561          { ac_try='test -s conftest$ac_exeext'
    1047910562-  { (eval echo "$as_me:12911: \"$ac_try\"") >&5
    10480 +  { (eval echo "$as_me:13317: \"$ac_try\"") >&5
     10563+  { (eval echo "$as_me:13318: \"$ac_try\"") >&5
    1048110564   (eval $ac_try) 2>&5
    1048210565   ac_status=$?
    1048310566-  echo "$as_me:12914: \$? = $ac_status" >&5
    10484 +  echo "$as_me:13320: \$? = $ac_status" >&5
     10567+  echo "$as_me:13321: \$? = $ac_status" >&5
    1048510568   (exit $ac_status); }; }; then
    1048610569   cf_cv_have_isascii=yes
    1048710570 else
    10488 @@ -12922,17 +13328,17 @@
     10571@@ -12922,17 +13329,17 @@
    1048910572 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    1049010573 
    1049110574 fi
    1049210575-echo "$as_me:12925: result: $cf_cv_have_isascii" >&5
    10493 +echo "$as_me:13331: result: $cf_cv_have_isascii" >&5
     10576+echo "$as_me:13332: result: $cf_cv_have_isascii" >&5
    1049410577 echo "${ECHO_T}$cf_cv_have_isascii" >&6
    1049510578 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
     
    1049910582 if test "$ac_cv_func_sigaction" = yes; then
    1050010583-echo "$as_me:12932: checking whether sigaction needs _POSIX_SOURCE" >&5
    10501 +echo "$as_me:13338: checking whether sigaction needs _POSIX_SOURCE" >&5
     10584+echo "$as_me:13339: checking whether sigaction needs _POSIX_SOURCE" >&5
    1050210585 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
    1050310586 cat >conftest.$ac_ext <<_ACEOF
    1050410587-#line 12935 "configure"
    10505 +#line 13341 "configure"
     10588+#line 13342 "configure"
    1050610589 #include "confdefs.h"
    1050710590 
    1050810591 #include <sys/types.h>
    10509 @@ -12946,16 +13352,16 @@
     10592@@ -12946,16 +13353,16 @@
    1051010593 }
    1051110594 _ACEOF
    1051210595 rm -f conftest.$ac_objext
    1051310596-if { (eval echo "$as_me:12949: \"$ac_compile\"") >&5
    10514 +if { (eval echo "$as_me:13355: \"$ac_compile\"") >&5
     10597+if { (eval echo "$as_me:13356: \"$ac_compile\"") >&5
    1051510598   (eval $ac_compile) 2>&5
    1051610599   ac_status=$?
    1051710600-  echo "$as_me:12952: \$? = $ac_status" >&5
    10518 +  echo "$as_me:13358: \$? = $ac_status" >&5
     10601+  echo "$as_me:13359: \$? = $ac_status" >&5
    1051910602   (exit $ac_status); } &&
    1052010603          { ac_try='test -s conftest.$ac_objext'
    1052110604-  { (eval echo "$as_me:12955: \"$ac_try\"") >&5
    10522 +  { (eval echo "$as_me:13361: \"$ac_try\"") >&5
     10605+  { (eval echo "$as_me:13362: \"$ac_try\"") >&5
    1052310606   (eval $ac_try) 2>&5
    1052410607   ac_status=$?
    1052510608-  echo "$as_me:12958: \$? = $ac_status" >&5
    10526 +  echo "$as_me:13364: \$? = $ac_status" >&5
     10609+  echo "$as_me:13365: \$? = $ac_status" >&5
    1052710610   (exit $ac_status); }; }; then
    1052810611   sigact_bad=no
    1052910612 else
    10530 @@ -12963,7 +13369,7 @@
     10613@@ -12963,7 +13370,7 @@
    1053110614 cat conftest.$ac_ext >&5
    1053210615 
    1053310616 cat >conftest.$ac_ext <<_ACEOF
    1053410617-#line 12966 "configure"
    10535 +#line 13372 "configure"
     10618+#line 13373 "configure"
    1053610619 #include "confdefs.h"
    1053710620 
    1053810621 #define _POSIX_SOURCE
    10539 @@ -12978,16 +13384,16 @@
     10622@@ -12978,16 +13385,16 @@
    1054010623 }
    1054110624 _ACEOF
    1054210625 rm -f conftest.$ac_objext
    1054310626-if { (eval echo "$as_me:12981: \"$ac_compile\"") >&5
    10544 +if { (eval echo "$as_me:13387: \"$ac_compile\"") >&5
     10627+if { (eval echo "$as_me:13388: \"$ac_compile\"") >&5
    1054510628   (eval $ac_compile) 2>&5
    1054610629   ac_status=$?
    1054710630-  echo "$as_me:12984: \$? = $ac_status" >&5
    10548 +  echo "$as_me:13390: \$? = $ac_status" >&5
     10631+  echo "$as_me:13391: \$? = $ac_status" >&5
    1054910632   (exit $ac_status); } &&
    1055010633          { ac_try='test -s conftest.$ac_objext'
    1055110634-  { (eval echo "$as_me:12987: \"$ac_try\"") >&5
    10552 +  { (eval echo "$as_me:13393: \"$ac_try\"") >&5
     10635+  { (eval echo "$as_me:13394: \"$ac_try\"") >&5
    1055310636   (eval $ac_try) 2>&5
    1055410637   ac_status=$?
    1055510638-  echo "$as_me:12990: \$? = $ac_status" >&5
    10556 +  echo "$as_me:13396: \$? = $ac_status" >&5
     10639+  echo "$as_me:13397: \$? = $ac_status" >&5
    1055710640   (exit $ac_status); }; }; then
    1055810641   sigact_bad=yes
    1055910642         cat >>confdefs.h <<\EOF
    10560 @@ -13002,11 +13408,11 @@
     10643@@ -13002,11 +13409,11 @@
    1056110644 rm -f conftest.$ac_objext conftest.$ac_ext
    1056210645 fi
    1056310646 rm -f conftest.$ac_objext conftest.$ac_ext
    1056410647-echo "$as_me:13005: result: $sigact_bad" >&5
    10565 +echo "$as_me:13411: result: $sigact_bad" >&5
     10648+echo "$as_me:13412: result: $sigact_bad" >&5
    1056610649 echo "${ECHO_T}$sigact_bad" >&6
    1056710650 fi
    1056810651 
    1056910652-echo "$as_me:13009: checking if nanosleep really works" >&5
    10570 +echo "$as_me:13415: checking if nanosleep really works" >&5
     10653+echo "$as_me:13416: checking if nanosleep really works" >&5
    1057110654 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
    1057210655 if test "${cf_cv_func_nanosleep+set}" = set; then
    1057310656   echo $ECHO_N "(cached) $ECHO_C" >&6
    10574 @@ -13016,7 +13422,7 @@
     10657@@ -13016,7 +13423,7 @@
    1057510658   cf_cv_func_nanosleep=unknown
    1057610659 else
    1057710660   cat >conftest.$ac_ext <<_ACEOF
    1057810661-#line 13019 "configure"
    10579 +#line 13425 "configure"
     10662+#line 13426 "configure"
    1058010663 #include "confdefs.h"
    1058110664 
    1058210665 #include <stdio.h>
    10583 @@ -13041,15 +13447,15 @@
     10666@@ -13041,15 +13448,15 @@
    1058410667 
    1058510668 _ACEOF
    1058610669 rm -f conftest$ac_exeext
    1058710670-if { (eval echo "$as_me:13044: \"$ac_link\"") >&5
    10588 +if { (eval echo "$as_me:13450: \"$ac_link\"") >&5
     10671+if { (eval echo "$as_me:13451: \"$ac_link\"") >&5
    1058910672   (eval $ac_link) 2>&5
    1059010673   ac_status=$?
    1059110674-  echo "$as_me:13047: \$? = $ac_status" >&5
    10592 +  echo "$as_me:13453: \$? = $ac_status" >&5
     10675+  echo "$as_me:13454: \$? = $ac_status" >&5
    1059310676   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    1059410677-  { (eval echo "$as_me:13049: \"$ac_try\"") >&5
    10595 +  { (eval echo "$as_me:13455: \"$ac_try\"") >&5
     10678+  { (eval echo "$as_me:13456: \"$ac_try\"") >&5
    1059610679   (eval $ac_try) 2>&5
    1059710680   ac_status=$?
    1059810681-  echo "$as_me:13052: \$? = $ac_status" >&5
    10599 +  echo "$as_me:13458: \$? = $ac_status" >&5
     10682+  echo "$as_me:13459: \$? = $ac_status" >&5
    1060010683   (exit $ac_status); }; }; then
    1060110684   cf_cv_func_nanosleep=yes
    1060210685 else
    10603 @@ -13061,7 +13467,7 @@
     10686@@ -13061,7 +13468,7 @@
    1060410687 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
    1060510688 fi
    1060610689 fi
    1060710690-echo "$as_me:13064: result: $cf_cv_func_nanosleep" >&5
    10608 +echo "$as_me:13470: result: $cf_cv_func_nanosleep" >&5
     10691+echo "$as_me:13471: result: $cf_cv_func_nanosleep" >&5
    1060910692 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
    1061010693 
    1061110694 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
    10612 @@ -13075,23 +13481,23 @@
     10695@@ -13075,23 +13482,23 @@
    1061310696 
    1061410697 do
    1061510698 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
    1061610699-echo "$as_me:13078: checking for $ac_header" >&5
    10617 +echo "$as_me:13484: checking for $ac_header" >&5
     10700+echo "$as_me:13485: checking for $ac_header" >&5
    1061810701 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
    1061910702 if eval "test \"\${$as_ac_Header+set}\" = set"; then
     
    1062210705   cat >conftest.$ac_ext <<_ACEOF
    1062310706-#line 13084 "configure"
    10624 +#line 13490 "configure"
     10707+#line 13491 "configure"
    1062510708 #include "confdefs.h"
    1062610709 #include <$ac_header>
    1062710710 _ACEOF
    1062810711-if { (eval echo "$as_me:13088: \"$ac_cpp conftest.$ac_ext\"") >&5
    10629 +if { (eval echo "$as_me:13494: \"$ac_cpp conftest.$ac_ext\"") >&5
     10712+if { (eval echo "$as_me:13495: \"$ac_cpp conftest.$ac_ext\"") >&5
    1063010713   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
    1063110714   ac_status=$?
     
    1063410717   cat conftest.err >&5
    1063510718-  echo "$as_me:13094: \$? = $ac_status" >&5
    10636 +  echo "$as_me:13500: \$? = $ac_status" >&5
     10719+  echo "$as_me:13501: \$? = $ac_status" >&5
    1063710720   (exit $ac_status); } >/dev/null; then
    1063810721   if test -s conftest.err; then
    1063910722     ac_cpp_err=$ac_c_preproc_warn_flag
    10640 @@ -13110,7 +13516,7 @@
     10723@@ -13110,7 +13517,7 @@
    1064110724 fi
    1064210725 rm -f conftest.err conftest.$ac_ext
    1064310726 fi
    1064410727-echo "$as_me:13113: result: `eval echo '${'$as_ac_Header'}'`" >&5
    10645 +echo "$as_me:13519: result: `eval echo '${'$as_ac_Header'}'`" >&5
     10728+echo "$as_me:13520: result: `eval echo '${'$as_ac_Header'}'`" >&5
    1064610729 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
    1064710730 if test `eval echo '${'$as_ac_Header'}'` = yes; then
    1064810731   cat >>confdefs.h <<EOF
    10649 @@ -13125,23 +13531,23 @@
     10732@@ -13125,23 +13532,23 @@
    1065010733 for ac_header in sys/termio.h
    1065110734 do
    1065210735 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
    1065310736-echo "$as_me:13128: checking for $ac_header" >&5
    10654 +echo "$as_me:13534: checking for $ac_header" >&5
     10737+echo "$as_me:13535: checking for $ac_header" >&5
    1065510738 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
    1065610739 if eval "test \"\${$as_ac_Header+set}\" = set"; then
     
    1065910742   cat >conftest.$ac_ext <<_ACEOF
    1066010743-#line 13134 "configure"
    10661 +#line 13540 "configure"
     10744+#line 13541 "configure"
    1066210745 #include "confdefs.h"
    1066310746 #include <$ac_header>
    1066410747 _ACEOF
    1066510748-if { (eval echo "$as_me:13138: \"$ac_cpp conftest.$ac_ext\"") >&5
    10666 +if { (eval echo "$as_me:13544: \"$ac_cpp conftest.$ac_ext\"") >&5
     10749+if { (eval echo "$as_me:13545: \"$ac_cpp conftest.$ac_ext\"") >&5
    1066710750   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
    1066810751   ac_status=$?
     
    1067110754   cat conftest.err >&5
    1067210755-  echo "$as_me:13144: \$? = $ac_status" >&5
    10673 +  echo "$as_me:13550: \$? = $ac_status" >&5
     10756+  echo "$as_me:13551: \$? = $ac_status" >&5
    1067410757   (exit $ac_status); } >/dev/null; then
    1067510758   if test -s conftest.err; then
    1067610759     ac_cpp_err=$ac_c_preproc_warn_flag
    10677 @@ -13160,7 +13566,7 @@
     10760@@ -13160,7 +13567,7 @@
    1067810761 fi
    1067910762 rm -f conftest.err conftest.$ac_ext
    1068010763 fi
    1068110764-echo "$as_me:13163: result: `eval echo '${'$as_ac_Header'}'`" >&5
    10682 +echo "$as_me:13569: result: `eval echo '${'$as_ac_Header'}'`" >&5
     10765+echo "$as_me:13570: result: `eval echo '${'$as_ac_Header'}'`" >&5
    1068310766 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
    1068410767 if test `eval echo '${'$as_ac_Header'}'` = yes; then
    1068510768   cat >>confdefs.h <<EOF
    10686 @@ -13178,10 +13584,10 @@
     10769@@ -13178,10 +13585,10 @@
    1068710770        *)      termios_bad=maybe ;;
    1068810771        esac
    1068910772        if test "$termios_bad" = maybe ; then
    1069010773-       echo "$as_me:13181: checking whether termios.h needs _POSIX_SOURCE" >&5
    10691 +       echo "$as_me:13587: checking whether termios.h needs _POSIX_SOURCE" >&5
     10774+       echo "$as_me:13588: checking whether termios.h needs _POSIX_SOURCE" >&5
    1069210775 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
    1069310776        cat >conftest.$ac_ext <<_ACEOF
    1069410777-#line 13184 "configure"
    10695 +#line 13590 "configure"
     10778+#line 13591 "configure"
    1069610779 #include "confdefs.h"
    1069710780 #include <termios.h>
    1069810781 int
    10699 @@ -13193,16 +13599,16 @@
     10782@@ -13193,16 +13600,16 @@
    1070010783 }
    1070110784 _ACEOF
    1070210785 rm -f conftest.$ac_objext
    1070310786-if { (eval echo "$as_me:13196: \"$ac_compile\"") >&5
    10704 +if { (eval echo "$as_me:13602: \"$ac_compile\"") >&5
     10787+if { (eval echo "$as_me:13603: \"$ac_compile\"") >&5
    1070510788   (eval $ac_compile) 2>&5
    1070610789   ac_status=$?
    1070710790-  echo "$as_me:13199: \$? = $ac_status" >&5
    10708 +  echo "$as_me:13605: \$? = $ac_status" >&5
     10791+  echo "$as_me:13606: \$? = $ac_status" >&5
    1070910792   (exit $ac_status); } &&
    1071010793          { ac_try='test -s conftest.$ac_objext'
    1071110794-  { (eval echo "$as_me:13202: \"$ac_try\"") >&5
    10712 +  { (eval echo "$as_me:13608: \"$ac_try\"") >&5
     10795+  { (eval echo "$as_me:13609: \"$ac_try\"") >&5
    1071310796   (eval $ac_try) 2>&5
    1071410797   ac_status=$?
    1071510798-  echo "$as_me:13205: \$? = $ac_status" >&5
    10716 +  echo "$as_me:13611: \$? = $ac_status" >&5
     10799+  echo "$as_me:13612: \$? = $ac_status" >&5
    1071710800   (exit $ac_status); }; }; then
    1071810801   termios_bad=no
    1071910802 else
    10720 @@ -13210,7 +13616,7 @@
     10803@@ -13210,7 +13617,7 @@
    1072110804 cat conftest.$ac_ext >&5
    1072210805 
    1072310806                cat >conftest.$ac_ext <<_ACEOF
    1072410807-#line 13213 "configure"
    10725 +#line 13619 "configure"
     10808+#line 13620 "configure"
    1072610809 #include "confdefs.h"
    1072710810 
    1072810811 #define _POSIX_SOURCE
    10729 @@ -13224,16 +13630,16 @@
     10812@@ -13224,16 +13631,16 @@
    1073010813 }
    1073110814 _ACEOF
    1073210815 rm -f conftest.$ac_objext
    1073310816-if { (eval echo "$as_me:13227: \"$ac_compile\"") >&5
    10734 +if { (eval echo "$as_me:13633: \"$ac_compile\"") >&5
     10817+if { (eval echo "$as_me:13634: \"$ac_compile\"") >&5
    1073510818   (eval $ac_compile) 2>&5
    1073610819   ac_status=$?
    1073710820-  echo "$as_me:13230: \$? = $ac_status" >&5
    10738 +  echo "$as_me:13636: \$? = $ac_status" >&5
     10821+  echo "$as_me:13637: \$? = $ac_status" >&5
    1073910822   (exit $ac_status); } &&
    1074010823          { ac_try='test -s conftest.$ac_objext'
    1074110824-  { (eval echo "$as_me:13233: \"$ac_try\"") >&5
    10742 +  { (eval echo "$as_me:13639: \"$ac_try\"") >&5
     10825+  { (eval echo "$as_me:13640: \"$ac_try\"") >&5
    1074310826   (eval $ac_try) 2>&5
    1074410827   ac_status=$?
    1074510828-  echo "$as_me:13236: \$? = $ac_status" >&5
    10746 +  echo "$as_me:13642: \$? = $ac_status" >&5
     10829+  echo "$as_me:13643: \$? = $ac_status" >&5
    1074710830   (exit $ac_status); }; }; then
    1074810831   termios_bad=unknown
    1074910832 else
    10750 @@ -13248,19 +13654,19 @@
     10833@@ -13248,19 +13655,19 @@
    1075110834 
    1075210835 fi
    1075310836 rm -f conftest.$ac_objext conftest.$ac_ext
    1075410837-       echo "$as_me:13251: result: $termios_bad" >&5
    10755 +       echo "$as_me:13657: result: $termios_bad" >&5
     10838+       echo "$as_me:13658: result: $termios_bad" >&5
    1075610839 echo "${ECHO_T}$termios_bad" >&6
    1075710840        fi
     
    1075910842 
    1076010843-echo "$as_me:13256: checking for tcgetattr" >&5
    10761 +echo "$as_me:13662: checking for tcgetattr" >&5
     10844+echo "$as_me:13663: checking for tcgetattr" >&5
    1076210845 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
    1076310846 if test "${cf_cv_have_tcgetattr+set}" = set; then
     
    1076710850 cat >conftest.$ac_ext <<_ACEOF
    1076810851-#line 13263 "configure"
    10769 +#line 13669 "configure"
     10852+#line 13670 "configure"
    1077010853 #include "confdefs.h"
    1077110854 
    1077210855 #include <sys/types.h>
    10773 @@ -13288,16 +13694,16 @@
     10856@@ -13288,16 +13695,16 @@
    1077410857 }
    1077510858 _ACEOF
    1077610859 rm -f conftest.$ac_objext conftest$ac_exeext
    1077710860-if { (eval echo "$as_me:13291: \"$ac_link\"") >&5
    10778 +if { (eval echo "$as_me:13697: \"$ac_link\"") >&5
     10861+if { (eval echo "$as_me:13698: \"$ac_link\"") >&5
    1077910862   (eval $ac_link) 2>&5
    1078010863   ac_status=$?
    1078110864-  echo "$as_me:13294: \$? = $ac_status" >&5
    10782 +  echo "$as_me:13700: \$? = $ac_status" >&5
     10865+  echo "$as_me:13701: \$? = $ac_status" >&5
    1078310866   (exit $ac_status); } &&
    1078410867          { ac_try='test -s conftest$ac_exeext'
    1078510868-  { (eval echo "$as_me:13297: \"$ac_try\"") >&5
    10786 +  { (eval echo "$as_me:13703: \"$ac_try\"") >&5
     10869+  { (eval echo "$as_me:13704: \"$ac_try\"") >&5
    1078710870   (eval $ac_try) 2>&5
    1078810871   ac_status=$?
    1078910872-  echo "$as_me:13300: \$? = $ac_status" >&5
    10790 +  echo "$as_me:13706: \$? = $ac_status" >&5
     10873+  echo "$as_me:13707: \$? = $ac_status" >&5
    1079110874   (exit $ac_status); }; }; then
    1079210875   cf_cv_have_tcgetattr=yes
    1079310876 else
    10794 @@ -13307,20 +13713,20 @@
     10877@@ -13307,20 +13714,20 @@
    1079510878 fi
    1079610879 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    1079710880 fi
    1079810881-echo "$as_me:13310: result: $cf_cv_have_tcgetattr" >&5
    10799 +echo "$as_me:13716: result: $cf_cv_have_tcgetattr" >&5
     10882+echo "$as_me:13717: result: $cf_cv_have_tcgetattr" >&5
    1080010883 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
    1080110884 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
     
    1080410887 
    1080510888-echo "$as_me:13316: checking for vsscanf function or workaround" >&5
    10806 +echo "$as_me:13722: checking for vsscanf function or workaround" >&5
     10889+echo "$as_me:13723: checking for vsscanf function or workaround" >&5
    1080710890 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
    1080810891 if test "${cf_cv_func_vsscanf+set}" = set; then
     
    1081210895 cat >conftest.$ac_ext <<_ACEOF
    1081310896-#line 13323 "configure"
    10814 +#line 13729 "configure"
     10897+#line 13730 "configure"
    1081510898 #include "confdefs.h"
    1081610899 
    1081710900 #include <stdarg.h>
    10818 @@ -13336,16 +13742,16 @@
     10901@@ -13336,16 +13743,16 @@
    1081910902 }
    1082010903 _ACEOF
    1082110904 rm -f conftest.$ac_objext conftest$ac_exeext
    1082210905-if { (eval echo "$as_me:13339: \"$ac_link\"") >&5
    10823 +if { (eval echo "$as_me:13745: \"$ac_link\"") >&5
     10906+if { (eval echo "$as_me:13746: \"$ac_link\"") >&5
    1082410907   (eval $ac_link) 2>&5
    1082510908   ac_status=$?
    1082610909-  echo "$as_me:13342: \$? = $ac_status" >&5
    10827 +  echo "$as_me:13748: \$? = $ac_status" >&5
     10910+  echo "$as_me:13749: \$? = $ac_status" >&5
    1082810911   (exit $ac_status); } &&
    1082910912          { ac_try='test -s conftest$ac_exeext'
    1083010913-  { (eval echo "$as_me:13345: \"$ac_try\"") >&5
    10831 +  { (eval echo "$as_me:13751: \"$ac_try\"") >&5
     10914+  { (eval echo "$as_me:13752: \"$ac_try\"") >&5
    1083210915   (eval $ac_try) 2>&5
    1083310916   ac_status=$?
    1083410917-  echo "$as_me:13348: \$? = $ac_status" >&5
    10835 +  echo "$as_me:13754: \$? = $ac_status" >&5
     10918+  echo "$as_me:13755: \$? = $ac_status" >&5
    1083610919   (exit $ac_status); }; }; then
    1083710920   cf_cv_func_vsscanf=vsscanf
    1083810921 else
    10839 @@ -13353,7 +13759,7 @@
     10922@@ -13353,7 +13760,7 @@
    1084010923 cat conftest.$ac_ext >&5
    1084110924 
    1084210925 cat >conftest.$ac_ext <<_ACEOF
    1084310926-#line 13356 "configure"
    10844 +#line 13762 "configure"
     10927+#line 13763 "configure"
    1084510928 #include "confdefs.h"
    1084610929 
    1084710930 #include <stdarg.h>
    10848 @@ -13375,16 +13781,16 @@
     10931@@ -13375,16 +13782,16 @@
    1084910932 }
    1085010933 _ACEOF
    1085110934 rm -f conftest.$ac_objext conftest$ac_exeext
    1085210935-if { (eval echo "$as_me:13378: \"$ac_link\"") >&5
    10853 +if { (eval echo "$as_me:13784: \"$ac_link\"") >&5
     10936+if { (eval echo "$as_me:13785: \"$ac_link\"") >&5
    1085410937   (eval $ac_link) 2>&5
    1085510938   ac_status=$?
    1085610939-  echo "$as_me:13381: \$? = $ac_status" >&5
    10857 +  echo "$as_me:13787: \$? = $ac_status" >&5
     10940+  echo "$as_me:13788: \$? = $ac_status" >&5
    1085810941   (exit $ac_status); } &&
    1085910942          { ac_try='test -s conftest$ac_exeext'
    1086010943-  { (eval echo "$as_me:13384: \"$ac_try\"") >&5
    10861 +  { (eval echo "$as_me:13790: \"$ac_try\"") >&5
     10944+  { (eval echo "$as_me:13791: \"$ac_try\"") >&5
    1086210945   (eval $ac_try) 2>&5
    1086310946   ac_status=$?
    1086410947-  echo "$as_me:13387: \$? = $ac_status" >&5
    10865 +  echo "$as_me:13793: \$? = $ac_status" >&5
     10948+  echo "$as_me:13794: \$? = $ac_status" >&5
    1086610949   (exit $ac_status); }; }; then
    1086710950   cf_cv_func_vsscanf=vfscanf
    1086810951 else
    10869 @@ -13392,7 +13798,7 @@
     10952@@ -13392,7 +13799,7 @@
    1087010953 cat conftest.$ac_ext >&5
    1087110954 
    1087210955 cat >conftest.$ac_ext <<_ACEOF
    1087310956-#line 13395 "configure"
    10874 +#line 13801 "configure"
     10957+#line 13802 "configure"
    1087510958 #include "confdefs.h"
    1087610959 
    1087710960 #include <stdarg.h>
    10878 @@ -13414,16 +13820,16 @@
     10961@@ -13414,16 +13821,16 @@
    1087910962 }
    1088010963 _ACEOF
    1088110964 rm -f conftest.$ac_objext conftest$ac_exeext
    1088210965-if { (eval echo "$as_me:13417: \"$ac_link\"") >&5
    10883 +if { (eval echo "$as_me:13823: \"$ac_link\"") >&5
     10966+if { (eval echo "$as_me:13824: \"$ac_link\"") >&5
    1088410967   (eval $ac_link) 2>&5
    1088510968   ac_status=$?
    1088610969-  echo "$as_me:13420: \$? = $ac_status" >&5
    10887 +  echo "$as_me:13826: \$? = $ac_status" >&5
     10970+  echo "$as_me:13827: \$? = $ac_status" >&5
    1088810971   (exit $ac_status); } &&
    1088910972          { ac_try='test -s conftest$ac_exeext'
    1089010973-  { (eval echo "$as_me:13423: \"$ac_try\"") >&5
    10891 +  { (eval echo "$as_me:13829: \"$ac_try\"") >&5
     10974+  { (eval echo "$as_me:13830: \"$ac_try\"") >&5
    1089210975   (eval $ac_try) 2>&5
    1089310976   ac_status=$?
    1089410977-  echo "$as_me:13426: \$? = $ac_status" >&5
    10895 +  echo "$as_me:13832: \$? = $ac_status" >&5
     10978+  echo "$as_me:13833: \$? = $ac_status" >&5
    1089610979   (exit $ac_status); }; }; then
    1089710980   cf_cv_func_vsscanf=_doscan
    1089810981 else
    10899 @@ -13438,7 +13844,7 @@
     10982@@ -13438,7 +13845,7 @@
    1090010983 fi
    1090110984 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    1090210985 fi
    1090310986-echo "$as_me:13441: result: $cf_cv_func_vsscanf" >&5
    10904 +echo "$as_me:13847: result: $cf_cv_func_vsscanf" >&5
     10987+echo "$as_me:13848: result: $cf_cv_func_vsscanf" >&5
    1090510988 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
    1090610989 
    1090710990 case $cf_cv_func_vsscanf in #(vi
    10908 @@ -13456,7 +13862,7 @@
     10991@@ -13456,7 +13863,7 @@
    1090910992 ;;
    1091010993 esac
    1091110994 
    1091210995-echo "$as_me:13459: checking for working mkstemp" >&5
    10913 +echo "$as_me:13865: checking for working mkstemp" >&5
     10996+echo "$as_me:13866: checking for working mkstemp" >&5
    1091410997 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
    1091510998 if test "${cf_cv_func_mkstemp+set}" = set; then
    1091610999   echo $ECHO_N "(cached) $ECHO_C" >&6
    10917 @@ -13464,13 +13870,13 @@
     11000@@ -13464,13 +13871,13 @@
    1091811001 
    1091911002 rm -f conftest*
    1092011003 if test "$cross_compiling" = yes; then
    1092111004-  echo "$as_me:13467: checking for mkstemp" >&5
    10922 +  echo "$as_me:13873: checking for mkstemp" >&5
     11005+  echo "$as_me:13874: checking for mkstemp" >&5
    1092311006 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
    1092411007 if test "${ac_cv_func_mkstemp+set}" = set; then
     
    1092711010   cat >conftest.$ac_ext <<_ACEOF
    1092811011-#line 13473 "configure"
    10929 +#line 13879 "configure"
     11012+#line 13880 "configure"
    1093011013 #include "confdefs.h"
    1093111014 /* System header to define __stub macros and hopefully few prototypes,
    1093211015     which can conflict with char mkstemp (); below.  */
    10933 @@ -13501,16 +13907,16 @@
     11016@@ -13501,16 +13908,16 @@
    1093411017 }
    1093511018 _ACEOF
    1093611019 rm -f conftest.$ac_objext conftest$ac_exeext
    1093711020-if { (eval echo "$as_me:13504: \"$ac_link\"") >&5
    10938 +if { (eval echo "$as_me:13910: \"$ac_link\"") >&5
     11021+if { (eval echo "$as_me:13911: \"$ac_link\"") >&5
    1093911022   (eval $ac_link) 2>&5
    1094011023   ac_status=$?
    1094111024-  echo "$as_me:13507: \$? = $ac_status" >&5
    10942 +  echo "$as_me:13913: \$? = $ac_status" >&5
     11025+  echo "$as_me:13914: \$? = $ac_status" >&5
    1094311026   (exit $ac_status); } &&
    1094411027          { ac_try='test -s conftest$ac_exeext'
    1094511028-  { (eval echo "$as_me:13510: \"$ac_try\"") >&5
    10946 +  { (eval echo "$as_me:13916: \"$ac_try\"") >&5
     11029+  { (eval echo "$as_me:13917: \"$ac_try\"") >&5
    1094711030   (eval $ac_try) 2>&5
    1094811031   ac_status=$?
    1094911032-  echo "$as_me:13513: \$? = $ac_status" >&5
    10950 +  echo "$as_me:13919: \$? = $ac_status" >&5
     11033+  echo "$as_me:13920: \$? = $ac_status" >&5
    1095111034   (exit $ac_status); }; }; then
    1095211035   ac_cv_func_mkstemp=yes
    1095311036 else
    10954 @@ -13520,12 +13926,12 @@
     11037@@ -13520,12 +13927,12 @@
    1095511038 fi
    1095611039 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    1095711040 fi
    1095811041-echo "$as_me:13523: result: $ac_cv_func_mkstemp" >&5
    10959 +echo "$as_me:13929: result: $ac_cv_func_mkstemp" >&5
     11042+echo "$as_me:13930: result: $ac_cv_func_mkstemp" >&5
    1096011043 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
    1096111044 
     
    1096311046   cat >conftest.$ac_ext <<_ACEOF
    1096411047-#line 13528 "configure"
    10965 +#line 13934 "configure"
     11048+#line 13935 "configure"
    1096611049 #include "confdefs.h"
    1096711050 
    1096811051 #include <sys/types.h>
    10969 @@ -13563,15 +13969,15 @@
     11052@@ -13563,15 +13970,15 @@
    1097011053 
    1097111054 _ACEOF
    1097211055 rm -f conftest$ac_exeext
    1097311056-if { (eval echo "$as_me:13566: \"$ac_link\"") >&5
    10974 +if { (eval echo "$as_me:13972: \"$ac_link\"") >&5
     11057+if { (eval echo "$as_me:13973: \"$ac_link\"") >&5
    1097511058   (eval $ac_link) 2>&5
    1097611059   ac_status=$?
    1097711060-  echo "$as_me:13569: \$? = $ac_status" >&5
    10978 +  echo "$as_me:13975: \$? = $ac_status" >&5
     11061+  echo "$as_me:13976: \$? = $ac_status" >&5
    1097911062   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    1098011063-  { (eval echo "$as_me:13571: \"$ac_try\"") >&5
    10981 +  { (eval echo "$as_me:13977: \"$ac_try\"") >&5
     11064+  { (eval echo "$as_me:13978: \"$ac_try\"") >&5
    1098211065   (eval $ac_try) 2>&5
    1098311066   ac_status=$?
    1098411067-  echo "$as_me:13574: \$? = $ac_status" >&5
    10985 +  echo "$as_me:13980: \$? = $ac_status" >&5
     11068+  echo "$as_me:13981: \$? = $ac_status" >&5
    1098611069   (exit $ac_status); }; }; then
    1098711070   cf_cv_func_mkstemp=yes
    1098811071 
    10989 @@ -13586,7 +13992,7 @@
     11072@@ -13586,7 +13993,7 @@
    1099011073 fi
    1099111074 
    1099211075 fi
    1099311076-echo "$as_me:13589: result: $cf_cv_func_mkstemp" >&5
    10994 +echo "$as_me:13995: result: $cf_cv_func_mkstemp" >&5
     11077+echo "$as_me:13996: result: $cf_cv_func_mkstemp" >&5
    1099511078 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
    1099611079 if test "$cf_cv_func_mkstemp" = yes ; then
    1099711080        cat >>confdefs.h <<\EOF
    10998 @@ -13604,21 +14010,21 @@
     11081@@ -13604,21 +14011,21 @@
    1099911082 fi
    1100011083 
    1100111084 if test "$cross_compiling" = yes ; then
    1100211085-       { echo "$as_me:13607: WARNING: cross compiling: assume setvbuf params not reversed" >&5
    11003 +       { echo "$as_me:14013: WARNING: cross compiling: assume setvbuf params not reversed" >&5
     11086+       { echo "$as_me:14014: WARNING: cross compiling: assume setvbuf params not reversed" >&5
    1100411087 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
    1100511088 else
    1100611089-       echo "$as_me:13610: checking whether setvbuf arguments are reversed" >&5
    11007 +       echo "$as_me:14016: checking whether setvbuf arguments are reversed" >&5
     11090+       echo "$as_me:14017: checking whether setvbuf arguments are reversed" >&5
    1100811091 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
    1100911092 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
     
    1101211095   if test "$cross_compiling" = yes; then
    1101311096-  { { echo "$as_me:13616: error: cannot run test program while cross compiling" >&5
    11014 +  { { echo "$as_me:14022: error: cannot run test program while cross compiling" >&5
     11097+  { { echo "$as_me:14023: error: cannot run test program while cross compiling" >&5
    1101511098 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
    1101611099    { (exit 1); exit 1; }; }
     
    1101811101   cat >conftest.$ac_ext <<_ACEOF
    1101911102-#line 13621 "configure"
    11020 +#line 14027 "configure"
     11103+#line 14028 "configure"
    1102111104 #include "confdefs.h"
    1102211105 #include <stdio.h>
    1102311106 /* If setvbuf has the reversed format, exit 0. */
    11024 @@ -13635,15 +14041,15 @@
     11107@@ -13635,15 +14042,15 @@
    1102511108 }
    1102611109 _ACEOF
    1102711110 rm -f conftest$ac_exeext
    1102811111-if { (eval echo "$as_me:13638: \"$ac_link\"") >&5
    11029 +if { (eval echo "$as_me:14044: \"$ac_link\"") >&5
     11112+if { (eval echo "$as_me:14045: \"$ac_link\"") >&5
    1103011113   (eval $ac_link) 2>&5
    1103111114   ac_status=$?
    1103211115-  echo "$as_me:13641: \$? = $ac_status" >&5
    11033 +  echo "$as_me:14047: \$? = $ac_status" >&5
     11116+  echo "$as_me:14048: \$? = $ac_status" >&5
    1103411117   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    1103511118-  { (eval echo "$as_me:13643: \"$ac_try\"") >&5
    11036 +  { (eval echo "$as_me:14049: \"$ac_try\"") >&5
     11119+  { (eval echo "$as_me:14050: \"$ac_try\"") >&5
    1103711120   (eval $ac_try) 2>&5
    1103811121   ac_status=$?
    1103911122-  echo "$as_me:13646: \$? = $ac_status" >&5
    11040 +  echo "$as_me:14052: \$? = $ac_status" >&5
     11123+  echo "$as_me:14053: \$? = $ac_status" >&5
    1104111124   (exit $ac_status); }; }; then
    1104211125   ac_cv_func_setvbuf_reversed=yes
    1104311126 else
    11044 @@ -13656,7 +14062,7 @@
     11127@@ -13656,7 +14063,7 @@
    1104511128 fi
    1104611129 rm -f core core.* *.core
    1104711130 fi
    1104811131-echo "$as_me:13659: result: $ac_cv_func_setvbuf_reversed" >&5
    11049 +echo "$as_me:14065: result: $ac_cv_func_setvbuf_reversed" >&5
     11132+echo "$as_me:14066: result: $ac_cv_func_setvbuf_reversed" >&5
    1105011133 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
    1105111134 if test $ac_cv_func_setvbuf_reversed = yes; then
    1105211135 
    11053 @@ -13667,13 +14073,13 @@
     11136@@ -13667,13 +14074,13 @@
    1105411137 fi
    1105511138 
    1105611139 fi
    1105711140-echo "$as_me:13670: checking return type of signal handlers" >&5
    11058 +echo "$as_me:14076: checking return type of signal handlers" >&5
     11141+echo "$as_me:14077: checking return type of signal handlers" >&5
    1105911142 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
    1106011143 if test "${ac_cv_type_signal+set}" = set; then
     
    1106311146   cat >conftest.$ac_ext <<_ACEOF
    1106411147-#line 13676 "configure"
    11065 +#line 14082 "configure"
     11148+#line 14083 "configure"
    1106611149 #include "confdefs.h"
    1106711150 #include <sys/types.h>
    1106811151 #include <signal.h>
    11069 @@ -13695,16 +14101,16 @@
     11152@@ -13695,16 +14102,16 @@
    1107011153 }
    1107111154 _ACEOF
    1107211155 rm -f conftest.$ac_objext
    1107311156-if { (eval echo "$as_me:13698: \"$ac_compile\"") >&5
    11074 +if { (eval echo "$as_me:14104: \"$ac_compile\"") >&5
     11157+if { (eval echo "$as_me:14105: \"$ac_compile\"") >&5
    1107511158   (eval $ac_compile) 2>&5
    1107611159   ac_status=$?
    1107711160-  echo "$as_me:13701: \$? = $ac_status" >&5
    11078 +  echo "$as_me:14107: \$? = $ac_status" >&5
     11161+  echo "$as_me:14108: \$? = $ac_status" >&5
    1107911162   (exit $ac_status); } &&
    1108011163          { ac_try='test -s conftest.$ac_objext'
    1108111164-  { (eval echo "$as_me:13704: \"$ac_try\"") >&5
    11082 +  { (eval echo "$as_me:14110: \"$ac_try\"") >&5
     11165+  { (eval echo "$as_me:14111: \"$ac_try\"") >&5
    1108311166   (eval $ac_try) 2>&5
    1108411167   ac_status=$?
    1108511168-  echo "$as_me:13707: \$? = $ac_status" >&5
    11086 +  echo "$as_me:14113: \$? = $ac_status" >&5
     11169+  echo "$as_me:14114: \$? = $ac_status" >&5
    1108711170   (exit $ac_status); }; }; then
    1108811171   ac_cv_type_signal=void
    1108911172 else
    11090 @@ -13714,21 +14120,21 @@
     11173@@ -13714,21 +14121,21 @@
    1109111174 fi
    1109211175 rm -f conftest.$ac_objext conftest.$ac_ext
    1109311176 fi
    1109411177-echo "$as_me:13717: result: $ac_cv_type_signal" >&5
    11095 +echo "$as_me:14123: result: $ac_cv_type_signal" >&5
     11178+echo "$as_me:14124: result: $ac_cv_type_signal" >&5
    1109611179 echo "${ECHO_T}$ac_cv_type_signal" >&6
    1109711180 
     
    1110111184 
    1110211185-echo "$as_me:13724: checking for type sigaction_t" >&5
    11103 +echo "$as_me:14130: checking for type sigaction_t" >&5
     11186+echo "$as_me:14131: checking for type sigaction_t" >&5
    1110411187 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
    1110511188 if test "${cf_cv_type_sigaction+set}" = set; then
     
    1110911192        cat >conftest.$ac_ext <<_ACEOF
    1111011193-#line 13731 "configure"
    11111 +#line 14137 "configure"
     11194+#line 14138 "configure"
    1111211195 #include "confdefs.h"
    1111311196 
    1111411197 #include <signal.h>
    11115 @@ -13741,16 +14147,16 @@
     11198@@ -13741,16 +14148,16 @@
    1111611199 }
    1111711200 _ACEOF
    1111811201 rm -f conftest.$ac_objext
    1111911202-if { (eval echo "$as_me:13744: \"$ac_compile\"") >&5
    11120 +if { (eval echo "$as_me:14150: \"$ac_compile\"") >&5
     11203+if { (eval echo "$as_me:14151: \"$ac_compile\"") >&5
    1112111204   (eval $ac_compile) 2>&5
    1112211205   ac_status=$?
    1112311206-  echo "$as_me:13747: \$? = $ac_status" >&5
    11124 +  echo "$as_me:14153: \$? = $ac_status" >&5
     11207+  echo "$as_me:14154: \$? = $ac_status" >&5
    1112511208   (exit $ac_status); } &&
    1112611209          { ac_try='test -s conftest.$ac_objext'
    1112711210-  { (eval echo "$as_me:13750: \"$ac_try\"") >&5
    11128 +  { (eval echo "$as_me:14156: \"$ac_try\"") >&5
     11211+  { (eval echo "$as_me:14157: \"$ac_try\"") >&5
    1112911212   (eval $ac_try) 2>&5
    1113011213   ac_status=$?
    1113111214-  echo "$as_me:13753: \$? = $ac_status" >&5
    11132 +  echo "$as_me:14159: \$? = $ac_status" >&5
     11215+  echo "$as_me:14160: \$? = $ac_status" >&5
    1113311216   (exit $ac_status); }; }; then
    1113411217   cf_cv_type_sigaction=yes
    1113511218 else
    11136 @@ -13761,13 +14167,13 @@
     11219@@ -13761,13 +14168,13 @@
    1113711220 rm -f conftest.$ac_objext conftest.$ac_ext
    1113811221 fi
    1113911222 
    1114011223-echo "$as_me:13764: result: $cf_cv_type_sigaction" >&5
    11141 +echo "$as_me:14170: result: $cf_cv_type_sigaction" >&5
     11224+echo "$as_me:14171: result: $cf_cv_type_sigaction" >&5
    1114211225 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
    1114311226 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
     
    1114611229 
    1114711230-echo "$as_me:13770: checking declaration of size-change" >&5
    11148 +echo "$as_me:14176: checking declaration of size-change" >&5
     11231+echo "$as_me:14177: checking declaration of size-change" >&5
    1114911232 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
    1115011233 if test "${cf_cv_sizechange+set}" = set; then
    1115111234   echo $ECHO_N "(cached) $ECHO_C" >&6
    11152 @@ -13782,7 +14188,7 @@
     11235@@ -13782,7 +14189,7 @@
    1115311236     CPPFLAGS="$cf_save_CPPFLAGS"
    1115411237     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
    1115511238     cat >conftest.$ac_ext <<_ACEOF
    1115611239-#line 13785 "configure"
    11157 +#line 14191 "configure"
     11240+#line 14192 "configure"
    1115811241 #include "confdefs.h"
    1115911242 #include <sys/types.h>
    1116011243 #ifdef HAVE_TERMIOS_H
    11161 @@ -13826,16 +14232,16 @@
     11244@@ -13826,16 +14233,16 @@
    1116211245 }
    1116311246 _ACEOF
    1116411247 rm -f conftest.$ac_objext
    1116511248-if { (eval echo "$as_me:13829: \"$ac_compile\"") >&5
    11166 +if { (eval echo "$as_me:14235: \"$ac_compile\"") >&5
     11249+if { (eval echo "$as_me:14236: \"$ac_compile\"") >&5
    1116711250   (eval $ac_compile) 2>&5
    1116811251   ac_status=$?
    1116911252-  echo "$as_me:13832: \$? = $ac_status" >&5
    11170 +  echo "$as_me:14238: \$? = $ac_status" >&5
     11253+  echo "$as_me:14239: \$? = $ac_status" >&5
    1117111254   (exit $ac_status); } &&
    1117211255          { ac_try='test -s conftest.$ac_objext'
    1117311256-  { (eval echo "$as_me:13835: \"$ac_try\"") >&5
    11174 +  { (eval echo "$as_me:14241: \"$ac_try\"") >&5
     11257+  { (eval echo "$as_me:14242: \"$ac_try\"") >&5
    1117511258   (eval $ac_try) 2>&5
    1117611259   ac_status=$?
    1117711260-  echo "$as_me:13838: \$? = $ac_status" >&5
    11178 +  echo "$as_me:14244: \$? = $ac_status" >&5
     11261+  echo "$as_me:14245: \$? = $ac_status" >&5
    1117911262   (exit $ac_status); }; }; then
    1118011263   cf_cv_sizechange=yes
    1118111264 else
    11182 @@ -13854,7 +14260,7 @@
     11265@@ -13854,7 +14261,7 @@
    1118311266 done
    1118411267 
    1118511268 fi
    1118611269-echo "$as_me:13857: result: $cf_cv_sizechange" >&5
    11187 +echo "$as_me:14263: result: $cf_cv_sizechange" >&5
     11270+echo "$as_me:14264: result: $cf_cv_sizechange" >&5
    1118811271 echo "${ECHO_T}$cf_cv_sizechange" >&6
    1118911272 if test "$cf_cv_sizechange" != no ; then
    1119011273        cat >>confdefs.h <<\EOF
    11191 @@ -13871,13 +14277,13 @@
     11274@@ -13871,13 +14278,13 @@
    1119211275        esac
    1119311276 fi
    1119411277 
    1119511278-echo "$as_me:13874: checking for memmove" >&5
    11196 +echo "$as_me:14280: checking for memmove" >&5
     11279+echo "$as_me:14281: checking for memmove" >&5
    1119711280 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
    1119811281 if test "${ac_cv_func_memmove+set}" = set; then
     
    1120111284   cat >conftest.$ac_ext <<_ACEOF
    1120211285-#line 13880 "configure"
    11203 +#line 14286 "configure"
     11286+#line 14287 "configure"
    1120411287 #include "confdefs.h"
    1120511288 /* System header to define __stub macros and hopefully few prototypes,
    1120611289     which can conflict with char memmove (); below.  */
    11207 @@ -13908,16 +14314,16 @@
     11290@@ -13908,16 +14315,16 @@
    1120811291 }
    1120911292 _ACEOF
    1121011293 rm -f conftest.$ac_objext conftest$ac_exeext
    1121111294-if { (eval echo "$as_me:13911: \"$ac_link\"") >&5
    11212 +if { (eval echo "$as_me:14317: \"$ac_link\"") >&5
     11295+if { (eval echo "$as_me:14318: \"$ac_link\"") >&5
    1121311296   (eval $ac_link) 2>&5
    1121411297   ac_status=$?
    1121511298-  echo "$as_me:13914: \$? = $ac_status" >&5
    11216 +  echo "$as_me:14320: \$? = $ac_status" >&5
     11299+  echo "$as_me:14321: \$? = $ac_status" >&5
    1121711300   (exit $ac_status); } &&
    1121811301          { ac_try='test -s conftest$ac_exeext'
    1121911302-  { (eval echo "$as_me:13917: \"$ac_try\"") >&5
    11220 +  { (eval echo "$as_me:14323: \"$ac_try\"") >&5
     11303+  { (eval echo "$as_me:14324: \"$ac_try\"") >&5
    1122111304   (eval $ac_try) 2>&5
    1122211305   ac_status=$?
    1122311306-  echo "$as_me:13920: \$? = $ac_status" >&5
    11224 +  echo "$as_me:14326: \$? = $ac_status" >&5
     11307+  echo "$as_me:14327: \$? = $ac_status" >&5
    1122511308   (exit $ac_status); }; }; then
    1122611309   ac_cv_func_memmove=yes
    1122711310 else
    11228 @@ -13927,19 +14333,19 @@
     11311@@ -13927,19 +14334,19 @@
    1122911312 fi
    1123011313 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    1123111314 fi
    1123211315-echo "$as_me:13930: result: $ac_cv_func_memmove" >&5
    11233 +echo "$as_me:14336: result: $ac_cv_func_memmove" >&5
     11316+echo "$as_me:14337: result: $ac_cv_func_memmove" >&5
    1123411317 echo "${ECHO_T}$ac_cv_func_memmove" >&6
    1123511318 if test $ac_cv_func_memmove = yes; then
     
    1123811321 
    1123911322-echo "$as_me:13936: checking for bcopy" >&5
    11240 +echo "$as_me:14342: checking for bcopy" >&5
     11323+echo "$as_me:14343: checking for bcopy" >&5
    1124111324 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
    1124211325 if test "${ac_cv_func_bcopy+set}" = set; then
     
    1124511328   cat >conftest.$ac_ext <<_ACEOF
    1124611329-#line 13942 "configure"
    11247 +#line 14348 "configure"
     11330+#line 14349 "configure"
    1124811331 #include "confdefs.h"
    1124911332 /* System header to define __stub macros and hopefully few prototypes,
    1125011333     which can conflict with char bcopy (); below.  */
    11251 @@ -13970,16 +14376,16 @@
     11334@@ -13970,16 +14377,16 @@
    1125211335 }
    1125311336 _ACEOF
    1125411337 rm -f conftest.$ac_objext conftest$ac_exeext
    1125511338-if { (eval echo "$as_me:13973: \"$ac_link\"") >&5
    11256 +if { (eval echo "$as_me:14379: \"$ac_link\"") >&5
     11339+if { (eval echo "$as_me:14380: \"$ac_link\"") >&5
    1125711340   (eval $ac_link) 2>&5
    1125811341   ac_status=$?
    1125911342-  echo "$as_me:13976: \$? = $ac_status" >&5
    11260 +  echo "$as_me:14382: \$? = $ac_status" >&5
     11343+  echo "$as_me:14383: \$? = $ac_status" >&5
    1126111344   (exit $ac_status); } &&
    1126211345          { ac_try='test -s conftest$ac_exeext'
    1126311346-  { (eval echo "$as_me:13979: \"$ac_try\"") >&5
    11264 +  { (eval echo "$as_me:14385: \"$ac_try\"") >&5
     11347+  { (eval echo "$as_me:14386: \"$ac_try\"") >&5
    1126511348   (eval $ac_try) 2>&5
    1126611349   ac_status=$?
    1126711350-  echo "$as_me:13982: \$? = $ac_status" >&5
    11268 +  echo "$as_me:14388: \$? = $ac_status" >&5
     11351+  echo "$as_me:14389: \$? = $ac_status" >&5
    1126911352   (exit $ac_status); }; }; then
    1127011353   ac_cv_func_bcopy=yes
    1127111354 else
    11272 @@ -13989,11 +14395,11 @@
     11355@@ -13989,11 +14396,11 @@
    1127311356 fi
    1127411357 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    1127511358 fi
    1127611359-echo "$as_me:13992: result: $ac_cv_func_bcopy" >&5
    11277 +echo "$as_me:14398: result: $ac_cv_func_bcopy" >&5
     11360+echo "$as_me:14399: result: $ac_cv_func_bcopy" >&5
    1127811361 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
    1127911362 if test $ac_cv_func_bcopy = yes; then
    1128011363 
    1128111364-       echo "$as_me:13996: checking if bcopy does overlapping moves" >&5
    11282 +       echo "$as_me:14402: checking if bcopy does overlapping moves" >&5
     11365+       echo "$as_me:14403: checking if bcopy does overlapping moves" >&5
    1128311366 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
    1128411367 if test "${cf_cv_good_bcopy+set}" = set; then
    1128511368   echo $ECHO_N "(cached) $ECHO_C" >&6
    11286 @@ -14003,7 +14409,7 @@
     11369@@ -14003,7 +14410,7 @@
    1128711370   cf_cv_good_bcopy=unknown
    1128811371 else
    1128911372   cat >conftest.$ac_ext <<_ACEOF
    1129011373-#line 14006 "configure"
    11291 +#line 14412 "configure"
     11374+#line 14413 "configure"
    1129211375 #include "confdefs.h"
    1129311376 
    1129411377 int main() {
    11295 @@ -14017,15 +14423,15 @@
     11378@@ -14017,15 +14424,15 @@
    1129611379 
    1129711380 _ACEOF
    1129811381 rm -f conftest$ac_exeext
    1129911382-if { (eval echo "$as_me:14020: \"$ac_link\"") >&5
    11300 +if { (eval echo "$as_me:14426: \"$ac_link\"") >&5
     11383+if { (eval echo "$as_me:14427: \"$ac_link\"") >&5
    1130111384   (eval $ac_link) 2>&5
    1130211385   ac_status=$?
    1130311386-  echo "$as_me:14023: \$? = $ac_status" >&5
    11304 +  echo "$as_me:14429: \$? = $ac_status" >&5
     11387+  echo "$as_me:14430: \$? = $ac_status" >&5
    1130511388   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    1130611389-  { (eval echo "$as_me:14025: \"$ac_try\"") >&5
    11307 +  { (eval echo "$as_me:14431: \"$ac_try\"") >&5
     11390+  { (eval echo "$as_me:14432: \"$ac_try\"") >&5
    1130811391   (eval $ac_try) 2>&5
    1130911392   ac_status=$?
    1131011393-  echo "$as_me:14028: \$? = $ac_status" >&5
    11311 +  echo "$as_me:14434: \$? = $ac_status" >&5
     11394+  echo "$as_me:14435: \$? = $ac_status" >&5
    1131211395   (exit $ac_status); }; }; then
    1131311396   cf_cv_good_bcopy=yes
    1131411397 else
    11315 @@ -14038,7 +14444,7 @@
     11398@@ -14038,7 +14445,7 @@
    1131611399 fi
    1131711400 
    1131811401 fi
    1131911402-echo "$as_me:14041: result: $cf_cv_good_bcopy" >&5
    11320 +echo "$as_me:14447: result: $cf_cv_good_bcopy" >&5
     11403+echo "$as_me:14448: result: $cf_cv_good_bcopy" >&5
    1132111404 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
    1132211405 
    1132311406 else
    11324 @@ -14059,7 +14465,7 @@
     11407@@ -14059,7 +14466,7 @@
    1132511408 
    1132611409 fi
    1132711410 
    1132811411-echo "$as_me:14062: checking if poll really works" >&5
    11329 +echo "$as_me:14468: checking if poll really works" >&5
     11412+echo "$as_me:14469: checking if poll really works" >&5
    1133011413 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
    1133111414 if test "${cf_cv_working_poll+set}" = set; then
    1133211415   echo $ECHO_N "(cached) $ECHO_C" >&6
    11333 @@ -14069,7 +14475,7 @@
     11416@@ -14069,7 +14476,7 @@
    1133411417   cf_cv_working_poll=unknown
    1133511418 else
    1133611419   cat >conftest.$ac_ext <<_ACEOF
    1133711420-#line 14072 "configure"
    11338 +#line 14478 "configure"
     11421+#line 14479 "configure"
    1133911422 #include "confdefs.h"
    1134011423 
    1134111424 #include <stdio.h>
    11342 @@ -14090,15 +14496,15 @@
     11425@@ -14090,15 +14497,15 @@
    1134311426 }
    1134411427 _ACEOF
    1134511428 rm -f conftest$ac_exeext
    1134611429-if { (eval echo "$as_me:14093: \"$ac_link\"") >&5
    11347 +if { (eval echo "$as_me:14499: \"$ac_link\"") >&5
     11430+if { (eval echo "$as_me:14500: \"$ac_link\"") >&5
    1134811431   (eval $ac_link) 2>&5
    1134911432   ac_status=$?
    1135011433-  echo "$as_me:14096: \$? = $ac_status" >&5
    11351 +  echo "$as_me:14502: \$? = $ac_status" >&5
     11434+  echo "$as_me:14503: \$? = $ac_status" >&5
    1135211435   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    1135311436-  { (eval echo "$as_me:14098: \"$ac_try\"") >&5
    11354 +  { (eval echo "$as_me:14504: \"$ac_try\"") >&5
     11437+  { (eval echo "$as_me:14505: \"$ac_try\"") >&5
    1135511438   (eval $ac_try) 2>&5
    1135611439   ac_status=$?
    1135711440-  echo "$as_me:14101: \$? = $ac_status" >&5
    11358 +  echo "$as_me:14507: \$? = $ac_status" >&5
     11441+  echo "$as_me:14508: \$? = $ac_status" >&5
    1135911442   (exit $ac_status); }; }; then
    1136011443   cf_cv_working_poll=yes
    1136111444 else
    11362 @@ -14110,7 +14516,7 @@
     11445@@ -14110,7 +14517,7 @@
    1136311446 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
    1136411447 fi
    1136511448 fi
    1136611449-echo "$as_me:14113: result: $cf_cv_working_poll" >&5
    11367 +echo "$as_me:14519: result: $cf_cv_working_poll" >&5
     11450+echo "$as_me:14520: result: $cf_cv_working_poll" >&5
    1136811451 echo "${ECHO_T}$cf_cv_working_poll" >&6
    1136911452 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
    1137011453 #define HAVE_WORKING_POLL 1
    11371 @@ -14118,7 +14524,7 @@
     11454@@ -14118,7 +14525,7 @@
    1137211455 
    1137311456 # special check for test/ditto.c
    1137411457 
    1137511458-echo "$as_me:14121: checking for openpty in -lutil" >&5
    11376 +echo "$as_me:14527: checking for openpty in -lutil" >&5
     11459+echo "$as_me:14528: checking for openpty in -lutil" >&5
    1137711460 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
    1137811461 if test "${ac_cv_lib_util_openpty+set}" = set; then
    1137911462   echo $ECHO_N "(cached) $ECHO_C" >&6
    11380 @@ -14126,7 +14532,7 @@
     11463@@ -14126,7 +14533,7 @@
    1138111464   ac_check_lib_save_LIBS=$LIBS
    1138211465 LIBS="-lutil  $LIBS"
    1138311466 cat >conftest.$ac_ext <<_ACEOF
    1138411467-#line 14129 "configure"
    11385 +#line 14535 "configure"
     11468+#line 14536 "configure"
    1138611469 #include "confdefs.h"
    1138711470 
    1138811471 /* Override any gcc2 internal prototype to avoid an error.  */
    11389 @@ -14145,16 +14551,16 @@
     11472@@ -14145,16 +14552,16 @@
    1139011473 }
    1139111474 _ACEOF
    1139211475 rm -f conftest.$ac_objext conftest$ac_exeext
    1139311476-if { (eval echo "$as_me:14148: \"$ac_link\"") >&5
    11394 +if { (eval echo "$as_me:14554: \"$ac_link\"") >&5
     11477+if { (eval echo "$as_me:14555: \"$ac_link\"") >&5
    1139511478   (eval $ac_link) 2>&5
    1139611479   ac_status=$?
    1139711480-  echo "$as_me:14151: \$? = $ac_status" >&5
    11398 +  echo "$as_me:14557: \$? = $ac_status" >&5
     11481+  echo "$as_me:14558: \$? = $ac_status" >&5
    1139911482   (exit $ac_status); } &&
    1140011483          { ac_try='test -s conftest$ac_exeext'
    1140111484-  { (eval echo "$as_me:14154: \"$ac_try\"") >&5
    11402 +  { (eval echo "$as_me:14560: \"$ac_try\"") >&5
     11485+  { (eval echo "$as_me:14561: \"$ac_try\"") >&5
    1140311486   (eval $ac_try) 2>&5
    1140411487   ac_status=$?
    1140511488-  echo "$as_me:14157: \$? = $ac_status" >&5
    11406 +  echo "$as_me:14563: \$? = $ac_status" >&5
     11489+  echo "$as_me:14564: \$? = $ac_status" >&5
    1140711490   (exit $ac_status); }; }; then
    1140811491   ac_cv_lib_util_openpty=yes
    1140911492 else
    11410 @@ -14165,7 +14571,7 @@
     11493@@ -14165,7 +14572,7 @@
    1141111494 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    1141211495 LIBS=$ac_check_lib_save_LIBS
    1141311496 fi
    1141411497-echo "$as_me:14168: result: $ac_cv_lib_util_openpty" >&5
    11415 +echo "$as_me:14574: result: $ac_cv_lib_util_openpty" >&5
     11498+echo "$as_me:14575: result: $ac_cv_lib_util_openpty" >&5
    1141611499 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
    1141711500 if test $ac_cv_lib_util_openpty = yes; then
    1141811501   cf_cv_lib_util=yes
    11419 @@ -14173,7 +14579,7 @@
     11502@@ -14173,7 +14580,7 @@
    1142011503   cf_cv_lib_util=no
    1142111504 fi
    1142211505 
    1142311506-echo "$as_me:14176: checking for openpty header" >&5
    11424 +echo "$as_me:14582: checking for openpty header" >&5
     11507+echo "$as_me:14583: checking for openpty header" >&5
    1142511508 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
    1142611509 if test "${cf_cv_func_openpty+set}" = set; then
    1142711510   echo $ECHO_N "(cached) $ECHO_C" >&6
    11428 @@ -14184,7 +14590,7 @@
     11511@@ -14184,7 +14591,7 @@
    1142911512     for cf_header in pty.h libutil.h util.h
    1143011513     do
    1143111514     cat >conftest.$ac_ext <<_ACEOF
    1143211515-#line 14187 "configure"
    11433 +#line 14593 "configure"
     11516+#line 14594 "configure"
    1143411517 #include "confdefs.h"
    1143511518 
    1143611519 #include <$cf_header>
    11437 @@ -14201,16 +14607,16 @@
     11520@@ -14201,16 +14608,16 @@
    1143811521 }
    1143911522 _ACEOF
    1144011523 rm -f conftest.$ac_objext conftest$ac_exeext
    1144111524-if { (eval echo "$as_me:14204: \"$ac_link\"") >&5
    11442 +if { (eval echo "$as_me:14610: \"$ac_link\"") >&5
     11525+if { (eval echo "$as_me:14611: \"$ac_link\"") >&5
    1144311526   (eval $ac_link) 2>&5
    1144411527   ac_status=$?
    1144511528-  echo "$as_me:14207: \$? = $ac_status" >&5
    11446 +  echo "$as_me:14613: \$? = $ac_status" >&5
     11529+  echo "$as_me:14614: \$? = $ac_status" >&5
    1144711530   (exit $ac_status); } &&
    1144811531          { ac_try='test -s conftest$ac_exeext'
    1144911532-  { (eval echo "$as_me:14210: \"$ac_try\"") >&5
    11450 +  { (eval echo "$as_me:14616: \"$ac_try\"") >&5
     11533+  { (eval echo "$as_me:14617: \"$ac_try\"") >&5
    1145111534   (eval $ac_try) 2>&5
    1145211535   ac_status=$?
    1145311536-  echo "$as_me:14213: \$? = $ac_status" >&5
    11454 +  echo "$as_me:14619: \$? = $ac_status" >&5
     11537+  echo "$as_me:14620: \$? = $ac_status" >&5
    1145511538   (exit $ac_status); }; }; then
    1145611539 
    1145711540         cf_cv_func_openpty=$cf_header
    11458 @@ -14228,7 +14634,7 @@
     11541@@ -14228,7 +14635,7 @@
    1145911542     LIBS="$cf_save_LIBS"
    1146011543 
    1146111544 fi
    1146211545-echo "$as_me:14231: result: $cf_cv_func_openpty" >&5
    11463 +echo "$as_me:14637: result: $cf_cv_func_openpty" >&5
     11546+echo "$as_me:14638: result: $cf_cv_func_openpty" >&5
    1146411547 echo "${ECHO_T}$cf_cv_func_openpty" >&6
    1146511548 
    1146611549 if test "$cf_cv_func_openpty" != no ; then
    11467 @@ -14274,13 +14680,13 @@
     11550@@ -14274,13 +14681,13 @@
    1146811551                fi
    1146911552 
     
    1147711560                          cat >conftest.$ac_ext <<_ACEOF
    1147811561-#line 14283 "configure"
    11479 +#line 14689 "configure"
     11562+#line 14690 "configure"
    1148011563 #include "confdefs.h"
    1148111564 #include <stdio.h>
    1148211565 int
    11483 @@ -14292,16 +14698,16 @@
     11566@@ -14292,16 +14699,16 @@
    1148411567 }
    1148511568 _ACEOF
    1148611569 rm -f conftest.$ac_objext
    1148711570-if { (eval echo "$as_me:14295: \"$ac_compile\"") >&5
    11488 +if { (eval echo "$as_me:14701: \"$ac_compile\"") >&5
     11571+if { (eval echo "$as_me:14702: \"$ac_compile\"") >&5
    1148911572   (eval $ac_compile) 2>&5
    1149011573   ac_status=$?
    1149111574-  echo "$as_me:14298: \$? = $ac_status" >&5
    11492 +  echo "$as_me:14704: \$? = $ac_status" >&5
     11575+  echo "$as_me:14705: \$? = $ac_status" >&5
    1149311576   (exit $ac_status); } &&
    1149411577          { ac_try='test -s conftest.$ac_objext'
    1149511578-  { (eval echo "$as_me:14301: \"$ac_try\"") >&5
    11496 +  { (eval echo "$as_me:14707: \"$ac_try\"") >&5
     11579+  { (eval echo "$as_me:14708: \"$ac_try\"") >&5
    1149711580   (eval $ac_try) 2>&5
    1149811581   ac_status=$?
    1149911582-  echo "$as_me:14304: \$? = $ac_status" >&5
    11500 +  echo "$as_me:14710: \$? = $ac_status" >&5
     11583+  echo "$as_me:14711: \$? = $ac_status" >&5
    1150111584   (exit $ac_status); }; }; then
    1150211585   :
    1150311586 else
    11504 @@ -14318,13 +14724,13 @@
     11587@@ -14318,13 +14725,13 @@
    1150511588                if test "$cf_have_incdir" = no ; then
    1150611589                  test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
    1150711590 
    1150811591-echo "${as_me-configure}:14321: testing adding $cf_add_incdir to include-path ..." 1>&5
    11509 +echo "${as_me-configure}:14727: testing adding $cf_add_incdir to include-path ..." 1>&5
     11592+echo "${as_me-configure}:14728: testing adding $cf_add_incdir to include-path ..." 1>&5
    1151011593 
    1151111594-                 CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
     
    1152111604                  break
    1152211605                fi
    11523 @@ -14352,7 +14758,7 @@
     11606@@ -14352,7 +14759,7 @@
    1152411607       if test "$cf_have_libdir" = no ; then
    1152511608         test -n "$verbose" && echo "   adding $cf_add_libdir to library-path" 1>&6
    1152611609 
    1152711610-echo "${as_me-configure}:14355: testing adding $cf_add_libdir to library-path ..." 1>&5
    11528 +echo "${as_me-configure}:14761: testing adding $cf_add_libdir to library-path ..." 1>&5
     11611+echo "${as_me-configure}:14762: testing adding $cf_add_libdir to library-path ..." 1>&5
    1152911612 
    1153011613         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
    1153111614       fi
    11532 @@ -14363,23 +14769,23 @@
     11615@@ -14363,23 +14770,23 @@
    1153311616     fi
    1153411617 esac
    1153511618 
    1153611619-echo "$as_me:14366: checking for db.h" >&5
    11537 +echo "$as_me:14772: checking for db.h" >&5
     11620+echo "$as_me:14773: checking for db.h" >&5
    1153811621 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
    1153911622 if test "${ac_cv_header_db_h+set}" = set; then
     
    1154211625   cat >conftest.$ac_ext <<_ACEOF
    1154311626-#line 14372 "configure"
    11544 +#line 14778 "configure"
     11627+#line 14779 "configure"
    1154511628 #include "confdefs.h"
    1154611629 #include <db.h>
    1154711630 _ACEOF
    1154811631-if { (eval echo "$as_me:14376: \"$ac_cpp conftest.$ac_ext\"") >&5
    11549 +if { (eval echo "$as_me:14782: \"$ac_cpp conftest.$ac_ext\"") >&5
     11632+if { (eval echo "$as_me:14783: \"$ac_cpp conftest.$ac_ext\"") >&5
    1155011633   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
    1155111634   ac_status=$?
     
    1155411637   cat conftest.err >&5
    1155511638-  echo "$as_me:14382: \$? = $ac_status" >&5
    11556 +  echo "$as_me:14788: \$? = $ac_status" >&5
     11639+  echo "$as_me:14789: \$? = $ac_status" >&5
    1155711640   (exit $ac_status); } >/dev/null; then
    1155811641   if test -s conftest.err; then
    1155911642     ac_cpp_err=$ac_c_preproc_warn_flag
    11560 @@ -14398,11 +14804,11 @@
     11643@@ -14398,11 +14805,11 @@
    1156111644 fi
    1156211645 rm -f conftest.err conftest.$ac_ext
    1156311646 fi
    1156411647-echo "$as_me:14401: result: $ac_cv_header_db_h" >&5
    11565 +echo "$as_me:14807: result: $ac_cv_header_db_h" >&5
     11648+echo "$as_me:14808: result: $ac_cv_header_db_h" >&5
    1156611649 echo "${ECHO_T}$ac_cv_header_db_h" >&6
    1156711650 if test $ac_cv_header_db_h = yes; then
    1156811651 
    1156911652-echo "$as_me:14405: checking for version of db" >&5
    11570 +echo "$as_me:14811: checking for version of db" >&5
     11653+echo "$as_me:14812: checking for version of db" >&5
    1157111654 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
    1157211655 if test "${cf_cv_hashed_db_version+set}" = set; then
    1157311656   echo $ECHO_N "(cached) $ECHO_C" >&6
    11574 @@ -14413,10 +14819,10 @@
     11657@@ -14413,10 +14820,10 @@
    1157511658 for cf_db_version in 1 2 3 4 5
    1157611659 do
    1157711660 
    1157811661-echo "${as_me-configure}:14416: testing checking for db version $cf_db_version ..." 1>&5
    11579 +echo "${as_me-configure}:14822: testing checking for db version $cf_db_version ..." 1>&5
     11662+echo "${as_me-configure}:14823: testing checking for db version $cf_db_version ..." 1>&5
    1158011663 
    1158111664        cat >conftest.$ac_ext <<_ACEOF
    1158211665-#line 14419 "configure"
    11583 +#line 14825 "configure"
     11666+#line 14826 "configure"
    1158411667 #include "confdefs.h"
    1158511668 
    1158611669 $ac_includes_default
    11587 @@ -14446,16 +14852,16 @@
     11670@@ -14446,16 +14853,16 @@
    1158811671 }
    1158911672 _ACEOF
    1159011673 rm -f conftest.$ac_objext
    1159111674-if { (eval echo "$as_me:14449: \"$ac_compile\"") >&5
    11592 +if { (eval echo "$as_me:14855: \"$ac_compile\"") >&5
     11675+if { (eval echo "$as_me:14856: \"$ac_compile\"") >&5
    1159311676   (eval $ac_compile) 2>&5
    1159411677   ac_status=$?
    1159511678-  echo "$as_me:14452: \$? = $ac_status" >&5
    11596 +  echo "$as_me:14858: \$? = $ac_status" >&5
     11679+  echo "$as_me:14859: \$? = $ac_status" >&5
    1159711680   (exit $ac_status); } &&
    1159811681          { ac_try='test -s conftest.$ac_objext'
    1159911682-  { (eval echo "$as_me:14455: \"$ac_try\"") >&5
    11600 +  { (eval echo "$as_me:14861: \"$ac_try\"") >&5
     11683+  { (eval echo "$as_me:14862: \"$ac_try\"") >&5
    1160111684   (eval $ac_try) 2>&5
    1160211685   ac_status=$?
    1160311686-  echo "$as_me:14458: \$? = $ac_status" >&5
    11604 +  echo "$as_me:14864: \$? = $ac_status" >&5
     11687+  echo "$as_me:14865: \$? = $ac_status" >&5
    1160511688   (exit $ac_status); }; }; then
    1160611689 
    1160711690        cf_cv_hashed_db_version=$cf_db_version
    11608 @@ -14469,16 +14875,16 @@
     11691@@ -14469,16 +14876,16 @@
    1160911692 done
    1161011693 
    1161111694 fi
    1161211695-echo "$as_me:14472: result: $cf_cv_hashed_db_version" >&5
    11613 +echo "$as_me:14878: result: $cf_cv_hashed_db_version" >&5
     11696+echo "$as_me:14879: result: $cf_cv_hashed_db_version" >&5
    1161411697 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
    1161511698 
    1161611699 if test "$cf_cv_hashed_db_version" = unknown ; then
    1161711700-       { { echo "$as_me:14476: error: Cannot determine version of db" >&5
    11618 +       { { echo "$as_me:14882: error: Cannot determine version of db" >&5
     11701+       { { echo "$as_me:14883: error: Cannot determine version of db" >&5
    1161911702 echo "$as_me: error: Cannot determine version of db" >&2;}
    1162011703    { (exit 1); exit 1; }; }
     
    1162211705 
    1162311706-echo "$as_me:14481: checking for db libraries" >&5
    11624 +echo "$as_me:14887: checking for db libraries" >&5
     11707+echo "$as_me:14888: checking for db libraries" >&5
    1162511708 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
    1162611709 if test "${cf_cv_hashed_db_libs+set}" = set; then
    1162711710   echo $ECHO_N "(cached) $ECHO_C" >&6
    11628 @@ -14492,10 +14898,10 @@
     11711@@ -14492,10 +14899,10 @@
    1162911712                LIBS="-l$cf_db_libs $LIBS"
    1163011713        fi
    1163111714 
    1163211715-echo "${as_me-configure}:14495: testing checking for library "$cf_db_libs" ..." 1>&5
    11633 +echo "${as_me-configure}:14901: testing checking for library "$cf_db_libs" ..." 1>&5
     11716+echo "${as_me-configure}:14902: testing checking for library "$cf_db_libs" ..." 1>&5
    1163411717 
    1163511718        cat >conftest.$ac_ext <<_ACEOF
    1163611719-#line 14498 "configure"
    11637 +#line 14904 "configure"
     11720+#line 14905 "configure"
    1163811721 #include "confdefs.h"
    1163911722 
    1164011723 $ac_includes_default
    11641 @@ -14550,16 +14956,16 @@
     11724@@ -14550,16 +14957,16 @@
    1164211725 }
    1164311726 _ACEOF
    1164411727 rm -f conftest.$ac_objext conftest$ac_exeext
    1164511728-if { (eval echo "$as_me:14553: \"$ac_link\"") >&5
    11646 +if { (eval echo "$as_me:14959: \"$ac_link\"") >&5
     11729+if { (eval echo "$as_me:14960: \"$ac_link\"") >&5
    1164711730   (eval $ac_link) 2>&5
    1164811731   ac_status=$?
    1164911732-  echo "$as_me:14556: \$? = $ac_status" >&5
    11650 +  echo "$as_me:14962: \$? = $ac_status" >&5
     11733+  echo "$as_me:14963: \$? = $ac_status" >&5
    1165111734   (exit $ac_status); } &&
    1165211735          { ac_try='test -s conftest$ac_exeext'
    1165311736-  { (eval echo "$as_me:14559: \"$ac_try\"") >&5
    11654 +  { (eval echo "$as_me:14965: \"$ac_try\"") >&5
     11737+  { (eval echo "$as_me:14966: \"$ac_try\"") >&5
    1165511738   (eval $ac_try) 2>&5
    1165611739   ac_status=$?
    1165711740-  echo "$as_me:14562: \$? = $ac_status" >&5
    11658 +  echo "$as_me:14968: \$? = $ac_status" >&5
     11741+  echo "$as_me:14969: \$? = $ac_status" >&5
    1165911742   (exit $ac_status); }; }; then
    1166011743 
    1166111744        if test -n "$cf_db_libs" ; then
    11662 @@ -14579,11 +14985,11 @@
     11745@@ -14579,11 +14986,11 @@
    1166311746 done
    1166411747 
    1166511748 fi
    1166611749-echo "$as_me:14582: result: $cf_cv_hashed_db_libs" >&5
    11667 +echo "$as_me:14988: result: $cf_cv_hashed_db_libs" >&5
     11750+echo "$as_me:14989: result: $cf_cv_hashed_db_libs" >&5
    1166811751 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
    1166911752 
    1167011753        if test "$cf_cv_hashed_db_libs" = unknown ; then
    1167111754-               { { echo "$as_me:14586: error: Cannot determine library for db" >&5
    11672 +               { { echo "$as_me:14992: error: Cannot determine library for db" >&5
     11755+               { { echo "$as_me:14993: error: Cannot determine library for db" >&5
    1167311756 echo "$as_me: error: Cannot determine library for db" >&2;}
    1167411757    { (exit 1); exit 1; }; }
    1167511758        elif test "$cf_cv_hashed_db_libs" != default ; then
    11676 @@ -14593,7 +14999,7 @@
     11759@@ -14593,7 +15000,7 @@
    1167711760 
    1167811761 else
    1167911762 
    1168011763-       { { echo "$as_me:14596: error: Cannot find db.h" >&5
    11681 +       { { echo "$as_me:15002: error: Cannot find db.h" >&5
     11764+       { { echo "$as_me:15003: error: Cannot find db.h" >&5
    1168211765 echo "$as_me: error: Cannot find db.h" >&2;}
    1168311766    { (exit 1); exit 1; }; }
    1168411767 
    11685 @@ -14608,7 +15014,7 @@
     11768@@ -14608,7 +15015,7 @@
    1168611769 
    1168711770 # Just in case, check if the C compiler has a bool type.
    1168811771 
    1168911772-echo "$as_me:14611: checking if we should include stdbool.h" >&5
    11690 +echo "$as_me:15017: checking if we should include stdbool.h" >&5
     11773+echo "$as_me:15018: checking if we should include stdbool.h" >&5
    1169111774 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
    1169211775 
    1169311776 if test "${cf_cv_header_stdbool_h+set}" = set; then
    11694 @@ -14616,7 +15022,7 @@
     11777@@ -14616,7 +15023,7 @@
    1169511778 else
    1169611779 
    1169711780        cat >conftest.$ac_ext <<_ACEOF
    1169811781-#line 14619 "configure"
    11699 +#line 15025 "configure"
     11782+#line 15026 "configure"
    1170011783 #include "confdefs.h"
    1170111784 
    1170211785 int
    11703 @@ -14628,23 +15034,23 @@
     11786@@ -14628,23 +15035,23 @@
    1170411787 }
    1170511788 _ACEOF
    1170611789 rm -f conftest.$ac_objext
    1170711790-if { (eval echo "$as_me:14631: \"$ac_compile\"") >&5
    11708 +if { (eval echo "$as_me:15037: \"$ac_compile\"") >&5
     11791+if { (eval echo "$as_me:15038: \"$ac_compile\"") >&5
    1170911792   (eval $ac_compile) 2>&5
    1171011793   ac_status=$?
    1171111794-  echo "$as_me:14634: \$? = $ac_status" >&5
    11712 +  echo "$as_me:15040: \$? = $ac_status" >&5
     11795+  echo "$as_me:15041: \$? = $ac_status" >&5
    1171311796   (exit $ac_status); } &&
    1171411797          { ac_try='test -s conftest.$ac_objext'
    1171511798-  { (eval echo "$as_me:14637: \"$ac_try\"") >&5
    11716 +  { (eval echo "$as_me:15043: \"$ac_try\"") >&5
     11799+  { (eval echo "$as_me:15044: \"$ac_try\"") >&5
    1171711800   (eval $ac_try) 2>&5
    1171811801   ac_status=$?
    1171911802-  echo "$as_me:14640: \$? = $ac_status" >&5
    11720 +  echo "$as_me:15046: \$? = $ac_status" >&5
     11803+  echo "$as_me:15047: \$? = $ac_status" >&5
    1172111804   (exit $ac_status); }; }; then
    1172211805   cf_cv_header_stdbool_h=0
     
    1172611809 cat >conftest.$ac_ext <<_ACEOF
    1172711810-#line 14647 "configure"
    11728 +#line 15053 "configure"
     11811+#line 15054 "configure"
    1172911812 #include "confdefs.h"
    1173011813 
    1173111814 #ifndef __BEOS__
    11732 @@ -14660,16 +15066,16 @@
     11815@@ -14660,16 +15067,16 @@
    1173311816 }
    1173411817 _ACEOF
    1173511818 rm -f conftest.$ac_objext
    1173611819-if { (eval echo "$as_me:14663: \"$ac_compile\"") >&5
    11737 +if { (eval echo "$as_me:15069: \"$ac_compile\"") >&5
     11820+if { (eval echo "$as_me:15070: \"$ac_compile\"") >&5
    1173811821   (eval $ac_compile) 2>&5
    1173911822   ac_status=$?
    1174011823-  echo "$as_me:14666: \$? = $ac_status" >&5
    11741 +  echo "$as_me:15072: \$? = $ac_status" >&5
     11824+  echo "$as_me:15073: \$? = $ac_status" >&5
    1174211825   (exit $ac_status); } &&
    1174311826          { ac_try='test -s conftest.$ac_objext'
    1174411827-  { (eval echo "$as_me:14669: \"$ac_try\"") >&5
    11745 +  { (eval echo "$as_me:15075: \"$ac_try\"") >&5
     11828+  { (eval echo "$as_me:15076: \"$ac_try\"") >&5
    1174611829   (eval $ac_try) 2>&5
    1174711830   ac_status=$?
    1174811831-  echo "$as_me:14672: \$? = $ac_status" >&5
    11749 +  echo "$as_me:15078: \$? = $ac_status" >&5
     11832+  echo "$as_me:15079: \$? = $ac_status" >&5
    1175011833   (exit $ac_status); }; }; then
    1175111834   cf_cv_header_stdbool_h=1
    1175211835 else
    11753 @@ -14683,13 +15089,13 @@
     11836@@ -14683,13 +15090,13 @@
    1175411837 fi
    1175511838 
    1175611839 if test "$cf_cv_header_stdbool_h" = 1
    1175711840-then   echo "$as_me:14686: result: yes" >&5
    11758 +then   echo "$as_me:15092: result: yes" >&5
     11841+then   echo "$as_me:15093: result: yes" >&5
    1175911842 echo "${ECHO_T}yes" >&6
    1176011843-else   echo "$as_me:14688: result: no" >&5
    11761 +else   echo "$as_me:15094: result: no" >&5
     11844+else   echo "$as_me:15095: result: no" >&5
    1176211845 echo "${ECHO_T}no" >&6
    1176311846 fi
    1176411847 
    1176511848-echo "$as_me:14692: checking for builtin bool type" >&5
    11766 +echo "$as_me:15098: checking for builtin bool type" >&5
     11849+echo "$as_me:15099: checking for builtin bool type" >&5
    1176711850 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
    1176811851 
    1176911852 if test "${cf_cv_cc_bool_type+set}" = set; then
    11770 @@ -14697,7 +15103,7 @@
     11853@@ -14697,7 +15104,7 @@
    1177111854 else
    1177211855 
    1177311856        cat >conftest.$ac_ext <<_ACEOF
    1177411857-#line 14700 "configure"
    11775 +#line 15106 "configure"
     11858+#line 15107 "configure"
    1177611859 #include "confdefs.h"
    1177711860 
    1177811861 #include <stdio.h>
    11779 @@ -14712,16 +15118,16 @@
     11862@@ -14712,16 +15119,16 @@
    1178011863 }
    1178111864 _ACEOF
    1178211865 rm -f conftest.$ac_objext
    1178311866-if { (eval echo "$as_me:14715: \"$ac_compile\"") >&5
    11784 +if { (eval echo "$as_me:15121: \"$ac_compile\"") >&5
     11867+if { (eval echo "$as_me:15122: \"$ac_compile\"") >&5
    1178511868   (eval $ac_compile) 2>&5
    1178611869   ac_status=$?
    1178711870-  echo "$as_me:14718: \$? = $ac_status" >&5
    11788 +  echo "$as_me:15124: \$? = $ac_status" >&5
     11871+  echo "$as_me:15125: \$? = $ac_status" >&5
    1178911872   (exit $ac_status); } &&
    1179011873          { ac_try='test -s conftest.$ac_objext'
    1179111874-  { (eval echo "$as_me:14721: \"$ac_try\"") >&5
    11792 +  { (eval echo "$as_me:15127: \"$ac_try\"") >&5
     11875+  { (eval echo "$as_me:15128: \"$ac_try\"") >&5
    1179311876   (eval $ac_try) 2>&5
    1179411877   ac_status=$?
    1179511878-  echo "$as_me:14724: \$? = $ac_status" >&5
    11796 +  echo "$as_me:15130: \$? = $ac_status" >&5
     11879+  echo "$as_me:15131: \$? = $ac_status" >&5
    1179711880   (exit $ac_status); }; }; then
    1179811881   cf_cv_cc_bool_type=1
    1179911882 else
    11800 @@ -14734,9 +15140,9 @@
     11883@@ -14734,9 +15141,9 @@
    1180111884 fi
    1180211885 
    1180311886 if test "$cf_cv_cc_bool_type" = 1
    1180411887-then   echo "$as_me:14737: result: yes" >&5
    11805 +then   echo "$as_me:15143: result: yes" >&5
     11888+then   echo "$as_me:15144: result: yes" >&5
    1180611889 echo "${ECHO_T}yes" >&6
    1180711890-else   echo "$as_me:14739: result: no" >&5
    11808 +else   echo "$as_me:15145: result: no" >&5
     11891+else   echo "$as_me:15146: result: no" >&5
    1180911892 echo "${ECHO_T}no" >&6
    1181011893 fi
    1181111894 
    11812 @@ -14758,7 +15164,7 @@
     11895@@ -14758,7 +15165,7 @@
    1181311896        cf_stdcpp_libname=stdc++
    1181411897        ;;
    1181511898 esac
    1181611899-echo "$as_me:14761: checking for library $cf_stdcpp_libname" >&5
    11817 +echo "$as_me:15167: checking for library $cf_stdcpp_libname" >&5
     11900+echo "$as_me:15168: checking for library $cf_stdcpp_libname" >&5
    1181811901 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
    1181911902 if test "${cf_cv_libstdcpp+set}" = set; then
    1182011903   echo $ECHO_N "(cached) $ECHO_C" >&6
    11821 @@ -14767,7 +15173,7 @@
     11904@@ -14767,7 +15174,7 @@
    1182211905        cf_save="$LIBS"
    1182311906        LIBS="$LIBS -l$cf_stdcpp_libname"
    1182411907 cat >conftest.$ac_ext <<_ACEOF
    1182511908-#line 14770 "configure"
    11826 +#line 15176 "configure"
     11909+#line 15177 "configure"
    1182711910 #include "confdefs.h"
    1182811911 
    1182911912 #include <strstream.h>
    11830 @@ -14783,16 +15189,16 @@
     11913@@ -14783,16 +15190,16 @@
    1183111914 }
    1183211915 _ACEOF
    1183311916 rm -f conftest.$ac_objext conftest$ac_exeext
    1183411917-if { (eval echo "$as_me:14786: \"$ac_link\"") >&5
    11835 +if { (eval echo "$as_me:15192: \"$ac_link\"") >&5
     11918+if { (eval echo "$as_me:15193: \"$ac_link\"") >&5
    1183611919   (eval $ac_link) 2>&5
    1183711920   ac_status=$?
    1183811921-  echo "$as_me:14789: \$? = $ac_status" >&5
    11839 +  echo "$as_me:15195: \$? = $ac_status" >&5
     11922+  echo "$as_me:15196: \$? = $ac_status" >&5
    1184011923   (exit $ac_status); } &&
    1184111924          { ac_try='test -s conftest$ac_exeext'
    1184211925-  { (eval echo "$as_me:14792: \"$ac_try\"") >&5
    11843 +  { (eval echo "$as_me:15198: \"$ac_try\"") >&5
     11926+  { (eval echo "$as_me:15199: \"$ac_try\"") >&5
    1184411927   (eval $ac_try) 2>&5
    1184511928   ac_status=$?
    1184611929-  echo "$as_me:14795: \$? = $ac_status" >&5
    11847 +  echo "$as_me:15201: \$? = $ac_status" >&5
     11930+  echo "$as_me:15202: \$? = $ac_status" >&5
    1184811931   (exit $ac_status); }; }; then
    1184911932   cf_cv_libstdcpp=yes
    1185011933 else
    11851 @@ -14804,12 +15210,12 @@
     11934@@ -14804,12 +15211,12 @@
    1185211935        LIBS="$cf_save"
    1185311936 
    1185411937 fi
    1185511938-echo "$as_me:14807: result: $cf_cv_libstdcpp" >&5
    11856 +echo "$as_me:15213: result: $cf_cv_libstdcpp" >&5
     11939+echo "$as_me:15214: result: $cf_cv_libstdcpp" >&5
    1185711940 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
    1185811941 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
     
    1186011943 
    1186111944-       echo "$as_me:14812: checking whether $CXX understands -c and -o together" >&5
    11862 +       echo "$as_me:15218: checking whether $CXX understands -c and -o together" >&5
     11945+       echo "$as_me:15219: checking whether $CXX understands -c and -o together" >&5
    1186311946 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
    1186411947 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
    1186511948   echo $ECHO_N "(cached) $ECHO_C" >&6
    11866 @@ -14825,15 +15231,15 @@
     11949@@ -14825,15 +15232,15 @@
    1186711950 # We do the test twice because some compilers refuse to overwrite an
    1186811951 # existing .o file with -o, though they will create one.
    1186911952 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
    1187011953-if { (eval echo "$as_me:14828: \"$ac_try\"") >&5
    11871 +if { (eval echo "$as_me:15234: \"$ac_try\"") >&5
     11954+if { (eval echo "$as_me:15235: \"$ac_try\"") >&5
    1187211955   (eval $ac_try) 2>&5
    1187311956   ac_status=$?
    1187411957-  echo "$as_me:14831: \$? = $ac_status" >&5
    11875 +  echo "$as_me:15237: \$? = $ac_status" >&5
     11958+  echo "$as_me:15238: \$? = $ac_status" >&5
    1187611959   (exit $ac_status); } &&
    1187711960-  test -f conftest2.$ac_objext && { (eval echo "$as_me:14833: \"$ac_try\"") >&5
    11878 +  test -f conftest2.$ac_objext && { (eval echo "$as_me:15239: \"$ac_try\"") >&5
     11961+  test -f conftest2.$ac_objext && { (eval echo "$as_me:15240: \"$ac_try\"") >&5
    1187911962   (eval $ac_try) 2>&5
    1188011963   ac_status=$?
    1188111964-  echo "$as_me:14836: \$? = $ac_status" >&5
    11882 +  echo "$as_me:15242: \$? = $ac_status" >&5
     11965+  echo "$as_me:15243: \$? = $ac_status" >&5
    1188311966   (exit $ac_status); };
    1188411967 then
    1188511968   eval cf_cv_prog_CXX_c_o=yes
    11886 @@ -14844,10 +15250,10 @@
     11969@@ -14844,10 +15251,10 @@
    1188711970 
    1188811971 fi
    1188911972 if test $cf_cv_prog_CXX_c_o = yes; then
    1189011973-  echo "$as_me:14847: result: yes" >&5
    11891 +  echo "$as_me:15253: result: yes" >&5
     11974+  echo "$as_me:15254: result: yes" >&5
    1189211975 echo "${ECHO_T}yes" >&6
    1189311976 else
    1189411977-  echo "$as_me:14850: result: no" >&5
    11895 +  echo "$as_me:15256: result: no" >&5
     11978+  echo "$as_me:15257: result: no" >&5
    1189611979 echo "${ECHO_T}no" >&6
    1189711980 fi
    1189811981 
    11899 @@ -14867,12 +15273,12 @@
     11982@@ -14867,12 +15274,12 @@
    1190011983        ;;
    1190111984 esac
    1190211985 if test "$GXX" = yes; then
    1190311986-       echo "$as_me:14870: checking for lib$cf_gpp_libname" >&5
    11904 +       echo "$as_me:15276: checking for lib$cf_gpp_libname" >&5
     11987+       echo "$as_me:15277: checking for lib$cf_gpp_libname" >&5
    1190511988 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
    1190611989        cf_save="$LIBS"
     
    1190811991        cat >conftest.$ac_ext <<_ACEOF
    1190911992-#line 14875 "configure"
    11910 +#line 15281 "configure"
     11993+#line 15282 "configure"
    1191111994 #include "confdefs.h"
    1191211995 
    1191311996 #include <$cf_gpp_libname/builtin.h>
    11914 @@ -14886,16 +15292,16 @@
     11997@@ -14886,16 +15293,16 @@
    1191511998 }
    1191611999 _ACEOF
    1191712000 rm -f conftest.$ac_objext conftest$ac_exeext
    1191812001-if { (eval echo "$as_me:14889: \"$ac_link\"") >&5
    11919 +if { (eval echo "$as_me:15295: \"$ac_link\"") >&5
     12002+if { (eval echo "$as_me:15296: \"$ac_link\"") >&5
    1192012003   (eval $ac_link) 2>&5
    1192112004   ac_status=$?
    1192212005-  echo "$as_me:14892: \$? = $ac_status" >&5
    11923 +  echo "$as_me:15298: \$? = $ac_status" >&5
     12006+  echo "$as_me:15299: \$? = $ac_status" >&5
    1192412007   (exit $ac_status); } &&
    1192512008          { ac_try='test -s conftest$ac_exeext'
    1192612009-  { (eval echo "$as_me:14895: \"$ac_try\"") >&5
    11927 +  { (eval echo "$as_me:15301: \"$ac_try\"") >&5
     12010+  { (eval echo "$as_me:15302: \"$ac_try\"") >&5
    1192812011   (eval $ac_try) 2>&5
    1192912012   ac_status=$?
    1193012013-  echo "$as_me:14898: \$? = $ac_status" >&5
    11931 +  echo "$as_me:15304: \$? = $ac_status" >&5
     12014+  echo "$as_me:15305: \$? = $ac_status" >&5
    1193212015   (exit $ac_status); }; }; then
    1193312016   cf_cxx_library=yes
    1193412017         CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
    11935 @@ -14914,7 +15320,7 @@
     12018@@ -14914,7 +15321,7 @@
    1193612019   echo "$as_me: failed program was:" >&5
    1193712020 cat conftest.$ac_ext >&5
    1193812021 cat >conftest.$ac_ext <<_ACEOF
    1193912022-#line 14917 "configure"
    11940 +#line 15323 "configure"
     12023+#line 15324 "configure"
    1194112024 #include "confdefs.h"
    1194212025 
    1194312026 #include <builtin.h>
    11944 @@ -14928,16 +15334,16 @@
     12027@@ -14928,16 +15335,16 @@
    1194512028 }
    1194612029 _ACEOF
    1194712030 rm -f conftest.$ac_objext conftest$ac_exeext
    1194812031-if { (eval echo "$as_me:14931: \"$ac_link\"") >&5
    11949 +if { (eval echo "$as_me:15337: \"$ac_link\"") >&5
     12032+if { (eval echo "$as_me:15338: \"$ac_link\"") >&5
    1195012033   (eval $ac_link) 2>&5
    1195112034   ac_status=$?
    1195212035-  echo "$as_me:14934: \$? = $ac_status" >&5
    11953 +  echo "$as_me:15340: \$? = $ac_status" >&5
     12036+  echo "$as_me:15341: \$? = $ac_status" >&5
    1195412037   (exit $ac_status); } &&
    1195512038          { ac_try='test -s conftest$ac_exeext'
    1195612039-  { (eval echo "$as_me:14937: \"$ac_try\"") >&5
    11957 +  { (eval echo "$as_me:15343: \"$ac_try\"") >&5
     12040+  { (eval echo "$as_me:15344: \"$ac_try\"") >&5
    1195812041   (eval $ac_try) 2>&5
    1195912042   ac_status=$?
    1196012043-  echo "$as_me:14940: \$? = $ac_status" >&5
    11961 +  echo "$as_me:15346: \$? = $ac_status" >&5
     12044+  echo "$as_me:15347: \$? = $ac_status" >&5
    1196212045   (exit $ac_status); }; }; then
    1196312046   cf_cxx_library=yes
    1196412047         CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
    11965 @@ -14954,7 +15360,7 @@
     12048@@ -14954,7 +15361,7 @@
    1196612049 fi
    1196712050 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    1196812051        LIBS="$cf_save"
    1196912052-       echo "$as_me:14957: result: $cf_cxx_library" >&5
    11970 +       echo "$as_me:15363: result: $cf_cxx_library" >&5
     12053+       echo "$as_me:15364: result: $cf_cxx_library" >&5
    1197112054 echo "${ECHO_T}$cf_cxx_library" >&6
    1197212055 fi
    1197312056 
    11974 @@ -14970,7 +15376,7 @@
     12057@@ -14970,7 +15377,7 @@
    1197512058 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
    1197612059 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
    1197712060 ac_main_return=return
    1197812061-echo "$as_me:14973: checking how to run the C++ preprocessor" >&5
    11979 +echo "$as_me:15379: checking how to run the C++ preprocessor" >&5
     12062+echo "$as_me:15380: checking how to run the C++ preprocessor" >&5
    1198012063 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
    1198112064 if test -z "$CXXCPP"; then
    1198212065   if test "${ac_cv_prog_CXXCPP+set}" = set; then
    11983 @@ -14987,18 +15393,18 @@
     12066@@ -14987,18 +15394,18 @@
    1198412067   # On the NeXT, cc -E runs the code through the compiler's parser,
    1198512068   # not just through cpp. "Syntax error" is here to catch this case.
    1198612069   cat >conftest.$ac_ext <<_ACEOF
    1198712070-#line 14990 "configure"
    11988 +#line 15396 "configure"
     12071+#line 15397 "configure"
    1198912072 #include "confdefs.h"
    1199012073 #include <assert.h>
     
    1199212075 _ACEOF
    1199312076-if { (eval echo "$as_me:14995: \"$ac_cpp conftest.$ac_ext\"") >&5
    11994 +if { (eval echo "$as_me:15401: \"$ac_cpp conftest.$ac_ext\"") >&5
     12077+if { (eval echo "$as_me:15402: \"$ac_cpp conftest.$ac_ext\"") >&5
    1199512078   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
    1199612079   ac_status=$?
     
    1199912082   cat conftest.err >&5
    1200012083-  echo "$as_me:15001: \$? = $ac_status" >&5
    12001 +  echo "$as_me:15407: \$? = $ac_status" >&5
     12084+  echo "$as_me:15408: \$? = $ac_status" >&5
    1200212085   (exit $ac_status); } >/dev/null; then
    1200312086   if test -s conftest.err; then
    1200412087     ac_cpp_err=$ac_cxx_preproc_warn_flag
    12005 @@ -15021,17 +15427,17 @@
     12088@@ -15021,17 +15428,17 @@
    1200612089   # OK, works on sane cases.  Now check whether non-existent headers
    1200712090   # can be detected and how.
    1200812091   cat >conftest.$ac_ext <<_ACEOF
    1200912092-#line 15024 "configure"
    12010 +#line 15430 "configure"
     12093+#line 15431 "configure"
    1201112094 #include "confdefs.h"
    1201212095 #include <ac_nonexistent.h>
    1201312096 _ACEOF
    1201412097-if { (eval echo "$as_me:15028: \"$ac_cpp conftest.$ac_ext\"") >&5
    12015 +if { (eval echo "$as_me:15434: \"$ac_cpp conftest.$ac_ext\"") >&5
     12098+if { (eval echo "$as_me:15435: \"$ac_cpp conftest.$ac_ext\"") >&5
    1201612099   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
    1201712100   ac_status=$?
     
    1202012103   cat conftest.err >&5
    1202112104-  echo "$as_me:15034: \$? = $ac_status" >&5
    12022 +  echo "$as_me:15440: \$? = $ac_status" >&5
     12105+  echo "$as_me:15441: \$? = $ac_status" >&5
    1202312106   (exit $ac_status); } >/dev/null; then
    1202412107   if test -s conftest.err; then
    1202512108     ac_cpp_err=$ac_cxx_preproc_warn_flag
    12026 @@ -15068,7 +15474,7 @@
     12109@@ -15068,7 +15475,7 @@
    1202712110 else
    1202812111   ac_cv_prog_CXXCPP=$CXXCPP
    1202912112 fi
    1203012113-echo "$as_me:15071: result: $CXXCPP" >&5
    12031 +echo "$as_me:15477: result: $CXXCPP" >&5
     12114+echo "$as_me:15478: result: $CXXCPP" >&5
    1203212115 echo "${ECHO_T}$CXXCPP" >&6
    1203312116 ac_preproc_ok=false
    1203412117 for ac_cxx_preproc_warn_flag in '' yes
    12035 @@ -15078,18 +15484,18 @@
     12118@@ -15078,18 +15485,18 @@
    1203612119   # On the NeXT, cc -E runs the code through the compiler's parser,
    1203712120   # not just through cpp. "Syntax error" is here to catch this case.
    1203812121   cat >conftest.$ac_ext <<_ACEOF
    1203912122-#line 15081 "configure"
    12040 +#line 15487 "configure"
     12123+#line 15488 "configure"
    1204112124 #include "confdefs.h"
    1204212125 #include <assert.h>
     
    1204412127 _ACEOF
    1204512128-if { (eval echo "$as_me:15086: \"$ac_cpp conftest.$ac_ext\"") >&5
    12046 +if { (eval echo "$as_me:15492: \"$ac_cpp conftest.$ac_ext\"") >&5
     12129+if { (eval echo "$as_me:15493: \"$ac_cpp conftest.$ac_ext\"") >&5
    1204712130   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
    1204812131   ac_status=$?
     
    1205112134   cat conftest.err >&5
    1205212135-  echo "$as_me:15092: \$? = $ac_status" >&5
    12053 +  echo "$as_me:15498: \$? = $ac_status" >&5
     12136+  echo "$as_me:15499: \$? = $ac_status" >&5
    1205412137   (exit $ac_status); } >/dev/null; then
    1205512138   if test -s conftest.err; then
    1205612139     ac_cpp_err=$ac_cxx_preproc_warn_flag
    12057 @@ -15112,17 +15518,17 @@
     12140@@ -15112,17 +15519,17 @@
    1205812141   # OK, works on sane cases.  Now check whether non-existent headers
    1205912142   # can be detected and how.
    1206012143   cat >conftest.$ac_ext <<_ACEOF
    1206112144-#line 15115 "configure"
    12062 +#line 15521 "configure"
     12145+#line 15522 "configure"
    1206312146 #include "confdefs.h"
    1206412147 #include <ac_nonexistent.h>
    1206512148 _ACEOF
    1206612149-if { (eval echo "$as_me:15119: \"$ac_cpp conftest.$ac_ext\"") >&5
    12067 +if { (eval echo "$as_me:15525: \"$ac_cpp conftest.$ac_ext\"") >&5
     12150+if { (eval echo "$as_me:15526: \"$ac_cpp conftest.$ac_ext\"") >&5
    1206812151   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
    1206912152   ac_status=$?
     
    1207212155   cat conftest.err >&5
    1207312156-  echo "$as_me:15125: \$? = $ac_status" >&5
    12074 +  echo "$as_me:15531: \$? = $ac_status" >&5
     12157+  echo "$as_me:15532: \$? = $ac_status" >&5
    1207512158   (exit $ac_status); } >/dev/null; then
    1207612159   if test -s conftest.err; then
    1207712160     ac_cpp_err=$ac_cxx_preproc_warn_flag
    12078 @@ -15150,7 +15556,7 @@
     12161@@ -15150,7 +15557,7 @@
    1207912162 if $ac_preproc_ok; then
    1208012163   :
    1208112164 else
    1208212165-  { { echo "$as_me:15153: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
    12083 +  { { echo "$as_me:15559: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
     12166+  { { echo "$as_me:15560: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
    1208412167 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
    1208512168    { (exit 1); exit 1; }; }
    1208612169 fi
    12087 @@ -15165,23 +15571,23 @@
     12170@@ -15165,23 +15572,23 @@
    1208812171 for ac_header in iostream typeinfo
    1208912172 do
    1209012173 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
    1209112174-echo "$as_me:15168: checking for $ac_header" >&5
    12092 +echo "$as_me:15574: checking for $ac_header" >&5
     12175+echo "$as_me:15575: checking for $ac_header" >&5
    1209312176 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
    1209412177 if eval "test \"\${$as_ac_Header+set}\" = set"; then
     
    1209712180   cat >conftest.$ac_ext <<_ACEOF
    1209812181-#line 15174 "configure"
    12099 +#line 15580 "configure"
     12182+#line 15581 "configure"
    1210012183 #include "confdefs.h"
    1210112184 #include <$ac_header>
    1210212185 _ACEOF
    1210312186-if { (eval echo "$as_me:15178: \"$ac_cpp conftest.$ac_ext\"") >&5
    12104 +if { (eval echo "$as_me:15584: \"$ac_cpp conftest.$ac_ext\"") >&5
     12187+if { (eval echo "$as_me:15585: \"$ac_cpp conftest.$ac_ext\"") >&5
    1210512188   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
    1210612189   ac_status=$?
     
    1210912192   cat conftest.err >&5
    1211012193-  echo "$as_me:15184: \$? = $ac_status" >&5
    12111 +  echo "$as_me:15590: \$? = $ac_status" >&5
     12194+  echo "$as_me:15591: \$? = $ac_status" >&5
    1211212195   (exit $ac_status); } >/dev/null; then
    1211312196   if test -s conftest.err; then
    1211412197     ac_cpp_err=$ac_cxx_preproc_warn_flag
    12115 @@ -15200,7 +15606,7 @@
     12198@@ -15200,7 +15607,7 @@
    1211612199 fi
    1211712200 rm -f conftest.err conftest.$ac_ext
    1211812201 fi
    1211912202-echo "$as_me:15203: result: `eval echo '${'$as_ac_Header'}'`" >&5
    12120 +echo "$as_me:15609: result: `eval echo '${'$as_ac_Header'}'`" >&5
     12203+echo "$as_me:15610: result: `eval echo '${'$as_ac_Header'}'`" >&5
    1212112204 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
    1212212205 if test `eval echo '${'$as_ac_Header'}'` = yes; then
    1212312206   cat >>confdefs.h <<EOF
    12124 @@ -15211,10 +15617,10 @@
     12207@@ -15211,10 +15618,10 @@
    1212512208 done
    1212612209 
    1212712210     if test x"$ac_cv_header_iostream" = xyes ; then
    1212812211-        echo "$as_me:15214: checking if iostream uses std-namespace" >&5
    12129 +        echo "$as_me:15620: checking if iostream uses std-namespace" >&5
     12212+        echo "$as_me:15621: checking if iostream uses std-namespace" >&5
    1213012213 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
    1213112214         cat >conftest.$ac_ext <<_ACEOF
    1213212215-#line 15217 "configure"
    12133 +#line 15623 "configure"
     12216+#line 15624 "configure"
    1213412217 #include "confdefs.h"
    1213512218 
    1213612219 #include <iostream>
    12137 @@ -15231,16 +15637,16 @@
     12220@@ -15231,16 +15638,16 @@
    1213812221 }
    1213912222 _ACEOF
    1214012223 rm -f conftest.$ac_objext
    1214112224-if { (eval echo "$as_me:15234: \"$ac_compile\"") >&5
    12142 +if { (eval echo "$as_me:15640: \"$ac_compile\"") >&5
     12225+if { (eval echo "$as_me:15641: \"$ac_compile\"") >&5
    1214312226   (eval $ac_compile) 2>&5
    1214412227   ac_status=$?
    1214512228-  echo "$as_me:15237: \$? = $ac_status" >&5
    12146 +  echo "$as_me:15643: \$? = $ac_status" >&5
     12229+  echo "$as_me:15644: \$? = $ac_status" >&5
    1214712230   (exit $ac_status); } &&
    1214812231          { ac_try='test -s conftest.$ac_objext'
    1214912232-  { (eval echo "$as_me:15240: \"$ac_try\"") >&5
    12150 +  { (eval echo "$as_me:15646: \"$ac_try\"") >&5
     12233+  { (eval echo "$as_me:15647: \"$ac_try\"") >&5
    1215112234   (eval $ac_try) 2>&5
    1215212235   ac_status=$?
    1215312236-  echo "$as_me:15243: \$? = $ac_status" >&5
    12154 +  echo "$as_me:15649: \$? = $ac_status" >&5
     12237+  echo "$as_me:15650: \$? = $ac_status" >&5
    1215512238   (exit $ac_status); }; }; then
    1215612239   cf_iostream_namespace=yes
    1215712240 else
    12158 @@ -15249,7 +15655,7 @@
     12241@@ -15249,7 +15656,7 @@
    1215912242 cf_iostream_namespace=no
    1216012243 fi
    1216112244 rm -f conftest.$ac_objext conftest.$ac_ext
    1216212245-        echo "$as_me:15252: result: $cf_iostream_namespace" >&5
    12163 +        echo "$as_me:15658: result: $cf_iostream_namespace" >&5
     12246+        echo "$as_me:15659: result: $cf_iostream_namespace" >&5
    1216412247 echo "${ECHO_T}$cf_iostream_namespace" >&6
    1216512248         if test "$cf_iostream_namespace" = yes ; then
    1216612249             cat >>confdefs.h <<\EOF
    12167 @@ -15259,7 +15665,7 @@
     12250@@ -15259,7 +15666,7 @@
    1216812251         fi
    1216912252     fi
    1217012253 
    1217112254-echo "$as_me:15262: checking if we should include stdbool.h" >&5
    12172 +echo "$as_me:15668: checking if we should include stdbool.h" >&5
     12255+echo "$as_me:15669: checking if we should include stdbool.h" >&5
    1217312256 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
    1217412257 
    1217512258 if test "${cf_cv_header_stdbool_h+set}" = set; then
    12176 @@ -15267,7 +15673,7 @@
     12259@@ -15267,7 +15674,7 @@
    1217712260 else
    1217812261 
    1217912262        cat >conftest.$ac_ext <<_ACEOF
    1218012263-#line 15270 "configure"
    12181 +#line 15676 "configure"
     12264+#line 15677 "configure"
    1218212265 #include "confdefs.h"
    1218312266 
    1218412267 int
    12185 @@ -15279,23 +15685,23 @@
     12268@@ -15279,23 +15686,23 @@
    1218612269 }
    1218712270 _ACEOF
    1218812271 rm -f conftest.$ac_objext
    1218912272-if { (eval echo "$as_me:15282: \"$ac_compile\"") >&5
    12190 +if { (eval echo "$as_me:15688: \"$ac_compile\"") >&5
     12273+if { (eval echo "$as_me:15689: \"$ac_compile\"") >&5
    1219112274   (eval $ac_compile) 2>&5
    1219212275   ac_status=$?
    1219312276-  echo "$as_me:15285: \$? = $ac_status" >&5
    12194 +  echo "$as_me:15691: \$? = $ac_status" >&5
     12277+  echo "$as_me:15692: \$? = $ac_status" >&5
    1219512278   (exit $ac_status); } &&
    1219612279          { ac_try='test -s conftest.$ac_objext'
    1219712280-  { (eval echo "$as_me:15288: \"$ac_try\"") >&5
    12198 +  { (eval echo "$as_me:15694: \"$ac_try\"") >&5
     12281+  { (eval echo "$as_me:15695: \"$ac_try\"") >&5
    1219912282   (eval $ac_try) 2>&5
    1220012283   ac_status=$?
    1220112284-  echo "$as_me:15291: \$? = $ac_status" >&5
    12202 +  echo "$as_me:15697: \$? = $ac_status" >&5
     12285+  echo "$as_me:15698: \$? = $ac_status" >&5
    1220312286   (exit $ac_status); }; }; then
    1220412287   cf_cv_header_stdbool_h=0
     
    1220812291 cat >conftest.$ac_ext <<_ACEOF
    1220912292-#line 15298 "configure"
    12210 +#line 15704 "configure"
     12293+#line 15705 "configure"
    1221112294 #include "confdefs.h"
    1221212295 
    1221312296 #ifndef __BEOS__
    12214 @@ -15311,16 +15717,16 @@
     12297@@ -15311,16 +15718,16 @@
    1221512298 }
    1221612299 _ACEOF
    1221712300 rm -f conftest.$ac_objext
    1221812301-if { (eval echo "$as_me:15314: \"$ac_compile\"") >&5
    12219 +if { (eval echo "$as_me:15720: \"$ac_compile\"") >&5
     12302+if { (eval echo "$as_me:15721: \"$ac_compile\"") >&5
    1222012303   (eval $ac_compile) 2>&5
    1222112304   ac_status=$?
    1222212305-  echo "$as_me:15317: \$? = $ac_status" >&5
    12223 +  echo "$as_me:15723: \$? = $ac_status" >&5
     12306+  echo "$as_me:15724: \$? = $ac_status" >&5
    1222412307   (exit $ac_status); } &&
    1222512308          { ac_try='test -s conftest.$ac_objext'
    1222612309-  { (eval echo "$as_me:15320: \"$ac_try\"") >&5
    12227 +  { (eval echo "$as_me:15726: \"$ac_try\"") >&5
     12310+  { (eval echo "$as_me:15727: \"$ac_try\"") >&5
    1222812311   (eval $ac_try) 2>&5
    1222912312   ac_status=$?
    1223012313-  echo "$as_me:15323: \$? = $ac_status" >&5
    12231 +  echo "$as_me:15729: \$? = $ac_status" >&5
     12314+  echo "$as_me:15730: \$? = $ac_status" >&5
    1223212315   (exit $ac_status); }; }; then
    1223312316   cf_cv_header_stdbool_h=1
    1223412317 else
    12235 @@ -15334,13 +15740,13 @@
     12318@@ -15334,13 +15741,13 @@
    1223612319 fi
    1223712320 
    1223812321 if test "$cf_cv_header_stdbool_h" = 1
    1223912322-then   echo "$as_me:15337: result: yes" >&5
    12240 +then   echo "$as_me:15743: result: yes" >&5
     12323+then   echo "$as_me:15744: result: yes" >&5
    1224112324 echo "${ECHO_T}yes" >&6
    1224212325-else   echo "$as_me:15339: result: no" >&5
    12243 +else   echo "$as_me:15745: result: no" >&5
     12326+else   echo "$as_me:15746: result: no" >&5
    1224412327 echo "${ECHO_T}no" >&6
    1224512328 fi
    1224612329 
    1224712330-echo "$as_me:15343: checking for builtin bool type" >&5
    12248 +echo "$as_me:15749: checking for builtin bool type" >&5
     12331+echo "$as_me:15750: checking for builtin bool type" >&5
    1224912332 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
    1225012333 
    1225112334 if test "${cf_cv_builtin_bool+set}" = set; then
    12252 @@ -15348,7 +15754,7 @@
     12335@@ -15348,7 +15755,7 @@
    1225312336 else
    1225412337 
    1225512338        cat >conftest.$ac_ext <<_ACEOF
    1225612339-#line 15351 "configure"
    12257 +#line 15757 "configure"
     12340+#line 15758 "configure"
    1225812341 #include "confdefs.h"
    1225912342 
    1226012343 #include <stdio.h>
    12261 @@ -15363,16 +15769,16 @@
     12344@@ -15363,16 +15770,16 @@
    1226212345 }
    1226312346 _ACEOF
    1226412347 rm -f conftest.$ac_objext
    1226512348-if { (eval echo "$as_me:15366: \"$ac_compile\"") >&5
    12266 +if { (eval echo "$as_me:15772: \"$ac_compile\"") >&5
     12349+if { (eval echo "$as_me:15773: \"$ac_compile\"") >&5
    1226712350   (eval $ac_compile) 2>&5
    1226812351   ac_status=$?
    1226912352-  echo "$as_me:15369: \$? = $ac_status" >&5
    12270 +  echo "$as_me:15775: \$? = $ac_status" >&5
     12353+  echo "$as_me:15776: \$? = $ac_status" >&5
    1227112354   (exit $ac_status); } &&
    1227212355          { ac_try='test -s conftest.$ac_objext'
    1227312356-  { (eval echo "$as_me:15372: \"$ac_try\"") >&5
    12274 +  { (eval echo "$as_me:15778: \"$ac_try\"") >&5
     12357+  { (eval echo "$as_me:15779: \"$ac_try\"") >&5
    1227512358   (eval $ac_try) 2>&5
    1227612359   ac_status=$?
    1227712360-  echo "$as_me:15375: \$? = $ac_status" >&5
    12278 +  echo "$as_me:15781: \$? = $ac_status" >&5
     12361+  echo "$as_me:15782: \$? = $ac_status" >&5
    1227912362   (exit $ac_status); }; }; then
    1228012363   cf_cv_builtin_bool=1
    1228112364 else
    12282 @@ -15385,13 +15791,13 @@
     12365@@ -15385,13 +15792,13 @@
    1228312366 fi
    1228412367 
    1228512368 if test "$cf_cv_builtin_bool" = 1
    1228612369-then   echo "$as_me:15388: result: yes" >&5
    12287 +then   echo "$as_me:15794: result: yes" >&5
     12370+then   echo "$as_me:15795: result: yes" >&5
    1228812371 echo "${ECHO_T}yes" >&6
    1228912372-else   echo "$as_me:15390: result: no" >&5
    12290 +else   echo "$as_me:15796: result: no" >&5
     12373+else   echo "$as_me:15797: result: no" >&5
    1229112374 echo "${ECHO_T}no" >&6
    1229212375 fi
    1229312376 
    1229412377-echo "$as_me:15394: checking for size of bool" >&5
    12295 +echo "$as_me:15800: checking for size of bool" >&5
     12378+echo "$as_me:15801: checking for size of bool" >&5
    1229612379 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
    1229712380 if test "${cf_cv_type_of_bool+set}" = set; then
    1229812381   echo $ECHO_N "(cached) $ECHO_C" >&6
    12299 @@ -15402,7 +15808,7 @@
     12382@@ -15402,7 +15809,7 @@
    1230012383   cf_cv_type_of_bool=unknown
    1230112384 else
    1230212385   cat >conftest.$ac_ext <<_ACEOF
    1230312386-#line 15405 "configure"
    12304 +#line 15811 "configure"
     12387+#line 15812 "configure"
    1230512388 #include "confdefs.h"
    1230612389 
    1230712390 #include <stdlib.h>
    12308 @@ -15444,15 +15850,15 @@
     12391@@ -15444,15 +15851,15 @@
    1230912392 
    1231012393 _ACEOF
    1231112394 rm -f conftest$ac_exeext
    1231212395-if { (eval echo "$as_me:15447: \"$ac_link\"") >&5
    12313 +if { (eval echo "$as_me:15853: \"$ac_link\"") >&5
     12396+if { (eval echo "$as_me:15854: \"$ac_link\"") >&5
    1231412397   (eval $ac_link) 2>&5
    1231512398   ac_status=$?
    1231612399-  echo "$as_me:15450: \$? = $ac_status" >&5
    12317 +  echo "$as_me:15856: \$? = $ac_status" >&5
     12400+  echo "$as_me:15857: \$? = $ac_status" >&5
    1231812401   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    1231912402-  { (eval echo "$as_me:15452: \"$ac_try\"") >&5
    12320 +  { (eval echo "$as_me:15858: \"$ac_try\"") >&5
     12403+  { (eval echo "$as_me:15859: \"$ac_try\"") >&5
    1232112404   (eval $ac_try) 2>&5
    1232212405   ac_status=$?
    1232312406-  echo "$as_me:15455: \$? = $ac_status" >&5
    12324 +  echo "$as_me:15861: \$? = $ac_status" >&5
     12407+  echo "$as_me:15862: \$? = $ac_status" >&5
    1232512408   (exit $ac_status); }; }; then
    1232612409   cf_cv_type_of_bool=`cat cf_test.out`
    1232712410                 if test -z "$cf_cv_type_of_bool"; then
    12328 @@ -15470,18 +15876,18 @@
     12411@@ -15470,18 +15877,18 @@
    1232912412 fi
    1233012413 
    1233112414        rm -f cf_test.out
    1233212415-echo "$as_me:15473: result: $cf_cv_type_of_bool" >&5
    12333 +echo "$as_me:15879: result: $cf_cv_type_of_bool" >&5
     12416+echo "$as_me:15880: result: $cf_cv_type_of_bool" >&5
    1233412417 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
    1233512418 if test "$cf_cv_type_of_bool" = unknown ; then
     
    1233812421        esac
    1233912422-       { echo "$as_me:15479: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
    12340 +       { echo "$as_me:15885: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
     12423+       { echo "$as_me:15886: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
    1234112424 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
    1234212425        cf_cv_type_of_bool=$NCURSES_BOOL
     
    1234412427 
    1234512428-echo "$as_me:15484: checking for special defines needed for etip.h" >&5
    12346 +echo "$as_me:15890: checking for special defines needed for etip.h" >&5
     12429+echo "$as_me:15891: checking for special defines needed for etip.h" >&5
    1234712430 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
    1234812431 cf_save_CXXFLAGS="$CXXFLAGS"
    1234912432 cf_result="none"
    12350 @@ -15493,7 +15899,7 @@
     12433@@ -15493,7 +15900,7 @@
    1235112434        test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
    1235212435        test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
    1235312436 cat >conftest.$ac_ext <<_ACEOF
    1235412437-#line 15496 "configure"
    12355 +#line 15902 "configure"
     12438+#line 15903 "configure"
    1235612439 #include "confdefs.h"
    1235712440 
    1235812441 #include <etip.h.in>
    12359 @@ -15507,16 +15913,16 @@
     12442@@ -15507,16 +15914,16 @@
    1236012443 }
    1236112444 _ACEOF
    1236212445 rm -f conftest.$ac_objext
    1236312446-if { (eval echo "$as_me:15510: \"$ac_compile\"") >&5
    12364 +if { (eval echo "$as_me:15916: \"$ac_compile\"") >&5
     12447+if { (eval echo "$as_me:15917: \"$ac_compile\"") >&5
    1236512448   (eval $ac_compile) 2>&5
    1236612449   ac_status=$?
    1236712450-  echo "$as_me:15513: \$? = $ac_status" >&5
    12368 +  echo "$as_me:15919: \$? = $ac_status" >&5
     12451+  echo "$as_me:15920: \$? = $ac_status" >&5
    1236912452   (exit $ac_status); } &&
    1237012453          { ac_try='test -s conftest.$ac_objext'
    1237112454-  { (eval echo "$as_me:15516: \"$ac_try\"") >&5
    12372 +  { (eval echo "$as_me:15922: \"$ac_try\"") >&5
     12455+  { (eval echo "$as_me:15923: \"$ac_try\"") >&5
    1237312456   (eval $ac_try) 2>&5
    1237412457   ac_status=$?
    1237512458-  echo "$as_me:15519: \$? = $ac_status" >&5
    12376 +  echo "$as_me:15925: \$? = $ac_status" >&5
     12459+  echo "$as_me:15926: \$? = $ac_status" >&5
    1237712460   (exit $ac_status); }; }; then
    1237812461 
    1237912462        test -n "$cf_math" && cat >>confdefs.h <<EOF
    12380 @@ -15537,12 +15943,12 @@
     12463@@ -15537,12 +15944,12 @@
    1238112464 rm -f conftest.$ac_objext conftest.$ac_ext
    1238212465 done
    1238312466 done
    1238412467-echo "$as_me:15540: result: $cf_result" >&5
    12385 +echo "$as_me:15946: result: $cf_result" >&5
     12468+echo "$as_me:15947: result: $cf_result" >&5
    1238612469 echo "${ECHO_T}$cf_result" >&6
    1238712470 CXXFLAGS="$cf_save_CXXFLAGS"
     
    1238912472 if test -n "$CXX"; then
    1239012473-echo "$as_me:15545: checking if $CXX accepts parameter initialization" >&5
    12391 +echo "$as_me:15951: checking if $CXX accepts parameter initialization" >&5
     12474+echo "$as_me:15952: checking if $CXX accepts parameter initialization" >&5
    1239212475 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
    1239312476 if test "${cf_cv_cpp_param_init+set}" = set; then
    1239412477   echo $ECHO_N "(cached) $ECHO_C" >&6
    12395 @@ -15559,7 +15965,7 @@
     12478@@ -15559,7 +15966,7 @@
    1239612479   cf_cv_cpp_param_init=unknown
    1239712480 else
    1239812481   cat >conftest.$ac_ext <<_ACEOF
    1239912482-#line 15562 "configure"
    12400 +#line 15968 "configure"
     12483+#line 15969 "configure"
    1240112484 #include "confdefs.h"
    1240212485 
    1240312486 class TEST {
    12404 @@ -15578,15 +15984,15 @@
     12487@@ -15578,15 +15985,15 @@
    1240512488 
    1240612489 _ACEOF
    1240712490 rm -f conftest$ac_exeext
    1240812491-if { (eval echo "$as_me:15581: \"$ac_link\"") >&5
    12409 +if { (eval echo "$as_me:15987: \"$ac_link\"") >&5
     12492+if { (eval echo "$as_me:15988: \"$ac_link\"") >&5
    1241012493   (eval $ac_link) 2>&5
    1241112494   ac_status=$?
    1241212495-  echo "$as_me:15584: \$? = $ac_status" >&5
    12413 +  echo "$as_me:15990: \$? = $ac_status" >&5
     12496+  echo "$as_me:15991: \$? = $ac_status" >&5
    1241412497   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    1241512498-  { (eval echo "$as_me:15586: \"$ac_try\"") >&5
    12416 +  { (eval echo "$as_me:15992: \"$ac_try\"") >&5
     12499+  { (eval echo "$as_me:15993: \"$ac_try\"") >&5
    1241712500   (eval $ac_try) 2>&5
    1241812501   ac_status=$?
    1241912502-  echo "$as_me:15589: \$? = $ac_status" >&5
    12420 +  echo "$as_me:15995: \$? = $ac_status" >&5
     12503+  echo "$as_me:15996: \$? = $ac_status" >&5
    1242112504   (exit $ac_status); }; }; then
    1242212505   cf_cv_cpp_param_init=yes
    1242312506 else
    12424 @@ -15605,7 +16011,7 @@
     12507@@ -15605,7 +16012,7 @@
    1242512508 ac_main_return=return
    1242612509 
    1242712510 fi
    1242812511-echo "$as_me:15608: result: $cf_cv_cpp_param_init" >&5
    12429 +echo "$as_me:16014: result: $cf_cv_cpp_param_init" >&5
     12512+echo "$as_me:16015: result: $cf_cv_cpp_param_init" >&5
    1243012513 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
    1243112514 fi
    1243212515 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
    12433 @@ -15614,7 +16020,7 @@
     12516@@ -15614,7 +16021,7 @@
    1243412517 
    1243512518 if test -n "$CXX"; then
    1243612519 
    1243712520-echo "$as_me:15617: checking if $CXX accepts static_cast" >&5
    12438 +echo "$as_me:16023: checking if $CXX accepts static_cast" >&5
     12521+echo "$as_me:16024: checking if $CXX accepts static_cast" >&5
    1243912522 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
    1244012523 if test "${cf_cv_cpp_static_cast+set}" = set; then
    1244112524   echo $ECHO_N "(cached) $ECHO_C" >&6
    12442 @@ -15628,7 +16034,7 @@
     12525@@ -15628,7 +16035,7 @@
    1244312526 ac_main_return=return
    1244412527 
    1244512528        cat >conftest.$ac_ext <<_ACEOF
    1244612529-#line 15631 "configure"
    12447 +#line 16037 "configure"
     12530+#line 16038 "configure"
    1244812531 #include "confdefs.h"
    1244912532 
    1245012533 class NCursesPanel
    12451 @@ -15672,16 +16078,16 @@
     12534@@ -15672,16 +16079,16 @@
    1245212535 }
    1245312536 _ACEOF
    1245412537 rm -f conftest.$ac_objext
    1245512538-if { (eval echo "$as_me:15675: \"$ac_compile\"") >&5
    12456 +if { (eval echo "$as_me:16081: \"$ac_compile\"") >&5
     12539+if { (eval echo "$as_me:16082: \"$ac_compile\"") >&5
    1245712540   (eval $ac_compile) 2>&5
    1245812541   ac_status=$?
    1245912542-  echo "$as_me:15678: \$? = $ac_status" >&5
    12460 +  echo "$as_me:16084: \$? = $ac_status" >&5
     12543+  echo "$as_me:16085: \$? = $ac_status" >&5
    1246112544   (exit $ac_status); } &&
    1246212545          { ac_try='test -s conftest.$ac_objext'
    1246312546-  { (eval echo "$as_me:15681: \"$ac_try\"") >&5
    12464 +  { (eval echo "$as_me:16087: \"$ac_try\"") >&5
     12547+  { (eval echo "$as_me:16088: \"$ac_try\"") >&5
    1246512548   (eval $ac_try) 2>&5
    1246612549   ac_status=$?
    1246712550-  echo "$as_me:15684: \$? = $ac_status" >&5
    12468 +  echo "$as_me:16090: \$? = $ac_status" >&5
     12551+  echo "$as_me:16091: \$? = $ac_status" >&5
    1246912552   (exit $ac_status); }; }; then
    1247012553   cf_cv_cpp_static_cast=yes
    1247112554 else
    12472 @@ -15699,7 +16105,7 @@
     12555@@ -15699,7 +16106,7 @@
    1247312556 ac_main_return=return
    1247412557 
    1247512558 fi
    1247612559-echo "$as_me:15702: result: $cf_cv_cpp_static_cast" >&5
    12477 +echo "$as_me:16108: result: $cf_cv_cpp_static_cast" >&5
     12560+echo "$as_me:16109: result: $cf_cv_cpp_static_cast" >&5
    1247812561 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
    1247912562 
    1248012563 fi
    12481 @@ -15709,12 +16115,12 @@
     12564@@ -15709,12 +16116,12 @@
    1248212565 EOF
    1248312566 
     
    1249412577            ;;
    1249512578        sco3.2v5*) #(vi
    12496 @@ -15723,7 +16129,7 @@
     12579@@ -15723,7 +16130,7 @@
    1249712580        solaris2*)
    1249812581            if test "$GXX" != yes ; then
     
    1250312586            ;;
    1250412587        esac
    12505 @@ -15747,7 +16153,7 @@
     12588@@ -15747,7 +16154,7 @@
    1250612589        else
    1250712590                if test "$cf_cv_header_stdbool_h" = 1 ; then
    1250812591 
    1250912592-echo "$as_me:15750: checking for size of bool" >&5
    12510 +echo "$as_me:16156: checking for size of bool" >&5
     12593+echo "$as_me:16157: checking for size of bool" >&5
    1251112594 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
    1251212595 if test "${cf_cv_type_of_bool+set}" = set; then
    1251312596   echo $ECHO_N "(cached) $ECHO_C" >&6
    12514 @@ -15758,7 +16164,7 @@
     12597@@ -15758,7 +16165,7 @@
    1251512598   cf_cv_type_of_bool=unknown
    1251612599 else
    1251712600   cat >conftest.$ac_ext <<_ACEOF
    1251812601-#line 15761 "configure"
    12519 +#line 16167 "configure"
     12602+#line 16168 "configure"
    1252012603 #include "confdefs.h"
    1252112604 
    1252212605 #include <stdlib.h>
    12523 @@ -15800,15 +16206,15 @@
     12606@@ -15800,15 +16207,15 @@
    1252412607 
    1252512608 _ACEOF
    1252612609 rm -f conftest$ac_exeext
    1252712610-if { (eval echo "$as_me:15803: \"$ac_link\"") >&5
    12528 +if { (eval echo "$as_me:16209: \"$ac_link\"") >&5
     12611+if { (eval echo "$as_me:16210: \"$ac_link\"") >&5
    1252912612   (eval $ac_link) 2>&5
    1253012613   ac_status=$?
    1253112614-  echo "$as_me:15806: \$? = $ac_status" >&5
    12532 +  echo "$as_me:16212: \$? = $ac_status" >&5
     12615+  echo "$as_me:16213: \$? = $ac_status" >&5
    1253312616   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
    1253412617-  { (eval echo "$as_me:15808: \"$ac_try\"") >&5
    12535 +  { (eval echo "$as_me:16214: \"$ac_try\"") >&5
     12618+  { (eval echo "$as_me:16215: \"$ac_try\"") >&5
    1253612619   (eval $ac_try) 2>&5
    1253712620   ac_status=$?
    1253812621-  echo "$as_me:15811: \$? = $ac_status" >&5
    12539 +  echo "$as_me:16217: \$? = $ac_status" >&5
     12622+  echo "$as_me:16218: \$? = $ac_status" >&5
    1254012623   (exit $ac_status); }; }; then
    1254112624   cf_cv_type_of_bool=`cat cf_test.out`
    1254212625                 if test -z "$cf_cv_type_of_bool"; then
    12543 @@ -15826,25 +16232,25 @@
     12626@@ -15826,25 +16233,25 @@
    1254412627 fi
    1254512628 
    1254612629        rm -f cf_test.out
    1254712630-echo "$as_me:15829: result: $cf_cv_type_of_bool" >&5
    12548 +echo "$as_me:16235: result: $cf_cv_type_of_bool" >&5
     12631+echo "$as_me:16236: result: $cf_cv_type_of_bool" >&5
    1254912632 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
    1255012633 if test "$cf_cv_type_of_bool" = unknown ; then
     
    1255312636        esac
    1255412637-       { echo "$as_me:15835: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
    12555 +       { echo "$as_me:16241: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
     12638+       { echo "$as_me:16242: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
    1255612639 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
    1255712640        cf_cv_type_of_bool=$NCURSES_BOOL
     
    1256012643                else
    1256112644-                       echo "$as_me:15841: checking for fallback type of bool" >&5
    12562 +                       echo "$as_me:16247: checking for fallback type of bool" >&5
     12645+                       echo "$as_me:16248: checking for fallback type of bool" >&5
    1256312646 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
    1256412647                        case "$host_cpu" in #(vi
     
    1256712650                        esac
    1256812651-                       echo "$as_me:15847: result: $cf_cv_type_of_bool" >&5
    12569 +                       echo "$as_me:16253: result: $cf_cv_type_of_bool" >&5
     12652+                       echo "$as_me:16254: result: $cf_cv_type_of_bool" >&5
    1257012653 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
    1257112654                fi
    1257212655        fi
    12573 @@ -15873,7 +16279,7 @@
     12656@@ -15873,7 +16280,7 @@
    1257412657 
    1257512658 if test "$cf_with_ada" != "no" ; then
    1257612659     if test "$with_libtool" != "no"; then
    1257712660-       { echo "$as_me:15876: WARNING: libtool does not support Ada - disabling feature" >&5
    12578 +       { echo "$as_me:16282: WARNING: libtool does not support Ada - disabling feature" >&5
     12661+       { echo "$as_me:16283: WARNING: libtool does not support Ada - disabling feature" >&5
    1257912662 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
    1258012663        cf_with_ada=no
    1258112664     fi
    12582 @@ -15883,7 +16289,7 @@
     12665@@ -15883,7 +16290,7 @@
    1258312666 cf_ada_make=gnatmake
    1258412667 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
    1258512668 set dummy $cf_ada_make; ac_word=$2
    1258612669-echo "$as_me:15886: checking for $ac_word" >&5
    12587 +echo "$as_me:16292: checking for $ac_word" >&5
     12670+echo "$as_me:16293: checking for $ac_word" >&5
    1258812671 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
    1258912672 if test "${ac_cv_prog_gnat_exists+set}" = set; then
    1259012673   echo $ECHO_N "(cached) $ECHO_C" >&6
    12591 @@ -15898,7 +16304,7 @@
     12674@@ -15898,7 +16305,7 @@
    1259212675   test -z "$ac_dir" && ac_dir=.
    1259312676   $as_executable_p "$ac_dir/$ac_word" || continue
    1259412677 ac_cv_prog_gnat_exists="yes"
    1259512678-echo "$as_me:15901: found $ac_dir/$ac_word" >&5
    12596 +echo "$as_me:16307: found $ac_dir/$ac_word" >&5
     12679+echo "$as_me:16308: found $ac_dir/$ac_word" >&5
    1259712680 break
    1259812681 done
    1259912682 
    12600 @@ -15907,10 +16313,10 @@
     12683@@ -15907,10 +16314,10 @@
    1260112684 fi
    1260212685 gnat_exists=$ac_cv_prog_gnat_exists
    1260312686 if test -n "$gnat_exists"; then
    1260412687-  echo "$as_me:15910: result: $gnat_exists" >&5
    12605 +  echo "$as_me:16316: result: $gnat_exists" >&5
     12688+  echo "$as_me:16317: result: $gnat_exists" >&5
    1260612689 echo "${ECHO_T}$gnat_exists" >&6
    1260712690 else
    1260812691-  echo "$as_me:15913: result: no" >&5
    12609 +  echo "$as_me:16319: result: no" >&5
     12692+  echo "$as_me:16320: result: no" >&5
    1261012693 echo "${ECHO_T}no" >&6
    1261112694 fi
    1261212695 
    12613 @@ -15918,11 +16324,11 @@
     12696@@ -15918,11 +16325,11 @@
    1261412697    cf_ada_make=
    1261512698 else
    1261612699 
    1261712700-echo "$as_me:15921: checking for gnat version" >&5
    12618 +echo "$as_me:16327: checking for gnat version" >&5
     12701+echo "$as_me:16328: checking for gnat version" >&5
    1261912702 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
    1262012703 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
    1262112704   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
    1262212705-echo "$as_me:15925: result: $cf_gnat_version" >&5
    12623 +echo "$as_me:16331: result: $cf_gnat_version" >&5
     12706+echo "$as_me:16332: result: $cf_gnat_version" >&5
    1262412707 echo "${ECHO_T}$cf_gnat_version" >&6
    1262512708 
    1262612709 case $cf_gnat_version in
    12627 @@ -15945,7 +16351,7 @@
     12710@@ -15945,7 +16352,7 @@
    1262812711 
    1262912712    # Extract the first word of "m4", so it can be a program name with args.
    1263012713 set dummy m4; ac_word=$2
    1263112714-echo "$as_me:15948: checking for $ac_word" >&5
    12632 +echo "$as_me:16354: checking for $ac_word" >&5
     12715+echo "$as_me:16355: checking for $ac_word" >&5
    1263312716 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
    1263412717 if test "${ac_cv_prog_M4_exists+set}" = set; then
    1263512718   echo $ECHO_N "(cached) $ECHO_C" >&6
    12636 @@ -15960,7 +16366,7 @@
     12719@@ -15960,7 +16367,7 @@
    1263712720   test -z "$ac_dir" && ac_dir=.
    1263812721   $as_executable_p "$ac_dir/$ac_word" || continue
    1263912722 ac_cv_prog_M4_exists="yes"
    1264012723-echo "$as_me:15963: found $ac_dir/$ac_word" >&5
    12641 +echo "$as_me:16369: found $ac_dir/$ac_word" >&5
     12724+echo "$as_me:16370: found $ac_dir/$ac_word" >&5
    1264212725 break
    1264312726 done
    1264412727 
    12645 @@ -15969,10 +16375,10 @@
     12728@@ -15969,10 +16376,10 @@
    1264612729 fi
    1264712730 M4_exists=$ac_cv_prog_M4_exists
    1264812731 if test -n "$M4_exists"; then
    1264912732-  echo "$as_me:15972: result: $M4_exists" >&5
    12650 +  echo "$as_me:16378: result: $M4_exists" >&5
     12733+  echo "$as_me:16379: result: $M4_exists" >&5
    1265112734 echo "${ECHO_T}$M4_exists" >&6
    1265212735 else
    1265312736-  echo "$as_me:15975: result: no" >&5
    12654 +  echo "$as_me:16381: result: no" >&5
     12737+  echo "$as_me:16382: result: no" >&5
    1265512738 echo "${ECHO_T}no" >&6
    1265612739 fi
    1265712740 
    12658 @@ -15981,7 +16387,7 @@
     12741@@ -15981,7 +16388,7 @@
    1265912742       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
    1266012743    fi
    1266112744    if test "$cf_cv_prog_gnat_correct" = yes; then
    1266212745-      echo "$as_me:15984: checking if GNAT works" >&5
    12663 +      echo "$as_me:16390: checking if GNAT works" >&5
     12746+      echo "$as_me:16391: checking if GNAT works" >&5
    1266412747 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
    1266512748 
    1266612749 rm -f conftest*
    12667 @@ -16009,14 +16415,14 @@
     12750@@ -16009,14 +16416,14 @@
    1266812751 fi
    1266912752 rm -f conftest*
    1267012753 
    1267112754-      echo "$as_me:16012: result: $cf_cv_prog_gnat_correct" >&5
    12672 +      echo "$as_me:16418: result: $cf_cv_prog_gnat_correct" >&5
     12755+      echo "$as_me:16419: result: $cf_cv_prog_gnat_correct" >&5
    1267312756 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
    1267412757    fi
     
    1267812761 
    1267912762-   echo "$as_me:16019: checking if GNAT pragma Unreferenced works" >&5
    12680 +   echo "$as_me:16425: checking if GNAT pragma Unreferenced works" >&5
     12763+   echo "$as_me:16426: checking if GNAT pragma Unreferenced works" >&5
    1268112764 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
    1268212765 
    1268312766 rm -f conftest*
    12684 @@ -16043,7 +16449,7 @@
     12767@@ -16043,7 +16450,7 @@
    1268512768 fi
    1268612769 rm -f conftest*
    1268712770 
    1268812771-   echo "$as_me:16046: result: $cf_cv_pragma_unreferenced" >&5
    12689 +   echo "$as_me:16452: result: $cf_cv_pragma_unreferenced" >&5
     12772+   echo "$as_me:16453: result: $cf_cv_pragma_unreferenced" >&5
    1269012773 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
    1269112774 
    1269212775    # if the pragma is supported, use it (needed in the Trace code).
    12693 @@ -16096,7 +16502,7 @@
     12776@@ -16096,7 +16503,7 @@
    1269412777   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
    1269512778   ;;
    1269612779 *)
    1269712780-  { { echo "$as_me:16099: error: expected a pathname, not \"$withval\"" >&5
    12698 +  { { echo "$as_me:16505: error: expected a pathname, not \"$withval\"" >&5
     12781+  { { echo "$as_me:16506: error: expected a pathname, not \"$withval\"" >&5
    1269912782 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
    1270012783    { (exit 1); exit 1; }; }
    1270112784   ;;
    12702 @@ -16138,7 +16544,7 @@
     12785@@ -16138,7 +16545,7 @@
    1270312786   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
    1270412787   ;;
    1270512788 *)
    1270612789-  { { echo "$as_me:16141: error: expected a pathname, not \"$withval\"" >&5
    12707 +  { { echo "$as_me:16547: error: expected a pathname, not \"$withval\"" >&5
     12790+  { { echo "$as_me:16548: error: expected a pathname, not \"$withval\"" >&5
    1270812791 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
    1270912792    { (exit 1); exit 1; }; }
    1271012793   ;;
    12711 @@ -16163,7 +16569,7 @@
     12794@@ -16163,7 +16570,7 @@
    1271212795 ### chooses to split module lists into libraries.
    1271312796 ###
    1271412797 ### (see CF_LIB_RULES).
    1271512798-echo "$as_me:16166: checking for library subsets" >&5
    12716 +echo "$as_me:16572: checking for library subsets" >&5
     12799+echo "$as_me:16573: checking for library subsets" >&5
    1271712800 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
    1271812801 LIB_SUBSETS=
    1271912802 
    12720 @@ -16176,7 +16582,17 @@
     12803@@ -16176,7 +16583,17 @@
    1272112804        fi
    1272212805 fi
     
    1273712820 if test "$with_termlib" != no ; then
    1273812821        LIB_SUBSETS="${LIB_SUBSETS} "
    12739 @@ -16185,17 +16601,18 @@
     12822@@ -16185,17 +16602,18 @@
    1274012823 fi
    1274112824 
     
    1274612829 
    1274712830-echo "$as_me:16191: result: $LIB_SUBSETS" >&5
    12748 +echo "$as_me:16608: result: $LIB_SUBSETS" >&5
     12831+echo "$as_me:16609: result: $LIB_SUBSETS" >&5
    1274912832 echo "${ECHO_T}$LIB_SUBSETS" >&6
    1275012833 
     
    1275912842 if test "$GCC" != yes; then
    1276012843        CPPFLAGS="$CPPFLAGS -I\${includedir}"
    12761 @@ -16226,7 +16643,7 @@
     12844@@ -16226,7 +16644,7 @@
    1276212845 fi
    1276312846 
    1276412847 ### Build up pieces for makefile rules
    1276512848-echo "$as_me:16229: checking default library suffix" >&5
    12766 +echo "$as_me:16646: checking default library suffix" >&5
     12849+echo "$as_me:16647: checking default library suffix" >&5
    1276712850 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
    1276812851 
    1276912852        case $DFT_LWR_MODEL in
    12770 @@ -16237,46 +16654,50 @@
     12853@@ -16237,46 +16655,50 @@
    1277112854        shared)  DFT_ARG_SUFFIX=''   ;;
    1277212855        esac
    1277312856        test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
    1277412857-echo "$as_me:16240: result: $DFT_ARG_SUFFIX" >&5
    12775 +echo "$as_me:16657: result: $DFT_ARG_SUFFIX" >&5
     12858+echo "$as_me:16658: result: $DFT_ARG_SUFFIX" >&5
    1277612859 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
    1277712860 
    1277812861-echo "$as_me:16243: checking default library-dependency suffix" >&5
    12779 +echo "$as_me:16660: checking default library-dependency suffix" >&5
     12862+echo "$as_me:16661: checking default library-dependency suffix" >&5
    1278012863 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
    1278112864 
     
    1283212915                                DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
    1283312916                                ;;
    12834 @@ -16289,10 +16710,10 @@
     12917@@ -16289,10 +16711,10 @@
    1283512918        esac
    1283612919        test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
    1283712920        test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
    1283812921-echo "$as_me:16292: result: $DFT_DEP_SUFFIX" >&5
    12839 +echo "$as_me:16713: result: $DFT_DEP_SUFFIX" >&5
     12922+echo "$as_me:16714: result: $DFT_DEP_SUFFIX" >&5
    1284012923 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
    1284112924 
    1284212925-echo "$as_me:16295: checking default object directory" >&5
    12843 +echo "$as_me:16716: checking default object directory" >&5
     12926+echo "$as_me:16717: checking default object directory" >&5
    1284412927 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
    1284512928 
    1284612929        case $DFT_LWR_MODEL in
    12847 @@ -16308,51 +16729,55 @@
     12930@@ -16308,51 +16730,55 @@
    1284812931                        DFT_OBJ_SUBDIR='obj_s' ;;
    1284912932                esac
    1285012933        esac
    1285112934-echo "$as_me:16311: result: $DFT_OBJ_SUBDIR" >&5
    12852 +echo "$as_me:16732: result: $DFT_OBJ_SUBDIR" >&5
     12935+echo "$as_me:16733: result: $DFT_OBJ_SUBDIR" >&5
    1285312936 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
    1285412937 
     
    1285612939 if test "$cf_with_cxx" = yes ; then
    1285712940-echo "$as_me:16316: checking c++ library-dependency suffix" >&5
    12858 +echo "$as_me:16737: checking c++ library-dependency suffix" >&5
     12941+echo "$as_me:16738: checking c++ library-dependency suffix" >&5
    1285912942 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
    1286012943 if test "$with_libtool" != "no"; then
     
    1291412997                                CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
    1291512998                                ;;
    12916 @@ -16366,7 +16791,7 @@
     12999@@ -16366,7 +16792,7 @@
    1291713000        test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
    1291813001        test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
    1291913002 fi
    1292013003-echo "$as_me:16369: result: $CXX_LIB_SUFFIX" >&5
    12921 +echo "$as_me:16794: result: $CXX_LIB_SUFFIX" >&5
     13004+echo "$as_me:16795: result: $CXX_LIB_SUFFIX" >&5
    1292213005 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
    1292313006 
    1292413007 fi
    12925 @@ -16431,6 +16856,8 @@
     13008@@ -16431,6 +16857,8 @@
    1292613009                TEST_ARGS="${TEST_DEPS}"
    1292713010                TEST_ARG2="${TEST_DEP2}"
     
    1293213015                TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
    1293313016                TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
    12934 @@ -16480,7 +16907,7 @@
     13017@@ -16480,7 +16908,7 @@
    1293513018 
    1293613019 if test "$GCC" = yes ; then
    1293713020        case $cf_cv_system_name in #(
    1293813021-       OS/2*|os2*|aix[45]*)    #( vi
    12939 +       OS/2*|os2*|aix[4]*|solaris2.1[0-9])     #( vi
     13022+       OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
    1294013023                LDFLAGS_STATIC=
    1294113024                LDFLAGS_SHARED=
    1294213025                ;;
    12943 @@ -16491,7 +16918,7 @@
     13026@@ -16491,7 +16919,7 @@
    1294413027     esac
    1294513028 else
     
    1295013033                LDFLAGS_SHARED=-bdynamic
    1295113034                ;;
    12952 @@ -16519,12 +16946,12 @@
     13035@@ -16519,12 +16947,12 @@
    1295313036        ;;
    1295413037 esac
    1295513038 
    1295613039-echo "$as_me:16522: checking where we will install curses.h" >&5
    12957 +echo "$as_me:16949: checking where we will install curses.h" >&5
     13040+echo "$as_me:16950: checking where we will install curses.h" >&5
    1295813041 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
    1295913042 test "$with_overwrite" = no && \
     
    1296113044        includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
    1296213045-echo "$as_me:16527: result: $includedir" >&5
    12963 +echo "$as_me:16954: result: $includedir" >&5
     13046+echo "$as_me:16955: result: $includedir" >&5
    1296413047 echo "${ECHO_T}$includedir" >&6
    1296513048 
    1296613049 ### Resolve a conflict between normal and wide-curses by forcing applications
    12967 @@ -16532,10 +16959,11 @@
     13050@@ -16532,10 +16960,11 @@
    1296813051 if test "$with_overwrite" != no ; then
    1296913052 if test "$NCURSES_LIBUTF8" = 1 ; then
    1297013053        NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
    1297113054-       { echo "$as_me:16535: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
    12972 +       { echo "$as_me:16962: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
     13055+       { echo "$as_me:16963: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
    1297313056 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
    1297413057 fi
     
    1297813061 # used to separate tack out of the tree
    1297913062 NCURSES_TREE=
    12980 @@ -16548,7 +16976,7 @@
     13063@@ -16548,7 +16977,7 @@
    1298113064 ### Construct the list of subdirectories for which we'll customize makefiles
    1298213065 ### with the appropriate compile-rules.
    1298313066 
    1298413067-echo "$as_me:16551: checking for src modules" >&5
    12985 +echo "$as_me:16979: checking for src modules" >&5
     13068+echo "$as_me:16980: checking for src modules" >&5
    1298613069 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
    1298713070 
    1298813071 # dependencies and linker-arguments for test-programs
    12989 @@ -16611,13 +17039,17 @@
     13072@@ -16611,13 +17040,17 @@
    1299013073                fi
    1299113074        fi
    1299213075 done
    1299313076-echo "$as_me:16614: result: $cf_cv_src_modules" >&5
    12994 +echo "$as_me:17042: result: $cf_cv_src_modules" >&5
     13077+echo "$as_me:17043: result: $cf_cv_src_modules" >&5
    1299513078 echo "${ECHO_T}$cf_cv_src_modules" >&6
    1299613079 
     
    1300713090 do
    1300813091        SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
    13009 @@ -16628,8 +17060,8 @@
     13092@@ -16628,8 +17061,8 @@
    1301013093 
    1301113094 ADA_SUBDIRS=
     
    1301813101 
    1301913102 SUB_MAKEFILES=
    13020 @@ -16639,15 +17071,15 @@
     13103@@ -16639,15 +17072,15 @@
    1302113104 done
    1302213105 
     
    1303913122 
    1304013123 DIRS_TO_MAKE="lib"
    13041 @@ -16680,7 +17112,7 @@
     13124@@ -16680,7 +17113,7 @@
    1304213125 done
    1304313126 
     
    1304813131 
    1304913132 cat >>confdefs.h <<EOF
    13050 @@ -16749,7 +17181,7 @@
     13133@@ -16749,7 +17182,7 @@
    1305113134 
    1305213135 if test -n "$cf_new_cppflags" ; then
     
    1305713140 
    1305813141 if test -n "$cf_new_extra_cppflags" ; then
    13059 @@ -16760,18 +17192,18 @@
     13142@@ -16760,18 +17193,18 @@
    1306013143 ### If we're building with rpath, try to link non-standard libs that way too.
    1306113144 if test "$DFT_LWR_MODEL" = "shared"; then
    1306213145 
    1306313146-echo "$as_me:16763: checking for updated LDFLAGS" >&5
    13064 +echo "$as_me:17195: checking for updated LDFLAGS" >&5
     13147+echo "$as_me:17196: checking for updated LDFLAGS" >&5
    1306513148 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
    1306613149 if test -n "$LDFLAGS" ; then
    1306713150-echo "$as_me:16766: result: maybe" >&5
    13068 +echo "$as_me:17198: result: maybe" >&5
     13151+echo "$as_me:17199: result: maybe" >&5
    1306913152 echo "${ECHO_T}maybe" >&6
    1307013153 test -n "$verbose" && echo "   ...checking LDFLAGS $LDFLAGS" 1>&6
    1307113154 
    1307213155-echo "${as_me-configure}:16770: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
    13073 +echo "${as_me-configure}:17202: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
     13156+echo "${as_me-configure}:17203: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
    1307413157 
    1307513158 test -n "$verbose" && echo "   ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
    1307613159 
    1307713160-echo "${as_me-configure}:16774: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
    13078 +echo "${as_me-configure}:17206: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
     13161+echo "${as_me-configure}:17207: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
    1307913162 
    1308013163 case "$EXTRA_LDFLAGS" in #(vi
    1308113164 -Wl,-rpath,*) #(vi
    13082 @@ -16793,7 +17225,7 @@
     13165@@ -16793,7 +17226,7 @@
    1308313166        do
    1308413167                test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
    1308513168 
    1308613169-echo "${as_me-configure}:16796: testing Filtering $cf_rpath_src ..." 1>&5
    13087 +echo "${as_me-configure}:17228: testing Filtering $cf_rpath_src ..." 1>&5
     13170+echo "${as_me-configure}:17229: testing Filtering $cf_rpath_src ..." 1>&5
    1308813171 
    1308913172                case $cf_rpath_src in #(vi
    1309013173                -L*) #(vi
    13091 @@ -16804,7 +17236,7 @@
     13174@@ -16804,7 +17237,7 @@
    1309213175                        fi
    1309313176                        test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
    1309413177 
    1309513178-echo "${as_me-configure}:16807: testing ...Filter $cf_rpath_tmp ..." 1>&5
    13096 +echo "${as_me-configure}:17239: testing ...Filter $cf_rpath_tmp ..." 1>&5
     13179+echo "${as_me-configure}:17240: testing ...Filter $cf_rpath_tmp ..." 1>&5
    1309713180 
    1309813181                        EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
    1309913182                        ;;
    13100 @@ -16814,15 +17246,15 @@
     13183@@ -16814,15 +17247,15 @@
    1310113184        LDFLAGS=$cf_rpath_dst
    1310213185        test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
    1310313186 
    1310413187-echo "${as_me-configure}:16817: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
    13105 +echo "${as_me-configure}:17249: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
     13188+echo "${as_me-configure}:17250: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
    1310613189 
    1310713190        test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
    1310813191 
    1310913192-echo "${as_me-configure}:16821: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
    13110 +echo "${as_me-configure}:17253: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
     13193+echo "${as_me-configure}:17254: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
    1311113194 
    1311213195 fi
    1311313196 else
    1311413197-echo "$as_me:16825: result: no" >&5
    13115 +echo "$as_me:17257: result: no" >&5
     13198+echo "$as_me:17258: result: no" >&5
    1311613199 echo "${ECHO_T}no" >&6
    1311713200 fi
    1311813201 
    13119 @@ -16849,8 +17281,18 @@
     13202@@ -16849,8 +17282,18 @@
    1312013203 fi
    1312113204 
     
    1313713220 ac_config_commands="$ac_config_commands default"
    1313813221 cat >confcache <<\_ACEOF
    13139 @@ -16932,7 +17374,7 @@
     13222@@ -16932,7 +17375,7 @@
    1314013223 : ${CONFIG_STATUS=./config.status}
    1314113224 ac_clean_files_save=$ac_clean_files
    1314213225 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
    1314313226-{ echo "$as_me:16935: creating $CONFIG_STATUS" >&5
    13144 +{ echo "$as_me:17377: creating $CONFIG_STATUS" >&5
     13227+{ echo "$as_me:17378: creating $CONFIG_STATUS" >&5
    1314513228 echo "$as_me: creating $CONFIG_STATUS" >&6;}
    1314613229 cat >$CONFIG_STATUS <<_ACEOF
    1314713230 #! $SHELL
    13148 @@ -17064,7 +17506,7 @@
     13231@@ -17064,7 +17507,7 @@
    1314913232 cat >>$CONFIG_STATUS <<EOF
    1315013233 ac_cs_version="\\
     
    1315513238 
    1315613239 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
    13157 @@ -17108,7 +17550,7 @@
     13240@@ -17108,7 +17551,7 @@
    1315813241     echo "$ac_cs_version"; exit 0 ;;
    1315913242   --he | --h)
    1316013243     # Conflict between --help and --header
    1316113244-    { { echo "$as_me:17111: error: ambiguous option: $1
    13162 +    { { echo "$as_me:17553: error: ambiguous option: $1
     13245+    { { echo "$as_me:17554: error: ambiguous option: $1
    1316313246 Try \`$0 --help' for more information." >&5
    1316413247 echo "$as_me: error: ambiguous option: $1
    1316513248 Try \`$0 --help' for more information." >&2;}
    13166 @@ -17127,7 +17569,7 @@
     13249@@ -17127,7 +17570,7 @@
    1316713250     ac_need_defaults=false;;
    1316813251 
    1316913252   # This is an error.
    1317013253-  -*) { { echo "$as_me:17130: error: unrecognized option: $1
    13171 +  -*) { { echo "$as_me:17572: error: unrecognized option: $1
     13254+  -*) { { echo "$as_me:17573: error: unrecognized option: $1
    1317213255 Try \`$0 --help' for more information." >&5
    1317313256 echo "$as_me: error: unrecognized option: $1
    1317413257 Try \`$0 --help' for more information." >&2;}
    13175 @@ -17146,7 +17588,7 @@
     13258@@ -17146,7 +17589,7 @@
    1317613259 ## Running config.status.  ##
    1317713260 ## ----------------------- ##
     
    1318213265   CONFIG_HEADERS  = $CONFIG_HEADERS
    1318313266   CONFIG_LINKS    = $CONFIG_LINKS
    13184 @@ -17181,13 +17623,13 @@
     13267@@ -17181,13 +17624,13 @@
    1318513268 NCURSES_PATCH="$NCURSES_PATCH"
    1318613269 SRC_SUBDIRS="$SRC_SUBDIRS"
     
    1319913282 WITH_ECHO="$with_echo"
    1320013283 WITH_OVERWRITE="$with_overwrite"
    13201 @@ -17206,6 +17648,7 @@
     13284@@ -17206,6 +17649,7 @@
    1320213285 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
    1320313286 cf_cv_system_name="$cf_cv_system_name"
     
    1320713290 target="$target"
    1320813291 
    13209 @@ -17224,7 +17667,7 @@
     13292@@ -17224,7 +17668,7 @@
    1321013293   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
    1321113294   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
    1321213295   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
    1321313296-  *) { { echo "$as_me:17227: error: invalid argument: $ac_config_target" >&5
    13214 +  *) { { echo "$as_me:17670: error: invalid argument: $ac_config_target" >&5
     13297+  *) { { echo "$as_me:17671: error: invalid argument: $ac_config_target" >&5
    1321513298 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
    1321613299    { (exit 1); exit 1; }; };;
    1321713300   esac
    13218 @@ -17349,6 +17792,8 @@
     13301@@ -17349,6 +17793,8 @@
    1321913302 s,@LINT@,$LINT,;t t
    1322013303 s,@LINT_OPTS@,$LINT_OPTS,;t t
     
    1322513308 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
    1322613309 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
    13227 @@ -17359,7 +17804,7 @@
     13310@@ -17359,7 +17805,7 @@
    1322813311 s,@ac_ct_LD@,$ac_ct_LD,;t t
    1322913312 s,@AR@,$AR,;t t
     
    1323413317 s,@BUILD_CC@,$BUILD_CC,;t t
    1323513318 s,@BUILD_CPP@,$BUILD_CPP,;t t
    13236 @@ -17392,6 +17837,7 @@
     13319@@ -17371,6 +17817,7 @@
     13320 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
     13321 s,@cf_list_models@,$cf_list_models,;t t
     13322 s,@LIBTOOL@,$LIBTOOL,;t t
     13323+s,@LT_UNDEF@,$LT_UNDEF,;t t
     13324 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
     13325 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
     13326 s,@LIB_CREATE@,$LIB_CREATE,;t t
     13327@@ -17392,6 +17839,7 @@
    1323713328 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
    1323813329 s,@LD_MODEL@,$LD_MODEL,;t t
     
    1324213333 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
    1324313334 s,@LINK_PROGS@,$LINK_PROGS,;t t
    13244 @@ -17401,7 +17847,6 @@
     13335@@ -17401,7 +17849,6 @@
    1324513336 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
    1324613337 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
     
    1325013341 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
    1325113342 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
    13252 @@ -17425,6 +17870,9 @@
     13343@@ -17425,6 +17872,9 @@
    1325313344 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
    1325413345 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
     
    1326013351 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
    1326113352 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
    13262 @@ -17435,6 +17883,7 @@
     13353@@ -17435,6 +17885,7 @@
    1326313354 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
    1326413355 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
     
    1326813359 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
    1326913360 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
    13270 @@ -17449,7 +17898,7 @@
     13361@@ -17449,7 +17900,7 @@
    1327113362 s,@CXXCPP@,$CXXCPP,;t t
    1327213363 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
     
    1327713368 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
    1327813369 s,@gnat_exists@,$gnat_exists,;t t
    13279 @@ -17493,6 +17942,7 @@
     13370@@ -17493,6 +17944,7 @@
    1328013371 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
    1328113372 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
     
    1328513376 
    1328613377 EOF
    13287 @@ -17607,7 +18057,7 @@
     13378@@ -17607,7 +18059,7 @@
    1328813379   esac
    1328913380 
    1329013381   if test x"$ac_file" != x-; then
    1329113382-    { echo "$as_me:17610: creating $ac_file" >&5
    13292 +    { echo "$as_me:18060: creating $ac_file" >&5
     13383+    { echo "$as_me:18062: creating $ac_file" >&5
    1329313384 echo "$as_me: creating $ac_file" >&6;}
    1329413385     rm -f "$ac_file"
    1329513386   fi
    13296 @@ -17625,7 +18075,7 @@
     13387@@ -17625,7 +18077,7 @@
    1329713388       -) echo $tmp/stdin ;;
    1329813389       [\\/$]*)
    1329913390          # Absolute (can't be DOS-style, as IFS=:)
    1330013391-         test -f "$f" || { { echo "$as_me:17628: error: cannot find input file: $f" >&5
    13301 +         test -f "$f" || { { echo "$as_me:18078: error: cannot find input file: $f" >&5
     13392+         test -f "$f" || { { echo "$as_me:18080: error: cannot find input file: $f" >&5
    1330213393 echo "$as_me: error: cannot find input file: $f" >&2;}
    1330313394    { (exit 1); exit 1; }; }
    1330413395          echo $f;;
    13305 @@ -17638,7 +18088,7 @@
     13396@@ -17638,7 +18090,7 @@
    1330613397            echo $srcdir/$f
    1330713398          else
    1330813399            # /dev/null tree
    1330913400-           { { echo "$as_me:17641: error: cannot find input file: $f" >&5
    13310 +           { { echo "$as_me:18091: error: cannot find input file: $f" >&5
     13401+           { { echo "$as_me:18093: error: cannot find input file: $f" >&5
    1331113402 echo "$as_me: error: cannot find input file: $f" >&2;}
    1331213403    { (exit 1); exit 1; }; }
    1331313404          fi;;
    13314 @@ -17704,7 +18154,7 @@
     13405@@ -17704,7 +18156,7 @@
    1331513406   * )   ac_file_in=$ac_file.in ;;
    1331613407   esac
    1331713408 
    1331813409-  test x"$ac_file" != x- && { echo "$as_me:17707: creating $ac_file" >&5
    13319 +  test x"$ac_file" != x- && { echo "$as_me:18157: creating $ac_file" >&5
     13410+  test x"$ac_file" != x- && { echo "$as_me:18159: creating $ac_file" >&5
    1332013411 echo "$as_me: creating $ac_file" >&6;}
    1332113412 
    1332213413   # First look for the input files in the build tree, otherwise in the
    13323 @@ -17715,7 +18165,7 @@
     13414@@ -17715,7 +18167,7 @@
    1332413415       -) echo $tmp/stdin ;;
    1332513416       [\\/$]*)
    1332613417          # Absolute (can't be DOS-style, as IFS=:)
    1332713418-         test -f "$f" || { { echo "$as_me:17718: error: cannot find input file: $f" >&5
    13328 +         test -f "$f" || { { echo "$as_me:18168: error: cannot find input file: $f" >&5
     13419+         test -f "$f" || { { echo "$as_me:18170: error: cannot find input file: $f" >&5
    1332913420 echo "$as_me: error: cannot find input file: $f" >&2;}
    1333013421    { (exit 1); exit 1; }; }
    1333113422          echo $f;;
    13332 @@ -17728,7 +18178,7 @@
     13423@@ -17728,7 +18180,7 @@
    1333313424            echo $srcdir/$f
    1333413425          else
    1333513426            # /dev/null tree
    1333613427-           { { echo "$as_me:17731: error: cannot find input file: $f" >&5
    13337 +           { { echo "$as_me:18181: error: cannot find input file: $f" >&5
     13428+           { { echo "$as_me:18183: error: cannot find input file: $f" >&5
    1333813429 echo "$as_me: error: cannot find input file: $f" >&2;}
    1333913430    { (exit 1); exit 1; }; }
    1334013431          fi;;
    13341 @@ -17786,7 +18236,7 @@
     13432@@ -17786,7 +18238,7 @@
    1334213433   rm -f $tmp/in
    1334313434   if test x"$ac_file" != x-; then
    1334413435     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
    1334513436-      { echo "$as_me:17789: $ac_file is unchanged" >&5
    13346 +      { echo "$as_me:18239: $ac_file is unchanged" >&5
     13437+      { echo "$as_me:18241: $ac_file is unchanged" >&5
    1334713438 echo "$as_me: $ac_file is unchanged" >&6;}
    1334813439     else
    1334913440       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
    13350 @@ -17873,40 +18323,44 @@
     13441@@ -17873,40 +18325,44 @@
    1335113442                for cf_item in $cf_LIST_MODELS
    1335213443                do
     
    1340413495                                cf_depsuf=$cf_suffix
    1340513496                                ;;
    13406 @@ -18020,40 +18474,44 @@
     13497@@ -18020,40 +18476,44 @@
    1340713498 
    1340813499 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
     
    1346013551                                cf_depsuf=$cf_suffix
    1346113552                                ;;
    13462 @@ -18234,18 +18692,28 @@
     13553@@ -18234,18 +18694,28 @@
    1346313554 install.libs uninstall.libs \\
    1346413555 install.data uninstall.data ::
     
    1348913580 if test -f $srcdir/$tack.h; then
    1349013581 cat >> Makefile <<CF_EOF
    13491 @@ -18256,6 +18724,7 @@
     13582@@ -18256,6 +18726,7 @@
    1349213583 CF_EOF
    1349313584 fi
     
    1349913590diff -Naur ncurses-5.7.orig/configure.in ncurses-5.7/configure.in
    1350013591--- ncurses-5.7.orig/configure.in       2008-10-18 07:53:32.000000000 -0700
    13501 +++ ncurses-5.7/configure.in    2009-03-22 21:17:11.636377985 -0700
     13592+++ ncurses-5.7/configure.in    2009-06-05 14:01:30.000000000 -0700
    1350213593@@ -1,5 +1,5 @@
    1350313594 dnl***************************************************************************
     
    1351213603 dnl
    1351313604-dnl $Id: configure.in,v 1.454 2008/10/18 14:53:32 tom Exp $
    13514 +dnl $Id: configure.in,v 1.469 2009/03/21 21:45:29 Charles.Wilson Exp $
     13605+dnl $Id: configure.in,v 1.470 2009/03/28 18:22:39 Charles.Wilson Exp $
    1351513606 dnl Process this file with autoconf to produce a configure script.
    1351613607 dnl
     
    1352013611 AC_PREREQ(2.13.20020210)
    1352113612-AC_REVISION($Revision: 1.454 $)
    13522 +AC_REVISION($Revision: 1.469 $)
     13613+AC_REVISION($Revision: 1.470 $)
    1352313614 AC_INIT(ncurses/base/lib_initscr.c)
    1352413615 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
     
    1364113732 
    1364213733+### Allow using a different wrap-prefix
    13643 +if test "$cf_cv_enable_reentrant" != 0 ; then
     13734+if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
    1364413735+       AC_MSG_CHECKING(for prefix used to wrap public variables)
    1364513736+       AC_ARG_WITH(wrap-prefix,
     
    1381413905diff -Naur ncurses-5.7.orig/dist.mk ncurses-5.7/dist.mk
    1381513906--- ncurses-5.7.orig/dist.mk    2008-11-01 17:58:38.000000000 -0700
    13816 +++ ncurses-5.7/dist.mk 2009-03-22 21:17:11.636377985 -0700
     13907+++ ncurses-5.7/dist.mk 2009-06-05 14:01:55.000000000 -0700
    1381713908@@ -25,7 +25,7 @@
    1381813909 # use or other dealings in this Software without prior written               #
     
    1382013911 ##############################################################################
    1382113912-# $Id: dist.mk,v 1.671 2008/11/02 00:58:38 tom Exp $
    13822 +# $Id: dist.mk,v 1.690 2009/03/21 18:31:13 tom Exp $
     13913+# $Id: dist.mk,v 1.702 2009/05/30 13:36:52 tom Exp $
    1382313914 # Makefile for creating ncurses distributions.
    1382413915 #
     
    1382913920 NCURSES_MINOR = 7
    1383013921-NCURSES_PATCH = 20081102
    13831 +NCURSES_PATCH = 20090321
     13922+NCURSES_PATCH = 20090530
    1383213923 
    1383313924 # We don't append the patch to the version, since this only applies to releases
     
    1383513926diff -Naur ncurses-5.7.orig/form/fld_def.c ncurses-5.7/form/fld_def.c
    1383613927--- ncurses-5.7.orig/form/fld_def.c     2007-10-13 12:29:58.000000000 -0700
    13837 +++ ncurses-5.7/form/fld_def.c  2009-03-22 21:17:08.396170694 -0700
     13928+++ ncurses-5.7/form/fld_def.c  2009-06-05 14:01:18.000000000 -0700
    1383813929@@ -32,7 +32,7 @@
    1383913930 
     
    1385513946 
    1385613947 /*---------------------------------------------------------------------------
     13948diff -Naur ncurses-5.7.orig/form/fld_newftyp.c ncurses-5.7/form/fld_newftyp.c
     13949--- ncurses-5.7.orig/form/fld_newftyp.c 2007-10-13 12:30:55.000000000 -0700
     13950+++ ncurses-5.7/form/fld_newftyp.c      2009-06-05 14:01:33.000000000 -0700
     13951@@ -1,5 +1,5 @@
     13952 /****************************************************************************
     13953- * Copyright (c) 1998-2004,2007 Free Software Foundation, Inc.              *
     13954+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
     13955  *                                                                          *
     13956  * Permission is hereby granted, free of charge, to any person obtaining a  *
     13957  * copy of this software and associated documentation files (the            *
     13958@@ -32,9 +32,9 @@
     13959 
     13960 #include "form.priv.h"
     13961 
     13962-MODULE_ID("$Id: fld_newftyp.c,v 1.15 2007/10/13 19:30:55 tom Exp $")
     13963+MODULE_ID("$Id: fld_newftyp.c,v 1.16 2009/04/11 21:27:33 tom Exp $")
     13964 
     13965-static FIELDTYPE const default_fieldtype =
     13966+static FIELDTYPE default_fieldtype =
     13967 {
     13968   0,                           /* status                                      */
     13969   0L,                          /* reference count                             */
     13970@@ -49,7 +49,7 @@
     13971   NULL                         /* enumerate previous function                 */
     13972 };
     13973 
     13974-NCURSES_EXPORT_VAR(const FIELDTYPE *)
     13975+NCURSES_EXPORT_VAR(FIELDTYPE *)
     13976 _nc_Default_FieldType = &default_fieldtype;
     13977 
     13978 /*---------------------------------------------------------------------------
     13979diff -Naur ncurses-5.7.orig/form/form.priv.h ncurses-5.7/form/form.priv.h
     13980--- ncurses-5.7.orig/form/form.priv.h   2008-09-08 13:29:05.000000000 -0700
     13981+++ ncurses-5.7/form/form.priv.h        2009-06-05 14:01:33.000000000 -0700
     13982@@ -1,5 +1,5 @@
     13983 /****************************************************************************
     13984- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc.              *
     13985+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     13986  *                                                                          *
     13987  * Permission is hereby granted, free of charge, to any person obtaining a  *
     13988  * copy of this software and associated documentation files (the            *
     13989@@ -30,7 +30,7 @@
     13990  *   Author:  Juergen Pfeifer, 1995,1997                                    *
     13991  ****************************************************************************/
     13992 
     13993-/* $Id: form.priv.h,v 0.27 2008/09/08 20:29:05 tom Exp $ */
     13994+/* $Id: form.priv.h,v 0.28 2009/04/11 21:27:04 tom Exp $ */
     13995 
     13996 #ifndef FORM_PRIV_H
     13997 #define FORM_PRIV_H 1
     13998@@ -62,6 +62,13 @@
     13999 
     14000 #include "form.h"
     14001 
     14002+       /***********************
     14003+       *   Default objects    *
     14004+       ***********************/
     14005+extern NCURSES_EXPORT_VAR(FORM *)      _nc_Default_Form;
     14006+extern NCURSES_EXPORT_VAR(FIELD *)     _nc_Default_Field;
     14007+extern NCURSES_EXPORT_VAR(FIELDTYPE *) _nc_Default_FieldType;
     14008+
     14009 /* form  status values */
     14010 #define _OVLMODE         (0x04U) /* Form is in overlay mode                */
     14011 #define _WINDOW_MODIFIED (0x10U) /* Current field window has been modified */
     14012@@ -91,6 +98,11 @@
     14013 #define Normalize_Field(field) \
     14014   ((field) = (field != 0) ? (field) : _nc_Default_Field)
     14015 
     14016+#if NCURSES_SP_FUNCS
     14017+#define Get_Form_Screen(form) \
     14018+  ((form)->win ? _nc_screen_of((form->win)):CURRENT_SCREEN)
     14019+#endif
     14020+
     14021 /* Retrieve forms window */
     14022 #define Get_Form_Window(form) \
     14023   ((form)->sub?(form)->sub:((form)->win?(form)->win:stdscr))
     14024@@ -144,8 +156,6 @@
     14025 
     14026 #define C_ZEROS '\0'
     14027 
     14028-extern NCURSES_EXPORT_VAR(const FIELDTYPE *) _nc_Default_FieldType;
     14029-
     14030 extern NCURSES_EXPORT(TypeArgument *) _nc_Make_Argument (const FIELDTYPE*, va_list*, int*);
     14031 extern NCURSES_EXPORT(TypeArgument *) _nc_Copy_Argument (const FIELDTYPE*, const TypeArgument*, int*);
     14032 extern NCURSES_EXPORT(void) _nc_Free_Argument (const FIELDTYPE*, TypeArgument*);
     14033@@ -176,8 +186,8 @@
     14034 extern NCURSES_EXPORT(FIELD **)            _nc_retrace_field_ptr (FIELD **);
     14035 extern NCURSES_EXPORT(FIELD *)     _nc_retrace_field (FIELD *);
     14036 extern NCURSES_EXPORT(FIELDTYPE *)  _nc_retrace_field_type (FIELDTYPE *);
     14037-extern NCURSES_EXPORT(FORM *)  _nc_retrace_form (FORM *);
     14038-extern NCURSES_EXPORT(Form_Hook)  _nc_retrace_form_hook (Form_Hook);
     14039+extern NCURSES_EXPORT(FORM *)       _nc_retrace_form (FORM *);
     14040+extern NCURSES_EXPORT(Form_Hook)    _nc_retrace_form_hook (Form_Hook);
     14041 
     14042 #else /* !TRACE */
     14043 
    1385714044diff -Naur ncurses-5.7.orig/form/frm_driver.c ncurses-5.7/form/frm_driver.c
    1385814045--- ncurses-5.7.orig/form/frm_driver.c  2008-10-18 09:25:00.000000000 -0700
    13859 +++ ncurses-5.7/form/frm_driver.c       2009-03-22 21:16:49.034929738 -0700
     14046+++ ncurses-5.7/form/frm_driver.c       2009-06-05 14:00:55.000000000 -0700
    1386014047@@ -32,7 +32,7 @@
    1386114048 
     
    1387514062   mvwaddstr(field->working, 0, 0, value);
    1387614063 
     14064diff -Naur ncurses-5.7.orig/form/frm_sub.c ncurses-5.7/form/frm_sub.c
     14065--- ncurses-5.7.orig/form/frm_sub.c     2004-12-11 14:13:39.000000000 -0800
     14066+++ ncurses-5.7/form/frm_sub.c  2009-06-05 14:01:33.000000000 -0700
     14067@@ -1,5 +1,5 @@
     14068 /****************************************************************************
     14069- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
     14070+ * Copyright (c) 1998-2004,2009 Free Software Foundation, Inc.              *
     14071  *                                                                          *
     14072  * Permission is hereby granted, free of charge, to any person obtaining a  *
     14073  * copy of this software and associated documentation files (the            *
     14074@@ -27,12 +27,12 @@
     14075  ****************************************************************************/
     14076 
     14077 /****************************************************************************
     14078- *   Author:  Juergen Pfeifer, 1995,1997                                    *
     14079+ *   Author:  Juergen Pfeifer, 1995-1997,2009                               *
     14080  ****************************************************************************/
     14081 
     14082 #include "form.priv.h"
     14083 
     14084-MODULE_ID("$Id: frm_sub.c,v 1.9 2004/12/11 22:13:39 tom Exp $")
     14085+MODULE_ID("$Id: frm_sub.c,v 1.10 2009/04/11 18:32:47 tom Exp $")
     14086 
     14087 /*---------------------------------------------------------------------------
     14088 |   Facility      :  libnform 
     14089@@ -50,9 +50,18 @@
     14090 
     14091   if (form && (form->status & _POSTED))
     14092     RETURN(E_POSTED);
     14093-
     14094-  Normalize_Form(form)->sub = win;
     14095-  RETURN(E_OK);
     14096+  else
     14097+    {
     14098+#if NCURSES_SP_FUNCS
     14099+      FORM *f = Normalize_Form(form);
     14100+
     14101+      f->sub = win ? win : Get_Form_Screen(f)->_stdscr;
     14102+      RETURN(E_OK);
     14103+#else
     14104+      Normalize_Form(form)->sub = win;
     14105+      RETURN(E_OK);
     14106+#endif
     14107+    }
     14108 }
     14109 
     14110 /*---------------------------------------------------------------------------
     14111diff -Naur ncurses-5.7.orig/form/frm_win.c ncurses-5.7/form/frm_win.c
     14112--- ncurses-5.7.orig/form/frm_win.c     2004-12-11 14:15:27.000000000 -0800
     14113+++ ncurses-5.7/form/frm_win.c  2009-06-05 14:01:44.000000000 -0700
     14114@@ -1,5 +1,5 @@
     14115 /****************************************************************************
     14116- * Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *
     14117+ * Copyright (c) 1998-2004,2009 Free Software Foundation, Inc.              *
     14118  *                                                                          *
     14119  * Permission is hereby granted, free of charge, to any person obtaining a  *
     14120  * copy of this software and associated documentation files (the            *
     14121@@ -32,7 +32,7 @@
     14122 
     14123 #include "form.priv.h"
     14124 
     14125-MODULE_ID("$Id: frm_win.c,v 1.13 2004/12/11 22:15:27 tom Exp $")
     14126+MODULE_ID("$Id: frm_win.c,v 1.14 2009/04/18 18:38:57 tom Exp $")
     14127 
     14128 /*---------------------------------------------------------------------------
     14129 |   Facility      :  libnform 
     14130@@ -50,9 +50,18 @@
     14131 
     14132   if (form && (form->status & _POSTED))
     14133     RETURN(E_POSTED);
     14134-
     14135-  Normalize_Form(form)->win = win;
     14136-  RETURN(E_OK);
     14137+  else
     14138+    {
     14139+#if NCURSES_SP_FUNCS
     14140+      FORM *f = Normalize_Form(form);
     14141+
     14142+      f->win = win ? win : Get_Form_Screen(f)->_stdscr;
     14143+      RETURN(E_OK);
     14144+#else
     14145+      Normalize_Form(form)->win = win;
     14146+      RETURN(E_OK);
     14147+#endif
     14148+    }
     14149 }
     14150 
     14151 /*---------------------------------------------------------------------------
     14152@@ -66,12 +75,18 @@
     14153 NCURSES_EXPORT(WINDOW *)
     14154 form_win(const FORM *form)
     14155 {
     14156+  WINDOW *result;
     14157   const FORM *f;
     14158 
     14159   T((T_CALLED("form_win(%p)"), form));
     14160 
     14161   f = Normalize_Form(form);
     14162-  returnWin(f->win ? f->win : stdscr);
     14163+#if NCURSES_SP_FUNCS
     14164+  result = (f->win ? f->win : Get_Form_Screen(f)->_stdscr);
     14165+#else
     14166+  result = (f->win ? f->win : stdscr);
     14167+#endif
     14168+  returnWin(result);
     14169 }
     14170 
     14171 /* frm_win.c ends here */
    1387714172diff -Naur ncurses-5.7.orig/form/Makefile.in ncurses-5.7/form/Makefile.in
    1387814173--- ncurses-5.7.orig/form/Makefile.in   2007-04-28 07:56:11.000000000 -0700
    13879 +++ ncurses-5.7/form/Makefile.in        2009-03-22 21:16:55.671355217 -0700
     14174+++ ncurses-5.7/form/Makefile.in        2009-06-05 14:01:30.000000000 -0700
    1388014175@@ -1,6 +1,6 @@
    1388114176-# $Id: Makefile.in,v 1.47 2007/04/28 14:56:11 tom Exp $
    13882 +# $Id: Makefile.in,v 1.48 2009/01/03 19:09:26 tom Exp $
     14177+# $Id: Makefile.in,v 1.49 2009/03/28 18:22:39 Charles.Wilson Exp $
    1388314178 ##############################################################################
    1388414179-# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                #
     
    1388714182 # Permission is hereby granted, free of charge, to any person obtaining a    #
    1388814183 # copy of this software and associated documentation files (the "Software"), #
    13889 @@ -70,7 +70,7 @@
     14184@@ -63,6 +63,7 @@
     14185 LIBTOOL_LINK   = @LIB_LINK@
     14186 LIBTOOL_INSTALL        = @LIB_INSTALL@
     14187 LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
     14188+LT_UNDEF       = @LT_UNDEF@
     14189 
     14190 INSTALL                = @INSTALL@
     14191 INSTALL_LIB    = @INSTALL@ @INSTALL_LIB@
     14192@@ -70,7 +71,7 @@
    1389014193 INSTALL_DATA   = @INSTALL_DATA@
    1389114194 
     
    1389814201diff -Naur ncurses-5.7.orig/include/capdefaults.c ncurses-5.7/include/capdefaults.c
    1389914202--- ncurses-5.7.orig/include/capdefaults.c      2008-08-04 05:33:42.000000000 -0700
    13900 +++ ncurses-5.7/include/capdefaults.c   2009-03-22 21:17:07.012081575 -0700
     14203+++ ncurses-5.7/include/capdefaults.c   2009-06-05 14:01:16.000000000 -0700
    1390114204@@ -32,7 +32,7 @@
    1390214205  *     and: Thomas E. Dickey                        1996-on                 *
     
    1392414227diff -Naur ncurses-5.7.orig/include/curses.h.in ncurses-5.7/include/curses.h.in
    1392514228--- ncurses-5.7.orig/include/curses.h.in        2008-08-30 13:11:29.000000000 -0700
    13926 +++ ncurses-5.7/include/curses.h.in     2009-03-22 21:17:11.636377985 -0700
     14229+++ ncurses-5.7/include/curses.h.in     2009-06-05 14:01:54.000000000 -0700
    1392714230@@ -1,5 +1,5 @@
    1392814231 /****************************************************************************
     
    1393714240 
    1393814241-/* $Id: curses.h.in,v 1.187 2008/08/30 20:11:29 tom Exp $ */
    13939 +/* $Id: curses.h.in,v 1.195 2009/03/21 21:04:57 tom Exp $ */
     14242+/* $Id: curses.h.in,v 1.201 2009/05/23 21:31:35 tom Exp $ */
    1394014243 
    1394114244 #ifndef __NCURSES_H
     
    1397514278  */
    1397614279 #undef NCURSES_SIZE_T
    13977 @@ -224,9 +232,9 @@
     14280@@ -138,7 +146,6 @@
     14281 #endif
     14282 
     14283 #include <stdio.h>
     14284-#include <unctrl.h>
     14285 #include <stdarg.h>    /* we need va_list */
     14286 #ifdef _XOPEN_SOURCE_EXTENDED
     14287 #include <stddef.h>    /* we want wchar_t */
     14288@@ -224,9 +231,9 @@
    1397814289 
    1397914290 /* line graphics */
     
    1398714298 extern NCURSES_EXPORT_VAR(chtype) acs_map[];
    1398814299 #endif
    13989 @@ -646,7 +654,7 @@
     14300@@ -511,6 +518,12 @@
     14301 #endif
     14302 
     14303 /*
     14304+ * Curses uses a helper function.  Define our type for this to simplify
     14305+ * extending it for the sp-funcs feature.
     14306+ */
     14307+typedef int (*NCURSES_OUTC)(int);
     14308+
     14309+/*
     14310  * Function prototypes.  This is the complete X/Open Curses list of required
     14311  * functions.  Those marked `generated' will have sources generated from the
     14312  * macro definitions later in this file, in order to satisfy XPG4.2
     14313@@ -646,7 +659,7 @@
    1399014314 extern NCURSES_EXPORT(int) mvwinnstr (WINDOW *, int, int, char *, int);                /* generated */
    1399114315 extern NCURSES_EXPORT(int) mvwinsch (WINDOW *, int, int, chtype);              /* generated */
     
    1399614320 extern NCURSES_EXPORT(int) mvwprintw (WINDOW*,int,int, const char *,...)       /* implemented */
    1399714321                GCC_PRINTFLIKE(4,5);
    13998 @@ -654,9 +662,9 @@
     14322@@ -654,9 +667,9 @@
    1399914323                GCC_SCANFLIKE(4,5);
    1400014324 extern NCURSES_EXPORT(int) mvwvline (WINDOW *,int, int, chtype, int);  /* generated */
     
    1400814332 extern NCURSES_EXPORT(int) nocbreak (void);                            /* implemented */
    1400914333 extern NCURSES_EXPORT(int) nodelay (WINDOW *,bool);                    /* implemented */
    14010 @@ -710,7 +718,7 @@
     14334@@ -710,7 +723,7 @@
    1401114335 extern NCURSES_EXPORT(int) slk_refresh (void);                         /* implemented */
    1401214336 extern NCURSES_EXPORT(int) slk_restore (void);                         /* implemented */
     
    1401714341 extern NCURSES_EXPORT(int) standend (void);                            /* generated */
    1401814342 extern NCURSES_EXPORT(int) start_color (void);                         /* implemented */
    14019 @@ -856,23 +864,119 @@
     14343@@ -727,7 +740,7 @@
     14344 extern NCURSES_EXPORT(int) untouchwin (WINDOW *);                      /* generated */
     14345 extern NCURSES_EXPORT(void) use_env (bool);                            /* implemented */
     14346 extern NCURSES_EXPORT(int) vidattr (chtype);                           /* implemented */
     14347-extern NCURSES_EXPORT(int) vidputs (chtype, int (*)(int));             /* implemented */
     14348+extern NCURSES_EXPORT(int) vidputs (chtype, NCURSES_OUTC);             /* implemented */
     14349 extern NCURSES_EXPORT(int) vline (chtype, int);                                /* generated */
     14350 extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *,va_list);  /* implemented */
     14351 extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *,va_list); /* generated */
     14352@@ -856,23 +869,133 @@
    1402014353  * These extensions provide access to information stored in the WINDOW even
    1402114354  * when NCURSES_OPAQUE is set:
     
    1405914392+#define NCURSES_SP_NAME(name) name##_sp
    1406014393+
     14394+/* Define the sp-funcs helper function */
     14395+#define NCURSES_SP_OUTC NCURSES_SP_NAME(NCURSES_OUTC)
     14396+typedef int (*NCURSES_SP_OUTC)(SCREEN*, int);
     14397+
    1406114398+extern NCURSES_EXPORT(SCREEN*) new_prescr(void); /* implemented */
    1406214399+
     
    1406514402+extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(can_change_color) (SCREEN*); /* implemented */
    1406614403+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(cbreak) (SCREEN*); /* implemented */
     14404+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(curs_set) (SCREEN*, int); /* implemented */
    1406714405+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(color_content) (SCREEN*, short, short*, short*, short*); /* implemented */
    1406814406+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(def_prog_mode) (SCREEN*); /* implemented */
     
    1407614414+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(flash) (SCREEN*); /* implemented */
    1407714415+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(flushinp) (SCREEN*); /* implemented */
     14416+extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(getwin) (SCREEN*, FILE *);                     /* implemented */
    1407814417+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(halfdelay)(SCREEN*, int); /* implemented */
    1407914418+extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_colors) (SCREEN*); /* implemented */
     
    1409014429+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(napms) (SCREEN*, int); /* implemented */
    1409114430+extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newpad) (SCREEN*, int, int); /* implemented */
    14092 +extern NCURSES_EXPORT(SCREEN *) NCURSES_SP_NAME(newterm) (SCREEN*, NCURSES_CONST char *, FILE *, FILE *); /* implemented */
     14431+extern NCURSES_EXPORT(SCREEN*) NCURSES_SP_NAME(newterm) (SCREEN*, NCURSES_CONST char *, FILE *, FILE *); /* implemented */
    1409314432+extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newwin) (SCREEN*, int, int, int, int); /* implemented */
    1409414433+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nl) (SCREEN*); /* implemented */
    1409514434+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nocbreak) (SCREEN*); /* implemented */
    1409614435+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(noecho) (SCREEN*); /* implemented */
    14097 +extern NCURSES_EXPORT(void) NCURSES_SP_NAME(nofilter) (SCREEN*); /* implemented */
    1409814436+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nonl) (SCREEN*); /* implemented */
    1409914437+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(noqiflush) (SCREEN*); /* implemented */
     
    1410414442+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(reset_prog_mode) (SCREEN*); /* implemented */
    1410514443+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(reset_shell_mode) (SCREEN*); /* implemented */
     14444+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resetty) (SCREEN*); /* implemented */
    1410614445+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ripoffline) (SCREEN*, int, int (*)(WINDOW *, int)); /* implemented */
     14446+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(savetty) (SCREEN*); /* implemented */
    1410714447+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_init) (SCREEN*, const char *); /* implemented */
    1410814448+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_restore) (SCREEN*, const char *); /* implemented */
     
    1412814468+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ungetch) (SCREEN*, int); /* implemented */
    1412914469+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(use_env) (SCREEN*, bool); /* implemented */
     14470+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidattr) (SCREEN*, chtype); /* implemented */
     14471+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidputs) (SCREEN*, chtype, NCURSES_SP_OUTC); /* implemented */
    1413014472+#if @NCURSES_EXT_FUNCS@
    1413114473+extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(keybound) (SCREEN*, int, int);
     
    1413314475+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(define_key) (SCREEN*, const char *, int);
    1413414476+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(get_escdelay) (SCREEN*);
     14477+extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(is_term_resized) (SCREEN*, int, int);
    1413514478+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(key_defined)(SCREEN*, const char *);
    1413614479+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(keyok) (SCREEN*, int, bool);
     14480+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(nofilter) (SCREEN*); /* implemented */
     14481+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resize_term) (SCREEN*, int, int);
     14482+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resizeterm) (SCREEN*, int, int);
    1413714483+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(set_escdelay) (SCREEN*, int);
    1413814484+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(set_tabsize) (SCREEN*, int);
     
    1414414490+#define NCURSES_SP_FUNCS 0
    1414514491+#define NCURSES_SP_NAME(name) name
     14492+#define NCURSES_SP_OUTC NCURSES_OUTC
    1414614493+#endif
    1414714494+
     
    1414914496 
    1415014497 #define NCURSES_ATTR_SHIFT       8
    14151 @@ -1173,7 +1277,7 @@
     14498@@ -971,9 +1094,9 @@
     14499 #if !NCURSES_OPAQUE
     14500 #if defined(_XOPEN_SOURCE_EXTENDED) && @NCURSES_EXT_COLORS@
     14501 #define wattrset(win,at)       ((win)->_color = PAIR_NUMBER(at), \
     14502-                                (win)->_attrs = (at))
     14503+                                 NCURSES_CAST(int, (win)->_attrs = (at)))
     14504 #else
     14505-#define wattrset(win,at)       ((win)->_attrs = (at))
     14506+#define wattrset(win,at)        NCURSES_CAST(int, (win)->_attrs = (at))
     14507 #endif
     14508 #endif /* NCURSES_OPAQUE */
     14509 
     14510@@ -1173,7 +1296,7 @@
    1415214511  *        It gives the ESC expire time in milliseconds.
    1415314512  *     b. ttytype is needed for backward compatibility
     
    1416014519diff -Naur ncurses-5.7.orig/include/curses.tail ncurses-5.7/include/curses.tail
    1416114520--- ncurses-5.7.orig/include/curses.tail        2008-07-05 13:20:38.000000000 -0700
    14162 +++ ncurses-5.7/include/curses.tail     2009-03-22 21:16:46.494768822 -0700
     14521+++ ncurses-5.7/include/curses.tail     2009-06-05 14:01:54.000000000 -0700
    1416314522@@ -1,4 +1,4 @@
    1416414523-/* $Id: curses.tail,v 1.16 2008/07/05 20:20:38 tom Exp $ */
    14165 +/* $Id: curses.tail,v 1.17 2008/11/23 00:12:12 tom Exp $ */
     14524+/* $Id: curses.tail,v 1.19 2009/05/23 19:19:43 tom Exp $ */
    1416614525 /*
    1416714526  * vile:cmode:
    1416814527  * This file is part of ncurses, designed to be appended after curses.h.in
    14169 @@ -94,6 +94,7 @@
     14528@@ -94,13 +94,22 @@
    1417014529 }
    1417114530 MEVENT;
    1417214531 
    14173 +extern NCURSES_EXPORT(bool) has_mouse (void);
    14174  extern NCURSES_EXPORT(int) getmouse (MEVENT *);
    14175  extern NCURSES_EXPORT(int) ungetmouse (MEVENT *);
     14532-extern NCURSES_EXPORT(int) getmouse (MEVENT *);
     14533-extern NCURSES_EXPORT(int) ungetmouse (MEVENT *);
     14534+extern NCURSES_EXPORT(bool)    has_mouse(void);
     14535+extern NCURSES_EXPORT(int)     getmouse (MEVENT *);
     14536+extern NCURSES_EXPORT(int)     ungetmouse (MEVENT *);
    1417614537 extern NCURSES_EXPORT(mmask_t) mousemask (mmask_t, mmask_t *);
     14538-extern NCURSES_EXPORT(bool) wenclose (const WINDOW *, int, int);
     14539-extern NCURSES_EXPORT(int) mouseinterval (int);
     14540-extern NCURSES_EXPORT(bool) wmouse_trafo (const WINDOW*, int*, int*, bool);
     14541-extern NCURSES_EXPORT(bool) mouse_trafo (int*, int*, bool);              /* generated */
     14542+extern NCURSES_EXPORT(bool)    wenclose (const WINDOW *, int, int);
     14543+extern NCURSES_EXPORT(int)     mouseinterval (int);
     14544+extern NCURSES_EXPORT(bool)    wmouse_trafo (const WINDOW*, int*, int*, bool);
     14545+extern NCURSES_EXPORT(bool)    mouse_trafo (int*, int*, bool);              /* generated */
     14546+
     14547+#if NCURSES_SP_FUNCS
     14548+extern NCURSES_EXPORT(bool)    NCURSES_SP_NAME(has_mouse) (SCREEN*);
     14549+extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(getmouse) (SCREEN*, MEVENT *);
     14550+extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(ungetmouse) (SCREEN*,MEVENT *);
     14551+extern NCURSES_EXPORT(mmask_t) NCURSES_SP_NAME(mousemask) (SCREEN*, mmask_t, mmask_t *);
     14552+extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(mouseinterval) (SCREEN*, int);
     14553+#endif
     14554 
     14555 #define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
     14556 
     14557@@ -109,6 +118,11 @@
     14558 extern NCURSES_EXPORT(int) mcprint (char *, int);      /* direct data to printer */
     14559 extern NCURSES_EXPORT(int) has_key (int);              /* do we have given key? */
     14560 
     14561+#if NCURSES_SP_FUNCS
     14562+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(has_key) (SCREEN*, int);    /* do we have given key? */
     14563+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mcprint) (SCREEN*, char *, int);    /* direct data to printer */
     14564+#endif
     14565+
     14566 /* Debugging : use with libncurses_g.a */
     14567 
     14568 extern NCURSES_EXPORT(void) _tracef (const char *, ...) GCC_PRINTFLIKE(1,2);
     14569@@ -160,6 +174,8 @@
     14570 #define OPTIMIZE_ALL           0xff    /* enable all optimizations (dflt) */
     14571 #endif
     14572 
     14573+#include <unctrl.h>
     14574+
     14575 #ifdef __cplusplus
     14576 
     14577 #ifndef NCURSES_NOMACROS
    1417714578diff -Naur ncurses-5.7.orig/include/curses.wide ncurses-5.7/include/curses.wide
    1417814579--- ncurses-5.7.orig/include/curses.wide        2007-03-10 09:52:23.000000000 -0800
    14179 +++ ncurses-5.7/include/curses.wide     2009-03-22 21:16:47.770848442 -0700
     14580+++ ncurses-5.7/include/curses.wide     2009-06-05 14:01:51.000000000 -0700
    1418014581@@ -1,9 +1,11 @@
    1418114582-/* $Id: curses.wide,v 1.34 2007/03/10 17:52:23 tom Exp $ */
    14182 +/* $Id: curses.wide,v 1.36 2008/11/29 18:44:08 tom Exp $ */
     14583+/* $Id: curses.wide,v 1.39 2009/05/09 15:43:00 tom Exp $ */
    1418314584 /*
    1418414585  * vile:cmode:
     
    1419114592 
    1419214593 extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs;
     14594@@ -138,7 +140,7 @@
     14595 extern NCURSES_EXPORT(attr_t) term_attrs (void);                       /* implemented */
     14596 extern NCURSES_EXPORT(int) unget_wch (const wchar_t);                  /* implemented */
     14597 extern NCURSES_EXPORT(int) vid_attr (attr_t, short, void *);           /* implemented */
     14598-extern NCURSES_EXPORT(int) vid_puts (attr_t, short, void *, int (*)(int)); /* implemented */
     14599+extern NCURSES_EXPORT(int) vid_puts (attr_t, short, void *, NCURSES_OUTC); /* implemented */
     14600 extern NCURSES_EXPORT(int) vline_set (const cchar_t *, int);           /* generated:WIDEC */
     14601 extern NCURSES_EXPORT(int) wadd_wch (WINDOW *,const cchar_t *);                /* implemented */
     14602 extern NCURSES_EXPORT(int) wadd_wchnstr (WINDOW *,const cchar_t *,int);        /* implemented */
     14603@@ -165,6 +167,14 @@
     14604 extern NCURSES_EXPORT(wchar_t*) wunctrl (cchar_t *);                   /* implemented */
     14605 extern NCURSES_EXPORT(int) wvline_set (WINDOW *, const cchar_t *, int);        /* implemented */
     14606 
     14607+#if NCURSES_SP_FUNCS
     14608+extern NCURSES_EXPORT(attr_t) NCURSES_SP_NAME(term_attrs) (SCREEN*);           /* implemented */
     14609+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(unget_wch) (SCREEN*, const wchar_t);        /* implemented */
     14610+extern NCURSES_EXPORT(wchar_t*) NCURSES_SP_NAME(wunctrl) (SCREEN*, cchar_t *); /* implemented */
     14611+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_attr) (SCREEN*, attr_t, short, void *);
     14612+extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_puts) (SCREEN*, attr_t, short, void *, NCURSES_SP_OUTC);
     14613+#endif
     14614+
     14615 #ifndef NCURSES_NOMACROS
     14616 
     14617 /*
    1419314618diff -Naur ncurses-5.7.orig/include/MKterm.h.awk.in ncurses-5.7/include/MKterm.h.awk.in
    1419414619--- ncurses-5.7.orig/include/MKterm.h.awk.in    2008-05-24 16:13:59.000000000 -0700
    14195 +++ ncurses-5.7/include/MKterm.h.awk.in 2009-03-22 21:17:08.396170694 -0700
     14620+++ ncurses-5.7/include/MKterm.h.awk.in 2009-06-05 14:01:51.000000000 -0700
    1419614621@@ -1,7 +1,7 @@
    1419714622 # vile:awkmode
     
    1420814633                    print  ""
    1420914634-                   print  "/* $Id: MKterm.h.awk.in,v 1.50 2008/05/24 23:13:59 tom Exp $ */"
    14210 +                   print  "/* $Id: MKterm.h.awk.in,v 1.53 2009/02/28 21:27:45 tom Exp $ */"
     14635+                   print  "/* $Id: MKterm.h.awk.in,v 1.57 2009/05/09 15:54:50 tom Exp $ */"
    1421114636                    print  ""
    1421214637                    print  "/*"
    1421314638                    print  "**  term.h -- Definition of struct term"
    14214 @@ -228,8 +228,16 @@
     14639@@ -130,11 +130,15 @@
     14640                    print  ""
     14641                    print  "#else /* !HAVE_TERMIO_H */"
     14642                    print  ""
     14643+                   print  "#if __MINGW32__"
     14644+                   print  "#  include <ncurses_mingw.h>"
     14645+                   print  "#  define TTY struct termios"
     14646+                   print  "#else"
     14647                    print  "#undef TERMIOS"
     14648                    print  "#include <sgtty.h>"
     14649                    print  "#include <sys/ioctl.h>"
     14650                    print  "#define TTY struct sgttyb"
     14651-                   print  ""
     14652+                   print  "#endif /* MINGW32 */"
     14653                    print  "#endif /* HAVE_TERMIO_H */"
     14654                    print  ""
     14655                    print  "#endif /* HAVE_TERMIOS_H */"
     14656@@ -228,8 +232,16 @@
    1421514657                        print  "    char *      _termname;      /* used for termname() */"
    1421614658                        print  "} TERMINAL;"
     
    1423014672                        print  "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes);"
    1423114673                        print  "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolfnames);"
    14232 @@ -240,7 +248,6 @@
     14674@@ -240,7 +252,6 @@
    1423314675                        print  "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strcodes);"
    1423414676                        print  "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strfnames);"
     
    1423814680                        print  "#define boolcodes  NCURSES_PUBLIC_VAR(boolcodes())"
    1423914681                        print  "#define boolfnames NCURSES_PUBLIC_VAR(boolfnames())"
    14240 @@ -253,8 +260,6 @@
     14682@@ -253,8 +264,6 @@
    1424114683                        print  ""
    1424214684                        print  "#else"
     
    1424714689                        print  "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];"
    1424814690                        print  "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[];"
     14691@@ -312,6 +321,37 @@
     14692                        print  "extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));"
     14693                        print  "#endif /* NCURSES_TERMCAP_H_incl */"
     14694                        print  ""
     14695+                       print  "/*"
     14696+                       print  " * Include curses.h before term.h to enable these extensions."
     14697+                       print  " */"
     14698+                       print  "#if defined(NCURSES_SP_FUNCS) && (NCURSES_SP_FUNCS != 0)"
     14699+                       print  ""
     14700+                       print  "extern NCURSES_EXPORT(char *)  NCURSES_SP_NAME(tigetstr) (SCREEN*, NCURSES_CONST char *);"
     14701+                       print  "extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(putp) (SCREEN*, const char *);"
     14702+                       print  "extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(tigetflag) (SCREEN*, NCURSES_CONST char *);"
     14703+                       print  "extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(tigetnum) (SCREEN*, NCURSES_CONST char *);"
     14704+                       print  ""
     14705+                       print  "#if @NCURSES_TPARM_VARARGS@ /* NCURSES_TPARM_VARARGS */"
     14706+                       print  "extern NCURSES_EXPORT(char *)  NCURSES_SP_NAME(tparm) (SCREEN*, NCURSES_CONST char *, ...);     /* special */"
     14707+                       print  "#else"
     14708+                       print  "extern NCURSES_EXPORT(char *)  NCURSES_SP_NAME(tparm) (SCREEN*, NCURSES_CONST char *, long,long,long,long,long,long,long,long,long);    /* special */"
     14709+                       print  "extern NCURSES_EXPORT(char *)  NCURSES_SP_NAME(tparm_varargs) (SCREEN*, NCURSES_CONST char *, ...);     /* special */"
     14710+                       print  "#endif"
     14711+                       print  ""
     14712+                       print  "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */"
     14713+                       print  "extern NCURSES_EXPORT(char *)  NCURSES_SP_NAME(tgetstr) (SCREEN*, NCURSES_CONST char *, char **);"
     14714+                       print  "extern NCURSES_EXPORT(char *)  NCURSES_SP_NAME(tgoto) (SCREEN*, const char *, int, int);"
     14715+                       print  "extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(tgetent) (SCREEN*, char *, const char *);"
     14716+                       print  "extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(tgetflag) (SCREEN*, NCURSES_CONST char *);"
     14717+                       print  "extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(tgetnum) (SCREEN*, NCURSES_CONST char *);"
     14718+                       print  "extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(tputs) (SCREEN*, const char *, int, NCURSES_SP_OUTC);"
     14719+                       print  ""
     14720+                       print  "extern NCURSES_EXPORT(TERMINAL *) NCURSES_SP_NAME(set_curterm) (SCREEN*, TERMINAL *);"
     14721+                       print  "extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(del_curterm) (SCREEN*, TERMINAL *);"
     14722+                       print  ""
     14723+                       print  "extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(restartterm) (SCREEN*, NCURSES_CONST char *, int, int *);"
     14724+                       print  "#endif /* NCURSES_SP_FUNCS */"
     14725+                       print  ""
     14726                        print  "#ifdef __cplusplus"
     14727                        print  "}"
     14728                        print  "#endif"
     14729diff -Naur ncurses-5.7.orig/include/nc_alloc.h ncurses-5.7/include/nc_alloc.h
     14730--- ncurses-5.7.orig/include/nc_alloc.h 2008-09-27 15:30:33.000000000 -0700
     14731+++ ncurses-5.7/include/nc_alloc.h      2009-06-05 14:01:44.000000000 -0700
     14732@@ -1,5 +1,5 @@
     14733 /****************************************************************************
     14734- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     14735+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     14736  *                                                                          *
     14737  * Permission is hereby granted, free of charge, to any person obtaining a  *
     14738  * copy of this software and associated documentation files (the            *
     14739@@ -29,7 +29,7 @@
     14740 /****************************************************************************
     14741  *  Author: Thomas E. Dickey                    1996-on                     *
     14742  ****************************************************************************/
     14743-/* $Id: nc_alloc.h,v 1.16 2008/09/27 22:30:33 tom Exp $ */
     14744+/* $Id: nc_alloc.h,v 1.17 2009/04/18 20:48:19 tom Exp $ */
     14745 
     14746 #ifndef NC_ALLOC_included
     14747 #define NC_ALLOC_included 1
     14748@@ -74,9 +74,15 @@
     14749 extern NCURSES_EXPORT(void) _nc_free_tparm(void);
     14750 extern NCURSES_EXPORT(void) _nc_leaks_dump_entry(void);
     14751 extern NCURSES_EXPORT(void) _nc_leaks_tic(void);
     14752-#define ExitProgram(code) _nc_free_and_exit(code)
     14753+
     14754+#if NCURSES_SP_FUNCS
     14755+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_free_and_exit)(SCREEN*, int) GCC_NORETURN;
     14756 #endif
     14757 
     14758+#define ExitProgram(code) _nc_free_and_exit(code)
     14759+
     14760+#endif /* NO_LEAKS, etc */
     14761+
     14762 #ifndef HAVE_NC_FREEALL
     14763 #define HAVE_NC_FREEALL 0
     14764 #endif
     14765diff -Naur ncurses-5.7.orig/include/nc_panel.h ncurses-5.7/include/nc_panel.h
     14766--- ncurses-5.7.orig/include/nc_panel.h 2008-08-04 11:26:46.000000000 -0700
     14767+++ ncurses-5.7/include/nc_panel.h      2009-06-05 14:01:33.000000000 -0700
     14768@@ -1,5 +1,5 @@
     14769 /****************************************************************************
     14770- * Copyright (c) 1998-2000,2008 Free Software Foundation, Inc.              *
     14771+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     14772  *                                                                          *
     14773  * Permission is hereby granted, free of charge, to any person obtaining a  *
     14774  * copy of this software and associated documentation files (the            *
     14775@@ -33,7 +33,7 @@
     14776 
     14777 
     14778 /*
     14779- * $Id: nc_panel.h,v 1.5 2008/08/04 18:26:46 tom Exp $
     14780+ * $Id: nc_panel.h,v 1.6 2009/04/11 21:17:57 tom Exp $
     14781  *
     14782  *     nc_panel.h
     14783  *
     14784@@ -62,6 +62,10 @@
     14785 /* Retrieve the panelhook of the current screen */
     14786 extern NCURSES_EXPORT(struct panelhook*) _nc_panelhook (void);
     14787 
     14788+#if NCURSES_SP_FUNCS
     14789+extern NCURSES_EXPORT(struct panelhook*) NCURSES_SP_NAME(_nc_panelhook) (SCREEN *);
     14790+#endif
     14791+
     14792 #ifdef __cplusplus
     14793 }
     14794 #endif
     14795diff -Naur ncurses-5.7.orig/include/ncurses_defs ncurses-5.7/include/ncurses_defs
     14796--- ncurses-5.7.orig/include/ncurses_defs       2008-09-06 08:57:41.000000000 -0700
     14797+++ ncurses-5.7/include/ncurses_defs    2009-06-05 14:01:49.000000000 -0700
     14798@@ -1,4 +1,4 @@
     14799-# $Id: ncurses_defs,v 1.40 2008/09/06 15:57:41 tom Exp $
     14800+# $Id: ncurses_defs,v 1.41 2008/11/16 00:19:59 juergen Exp $
     14801 ##############################################################################
     14802 # Copyright (c) 2000-2007,2008 Free Software Foundation, Inc.                #
     14803 #                                                                            #
     14804@@ -171,7 +171,6 @@
     14805 NCURSES_EXT_FUNCS
     14806 NCURSES_NO_PADDING
     14807 NCURSES_PATHSEP        ':'
     14808-NDEBUG
     14809 NEED_PTEM_H
     14810 NO_LEAKS
     14811 PURE_TERMINFO
    1424914812diff -Naur ncurses-5.7.orig/include/ncurses_dll.h ncurses-5.7/include/ncurses_dll.h
    1425014813--- ncurses-5.7.orig/include/ncurses_dll.h      2007-03-10 11:21:49.000000000 -0800
    14251 +++ ncurses-5.7/include/ncurses_dll.h   2009-03-22 21:17:11.636377985 -0700
     14814+++ ncurses-5.7/include/ncurses_dll.h   2009-06-05 14:01:44.000000000 -0700
    1425214815@@ -1,5 +1,5 @@
    1425314816 /****************************************************************************
     
    1426214825  ****************************************************************************/
    1426314826-/* $Id: ncurses_dll.h,v 1.6 2007/03/10 19:21:49 tom Exp $ */
    14264 +/* $Id: ncurses_dll.h,v 1.7 2009/03/21 18:55:22 tom Exp $ */
     14827+/* $Id: ncurses_dll.h,v 1.8 2009/04/04 22:26:27 tom Exp $ */
    1426514828 
    1426614829 #ifndef NCURSES_DLL_H_incl
    1426714830 #define NCURSES_DLL_H_incl 1
     14831@@ -37,7 +37,7 @@
     14832 #undef NCURSES_DLL
     14833 #define NCURSES_STATIC
     14834 
     14835-#if defined(__CYGWIN__)
     14836+#if defined(__CYGWIN__) || defined(__MINGW32__)
     14837 #  if defined(NCURSES_DLL)
     14838 #    if defined(NCURSES_STATIC)
     14839 #      undef NCURSES_STATIC
    1426814840@@ -76,11 +76,4 @@
    1426914841 #  define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
     
    1427814850-
    1427914851 #endif /* NCURSES_DLL_H_incl */
     14852diff -Naur ncurses-5.7.orig/include/term_entry.h ncurses-5.7/include/term_entry.h
     14853--- ncurses-5.7.orig/include/term_entry.h       2008-08-16 09:16:03.000000000 -0700
     14854+++ ncurses-5.7/include/term_entry.h    2009-06-05 14:01:33.000000000 -0700
     14855@@ -32,7 +32,7 @@
     14856  *     and: Thomas E. Dickey                        1998-on                 *
     14857  ****************************************************************************/
     14858 
     14859-/* $Id: term_entry.h,v 1.35 2008/08/16 16:16:03 tom Exp $ */
     14860+/* $Id: term_entry.h,v 1.36 2008/11/16 00:19:59 juergen Exp $ */
     14861 
     14862 /*
     14863  *     term_entry.h -- interface to entry-manipulation code
     14864@@ -81,7 +81,7 @@
     14865 #define EXT_NAMES(tp,i,limit,index,table) table[i]
     14866 #endif
     14867 
     14868-#define NUM_EXT_NAMES(tp) ((tp)->ext_Booleans + (tp)->ext_Numbers + (tp)->ext_Strings)
     14869+#define NUM_EXT_NAMES(tp) (unsigned) ((tp)->ext_Booleans + (tp)->ext_Numbers + (tp)->ext_Strings)
     14870 
     14871 #define for_each_boolean(n,tp) for(n = 0; n < NUM_BOOLEANS(tp); n++)
     14872 #define for_each_number(n,tp)  for(n = 0; n < NUM_NUMBERS(tp);  n++)
     14873diff -Naur ncurses-5.7.orig/include/unctrl.h.in ncurses-5.7/include/unctrl.h.in
     14874--- ncurses-5.7.orig/include/unctrl.h.in        2001-03-24 13:53:25.000000000 -0800
     14875+++ ncurses-5.7/include/unctrl.h.in     2009-06-05 14:01:44.000000000 -0700
     14876@@ -1,5 +1,5 @@
     14877 /****************************************************************************
     14878- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
     14879+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     14880  *                                                                          *
     14881  * Permission is hereby granted, free of charge, to any person obtaining a  *
     14882  * copy of this software and associated documentation files (the            *
     14883@@ -39,7 +39,7 @@
     14884  * as ^?. Printable characters are displayed as is.
     14885  */
     14886 
     14887-/* $Id: unctrl.h.in,v 1.10 2001/03/24 21:53:25 tom Exp $ */
     14888+/* $Id: unctrl.h.in,v 1.11 2009/04/18 21:00:52 tom Exp $ */
     14889 
     14890 #ifndef NCURSES_UNCTRL_H_incl
     14891 #define NCURSES_UNCTRL_H_incl  1
     14892@@ -56,6 +56,10 @@
     14893 #undef unctrl
     14894 NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype);
     14895 
     14896+#if @NCURSES_SP_FUNCS@
     14897+NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*, chtype);
     14898+#endif
     14899+
     14900 #ifdef __cplusplus
     14901 }
     14902 #endif
    1428014903diff -Naur ncurses-5.7.orig/INSTALL ncurses-5.7/INSTALL
    1428114904--- ncurses-5.7.orig/INSTALL    2008-11-02 13:13:51.000000000 -0800
    14282 +++ ncurses-5.7/INSTALL 2009-03-22 21:17:11.612376588 -0700
     14905+++ ncurses-5.7/INSTALL 2009-06-05 14:01:24.000000000 -0700
    1428314906@@ -1,5 +1,5 @@
    1428414907 -------------------------------------------------------------------------------
     
    1434914972diff -Naur ncurses-5.7.orig/man/curs_color.3x ncurses-5.7/man/curs_color.3x
    1435014973--- ncurses-5.7.orig/man/curs_color.3x  2005-12-17 16:00:37.000000000 -0800
    14351 +++ ncurses-5.7/man/curs_color.3x       2009-03-22 21:17:02.195775108 -0700
     14974+++ ncurses-5.7/man/curs_color.3x       2009-06-05 14:01:11.000000000 -0700
    1435214975@@ -1,5 +1,5 @@
    1435314976 .\"***************************************************************************
     
    1438015003diff -Naur ncurses-5.7.orig/man/curs_mouse.3x ncurses-5.7/man/curs_mouse.3x
    1438115004--- ncurses-5.7.orig/man/curs_mouse.3x  2006-12-30 15:43:34.000000000 -0800
    14382 +++ ncurses-5.7/man/curs_mouse.3x       2009-03-22 21:16:46.494768822 -0700
     15005+++ ncurses-5.7/man/curs_mouse.3x       2009-06-05 14:00:52.000000000 -0700
    1438315006@@ -1,6 +1,6 @@
    1438415007 '\" t
     
    1442415047 cause an error beep when cooked mode is being simulated in a window by a
    1442515048 function such as \fBgetstr\fR that expects a linefeed for input-loop
     15049diff -Naur ncurses-5.7.orig/man/form_field_validation.3x ncurses-5.7/man/form_field_validation.3x
     15050--- ncurses-5.7.orig/man/form_field_validation.3x       2006-12-24 08:08:08.000000000 -0800
     15051+++ ncurses-5.7/man/form_field_validation.3x    2009-06-05 14:01:33.000000000 -0700
     15052@@ -26,7 +26,7 @@
     15053 .\" authorization.                                                           *
     15054 .\"***************************************************************************
     15055 .\"
     15056-.\" $Id: form_field_validation.3x,v 1.16 2006/12/24 16:08:08 tom Exp $
     15057+.\" $Id: form_field_validation.3x,v 1.17 2008/12/14 19:22:16 juergen Exp $
     15058 .TH form_field_validation 3X ""
     15059 .SH NAME
     15060 \fBform_field_validation\fR - data type validation for fields
     15061@@ -70,9 +70,7 @@
     15062 case-sensitivity; and a fifth \fBint\fR flag argument specifying whether a partial
     15063 match must be a unique one (if this flag is off, a prefix matches the first
     15064 of any set of more than one list elements with that prefix). Please notice
     15065-that the string list is not copied, only a reference to it is stored in the
     15066-field. So you should avoid using a list that lives in automatic variables
     15067-on the stack.
     15068+that the string list is copied. So you may use a list that lives in automatic variables on the stack.
     15069 .TP 5
     15070 TYPE_INTEGER
     15071 Integer data, parsable to an integer by \fBatoi(3)\fR.  Requires a third
    1442615072diff -Naur ncurses-5.7.orig/man/keybound.3x ncurses-5.7/man/keybound.3x
    1442715073--- ncurses-5.7.orig/man/keybound.3x    2006-02-25 13:47:06.000000000 -0800
    14428 +++ ncurses-5.7/man/keybound.3x 2009-03-22 21:16:50.643032825 -0700
     15074+++ ncurses-5.7/man/keybound.3x 2009-06-05 14:00:57.000000000 -0700
    1442915075@@ -1,5 +1,5 @@
    1443015076 .\"***************************************************************************
     
    1444715093diff -Naur ncurses-5.7.orig/man/tabs.1 ncurses-5.7/man/tabs.1
    1444815094--- ncurses-5.7.orig/man/tabs.1 1969-12-31 16:00:00.000000000 -0800
    14449 +++ ncurses-5.7/man/tabs.1      2009-03-22 21:16:45.114678865 -0700
     15095+++ ncurses-5.7/man/tabs.1      2009-06-05 14:00:50.000000000 -0700
    1445015096@@ -0,0 +1,143 @@
    1445115097+.\"***************************************************************************
     
    1459415240diff -Naur ncurses-5.7.orig/man/tset.1 ncurses-5.7/man/tset.1
    1459515241--- ncurses-5.7.orig/man/tset.1 2006-12-24 07:00:30.000000000 -0800
    14596 +++ ncurses-5.7/man/tset.1      2009-03-22 21:16:45.114678865 -0700
     15242+++ ncurses-5.7/man/tset.1      2009-06-05 14:00:50.000000000 -0700
    1459715243@@ -1,5 +1,5 @@
    1459815244 .\"***************************************************************************
     
    1461515261diff -Naur ncurses-5.7.orig/MANIFEST ncurses-5.7/MANIFEST
    1461615262--- ncurses-5.7.orig/MANIFEST   2008-10-25 16:47:24.000000000 -0700
    14617 +++ ncurses-5.7/MANIFEST        2009-03-22 21:17:09.900267355 -0700
     15263+++ ncurses-5.7/MANIFEST        2009-06-05 14:01:21.000000000 -0700
    1461815264@@ -640,6 +640,7 @@
    1461915265 ./man/ncurses.3x
     
    1466215308diff -Naur ncurses-5.7.orig/menu/Makefile.in ncurses-5.7/menu/Makefile.in
    1466315309--- ncurses-5.7.orig/menu/Makefile.in   2007-04-28 07:56:11.000000000 -0700
    14664 +++ ncurses-5.7/menu/Makefile.in        2009-03-22 21:16:55.671355217 -0700
     15310+++ ncurses-5.7/menu/Makefile.in        2009-06-05 14:01:30.000000000 -0700
    1466515311@@ -1,6 +1,6 @@
    1466615312-# $Id: Makefile.in,v 1.48 2007/04/28 14:56:11 tom Exp $
    14667 +# $Id: Makefile.in,v 1.49 2009/01/03 19:09:26 tom Exp $
     15313+# $Id: Makefile.in,v 1.50 2009/03/28 18:22:39 Charles.Wilson Exp $
    1466815314 ##############################################################################
    1466915315-# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                #
     
    1467215318 # Permission is hereby granted, free of charge, to any person obtaining a    #
    1467315319 # copy of this software and associated documentation files (the "Software"), #
    14674 @@ -70,7 +70,7 @@
     15320@@ -63,6 +63,7 @@
     15321 LIBTOOL_LINK   = @LIB_LINK@
     15322 LIBTOOL_INSTALL        = @LIB_INSTALL@
     15323 LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
     15324+LT_UNDEF       = @LT_UNDEF@
     15325 
     15326 INSTALL                = @INSTALL@
     15327 INSTALL_LIB    = @INSTALL@ @INSTALL_LIB@
     15328@@ -70,7 +71,7 @@
    1467515329 INSTALL_DATA   = @INSTALL_DATA@
    1467615330 
     
    1468115335 LD             = @LD@
    1468215336 LN_S           = @LN_S@
     15337diff -Naur ncurses-5.7.orig/menu/m_attribs.c ncurses-5.7/menu/m_attribs.c
     15338--- ncurses-5.7.orig/menu/m_attribs.c   2004-12-11 15:29:12.000000000 -0800
     15339+++ ncurses-5.7/menu/m_attribs.c        2009-06-05 14:01:33.000000000 -0700
     15340@@ -37,7 +37,7 @@
     15341 
     15342 #include "menu.priv.h"
     15343 
     15344-MODULE_ID("$Id: m_attribs.c,v 1.14 2004/12/11 23:29:12 tom Exp $")
     15345+MODULE_ID("$Id: m_attribs.c,v 1.15 2008/11/16 00:19:59 juergen Exp $")
     15346 
     15347 /* Macro to redraw menu if it is posted and changed */
     15348 #define Refresh_Menu(menu) \
     15349@@ -49,9 +49,9 @@
     15350 
     15351 /* "Template" macro to generate a function to set a menus attribute */
     15352 #define GEN_MENU_ATTR_SET_FCT( name ) \
     15353-NCURSES_IMPEXP int NCURSES_API set_menu_ ## name (MENU * menu, chtype attr)\
     15354+NCURSES_IMPEXP int NCURSES_API set_menu_ ## name (MENU* menu, chtype attr) \
     15355 {\
     15356-   T((T_CALLED("set_menu_" #name "(%p,%s)"), menu, _traceattr(attr)));\
     15357+  T((T_CALLED("set_menu_" #name "(%p,%s)"), menu, _traceattr(attr))); \
     15358    if (!(attr==A_NORMAL || (attr & A_ATTRIBUTES)==attr))\
     15359       RETURN(E_BAD_ARGUMENT);\
     15360    if (menu && ( menu -> name != attr))\
     15361@@ -140,4 +140,5 @@
     15362 |   Return Values :  Attribute value
     15363 +--------------------------------------------------------------------------*/
     15364 GEN_MENU_ATTR_GET_FCT(grey)
     15365+
     15366 /* m_attribs.c ends here */
    1468315367diff -Naur ncurses-5.7.orig/menu/m_cursor.c ncurses-5.7/menu/m_cursor.c
    1468415368--- ncurses-5.7.orig/menu/m_cursor.c    2005-10-22 16:03:32.000000000 -0700
    14685 +++ ncurses-5.7/menu/m_cursor.c 2009-03-22 21:17:08.396170694 -0700
     15369+++ ncurses-5.7/menu/m_cursor.c 2009-06-05 14:01:18.000000000 -0700
    1468615370@@ -1,5 +1,5 @@
    1468715371 /****************************************************************************
     
    1471115395diff -Naur ncurses-5.7.orig/menu/m_driver.c ncurses-5.7/menu/m_driver.c
    1471215396--- ncurses-5.7.orig/menu/m_driver.c    2008-08-03 15:08:22.000000000 -0700
    14713 +++ ncurses-5.7/menu/m_driver.c 2009-03-22 21:17:08.396170694 -0700
     15397+++ ncurses-5.7/menu/m_driver.c 2009-06-05 14:01:18.000000000 -0700
    1471415398@@ -1,5 +1,5 @@
    1471515399 /****************************************************************************
     
    1473715421 |   Description   :  Central dispatcher for the menu. Translates the logical
    1473815422 |                    request 'c' into a menu action.
     15423diff -Naur ncurses-5.7.orig/menu/menu.h ncurses-5.7/menu/menu.h
     15424--- ncurses-5.7.orig/menu/menu.h        2007-02-24 09:32:13.000000000 -0800
     15425+++ ncurses-5.7/menu/menu.h     2009-06-05 14:01:33.000000000 -0700
     15426@@ -1,5 +1,5 @@
     15427 /****************************************************************************
     15428- * Copyright (c) 1998-2003,2007 Free Software Foundation, Inc.              *
     15429+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
     15430  *                                                                          *
     15431  * Permission is hereby granted, free of charge, to any person obtaining a  *
     15432  * copy of this software and associated documentation files (the            *
     15433@@ -30,7 +30,7 @@
     15434  *   Author:  Juergen Pfeifer, 1995,1997                                    *
     15435  ****************************************************************************/
     15436 
     15437-/* $Id: menu.h,v 1.19 2007/02/24 17:32:13 tom Exp $ */
     15438+/* $Id: menu.h,v 1.20 2009/04/05 00:28:07 tom Exp $ */
     15439 
     15440 #ifndef ETI_MENU
     15441 #define ETI_MENU
     15442@@ -249,6 +249,10 @@
     15443 
     15444 extern NCURSES_EXPORT(void)    menu_format (const MENU *,int *,int *);
     15445 
     15446+#if NCURSES_SP_FUNCS
     15447+extern NCURSES_EXPORT(MENU *)  NCURSES_SP_NAME(new_menu) (SCREEN*, ITEM **);
     15448+#endif
     15449+
     15450 #ifdef __cplusplus
     15451   }
     15452 #endif
    1473915453diff -Naur ncurses-5.7.orig/menu/menu.priv.h ncurses-5.7/menu/menu.priv.h
    1474015454--- ncurses-5.7.orig/menu/menu.priv.h   2005-01-15 17:02:23.000000000 -0800
    14741 +++ ncurses-5.7/menu/menu.priv.h        2009-03-22 21:17:08.396170694 -0700
     15455+++ ncurses-5.7/menu/menu.priv.h        2009-06-05 14:01:18.000000000 -0700
    1474215456@@ -1,5 +1,5 @@
    1474315457 /****************************************************************************
     
    1477215486diff -Naur ncurses-5.7.orig/menu/m_global.c ncurses-5.7/menu/m_global.c
    1477315487--- ncurses-5.7.orig/menu/m_global.c    2005-12-31 13:51:52.000000000 -0800
    14774 +++ ncurses-5.7/menu/m_global.c 2009-03-22 21:17:08.396170694 -0700
     15488+++ ncurses-5.7/menu/m_global.c 2009-06-05 14:01:18.000000000 -0700
    1477515489@@ -1,5 +1,5 @@
    1477615490 /****************************************************************************
     
    1481115525   ITEM *cur_item;
    1481215526   bool mterm_called = FALSE;
     15527diff -Naur ncurses-5.7.orig/menu/m_new.c ncurses-5.7/menu/m_new.c
     15528--- ncurses-5.7.orig/menu/m_new.c       2006-11-04 11:04:06.000000000 -0800
     15529+++ ncurses-5.7/menu/m_new.c    2009-06-05 14:01:33.000000000 -0700
     15530@@ -1,5 +1,5 @@
     15531 /****************************************************************************
     15532- * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc.              *
     15533+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
     15534  *                                                                          *
     15535  * Permission is hereby granted, free of charge, to any person obtaining a  *
     15536  * copy of this software and associated documentation files (the            *
     15537@@ -37,11 +37,11 @@
     15538 
     15539 #include "menu.priv.h"
     15540 
     15541-MODULE_ID("$Id: m_new.c,v 1.18 2006/11/04 19:04:06 tom Exp $")
     15542+MODULE_ID("$Id: m_new.c,v 1.19 2009/04/05 00:32:13 tom Exp $")
     15543 
     15544 /*---------------------------------------------------------------------------
     15545 |   Facility      :  libnmenu 
     15546-|   Function      :  MENU *new_menu(ITEM **items)
     15547+|   Function      :  MENU* _nc_new_menu(SCREEN*, ITEM **items)
     15548 |   
     15549 |   Description   :  Creates a new menu connected to the item pointer
     15550 |                    array items and returns a pointer to the new menu.
     15551@@ -51,18 +51,25 @@
     15552 |   Return Values :  NULL on error
     15553 +--------------------------------------------------------------------------*/
     15554 NCURSES_EXPORT(MENU *)
     15555-new_menu(ITEM ** items)
     15556+NCURSES_SP_NAME(new_menu) (NCURSES_SP_DCLx ITEM ** items)
     15557 {
     15558   int err = E_SYSTEM_ERROR;
     15559   MENU *menu = (MENU *) calloc(1, sizeof(MENU));
     15560 
     15561-  T((T_CALLED("new_menu(%p)"), items));
     15562+  T((T_CALLED("new_menu(%p,%p)"), SP_PARM, items));
     15563   if (menu)
     15564     {
     15565       *menu = _nc_Default_Menu;
     15566       menu->status = 0;
     15567       menu->rows = menu->frows;
     15568       menu->cols = menu->fcols;
     15569+#if NCURSES_SP_FUNCS
     15570+      /* This ensures userwin and usersub are always non-null,
     15571+         so we can derive always the SCREEN that this menu is
     15572+         running on. */
     15573+      menu->userwin = SP_PARM->_stdscr;
     15574+      menu->usersub = SP_PARM->_stdscr;
     15575+#endif
     15576       if (items && *items)
     15577        {
     15578          if (!_nc_Connect_Items(menu, items))
     15579@@ -71,6 +78,8 @@
     15580              free(menu);
     15581              menu = (MENU *) 0;
     15582            }
     15583+         else
     15584+           err = E_OK;
     15585        }
     15586     }
     15587 
     15588@@ -82,6 +91,25 @@
     15589 
     15590 /*---------------------------------------------------------------------------
     15591 |   Facility      :  libnmenu 
     15592+|   Function      :  MENU *new_menu(ITEM **items)
     15593+|   
     15594+|   Description   :  Creates a new menu connected to the item pointer
     15595+|                    array items and returns a pointer to the new menu.
     15596+|                    The new menu is initialized with the values from the
     15597+|                    default menu.
     15598+|
     15599+|   Return Values :  NULL on error
     15600++--------------------------------------------------------------------------*/
     15601+#if NCURSES_SP_FUNCS
     15602+NCURSES_EXPORT(MENU *)
     15603+new_menu(ITEM ** items)
     15604+{
     15605+  return NCURSES_SP_NAME(new_menu) (CURRENT_SCREEN, items);
     15606+}
     15607+#endif
     15608+
     15609+/*---------------------------------------------------------------------------
     15610+|   Facility      :  libnmenu 
     15611 |   Function      :  int free_menu(MENU *menu) 
     15612 |   
     15613 |   Description   :  Disconnects menu from its associated item pointer
     15614diff -Naur ncurses-5.7.orig/menu/m_pad.c ncurses-5.7/menu/m_pad.c
     15615--- ncurses-5.7.orig/menu/m_pad.c       2004-12-25 13:40:58.000000000 -0800
     15616+++ ncurses-5.7/menu/m_pad.c    2009-06-05 14:01:33.000000000 -0700
     15617@@ -37,19 +37,19 @@
     15618 
     15619 #include "menu.priv.h"
     15620 
     15621-MODULE_ID("$Id: m_pad.c,v 1.10 2004/12/25 21:40:58 tom Exp $")
     15622+MODULE_ID("$Id: m_pad.c,v 1.11 2009/02/07 23:11:44 tom Exp $")
     15623 
     15624 /* Macro to redraw menu if it is posted and changed */
     15625 #define Refresh_Menu(menu) \
     15626    if ( (menu) && ((menu)->status & _POSTED) )\
     15627    {\
     15628       _nc_Draw_Menu( menu );\
     15629-      _nc_Show_Menu( menu );\
     15630+      _nc_Show_Menu( menu ); \
     15631    }
     15632 
     15633 /*---------------------------------------------------------------------------
     15634 |   Facility      :  libnmenu 
     15635-|   Function      :  int set_menu_pad(MENU *menu, int pad)
     15636+|   Function      :  int set_menu_pad(MENU* menu, int pad)
     15637 |   
     15638 |   Description   :  Set the character to be used to separate the item name
     15639 |                    from its description. This must be a printable
    1481315640diff -Naur ncurses-5.7.orig/menu/m_post.c ncurses-5.7/menu/m_post.c
    1481415641--- ncurses-5.7.orig/menu/m_post.c      2004-12-25 15:57:04.000000000 -0800
    14815 +++ ncurses-5.7/menu/m_post.c   2009-03-22 21:17:08.396170694 -0700
     15642+++ ncurses-5.7/menu/m_post.c   2009-06-05 14:01:18.000000000 -0700
    1481615643@@ -1,5 +1,5 @@
    1481715644 /****************************************************************************
     
    1484815675 |   Description   :  Detach menu from screen
    1484915676 |
     15677diff -Naur ncurses-5.7.orig/menu/m_sub.c ncurses-5.7/menu/m_sub.c
     15678--- ncurses-5.7.orig/menu/m_sub.c       2004-12-25 13:38:31.000000000 -0800
     15679+++ ncurses-5.7/menu/m_sub.c    2009-06-05 14:01:33.000000000 -0700
     15680@@ -37,7 +37,7 @@
     15681 
     15682 #include "menu.priv.h"
     15683 
     15684-MODULE_ID("$Id: m_sub.c,v 1.10 2004/12/25 21:38:31 tom Exp $")
     15685+MODULE_ID("$Id: m_sub.c,v 1.11 2009/04/05 00:35:51 tom Exp $")
     15686 
     15687 /*---------------------------------------------------------------------------
     15688 |   Facility      :  libnmenu 
     15689@@ -57,8 +57,22 @@
     15690     {
     15691       if (menu->status & _POSTED)
     15692        RETURN(E_POSTED);
     15693-      menu->usersub = win;
     15694-      _nc_Calculate_Item_Length_and_Width(menu);
     15695+      else
     15696+#if NCURSES_SP_FUNCS
     15697+       {
     15698+         /* We ensure that usersub is never null. So even if a null
     15699+            WINDOW parameter is passed, we store the SCREENS stdscr.
     15700+            The only MENU that can have a null usersub is the static
     15701+            _nc_default_Menu.
     15702+          */
     15703+         SCREEN *sp = _nc_screen_of(menu->usersub);
     15704+
     15705+         menu->usersub = win ? win : sp->_stdscr;
     15706+         _nc_Calculate_Item_Length_and_Width(menu);
     15707+       }
     15708+#else
     15709+       menu->usersub = win;
     15710+#endif
     15711     }
     15712   else
     15713     _nc_Default_Menu.usersub = win;
     15714@@ -68,7 +82,7 @@
     15715 
     15716 /*---------------------------------------------------------------------------
     15717 |   Facility      :  libnmenu 
     15718-|   Function      :  WINDOW *menu_sub(const MENU *menu)
     15719+|   Function      :  WINDOW* menu_sub(const MENU *menu)
     15720 |   
     15721 |   Description   :  Returns a pointer to the subwindow of the menu
     15722 |
     15723diff -Naur ncurses-5.7.orig/menu/m_win.c ncurses-5.7/menu/m_win.c
     15724--- ncurses-5.7.orig/menu/m_win.c       2004-12-25 13:39:20.000000000 -0800
     15725+++ ncurses-5.7/menu/m_win.c    2009-06-05 14:01:33.000000000 -0700
     15726@@ -37,7 +37,7 @@
     15727 
     15728 #include "menu.priv.h"
     15729 
     15730-MODULE_ID("$Id: m_win.c,v 1.15 2004/12/25 21:39:20 tom Exp $")
     15731+MODULE_ID("$Id: m_win.c,v 1.16 2009/04/05 00:38:22 tom Exp $")
     15732 
     15733 /*---------------------------------------------------------------------------
     15734 |   Facility      :  libnmenu 
     15735@@ -57,8 +57,22 @@
     15736     {
     15737       if (menu->status & _POSTED)
     15738        RETURN(E_POSTED);
     15739-      menu->userwin = win;
     15740-      _nc_Calculate_Item_Length_and_Width(menu);
     15741+      else
     15742+#if NCURSES_SP_FUNCS
     15743+       {
     15744+         /* We ensure that userwin is never null. So even if a null
     15745+            WINDOW parameter is passed, we store the SCREENS stdscr.
     15746+            The only MENU that can have a null userwin is the static
     15747+            _nc_default_Menu.
     15748+          */
     15749+         SCREEN *sp = _nc_screen_of(menu->userwin);
     15750+
     15751+         menu->userwin = win ? win : sp->_stdscr;
     15752+         _nc_Calculate_Item_Length_and_Width(menu);
     15753+       }
     15754+#else
     15755+       menu->userwin = win;
     15756+#endif
     15757     }
     15758   else
     15759     _nc_Default_Menu.userwin = win;
     15760@@ -68,7 +82,7 @@
     15761 
     15762 /*---------------------------------------------------------------------------
     15763 |   Facility      :  libnmenu 
     15764-|   Function      :  WINDOW *menu_win(const MENU *)
     15765+|   Function      :  WINDOW* menu_win(const MENU*)
     15766 |   
     15767 |   Description   :  Returns pointer to the window of the menu
     15768 |
     15769@@ -80,7 +94,7 @@
     15770   const MENU *m = Normalize_Menu(menu);
     15771 
     15772   T((T_CALLED("menu_win(%p)"), menu));
     15773-  returnWin(m->userwin ? m->userwin : stdscr);
     15774+  returnWin(Get_Menu_UserWin(m));
     15775 }
     15776 
     15777 /* m_win.c ends here */
    1485015778diff -Naur ncurses-5.7.orig/misc/gen-pkgconfig.in ncurses-5.7/misc/gen-pkgconfig.in
    1485115779--- ncurses-5.7.orig/misc/gen-pkgconfig.in      1969-12-31 16:00:00.000000000 -0800
    14852 +++ ncurses-5.7/misc/gen-pkgconfig.in   2009-03-22 21:17:09.916267635 -0700
     15780+++ ncurses-5.7/misc/gen-pkgconfig.in   2009-06-05 14:01:21.000000000 -0700
    1485315781@@ -0,0 +1,140 @@
    1485415782+#!@SHELL@
     
    1499415922diff -Naur ncurses-5.7.orig/misc/Makefile.in ncurses-5.7/misc/Makefile.in
    1499515923--- ncurses-5.7.orig/misc/Makefile.in   2007-03-31 08:54:17.000000000 -0700
    14996 +++ ncurses-5.7/misc/Makefile.in        2009-03-22 21:17:03.943886576 -0700
     15924+++ ncurses-5.7/misc/Makefile.in        2009-06-05 14:01:12.000000000 -0700
    1499715925@@ -1,6 +1,6 @@
    1499815926-# $Id: Makefile.in,v 1.43 2007/03/31 15:54:17 tom Exp $
     
    1507716005diff -Naur ncurses-5.7.orig/misc/ncu-indent ncurses-5.7/misc/ncu-indent
    1507816006--- ncurses-5.7.orig/misc/ncu-indent    2008-08-03 08:46:44.000000000 -0700
    15079 +++ ncurses-5.7/misc/ncu-indent 2009-03-22 21:17:08.396170694 -0700
     16007+++ ncurses-5.7/misc/ncu-indent 2009-06-05 14:01:18.000000000 -0700
    1508016008@@ -26,7 +26,7 @@
    1508116009 #* sale, use or other dealings in this Software without prior written       *
     
    1512616054diff -Naur ncurses-5.7.orig/misc/ncurses-config.in ncurses-5.7/misc/ncurses-config.in
    1512716055--- ncurses-5.7.orig/misc/ncurses-config.in     2007-03-17 13:02:19.000000000 -0700
    15128 +++ ncurses-5.7/misc/ncurses-config.in  2009-03-22 21:17:09.916267635 -0700
     16056+++ ncurses-5.7/misc/ncurses-config.in  2009-06-05 14:01:21.000000000 -0700
    1512916057@@ -1,7 +1,7 @@
    1513016058 #!@SHELL@
     
    1526116189diff -Naur ncurses-5.7.orig/misc/terminfo.src ncurses-5.7/misc/terminfo.src
    1526216190--- ncurses-5.7.orig/misc/terminfo.src  2008-10-12 16:03:54.000000000 -0700
    15263 +++ ncurses-5.7/misc/terminfo.src       2009-03-22 21:16:59.595606369 -0700
     16191+++ ncurses-5.7/misc/terminfo.src       2009-06-05 14:01:49.000000000 -0700
    1526416192@@ -6,8 +6,8 @@
    1526516193 # Report bugs and new terminal descriptions to
     
    1526816196-#      $Revision: 1.341 $
    1526916197-#      $Date: 2008/10/12 23:03:54 $
    15270 +#      $Revision: 1.345 $
    15271 +#      $Date: 2009/01/11 00:47:37 $
     16198+#      $Revision: 1.348 $
     16199+#      $Date: 2009/05/02 22:23:20 $
    1527216200 #
    1527316201 # The original header is preserved below for reference.  It is noted that there
     
    1530016228 
    1530116229 ansi+enq|ncurses extension for ANSI ENQ,
    15302 @@ -1005,7 +1005,7 @@
     16230@@ -617,11 +617,45 @@
     16231        clear=\E[2J, cub1=^H, cud1=\E[B, cuf1=\E[C,
     16232        cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, el=\E[k, home=\E[H,
     16233        is2=\E[m\E[?7h, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K,
     16234-       khome=^^, pfkey=\E[0;%p1%{58}%+%d;%p2"%s", rc=\E[u,
     16235+       khome=^^, pfkey=\E[0;%p1%{58}%+%d;%p2"%s"p, rc=\E[u,
     16236        rmam=\E[?7l, sc=\E[s, smam=\E[?7h, u6=\E[%i%d;%dR,
     16237        u7=\E[6n, use=klone+color, use=klone+sgr8,
     16238+
     16239+# Keypad:      Home=\0G        Up=\0H  PrPag=\0I
     16240+#              ka1,kh          kcuu1           kpp,ka3
     16241+#
     16242+#              Left=\0K        5=\0L           Right=\0M
     16243+#              kcub1           kb2             kcuf1
     16244+#
     16245+#              End=\0O         Down=\0P        NxPag=\0Q
     16246+#              kc1,kend        kcud1           kc3,knp
     16247+#
     16248+#              Ins=\0R         Del=\0S
     16249+#              kich1           kdch1
     16250+#
     16251+# On keyboard with 12 function keys,
     16252+#      shifted f-keys: F13-F24
     16253+#      control f-keys: F25-F36
     16254+#      alt f-keys:     F37-F48
     16255+# The shift/control/alt keys do not modify each other, but alt overrides both,
     16256+# and control overrides shift.
     16257+#
     16258+# <pfkey> capability for F1-F48 -TD
     16259 ansi.sys|ANSI.SYS 3.1 and later versions,
     16260-       el=\E[K, use=ansi.sys-old,
     16261+       el=\E[K, ka1=\0G, ka3=\0I, kb2=\0L, kbs=^H, kc1=\0O, kc3=\0Q,
     16262+       kcbt=\0^O, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H,
     16263+       kdch1=\0S, kend=\0O, kf1=\0;, kf10=\0D, kf11=\0\205,
     16264+       kf12=\0\206, kf13=\0T, kf14=\0U, kf15=\0V, kf16=\0W,
     16265+       kf17=\0X, kf18=\0Y, kf19=\0Z, kf2=\0<, kf20=\0[, kf21=\0\\,
     16266+       kf22=\0], kf23=\0\207, kf24=\0\210, kf25=\0\^, kf26=\0_,
     16267+       kf27=\0`, kf28=\0a, kf29=\0b, kf3=\0=, kf30=\0c, kf31=\0d,
     16268+       kf32=\0e, kf33=\0f, kf34=\0g, kf35=\0\211, kf36=\0\212,
     16269+       kf37=\0h, kf38=\0i, kf39=\0j, kf4=\0>, kf40=\0k, kf41=\0l,
     16270+       kf42=\0m, kf43=\0n, kf44=\0o, kf45=\0p, kf46=\0q,
     16271+       kf47=\0\213, kf48=\0\214, kf5=\0?, kf6=\0@, kf7=\0A, kf8=\0B,
     16272+       kf9=\0C, khome=\0G, kich1=\0R, knp=\0Q, kpp=\0I,
     16273+       pfkey=\E[0;%?%p1%{11}%<%t%'\:'%e%?%p1%{13}%<%t%'z'%e%?%p1%{23}%<%t%'G'%e%?%p1%{25}%<%t%'p'%e%?%p1%'#'%<%t%'E'%e%?%p1%'%'%<%t%'f'%e%?%p1%'/'%<%t%'C'%e%{92}%;%;%;%;%;%;%;%p1%+%d;%p2"%s"p,
     16274+       use=ansi.sys-old,
     16275 
     16276 #
     16277 # Define IBM PC keypad keys for vi as per MS-Kermit while using ANSI.SYS.
     16278@@ -1005,7 +1039,7 @@
    1530316279        sc=\E7,
    1530416280        sgr=\E[10m\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p9%t;12%e;10%;%?%p7%t;9%;m,
     
    1530916285 pc6300plus|AT&T 6300 plus,
    1531016286        OTbs, am, xon,
    15311 @@ -1416,7 +1416,7 @@
     16287@@ -1416,7 +1450,7 @@
    1531216288        setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
    1531316289        sgr=\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1%|%t;7%;%?%p7%t;9%;m%?%p9%t\016%e\017%;,
     
    1531816294 #
    1531916295 qansi|QNX ansi with console writes,
    15320 @@ -4357,6 +4357,26 @@
     16296@@ -4285,6 +4319,30 @@
     16297        smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, u6=\E[%i%d;%dR,
     16298        u7=\E[6n, vpa=\E[%i%p1%dd,
     16299 
     16300+#### VWM
     16301+#
     16302+# vwmterm is a terminal emulator written for the VWM console window manager
     16303+#
     16304+vwmterm|(vwm term),
     16305+       am, bce, ccc, mir, msgr, npc, xenl, xon,
     16306+       colors#8, pairs#64,
     16307+       acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
     16308+       bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
     16309+       clear=\E[H\E[J, cnorm=\E[?25h, cr=^M, cub1=^H,
     16310+       cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
     16311+       cvvis=\E[?25h, dim=\E[2m, ed=\E[J, el=\E[K, home=\E[H,
     16312+       il1=\E[L, ind=^J, invis=\E[8m, kcub1=\E[D, kcud1=\E[B,
     16313+       kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, kf1=\E[[A,
     16314+       kf10=\E[21~, kf11=\E[22~, kf12=\E[23~, kf2=\E[[B,
     16315+       kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~,
     16316+       kf8=\E[19~, kf9=\E[20~, khome=\E[1~, knp=\E[6~, kpp=\E[5~,
     16317+       rev=\E[7m, rmacs=\E[10m, rmam=\E[?7l, rmcup=\E[?1049l,
     16318+       rs1=\E[H\E[J\E[m\Ec, setab=\E[4%p1%dm,
     16319+       setaf=\E[3%p1%dm,
     16320+       sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m,
     16321+       sgr0=\E[0;10m, smacs=\E[11m, smam=\E[?7h,
     16322+       smcup=\E[?1049h, smso=\E[3m, smul=\E[4m,
     16323+
     16324 #### MGR
     16325 #
     16326 # MGR is a Bell Labs window system lighter-weight than X.
     16327@@ -4357,6 +4415,26 @@
    1532116328        sgr0=\E[m, smcup=\E7\E[?47h, smir=\E[4h, smso=\E[7m,
    1532216329        smul=\E[4m,
     
    1534516352 # Michael Schroeder, Oliver Laumann.  The screen and
    1534616353 # screen-w entries came with version 3.7.1.  The screen2 and screen3 entries
    15347 @@ -4497,6 +4517,8 @@
     16354@@ -4497,6 +4575,8 @@
    1534816355        cvvis@, flash@, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
    1534916356        kcuu1=\EOA, use=screen+fkeys, use=vt100+enq,
     
    1535416361 screen.linux|screen in linux console,
    1535516362        bw,
    15356 @@ -5247,7 +5269,7 @@
     16363@@ -5042,44 +5122,13 @@
     16364 
     16365 ### EMX termcap.dat compatibility modes
     16366 #
     16367-# Keypad:      Home=\0G        Up=\0H  PrPag=\0I
     16368-#              ka1,kh          kcuu1           kpp,ka3
     16369-#
     16370-#              Left=\0K        5=\0L           Right=\0M
     16371-#              kcub1           kb2             kcuf1
     16372-#
     16373-#              End=\0O         Down=\0P        NxPag=\0Q
     16374-#              kc1,kend        kcud1           kc3,knp
     16375-#
     16376-#              Ins=\0R         Del=\0S
     16377-#              kich1           kdch1
     16378-#
     16379-# On keyboard with 12 function keys,
     16380-#      shifted f-keys: F13-F24
     16381-#      control f-keys: F25-F36
     16382-#      alt f-keys:     F37-F48
     16383-# The shift/control/alt keys do not modify each other, but alt overrides both,
     16384-# and control overrides shift.
     16385-#
     16386 # Also (possibly only EMX, so we don't put it in ansi.sys, etc): set the
     16387 # no_color_video to inform the application that standout(1), underline(2)
     16388 # reverse(4) and invisible(64) don't work with color.
     16389 emx-base|DOS special keys,
     16390        bce, bw,
     16391        it#8, ncv#71,
     16392-       bel=^G, ka1=\0G, ka3=\0I, kb2=\0L, kbs=^H, kc1=\0O, kc3=\0Q,
     16393-       kcbt=\0^O, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H,
     16394-       kdch1=\0S, kend=\0O, kf1=\0;, kf10=\0D, kf11=\0\205,
     16395-       kf12=\0\206, kf13=\0T, kf14=\0U, kf15=\0V, kf16=\0W,
     16396-       kf17=\0X, kf18=\0Y, kf19=\0Z, kf2=\0<, kf20=\0[, kf21=\0\\,
     16397-       kf22=\0], kf23=\0\207, kf24=\0\210, kf25=\0\^, kf26=\0_,
     16398-       kf27=\0`, kf28=\0a, kf29=\0b, kf3=\0=, kf30=\0c, kf31=\0d,
     16399-       kf32=\0e, kf33=\0f, kf34=\0g, kf35=\0\211, kf36=\0\212,
     16400-       kf37=\0h, kf38=\0i, kf39=\0j, kf4=\0>, kf40=\0k, kf41=\0l,
     16401-       kf42=\0m, kf43=\0n, kf44=\0o, kf45=\0p, kf46=\0q,
     16402-       kf47=\0\213, kf48=\0\214, kf5=\0?, kf6=\0@, kf7=\0A, kf8=\0B,
     16403-       kf9=\0C, khome=\0G, kich1=\0R, knp=\0Q, kpp=\0I,
     16404-       use=ansi.sys,
     16405+       bel=^G, use=ansi.sys,
     16406 
     16407 # Except for the "-emx" suffixes, these are as distributed with EMX 0.9b,
     16408 # a Unix-style environment used on OS/2.  (Note that the suffix makes some
     16409@@ -5247,7 +5296,7 @@
    1535716410        setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
    1535816411        sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;12%;m,
     
    1536316416 # Key definitions:
    1536416417 # The encodings for unshifted arrow keys, F1-F12, Home, Insert, etc.  match the
    15365 @@ -11060,7 +11082,7 @@
     16418@@ -11060,7 +11109,7 @@
    1536616419        sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m,
    1536716420        sgr0=\E[m,
     
    1537216425 
    1537316426 aaa+rv|ann arbor ambassador in reverse video,
    15374 @@ -12147,7 +12169,7 @@
     16427@@ -12147,7 +12196,7 @@
    1537516428        sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m,
    1537616429        sgr0=\E[m, smacs=\017$<1>, smcup=\E[=4l\E[1;24w\E2\r,
     
    1538116434        flash=\E[=205l$<200>\E[=205h, is1=\E[=103l\E[=205h,
    1538216435        use=avt-ns,
    15383 @@ -14584,7 +14606,7 @@
     16436@@ -14584,7 +14633,7 @@
    1538416437        sc=\E[%y,
    1538516438        sgr=\E[%{0}%?%p1%p3%|%t%{7}%+%;%?%p2%t%{2}%+%;%?%p4%t%{5}%+%;%?%p6%t%{1}%+%;m%?%p8%t\E[%{32}%+%d%%{%;%?%p9%t\016%e\017%;,
     
    1539016443 # p9-w: Prism-9 in 132 column mode
    1539116444 # --------------------------------
    15392 @@ -16037,7 +16059,7 @@
     16445@@ -16037,7 +16086,7 @@
    1539316446        rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m, rmam=\E[?7l,
    1539416447        rmso=\E[m, rmul=\E[m,
     
    1539916452 # The tek4125 emulates a vt100 incorrectly - the scrolling region
    1540016453 # command is ignored.  The following entry replaces <csr> with the needed
    15401 @@ -17729,7 +17751,7 @@
     16454@@ -17729,7 +17778,7 @@
    1540216455        rmul=\E[m, rs2=\E[?=h\Ec, s0ds=^O, s1ds=^N,
    1540316456        sgr=\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
     
    1540816461 tws2102-sna|dku7102-sna|BULL Questar tws2102 for SNA,
    1540916462        dsl=\E[0;98v\E[2J\E[v, fsl=\E[v, is3=\Eb, tsl=\E[0;98v,
    15410 @@ -21791,6 +21813,16 @@
     16463@@ -21791,6 +21840,25 @@
    1541116464 #      * add "aterm" -TD
    1541216465 #      * add "linux2.6.26" -TD
     
    1542216475+#      * add screen.Eterm -TD
    1542316476+#
     16477+# 2009-03-28
     16478+#      * correct typo in pfkey of ansi.sys-old
     16479+#        (report by Kalle Olavi Niemitalo)
     16480+#      * move function- and cursor-keys from emx-base to ansi.sys, and create
     16481+#        a pfkey capability which handles F1-F48 -TD
     16482+#
     16483+# 2009-05-02
     16484+#      * add vwmterm entry (Bryan Christ)
     16485+#
    1542416486 # The following sets edit modes for GNU EMACS.
    1542516487 # Local Variables:
     
    1542716489diff -Naur ncurses-5.7.orig/mk-1st.awk ncurses-5.7/mk-1st.awk
    1542816490--- ncurses-5.7.orig/mk-1st.awk 2007-03-24 15:10:55.000000000 -0700
    15429 +++ ncurses-5.7/mk-1st.awk      2009-03-22 21:16:56.935437910 -0700
     16491+++ ncurses-5.7/mk-1st.awk      2009-06-05 14:01:30.000000000 -0700
    1543016492@@ -1,6 +1,6 @@
    1543116493-# $Id: mk-1st.awk,v 1.78 2007/03/24 22:10:55 tom Exp $
    15432 +# $Id: mk-1st.awk,v 1.80 2009/01/04 21:51:38 tom Exp $
     16494+# $Id: mk-1st.awk,v 1.81 2009/03/28 18:59:51 Charles.Wilson Exp $
    1543316495 ##############################################################################
    1543416496-# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                #
    15435 +# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.                #
     16497+# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.                #
    1543616498 #                                                                            #
    1543716499 # Permission is hereby granted, free of charge, to any person obtaining a    #
     
    1544616508 # see lib_name
    1544716509 function lib_name_of(a_name) {
    15448 @@ -404,7 +404,7 @@
     16510@@ -386,7 +386,13 @@
     16511                                }
     16512                                end_name = lib_name;
     16513                                printf "../lib/%s : $(%s_OBJS)\n", lib_name, OBJS
     16514-                               printf "\tcd ../lib && $(LIBTOOL_LINK) $(%s) -o %s $(%s_OBJS:$o=.lo) -rpath $(DESTDIR)$(libdir) -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(SHLIB_LIST)\n", compile, lib_name, OBJS
     16515+                               if ( is_ticlib() ) {
     16516+                                       printf "\tcd ../lib && $(LIBTOOL_LINK) $(%s) -o %s $(%s_OBJS:$o=.lo) -rpath $(DESTDIR)$(libdir) -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(LT_UNDEF) $(TICS_LIST)\n", compile, lib_name, OBJS
     16517+                               } else if ( is_termlib() ) {
     16518+                                       printf "\tcd ../lib && $(LIBTOOL_LINK) $(%s) -o %s $(%s_OBJS:$o=.lo) -rpath $(DESTDIR)$(libdir) -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(LT_UNDEF) $(TINFO_LIST)\n", compile, lib_name, OBJS
     16519+                               } else {
     16520+                                       printf "\tcd ../lib && $(LIBTOOL_LINK) $(%s) -o %s $(%s_OBJS:$o=.lo) -rpath $(DESTDIR)$(libdir) -version-info $(NCURSES_MAJOR):$(NCURSES_MINOR) $(LT_UNDEF) $(SHLIB_LIST)\n", compile, lib_name, OBJS
     16521+                               }
     16522                                print  ""
     16523                                print  "install \\"
     16524                                print  "install.libs \\"
     16525@@ -404,7 +410,7 @@
    1544916526                        {
    1545016527                                end_name = lib_name;
     
    1545716534diff -Naur ncurses-5.7.orig/ncurses/base/define_key.c ncurses-5.7/ncurses/base/define_key.c
    1545816535--- ncurses-5.7.orig/ncurses/base/define_key.c  2006-12-30 15:23:31.000000000 -0800
    15459 +++ ncurses-5.7/ncurses/base/define_key.c       2009-03-22 21:17:05.639993853 -0700
     16536+++ ncurses-5.7/ncurses/base/define_key.c       2009-06-05 14:01:51.000000000 -0700
    1546016537@@ -1,5 +1,5 @@
    1546116538 /****************************************************************************
     
    1546516542  * Permission is hereby granted, free of charge, to any person obtaining a  *
    1546616543  * copy of this software and associated documentation files (the            *
    15467 @@ -27,20 +27,21 @@
     16544@@ -27,33 +27,34 @@
    1546816545  ****************************************************************************/
    1546916546 
     
    1547716554 
    1547816555-MODULE_ID("$Id: define_key.c,v 1.13 2006/12/30 23:23:31 tom Exp $")
    15479 +MODULE_ID("$Id: define_key.c,v 1.15 2009/02/15 00:30:40 tom Exp $")
     16556+MODULE_ID("$Id: define_key.c,v 1.17 2009/05/09 18:30:16 tom Exp $")
    1548016557 
    1548116558 NCURSES_EXPORT(int)
     
    1548516562     int code = ERR;
    1548616563 
    15487      T((T_CALLED("define_key(%s,%d)"), _nc_visbuf(str), keycode));
     16564-    T((T_CALLED("define_key(%s,%d)"), _nc_visbuf(str), keycode));
    1548816565-    if (SP == 0) {
    15489 +    if (SP_PARM == 0) {
     16566+    T((T_CALLED("define_key(%p, %s,%d)"), SP_PARM, _nc_visbuf(str), keycode));
     16567+    if (SP_PARM == 0 || !HasTInfoTerminal(SP_PARM)) {
    1549016568        code = ERR;
    1549116569     } else if (keycode > 0) {
    1549216570        unsigned ukey = (unsigned) keycode;
    15493 @@ -48,12 +49,12 @@
     16571 
    1549416572        if (str != 0) {
    15495             define_key(str, 0);
    15496         } else if (has_key(keycode)) {
     16573-           define_key(str, 0);
     16574-       } else if (has_key(keycode)) {
    1549716575-           while (_nc_remove_key(&(SP->_keytry), ukey))
     16576+           NCURSES_SP_NAME(define_key) (NCURSES_SP_ARGx str, 0);
     16577+       } else if (NCURSES_SP_NAME(has_key) (NCURSES_SP_ARGx keycode)) {
    1549816578+           while (_nc_remove_key(&(SP_PARM->_keytry), ukey))
    1549916579                code = OK;
    1550016580        }
    1550116581        if (str != 0) {
    15502             if (key_defined(str) == 0) {
     16582-           if (key_defined(str) == 0) {
    1550316583-               if (_nc_add_to_try(&(SP->_keytry), str, ukey) == OK) {
     16584+           if (NCURSES_SP_NAME(key_defined) (NCURSES_SP_ARGx str) == 0) {
    1550416585+               if (_nc_add_to_try(&(SP_PARM->_keytry), str, ukey) == OK) {
    1550516586                    code = OK;
     
    1552616607diff -Naur ncurses-5.7.orig/ncurses/base/keybound.c ncurses-5.7/ncurses/base/keybound.c
    1552716608--- ncurses-5.7.orig/ncurses/base/keybound.c    2006-06-17 11:19:24.000000000 -0700
    15528 +++ ncurses-5.7/ncurses/base/keybound.c 2009-03-22 21:17:07.012081575 -0700
     16609+++ ncurses-5.7/ncurses/base/keybound.c 2009-06-05 14:01:16.000000000 -0700
    1552916610@@ -1,5 +1,5 @@
    1553016611 /****************************************************************************
     
    1557716658diff -Naur ncurses-5.7.orig/ncurses/base/key_defined.c ncurses-5.7/ncurses/base/key_defined.c
    1557816659--- ncurses-5.7.orig/ncurses/base/key_defined.c 2006-12-30 15:22:55.000000000 -0800
    15579 +++ ncurses-5.7/ncurses/base/key_defined.c      2009-03-22 21:17:07.012081575 -0700
     16660+++ ncurses-5.7/ncurses/base/key_defined.c      2009-06-05 14:01:16.000000000 -0700
    1558016661@@ -1,5 +1,5 @@
    1558116662 /****************************************************************************
     
    1562316704diff -Naur ncurses-5.7.orig/ncurses/base/keyok.c ncurses-5.7/ncurses/base/keyok.c
    1562416705--- ncurses-5.7.orig/ncurses/base/keyok.c       2006-12-30 08:22:33.000000000 -0800
    15625 +++ ncurses-5.7/ncurses/base/keyok.c    2009-03-22 21:17:05.639993853 -0700
     16706+++ ncurses-5.7/ncurses/base/keyok.c    2009-06-05 14:01:14.000000000 -0700
    1562616707@@ -1,5 +1,5 @@
    1562716708 /****************************************************************************
     
    1569516776diff -Naur ncurses-5.7.orig/ncurses/base/legacy_coding.c ncurses-5.7/ncurses/base/legacy_coding.c
    1569616777--- ncurses-5.7.orig/ncurses/base/legacy_coding.c       2005-12-17 15:38:17.000000000 -0800
    15697 +++ ncurses-5.7/ncurses/base/legacy_coding.c    2009-03-22 21:17:07.012081575 -0700
     16778+++ ncurses-5.7/ncurses/base/legacy_coding.c    2009-06-05 14:01:16.000000000 -0700
    1569816779@@ -1,5 +1,5 @@
    1569916780 /****************************************************************************
     
    1574416825diff -Naur ncurses-5.7.orig/ncurses/base/lib_addch.c ncurses-5.7/ncurses/base/lib_addch.c
    1574516826--- ncurses-5.7.orig/ncurses/base/lib_addch.c   2008-08-16 12:20:04.000000000 -0700
    15746 +++ ncurses-5.7/ncurses/base/lib_addch.c        2009-03-22 21:17:00.859689900 -0700
     16827+++ ncurses-5.7/ncurses/base/lib_addch.c        2009-06-05 14:01:52.000000000 -0700
    1574716828@@ -1,5 +1,5 @@
    1574816829 /****************************************************************************
     
    1575716838 
    1575816839-MODULE_ID("$Id: lib_addch.c,v 1.113 2008/08/16 19:20:04 tom Exp $")
    15759 +MODULE_ID("$Id: lib_addch.c,v 1.115 2009/01/17 20:37:32 tom Exp $")
     16840+MODULE_ID("$Id: lib_addch.c,v 1.119 2009/05/15 23:47:26 tom Exp $")
    1576016841 
    1576116842 static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT);
    1576216843 
    15763 @@ -265,15 +265,25 @@
     16844@@ -260,20 +260,37 @@
     16845     /*
     16846      * Build up multibyte characters until we have a wide-character.
     16847      */
     16848+#if NCURSES_SP_FUNCS
     16849+#define DeriveSP() SCREEN *sp = _nc_screen_of(win);
     16850+#else
     16851+#define DeriveSP() /*nothing*/
     16852+#endif
     16853     if_WIDEC({
     16854+       DeriveSP();
     16855        if (WINDOW_EXT(win, addch_used) != 0 || !Charable(ch)) {
    1576416856            int len = _nc_build_wch(win, CHREF(ch));
    1576516857 
     
    1577016862+               /* handle EILSEQ (i.e., when len >= -1) */
    1577116863                if (is8bits(CharOf(ch))) {
    15772 +                   int rc = OK;
    15773                     const char *s = unctrl((chtype) CharOf(ch));
     16864-                   const char *s = unctrl((chtype) CharOf(ch));
    1577416865-                   if (s[1] != 0) {
    1577516866-                       return waddstr(win, s);
     16867+                   int rc = OK;
     16868+                   const char *s = NCURSES_SP_NAME(unctrl)
     16869+                     (NCURSES_SP_ARGx (chtype) CharOf(ch));
    1577616870+
    1577716871+                   if (s[1] != '\0') {
     
    1579116885                return OK;
    1579216886            }
    15793 @@ -327,6 +337,7 @@
     16887@@ -327,6 +344,7 @@
    1579416888                    return ERR;
    1579516889                x = win->_curx;
     
    1579916893            /*
    1580016894             * Check for cells which are orphaned by adding this character, set
     16895@@ -394,8 +412,11 @@
     16896 {
     16897     NCURSES_SIZE_T x, y;
     16898     chtype t = CharOf(ch);
     16899-    const char *s = unctrl(t);
     16900-
     16901+#if USE_WIDEC_SUPPORT || NCURSES_SP_FUNCS || USE_REENTRANT
     16902+    SCREEN *sp = _nc_screen_of(win);
     16903+#endif
     16904+    const char *s = NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx t);
     16905+    int tabsize = 8;
     16906     /*
     16907      * If we are using the alternate character set, forget about locale.
     16908      * Otherwise, if unctrl() returns a single-character or the locale
     16909@@ -404,14 +425,14 @@
     16910     if ((AttrOf(ch) & A_ALTCHARSET)
     16911        || (
     16912 #if USE_WIDEC_SUPPORT
     16913-              (SP != 0 && SP->_legacy_coding) &&
     16914+              (sp != 0 && sp->_legacy_coding) &&
     16915 #endif
     16916               s[1] == 0
     16917        )
     16918        || (
     16919               isprint(t)
     16920 #if USE_WIDEC_SUPPORT
     16921-              || ((SP == 0 || !SP->_legacy_coding) &&
     16922+              || ((sp == 0 || !sp->_legacy_coding) &&
     16923                   (WINDOW_EXT(win, addch_used)
     16924                    || !_nc_is_charable(CharOf(ch))))
     16925 #endif
     16926@@ -427,8 +448,12 @@
     16927 
     16928     switch (t) {
     16929     case '\t':
     16930-       x += (TABSIZE - (x % TABSIZE));
     16931-
     16932+#if USE_REENTRANT
     16933+       tabsize = sp->_TABSIZE;
     16934+#else
     16935+       tabsize = TABSIZE;
     16936+#endif
     16937+       x += (tabsize - (x % tabsize));
     16938        /*
     16939         * Space-fill the tab on the bottom line so that we'll get the
     16940         * "correct" cursor position.
    1580116941diff -Naur ncurses-5.7.orig/ncurses/base/lib_beep.c ncurses-5.7/ncurses/base/lib_beep.c
    1580216942--- ncurses-5.7.orig/ncurses/base/lib_beep.c    2005-04-09 08:20:04.000000000 -0700
    15803 +++ ncurses-5.7/ncurses/base/lib_beep.c 2009-03-22 21:17:05.639993853 -0700
     16943+++ ncurses-5.7/ncurses/base/lib_beep.c 2009-06-05 14:01:54.000000000 -0700
    1580416944@@ -1,5 +1,5 @@
    1580516945 /****************************************************************************
    1580616946- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
    15807 + * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
     16947+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
    1580816948  *                                                                          *
    1580916949  * Permission is hereby granted, free of charge, to any person obtaining a  *
     
    1581716957 
    1581816958 /*
    15819 @@ -42,7 +43,7 @@
     16959@@ -40,9 +41,12 @@
     16960  */
     16961 
    1582016962 #include <curses.priv.h>
    15821  #include <term.h>              /* beep, flash */
     16963-#include <term.h>              /* beep, flash */
    1582216964 
    1582316965-MODULE_ID("$Id: lib_beep.c,v 1.10 2005/04/09 15:20:04 tom Exp $")
    15824 +MODULE_ID("$Id: lib_beep.c,v 1.11 2009/02/15 00:32:06 tom Exp $")
     16966+#ifndef CUR
     16967+#define CUR SP_TERMTYPE
     16968+#endif
     16969+
     16970+MODULE_ID("$Id: lib_beep.c,v 1.14 2009/05/23 19:33:20 tom Exp $")
    1582516971 
    1582616972 /*
    1582716973  *     beep()
    15828 @@ -53,7 +54,7 @@
     16974@@ -53,12 +57,16 @@
    1582916975  */
    1583016976 
     
    1583516981     int res = ERR;
    1583616982 
    15837 @@ -74,3 +75,11 @@
     16983-    T((T_CALLED("beep()")));
     16984+    T((T_CALLED("beep(%p)"), SP_PARM));
     16985 
     16986+#ifdef USE_TERM_DRIVER
     16987+    if (SP_PARM != 0)
     16988+       res = CallDriver_1(SP_PARM, doBeepOrFlash, TRUE);
     16989+#else
     16990     /* FIXME: should make sure that we are not in altchar mode */
     16991     if (cur_term == 0) {
     16992        res = ERR;
     16993@@ -71,6 +79,15 @@
     16994        res = putp(flash_screen);
     16995        _nc_flush();
     16996     }
     16997+#endif
    1583816998 
    1583916999     returnCode(res);
     
    1584917009diff -Naur ncurses-5.7.orig/ncurses/base/lib_color.c ncurses-5.7/ncurses/base/lib_color.c
    1585017010--- ncurses-5.7.orig/ncurses/base/lib_color.c   2007-04-07 10:07:28.000000000 -0700
    15851 +++ ncurses-5.7/ncurses/base/lib_color.c        2009-03-22 21:17:05.643993853 -0700
     17011+++ ncurses-5.7/ncurses/base/lib_color.c        2009-06-05 14:01:51.000000000 -0700
    1585217012@@ -1,5 +1,5 @@
    1585317013 /****************************************************************************
     
    1586517025 
    1586617026 /* lib_color.c
    15867 @@ -42,7 +43,7 @@
     17027@@ -42,7 +43,11 @@
    1586817028 #include <term.h>
    1586917029 #include <tic.h>
    1587017030 
    1587117031-MODULE_ID("$Id: lib_color.c,v 1.85 2007/04/07 17:07:28 tom Exp $")
    15872 +MODULE_ID("$Id: lib_color.c,v 1.88 2009/02/15 00:33:02 tom Exp $")
     17032+#ifndef CUR
     17033+#define CUR SP_TERMTYPE
     17034+#endif
     17035+
     17036+MODULE_ID("$Id: lib_color.c,v 1.91 2009/05/10 00:48:29 tom Exp $")
    1587317037 
    1587417038 /*
    1587517039  * These should be screen structure members.  They need to be globals for
    15876 @@ -108,6 +109,13 @@
     17040@@ -108,6 +113,13 @@
    1587717041 };
    1587817042 /* *INDENT-ON* */
     
    1588817052 /*
    1588917053  * These are called from _nc_do_color(), which in turn is called from
    15890 @@ -237,15 +245,15 @@
     17054@@ -147,31 +159,39 @@
     17055 }
     17056 
     17057 static void
     17058-set_background_color(int bg, int (*outc) (int))
     17059+set_background_color(NCURSES_SP_DCLx int bg, NCURSES_SP_OUTC outc)
     17060 {
     17061     if (set_a_background) {
     17062        TPUTS_TRACE("set_a_background");
     17063-       tputs(TPARM_1(set_a_background, bg), 1, outc);
     17064+       NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     17065+                               TPARM_1(set_a_background, bg),
     17066+                               1, outc);
     17067     } else {
     17068        TPUTS_TRACE("set_background");
     17069-       tputs(TPARM_1(set_background, toggled_colors(bg)), 1, outc);
     17070+       NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     17071+                               TPARM_1(set_background, toggled_colors(bg)),
     17072+                               1, outc);
     17073     }
     17074 }
     17075 
     17076 static void
     17077-set_foreground_color(int fg, int (*outc) (int))
     17078+set_foreground_color(NCURSES_SP_DCLx int fg, NCURSES_SP_OUTC outc)
     17079 {
     17080     if (set_a_foreground) {
     17081        TPUTS_TRACE("set_a_foreground");
     17082-       tputs(TPARM_1(set_a_foreground, fg), 1, outc);
     17083+       NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     17084+                               TPARM_1(set_a_foreground, fg),
     17085+                               1, outc);
     17086     } else {
     17087        TPUTS_TRACE("set_foreground");
     17088-       tputs(TPARM_1(set_foreground, toggled_colors(fg)), 1, outc);
     17089+       NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     17090+                               TPARM_1(set_foreground, toggled_colors(fg)),
     17091+                               1, outc);
     17092     }
     17093 }
     17094 
     17095 static void
     17096-init_color_table(void)
     17097+init_color_table(NCURSES_SP_DCL0)
     17098 {
     17099     const color_t *tp;
     17100     int n;
     17101@@ -200,7 +220,7 @@
     17102  * Reset the color pair, e.g., to whatever color pair 0 is.
     17103  */
     17104 static bool
     17105-reset_color_pair(void)
     17106+reset_color_pair(NCURSES_SP_DCL0)
     17107 {
     17108     bool result = FALSE;
     17109 
     17110@@ -220,13 +240,16 @@
     17111 bool
     17112 _nc_reset_colors(void)
     17113 {
     17114+#if NCURSES_SP_FUNCS
     17115+    SCREEN *sp = CURRENT_SCREEN;
     17116+#endif
     17117     int result = FALSE;
     17118 
     17119     T((T_CALLED("_nc_reset_colors()")));
     17120     if (SP->_color_defs > 0)
     17121        SP->_color_defs = -(SP->_color_defs);
     17122 
     17123-    if (reset_color_pair())
     17124+    if (reset_color_pair(NCURSES_SP_ARG))
     17125        result = TRUE;
     17126     if (orig_colors != 0) {
     17127        TPUTS_TRACE("orig_colors");
     17128@@ -237,45 +260,60 @@
    1589117129 }
    1589217130 
     
    1590717145     } else {
    1590817146 
    15909 @@ -255,27 +263,38 @@
     17147-       if (reset_color_pair() != TRUE) {
     17148-           set_foreground_color(default_fg(), _nc_outch);
     17149-           set_background_color(default_bg(), _nc_outch);
     17150+       if (reset_color_pair(NCURSES_SP_ARG) != TRUE) {
     17151+           set_foreground_color(NCURSES_SP_ARGx
     17152+                                default_fg(),
     17153+                                NCURSES_SP_NAME(_nc_outch));
     17154+           set_background_color(NCURSES_SP_ARGx
     17155+                                default_bg(),
     17156+                                NCURSES_SP_NAME(_nc_outch));
    1591017157        }
    1591117158 
     
    1593417181-                                                   max_colors)) != 0) {
    1593517182-                   SP->_color_pairs[0] = PAIR_OF(default_fg(), default_bg());
     17183-                   init_color_table();
    1593617184+           SP_PARM->_color_pairs = TYPE_CALLOC(colorpair_t,
    1593717185+                                               SP_PARM->_pair_limit);
     
    1594117189+                   SP_PARM->_color_pairs[0] = PAIR_OF(default_fg(),
    1594217190+                                                      default_bg());
    15943                     init_color_table();
     17191+                   init_color_table(NCURSES_SP_ARG);
    1594417192 
    1594517193                    T(("started color: COLORS = %d, COLOR_PAIRS = %d",
     
    1595617204            }
    1595717205        } else {
    15958 @@ -285,6 +304,14 @@
     17206@@ -285,6 +323,14 @@
    1595917207     returnCode(result);
    1596017208 }
     
    1597117219 static void
    1597217220 rgb2hls(short r, short g, short b, short *h, short *l, short *s)
    15973 @@ -328,24 +355,72 @@
     17221@@ -328,24 +374,72 @@
    1597417222  * values.
    1597517223  */
     
    1605117299 #endif
    1605217300     {
    16053 @@ -361,8 +436,8 @@
     17301@@ -361,8 +455,8 @@
    1605417302      * pair colors with the new ones).
    1605517303      */
     
    1606217310 
    1606317311        for (y = 0; y <= curscr->_maxy; y++) {
    16064 @@ -381,9 +456,9 @@
     17312@@ -381,9 +475,9 @@
    1606517313                _nc_make_oldhash(y);
    1606617314        }
     
    1607517323     if (initialize_pair && InPalette(f) && InPalette(b)) {
    1607617324        const color_t *tp = hue_lightness_saturation ? hls_palette : cga_palette;
    16077 @@ -404,54 +479,79 @@
     17325@@ -404,54 +498,79 @@
    1607817326     returnCode(OK);
    1607917327 }
     
    1617117419     T((T_CALLED("has_colors()")));
    1617217420     returnCode((VALID_NUMERIC(max_colors) && VALID_NUMERIC(max_pairs)
    16173 @@ -462,18 +562,27 @@
     17421@@ -462,18 +581,27 @@
    1617417422                    || set_color_pair)) ? TRUE : FALSE);
    1617517423 }
     
    1620417452        if (r)
    1620517453            *r = c_r;
    16206 @@ -489,18 +598,27 @@
     17454@@ -489,18 +617,27 @@
    1620717455     returnCode(result);
    1620817456 }
     
    1623617484 #if NCURSES_EXT_FUNCS
    1623717485        if (fg == COLOR_DEFAULT)
    16238 @@ -520,6 +638,14 @@
     17486@@ -520,19 +657,33 @@
    1623917487     returnCode(result);
    1624017488 }
     
    1624917497+
    1625017498 NCURSES_EXPORT(void)
    16251  _nc_do_color(short old_pair, short pair, bool reverse, int (*outc) (int))
     17499-_nc_do_color(short old_pair, short pair, bool reverse, int (*outc) (int))
     17500+NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_DCLx
     17501+                              short old_pair,
     17502+                              short pair,
     17503+                              bool reverse,
     17504+                              NCURSES_SP_OUTC outc)
    1625217505 {
    16253 @@ -527,7 +653,7 @@
     17506     NCURSES_COLOR_T fg = COLOR_DEFAULT;
    1625417507     NCURSES_COLOR_T bg = COLOR_DEFAULT;
    1625517508     NCURSES_COLOR_T old_fg, old_bg;
     
    1626017513     } else if (pair != 0) {
    1626117514        if (set_color_pair) {
     17515            TPUTS_TRACE("set_color_pair");
     17516-           tputs(TPARM_1(set_color_pair, pair), 1, outc);
     17517+           NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     17518+                                   TPARM_1(set_color_pair, pair),
     17519+                                   1, outc);
     17520            return;
     17521        } else if (SP != 0) {
     17522            pair_content((short) pair, &fg, &bg);
     17523@@ -553,17 +704,17 @@
     17524            if (SP->_has_sgr_39_49
     17525                && isDefaultColor(old_bg)
     17526                && !isDefaultColor(old_fg)) {
     17527-               tputs("\033[39m", 1, outc);
     17528+               NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx "\033[39m", 1, outc);
     17529            } else if (SP->_has_sgr_39_49
     17530                       && isDefaultColor(old_fg)
     17531                       && !isDefaultColor(old_bg)) {
     17532-               tputs("\033[49m", 1, outc);
     17533+               NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx "\033[49m", 1, outc);
     17534            } else
     17535 #endif
     17536-               reset_color_pair();
     17537+               reset_color_pair(NCURSES_SP_ARG);
     17538        }
     17539     } else {
     17540-       reset_color_pair();
     17541+       reset_color_pair(NCURSES_SP_ARG);
     17542        if (old_pair < 0)
     17543            return;
     17544     }
     17545@@ -585,9 +736,22 @@
     17546                     fg, bg));
     17547 
     17548     if (!isDefaultColor(fg)) {
     17549-       set_foreground_color(fg, outc);
     17550+       set_foreground_color(NCURSES_SP_ARGx fg, outc);
     17551     }
     17552     if (!isDefaultColor(bg)) {
     17553-       set_background_color(bg, outc);
     17554+       set_background_color(NCURSES_SP_ARGx bg, outc);
     17555     }
     17556 }
     17557+
     17558+#if NCURSES_SP_FUNCS
     17559+NCURSES_EXPORT(void)
     17560+_nc_do_color(short old_pair, short pair, bool reverse, NCURSES_OUTC outc)
     17561+{
     17562+    SetSafeOutcWrapper(outc);
     17563+    NCURSES_SP_NAME(_nc_do_color) (CURRENT_SCREEN,
     17564+                                  old_pair,
     17565+                                  pair,
     17566+                                  reverse,
     17567+                                  _nc_outc_wrapper);
     17568+}
     17569+#endif
    1626217570diff -Naur ncurses-5.7.orig/ncurses/base/lib_colorset.c ncurses-5.7/ncurses/base/lib_colorset.c
    1626317571--- ncurses-5.7.orig/ncurses/base/lib_colorset.c        2005-01-29 13:40:51.000000000 -0800
    16264 +++ ncurses-5.7/ncurses/base/lib_colorset.c     2009-03-22 21:17:02.195775108 -0700
     17572+++ ncurses-5.7/ncurses/base/lib_colorset.c     2009-06-05 14:01:11.000000000 -0700
    1626517573@@ -1,5 +1,5 @@
    1626617574 /****************************************************************************
     
    1630817616+    returnCode(code);
    1630917617 }
     17618diff -Naur ncurses-5.7.orig/ncurses/base/lib_delwin.c ncurses-5.7/ncurses/base/lib_delwin.c
     17619--- ncurses-5.7.orig/ncurses/base/lib_delwin.c  2008-06-07 07:10:56.000000000 -0700
     17620+++ ncurses-5.7/ncurses/base/lib_delwin.c       2009-06-05 14:01:54.000000000 -0700
     17621@@ -1,5 +1,5 @@
     17622 /****************************************************************************
     17623- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     17624+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     17625  *                                                                          *
     17626  * Permission is hereby granted, free of charge, to any person obtaining a  *
     17627  * copy of this software and associated documentation files (the            *
     17628@@ -29,6 +29,8 @@
     17629 /****************************************************************************
     17630  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
     17631  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
     17632+ *     and: Thomas E. Dickey                        1996-on                 *
     17633+ *     and: Juergen Pfeifer                         2008                    *
     17634  ****************************************************************************/
     17635 
     17636 /*
     17637@@ -40,15 +42,18 @@
     17638 
     17639 #include <curses.priv.h>
     17640 
     17641-MODULE_ID("$Id: lib_delwin.c,v 1.17 2008/06/07 14:10:56 tom Exp $")
     17642+MODULE_ID("$Id: lib_delwin.c,v 1.19 2009/05/23 19:56:55 tom Exp $")
     17643 
     17644 static bool
     17645 cannot_delete(WINDOW *win)
     17646 {
     17647     WINDOWLIST *p;
     17648     bool result = TRUE;
     17649+#ifdef USE_SP_WINDOWLIST
     17650+    SCREEN *sp = _nc_screen_of(win);
     17651+#endif
     17652 
     17653-    for (each_window(p)) {
     17654+    for (each_window(SP_PARM, p)) {
     17655        if (&(p->win) == win) {
     17656            result = FALSE;
     17657        } else if ((p->win._flags & _SUBWIN) != 0
     17658@@ -72,11 +77,13 @@
     17659            || cannot_delete(win)) {
     17660            result = ERR;
     17661        } else {
     17662-
     17663+#if NCURSES_SP_FUNCS
     17664+           SCREEN *sp = _nc_screen_of(win);
     17665+#endif
     17666            if (win->_flags & _SUBWIN)
     17667                touchwin(win->_parent);
     17668-           else if (curscr != 0)
     17669-               touchwin(curscr);
     17670+           else if (CurScreen(SP_PARM) != 0)
     17671+               touchwin(CurScreen(SP_PARM));
     17672 
     17673            result = _nc_freewin(win);
     17674        }
    1631017675diff -Naur ncurses-5.7.orig/ncurses/base/lib_dft_fgbg.c ncurses-5.7/ncurses/base/lib_dft_fgbg.c
    1631117676--- ncurses-5.7.orig/ncurses/base/lib_dft_fgbg.c        2005-11-26 12:03:38.000000000 -0800
    16312 +++ ncurses-5.7/ncurses/base/lib_dft_fgbg.c     2009-03-22 21:17:05.643993853 -0700
     17677+++ ncurses-5.7/ncurses/base/lib_dft_fgbg.c     2009-06-05 14:01:55.000000000 -0700
    1631317678@@ -1,5 +1,5 @@
    1631417679 /****************************************************************************
     
    1631817683  * Permission is hereby granted, free of charge, to any person obtaining a  *
    1631917684  * copy of this software and associated documentation files (the            *
    16320 @@ -27,31 +27,40 @@
     17685@@ -27,49 +27,73 @@
    1632117686  ****************************************************************************/
    1632217687 
     
    1632817693 
    1632917694 #include <curses.priv.h>
    16330  #include <term.h>
     17695-#include <term.h>
    1633117696 
    1633217697-MODULE_ID("$Id: lib_dft_fgbg.c,v 1.18 2005/11/26 20:03:38 tom Exp $")
    16333 +MODULE_ID("$Id: lib_dft_fgbg.c,v 1.19 2009/02/14 21:53:21 tom Exp $")
     17698+#ifndef CUR
     17699+#define CUR SP_TERMTYPE
     17700+#endif
     17701+
     17702+MODULE_ID("$Id: lib_dft_fgbg.c,v 1.24 2009/05/30 20:00:00 tom Exp $")
    1633417703 
    1633517704 /*
     
    1633817707  */
    1633917708 NCURSES_EXPORT(int)
    16340 -use_default_colors(void)
    1634117709+NCURSES_SP_NAME(use_default_colors) (NCURSES_SP_DCL0)
    16342  {
    16343      T((T_CALLED("use_default_colors()")));
    16344 -    returnCode(assume_default_colors(-1, -1));
    16345 +    returnCode(NCURSES_SP_NAME(assume_default_colors) (NCURSES_SP_ARGx - 1, -1));
     17710+{
     17711+    T((T_CALLED("use_default_colors(%p)"), SP_PARM));
     17712+    returnCode(NCURSES_SP_NAME(assume_default_colors) (NCURSES_SP_ARGx -1, -1));
    1634617713+}
    1634717714+
    1634817715+#if NCURSES_SP_FUNCS
    1634917716+NCURSES_EXPORT(int)
    16350 +use_default_colors(void)
    16351 +{
     17717 use_default_colors(void)
     17718 {
     17719-    T((T_CALLED("use_default_colors()")));
     17720-    returnCode(assume_default_colors(-1, -1));
    1635217721+    return NCURSES_SP_NAME(use_default_colors) (CURRENT_SCREEN);
    1635317722 }
     
    1636217731+NCURSES_SP_NAME(assume_default_colors) (NCURSES_SP_DCLx int fg, int bg)
    1636317732 {
    16364      T((T_CALLED("assume_default_colors(%d,%d)"), fg, bg));
    16365  
    16366 @@ -61,15 +70,23 @@
    16367      if (initialize_pair)       /* don't know how to handle this */
    16368         returnCode(ERR);
    16369  
     17733-    T((T_CALLED("assume_default_colors(%d,%d)"), fg, bg));
     17734-
     17735-    if (!orig_pair && !orig_colors)
     17736-       returnCode(ERR);
     17737+    int code = ERR;
     17738 
     17739-    if (initialize_pair)       /* don't know how to handle this */
     17740-       returnCode(ERR);
     17741-
    1637017742-    SP->_default_color = isDefaultColor(fg) || isDefaultColor(bg);
    1637117743-    SP->_has_sgr_39_49 = (tigetflag("AX") == TRUE);
     
    1637517747-       bool save = SP->_default_color;
    1637617748-       SP->_default_color = TRUE;
    16377 +    SP_PARM->_default_color = isDefaultColor(fg) || isDefaultColor(bg);
    16378 +    SP_PARM->_has_sgr_39_49 = (tigetflag("AX") == TRUE);
    16379 +    SP_PARM->_default_fg = isDefaultColor(fg) ? COLOR_DEFAULT : (fg & C_MASK);
    16380 +    SP_PARM->_default_bg = isDefaultColor(bg) ? COLOR_DEFAULT : (bg & C_MASK);
    16381 +    if (SP_PARM->_color_pairs != 0) {
    16382 +       bool save = SP_PARM->_default_color;
    16383 +       SP_PARM->_default_color = TRUE;
    16384         init_pair(0, (short) fg, (short) bg);
     17749-       init_pair(0, (short) fg, (short) bg);
    1638517750-       SP->_default_color = save;
    16386 +       SP_PARM->_default_color = save;
     17751+    T((T_CALLED("assume_default_colors(%p,%d,%d)"), SP_PARM, fg, bg));
     17752+#ifdef USE_TERM_DRIVER
     17753+    if (sp != 0)
     17754+       code = CallDriver_2(sp, defaultcolors, fg, bg);
     17755+#else
     17756+    if ((orig_pair || orig_colors) && !initialize_pair) {
     17757+
     17758+       SP_PARM->_default_color = isDefaultColor(fg) || isDefaultColor(bg);
     17759+       SP_PARM->_has_sgr_39_49 = (tigetflag("AX") == TRUE);
     17760+       SP_PARM->_default_fg = isDefaultColor(fg) ? COLOR_DEFAULT : (fg & C_MASK);
     17761+       SP_PARM->_default_bg = isDefaultColor(bg) ? COLOR_DEFAULT : (bg & C_MASK);
     17762+       if (SP_PARM->_color_pairs != 0) {
     17763+           bool save = SP_PARM->_default_color;
     17764+           SP_PARM->_default_color = TRUE;
     17765+           init_pair(0, (short) fg, (short) bg);
     17766+           SP_PARM->_default_color = save;
     17767+       }
     17768+       code = OK;
    1638717769     }
    16388      returnCode(OK);
    16389  }
     17770-    returnCode(OK);
     17771+#endif
     17772+    returnCode(code);
     17773+}
    1639017774+
    1639117775+#if NCURSES_SP_FUNCS
     
    1639417778+{
    1639517779+    return NCURSES_SP_NAME(assume_default_colors) (CURRENT_SCREEN, fg, bg);
    16396 +}
     17780 }
    1639717781+#endif
    1639817782diff -Naur ncurses-5.7.orig/ncurses/base/lib_echo.c ncurses-5.7/ncurses/base/lib_echo.c
    1639917783--- ncurses-5.7.orig/ncurses/base/lib_echo.c    2000-12-09 18:43:27.000000000 -0800
    16400 +++ ncurses-5.7/ncurses/base/lib_echo.c 2009-03-22 21:17:07.012081575 -0700
     17784+++ ncurses-5.7/ncurses/base/lib_echo.c 2009-06-05 14:01:16.000000000 -0700
    1640117785@@ -1,5 +1,5 @@
    1640217786 /****************************************************************************
     
    1646417848diff -Naur ncurses-5.7.orig/ncurses/base/lib_endwin.c ncurses-5.7/ncurses/base/lib_endwin.c
    1646517849--- ncurses-5.7.orig/ncurses/base/lib_endwin.c  2000-12-09 18:43:27.000000000 -0800
    16466 +++ ncurses-5.7/ncurses/base/lib_endwin.c       2009-03-22 21:17:05.643993853 -0700
     17850+++ ncurses-5.7/ncurses/base/lib_endwin.c       2009-06-05 14:01:14.000000000 -0700
    1646717851@@ -1,5 +1,5 @@
    1646817852 /****************************************************************************
     
    1651717901diff -Naur ncurses-5.7.orig/ncurses/base/lib_flash.c ncurses-5.7/ncurses/base/lib_flash.c
    1651817902--- ncurses-5.7.orig/ncurses/base/lib_flash.c   2000-12-09 18:43:27.000000000 -0800
    16519 +++ ncurses-5.7/ncurses/base/lib_flash.c        2009-03-22 21:17:05.643993853 -0700
     17903+++ ncurses-5.7/ncurses/base/lib_flash.c        2009-06-05 14:01:54.000000000 -0700
    1652017904@@ -1,5 +1,5 @@
    1652117905 /****************************************************************************
     
    1653417918 
    1653517919 /*
    16536 @@ -41,7 +43,7 @@
     17920@@ -39,9 +41,12 @@
     17921  */
     17922 
    1653717923 #include <curses.priv.h>
    16538  #include <term.h>              /* beep, flash */
     17924-#include <term.h>              /* beep, flash */
    1653917925 
    1654017926-MODULE_ID("$Id: lib_flash.c,v 1.6 2000/12/10 02:43:27 tom Exp $")
    16541 +MODULE_ID("$Id: lib_flash.c,v 1.7 2009/02/15 00:35:15 tom Exp $")
     17927+#ifndef CUR
     17928+#define CUR SP_TERMTYPE
     17929+#endif
     17930+
     17931+MODULE_ID("$Id: lib_flash.c,v 1.10 2009/05/23 19:37:09 tom Exp $")
    1654217932 
    1654317933 /*
    1654417934  *     flash()
    16545 @@ -52,7 +54,7 @@
     17935@@ -52,12 +57,15 @@
    1654617936  */
    1654717937 
     
    1655217942     int res = ERR;
    1655317943 
    16554 @@ -71,3 +73,11 @@
    16555  
     17944-    T((T_CALLED("flash()")));
     17945-
     17946+    T((T_CALLED("flash(%p)"), SP_PARM));
     17947+#ifdef USE_TERM_DRIVER
     17948+    if (SP_PARM != 0)
     17949+       res = CallDriver_1(SP_PARM, doBeepOrFlash, FALSE);
     17950+#else
     17951     /* FIXME: should make sure that we are not in altchar mode */
     17952     if (flash_screen) {
     17953        TPUTS_TRACE("flash_screen");
     17954@@ -68,6 +76,14 @@
     17955        res = putp(bell);
     17956        _nc_flush();
     17957     }
     17958-
     17959+#endif
    1655617960     returnCode(res);
    1655717961 }
     
    1656617970diff -Naur ncurses-5.7.orig/ncurses/base/lib_freeall.c ncurses-5.7/ncurses/base/lib_freeall.c
    1656717971--- ncurses-5.7.orig/ncurses/base/lib_freeall.c 2008-09-27 06:09:57.000000000 -0700
    16568 +++ ncurses-5.7/ncurses/base/lib_freeall.c      2009-03-22 21:16:49.034929738 -0700
    16569 @@ -40,7 +40,7 @@
     17972+++ ncurses-5.7/ncurses/base/lib_freeall.c      2009-06-05 14:01:51.000000000 -0700
     17973@@ -1,5 +1,5 @@
     17974 /****************************************************************************
     17975- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     17976+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     17977  *                                                                          *
     17978  * Permission is hereby granted, free of charge, to any person obtaining a  *
     17979  * copy of this software and associated documentation files (the            *
     17980@@ -40,40 +40,40 @@
    1657017981 extern int malloc_errfd;       /* FIXME */
    1657117982 #endif
    1657217983 
    1657317984-MODULE_ID("$Id: lib_freeall.c,v 1.54 2008/09/27 13:09:57 tom Exp $")
    16574 +MODULE_ID("$Id: lib_freeall.c,v 1.55 2008/12/06 23:52:29 tom Exp $")
     17985+MODULE_ID("$Id: lib_freeall.c,v 1.58 2009/05/09 18:34:30 tom Exp $")
    1657517986 
    1657617987 /*
    1657717988  * Free all ncurses data.  This is used for testing only (there's no practical
    16578 @@ -98,8 +98,6 @@
    16579         delscreen(SP);
     17989  * use for it as an extension).
     17990  */
     17991 NCURSES_EXPORT(void)
     17992-_nc_freeall(void)
     17993+NCURSES_SP_NAME(_nc_freeall) (NCURSES_SP_DCL0)
     17994 {
     17995     WINDOWLIST *p, *q;
     17996     static va_list empty_va;
     17997 
     17998     T((T_CALLED("_nc_freeall()")));
     17999 #if NO_LEAKS
     18000-    if (SP != 0) {
     18001-       if (SP->_oldnum_list != 0) {
     18002-           FreeAndNull(SP->_oldnum_list);
     18003+    if (SP_PARM != 0) {
     18004+       if (SP_PARM->_oldnum_list != 0) {
     18005+           FreeAndNull(SP_PARM->_oldnum_list);
     18006        }
     18007-       if (SP->_panelHook.destroy != 0) {
     18008-           SP->_panelHook.destroy(SP->_panelHook.stdscr_pseudo_panel);
     18009+       if (SP_PARM->_panelHook.destroy != 0) {
     18010+           SP_PARM->_panelHook.destroy(SP_PARM->_panelHook.stdscr_pseudo_panel);
     18011        }
     18012     }
     18013 #endif
     18014-    if (SP != 0) {
     18015+    if (SP_PARM != 0) {
     18016        _nc_lock_global(curses);
     18017 
     18018-       while (_nc_windows != 0) {
     18019+       while (WindowList(SP_PARM) != 0) {
     18020            bool deleted = FALSE;
     18021 
     18022            /* Delete only windows that're not a parent */
     18023-           for (each_window(p)) {
     18024+           for (each_window(SP_PARM, p)) {
     18025                bool found = FALSE;
     18026 
     18027-               for (each_window(q)) {
     18028+               for (each_window(SP_PARM, q)) {
     18029                    if ((p != q)
     18030                        && (q->win._flags & _SUBWIN)
     18031                        && (&(p->win) == q->win._parent)) {
     18032@@ -95,11 +95,9 @@
     18033            if (!deleted)
     18034                break;
     18035        }
     18036-       delscreen(SP);
     18037+       delscreen(SP_PARM);
    1658018038        _nc_unlock_global(curses);
    1658118039     }
     
    1658518043     (void) _nc_printf_string(0, empty_va);
    1658618044 #ifdef TRACE
     18045@@ -121,12 +119,20 @@
     18046     returnVoid;
     18047 }
     18048 
     18049+#if NCURSES_SP_FUNCS
     18050 NCURSES_EXPORT(void)
     18051-_nc_free_and_exit(int code)
     18052+_nc_freeall(void)
     18053+{
     18054+    NCURSES_SP_NAME(_nc_freeall) (CURRENT_SCREEN);
     18055+}
     18056+#endif
     18057+
     18058+NCURSES_EXPORT(void)
     18059+NCURSES_SP_NAME(_nc_free_and_exit) (NCURSES_SP_DCLx int code)
     18060 {
     18061-    char *last_setbuf = (SP != 0) ? SP->_setbuf : 0;
     18062+    char *last_setbuf = (SP_PARM != 0) ? SP_PARM->_setbuf : 0;
     18063 
     18064-    _nc_freeall();
     18065+    NCURSES_SP_NAME(_nc_freeall) (NCURSES_SP_ARG);
     18066 #ifdef TRACE
     18067     trace(0);                  /* close trace file, freeing its setbuf */
     18068     {
     18069@@ -146,12 +152,21 @@
     18070 }
     18071 
     18072 NCURSES_EXPORT(void)
     18073-_nc_free_and_exit(int code)
     18074+NCURSES_SP_NAME(_nc_free_and_exit) (NCURSES_SP_DCLx int code)
     18075 {
     18076-    if (SP)
     18077-       delscreen(SP);
     18078-    if (cur_term != 0)
     18079-       del_curterm(cur_term);
     18080+    if (SP_PARM) {
     18081+       delscreen(SP_PARM);
     18082+       if (SP_PARM->_term)
     18083+           NCURSES_SP_NAME(del_curterm) (NCURSES_SP_ARGx SP_PARM->_term);
     18084+    }
     18085     exit(code);
     18086 }
     18087 #endif
     18088+
     18089+#if NCURSES_SP_FUNCS
     18090+NCURSES_EXPORT(void)
     18091+_nc_free_and_exit(int code)
     18092+{
     18093+    NCURSES_SP_NAME(_nc_free_and_exit) (CURRENT_SCREEN, code);
     18094+}
     18095+#endif
    1658718096diff -Naur ncurses-5.7.orig/ncurses/base/lib_getch.c ncurses-5.7/ncurses/base/lib_getch.c
    1658818097--- ncurses-5.7.orig/ncurses/base/lib_getch.c   2008-09-20 12:46:13.000000000 -0700
    16589 +++ ncurses-5.7/ncurses/base/lib_getch.c        2009-03-22 21:17:08.396170694 -0700
     18098+++ ncurses-5.7/ncurses/base/lib_getch.c        2009-06-05 14:01:55.000000000 -0700
    1659018099@@ -1,5 +1,5 @@
    1659118100 /****************************************************************************
     
    1660318112 
    1660418113 /*
    16605 @@ -41,7 +42,7 @@
     18114@@ -41,40 +42,54 @@
    1660618115 
    1660718116 #include <curses.priv.h>
    1660818117 
    1660918118-MODULE_ID("$Id: lib_getch.c,v 1.99 2008/09/20 19:46:13 tom Exp $")
    16610 +MODULE_ID("$Id: lib_getch.c,v 1.101 2009/02/28 19:16:40 tom Exp $")
     18119+MODULE_ID("$Id: lib_getch.c,v 1.103 2009/05/30 15:50:47 tom Exp $")
    1661118120 
    1661218121 #include <fifo_defs.h>
    1661318122 
    16614 @@ -54,27 +55,36 @@
     18123 #if USE_REENTRANT
     18124 #define GetEscdelay(sp) (sp)->_ESCDELAY
     18125+NCURSES_EXPORT(int *)
     18126+_nc_ptr_Escdelay(SCREEN *sp)
     18127+{
     18128+    return ptrEscdelay(sp);
     18129+}
     18130 NCURSES_EXPORT(int)
     18131 NCURSES_PUBLIC_VAR(ESCDELAY) (void)
     18132 {
     18133-    return SP ? GetEscdelay(SP) : 1000;
     18134+    return *_nc_ptr_Escdelay(CURRENT_SCREEN);
    1661518135 }
    1661618136 #else
     
    1665418174 static int
    1665518175 _nc_use_meta(WINDOW *win)
    16656 @@ -84,9 +94,9 @@
     18176@@ -84,9 +99,9 @@
    1665718177 }
    1665818178 
     
    1666618186 
    1666718187 /*
    16668 @@ -109,7 +119,7 @@
     18188@@ -109,7 +124,7 @@
    1666918189        && (sp->_sysmouse_head < sp->_sysmouse_tail)
    1667018190        && (rc == 0)
     
    1667518195 #endif
    1667618196     return rc;
    16677 @@ -173,7 +183,7 @@
     18197@@ -173,9 +188,9 @@
    1667818198     } else
    1667918199        mask = 0;
     
    1668218202+    if (mask & TW_EVENT) {
    1668318203        T(("fifo_push: ungetch KEY_EVENT"));
    16684         _nc_ungetch(sp, KEY_EVENT);
     18204-       _nc_ungetch(sp, KEY_EVENT);
     18205+       safe_ungetch(sp, KEY_EVENT);
    1668518206        return KEY_EVENT;
    16686 @@ -185,7 +195,7 @@
     18207     }
     18208 #elif USE_GPM_SUPPORT || USE_EMX_MOUSE || USE_SYSMOUSE
     18209@@ -185,7 +200,7 @@
    1668718210 #endif
    1668818211 
     
    1669318216        ch = KEY_MOUSE;
    1669418217        n = 1;
    16695 @@ -260,12 +270,12 @@
     18218@@ -260,12 +275,12 @@
    1669618219 {
    1669718220 #ifdef USE_PTHREADS
     
    1670818231        recur_wrefresh(win);
    1670918232        _nc_set_screen(save_SP);
    16710 @@ -286,12 +296,12 @@
     18233@@ -286,12 +301,12 @@
    1671118234 
    1671218235     if (sp != 0) {
     
    1672318246            rc = recur_wgetnstr(win, buf);
    1672418247            _nc_set_screen(save_SP);
    16725 @@ -402,7 +412,7 @@
     18248@@ -362,9 +377,9 @@
     18249 #ifdef NCURSES_WGETCH_EVENTS
     18250        if (rc != KEY_EVENT)
     18251 #endif
     18252-           _nc_ungetch(sp, '\n');
     18253+           safe_ungetch(sp, '\n');
     18254        for (bufp = buf + strlen(buf); bufp > buf; bufp--)
     18255-           _nc_ungetch(sp, bufp[-1]);
     18256+           safe_ungetch(sp, bufp[-1]);
     18257 
     18258 #ifdef NCURSES_WGETCH_EVENTS
     18259        /* Return it first */
     18260@@ -402,7 +417,7 @@
    1672618261            rc = check_mouse_activity(sp, delay EVENTLIST_2nd(evl));
    1672718262 
     
    1673218267                returnCode(KEY_CODE_YES);
    1673318268            }
    16734 @@ -427,7 +437,7 @@
     18269@@ -427,7 +442,7 @@
    1673518270         * increase the wait with mouseinterval().
    1673618271         */
     
    1674118276        do {
    1674218277            ch = kgetch(sp EVENTLIST_2nd(evl));
    16743 @@ -442,10 +452,10 @@
     18278@@ -442,11 +457,11 @@
    1674418279            (ch == KEY_MOUSE
    1674518280             && (((rc = check_mouse_activity(sp, sp->_maxclick
     
    1675018285 #ifdef NCURSES_WGETCH_EVENTS
    1675118286-       if ((rc & 4) && !ch == KEY_EVENT) {
     18287-           _nc_ungetch(sp, ch);
    1675218288+       if ((rc & TW_EVENT) && !(ch == KEY_EVENT)) {
    16753             _nc_ungetch(sp, ch);
     18289+           safe_ungetch(sp, ch);
    1675418290            ch = KEY_EVENT;
    1675518291        }
    16756 @@ -645,7 +655,7 @@
     18292 #endif
     18293@@ -454,12 +469,12 @@
     18294 #ifdef NCURSES_WGETCH_EVENTS
     18295            /* mouse event sequence ended by an event, report event */
     18296            if (ch == KEY_EVENT) {
     18297-               _nc_ungetch(sp, KEY_MOUSE);     /* FIXME This interrupts a gesture... */
     18298+               safe_ungetch(sp, KEY_MOUSE);    /* FIXME This interrupts a gesture... */
     18299            } else
     18300 #endif
     18301            {
     18302                /* mouse event sequence ended by keystroke, store keystroke */
     18303-               _nc_ungetch(sp, ch);
     18304+               safe_ungetch(sp, ch);
     18305                ch = KEY_MOUSE;
     18306            }
     18307        }
     18308@@ -645,7 +660,7 @@
    1675718309            TR(TRACE_IEVENT, ("waiting for rest of sequence"));
    1675818310            rc = check_mouse_activity(sp, timeleft EVENTLIST_2nd(evl));
     
    1676318315                /* FIXME Should have preserved remainder timeleft for reuse... */
    1676418316                peek = head;    /* Restart interpreting later */
     18317diff -Naur ncurses-5.7.orig/ncurses/base/lib_getstr.c ncurses-5.7/ncurses/base/lib_getstr.c
     18318--- ncurses-5.7.orig/ncurses/base/lib_getstr.c  2008-08-16 12:20:04.000000000 -0700
     18319+++ ncurses-5.7/ncurses/base/lib_getstr.c       2009-06-05 14:01:51.000000000 -0700
     18320@@ -1,5 +1,5 @@
     18321 /****************************************************************************
     18322- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc.              *
     18323+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     18324  *                                                                          *
     18325  * Permission is hereby granted, free of charge, to any person obtaining a  *
     18326  * copy of this software and associated documentation files (the            *
     18327@@ -39,9 +39,8 @@
     18328 */
     18329 
     18330 #include <curses.priv.h>
     18331-#include <term.h>
     18332 
     18333-MODULE_ID("$Id: lib_getstr.c,v 1.27 2008/08/16 19:20:04 tom Exp $")
     18334+MODULE_ID("$Id: lib_getstr.c,v 1.28 2009/05/09 17:02:41 tom Exp $")
     18335 
     18336 /*
     18337  * This wipes out the last character, no matter whether it was a tab, control
     18338@@ -89,19 +88,19 @@
     18339     if (!win)
     18340        returnCode(ERR);
     18341 
     18342-    _nc_get_tty_mode(&buf);
     18343+    NCURSES_SP_NAME(_nc_get_tty_mode) (NCURSES_SP_ARGx &buf);
     18344 
     18345     oldnl = sp->_nl;
     18346     oldecho = sp->_echo;
     18347     oldraw = sp->_raw;
     18348     oldcbreak = sp->_cbreak;
     18349-    nl();
     18350-    noecho();
     18351-    noraw();
     18352-    cbreak();
     18353+    NCURSES_SP_NAME(nl) (NCURSES_SP_ARG);
     18354+    NCURSES_SP_NAME(noecho) (NCURSES_SP_ARG);
     18355+    NCURSES_SP_NAME(noraw) (NCURSES_SP_ARG);
     18356+    NCURSES_SP_NAME(cbreak) (NCURSES_SP_ARG);
     18357 
     18358-    erasec = erasechar();
     18359-    killc = killchar();
     18360+    erasec = NCURSES_SP_NAME(erasechar) (NCURSES_SP_ARG);
     18361+    killc = NCURSES_SP_NAME(killchar) (NCURSES_SP_ARG);
     18362 
     18363     oldstr = str;
     18364     getyx(win, y, x);
     18365@@ -144,7 +143,7 @@
     18366            }
     18367        } else if (ch >= KEY_MIN
     18368                   || (maxlen >= 0 && str - oldstr >= maxlen)) {
     18369-           beep();
     18370+           NCURSES_SP_NAME(beep) (NCURSES_SP_ARG);
     18371        } else {
     18372            *str++ = (char) ch;
     18373            if (oldecho == TRUE) {
     18374@@ -193,7 +192,7 @@
     18375     sp->_raw = oldraw;
     18376     sp->_cbreak = oldcbreak;
     18377 
     18378-    _nc_set_tty_mode(&buf);
     18379+    NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_ARGx &buf);
     18380 
     18381     *str = '\0';
     18382     if (ch == ERR)
     18383diff -Naur ncurses-5.7.orig/ncurses/base/lib_initscr.c ncurses-5.7/ncurses/base/lib_initscr.c
     18384--- ncurses-5.7.orig/ncurses/base/lib_initscr.c 2008-08-16 14:20:48.000000000 -0700
     18385+++ ncurses-5.7/ncurses/base/lib_initscr.c      2009-06-05 14:01:33.000000000 -0700
     18386@@ -1,5 +1,5 @@
     18387 /****************************************************************************
     18388- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     18389+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     18390  *                                                                          *
     18391  * Permission is hereby granted, free of charge, to any person obtaining a  *
     18392  * copy of this software and associated documentation files (the            *
     18393@@ -45,7 +45,7 @@
     18394 #include <sys/termio.h>                /* needed for ISC */
     18395 #endif
     18396 
     18397-MODULE_ID("$Id: lib_initscr.c,v 1.38 2008/08/16 21:20:48 Werner.Fink Exp $")
     18398+MODULE_ID("$Id: lib_initscr.c,v 1.39 2009/02/14 20:55:49 tom Exp $")
     18399 
     18400 NCURSES_EXPORT(WINDOW *)
     18401 initscr(void)
     18402@@ -90,7 +90,11 @@
     18403        }
     18404 
     18405        /* def_shell_mode - done in newterm/_nc_setupscreen */
     18406+#if NCURSES_SP_FUNCS
     18407+       NCURSES_SP_NAME(def_prog_mode) (CURRENT_SCREEN);
     18408+#else
     18409        def_prog_mode();
     18410+#endif
     18411     }
     18412     result = stdscr;
     18413     _nc_unlock_global(curses);
     18414diff -Naur ncurses-5.7.orig/ncurses/base/lib_insch.c ncurses-5.7/ncurses/base/lib_insch.c
     18415--- ncurses-5.7.orig/ncurses/base/lib_insch.c   2008-02-02 16:14:37.000000000 -0800
     18416+++ ncurses-5.7/ncurses/base/lib_insch.c        2009-06-05 14:01:55.000000000 -0700
     18417@@ -1,5 +1,5 @@
     18418 /****************************************************************************
     18419- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc.              *
     18420+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     18421  *                                                                          *
     18422  * Permission is hereby granted, free of charge, to any person obtaining a  *
     18423  * copy of this software and associated documentation files (the            *
     18424@@ -43,24 +43,31 @@
     18425 #include <curses.priv.h>
     18426 #include <ctype.h>
     18427 
     18428-MODULE_ID("$Id: lib_insch.c,v 1.25 2008/02/03 00:14:37 tom Exp $")
     18429+MODULE_ID("$Id: lib_insch.c,v 1.29 2009/05/30 16:45:16 tom Exp $")
     18430 
     18431 /*
     18432  * Insert the given character, updating the current location to simplify
     18433  * inserting a string.
     18434  */
     18435 NCURSES_EXPORT(int)
     18436-_nc_insert_ch(WINDOW *win, chtype ch)
     18437+_nc_insert_ch(SCREEN *sp, WINDOW *win, chtype ch)
     18438 {
     18439     int code = OK;
     18440     NCURSES_CH_T wch;
     18441     int count;
     18442     NCURSES_CONST char *s;
     18443+    int tabsize =
     18444+#if USE_REENTRANT
     18445+    sp->_TABSIZE
     18446+#else
     18447+    TABSIZE
     18448+#endif
     18449+     ;
     18450 
     18451     switch (ch) {
     18452     case '\t':
     18453-       for (count = (TABSIZE - (win->_curx % TABSIZE)); count > 0; count--) {
     18454-           if ((code = _nc_insert_ch(win, ' ')) != OK)
     18455+       for (count = (tabsize - (win->_curx % tabsize)); count > 0; count--) {
     18456+           if ((code = _nc_insert_ch(sp, win, ' ')) != OK)
     18457                break;
     18458        }
     18459        break;
     18460@@ -76,7 +83,9 @@
     18461               WINDOW_EXT(win, addch_used) == 0 &&
     18462 #endif
     18463               is8bits(ChCharOf(ch)) &&
     18464-              isprint(ChCharOf(ch))) {
     18465+              (isprint(ChCharOf(ch)) ||
     18466+               (ChAttrOf(ch) & A_ALTCHARSET) ||
     18467+               (sp != 0 && sp->_legacy_coding && !iscntrl(ChCharOf(ch))))) {
     18468            if (win->_curx <= win->_maxx) {
     18469                struct ldat *line = &(win->_line[win->_cury]);
     18470                NCURSES_CH_T *end = &(line->text[win->_curx]);
     18471@@ -93,9 +102,9 @@
     18472                win->_curx++;
     18473            }
     18474        } else if (is8bits(ChCharOf(ch)) && iscntrl(ChCharOf(ch))) {
     18475-           s = unctrl(ChCharOf(ch));
     18476+           s = NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx ChCharOf(ch));
     18477            while (*s != '\0') {
     18478-               code = _nc_insert_ch(win, ChAttrOf(ch) | UChar(*s));
     18479+               code = _nc_insert_ch(sp, win, ChAttrOf(ch) | UChar(*s));
     18480                if (code != OK)
     18481                    break;
     18482                ++s;
     18483@@ -114,12 +123,17 @@
     18484            } else if (count == -1) {
     18485                /* handle EILSEQ */
     18486                if (is8bits(ch)) {
     18487-                   s = unctrl(ChCharOf(ch));
     18488-                   while (*s != '\0') {
     18489-                       code = _nc_insert_ch(win, ChAttrOf(ch) | UChar(*s));
     18490-                       if (code != OK)
     18491-                           break;
     18492-                       ++s;
     18493+                   s = NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx ChCharOf(ch));
     18494+                   if (strlen(s) > 1) {
     18495+                       while (*s != '\0') {
     18496+                           code = _nc_insert_ch(sp, win,
     18497+                                                ChAttrOf(ch) | UChar(*s));
     18498+                           if (code != OK)
     18499+                               break;
     18500+                           ++s;
     18501+                       }
     18502+                   } else {
     18503+                       code = ERR;
     18504                    }
     18505                } else {
     18506                    code = ERR;
     18507@@ -145,7 +159,7 @@
     18508        oy = win->_cury;
     18509        ox = win->_curx;
     18510 
     18511-       code = _nc_insert_ch(win, c);
     18512+       code = _nc_insert_ch(_nc_screen_of(win), win, c);
     18513 
     18514        win->_curx = ox;
     18515        win->_cury = oy;
     18516diff -Naur ncurses-5.7.orig/ncurses/base/lib_insnstr.c ncurses-5.7/ncurses/base/lib_insnstr.c
     18517--- ncurses-5.7.orig/ncurses/base/lib_insnstr.c 2004-02-28 15:44:56.000000000 -0800
     18518+++ ncurses-5.7/ncurses/base/lib_insnstr.c      2009-06-05 14:01:55.000000000 -0700
     18519@@ -1,5 +1,5 @@
     18520 /****************************************************************************
     18521- * Copyright (c) 2004 Free Software Foundation, Inc.                        *
     18522+ * Copyright (c) 2004,2009 Free Software Foundation, Inc.                   *
     18523  *                                                                          *
     18524  * Permission is hereby granted, free of charge, to any person obtaining a  *
     18525  * copy of this software and associated documentation files (the            *
     18526@@ -40,7 +40,7 @@
     18527 #include <curses.priv.h>
     18528 #include <ctype.h>
     18529 
     18530-MODULE_ID("$Id: lib_insnstr.c,v 1.1 2004/02/28 23:44:56 tom Exp $")
     18531+MODULE_ID("$Id: lib_insnstr.c,v 1.2 2009/05/30 14:53:49 tom Exp $")
     18532 
     18533 NCURSES_EXPORT(int)
     18534 winsnstr(WINDOW *win, const char *s, int n)
     18535@@ -54,10 +54,12 @@
     18536     T((T_CALLED("winsnstr(%p,%s,%d)"), win, _nc_visbufn(s, n), n));
     18537 
     18538     if (win != 0 && str != 0) {
     18539+       SCREEN *sp = _nc_screen_of(win);
     18540+
     18541        oy = win->_cury;
     18542        ox = win->_curx;
     18543        for (cp = str; *cp && (n <= 0 || (cp - str) < n); cp++) {
     18544-           _nc_insert_ch(win, (chtype) UChar(*cp));
     18545+           _nc_insert_ch(sp, win, (chtype) UChar(*cp));
     18546        }
     18547        win->_curx = ox;
     18548        win->_cury = oy;
    1676518549diff -Naur ncurses-5.7.orig/ncurses/base/lib_isendwin.c ncurses-5.7/ncurses/base/lib_isendwin.c
    1676618550--- ncurses-5.7.orig/ncurses/base/lib_isendwin.c        2000-12-09 18:43:27.000000000 -0800
    16767 +++ ncurses-5.7/ncurses/base/lib_isendwin.c     2009-03-22 21:17:05.643993853 -0700
     18551+++ ncurses-5.7/ncurses/base/lib_isendwin.c     2009-06-05 14:01:14.000000000 -0700
    1676818552@@ -1,5 +1,5 @@
    1676918553 /****************************************************************************
     
    1680918593diff -Naur ncurses-5.7.orig/ncurses/base/lib_mouse.c ncurses-5.7/ncurses/base/lib_mouse.c
    1681018594--- ncurses-5.7.orig/ncurses/base/lib_mouse.c   2008-10-18 14:48:55.000000000 -0700
    16811 +++ ncurses-5.7/ncurses/base/lib_mouse.c        2009-03-22 21:17:08.400170414 -0700
     18595+++ ncurses-5.7/ncurses/base/lib_mouse.c        2009-06-05 14:01:51.000000000 -0700
    1681218596@@ -1,5 +1,5 @@
    1681318597 /****************************************************************************
     
    1681718601  * Permission is hereby granted, free of charge, to any person obtaining a  *
    1681818602  * copy of this software and associated documentation files (the            *
    16819 @@ -79,9 +79,8 @@
     18603@@ -79,9 +79,12 @@
    1682018604 
    1682118605 #include <curses.priv.h>
    1682218606 
    1682318607-MODULE_ID("$Id: lib_mouse.c,v 1.102 2008/10/18 21:48:55 tom Exp $")
    16824 +MODULE_ID("$Id: lib_mouse.c,v 1.105 2009/02/28 21:09:20 tom Exp $")
     18608+#ifndef CUR
     18609+#define CUR SP_TERMTYPE
     18610+#endif
     18611+
     18612+MODULE_ID("$Id: lib_mouse.c,v 1.107 2009/05/10 00:48:29 tom Exp $")
    1682518613 
    1682618614-#include <term.h>
     
    1682818616 
    1682918617 #if USE_GPM_SUPPORT
    16830 @@ -150,7 +149,7 @@
     18618@@ -150,7 +153,7 @@
    1683118619 #define LIBGPM_SONAME "libgpm.so"
    1683218620 #endif
     
    1683718625 #endif                         /* USE_GPM_SUPPORT */
    1683818626 
    16839 @@ -164,13 +163,13 @@
     18627@@ -164,13 +167,13 @@
    1684018628 #define LastEV(sp)     ((sp)->_mouse_events + EV_MAX - 1)
    1684118629 
     
    1685518643 
    1685618644 #define IndexEV(sp, ep)        (ep - FirstEV(sp))
    16857 @@ -340,7 +339,7 @@
     18645@@ -340,7 +343,7 @@
    1685818646 static void
    1685918647 handle_sysmouse(int sig GCC_UNUSED)
     
    1686418652 #endif /* USE_SYSMOUSE */
    1686518653 
    16866 @@ -359,7 +358,9 @@
     18654@@ -359,7 +362,9 @@
    1686718655 #if USE_EMX_MOUSE
    1686818656     sp->_emxmouse_activated = enable;
     
    1687518663     sp->_mouse_active = enable;
    1687618664 }
    16877 @@ -398,7 +399,7 @@
     18665@@ -398,7 +403,7 @@
    1687818666 static void
    1687918667 unload_gpm_library(SCREEN *sp)
     
    1688418672        sp->_mouse_gpm_loaded = FALSE;
    1688518673        sp->_mouse_fd = -1;
    16886 @@ -694,11 +695,16 @@
     18674@@ -694,11 +699,16 @@
    1688718675 
    1688818676 #if USE_GPM_SUPPORT
     
    1690318691                eventp->id = NORMAL_EVENT;
    1690418692 
    16905 @@ -731,6 +737,7 @@
     18693@@ -731,6 +741,7 @@
    1690618694                /* bump the next-free pointer into the circular list */
    1690718695                sp->_mouse_eventp = eventp = NEXT(eventp);
     
    1691118699        }
    1691218700        break;
    16913 @@ -937,7 +944,7 @@
     18701@@ -937,7 +948,7 @@
    1691418702        switch (sp->_mouse_type) {
    1691518703        case M_XTERM:
     
    1692018708            TPUTS_TRACE("xterm mouse initialization");
    1692118709            enable_xterm_mouse(sp, 1);
    16922 @@ -989,7 +996,7 @@
     18710@@ -989,7 +1000,7 @@
    1692318711            return;
    1692418712        }
     
    1692918717 
    1693018718 /**************************************************************************
    16931 @@ -1264,13 +1271,13 @@
     18719@@ -1264,13 +1275,13 @@
    1693218720  *
    1693318721  **************************************************************************/
     
    1694818736        MEVENT *prev = PREV(eventp);
    1694918737 
    16950 @@ -1278,8 +1285,8 @@
     18738@@ -1278,8 +1289,8 @@
    1695118739        *aevent = *prev;
    1695218740 
     
    1695918747        prev->id = INVALID_EVENT;       /* so the queue slot becomes free */
    1696018748        returnCode(OK);
    16961 @@ -1287,57 +1294,61 @@
     18749@@ -1287,57 +1298,61 @@
    1696218750     returnCode(ERR);
    1696318751 }
     
    1703718825                    (REPORT_MOUSE_POSITION
    1703818826                     | BUTTON_ALT
    17039 @@ -1349,15 +1360,23 @@
     18827@@ -1349,15 +1364,23 @@
    1704018828                     | BUTTON_DOUBLE_CLICKED
    1704118829                     | BUTTON_TRIPLE_CLICKED);
     
    1706318851 wenclose(const WINDOW *win, int y, int x)
    1706418852 /* check to see if given window encloses given screen location */
    17065 @@ -1377,17 +1396,17 @@
     18853@@ -1377,17 +1400,17 @@
    1706618854 }
    1706718855 
     
    1708618874        oldval = DEFAULT_MAXCLICK;
    1708718875     }
    17088 @@ -1395,15 +1414,37 @@
     18876@@ -1395,15 +1418,37 @@
    1708918877     returnCode(oldval);
    1709018878 }
     
    1712718915 {
    1712818916     bool result = FALSE;
     18917diff -Naur ncurses-5.7.orig/ncurses/base/lib_mvwin.c ncurses-5.7/ncurses/base/lib_mvwin.c
     18918--- ncurses-5.7.orig/ncurses/base/lib_mvwin.c   2006-02-25 14:53:46.000000000 -0800
     18919+++ ncurses-5.7/ncurses/base/lib_mvwin.c        2009-06-05 14:01:44.000000000 -0700
     18920@@ -1,5 +1,5 @@
     18921 /****************************************************************************
     18922- * Copyright (c) 1998-2001,2006 Free Software Foundation, Inc.              *
     18923+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
     18924  *                                                                          *
     18925  * Permission is hereby granted, free of charge, to any person obtaining a  *
     18926  * copy of this software and associated documentation files (the            *
     18927@@ -40,7 +40,7 @@
     18928 
     18929 #include <curses.priv.h>
     18930 
     18931-MODULE_ID("$Id: lib_mvwin.c,v 1.14 2006/02/25 22:53:46 tom Exp $")
     18932+MODULE_ID("$Id: lib_mvwin.c,v 1.15 2009/04/18 18:25:37 tom Exp $")
     18933 
     18934 NCURSES_EXPORT(int)
     18935 mvwin(WINDOW *win, int by, int bx)
     18936@@ -96,8 +96,8 @@
     18937     }
     18938 #endif
     18939 
     18940-    if (by + win->_maxy > screen_lines - 1
     18941-       || bx + win->_maxx > screen_columns - 1
     18942+    if (by + win->_maxy > screen_lines(CURRENT_SCREEN) - 1
     18943+       || bx + win->_maxx > screen_columns(CURRENT_SCREEN) - 1
     18944        || by < 0
     18945        || bx < 0)
     18946        returnCode(ERR);
    1712918947diff -Naur ncurses-5.7.orig/ncurses/base/lib_newterm.c ncurses-5.7/ncurses/base/lib_newterm.c
    1713018948--- ncurses-5.7.orig/ncurses/base/lib_newterm.c 2008-08-16 14:20:48.000000000 -0700
    17131 +++ ncurses-5.7/ncurses/base/lib_newterm.c      2009-03-22 21:17:05.643993853 -0700
     18949+++ ncurses-5.7/ncurses/base/lib_newterm.c      2009-06-05 14:01:51.000000000 -0700
    1713218950@@ -1,5 +1,5 @@
    1713318951 /****************************************************************************
     
    1714518963 
    1714618964 /*
    17147 @@ -48,7 +49,7 @@
     18965@@ -45,10 +46,14 @@
     18966 #define _POSIX_SOURCE
     18967 #endif
     18968 
     18969+#ifndef CUR
     18970+#define CUR SP_TERMTYPE
     18971+#endif
     18972+
    1714818973 #include <term.h>              /* clear_screen, cup & friends, cur_term */
    1714918974 #include <tic.h>
    1715018975 
    1715118976-MODULE_ID("$Id: lib_newterm.c,v 1.73 2008/08/16 21:20:48 Werner.Fink Exp $")
    17152 +MODULE_ID("$Id: lib_newterm.c,v 1.74 2009/02/15 00:37:10 tom Exp $")
     18977+MODULE_ID("$Id: lib_newterm.c,v 1.77 2009/05/10 00:48:29 tom Exp $")
    1715318978 
    1715418979 #ifndef ONLCR                  /* Allows compilation under the QNX 4.2 OS */
    1715518980 #define ONLCR 0
    17156 @@ -95,7 +96,7 @@
     18981@@ -95,7 +100,7 @@
    1715718982  * initialized.
    1715818983  */
     
    1716318988     START_TRACE();
    1716418989     T((T_CALLED("filter")));
    17165 @@ -103,23 +104,40 @@
     18990@@ -103,23 +108,42 @@
    1716618991     returnVoid;
    1716718992 }
     
    1720119026 NCURSES_EXPORT(SCREEN *)
    1720219027-newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp)
    17203 +NCURSES_SP_NAME(newterm) (NCURSES_SP_DCLx NCURSES_CONST char *name, FILE
    17204 +                         *ofp, FILE *ifp)
     19028+NCURSES_SP_NAME(newterm) (NCURSES_SP_DCLx
     19029+                         NCURSES_CONST char *name,
     19030+                         FILE *ofp,
     19031+                         FILE *ifp)
    1720519032 {
    1720619033     int value;
    1720719034     int errret;
    17208 @@ -133,8 +151,8 @@
     19035@@ -133,8 +157,8 @@
    1720919036     _nc_init_pthreads();
    1721019037     _nc_lock_global(curses);
     
    1721719044     /* this loads the capability entry, then sets LINES and COLS */
    1721819045     if (setupterm(name, fileno(ofp), &errret) != ERR) {
    17219 @@ -159,7 +177,7 @@
     19046@@ -159,7 +183,7 @@
    1722019047            _nc_set_screen(current);
    1722119048            result = 0;
     
    1722619053             * In setupterm() we did a set_curterm(), but it was before we set
    1722719054             * SP.  So the "current" screen's terminal pointer was overwritten
    17228 @@ -233,3 +251,11 @@
     19055@@ -233,3 +257,11 @@
    1722919056     _nc_unlock_global(curses);
    1723019057     returnSP(result);
     
    1724019067diff -Naur ncurses-5.7.orig/ncurses/base/lib_newwin.c ncurses-5.7/ncurses/base/lib_newwin.c
    1724119068--- ncurses-5.7.orig/ncurses/base/lib_newwin.c  2008-06-07 06:58:09.000000000 -0700
    17242 +++ ncurses-5.7/ncurses/base/lib_newwin.c       2009-03-22 21:17:05.643993853 -0700
     19069+++ ncurses-5.7/ncurses/base/lib_newwin.c       2009-06-05 14:01:51.000000000 -0700
    1724319070@@ -1,5 +1,5 @@
    1724419071 /****************************************************************************
     
    1726119088 
    1726219089-MODULE_ID("$Id: lib_newwin.c,v 1.52 2008/06/07 13:58:09 tom Exp $")
    17263 +MODULE_ID("$Id: lib_newwin.c,v 1.53 2009/02/15 00:38:00 tom Exp $")
     19090+MODULE_ID("$Id: lib_newwin.c,v 1.57 2009/05/09 23:40:03 tom Exp $")
    1726419091 
    1726519092 #define window_is(name) ((sp)->_##name == win)
     19093 
     19094@@ -87,11 +88,11 @@
     19095     if (win != 0) {
     19096        if (_nc_try_global(curses) == 0) {
     19097            q = 0;
     19098-           for (each_window(p)) {
     19099+           for (each_window(SP, p)) {
     19100                if (&(p->win) == win) {
     19101                    remove_window_from_screen(win);
     19102                    if (q == 0)
     19103-                       _nc_windows = p->next;
     19104+                       WindowList(SP) = p->next;
     19105                    else
     19106                        q->next = p->next;
    1726619107 
    1726719108@@ -115,7 +116,8 @@
     
    1727519116     WINDOW *win;
    1727619117     NCURSES_CH_T *ptr;
    17277 @@ -127,7 +129,7 @@
     19118@@ -127,11 +129,13 @@
    1727819119        returnWin(0);
    1727919120 
     
    1728219123+       num_lines = SP_PARM->_lines_avail - begy;
    1728319124     if (num_columns == 0)
    17284         num_columns = screen_columns - begx;
    17285  
    17286 @@ -149,6 +151,15 @@
     19125-       num_columns = screen_columns - begx;
     19126+       num_columns = screen_columns(SP_PARM) - begx;
     19127 
     19128-    if ((win = _nc_makenew(num_lines, num_columns, begy, begx, 0)) == 0)
     19129+    win = NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_ARGx
     19130+                                       num_lines, num_columns, begy, begx, 0);
     19131+    if (win == 0)
     19132        returnWin(0);
     19133 
     19134     for (i = 0; i < num_lines; i++) {
     19135@@ -149,9 +153,22 @@
    1728719136     returnWin(win);
    1728819137 }
     
    1729219141+newwin(int num_lines, int num_columns, int begy, int begx)
    1729319142+{
    17294 +    return NCURSES_SP_NAME(newwin) (CURRENT_SCREEN, num_lines, num_columns,
     19143+    return NCURSES_SP_NAME(newwin) (CURRENT_SCREEN,
     19144+                                   num_lines, num_columns,
    1729519145+                                   begy, begx);
    1729619146+}
     
    1730019150 derwin(WINDOW *orig, int num_lines, int num_columns, int begy, int begx)
    1730119151 {
     19152+#if NCURSES_SP_FUNCS
     19153+    SCREEN *sp = CURRENT_SCREEN;
     19154+#endif
     19155     WINDOW *win;
     19156     int i;
     19157     int flags = _SUBWIN;
     19158@@ -177,8 +194,10 @@
     19159     if (orig->_flags & _ISPAD)
     19160        flags |= _ISPAD;
     19161 
     19162-    if ((win = _nc_makenew(num_lines, num_columns, orig->_begy + begy,
     19163-                          orig->_begx + begx, flags)) == 0)
     19164+    win = NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_ARGx num_lines, num_columns,
     19165+                                       orig->_begy + begy,
     19166+                                       orig->_begx + begx, flags);
     19167+    if (win == 0)
     19168        returnWin(0);
     19169 
     19170     win->_pary = begy;
     19171@@ -211,16 +230,22 @@
     19172 }
     19173 
     19174 NCURSES_EXPORT(WINDOW *)
     19175-_nc_makenew(int num_lines, int num_columns, int begy, int begx, int flags)
     19176+NCURSES_SP_NAME(_nc_makenew) (NCURSES_SP_DCLx
     19177+                             int num_lines,
     19178+                             int num_columns,
     19179+                             int begy,
     19180+                             int begx,
     19181+                             int flags)
     19182 {
     19183     int i;
     19184     WINDOWLIST *wp;
     19185     WINDOW *win;
     19186     bool is_pad = (flags & _ISPAD);
     19187 
     19188-    T((T_CALLED("_nc_makenew(%d,%d,%d,%d)"), num_lines, num_columns, begy, begx));
     19189+    T((T_CALLED("_nc_makenew(%p,%d,%d,%d,%d)"),
     19190+       SP_PARM, num_lines, num_columns, begy, begx));
     19191 
     19192-    if (SP == 0)
     19193+    if (SP_PARM == 0)
     19194        returnWin(0);
     19195 
     19196     if (!dimension_limit(num_lines) || !dimension_limit(num_columns))
     19197@@ -244,14 +269,16 @@
     19198     win->_maxx = num_columns - 1;
     19199     win->_begy = begy;
     19200     win->_begx = begx;
     19201-    win->_yoffset = SP->_topstolen;
     19202+    win->_yoffset = SP_PARM->_topstolen;
     19203 
     19204     win->_flags = flags;
     19205     WINDOW_ATTRS(win) = A_NORMAL;
     19206     SetChar(win->_nc_bkgd, BLANK_TEXT, BLANK_ATTR);
     19207 
     19208-    win->_clear = is_pad ? FALSE : (num_lines == screen_lines
     19209-                                   && num_columns == screen_columns);
     19210+    win->_clear = (is_pad
     19211+                  ? FALSE
     19212+                  : (num_lines == screen_lines(SP_PARM)
     19213+                     && num_columns == screen_columns(SP_PARM)));
     19214     win->_idlok = FALSE;
     19215     win->_idcok = TRUE;
     19216     win->_scroll = FALSE;
     19217@@ -300,19 +327,19 @@
     19218        if_USE_SCROLL_HINTS(win->_line[i].oldindex = i);
     19219     }
     19220 
     19221-    if (!is_pad && (begx + num_columns == screen_columns)) {
     19222+    if (!is_pad && (begx + num_columns == screen_columns(SP_PARM))) {
     19223        win->_flags |= _ENDLINE;
     19224 
     19225-       if (begx == 0 && num_lines == screen_lines && begy == 0)
     19226+       if (begx == 0 && num_lines == screen_lines(SP_PARM) && begy == 0)
     19227            win->_flags |= _FULLWIN;
     19228 
     19229-       if (begy + num_lines == screen_lines)
     19230+       if (begy + num_lines == screen_lines(SP_PARM))
     19231            win->_flags |= _SCROLLWIN;
     19232     }
     19233 
     19234-    wp->next = _nc_windows;
     19235-    wp->screen = SP;
     19236-    _nc_windows = wp;
     19237+    wp->next = WindowList(SP_PARM);
     19238+    wp->screen = SP_PARM;
     19239+    WindowList(SP_PARM) = wp;
     19240 
     19241     T((T_CREATE("window %p"), win));
     19242 
     19243@@ -320,6 +347,16 @@
     19244     returnWin(win);
     19245 }
     19246 
     19247+#if NCURSES_SP_FUNCS
     19248+NCURSES_EXPORT(WINDOW *)
     19249+_nc_makenew(int num_lines, int num_columns, int begy, int begx, int flags)
     19250+{
     19251+    return NCURSES_SP_NAME(_nc_makenew) (CURRENT_SCREEN,
     19252+                                        num_lines, num_columns,
     19253+                                        begy, begx, flags);
     19254+}
     19255+#endif
     19256+
     19257 /*
     19258  * wgetch() and other functions with a WINDOW* parameter may use a SCREEN*
     19259  * internally, and it is useful to allow those to be invoked without switching
     19260@@ -336,3 +373,23 @@
     19261     }
     19262     return (sp);
     19263 }
     19264+
     19265+#if NCURSES_SP_FUNCS
     19266+NCURSES_EXPORT(WINDOW *)
     19267+_nc_curscr_of(SCREEN *sp)
     19268+{
     19269+    return sp == 0 ? 0 : sp->_curscr;
     19270+}
     19271+
     19272+NCURSES_EXPORT(WINDOW *)
     19273+_nc_newscr_of(SCREEN *sp)
     19274+{
     19275+    return sp == 0 ? 0 : sp->_newscr;
     19276+}
     19277+
     19278+NCURSES_EXPORT(WINDOW *)
     19279+_nc_stdscr_of(SCREEN *sp)
     19280+{
     19281+    return sp == 0 ? 0 : sp->_stdscr;
     19282+}
     19283+#endif
    1730219284diff -Naur ncurses-5.7.orig/ncurses/base/lib_nl.c ncurses-5.7/ncurses/base/lib_nl.c
    1730319285--- ncurses-5.7.orig/ncurses/base/lib_nl.c      2000-12-09 18:43:27.000000000 -0800
    17304 +++ ncurses-5.7/ncurses/base/lib_nl.c   2009-03-22 21:17:07.012081575 -0700
     19286+++ ncurses-5.7/ncurses/base/lib_nl.c   2009-06-05 14:01:16.000000000 -0700
    1730519287@@ -1,5 +1,5 @@
    1730619288 /****************************************************************************
     
    1738619368diff -Naur ncurses-5.7.orig/ncurses/base/lib_pad.c ncurses-5.7/ncurses/base/lib_pad.c
    1738719369--- ncurses-5.7.orig/ncurses/base/lib_pad.c     2006-10-14 13:47:13.000000000 -0700
    17388 +++ ncurses-5.7/ncurses/base/lib_pad.c  2009-03-22 21:17:05.643993853 -0700
     19370+++ ncurses-5.7/ncurses/base/lib_pad.c  2009-06-05 14:01:44.000000000 -0700
    1738919371@@ -1,5 +1,5 @@
    1739019372 /****************************************************************************
    1739119373- * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc.                   *
    17392 + * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.                   *
     19374+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
    1739319375  *                                                                          *
    1739419376  * Permission is hereby granted, free of charge, to any person obtaining a  *
     
    1740819390 
    1740919391-MODULE_ID("$Id: lib_pad.c,v 1.41 2006/10/14 20:47:13 tom Exp $")
    17410 +MODULE_ID("$Id: lib_pad.c,v 1.42 2009/02/15 00:38:48 tom Exp $")
     19392+MODULE_ID("$Id: lib_pad.c,v 1.43 2009/04/18 18:25:37 tom Exp $")
    1741119393 
    1741219394 NCURSES_EXPORT(WINDOW *)
     
    1743119413 subpad(WINDOW *orig, int l, int c, int begy, int begx)
    1743219414 {
    17433 diff -Naur ncurses-5.7.orig/ncurses/base/lib_screen.c ncurses-5.7/ncurses/base/lib_screen.c
    17434 --- ncurses-5.7.orig/ncurses/base/lib_screen.c  2008-08-16 12:05:37.000000000 -0700
    17435 +++ ncurses-5.7/ncurses/base/lib_screen.c       2009-03-22 21:17:05.647994412 -0700
     19415@@ -162,8 +172,8 @@
     19416        pmaxcol = pmincol + smaxcol - smincol;
     19417     }
     19418 
     19419-    if (smaxrow >= screen_lines
     19420-       || smaxcol >= screen_columns
     19421+    if (smaxrow >= screen_lines(CURRENT_SCREEN)
     19422+       || smaxcol >= screen_columns(CURRENT_SCREEN)
     19423        || sminrow > smaxrow
     19424        || smincol > smaxcol)
     19425        returnCode(ERR);
     19426diff -Naur ncurses-5.7.orig/ncurses/base/lib_printw.c ncurses-5.7/ncurses/base/lib_printw.c
     19427--- ncurses-5.7.orig/ncurses/base/lib_printw.c  2006-12-17 11:21:39.000000000 -0800
     19428+++ ncurses-5.7/ncurses/base/lib_printw.c       2009-06-05 14:01:44.000000000 -0700
     19429@@ -1,5 +1,5 @@
     19430 /****************************************************************************
     19431- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc.              *
     19432+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
     19433  *                                                                          *
     19434  * Permission is hereby granted, free of charge, to any person obtaining a  *
     19435  * copy of this software and associated documentation files (the            *
     19436@@ -39,7 +39,7 @@
     19437 
     19438 #include <curses.priv.h>
     19439 
     19440-MODULE_ID("$Id: lib_printw.c,v 1.18 2006/12/17 19:21:39 tom Exp $")
     19441+MODULE_ID("$Id: lib_printw.c,v 1.19 2009/04/18 18:45:55 tom Exp $")
     19442 
     19443 NCURSES_EXPORT(int)
     19444 printw(const char *fmt,...)
     19445@@ -128,10 +128,14 @@
     19446 {
     19447     char *buf;
     19448     int code = ERR;
     19449+#if NCURSES_SP_FUNCS
     19450+    SCREEN *sp = _nc_screen_of(win);
     19451+#endif
     19452 
     19453     T((T_CALLED("vwprintw(%p,%s,va_list)"), win, _nc_visbuf(fmt)));
     19454 
     19455-    if ((buf = _nc_printf_string(fmt, argp)) != 0) {
     19456+    buf = NCURSES_SP_NAME(_nc_printf_string) (NCURSES_SP_ARGx fmt, argp);
     19457+    if (buf != 0) {
     19458        code = waddstr(win, buf);
     19459     }
     19460     returnCode(code);
     19461diff -Naur ncurses-5.7.orig/ncurses/base/lib_redrawln.c ncurses-5.7/ncurses/base/lib_redrawln.c
     19462--- ncurses-5.7.orig/ncurses/base/lib_redrawln.c        2007-10-13 13:08:56.000000000 -0700
     19463+++ ncurses-5.7/ncurses/base/lib_redrawln.c     2009-06-05 14:01:44.000000000 -0700
     19464@@ -1,5 +1,5 @@
     19465 /****************************************************************************
     19466- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
     19467+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
     19468  *                                                                          *
     19469  * Permission is hereby granted, free of charge, to any person obtaining a  *
     19470  * copy of this software and associated documentation files (the            *
     19471@@ -39,7 +39,7 @@
     19472 
     19473 #include <curses.priv.h>
     19474 
     19475-MODULE_ID("$Id: lib_redrawln.c,v 1.12 2007/10/13 20:08:56 tom Exp $")
     19476+MODULE_ID("$Id: lib_redrawln.c,v 1.13 2009/04/18 18:46:00 tom Exp $")
     19477 
     19478 NCURSES_EXPORT(int)
     19479 wredrawln(WINDOW *win, int beg, int num)
     19480@@ -47,37 +47,40 @@
     19481     int i;
     19482     int end;
     19483     size_t len;
     19484+    SCREEN *sp;
     19485 
     19486     T((T_CALLED("wredrawln(%p,%d,%d)"), win, beg, num));
     19487 
     19488     if (win == 0)
     19489        returnCode(ERR);
     19490 
     19491+    sp = _nc_screen_of(win);
     19492+
     19493     if (beg < 0)
     19494        beg = 0;
     19495 
     19496     if (touchline(win, beg, num) == ERR)
     19497        returnCode(ERR);
     19498 
     19499-    if (touchline(curscr, beg + win->_begy, num) == ERR)
     19500+    if (touchline(sp->_curscr, beg + win->_begy, num) == ERR)
     19501        returnCode(ERR);
     19502 
     19503     end = beg + num;
     19504-    if (end > curscr->_maxy + 1)
     19505-       end = curscr->_maxy + 1;
     19506+    if (end > sp->_curscr->_maxy + 1)
     19507+       end = sp->_curscr->_maxy + 1;
     19508     if (end > win->_maxy + 1)
     19509        end = win->_maxy + 1;
     19510 
     19511     len = (win->_maxx + 1);
     19512-    if (len > (size_t) (curscr->_maxx + 1))
     19513-       len = (size_t) (curscr->_maxx + 1);
     19514-    len *= sizeof(curscr->_line[0].text[0]);
     19515+    if (len > (size_t) (sp->_curscr->_maxx + 1))
     19516+       len = (size_t) (sp->_curscr->_maxx + 1);
     19517+    len *= sizeof(sp->_curscr->_line[0].text[0]);
     19518 
     19519     for (i = beg; i < end; i++) {
     19520        int crow = i + win->_begy;
     19521 
     19522-       memset(curscr->_line[crow].text + win->_begx, 0, len);
     19523-       _nc_make_oldhash(crow);
     19524+       memset(sp->_curscr->_line[crow].text + win->_begx, 0, len);
     19525+       NCURSES_SP_NAME(_nc_make_oldhash) (NCURSES_SP_ARGx crow);
     19526     }
     19527 
     19528     returnCode(OK);
     19529diff -Naur ncurses-5.7.orig/ncurses/base/lib_restart.c ncurses-5.7/ncurses/base/lib_restart.c
     19530--- ncurses-5.7.orig/ncurses/base/lib_restart.c 2008-06-21 10:31:22.000000000 -0700
     19531+++ ncurses-5.7/ncurses/base/lib_restart.c      2009-06-05 14:01:49.000000000 -0700
    1743619532@@ -1,5 +1,5 @@
    1743719533 /****************************************************************************
     
    1744119537  * Permission is hereby granted, free of charge, to any person obtaining a  *
    1744219538  * copy of this software and associated documentation files (the            *
    17443 @@ -30,11 +30,12 @@
     19539@@ -30,6 +30,7 @@
     19540  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
     19541  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
     19542  *     and: Thomas E. Dickey                        1996-on                 *
     19543+ *     and: Juergen Pfeifer                         2008                    *
     19544  ****************************************************************************/
     19545 
     19546 /*
     19547@@ -44,49 +45,52 @@
     19548 #define _POSIX_SOURCE
     19549 #endif
     19550 
     19551-#include <term.h>              /* lines, columns, cur_term */
     19552-
     19553-MODULE_ID("$Id: lib_restart.c,v 1.10 2008/06/21 17:31:22 tom Exp $")
     19554+MODULE_ID("$Id: lib_restart.c,v 1.11 2009/05/02 20:47:42 tom Exp $")
     19555 
     19556 NCURSES_EXPORT(int)
     19557-restartterm(NCURSES_CONST char *termp, int filenum, int *errret)
     19558+NCURSES_SP_NAME(restartterm) (NCURSES_SP_DCLx
     19559+                             NCURSES_CONST char *termp,
     19560+                             int filenum,
     19561+                             int *errret)
     19562 {
     19563     int result;
     19564 
     19565-    T((T_CALLED("restartterm(%s,%d,%p)"), termp, filenum, errret));
     19566+    T((T_CALLED("restartterm(%p,%s,%d,%p)"), SP_PARM, termp, filenum, errret));
     19567 
     19568     if (setupterm(termp, filenum, errret) != OK) {
     19569        result = ERR;
     19570-    } else if (SP != 0) {
     19571-       int saveecho = SP->_echo;
     19572-       int savecbreak = SP->_cbreak;
     19573-       int saveraw = SP->_raw;
     19574-       int savenl = SP->_nl;
     19575-
     19576-       if (saveecho)
     19577-           echo();
     19578-       else
     19579-           noecho();
     19580+    } else if (SP_PARM != 0) {
     19581+       int saveecho = SP_PARM->_echo;
     19582+       int savecbreak = SP_PARM->_cbreak;
     19583+       int saveraw = SP_PARM->_raw;
     19584+       int savenl = SP_PARM->_nl;
     19585+
     19586+       if (saveecho) {
     19587+           NCURSES_SP_NAME(echo) (NCURSES_SP_ARG);
     19588+       } else {
     19589+           NCURSES_SP_NAME(noecho) (NCURSES_SP_ARG);
     19590+       }
     19591 
     19592        if (savecbreak) {
     19593-           cbreak();
     19594-           noraw();
     19595+           NCURSES_SP_NAME(cbreak) (NCURSES_SP_ARG);
     19596+           NCURSES_SP_NAME(noraw) (NCURSES_SP_ARG);
     19597        } else if (saveraw) {
     19598-           nocbreak();
     19599-           raw();
     19600+           NCURSES_SP_NAME(nocbreak) (NCURSES_SP_ARG);
     19601+           NCURSES_SP_NAME(raw) (NCURSES_SP_ARG);
     19602+       } else {
     19603+           NCURSES_SP_NAME(nocbreak) (NCURSES_SP_ARG);
     19604+           NCURSES_SP_NAME(noraw) (NCURSES_SP_ARG);
     19605+       }
     19606+       if (savenl) {
     19607+           NCURSES_SP_NAME(nl) (NCURSES_SP_ARG);
     19608        } else {
     19609-           nocbreak();
     19610-           noraw();
     19611+           NCURSES_SP_NAME(nonl) (NCURSES_SP_ARG);
     19612        }
     19613-       if (savenl)
     19614-           nl();
     19615-       else
     19616-           nonl();
     19617 
     19618-       reset_prog_mode();
     19619+       NCURSES_SP_NAME(reset_prog_mode) (NCURSES_SP_ARG);
     19620 
     19621 #if USE_SIZECHANGE
     19622-       _nc_update_screensize(SP);
     19623+       _nc_update_screensize(SP_PARM);
     19624 #endif
     19625 
     19626        result = OK;
     19627@@ -95,3 +99,11 @@
     19628     }
     19629     returnCode(result);
     19630 }
     19631+
     19632+#if NCURSES_SP_FUNCS
     19633+NCURSES_EXPORT(int)
     19634+restartterm(NCURSES_CONST char *termp, int filenum, int *errret)
     19635+{
     19636+    return NCURSES_SP_NAME(restartterm) (CURRENT_SCREEN, termp, filenum, errret);
     19637+}
     19638+#endif
     19639diff -Naur ncurses-5.7.orig/ncurses/base/lib_screen.c ncurses-5.7/ncurses/base/lib_screen.c
     19640--- ncurses-5.7.orig/ncurses/base/lib_screen.c  2008-08-16 12:05:37.000000000 -0700
     19641+++ ncurses-5.7/ncurses/base/lib_screen.c       2009-06-05 14:01:51.000000000 -0700
     19642@@ -1,5 +1,5 @@
     19643 /****************************************************************************
     19644- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     19645+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     19646  *                                                                          *
     19647  * Permission is hereby granted, free of charge, to any person obtaining a  *
     19648  * copy of this software and associated documentation files (the            *
     19649@@ -30,11 +30,16 @@
    1744419650  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
    1744519651  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
     
    1745119657 
    1745219658-MODULE_ID("$Id: lib_screen.c,v 1.31 2008/08/16 19:05:37 tom Exp $")
    17453 +MODULE_ID("$Id: lib_screen.c,v 1.32 2009/02/15 00:39:13 tom Exp $")
     19659+#ifndef CUR
     19660+#define CUR SP_TERMTYPE
     19661+#endif
     19662+
     19663+MODULE_ID("$Id: lib_screen.c,v 1.34 2009/05/10 00:48:29 tom Exp $")
    1745419664 
    1745519665 #define MAX_SIZE 0x3fff                /* 16k is big enough for a window or pad */
    1745619666 
    17457 @@ -141,7 +142,7 @@
     19667@@ -141,7 +146,7 @@
    1745819668 }
    1745919669 
     
    1746419674     FILE *fp = 0;
    1746519675 
    17466 @@ -152,15 +153,23 @@
     19676@@ -152,15 +157,23 @@
    1746719677        returnCode(ERR);
    1746819678     } else {
     
    1749019700 scr_dump(const char *file)
    1749119701 {
    17492 @@ -179,7 +188,7 @@
     19702@@ -179,7 +192,7 @@
    1749319703 }
    1749419704 
     
    1749919709     FILE *fp = 0;
    1750019710 
    17501 @@ -193,17 +202,25 @@
     19711@@ -193,17 +206,25 @@
    1750219712        returnCode(ERR);
    1750319713     } else {
     
    1752819738     T((T_CALLED("scr_set(%s)"), _nc_visbuf(file)));
    1752919739 
    17530 @@ -211,10 +228,18 @@
     19740@@ -211,10 +232,18 @@
    1753119741        returnCode(ERR);
    1753219742     } else {
     
    1755119761diff -Naur ncurses-5.7.orig/ncurses/base/lib_set_term.c ncurses-5.7/ncurses/base/lib_set_term.c
    1755219762--- ncurses-5.7.orig/ncurses/base/lib_set_term.c        2008-08-04 11:11:12.000000000 -0700
    17553 +++ ncurses-5.7/ncurses/base/lib_set_term.c     2009-03-22 21:17:05.647994412 -0700
     19763+++ ncurses-5.7/ncurses/base/lib_set_term.c     2009-06-05 14:01:51.000000000 -0700
    1755419764@@ -1,5 +1,5 @@
    1755519765 /****************************************************************************
     
    1756719777 
    1756819778 /*
    17569 @@ -44,7 +45,7 @@
     19779@@ -44,7 +45,11 @@
    1757019780 #include <term.h>              /* cur_term */
    1757119781 #include <tic.h>
    1757219782 
    1757319783-MODULE_ID("$Id: lib_set_term.c,v 1.117 2008/08/04 18:11:12 tom Exp $")
    17574 +MODULE_ID("$Id: lib_set_term.c,v 1.118 2009/02/15 00:39:46 tom Exp $")
     19784+#ifndef CUR
     19785+#define CUR SP_TERMTYPE
     19786+#endif
     19787+
     19788+MODULE_ID("$Id: lib_set_term.c,v 1.122 2009/05/10 00:48:29 tom Exp $")
    1757519789 
    1757619790 NCURSES_EXPORT(SCREEN *)
    1757719791 set_term(SCREEN *screenp)
    17578 @@ -635,7 +636,9 @@
     19792@@ -256,6 +261,9 @@
     19793                bool filtered,
     19794                int slk_format)
     19795 {
     19796+#if NCURSES_SP_FUNCS
     19797+    SCREEN *sp = CURRENT_SCREEN;
     19798+#endif
     19799     char *env;
     19800     int bottom_stolen = 0;
     19801     bool support_cookies = USE_XMC_SUPPORT;
     19802@@ -555,8 +563,8 @@
     19803     def_shell_mode();
     19804     def_prog_mode();
     19805 
     19806-    for (rop = ripoff_stack;
     19807-        rop != ripoff_sp && (rop - ripoff_stack) < N_RIPS;
     19808+    for (rop = safe_ripoff_stack;
     19809+        rop != safe_ripoff_sp && (rop - safe_ripoff_stack) < N_RIPS;
     19810         rop++) {
     19811 
     19812        /* If we must simulate soft labels, grab off the line to be used.
     19813@@ -595,7 +603,7 @@
     19814        }
     19815     }
     19816     /* reset the stack */
     19817-    ripoff_sp = ripoff_stack;
     19818+    safe_ripoff_sp = safe_ripoff_stack;
     19819 
     19820     T(("creating stdscr"));
     19821     assert((SP->_lines_avail + SP->_topstolen + bottom_stolen) == slines);
     19822@@ -615,27 +623,39 @@
     19823  * off from the top or bottom.
     19824  */
     19825 NCURSES_EXPORT(int)
     19826-_nc_ripoffline(int line, int (*init) (WINDOW *, int))
     19827+NCURSES_SP_NAME(_nc_ripoffline) (NCURSES_SP_DCLx
     19828+                                int line,
     19829+                                int (*init) (WINDOW *, int))
     19830 {
     19831     T((T_CALLED("_nc_ripoffline(%d, %p)"), line, init));
     19832 
     19833     if (line != 0) {
     19834 
     19835-       if (ripoff_sp == 0)
     19836-           ripoff_sp = ripoff_stack;
     19837-       if (ripoff_sp >= ripoff_stack + N_RIPS)
     19838+       if (safe_ripoff_sp == 0)
     19839+           safe_ripoff_sp = safe_ripoff_stack;
     19840+       if (safe_ripoff_sp >= safe_ripoff_stack + N_RIPS)
     19841            returnCode(ERR);
     19842 
     19843-       ripoff_sp->line = line;
     19844-       ripoff_sp->hook = init;
     19845-       ripoff_sp++;
     19846+       safe_ripoff_sp->line = line;
     19847+       safe_ripoff_sp->hook = init;
     19848+       safe_ripoff_sp++;
     19849     }
     19850 
     19851     returnCode(OK);
    1757919852 }
    1758019853 
     19854+#if NCURSES_SP_FUNCS
    1758119855 NCURSES_EXPORT(int)
    1758219856-ripoffline(int line, int (*init) (WINDOW *, int))
     19857+_nc_ripoffline(int line, int (*init) (WINDOW *, int))
     19858+{
     19859+    return NCURSES_SP_NAME(_nc_ripoffline) (CURRENT_SCREEN, line, init);
     19860+}
     19861+#endif
     19862+
     19863+NCURSES_EXPORT(int)
    1758319864+NCURSES_SP_NAME(ripoffline) (NCURSES_SP_DCLx
    1758419865+                            int line,
     
    1758719868     START_TRACE();
    1758819869     T((T_CALLED("ripoffline(%d,%p)"), line, init));
    17589 @@ -645,3 +648,11 @@
    17590  
    17591      returnCode(_nc_ripoffline((line < 0) ? -1 : 1, init));
    17592  }
     19870@@ -643,5 +663,15 @@
     19871     if (line == 0)
     19872        returnCode(OK);
     19873 
     19874-    returnCode(_nc_ripoffline((line < 0) ? -1 : 1, init));
     19875+    returnCode(NCURSES_SP_NAME(_nc_ripoffline) (NCURSES_SP_ARGx
     19876+                                               (line < 0) ? -1 : 1,
     19877+                                               init));
     19878+}
    1759319879+
    1759419880+#if NCURSES_SP_FUNCS
     
    1759719883+{
    1759819884+    return NCURSES_SP_NAME(ripoffline) (CURRENT_SCREEN, line, init);
    17599 +}
     19885 }
    1760019886+#endif
    1760119887diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkatrof.c ncurses-5.7/ncurses/base/lib_slkatrof.c
    1760219888--- ncurses-5.7.orig/ncurses/base/lib_slkatrof.c        2005-01-08 15:01:32.000000000 -0800
    17603 +++ ncurses-5.7/ncurses/base/lib_slkatrof.c     2009-03-22 21:17:07.016081855 -0700
     19889+++ ncurses-5.7/ncurses/base/lib_slkatrof.c     2009-06-05 14:01:16.000000000 -0700
    1760419890@@ -1,5 +1,5 @@
    1760519891 /****************************************************************************
     
    1764919935diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkatron.c ncurses-5.7/ncurses/base/lib_slkatron.c
    1765019936--- ncurses-5.7.orig/ncurses/base/lib_slkatron.c        2005-01-08 15:02:01.000000000 -0800
    17651 +++ ncurses-5.7/ncurses/base/lib_slkatron.c     2009-03-22 21:17:07.016081855 -0700
     19937+++ ncurses-5.7/ncurses/base/lib_slkatron.c     2009-06-05 14:01:16.000000000 -0700
    1765219938@@ -1,5 +1,5 @@
    1765319939 /****************************************************************************
     
    1769719983diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkatr_set.c ncurses-5.7/ncurses/base/lib_slkatr_set.c
    1769819984--- ncurses-5.7.orig/ncurses/base/lib_slkatr_set.c      2005-01-28 13:11:53.000000000 -0800
    17699 +++ ncurses-5.7/ncurses/base/lib_slkatr_set.c   2009-03-22 21:17:07.016081855 -0700
     19985+++ ncurses-5.7/ncurses/base/lib_slkatr_set.c   2009-06-05 14:01:16.000000000 -0700
    1770019986@@ -1,5 +1,5 @@
    1770119987 /****************************************************************************
     
    1776820054diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkatrset.c ncurses-5.7/ncurses/base/lib_slkatrset.c
    1776920055--- ncurses-5.7.orig/ncurses/base/lib_slkatrset.c       2005-01-08 13:46:47.000000000 -0800
    17770 +++ ncurses-5.7/ncurses/base/lib_slkatrset.c    2009-03-22 21:17:07.016081855 -0700
     20056+++ ncurses-5.7/ncurses/base/lib_slkatrset.c    2009-06-05 14:01:16.000000000 -0700
    1777120057@@ -1,5 +1,5 @@
    1777220058 /****************************************************************************
     
    1780820094diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkattr.c ncurses-5.7/ncurses/base/lib_slkattr.c
    1780920095--- ncurses-5.7.orig/ncurses/base/lib_slkattr.c 2005-01-08 13:44:28.000000000 -0800
    17810 +++ ncurses-5.7/ncurses/base/lib_slkattr.c      2009-03-22 21:17:07.016081855 -0700
     20096+++ ncurses-5.7/ncurses/base/lib_slkattr.c      2009-06-05 14:01:16.000000000 -0700
    1781120097@@ -1,5 +1,5 @@
    1781220098 /****************************************************************************
     
    1785220138diff -Naur ncurses-5.7.orig/ncurses/base/lib_slk.c ncurses-5.7/ncurses/base/lib_slk.c
    1785320139--- ncurses-5.7.orig/ncurses/base/lib_slk.c     2008-09-27 07:07:33.000000000 -0700
    17854 +++ ncurses-5.7/ncurses/base/lib_slk.c  2009-03-22 21:17:05.647994412 -0700
     20140+++ ncurses-5.7/ncurses/base/lib_slk.c  2009-06-05 14:01:51.000000000 -0700
    1785520141@@ -1,5 +1,5 @@
    1785620142 /****************************************************************************
     
    1786020146  * Permission is hereby granted, free of charge, to any person obtaining a  *
    1786120147  * copy of this software and associated documentation files (the            *
    17862 @@ -45,7 +45,7 @@
     20148@@ -45,7 +45,11 @@
    1786320149 #include <ctype.h>
    1786420150 #include <term.h>              /* num_labels, label_*, plab_norm */
    1786520151 
    1786620152-MODULE_ID("$Id: lib_slk.c,v 1.35 2008/09/27 14:07:33 juergen Exp $")
    17867 +MODULE_ID("$Id: lib_slk.c,v 1.36 2009/02/15 00:33:48 tom Exp $")
     20153+#ifndef CUR
     20154+#define CUR SP_TERMTYPE
     20155+#endif
     20156+
     20157+MODULE_ID("$Id: lib_slk.c,v 1.38 2009/05/10 00:48:29 tom Exp $")
    1786820158 
    1786920159 /*
    1787020160  * Free any memory related to soft labels, return an error.
    17871 @@ -178,14 +178,22 @@
     20161@@ -68,6 +72,9 @@
     20162 NCURSES_EXPORT(int)
     20163 _nc_slk_initialize(WINDOW *stwin, int cols)
     20164 {
     20165+#if NCURSES_SP_FUNCS
     20166+    SCREEN *sp = CURRENT_SCREEN;
     20167+#endif
     20168     int i, x;
     20169     int res = OK;
     20170     unsigned max_length;
     20171@@ -178,14 +185,22 @@
    1787220172  * Restore the soft labels on the screen.
    1787320173  */
     
    1789820198diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkclear.c ncurses-5.7/ncurses/base/lib_slkclear.c
    1789920199--- ncurses-5.7.orig/ncurses/base/lib_slkclear.c        2007-12-29 09:51:47.000000000 -0800
    17900 +++ ncurses-5.7/ncurses/base/lib_slkclear.c     2009-03-22 21:17:07.016081855 -0700
     20200+++ ncurses-5.7/ncurses/base/lib_slkclear.c     2009-06-05 14:01:16.000000000 -0700
    1790120201@@ -1,5 +1,5 @@
    1790220202 /****************************************************************************
     
    1795420254diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkcolor.c ncurses-5.7/ncurses/base/lib_slkcolor.c
    1795520255--- ncurses-5.7.orig/ncurses/base/lib_slkcolor.c        2005-01-28 13:11:53.000000000 -0800
    17956 +++ ncurses-5.7/ncurses/base/lib_slkcolor.c     2009-03-22 21:17:07.016081855 -0700
     20256+++ ncurses-5.7/ncurses/base/lib_slkcolor.c     2009-06-05 14:01:16.000000000 -0700
    1795720257@@ -1,5 +1,5 @@
    1795820258 /****************************************************************************
     
    1801820318diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkinit.c ncurses-5.7/ncurses/base/lib_slkinit.c
    1801920319--- ncurses-5.7.orig/ncurses/base/lib_slkinit.c 2008-01-12 12:23:39.000000000 -0800
    18020 +++ ncurses-5.7/ncurses/base/lib_slkinit.c      2009-03-22 21:17:05.647994412 -0700
     20320+++ ncurses-5.7/ncurses/base/lib_slkinit.c      2009-06-05 14:01:54.000000000 -0700
    1802120321@@ -1,5 +1,5 @@
    1802220322 /****************************************************************************
     
    1803420334 
    1803520335 /*
    18036 @@ -39,10 +40,10 @@
     20336@@ -39,17 +40,40 @@
    1803720337  */
    1803820338 #include <curses.priv.h>
    1803920339 
    1804020340-MODULE_ID("$Id: lib_slkinit.c,v 1.7 2008/01/12 20:23:39 tom Exp $")
    18041 +MODULE_ID("$Id: lib_slkinit.c,v 1.8 2009/02/15 00:42:36 tom Exp $")
     20341+MODULE_ID("$Id: lib_slkinit.c,v 1.11 2009/05/23 23:32:57 tom Exp $")
     20342+
     20343+#ifdef USE_SP_RIPOFF
     20344+#define SoftkeyFormat SP_PARM->slk_format
     20345+#else
     20346+#define SoftkeyFormat _nc_globals.slk_format
     20347+#endif
    1804220348 
    1804320349 NCURSES_EXPORT(int)
     
    1804720353     int code = ERR;
    1804820354 
    18049 @@ -53,3 +54,11 @@
     20355-    T((T_CALLED("slk_init(%d)"), format));
     20356-    if (format >= 0 && format <= 3 && !_nc_globals.slk_format) {
     20357-       _nc_globals.slk_format = 1 + format;
     20358-       code = _nc_ripoffline(-SLK_LINES(_nc_globals.slk_format), _nc_slk_initialize);
     20359+    T((T_CALLED("slk_init(%p,%d)"), SP_PARM, format));
     20360+
     20361+    if (format >= 0
     20362+       && format <= 3
     20363+#ifdef USE_SP_RIPOFF
     20364+       && SP_PARM
     20365+       && SP_PARM->_prescreen
     20366+#endif
     20367+       && !SoftkeyFormat) {
     20368+       SoftkeyFormat = 1 + format;
     20369+       code = NCURSES_SP_NAME(_nc_ripoffline) (NCURSES_SP_ARGx
     20370+                                               -SLK_LINES(SoftkeyFormat),
     20371+                                               _nc_slk_initialize);
    1805020372     }
    1805120373     returnCode(code);
     
    1805620378+slk_init(int format)
    1805720379+{
    18058 +    return NCURSES_SP_NAME(slk_init) (CURRENT_SCREEN, format);
     20380+    return NCURSES_SP_NAME(slk_init) (CURRENT_SCREEN_PRE, format);
    1805920381+}
    1806020382+#endif
    1806120383diff -Naur ncurses-5.7.orig/ncurses/base/lib_slklab.c ncurses-5.7/ncurses/base/lib_slklab.c
    1806220384--- ncurses-5.7.orig/ncurses/base/lib_slklab.c  2003-03-29 14:53:48.000000000 -0800
    18063 +++ ncurses-5.7/ncurses/base/lib_slklab.c       2009-03-22 21:17:07.016081855 -0700
     20385+++ ncurses-5.7/ncurses/base/lib_slklab.c       2009-06-05 14:01:16.000000000 -0700
    1806420386@@ -1,5 +1,5 @@
    1806520387 /****************************************************************************
     
    1810820430diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkrefr.c ncurses-5.7/ncurses/base/lib_slkrefr.c
    1810920431--- ncurses-5.7.orig/ncurses/base/lib_slkrefr.c 2008-09-27 07:07:53.000000000 -0700
    18110 +++ ncurses-5.7/ncurses/base/lib_slkrefr.c      2009-03-22 21:17:05.647994412 -0700
     20432+++ ncurses-5.7/ncurses/base/lib_slkrefr.c      2009-06-05 14:01:51.000000000 -0700
    1811120433@@ -1,5 +1,5 @@
    1811220434 /****************************************************************************
     
    1811620438  * Permission is hereby granted, free of charge, to any person obtaining a  *
    1811720439  * copy of this software and associated documentation files (the            *
    18118 @@ -40,7 +40,7 @@
     20440@@ -40,7 +40,11 @@
    1811920441 #include <curses.priv.h>
    1812020442 #include <term.h>              /* num_labels, label_*, plab_norm */
    1812120443 
    1812220444-MODULE_ID("$Id: lib_slkrefr.c,v 1.17 2008/09/27 14:07:53 juergen Exp $")
    18123 +MODULE_ID("$Id: lib_slkrefr.c,v 1.18 2009/02/15 00:33:48 tom Exp $")
     20445+#ifndef CUR
     20446+#define CUR SP_TERMTYPE
     20447+#endif
     20448+
     20449+MODULE_ID("$Id: lib_slkrefr.c,v 1.20 2009/05/10 00:48:29 tom Exp $")
    1812420450 
    1812520451 /*
    1812620452  * Paint the info line for the PC style SLK emulation.
    18127 @@ -113,32 +113,48 @@
     20453@@ -68,6 +72,9 @@
     20454 static void
     20455 slk_intern_refresh(SLK * slk)
     20456 {
     20457+#if NCURSES_SP_FUNCS
     20458+    SCREEN *sp = CURRENT_SCREEN;
     20459+#endif
     20460     int i;
     20461     int fmt = SP->slk_format;
     20462 
     20463@@ -113,32 +120,48 @@
    1812820464  * Refresh the soft labels.
    1812920465  */
     
    1818620522diff -Naur ncurses-5.7.orig/ncurses/base/lib_slkset.c ncurses-5.7/ncurses/base/lib_slkset.c
    1818720523--- ncurses-5.7.orig/ncurses/base/lib_slkset.c  2007-10-13 13:08:46.000000000 -0700
    18188 +++ ncurses-5.7/ncurses/base/lib_slkset.c       2009-03-22 21:17:07.016081855 -0700
     20524+++ ncurses-5.7/ncurses/base/lib_slkset.c       2009-06-05 14:01:16.000000000 -0700
    1818920525@@ -1,5 +1,5 @@
    1819020526 /****************************************************************************
     
    1824720583diff -Naur ncurses-5.7.orig/ncurses/base/lib_slktouch.c ncurses-5.7/ncurses/base/lib_slktouch.c
    1824820584--- ncurses-5.7.orig/ncurses/base/lib_slktouch.c        2000-12-09 18:43:27.000000000 -0800
    18249 +++ ncurses-5.7/ncurses/base/lib_slktouch.c     2009-03-22 21:17:07.016081855 -0700
     20585+++ ncurses-5.7/ncurses/base/lib_slktouch.c     2009-06-05 14:01:16.000000000 -0700
    1825020586@@ -1,5 +1,5 @@
    1825120587 /****************************************************************************
     
    1829820634diff -Naur ncurses-5.7.orig/ncurses/base/lib_ungetch.c ncurses-5.7/ncurses/base/lib_ungetch.c
    1829920635--- ncurses-5.7.orig/ncurses/base/lib_ungetch.c 2008-05-31 09:44:54.000000000 -0700
    18300 +++ ncurses-5.7/ncurses/base/lib_ungetch.c      2009-03-22 21:17:05.651994412 -0700
     20636+++ ncurses-5.7/ncurses/base/lib_ungetch.c      2009-06-05 14:01:44.000000000 -0700
    1830120637@@ -1,5 +1,5 @@
    1830220638 /****************************************************************************
     
    1831920655 
    1832020656-MODULE_ID("$Id: lib_ungetch.c,v 1.11 2008/05/31 16:44:54 tom Exp $")
    18321 +MODULE_ID("$Id: lib_ungetch.c,v 1.12 2009/02/15 00:46:58 tom Exp $")
     20657+MODULE_ID("$Id: lib_ungetch.c,v 1.13 2009/04/18 20:30:12 tom Exp $")
    1832220658 
    1832320659 #include <fifo_defs.h>
    1832420660 
    18325 @@ -83,8 +84,16 @@
     20661@@ -57,10 +58,12 @@
     20662 #endif /* TRACE */
     20663 
     20664 NCURSES_EXPORT(int)
     20665-_nc_ungetch(SCREEN *sp, int ch)
     20666+safe_ungetch(SCREEN *sp, int ch)
     20667 {
     20668     int rc = ERR;
     20669 
     20670+    T((T_CALLED("ungetch(%p,%s)"), sp, _nc_tracechar(sp, ch)));
     20671+
     20672     if (tail != -1) {
     20673        if (head == -1) {
     20674            head = 0;
     20675@@ -79,12 +82,11 @@
     20676 #endif
     20677        rc = OK;
     20678     }
     20679-    return rc;
     20680+    returnCode(rc);
    1832620681 }
    1832720682 
    1832820683 NCURSES_EXPORT(int)
    18329 +NCURSES_SP_NAME(ungetch) (NCURSES_SP_DCLx int ch)
    18330 +{
    18331 +    T((T_CALLED("ungetch(%s)"), _nc_tracechar(SP_PARM, ch)));
    18332 +    returnCode(_nc_ungetch(SP_PARM, ch));
    18333 +}
    18334 +
    18335 +#if NCURSES_SP_FUNCS
    18336 +NCURSES_EXPORT(int)
    1833720684 ungetch(int ch)
    1833820685 {
    1833920686-    T((T_CALLED("ungetch(%s)"), _nc_tracechar(SP, ch)));
    1834020687-    returnCode(_nc_ungetch(SP, ch));
    18341 +    return NCURSES_SP_NAME(ungetch) (CURRENT_SCREEN, ch);
     20688+    return safe_ungetch(CURRENT_SCREEN, ch);
    1834220689 }
    18343 +#endif
    1834420690diff -Naur ncurses-5.7.orig/ncurses/base/lib_winch.c ncurses-5.7/ncurses/base/lib_winch.c
    1834520691--- ncurses-5.7.orig/ncurses/base/lib_winch.c   2001-06-02 16:42:08.000000000 -0700
    18346 +++ ncurses-5.7/ncurses/base/lib_winch.c        2009-03-22 21:17:07.016081855 -0700
     20692+++ ncurses-5.7/ncurses/base/lib_winch.c        2009-06-05 14:01:16.000000000 -0700
    1834720693@@ -39,16 +39,16 @@
    1834820694 
     
    1836620712     }
    1836720713 }
     20714diff -Naur ncurses-5.7.orig/ncurses/base/lib_window.c ncurses-5.7/ncurses/base/lib_window.c
     20715--- ncurses-5.7.orig/ncurses/base/lib_window.c  2008-06-07 07:12:56.000000000 -0700
     20716+++ ncurses-5.7/ncurses/base/lib_window.c       2009-06-05 14:01:44.000000000 -0700
     20717@@ -1,5 +1,5 @@
     20718 /****************************************************************************
     20719- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     20720+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     20721  *                                                                          *
     20722  * Permission is hereby granted, free of charge, to any person obtaining a  *
     20723  * copy of this software and associated documentation files (the            *
     20724@@ -39,7 +39,7 @@
     20725 
     20726 #include <curses.priv.h>
     20727 
     20728-MODULE_ID("$Id: lib_window.c,v 1.25 2008/06/07 14:12:56 tom Exp $")
     20729+MODULE_ID("$Id: lib_window.c,v 1.26 2009/04/18 18:46:09 tom Exp $")
     20730 
     20731 NCURSES_EXPORT(void)
     20732 _nc_synchook(WINDOW *win)
     20733@@ -185,16 +185,20 @@
     20734     T((T_CALLED("dupwin(%p)"), win));
     20735 
     20736     if (win != 0) {
     20737-
     20738+#if NCURSES_SP_FUNCS
     20739+       SCREEN *sp = _nc_screen_of(win);
     20740+#endif
     20741        _nc_lock_global(curses);
     20742        if (win->_flags & _ISPAD) {
     20743-           nwin = newpad(win->_maxy + 1,
     20744-                         win->_maxx + 1);
     20745+           nwin = NCURSES_SP_NAME(newpad) (NCURSES_SP_ARGx
     20746+                                           win->_maxy + 1,
     20747+                                           win->_maxx + 1);
     20748        } else {
     20749-           nwin = newwin(win->_maxy + 1,
     20750-                         win->_maxx + 1,
     20751-                         win->_begy,
     20752-                         win->_begx);
     20753+           nwin = NCURSES_SP_NAME(newwin) (NCURSES_SP_ARGx
     20754+                                           win->_maxy + 1,
     20755+                                           win->_maxx + 1,
     20756+                                           win->_begy,
     20757+                                           win->_begx);
     20758        }
     20759 
     20760        if (nwin != 0) {
    1836820761diff -Naur ncurses-5.7.orig/ncurses/base/MKkeyname.awk ncurses-5.7/ncurses/base/MKkeyname.awk
    1836920762--- ncurses-5.7.orig/ncurses/base/MKkeyname.awk 2008-07-12 11:40:00.000000000 -0700
    18370 +++ ncurses-5.7/ncurses/base/MKkeyname.awk      2009-03-22 21:17:05.639993853 -0700
     20763+++ ncurses-5.7/ncurses/base/MKkeyname.awk      2009-06-05 14:01:51.000000000 -0700
    1837120764@@ -1,6 +1,6 @@
    1837220765-# $Id: MKkeyname.awk,v 1.40 2008/07/12 18:40:00 tom Exp $
    18373 +# $Id: MKkeyname.awk,v 1.41 2009/02/15 00:24:58 tom Exp $
     20766+# $Id: MKkeyname.awk,v 1.43 2009/05/09 19:01:49 tom Exp $
    1837420767 ##############################################################################
    1837520768-# Copyright (c) 1999-2007,2008 Free Software Foundation, Inc.                #
     
    1837820771 # Permission is hereby granted, free of charge, to any person obtaining a    #
    1837920772 # copy of this software and associated documentation files (the "Software"), #
    18380 @@ -141,11 +141,20 @@
     20773@@ -67,7 +67,8 @@
     20774        print "#define SIZEOF_TABLE 256"
     20775        print "#define MyTable _nc_globals.keyname_table"
     20776        print ""
     20777-       print "NCURSES_EXPORT(NCURSES_CONST char *) _nc_keyname (SCREEN *sp, int c)"
     20778+       print "NCURSES_EXPORT(NCURSES_CONST char *)"
     20779+       print "safe_keyname (SCREEN *sp, int c)"
     20780        print "{"
     20781        print " int i;"
     20782        print " char name[20];"
     20783@@ -116,14 +117,14 @@
     20784        print "                         result = MyTable[c];"
     20785        print "                 }"
     20786        print "#if NCURSES_EXT_FUNCS && NCURSES_XNAMES"
     20787-       print "         } else if (result == 0 && cur_term != 0) {"
     20788+       print "         } else if (result == 0 && HasTerminal(sp)) {"
     20789        print "                 int j, k;"
     20790        print "                 char * bound;"
     20791-       print "                 TERMTYPE *tp = &(cur_term->type);"
     20792+       print "                 TERMTYPE *tp = &(TerminalOf(sp)->type);"
     20793        print "                 int save_trace = _nc_tracing;"
     20794        print ""
     20795        print "                 _nc_tracing = 0;        /* prevent recursion via keybound() */"
     20796-       print "                 for (j = 0; (bound = keybound(c, j)) != 0; ++j) {"
     20797+       print "                 for (j = 0; (bound = NCURSES_SP_NAME(keybound)(NCURSES_SP_ARGx c, j)) != 0; ++j) {"
     20798        print "                         for(k = STRCOUNT; k < (int) NUM_STRINGS(tp);  k++) {"
     20799        print "                                 if (tp->Strings[k] != 0 && !strcmp(bound, tp->Strings[k])) {"
     20800        print "                                         result = ExtStrname(tp, k, strnames);"
     20801@@ -141,9 +142,10 @@
    1838120802        print " return result;"
    1838220803        print "}"
     
    1838420805-       print "NCURSES_EXPORT(NCURSES_CONST char *) keyname (int c)"
    1838520806+       print "NCURSES_EXPORT(NCURSES_CONST char *)"
    18386 +       print "NCURSES_SP_NAME(keyname) (NCURSES_SP_DCLx int c)"
     20807+       print "keyname (int c)"
    1838720808        print "{"
    1838820809-       print "\treturn _nc_keyname(SP, c);"
    18389 +       print "\treturn _nc_keyname(SP_PARM, c);"
     20810+       print " return safe_keyname (CURRENT_SCREEN, c);"
    1839020811        print "}"
    1839120812        print ""
    18392 +       print "#if NCURSES_SP_FUNCS"
    18393 +       print "NCURSES_EXPORT(NCURSES_CONST char *)"
    18394 +       print "keyname (int c)"
    18395 +       print "{"
    18396 +       print " return NCURSES_SP_NAME(keyname) (CURRENT_SCREEN, c);"
    18397 +       print "}"
    18398 +       print "#endif"
    18399 +       print ""
    1840020813        print "#if NO_LEAKS"
    18401         print "void _nc_keyname_leaks(void)"
    18402         print "{"
    1840320814diff -Naur ncurses-5.7.orig/ncurses/base/MKlib_gen.sh ncurses-5.7/ncurses/base/MKlib_gen.sh
    1840420815--- ncurses-5.7.orig/ncurses/base/MKlib_gen.sh  2008-08-30 12:20:50.000000000 -0700
    18405 +++ ncurses-5.7/ncurses/base/MKlib_gen.sh       2009-03-22 21:17:07.012081575 -0700
     20816+++ ncurses-5.7/ncurses/base/MKlib_gen.sh       2009-06-05 14:01:16.000000000 -0700
    1840620817@@ -2,7 +2,7 @@
    1840720818 #
     
    1842220833                returnType = "SP";
    1842320834        } else if ( $first == "WINDOW" ) {
     20835diff -Naur ncurses-5.7.orig/ncurses/base/MKunctrl.awk ncurses-5.7/ncurses/base/MKunctrl.awk
     20836--- ncurses-5.7.orig/ncurses/base/MKunctrl.awk  2008-10-04 14:40:24.000000000 -0700
     20837+++ ncurses-5.7/ncurses/base/MKunctrl.awk       2009-06-05 14:01:44.000000000 -0700
     20838@@ -1,6 +1,6 @@
     20839-# $Id: MKunctrl.awk,v 1.23 2008/10/04 21:40:24 tom Exp $
     20840+# $Id: MKunctrl.awk,v 1.25 2009/04/18 23:43:49 tom Exp $
     20841 ##############################################################################
     20842-# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.                #
     20843+# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.                #
     20844 #                                                                            #
     20845 # Permission is hereby granted, free of charge, to any person obtaining a    #
     20846 # copy of this software and associated documentation files (the "Software"), #
     20847@@ -46,9 +46,8 @@
     20848                print ""
     20849        }
     20850 END    {
     20851-               print "NCURSES_EXPORT(NCURSES_CONST char *) _nc_unctrl (SCREEN *sp, chtype ch)"
     20852+               print "NCURSES_EXPORT(NCURSES_CONST char *) safe_unctrl(SCREEN *sp, chtype ch)"
     20853                print "{"
     20854-
     20855                blob=""
     20856                offset=0
     20857                if (bigstrings) {
     20858@@ -187,6 +186,6 @@
     20859                print  ""
     20860                print  "NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype ch)"
     20861                print  "{"
     20862-               print  "\treturn _nc_unctrl(SP, ch);"
     20863+               print  "\treturn safe_unctrl(CURRENT_SCREEN, ch);"
     20864                print  "}"
     20865        }
     20866diff -Naur ncurses-5.7.orig/ncurses/base/nc_panel.c ncurses-5.7/ncurses/base/nc_panel.c
     20867--- ncurses-5.7.orig/ncurses/base/nc_panel.c    2000-12-09 18:43:28.000000000 -0800
     20868+++ ncurses-5.7/ncurses/base/nc_panel.c 2009-06-05 14:01:33.000000000 -0700
     20869@@ -1,5 +1,5 @@
     20870 /****************************************************************************
     20871- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
     20872+ * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc.              *
     20873  *                                                                          *
     20874  * Permission is hereby granted, free of charge, to any person obtaining a  *
     20875  * copy of this software and associated documentation files (the            *
     20876@@ -32,10 +32,22 @@
     20877 
     20878 #include <curses.priv.h>
     20879 
     20880-MODULE_ID("$Id: nc_panel.c,v 1.4 2000/12/10 02:43:28 tom Exp $")
     20881+MODULE_ID("$Id: nc_panel.c,v 1.5 2009/04/11 21:05:10 tom Exp $")
     20882 
     20883 NCURSES_EXPORT(struct panelhook *)
     20884+NCURSES_SP_NAME(_nc_panelhook) (NCURSES_SP_DCL0)
     20885+{
     20886+    return (SP_PARM
     20887+           ? &(SP_PARM->_panelHook)
     20888+           : (CURRENT_SCREEN
     20889+              ? &(CURRENT_SCREEN->_panelHook)
     20890+              : 0));
     20891+}
     20892+
     20893+#if NCURSES_SP_FUNCS
     20894+NCURSES_EXPORT(struct panelhook *)
     20895 _nc_panelhook(void)
     20896 {
     20897-    return (SP ? &(SP->_panelHook) : NULL);
     20898+    return NCURSES_SP_NAME(_nc_panelhook) (CURRENT_SCREEN);
     20899 }
     20900+#endif
     20901diff -Naur ncurses-5.7.orig/ncurses/base/resizeterm.c ncurses-5.7/ncurses/base/resizeterm.c
     20902--- ncurses-5.7.orig/ncurses/base/resizeterm.c  2008-06-07 06:58:40.000000000 -0700
     20903+++ ncurses-5.7/ncurses/base/resizeterm.c       2009-06-05 14:01:51.000000000 -0700
     20904@@ -1,5 +1,5 @@
     20905 /****************************************************************************
     20906- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     20907+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     20908  *                                                                          *
     20909  * Permission is hereby granted, free of charge, to any person obtaining a  *
     20910  * copy of this software and associated documentation files (the            *
     20911@@ -41,7 +41,11 @@
     20912 #include <curses.priv.h>
     20913 #include <term.h>
     20914 
     20915-MODULE_ID("$Id: resizeterm.c,v 1.34 2008/06/07 13:58:40 tom Exp $")
     20916+#ifndef CUR
     20917+#define CUR SP_TERMTYPE
     20918+#endif
     20919+
     20920+MODULE_ID("$Id: resizeterm.c,v 1.39 2009/05/10 00:48:29 tom Exp $")
     20921 
     20922 #define stolen_lines (screen_lines - SP->_lines_avail)
     20923 
     20924@@ -64,18 +68,23 @@
     20925 static void
     20926 show_window_sizes(const char *name)
     20927 {
     20928+    SCREEN *sp;
     20929     WINDOWLIST *wp;
     20930 
     20931     _nc_lock_global(curses);
     20932-    _tracef("%s resizing: %2d x %2d (%2d x %2d)", name, LINES, COLS,
     20933-           screen_lines, screen_columns);
     20934-    for (each_window(wp)) {
     20935-       _tracef("  window %p is %2ld x %2ld at %2ld,%2ld",
     20936-               &(wp->win),
     20937-               (long) wp->win._maxy + 1,
     20938-               (long) wp->win._maxx + 1,
     20939-               (long) wp->win._begy,
     20940-               (long) wp->win._begx);
     20941+    for (each_screen(sp)) {
     20942+       _tracef("%s resizing: %p: %2d x %2d (%2d x %2d)", name, sp,
     20943+               *(ptrLines(sp)),
     20944+               *(ptrCols(sp)),
     20945+               screen_lines(sp), screen_columns(sp));
     20946+       for (each_window(sp, wp)) {
     20947+           _tracef("  window %p is %2ld x %2ld at %2ld,%2ld",
     20948+                   &(wp->win),
     20949+                   (long) wp->win._maxy + 1,
     20950+                   (long) wp->win._maxx + 1,
     20951+                   (long) wp->win._begy,
     20952+                   (long) wp->win._begx);
     20953+       }
     20954     }
     20955     _nc_unlock_global(curses);
     20956 }
     20957@@ -86,15 +95,23 @@
     20958  * structure's size.
     20959  */
     20960 NCURSES_EXPORT(bool)
     20961-is_term_resized(int ToLines, int ToCols)
     20962+NCURSES_SP_NAME(is_term_resized) (NCURSES_SP_DCLx int ToLines, int ToCols)
     20963 {
     20964-    T((T_CALLED("is_term_resized(%d, %d)"), ToLines, ToCols));
     20965+    T((T_CALLED("is_term_resized(%p, %d, %d)"), SP_PARM, ToLines, ToCols));
     20966     returnCode(ToLines > 0
     20967               && ToCols > 0
     20968-              && (ToLines != screen_lines
     20969-                  || ToCols != screen_columns));
     20970+              && (ToLines != screen_lines(SP_PARM)
     20971+                  || ToCols != screen_columns(SP_PARM)));
     20972 }
     20973 
     20974+#if NCURSES_SP_FUNCS
     20975+NCURSES_EXPORT(bool)
     20976+is_term_resized(int ToLines, int ToCols)
     20977+{
     20978+    return NCURSES_SP_NAME(is_term_resized) (CURRENT_SCREEN, ToLines, ToCols);
     20979+}
     20980+#endif
     20981+
     20982 /*
     20983  */
     20984 static ripoff_t *
     20985@@ -104,6 +121,9 @@
     20986     ripoff_t *rop;
     20987 
     20988     if (win != 0) {
     20989+#if NCURSES_SP_FUNCS
     20990+       SCREEN *sp = _nc_screen_of(win);
     20991+#endif
     20992        for (each_ripoff(rop)) {
     20993            if (rop->win == win && rop->line != 0) {
     20994                result = rop;
     20995@@ -125,6 +145,9 @@
     20996     ripoff_t *rop;
     20997 
     20998     if (win != 0) {
     20999+#if NCURSES_SP_FUNCS
     21000+       SCREEN *sp = _nc_screen_of(win);
     21001+#endif
     21002        for (each_ripoff(rop)) {
     21003            if (rop->line < 0) {
     21004                result -= rop->line;
     21005@@ -146,9 +169,12 @@
     21006     int depth = 0;
     21007 
     21008     if (cmp != 0) {
     21009+#if NCURSES_SP_FUNCS
     21010+       SCREEN *sp = _nc_screen_of(cmp);
     21011+#endif
     21012        WINDOWLIST *wp;
     21013 
     21014-       for (each_window(wp)) {
     21015+       for (each_window(sp, wp)) {
     21016            WINDOW *tst = &(wp->win);
     21017            if (tst->_parent == cmp) {
     21018                depth = 1 + child_depth(tst);
     21019@@ -184,7 +210,7 @@
     21020 adjust_window(WINDOW *win, int ToLines, int ToCols, int stolen EXTRA_DCLS)
     21021 {
     21022     int result;
     21023-    int bottom = CurLines + SP->_topstolen - stolen;
     21024+    int bottom = CurLines + _nc_screen_of(win)->_topstolen - stolen;
     21025     int myLines = win->_maxy + 1;
     21026     int myCols = win->_maxx + 1;
     21027     ripoff_t *rop = ripped_window(win);
     21028@@ -239,19 +265,19 @@
     21029  * children, decrease those to fit, then decrease the containing window, etc.
     21030  */
     21031 static int
     21032-decrease_size(int ToLines, int ToCols, int stolen EXTRA_DCLS)
     21033+decrease_size(NCURSES_SP_DCLx int ToLines, int ToCols, int stolen EXTRA_DCLS)
     21034 {
     21035     bool found;
     21036     int depth = 0;
     21037     WINDOWLIST *wp;
     21038 
     21039-    T((T_CALLED("decrease_size(%d, %d)"), ToLines, ToCols));
     21040+    T((T_CALLED("decrease_size(%p, %d, %d)"), SP_PARM, ToLines, ToCols));
     21041 
     21042     do {
     21043        found = FALSE;
     21044        TR(TRACE_UPDATE, ("decreasing size of windows to %dx%d, depth=%d",
     21045                          ToLines, ToCols, depth));
     21046-       for (each_window(wp)) {
     21047+       for (each_window(SP_PARM, wp)) {
     21048            WINDOW *win = &(wp->win);
     21049 
     21050            if (!(win->_flags & _ISPAD)) {
     21051@@ -273,19 +299,19 @@
     21052  * parent, increase those to fit, then increase the contained window, etc.
     21053  */
     21054 static int
     21055-increase_size(int ToLines, int ToCols, int stolen EXTRA_DCLS)
     21056+increase_size(NCURSES_SP_DCLx int ToLines, int ToCols, int stolen EXTRA_DCLS)
     21057 {
     21058     bool found;
     21059     int depth = 0;
     21060     WINDOWLIST *wp;
     21061 
     21062-    T((T_CALLED("increase_size(%d, %d)"), ToLines, ToCols));
     21063+    T((T_CALLED("increase_size(%p, %d, %d)"), SP_PARM, ToLines, ToCols));
     21064 
     21065     do {
     21066        found = FALSE;
     21067        TR(TRACE_UPDATE, ("increasing size of windows to %dx%d, depth=%d",
     21068                          ToLines, ToCols, depth));
     21069-       for (each_window(wp)) {
     21070+       for (each_window(SP_PARM, wp)) {
     21071            WINDOW *win = &(wp->win);
     21072 
     21073            if (!(win->_flags & _ISPAD)) {
     21074@@ -307,25 +333,26 @@
     21075  * such as ungetch().
     21076  */
     21077 NCURSES_EXPORT(int)
     21078-resize_term(int ToLines, int ToCols)
     21079+NCURSES_SP_NAME(resize_term) (NCURSES_SP_DCLx int ToLines, int ToCols)
     21080 {
     21081     int result = OK EXTRA_ARGS;
     21082     int was_stolen;
     21083 
     21084-    T((T_CALLED("resize_term(%d,%d) old(%d,%d)"),
     21085-       ToLines, ToCols,
     21086-       screen_lines, screen_columns));
     21087+    T((T_CALLED("resize_term(%p,%d,%d) old(%d,%d)"),
     21088+       SP_PARM, ToLines, ToCols,
     21089+       SP_PARM == 0 ? -1 : screen_lines(SP_PARM),
     21090+       SP_PARM == 0 ? -1 : screen_columns(SP_PARM)));
     21091 
     21092-    if (SP == 0) {
     21093+    if (SP_PARM == 0) {
     21094        returnCode(ERR);
     21095     }
     21096 
     21097     _nc_lock_global(curses);
     21098 
     21099-    was_stolen = (screen_lines - SP->_lines_avail);
     21100-    if (is_term_resized(ToLines, ToCols)) {
     21101-       int myLines = CurLines = screen_lines;
     21102-       int myCols = CurCols = screen_columns;
     21103+    was_stolen = (screen_lines(SP_PARM) - SP_PARM->_lines_avail);
     21104+    if (NCURSES_SP_NAME(is_term_resized) (NCURSES_SP_ARGx ToLines, ToCols)) {
     21105+       int myLines = CurLines = screen_lines(SP_PARM);
     21106+       int myCols = CurCols = screen_columns(SP_PARM);
     21107 
     21108 #ifdef TRACE
     21109        if (USE_TRACEF(TRACE_UPDATE)) {
     21110@@ -333,33 +360,35 @@
     21111            _nc_unlock_global(tracef);
     21112        }
     21113 #endif
     21114-       if (ToLines > screen_lines) {
     21115-           increase_size(myLines = ToLines, myCols, was_stolen EXTRA_ARGS);
     21116+       if (ToLines > screen_lines(SP_PARM)) {
     21117+           increase_size(NCURSES_SP_ARGx
     21118+                         myLines = ToLines, myCols, was_stolen EXTRA_ARGS);
     21119            CurLines = myLines;
     21120            CurCols = myCols;
     21121        }
     21122 
     21123-       if (ToCols > screen_columns) {
     21124-           increase_size(myLines, myCols = ToCols, was_stolen EXTRA_ARGS);
     21125+       if (ToCols > screen_columns(SP_PARM)) {
     21126+           increase_size(NCURSES_SP_ARGx
     21127+                         myLines, myCols = ToCols, was_stolen EXTRA_ARGS);
     21128            CurLines = myLines;
     21129            CurCols = myCols;
     21130        }
     21131 
     21132        if (ToLines < myLines ||
     21133            ToCols < myCols) {
     21134-           decrease_size(ToLines, ToCols, was_stolen EXTRA_ARGS);
     21135+           decrease_size(NCURSES_SP_ARGx ToLines, ToCols, was_stolen EXTRA_ARGS);
     21136        }
     21137 
     21138-       screen_lines = lines = ToLines;
     21139-       screen_columns = columns = ToCols;
     21140+       screen_lines(SP_PARM) = lines = ToLines;
     21141+       screen_columns(SP_PARM) = columns = ToCols;
     21142 
     21143-       SP->_lines_avail = lines - was_stolen;
     21144+       SP_PARM->_lines_avail = lines - was_stolen;
     21145 
     21146-       if (SP->oldhash) {
     21147-           FreeAndNull(SP->oldhash);
     21148+       if (SP_PARM->oldhash) {
     21149+           FreeAndNull(SP_PARM->oldhash);
     21150        }
     21151-       if (SP->newhash) {
     21152-           FreeAndNull(SP->newhash);
     21153+       if (SP_PARM->newhash) {
     21154+           FreeAndNull(SP_PARM->newhash);
     21155        }
     21156 #ifdef TRACE
     21157        if (USE_TRACEF(TRACE_UPDATE)) {
     21158@@ -383,6 +412,18 @@
     21159     returnCode(result);
     21160 }
     21161 
     21162+#if NCURSES_SP_FUNCS
     21163+NCURSES_EXPORT(int)
     21164+resize_term(int ToLines, int ToCols)
     21165+{
     21166+    int res = ERR;
     21167+    _nc_lock_global(curses);
     21168+    res = NCURSES_SP_NAME(resize_term) (CURRENT_SCREEN, ToLines, ToCols);
     21169+    _nc_unlock_global(curses);
     21170+    return (res);
     21171+}
     21172+#endif
     21173+
     21174 /*
     21175  * This function reallocates NCURSES window structures.  It is invoked in
     21176  * response to a SIGWINCH interrupt.  Other user-defined windows may also need
     21177@@ -392,34 +433,34 @@
     21178  * invoked directly from the signal handler.
     21179  */
     21180 NCURSES_EXPORT(int)
     21181-resizeterm(int ToLines, int ToCols)
     21182+NCURSES_SP_NAME(resizeterm) (NCURSES_SP_DCLx int ToLines, int ToCols)
     21183 {
     21184     int result = ERR;
     21185 
     21186-    T((T_CALLED("resizeterm(%d,%d) old(%d,%d)"),
     21187-       ToLines, ToCols,
     21188-       screen_lines, screen_columns));
     21189+    T((T_CALLED("resizeterm(%p, %d,%d) old(%d,%d)"),
     21190+       SP_PARM, ToLines, ToCols,
     21191+       SP_PARM == 0 ? -1 : screen_lines(SP_PARM), screen_columns(SP_PARM)));
     21192 
     21193-    if (SP != 0) {
     21194+    if (SP_PARM != 0) {
     21195        result = OK;
     21196-       SP->_sig_winch = FALSE;
     21197+       SP_PARM->_sig_winch = FALSE;
     21198 
     21199-       if (is_term_resized(ToLines, ToCols)) {
     21200+       if (NCURSES_SP_NAME(is_term_resized) (NCURSES_SP_ARGx ToLines, ToCols)) {
     21201 #if USE_SIGWINCH
     21202            ripoff_t *rop;
     21203-           bool slk_visible = (SP != 0
     21204-                               && SP->_slk != 0
     21205-                               && !(SP->_slk->hidden));
     21206+           bool slk_visible = (SP_PARM != 0
     21207+                               && SP_PARM->_slk != 0
     21208+                               && !(SP_PARM->_slk->hidden));
     21209 
     21210            if (slk_visible) {
     21211                slk_clear();
     21212            }
     21213 #endif
     21214-           result = resize_term(ToLines, ToCols);
     21215+           result = NCURSES_SP_NAME(resize_term) (NCURSES_SP_ARGx ToLines, ToCols);
     21216 
     21217 #if USE_SIGWINCH
     21218-           _nc_ungetch(SP, KEY_RESIZE);        /* so application can know this */
     21219-           clearok(curscr, TRUE);      /* screen contents are unknown */
     21220+           safe_ungetch(SP_PARM, KEY_RESIZE);  /* so application can know this */
     21221+           clearok(CurScreen(SP_PARM), TRUE);  /* screen contents are unknown */
     21222 
     21223            /* ripped-off lines are a special case: if we did not lengthen
     21224             * them, we haven't moved them either.  repaint them, too.
     21225@@ -429,7 +470,7 @@
     21226             * not know which are really on top.
     21227             */
     21228            for (each_ripoff(rop)) {
     21229-               if (rop->win != stdscr
     21230+               if (rop->win != StdScreen(SP_PARM)
     21231                    && rop->win != 0
     21232                    && rop->line < 0) {
     21233 
     21234@@ -442,10 +483,9 @@
     21235 
     21236            /* soft-keys are a special case: we _know_ how to repaint them */
     21237            if (slk_visible) {
     21238-               slk_restore();
     21239-               slk_touch();
     21240-
     21241-               slk_refresh();
     21242+               NCURSES_SP_NAME(slk_restore) (NCURSES_SP_ARG);
     21243+               NCURSES_SP_NAME(slk_touch) (NCURSES_SP_ARG);
     21244+               NCURSES_SP_NAME(slk_refresh) (NCURSES_SP_ARG);
     21245            }
     21246 #endif
     21247        }
     21248@@ -453,3 +493,11 @@
     21249 
     21250     returnCode(result);
     21251 }
     21252+
     21253+#if NCURSES_SP_FUNCS
     21254+NCURSES_EXPORT(int)
     21255+resizeterm(int ToLines, int ToCols)
     21256+{
     21257+    return NCURSES_SP_NAME(resizeterm) (CURRENT_SCREEN, ToLines, ToCols);
     21258+}
     21259+#endif
     21260diff -Naur ncurses-5.7.orig/ncurses/base/safe_sprintf.c ncurses-5.7/ncurses/base/safe_sprintf.c
     21261--- ncurses-5.7.orig/ncurses/base/safe_sprintf.c        2007-04-21 15:28:06.000000000 -0700
     21262+++ ncurses-5.7/ncurses/base/safe_sprintf.c     2009-06-05 14:01:44.000000000 -0700
     21263@@ -1,5 +1,5 @@
     21264 /****************************************************************************
     21265- * Copyright (c) 1998-2003,2007 Free Software Foundation, Inc.              *
     21266+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
     21267  *                                                                          *
     21268  * Permission is hereby granted, free of charge, to any person obtaining a  *
     21269  * copy of this software and associated documentation files (the            *
     21270@@ -33,7 +33,7 @@
     21271 #include <curses.priv.h>
     21272 #include <ctype.h>
     21273 
     21274-MODULE_ID("$Id: safe_sprintf.c,v 1.20 2007/04/21 22:28:06 tom Exp $")
     21275+MODULE_ID("$Id: safe_sprintf.c,v 1.22 2009/04/18 18:46:46 tom Exp $")
     21276 
     21277 #if USE_SAFE_SPRINTF
     21278 
     21279@@ -111,7 +111,7 @@
     21280                    }
     21281                    sprintf(fmt_arg, "%d", ival);
     21282                    fmt_len += strlen(fmt_arg);
     21283-                   if ((format = realloc(format, fmt_len)) == 0) {
     21284+                   if ((format = _nc_doalloc(format, fmt_len)) == 0) {
     21285                        return -1;
     21286                    }
     21287                    strcpy(&format[--f], fmt_arg);
     21288@@ -214,7 +214,9 @@
     21289  * Wrapper for vsprintf that allocates a buffer big enough to hold the result.
     21290  */
     21291 NCURSES_EXPORT(char *)
     21292-_nc_printf_string(const char *fmt, va_list ap)
     21293+NCURSES_SP_NAME(_nc_printf_string) (NCURSES_SP_DCLx
     21294+                                   const char *fmt,
     21295+                                   va_list ap)
     21296 {
     21297     char *result = 0;
     21298 
     21299@@ -237,11 +239,11 @@
     21300 #define MyCols _nc_globals.safeprint_cols
     21301 #define MyRows _nc_globals.safeprint_rows
     21302 
     21303-       if (screen_lines > MyRows || screen_columns > MyCols) {
     21304-           if (screen_lines > MyRows)
     21305-               MyRows = screen_lines;
     21306-           if (screen_columns > MyCols)
     21307-               MyCols = screen_columns;
     21308+       if (screen_lines(SP_PARM) > MyRows || screen_columns(SP_PARM) > MyCols) {
     21309+           if (screen_lines(SP_PARM) > MyRows)
     21310+               MyRows = screen_lines(SP_PARM);
     21311+           if (screen_columns(SP_PARM) > MyCols)
     21312+               MyCols = screen_columns(SP_PARM);
     21313            my_length = (MyRows * (MyCols + 1)) + 1;
     21314            my_buffer = typeRealloc(char, my_length, my_buffer);
     21315        }
     21316@@ -262,3 +264,11 @@
     21317     }
     21318     return result;
     21319 }
     21320+
     21321+#if NCURSES_SP_FUNCS
     21322+NCURSES_EXPORT(char *)
     21323+_nc_printf_string(const char *fmt, va_list ap)
     21324+{
     21325+    return NCURSES_SP_NAME(_nc_printf_string) (CURRENT_SCREEN, fmt, ap);
     21326+}
     21327+#endif
    1842421328diff -Naur ncurses-5.7.orig/ncurses/base/tries.c ncurses-5.7/ncurses/base/tries.c
    1842521329--- ncurses-5.7.orig/ncurses/base/tries.c       2008-08-16 12:22:55.000000000 -0700
    18426 +++ ncurses-5.7/ncurses/base/tries.c    2009-03-22 21:17:07.016081855 -0700
     21330+++ ncurses-5.7/ncurses/base/tries.c    2009-06-05 14:01:16.000000000 -0700
    1842721331@@ -39,7 +39,7 @@
    1842821332 
     
    1844521349        }
    1844621350 #endif
     21351diff -Naur ncurses-5.7.orig/ncurses/base/wresize.c ncurses-5.7/ncurses/base/wresize.c
     21352--- ncurses-5.7.orig/ncurses/base/wresize.c     2008-06-07 06:59:01.000000000 -0700
     21353+++ ncurses-5.7/ncurses/base/wresize.c  2009-06-05 14:01:54.000000000 -0700
     21354@@ -1,5 +1,5 @@
     21355 /****************************************************************************
     21356- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     21357+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     21358  *                                                                          *
     21359  * Permission is hereby granted, free of charge, to any person obtaining a  *
     21360  * copy of this software and associated documentation files (the            *
     21361@@ -27,12 +27,13 @@
     21362  ****************************************************************************/
     21363 
     21364 /****************************************************************************
     21365- *  Author: Thomas E. Dickey 1996-2002                                      *
     21366+ *  Author: Thomas E. Dickey 1996-on                                        *
     21367+ *     and: Juergen Pfeifer                                                 *
     21368  ****************************************************************************/
     21369 
     21370 #include <curses.priv.h>
     21371 
     21372-MODULE_ID("$Id: wresize.c,v 1.29 2008/06/07 13:59:01 tom Exp $")
     21373+MODULE_ID("$Id: wresize.c,v 1.31 2009/05/23 19:50:16 tom Exp $")
     21374 
     21375 static int
     21376 cleanup_lines(struct ldat *data, int length)
     21377@@ -53,10 +54,13 @@
     21378     WINDOWLIST *wp;
     21379     struct ldat *pline = cmp->_line;
     21380     int row;
     21381+#ifdef USE_SP_WINDOWLIST
     21382+    SCREEN *sp = _nc_screen_of(cmp);
     21383+#endif
     21384 
     21385     _nc_lock_global(curses);
     21386 
     21387-    for (each_window(wp)) {
     21388+    for (each_window(SP_PARM, wp)) {
     21389        WINDOW *tst = &(wp->win);
     21390 
     21391        if (tst->_parent == cmp) {
    1844721392diff -Naur ncurses-5.7.orig/ncurses/curses.priv.h ncurses-5.7/ncurses/curses.priv.h
    1844821393--- ncurses-5.7.orig/ncurses/curses.priv.h      2008-10-04 14:37:45.000000000 -0700
    18449 +++ ncurses-5.7/ncurses/curses.priv.h   2009-03-22 21:17:08.400170414 -0700
     21394+++ ncurses-5.7/ncurses/curses.priv.h   2009-06-05 14:01:55.000000000 -0700
    1845021395@@ -1,5 +1,5 @@
    1845121396 /****************************************************************************
     
    1846521410 /*
    1846621411- * $Id: curses.priv.h,v 1.394 2008/10/04 21:37:45 tom Exp $
    18467 + * $Id: curses.priv.h,v 1.403 2009/02/28 20:55:48 tom Exp $
     21412+ * $Id: curses.priv.h,v 1.420 2009/05/30 15:53:46 tom Exp $
    1846821413  *
    1846921414  *     curses.priv.h
     
    1847821423 #if HAVE_WORKING_POLL
    1847921424 #define USE_FUNC_POLL 1
    18480 @@ -257,6 +256,38 @@
     21425@@ -195,6 +194,16 @@
     21426 #endif
     21427 
     21428 /*
     21429+ * Options for terminal drivers, etc...
     21430+ */
     21431+#if 0
     21432+#define USE_SP_RIPOFF     1
     21433+#define USE_SP_TERMTYPE   1
     21434+#define USE_SP_WINDOWLIST 1
     21435+#define USE_TERM_DRIVER   1
     21436+#endif
     21437+
     21438+/*
     21439  * Note:  ht/cbt expansion flakes out randomly under Linux 1.1.47, but only
     21440  * when we're throwing control codes at the screen at high volume.  To see
     21441  * this, re-enable USE_HARD_TABS and run worm for a while.  Other systems
     21442@@ -257,8 +266,59 @@
    1848121443 #define NCURSES_OPAQUE 0
    1848221444 
     
    1850521467+#include <nc_panel.h>
    1850621468+
    18507 +#define IsPreScreen(sp)      (((sp)!=0) && sp->_prescreen)
    18508 +#define HasTerminal(sp)      (((sp)!=0) && (0!=((sp)->_term)))
    18509 +#define IsValidScreen(sp)    (HasTerminal(sp) && !sp->_prescreen)
     21469+#define IsPreScreen(sp)      (((sp) != 0) && sp->_prescreen)
     21470+#define HasTerminal(sp)      (((sp) != 0) && (0 != ((sp)->_term)))
     21471+#define IsValidScreen(sp)    (HasTerminal(sp) && !IsPreScreen(sp))
     21472+
    1851021473+#if BROKEN_LINKER || USE_REENTRANT
    18511 +#define TerminalOf(sp)       ((sp)?((sp)->_term?(sp)->_term:_nc_prescreen._cur_term): _nc_prescreen._cur_term)
     21474+#define CurTerm              _nc_prescreen._cur_term
    1851221475+#else
    18513 +#define TerminalOf(sp)       ((sp)?((sp)->_term?(sp)->_term:cur_term):cur_term)
     21476+#define CurTerm              cur_term
    1851421477+#endif
    1851521478+
     21479+#if NCURSES_SP_FUNCS
     21480+#define TerminalOf(sp)       ((sp) ? ((sp)->_term ? (sp)->_term : CurTerm) : CurTerm)
     21481+#else
     21482+#define TerminalOf(sp)       CurTerm
     21483+#endif
     21484+
    1851621485 #include <term.h>
     21486+
     21487+/*
     21488+ * Reduce dependency on cur_term global by using terminfo data from SCREEN's
     21489+ * pointer to this data.
     21490+ */
     21491+#ifdef USE_SP_TERMTYPE
     21492+#undef CUR
     21493+#endif
     21494+
     21495+#define SP_TERMTYPE TerminalOf(sp)->type.
     21496+
    1851721497 #include <term_entry.h>
     21498+
    1851821499 #include <nc_tparm.h>
    18519 @@ -289,7 +320,7 @@
     21500 
     21501 #if NCURSES_EXT_COLORS && USE_WIDEC_SUPPORT
     21502@@ -272,8 +332,14 @@
     21503 #define GET_WINDOW_PAIR(w)     (w)->_color
     21504 #define SET_WINDOW_PAIR(w,p)   (w)->_color = (p)
     21505 #define SameAttrOf(a,b)                (AttrOf(a) == AttrOf(b) && GetPair(a) == GetPair(b))
     21506-#define VIDATTR(attr, pair)    vid_attr(attr, pair, 0)
     21507+
     21508+#if NCURSES_SP_FUNCS
     21509+#define VIDATTR(sp,attr,pair)  NCURSES_SP_NAME(vid_attr)(sp, attr, pair, 0)
     21510 #else
     21511+#define VIDATTR(sp,attr,pair)  vid_attr(attr, pair, 0)
     21512+#endif
     21513+
     21514+#else /* !(NCURSES_EXT_COLORS && USE_WIDEC_SUPPORT) */
     21515 #define if_EXT_COLORS(stmt)    /* nothing */
     21516 #define SetPair(value,p)       RemAttr(value, A_COLOR), \
     21517                                SetAttr(value, AttrOf(value) | (A_COLOR & COLOR_PAIR(p)))
     21518@@ -283,13 +349,19 @@
     21519 #define SET_WINDOW_PAIR(w,p)   WINDOW_ATTRS(w) &= ALL_BUT_COLOR, \
     21520                                WINDOW_ATTRS(w) |= (A_COLOR & COLOR_PAIR(p))
     21521 #define SameAttrOf(a,b)                (AttrOf(a) == AttrOf(b))
     21522-#define VIDATTR(attr, pair)    vidattr(attr)
     21523+
     21524+#if NCURSES_SP_FUNCS
     21525+#define VIDATTR(sp,attr,pair)  NCURSES_SP_NAME(vidattr)(sp, attr)
     21526+#else
     21527+#define VIDATTR(sp,attr,pair)  vidattr(attr)
     21528 #endif
     21529 
     21530+#endif /* NCURSES_EXT_COLORS && USE_WIDEC_SUPPORT */
     21531+
    1852021532 #if NCURSES_NO_PADDING
    1852121533 #define GetNoPadding(sp)       ((sp) ? (sp)->_no_padding : _nc_prescreen._no_padding)
     
    1852621538 #define GetNoPadding(sp)       FALSE
    1852721539 #define SetNoPadding(sp)       /*nothing*/
    18528 @@ -404,6 +435,8 @@
     21540@@ -302,17 +374,31 @@
     21541 #define SET_SCREEN_PAIR(s,p)   SetPair(SCREEN_ATTRS(s), p)
     21542 
     21543 #if USE_REENTRANT
     21544-NCURSES_EXPORT(int *) _nc_ptr_Lines (void);
     21545-NCURSES_EXPORT(int *) _nc_ptr_Cols (void);
     21546-#define ptrLines() (SP ? &(SP->_LINES) : &(_nc_prescreen._LINES))
     21547-#define ptrCols()  (SP ? &(SP->_COLS)  : &(_nc_prescreen._COLS))
     21548-#define SET_LINES(value) *_nc_ptr_Lines() = value
     21549-#define SET_COLS(value)  *_nc_ptr_Cols() = value
     21550-#else
     21551-#define ptrLines() &LINES
     21552-#define ptrCols()  &COLS
     21553-#define SET_LINES(value) LINES = value
     21554-#define SET_COLS(value)  COLS = value
     21555+
     21556+NCURSES_EXPORT(int *)        _nc_ptr_Lines (SCREEN *);
     21557+NCURSES_EXPORT(int *)        _nc_ptr_Cols (SCREEN *);
     21558+NCURSES_EXPORT(int *)        _nc_ptr_Tabsize (SCREEN *);
     21559+NCURSES_EXPORT(int *)        _nc_ptr_Escdelay (SCREEN *);
     21560+
     21561+#define ptrLines(sp)         (sp ? &(sp->_LINES) : &(_nc_prescreen._LINES))
     21562+#define ptrCols(sp)          (sp ? &(sp->_COLS) : &(_nc_prescreen._COLS))
     21563+#define ptrTabsize(sp)       (sp ? &(sp->_TABSIZE) : &(_nc_prescreen._TABSIZE))
     21564+#define ptrEscdelay(sp)      (sp ? &(sp->_ESCDELAY) : &(_nc_prescreen._ESCDELAY))
     21565+
     21566+#define SET_LINES(value)     *_nc_ptr_Lines(SP_PARM) = value
     21567+#define SET_COLS(value)      *_nc_ptr_Cols(SP_PARM) = value
     21568+#define SET_TABSIZE(value)   *_nc_ptr_Tabsize(SP_PARM) = value
     21569+#define SET_ESCDELAY(value)  *_nc_ptr_Escdelay(SP_PARM) = value
     21570+
     21571+#else
     21572+
     21573+#define ptrLines(sp)         &LINES
     21574+#define ptrCols(sp)          &COLS
     21575+#define SET_LINES(value)     LINES = value
     21576+#define SET_COLS(value)      COLS = value
     21577+#define SET_TABSIZE(value)   TABSIZE = value
     21578+#define SET_ESCDELAY(value)  ESCDELAY = value
     21579+
     21580 #endif
     21581 
     21582 #define TR_MUTEX(data) _tracef("%s@%d: me:%08lX COUNT:%2u/%2d/%6d/%2d/%s%9u: " #data, \
     21583@@ -404,6 +490,8 @@
    1852921584 #define C_SHIFT 9              /* we need more bits than there are colors */
    1853021585 #define C_MASK                 ((1 << C_SHIFT) - 1)
     
    1853521590 
    1853621591 #define COLOR_DEFAULT          C_MASK
    18537 @@ -464,13 +497,13 @@
     21592@@ -464,13 +552,13 @@
    1853821593 } slk_ent;
    1853921594 
     
    1855521610 } SLK;
    1855621611 
    18557 @@ -703,6 +736,8 @@
     21612@@ -493,10 +581,10 @@
     21613 typedef int (*TYPE_Gpm_Close) (void);
     21614 typedef int (*TYPE_Gpm_GetEvent) (Gpm_Event *);
     21615 
     21616-#define my_gpm_fd       SP->_mouse_gpm_fd
     21617-#define my_Gpm_Open     SP->_mouse_Gpm_Open
     21618-#define my_Gpm_Close    SP->_mouse_Gpm_Close
     21619-#define my_Gpm_GetEvent SP->_mouse_Gpm_GetEvent
     21620+#define my_gpm_fd       SP_PARM->_mouse_gpm_fd
     21621+#define my_Gpm_Open     SP_PARM->_mouse_Gpm_Open
     21622+#define my_Gpm_Close    SP_PARM->_mouse_Gpm_Close
     21623+#define my_Gpm_GetEvent SP_PARM->_mouse_Gpm_GetEvent
     21624 #else
     21625 /* link statically to GPM */
     21626 #define my_gpm_fd       &gpm_fd
     21627@@ -609,8 +697,10 @@
     21628        int             tgetent_index;
     21629        long            tgetent_sequence;
     21630 
     21631+#ifndef USE_SP_WINDOWLIST
     21632        WINDOWLIST      *_nc_windowlist;
     21633-#define _nc_windows    _nc_globals._nc_windowlist
     21634+#define WindowList(sp) _nc_globals._nc_windowlist
     21635+#endif
     21636 
     21637 #if USE_HOME_TERMINFO
     21638        char            *home_terminfo;
     21639@@ -644,7 +734,9 @@
     21640        char            traceatr_color_buf[2][80];
     21641        int             traceatr_color_sel;
     21642        int             traceatr_color_last;
     21643-
     21644+#if !defined(USE_PTHREADS) && USE_REENTRANT
     21645+       int             nested_tracef;
     21646+#endif
     21647 #endif /* TRACE */
     21648 
     21649 #ifdef USE_PTHREADS
     21650@@ -669,8 +761,10 @@
     21651        bool            use_env;
     21652        bool            filter_mode;
     21653        attr_t          previous_attr;
     21654+#ifndef USE_SP_RIPOFF
     21655        ripoff_t        rippedoff[N_RIPS];
     21656        ripoff_t        *rsp;
     21657+#endif
     21658        TPARM_STATE     tparm_state;
     21659        TTY             *saved_tty;     /* savetty/resetty information      */
     21660 #if NCURSES_NO_PADDING
     21661@@ -680,6 +774,8 @@
     21662        chtype          *real_acs_map;
     21663        int             _LINES;
     21664        int             _COLS;
     21665+       int             _TABSIZE;
     21666+       int             _ESCDELAY;
     21667        TERMINAL        *_cur_term;
     21668 #ifdef TRACE
     21669        long            _outchars;
     21670@@ -688,8 +784,16 @@
     21671 #endif
     21672 } NCURSES_PRESCREEN;
     21673 
     21674-#define ripoff_sp      _nc_prescreen.rsp
     21675-#define ripoff_stack   _nc_prescreen.rippedoff
     21676+/*
     21677+ * Use screen-specific ripoff data (for softkeys) rather than global.
     21678+ */
     21679+#ifdef USE_SP_RIPOFF
     21680+#define safe_ripoff_sp     (sp)->rsp
     21681+#define safe_ripoff_stack  (sp)->rippedoff
     21682+#else
     21683+#define safe_ripoff_sp    _nc_prescreen.rsp
     21684+#define safe_ripoff_stack  _nc_prescreen.rippedoff
     21685+#endif
     21686 
     21687 extern NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen;
     21688 
     21689@@ -703,6 +807,8 @@
    1855821690        char            *_setbuf;       /* buffered I/O for output          */
    1855921691        bool            _filtered;      /* filter() was called              */
     
    1856421696        TERMINAL        *_term;         /* terminal type information        */
    1856521697        TTY             _saved_tty;     /* savetty/resetty information      */
    18566 @@ -794,11 +829,13 @@
     21698@@ -716,6 +822,10 @@
     21699        WINDOW          *_newscr;       /* virtual screen to be updated to  */
     21700        WINDOW          *_stdscr;       /* screen's full-window context     */
     21701 
     21702+#define CurScreen(sp)  (sp)->_curscr
     21703+#define NewScreen(sp)  (sp)->_newscr
     21704+#define StdScreen(sp)  (sp)->_stdscr
     21705+
     21706        TRIES           *_keytry;       /* "Try" for use with keypad mode   */
     21707        TRIES           *_key_ok;       /* Disabled keys via keyok(,FALSE)  */
     21708        bool            _tried;         /* keypad mode was initialized      */
     21709@@ -794,11 +904,13 @@
    1856721710        int             _color_count;   /* count of colors in palette        */
    1856821711        colorpair_t     *_color_pairs;  /* screen's color pair list          */
     
    1857821721        chtype          _ok_attributes; /* valid attributes for terminal     */
    1857921722        chtype          _xmc_suppress;  /* attributes to suppress if xmc     */
    18580 @@ -1263,7 +1300,7 @@
     21723@@ -895,7 +1007,7 @@
     21724        int             _oldnum_size;
     21725 
     21726        bool            _cleanup;       /* cleanup after int/quit signal */
     21727-       int             (*_outch)(int); /* output handler if not putc */
     21728+       NCURSES_SP_OUTC _outch;         /* output handler if not putc */
     21729 
     21730        int             _legacy_coding; /* see use_legacy_coding() */
     21731 
     21732@@ -915,6 +1027,15 @@
     21733        char            tracechr_buf[40];
     21734        char            tracemse_buf[TRACEMSE_MAX];
     21735 #endif
     21736+#ifdef USE_SP_WINDOWLIST
     21737+       WINDOWLIST*     _windowlist;
     21738+#define WindowList(sp)  (sp)->_windowlist
     21739+#endif
     21740+       NCURSES_OUTC    jump;
     21741+
     21742+       ripoff_t        rippedoff[N_RIPS];
     21743+       ripoff_t        *rsp;
     21744+
     21745        /*
     21746         * ncurses/ncursesw are the same up to this point.
     21747         */
     21748@@ -943,6 +1064,20 @@
     21749 
     21750 #define WINDOW_EXT(win,field) (((WINDOWLIST *)(win))->field)
     21751 
     21752+#define SP_PRE_INIT(sp)                         \
     21753+    sp->_cursrow = -1;                          \
     21754+    sp->_curscol = -1;                          \
     21755+    sp->_nl = TRUE;                             \
     21756+    sp->_raw = FALSE;                           \
     21757+    sp->_cbreak = 0;                            \
     21758+    sp->_echo = TRUE;                           \
     21759+    sp->_fifohead = -1;                         \
     21760+    sp->_endwin = TRUE;                         \
     21761+    sp->_cursor = -1;                           \
     21762+    WindowList(sp) = 0;                         \
     21763+    sp->_outch = NCURSES_SP_NAME(_nc_outch);    \
     21764+    sp->jump = 0                                \
     21765+
     21766 /* usually in <limits.h> */
     21767 #ifndef UCHAR_MAX
     21768 #define UCHAR_MAX 255
     21769@@ -1112,7 +1247,7 @@
     21770                                AttrOf(dst) |= (ext + 1)
     21771 
     21772 #define if_WIDEC(code)  code
     21773-#define Charable(ch)   ((SP != 0 && SP->_legacy_coding)                \
     21774+#define Charable(ch)   ((SP_PARM != 0 && SP_PARM->_legacy_coding)      \
     21775                         || (AttrOf(ch) & A_ALTCHARSET)                 \
     21776                         || (!isWidecExt(ch) &&                         \
     21777                             (ch).chars[1] == L'\0' &&                  \
     21778@@ -1214,8 +1349,8 @@
     21779  * Standardize/simplify common loops
     21780  */
     21781 #define each_screen(p) p = _nc_screen_chain; p != 0; p = (p)->_next_screen
     21782-#define each_window(p) p = _nc_windows; p != 0; p = (p)->next
     21783-#define each_ripoff(p) p = ripoff_stack; (p - ripoff_stack) < N_RIPS; ++p
     21784+#define each_window(sp,p) p = WindowList(sp); p != 0; p = (p)->next
     21785+#define each_ripoff(p) p = safe_ripoff_stack; (p - safe_ripoff_stack) < N_RIPS; ++p
     21786 
     21787 /*
     21788  * Prefixes for call/return points of library function traces.  We use these to
     21789@@ -1263,7 +1398,7 @@
    1858121790 #define returnBool(code)       TRACE_RETURN(code,bool)
    1858221791 #define returnCPtr(code)       TRACE_RETURN(code,cptr)
     
    1858721796 #define returnPtr(code)                TRACE_RETURN(code,ptr)
    1858821797 #define returnSP(code)         TRACE_RETURN(code,sp)
    18589 @@ -1322,7 +1359,7 @@
     21798@@ -1322,7 +1457,7 @@
    1859021799 #define returnBool(code)       return code
    1859121800 #define returnCPtr(code)       return code
     
    1859621805 #define returnPtr(code)                return code
    1859721806 #define returnSP(code)         return code
    18598 @@ -1519,7 +1556,7 @@
     21807@@ -1348,7 +1483,7 @@
     21808 
     21809 #define ALL_BUT_COLOR ((chtype)~(A_COLOR))
     21810 #define NONBLANK_ATTR (A_NORMAL|A_BOLD|A_DIM|A_BLINK)
     21811-#define XMC_CHANGES(c) ((c) & SP->_xmc_suppress)
     21812+#define XMC_CHANGES(c) ((c) & SP_PARM->_xmc_suppress)
     21813 
     21814 #define toggle_attr_on(S,at) {\
     21815    if (PAIR_NUMBER(at) > 0) {\
     21816@@ -1367,38 +1502,38 @@
     21817    }\
     21818    TR(TRACE_ATTRS, ("new attribute is %s", _traceattr((S))));}
     21819 
     21820-#define DelCharCost(count) \
     21821+#define DelCharCost(sp,count) \
     21822                ((parm_dch != 0) \
     21823-               ? SP->_dch_cost \
     21824+               ? sp->_dch_cost \
     21825                : ((delete_character != 0) \
     21826-                       ? (SP->_dch1_cost * count) \
     21827+                       ? (sp->_dch1_cost * count) \
     21828                        : INFINITY))
     21829 
     21830-#define InsCharCost(count) \
     21831+#define InsCharCost(sp,count) \
     21832                ((parm_ich != 0) \
     21833-               ? SP->_ich_cost \
     21834+               ? sp->_ich_cost \
     21835                : ((enter_insert_mode && exit_insert_mode) \
     21836-                 ? SP->_smir_cost + SP->_rmir_cost + (SP->_ip_cost * count) \
     21837+                 ? sp->_smir_cost + sp->_rmir_cost + (sp->_ip_cost * count) \
     21838                  : ((insert_character != 0) \
     21839-                   ? ((SP->_ich1_cost + SP->_ip_cost) * count) \
     21840+                   ? ((sp->_ich1_cost + sp->_ip_cost) * count) \
     21841                    : INFINITY)))
     21842 
     21843 #if USE_XMC_SUPPORT
     21844-#define UpdateAttrs(c) if (!SameAttrOf(SCREEN_ATTRS(SP), c)) { \
     21845-                               attr_t chg = AttrOf(SCREEN_ATTRS(SP)); \
     21846-                               VIDATTR(AttrOf(c), GetPair(c)); \
     21847+#define UpdateAttrs(sp,c)      if (!SameAttrOf(SCREEN_ATTRS(sp), c)) { \
     21848+                               attr_t chg = AttrOf(SCREEN_ATTRS(sp)); \
     21849+                               VIDATTR(sp, AttrOf(c), GetPair(c)); \
     21850                                if (magic_cookie_glitch > 0 \
     21851-                                && XMC_CHANGES((chg ^ AttrOf(SCREEN_ATTRS(SP))))) { \
     21852+                                && XMC_CHANGES((chg ^ AttrOf(SCREEN_ATTRS(sp))))) { \
     21853                                        T(("%s @%d before glitch %d,%d", \
     21854                                                __FILE__, __LINE__, \
     21855-                                               SP->_cursrow, \
     21856-                                               SP->_curscol)); \
     21857-                                       _nc_do_xmc_glitch(chg); \
     21858+                                               sp->_cursrow, \
     21859+                                               sp->_curscol)); \
     21860+                                       NCURSES_SP_NAME(_nc_do_xmc_glitch)(NCURSES_SP_ARGx chg); \
     21861                                } \
     21862                        }
     21863 #else
     21864-#define UpdateAttrs(c) if (!SameAttrOf(SCREEN_ATTRS(SP), c)) \
     21865-                               VIDATTR(AttrOf(c), GetPair(c));
     21866+#define UpdateAttrs(sp,c)      if (!SameAttrOf(SCREEN_ATTRS(sp), c)) \
     21867+                                   VIDATTR(sp, AttrOf(c), GetPair(c));
     21868 #endif
     21869 
     21870 /*
     21871@@ -1483,8 +1618,8 @@
     21872 #endif
     21873 
     21874 /* lib_acs.c */
     21875-extern NCURSES_EXPORT(void) _nc_init_acs (void);       /* corresponds to traditional 'init_acs()' */
     21876-extern NCURSES_EXPORT(int) _nc_msec_cost (const char *const, int);  /* used by 'tack' program */
     21877+extern NCURSES_EXPORT(void) _nc_init_acs (void); /* corresponds to traditional 'init_acs()' */
     21878+extern NCURSES_EXPORT(int)  _nc_msec_cost (const char *const, int);  /* used by 'tack' program */
     21879 
     21880 /* lib_addch.c */
     21881 #if USE_WIDEC_SUPPORT
     21882@@ -1503,7 +1638,7 @@
     21883 extern NCURSES_EXPORT(int) _nc_wgetch(WINDOW *, unsigned long *, int EVENTLIST_2nd(_nc_eventlist *));
     21884 
     21885 /* lib_insch.c */
     21886-extern NCURSES_EXPORT(int) _nc_insert_ch(WINDOW *, chtype);
     21887+extern NCURSES_EXPORT(int) _nc_insert_ch(SCREEN *, WINDOW *, chtype);
     21888 
     21889 /* lib_mvcur.c */
     21890 #define INFINITY       1000000 /* cost: too high to use */
     21891@@ -1519,7 +1654,7 @@
    1859921892 extern NCURSES_EXPORT(void) _nc_screen_wrap (void);
    1860021893 
     
    1860521898 /* lib_mvcur.c */
    1860621899 #define INFINITY       1000000 /* cost: too high to use */
    18607 @@ -1592,6 +1629,8 @@
     21900@@ -1527,10 +1662,13 @@
     21901 
     21902 /* lib_setup.c */
     21903 extern NCURSES_EXPORT(char *) _nc_get_locale(void);
     21904-extern NCURSES_EXPORT(int) _nc_unicode_locale(void);
     21905-extern NCURSES_EXPORT(int) _nc_locale_breaks_acs(TERMINAL *);
     21906-extern NCURSES_EXPORT(int) _nc_setupterm(NCURSES_CONST char *, int, int *, bool);
     21907-extern NCURSES_EXPORT(void) _nc_get_screensize(SCREEN *, int *, int *);
     21908+extern NCURSES_EXPORT(int)    _nc_unicode_locale(void);
     21909+extern NCURSES_EXPORT(int)    _nc_locale_breaks_acs(TERMINAL *);
     21910+extern NCURSES_EXPORT(int)    _nc_setupterm(NCURSES_CONST char *, int, int *, bool);
     21911+extern NCURSES_EXPORT(void)   _nc_get_screensize(SCREEN *, int *, int *);
     21912+
     21913+/* lib_set_term.c */
     21914+extern NCURSES_EXPORT(int)    _nc_ripoffline(int, int(*)(WINDOW*, int));
     21915 
     21916 /* lib_tstp.c */
     21917 #if USE_SIGWINCH
     21918@@ -1539,9 +1677,6 @@
     21919 #define _nc_handle_sigwinch(a) /* nothing */
     21920 #endif
     21921 
     21922-/* lib_ungetch.c */
     21923-extern NCURSES_EXPORT(int) _nc_ungetch (SCREEN *, int);
     21924-
     21925 /* lib_wacs.c */
     21926 #if USE_WIDEC_SUPPORT
     21927 extern NCURSES_EXPORT(void) _nc_init_wacs(void);
     21928@@ -1577,8 +1712,6 @@
     21929 
     21930 /* elsewhere ... */
     21931 extern NCURSES_EXPORT(ENTRY *) _nc_delink_entry (ENTRY *, TERMTYPE *);
     21932-extern NCURSES_EXPORT(NCURSES_CONST char *) _nc_keyname (SCREEN *, int);
     21933-extern NCURSES_EXPORT(NCURSES_CONST char *) _nc_unctrl (SCREEN *, chtype);
     21934 extern NCURSES_EXPORT(SCREEN *) _nc_screen_of (WINDOW *);
     21935 extern NCURSES_EXPORT(WINDOW *) _nc_makenew (int, int, int, int, int);
     21936 extern NCURSES_EXPORT(char *) _nc_trace_buf (int, size_t);
     21937@@ -1592,12 +1725,14 @@
    1860821938 extern NCURSES_EXPORT(int) _nc_keypad (SCREEN *, bool);
    1860921939 extern NCURSES_EXPORT(int) _nc_ospeed (int);
     
    1861421944 extern NCURSES_EXPORT(int) _nc_setupscreen (int, int, FILE *, bool, int);
    1861521945 extern NCURSES_EXPORT(int) _nc_timed_wait (SCREEN *, int, int, int * EVENTLIST_2nd(_nc_eventlist *));
    18616 @@ -1663,7 +1702,7 @@
    18617  
    18618  #define NC_BUFFERED(flag) _nc_set_buffer(SP->_ofp, flag)
     21946-extern NCURSES_EXPORT(void) _nc_do_color (short, short, bool, int (*)(int));
     21947+extern NCURSES_EXPORT(void) _nc_do_color (short, short, bool, NCURSES_OUTC);
     21948 extern NCURSES_EXPORT(void) _nc_flush (void);
     21949-extern NCURSES_EXPORT(void) _nc_free_and_exit (int);
     21950+extern NCURSES_EXPORT(void) _nc_free_and_exit (int) GCC_NORETURN;
     21951 extern NCURSES_EXPORT(void) _nc_free_entry (ENTRY *, TERMTYPE *);
     21952 extern NCURSES_EXPORT(void) _nc_freeall (void);
     21953 extern NCURSES_EXPORT(void) _nc_hash_map (void);
     21954@@ -1661,9 +1796,9 @@
     21955 
     21956 #define USE_SETBUF_0 0
     21957 
     21958-#define NC_BUFFERED(flag) _nc_set_buffer(SP->_ofp, flag)
     21959+#define NC_BUFFERED(sp,flag) NCURSES_SP_NAME(_nc_set_buffer)(NCURSES_SP_ARGx sp->_ofp, flag)
    1861921960 
    1862021961-#define NC_OUTPUT ((SP != 0) ? SP->_ofp : stdout)
    18621 +#define NC_OUTPUT ((SP_PARM != 0) ? SP_PARM->_ofp : stdout)
     21962+#define NC_OUTPUT(sp) ((sp != 0) ? sp->_ofp : stdout)
    1862221963 
    1862321964 /*
    1862421965  * On systems with a broken linker, define 'SP' as a function to force the
    18625 @@ -1681,6 +1720,8 @@
    18626  #define _nc_set_screen(sp) SP = sp
     21966@@ -1672,13 +1807,21 @@
     21967 #if BROKEN_LINKER
     21968 #define SP _nc_screen()
     21969 extern NCURSES_EXPORT(SCREEN *) _nc_screen (void);
     21970-extern NCURSES_EXPORT(int) _nc_alloc_screen (void);
     21971-extern NCURSES_EXPORT(void) _nc_set_screen (SCREEN *);
     21972+extern NCURSES_EXPORT(int)      _nc_alloc_screen (void);
     21973+extern NCURSES_EXPORT(void)     _nc_set_screen (SCREEN *);
     21974+#define CURRENT_SCREEN          _nc_screen()
     21975 #else
     21976 /* current screen is private data; avoid possible linking conflicts too */
     21977 extern NCURSES_EXPORT_VAR(SCREEN *) SP;
     21978-#define _nc_alloc_screen() ((SP = typeCalloc(SCREEN, 1)) != 0)
     21979-#define _nc_set_screen(sp) SP = sp
     21980+#define CURRENT_SCREEN SP
     21981+#define _nc_alloc_screen()      ((SP = typeCalloc(SCREEN, 1)) != 0)
     21982+#define _nc_set_screen(sp)      SP = sp
     21983+#endif
     21984+
     21985+#if NCURSES_SP_FUNCS && 0
     21986+#define CURRENT_SCREEN_PRE      (IsPreScreen(CURRENT_SCREEN) ? CURRENT_SCREEN : new_prescr())
     21987+#else
     21988+#define CURRENT_SCREEN_PRE      CURRENT_SCREEN
    1862721989 #endif
    1862821990 
    18629 +#define CURRENT_SCREEN SP
    18630 +
    1863121991 /*
    18632   * We don't want to use the lines or columns capabilities internally, because
     21992@@ -1686,10 +1829,11 @@
    1863321993  * if the application is running multiple screens under X, it's quite possible
    18634 @@ -1715,6 +1756,79 @@
     21994  * they could all have type xterm but have different sizes!  So...
     21995  */
     21996-#define screen_lines   SP->_lines
     21997-#define screen_columns SP->_columns
     21998+#define screen_lines(sp)        (sp)->_lines
     21999+#define screen_columns(sp)      (sp)->_columns
     22000 
     22001 extern NCURSES_EXPORT(int) _nc_slk_initialize (WINDOW *, int);
     22002+extern NCURSES_EXPORT(int) _nc_format_slks (SCREEN *, int);
     22003 
     22004 /*
     22005  * Some constants related to SLK's
     22006@@ -1707,14 +1851,243 @@
     22007 #define MAX_SKEY(fmt)     (SLK_STDFMT(fmt)? MAX_SKEY_OLD : MAX_SKEY_PC)
     22008 #define MAX_SKEY_LEN(fmt) (SLK_STDFMT(fmt)? MAX_SKEY_LEN_OLD : MAX_SKEY_LEN_PC)
     22009 
     22010-extern NCURSES_EXPORT(int) _nc_ripoffline (int line, int (*init)(WINDOW *,int));
     22011-
     22012 /*
     22013  * Common error messages
     22014  */
    1863522015 #define MSG_NO_MEMORY "Out of memory"
    1863622016 #define MSG_NO_INPUTS "Premature EOF"
    1863722017 
     22018+extern NCURSES_EXPORT(int) _nc_set_tty_mode(TTY *);
     22019+extern NCURSES_EXPORT(int) _nc_get_tty_mode(TTY *);
     22020+
    1863822021+/* timed_wait flag definitions */
    1863922022+#define TW_NONE    0
     
    1864222025+#define TW_ANY     (TW_INPUT | TW_MOUSE)
    1864322026+#define TW_EVENT   4
     22027+
     22028+#define SetSafeOutcWrapper(outc)           \
     22029+    SCREEN* sp = CURRENT_SCREEN;            \
     22030+    if (sp==0) {                            \
     22031+       struct screen dummy;                \
     22032+       sp = &dummy;                        \
     22033+       memset(sp,0,sizeof(struct screen)); \
     22034+       sp->_outch = _nc_outc_wrapper;      \
     22035+    }\
     22036+    sp->jump = outc
     22037+
     22038+struct DriverTCB; /* Terminal Control Block forward declaration */
     22039+typedef void* TERM_HANDLE;
     22040+
     22041+typedef struct _termInfo
     22042+{
     22043+    bool caninit;
     22044+
     22045+    bool hascolor;
     22046+    bool initcolor;
     22047+    bool canchange;
     22048+
     22049+    int  tabsize;
     22050+
     22051+    int  maxcolors;
     22052+    int  maxpairs;
     22053+    int  nocolorvideo;
     22054+
     22055+    int  numlabels;
     22056+    int  labelwidth;
     22057+    int  labelheight;
     22058+
     22059+    const color_t* defaultPalette;
     22060+} TerminalInfo;
     22061+
     22062+typedef struct term_driver {
     22063+    bool   isTerminfo;
     22064+    bool   (*CanHandle)(struct DriverTCB*,const char*,int*);
     22065+    void   (*init)(struct DriverTCB*);
     22066+    void   (*release)(struct DriverTCB*);
     22067+    int    (*size)(struct DriverTCB*, int* Line, int *Cols);
     22068+    int    (*sgmode)(struct DriverTCB*, bool setFlag, TTY*);
     22069+    chtype (*conattr)(struct DriverTCB*);
     22070+    int    (*hwcur)(struct DriverTCB*, int yold, int xold, int y, int x);
     22071+    int    (*mode)(struct DriverTCB*, bool progFlag, bool defFlag);
     22072+    bool   (*rescol)(struct DriverTCB*);
     22073+    bool   (*rescolors)(struct DriverTCB*);
     22074+    void   (*color)(struct DriverTCB*,bool fore, int color, int(*)(SCREEN*,int));
     22075+    int    (*doBeepOrFlash)(struct DriverTCB*, bool);
     22076+    void   (*initpair)(struct DriverTCB*,short,short,short);
     22077+    void   (*initcolor)(struct DriverTCB*,short,short,short,short);
     22078+    void   (*docolor)(struct DriverTCB*,short,short,bool,int(*)(SCREEN*,int));
     22079+    void   (*initmouse)(struct DriverTCB*);
     22080+    void   (*setfilter)(struct DriverTCB*);
     22081+    void   (*hwlabel)(struct DriverTCB*,int,char*);
     22082+    void   (*hwlabelOnOff)(struct DriverTCB*,bool);
     22083+    int    (*update)(struct DriverTCB*);
     22084+    int    (*defaultcolors)(struct DriverTCB*,int,int);
     22085+    int    (*print)(struct DriverTCB*,char*,int);
     22086+    int    (*getsize)(struct DriverTCB*,int*,int*);
     22087+    int    (*setsize)(struct DriverTCB*,int,int);
     22088+    void   (*initacs)(struct DriverTCB*,chtype*,chtype*);
     22089+    void   (*scinit)(SCREEN *);
     22090+    void   (*scexit)(SCREEN *);
     22091+    int    (*twait)(struct DriverTCB*,int,int,int* EVENTLIST_2nd(_nc_eventlist*));
     22092+    int    (*read)(struct DriverTCB*,int*);
     22093+    int    (*nap)(struct DriverTCB*,int);
     22094+    int    (*kpad)(struct DriverTCB*, bool);
     22095+    int    (*kyOk)(struct DriverTCB*, int, bool);
     22096+    bool   (*kyExist)(struct DriverTCB*, int);
     22097+} TERM_DRIVER;
     22098+
     22099+
     22100+typedef struct DriverTCB
     22101+{
     22102+    TERMINAL      term;   /* needs to be the first Element !!! */
     22103+    TERM_HANDLE   inp;    /* The input handle of the Terminal */
     22104+    TERM_HANDLE   out;    /* The output handle of the Terminal in shell mode */
     22105+    TERM_HANDLE   hdl;    /* The output handle of the Terminal in prog  mode */
     22106+    TERM_DRIVER*  drv;    /* The driver for that Terminal */
     22107+    SCREEN*       csp;    /* The screen that owns that Terminal */
     22108+    TerminalInfo  info;   /* Driver independent core capabilities of the Terminal */
     22109+    void*         prop;   /* Driver dependent property storage to be used by the Driver */
     22110+    long          magic;
     22111+} TERMINAL_CONTROL_BLOCK;
     22112+
     22113+#define NCDRV_MAGIC(id) (0x47110000 | (id&0xffff))
     22114+#define NCDRV_TINFO      0x01
     22115+#define NCDRV_WINCONSOLE 0x02
     22116+
     22117+#define TCBOf(sp)    ((TERMINAL_CONTROL_BLOCK*)(TerminalOf(sp)))
     22118+#define InfoOf(sp)   TCBOf(sp)->info
     22119+#define CallDriver(sp,method)                        TCBOf(sp)->drv->method(TCBOf(sp))
     22120+#define CallDriver_1(sp,method,arg1)                 TCBOf(sp)->drv->method(TCBOf(sp),arg1)
     22121+#define CallDriver_2(sp,method,arg1,arg2)            TCBOf(sp)->drv->method(TCBOf(sp),arg1,arg2)
     22122+#define CallDriver_3(sp,method,arg1,arg2,arg3)       TCBOf(sp)->drv->method(TCBOf(sp),arg1,arg2,arg3)
     22123+#define CallDriver_4(sp,method,arg1,arg2,arg3,arg4)  TCBOf(sp)->drv->method(TCBOf(sp),arg1,arg2,arg3,arg4)
     22124+
     22125+extern NCURSES_EXPORT_VAR(const color_t*) _nc_cga_palette;
     22126+extern NCURSES_EXPORT_VAR(const color_t*) _nc_hls_palette;
     22127+
     22128+#ifdef USE_TERM_DRIVER
     22129+extern NCURSES_EXPORT(int)      _nc_tinfo_has_key(SCREEN*, int);
     22130+extern NCURSES_EXPORT(int)      _nc_tinfo_doupdate(SCREEN *sp);
     22131+extern NCURSES_EXPORT(int)      _nc_tinfo_mvcur(SCREEN*,int,int,int,int);
     22132+extern NCURSES_EXPORT(int)      _nc_get_driver(TERMINAL_CONTROL_BLOCK*, const char*, int*);
     22133+#endif
     22134+
     22135+#ifdef __MINGW32__
     22136+#include <nc_mingw.h>
     22137+extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_WIN_DRIVER;
     22138+#endif
     22139+extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_TINFO_DRIVER;
     22140+
     22141+#ifdef USE_TERM_DRIVER
     22142+#define IsTermInfo(sp)       (TCBOf(sp) && ((TCBOf(sp)->drv->isTerminfo)))
     22143+#else
     22144+#define IsTermInfo(sp)       TRUE
     22145+#endif
     22146+
     22147+#define HasTInfoTerminal(sp) ((0 != TerminalOf(sp)) && IsTermInfo(sp))
     22148+#define IsValidTIScreen(sp)  (HasTInfoTerminal(sp))
    1864422149+
    1864522150+/*
     
    1865222157+extern NCURSES_EXPORT(int)      _nc_outc_wrapper(SCREEN*,int);
    1865322158+
    18654 +extern NCURSES_EXPORT(TERMINAL*) NCURSES_SP_NAME(_nc_set_curterm)(SCREEN*,TERMINAL*);
    18655 +extern NCURSES_EXPORT(int)       NCURSES_SP_NAME(_nc_del_curterm)(SCREEN*,TERMINAL*);
     22159+#if USE_REENTRANT
     22160+extern NCURSES_EXPORT(char *)    NCURSES_SP_NAME(_nc_ttytype)(SCREEN*);
     22161+extern NCURSES_EXPORT(int)       NCURSES_SP_NAME(_nc_TABSIZE)(SCREEN*);
     22162+extern NCURSES_EXPORT(char *)    NCURSES_SP_NAME(longname)(SCREEN*);
     22163+#endif
    1865622164+
    1865722165+#if NCURSES_EXT_FUNCS
    1865822166+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_set_tabsize)(SCREEN*, int);
    1865922167+#endif
    18660 +
    18661 +extern NCURSES_EXPORT(chtype)   NCURSES_SP_NAME(_nc_acs_char)(SCREEN*,int);
    1866222168+
    1866322169+/*
     
    1866722173+extern NCURSES_EXPORT(SCREEN*)  _nc_SP(void);
    1866822174+
     22175+extern NCURSES_EXPORT(TERMINAL*) NCURSES_SP_NAME(_nc_set_curterm)(SCREEN*,TERMINAL*);
     22176+extern NCURSES_EXPORT(TERMINAL*) NCURSES_SP_NAME(cur_term)(SCREEN *sp);
     22177+extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(_nc_makenew) (SCREEN*, int, int, int, int, int);
     22178+extern NCURSES_EXPORT(bool)     NCURSES_SP_NAME(_nc_reset_colors)(SCREEN*);
     22179+extern NCURSES_EXPORT(char *)   NCURSES_SP_NAME(_nc_printf_string)(SCREEN*, const char *, va_list);
     22180+extern NCURSES_EXPORT(chtype)   NCURSES_SP_NAME(_nc_acs_char)(SCREEN*,int);
     22181+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_curs_set)(SCREEN*,int);
     22182+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_get_tty_mode)(SCREEN*,TTY*);
     22183+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_mcprint)(SCREEN*,char*, int);
     22184+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_msec_cost)(SCREEN*, const char *, int);
     22185+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_outch)(SCREEN*, int);
     22186+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_putp)(SCREEN*, const char *, const char*);
     22187+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_putp_flush)(SCREEN*, const char *, const char *);
     22188+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_resetty)(SCREEN*);
     22189+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_resize_term)(SCREEN*,int,int);
     22190+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_ripoffline)(SCREEN*, int, int (*)(WINDOW *,int));
     22191+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_savetty)(SCREEN*);
     22192+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_scr_init)(SCREEN*,const char*);
     22193+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_scr_restore)(SCREEN*, const char*);
     22194+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_scrolln)(SCREEN*, int, int, int, int);
     22195+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_set_tty_mode)(SCREEN*, TTY*);
     22196+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_setupscreen)(SCREEN**, int, int, FILE *, bool, int);
     22197+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_tgetent)(SCREEN*,char*,const char *);
     22198+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_tigetnum)(SCREEN*,NCURSES_CONST char*);
     22199+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_vid_attr)(SCREEN *, attr_t, short, void *);
    1866922200+extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_vidputs)(SCREEN*,chtype,int(*) (SCREEN*, int));
    18670 +extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_vidattr)(SCREEN *, chtype);
    18671 +
    18672 +extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_scr_restore)(SCREEN*, const char*);
    18673 +extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_scr_init)(SCREEN*,const char*);
    18674 +
    18675 +extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_restartterm)(SCREEN*,NCURSES_CONST char*,int,int*);
    18676 +extern NCURSES_EXPORT(bool)     NCURSES_SP_NAME(_nc_is_term_resized)(SCREEN*,int,int);
    18677 +extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_resize_term)(SCREEN*,int,int);
    18678 +extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_resizeterm)(SCREEN*,int,int);
    18679 +
    18680 +extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(_nc_outch)(SCREEN*, int ch);
    18681 +extern NCURSES_EXPORT(void)    NCURSES_SP_NAME(_nc_flush)(SCREEN*);
    18682 +extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(_nc_putp)(SCREEN*, const char *, const char *);
    18683 +extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(_nc_putp_flush)(SCREEN*, const char *, const char *);
    18684 +extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_tgetent)(SCREEN*,char*,const char *);
    18685 +extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_tputs)(SCREEN*,const char*,int,int(*)(SCREEN*, int));
    18686 +extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_savetty)(SCREEN*);
    18687 +extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_resetty)(SCREEN*);
    18688 +
    18689 +extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_mcprint)(SCREEN*,char*, int);
    18690 +extern NCURSES_EXPORT(char *)   NCURSES_SP_NAME(_nc_tgetstr)(SCREEN*,NCURSES_CONST char*,char**);
    18691 +extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_tgetflag)(SCREEN*,NCURSES_CONST char*);
    18692 +extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_tgetnum)(SCREEN*,NCURSES_CONST char*);
    18693 +extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_tigetflag)(SCREEN*,NCURSES_CONST char*);
    18694 +extern NCURSES_EXPORT(int)      NCURSES_SP_NAME(_nc_tigetnum)(SCREEN*,NCURSES_CONST char*);
    18695 +extern NCURSES_EXPORT(char *)   NCURSES_SP_NAME(_nc_tigetstr)(SCREEN*, NCURSES_CONST char*);
     22201+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_do_color)(SCREEN*, short, short, bool, NCURSES_SP_OUTC);
     22202+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_do_xmc_glitch)(SCREEN*, attr_t);
     22203+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_flush)(SCREEN*);
     22204+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_free_and_exit)(SCREEN*, int) GCC_NORETURN;
     22205+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_freeall)(SCREEN*);
     22206+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_hash_map)(SCREEN*);
     22207+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_init_acs)(SCREEN*);
     22208+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_make_oldhash)(SCREEN*, int i);
     22209+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_mvcur_init)(SCREEN*);
     22210+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_mvcur_resume)(SCREEN*);
     22211+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_mvcur_wrap)(SCREEN*);
     22212+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_screen_init)(SCREEN*);
     22213+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_screen_resume)(SCREEN*);
     22214+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_screen_wrap)(SCREEN*);
     22215+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_scroll_oldhash)(SCREEN*, int n, int top, int bot);
     22216+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_scroll_optimize)(SCREEN*);
     22217+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_set_buffer)(SCREEN*, FILE *, bool);
     22218+
    1869622219+extern NCURSES_EXPORT(void)     _nc_cookie_init(SCREEN *sp);
    18697 +extern NCURSES_EXPORT(int)      _nc_tinfo_doupdate(SCREEN *sp);
    18698 +extern NCURSES_EXPORT(int)      _nc_tinfo_mcprint(SCREEN*,char*,int);
     22220+
     22221+#if defined(TRACE) || defined(SCROLLDEBUG) || defined(HASHDEBUG)
     22222+extern NCURSES_EXPORT(void)     NCURSES_SP_NAME(_nc_linedump)(SCREEN*);
     22223+#endif
     22224+
    1869922225+#if USE_WIDEC_SUPPORT
    1870022226+extern NCURSES_EXPORT(wchar_t *) NCURSES_SP_NAME(_nc_wunctrl)(SCREEN*, cchar_t *);
    1870122227+#endif
    1870222228+
    18703 +/* FIXME - move these to curses.h.in */
    18704 +extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(getmouse) (SCREEN*, MEVENT *);
    18705 +extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(ungetmouse) (SCREEN*, MEVENT *);
    18706 +extern NCURSES_EXPORT(mmask_t) NCURSES_SP_NAME(mousemask) (SCREEN*, mmask_t, mmask_t *);
    18707 +extern NCURSES_EXPORT(int)     NCURSES_SP_NAME(mouseinterval) (SCREEN*, int);
    18708 +extern NCURSES_EXPORT(bool)    NCURSES_SP_NAME(has_mouse) (SCREEN*);
    1870922229+#endif /* NCURSES_SP_FUNCS */
     22230+
     22231+#if NCURSES_SP_FUNCS
     22232+
     22233+#define safe_keyname NCURSES_SP_NAME(keyname)
     22234+#define safe_unctrl  NCURSES_SP_NAME(unctrl)
     22235+#define safe_ungetch NCURSES_SP_NAME(ungetch)
     22236+
     22237+#else
     22238+
     22239+#define safe_keyname _nc_keyname
     22240+#define safe_unctrl  _nc_unctrl
     22241+#define safe_ungetch _nc_ungetch
     22242+
     22243+extern NCURSES_EXPORT(NCURSES_CONST char *) _nc_keyname (SCREEN *, int);
     22244+extern NCURSES_EXPORT(int) _nc_ungetch (SCREEN *, int);
     22245+extern NCURSES_EXPORT(NCURSES_CONST char *) _nc_unctrl (SCREEN *, chtype);
     22246+
     22247+#endif
    1871022248+
    1871122249 #ifdef __cplusplus
     
    1871422252diff -Naur ncurses-5.7.orig/ncurses/Makefile.in ncurses-5.7/ncurses/Makefile.in
    1871522253--- ncurses-5.7.orig/ncurses/Makefile.in        2008-10-18 07:11:54.000000000 -0700
    18716 +++ ncurses-5.7/ncurses/Makefile.in     2009-03-22 21:16:55.671355217 -0700
     22254+++ ncurses-5.7/ncurses/Makefile.in     2009-06-05 14:01:30.000000000 -0700
    1871722255@@ -1,6 +1,6 @@
    1871822256-# $Id: Makefile.in,v 1.113 2008/10/18 14:11:54 tom Exp $
    18719 +# $Id: Makefile.in,v 1.114 2009/01/03 19:09:26 tom Exp $
     22257+# $Id: Makefile.in,v 1.115 2009/03/28 18:22:39 Charles.Wilson Exp $
    1872022258 ##############################################################################
    1872122259-# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.                #
     
    1872422262 # Permission is hereby granted, free of charge, to any person obtaining a    #
    1872522263 # copy of this software and associated documentation files (the "Software"), #
    18726 @@ -78,7 +78,7 @@
     22264@@ -71,6 +71,7 @@
     22265 LIBTOOL_LINK   = @LIB_LINK@
     22266 LIBTOOL_INSTALL        = @LIB_INSTALL@
     22267 LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
     22268+LT_UNDEF       = @LT_UNDEF@
     22269 
     22270 INSTALL                = @INSTALL@
     22271 INSTALL_LIB    = @INSTALL@ @INSTALL_LIB@
     22272@@ -78,7 +79,7 @@
    1872722273 INSTALL_DATA   = @INSTALL_DATA@
    1872822274 
     
    1873322279 LD             = @LD@
    1873422280 LN_S           = @LN_S@
     22281diff -Naur ncurses-5.7.orig/ncurses/tinfo/access.c ncurses-5.7/ncurses/tinfo/access.c
     22282--- ncurses-5.7.orig/ncurses/tinfo/access.c     2007-11-17 16:57:53.000000000 -0800
     22283+++ ncurses-5.7/ncurses/tinfo/access.c  2009-06-05 14:01:33.000000000 -0700
     22284@@ -1,5 +1,5 @@
     22285 /****************************************************************************
     22286- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.              *
     22287+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
     22288  *                                                                          *
     22289  * Permission is hereby granted, free of charge, to any person obtaining a  *
     22290  * copy of this software and associated documentation files (the            *
     22291@@ -38,7 +38,7 @@
     22292 #include <tic.h>
     22293 #include <nc_alloc.h>
     22294 
     22295-MODULE_ID("$Id: access.c,v 1.14 2007/11/18 00:57:53 tom Exp $")
     22296+MODULE_ID("$Id: access.c,v 1.15 2009/04/05 00:03:10 tom Exp $")
     22297 
     22298 #define LOWERCASE(c) ((isalpha(UChar(c)) && isupper(UChar(c))) ? tolower(UChar(c)) : (c))
     22299 
     22300@@ -97,7 +97,7 @@
     22301        test = path;
     22302     else
     22303        test++;
     22304-    return (test - path);
     22305+    return (unsigned) (test - path);
     22306 }
     22307 
     22308 NCURSES_EXPORT(char *)
     22309diff -Naur ncurses-5.7.orig/ncurses/tinfo/alloc_ttype.c ncurses-5.7/ncurses/tinfo/alloc_ttype.c
     22310--- ncurses-5.7.orig/ncurses/tinfo/alloc_ttype.c        2008-10-12 09:12:00.000000000 -0700
     22311+++ ncurses-5.7/ncurses/tinfo/alloc_ttype.c     2009-06-05 14:01:44.000000000 -0700
     22312@@ -1,5 +1,5 @@
     22313 /****************************************************************************
     22314- * Copyright (c) 1999-2006,2008 Free Software Foundation, Inc.              *
     22315+ * Copyright (c) 1999-2008,2009 Free Software Foundation, Inc.              *
     22316  *                                                                          *
     22317  * Permission is hereby granted, free of charge, to any person obtaining a  *
     22318  * copy of this software and associated documentation files (the            *
     22319@@ -43,7 +43,7 @@
     22320 #include <tic.h>
     22321 #include <term_entry.h>
     22322 
     22323-MODULE_ID("$Id: alloc_ttype.c,v 1.17 2008/10/12 16:12:00 tom Exp $")
     22324+MODULE_ID("$Id: alloc_ttype.c,v 1.18 2009/04/18 21:01:38 tom Exp $")
     22325 
     22326 #if NCURSES_XNAMES
     22327 /*
     22328@@ -147,10 +147,10 @@
     22329 /*
     22330  * Returns the first index in ext_Names[] for the given token-type
     22331  */
     22332-static int
     22333+static unsigned
     22334 _nc_first_ext_name(TERMTYPE *tp, int token_type)
     22335 {
     22336-    int first;
     22337+    unsigned first;
     22338 
     22339     switch (token_type) {
     22340     case BOOLEAN:
     22341@@ -160,7 +160,7 @@
     22342        first = tp->ext_Booleans;
     22343        break;
     22344     case STRING:
     22345-       first = tp->ext_Booleans + tp->ext_Numbers;
     22346+       first = (unsigned) (tp->ext_Booleans + tp->ext_Numbers);
     22347        break;
     22348     default:
     22349        first = 0;
     22350@@ -172,17 +172,17 @@
     22351 /*
     22352  * Returns the last index in ext_Names[] for the given token-type
     22353  */
     22354-static int
     22355+static unsigned
     22356 _nc_last_ext_name(TERMTYPE *tp, int token_type)
     22357 {
     22358-    int last;
     22359+    unsigned last;
     22360 
     22361     switch (token_type) {
     22362     case BOOLEAN:
     22363        last = tp->ext_Booleans;
     22364        break;
     22365     case NUMBER:
     22366-       last = tp->ext_Booleans + tp->ext_Numbers;
     22367+       last = (unsigned) (tp->ext_Booleans + tp->ext_Numbers);
     22368        break;
     22369     default:
     22370     case STRING:
     22371@@ -204,7 +204,7 @@
     22372 
     22373     for (j = first; j < last; j++) {
     22374        if (!strcmp(name, tp->ext_Names[j])) {
     22375-           return j;
     22376+           return (int) j;
     22377        }
     22378     }
     22379     return -1;
     22380@@ -244,7 +244,7 @@
     22381     int first, last;
     22382 
     22383     if ((first = _nc_find_ext_name(tp, name, token_type)) >= 0) {
     22384-       last = NUM_EXT_NAMES(tp) - 1;
     22385+       last = (int) NUM_EXT_NAMES(tp) - 1;
     22386        for (j = first; j < last; j++) {
     22387            tp->ext_Names[j] = tp->ext_Names[j + 1];
     22388        }
     22389@@ -254,22 +254,22 @@
     22390            last = tp->num_Booleans - 1;
     22391            for (j = first; j < last; j++)
     22392                tp->Booleans[j] = tp->Booleans[j + 1];
     22393-           tp->ext_Booleans -= 1;
     22394-           tp->num_Booleans -= 1;
     22395+           tp->ext_Booleans--;
     22396+           tp->num_Booleans--;
     22397            break;
     22398        case NUMBER:
     22399            last = tp->num_Numbers - 1;
     22400            for (j = first; j < last; j++)
     22401                tp->Numbers[j] = tp->Numbers[j + 1];
     22402-           tp->ext_Numbers -= 1;
     22403-           tp->num_Numbers -= 1;
     22404+           tp->ext_Numbers--;
     22405+           tp->num_Numbers--;
     22406            break;
     22407        case STRING:
     22408            last = tp->num_Strings - 1;
     22409            for (j = first; j < last; j++)
     22410                tp->Strings[j] = tp->Strings[j + 1];
     22411-           tp->ext_Strings -= 1;
     22412-           tp->num_Strings -= 1;
     22413+           tp->ext_Strings--;
     22414+           tp->num_Strings--;
     22415            break;
     22416        }
     22417        return TRUE;
     22418@@ -307,22 +307,22 @@
     22419 
     22420     switch (token_type) {
     22421     case BOOLEAN:
     22422-       tp->ext_Booleans += 1;
     22423-       tp->num_Booleans += 1;
     22424+       tp->ext_Booleans++;
     22425+       tp->num_Booleans++;
     22426        tp->Booleans = typeRealloc(NCURSES_SBOOL, tp->num_Booleans, tp->Booleans);
     22427        for (k = tp->num_Booleans - 1; k > j; k--)
     22428            tp->Booleans[k] = tp->Booleans[k - 1];
     22429        break;
     22430     case NUMBER:
     22431-       tp->ext_Numbers += 1;
     22432-       tp->num_Numbers += 1;
     22433+       tp->ext_Numbers++;
     22434+       tp->num_Numbers++;
     22435        tp->Numbers = typeRealloc(short, tp->num_Numbers, tp->Numbers);
     22436        for (k = tp->num_Numbers - 1; k > j; k--)
     22437            tp->Numbers[k] = tp->Numbers[k - 1];
     22438        break;
     22439     case STRING:
     22440-       tp->ext_Strings += 1;
     22441-       tp->num_Strings += 1;
     22442+       tp->ext_Strings++;
     22443+       tp->num_Strings++;
     22444        tp->Strings = typeRealloc(char *, tp->num_Strings, tp->Strings);
     22445        for (k = tp->num_Strings - 1; k > j; k--)
     22446            tp->Strings[k] = tp->Strings[k - 1];
     22447@@ -345,7 +345,7 @@
     22448 
     22449     for (j = first; j < last;) {
     22450        char *name = to->ext_Names[j];
     22451-       unsigned j_str = to->num_Strings - first - to->ext_Strings;
     22452+       int j_str = to->num_Strings - first - to->ext_Strings;
     22453 
     22454        if (to->Strings[j + j_str] == CANCELLED_STRING) {
     22455            if ((k = _nc_find_ext_name(from, to->ext_Names[j], BOOLEAN)) >= 0) {
     22456diff -Naur ncurses-5.7.orig/ncurses/tinfo/captoinfo.c ncurses-5.7/ncurses/tinfo/captoinfo.c
     22457--- ncurses-5.7.orig/ncurses/tinfo/captoinfo.c  2008-08-16 12:24:51.000000000 -0700
     22458+++ ncurses-5.7/ncurses/tinfo/captoinfo.c       2009-06-05 14:01:30.000000000 -0700
     22459@@ -1,5 +1,5 @@
     22460 /****************************************************************************
     22461- * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc.              *
     22462+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     22463  *                                                                          *
     22464  * Permission is hereby granted, free of charge, to any person obtaining a  *
     22465  * copy of this software and associated documentation files (the            *
     22466@@ -93,7 +93,7 @@
     22467 #include <ctype.h>
     22468 #include <tic.h>
     22469 
     22470-MODULE_ID("$Id: captoinfo.c,v 1.52 2008/08/16 19:24:51 tom Exp $")
     22471+MODULE_ID("$Id: captoinfo.c,v 1.53 2009/03/28 20:44:23 tom Exp $")
     22472 
     22473 #define MAX_PUSHED     16      /* max # args we can push onto the stack */
     22474 
     22475@@ -128,7 +128,7 @@
     22476     size_t have = (d - my_string);
     22477     size_t need = have + strlen(s) + 2;
     22478     if (need > my_length) {
     22479-       my_string = (char *) realloc(my_string, my_length = (need + need));
     22480+       my_string = (char *) _nc_doalloc(my_string, my_length = (need + need));
     22481        if (my_string == 0)
     22482            _nc_err_abort(MSG_NO_MEMORY);
     22483        d = my_string + have;
     22484diff -Naur ncurses-5.7.orig/ncurses/tinfo/comp_scan.c ncurses-5.7/ncurses/tinfo/comp_scan.c
     22485--- ncurses-5.7.orig/ncurses/tinfo/comp_scan.c  2008-08-16 12:22:55.000000000 -0700
     22486+++ ncurses-5.7/ncurses/tinfo/comp_scan.c       2009-06-05 14:01:51.000000000 -0700
     22487@@ -51,7 +51,7 @@
     22488 #include <term_entry.h>
     22489 #include <tic.h>
     22490 
     22491-MODULE_ID("$Id: comp_scan.c,v 1.83 2008/08/16 19:22:55 tom Exp $")
     22492+MODULE_ID("$Id: comp_scan.c,v 1.84 2009/05/09 16:37:42 tom Exp $")
     22493 
     22494 /*
     22495  * Maximum length of string capability we'll accept before raising an error.
     22496@@ -61,19 +61,13 @@
     22497 
     22498 #define iswhite(ch)    (ch == ' '  ||  ch == '\t')
     22499 
     22500-NCURSES_EXPORT_VAR(int)
     22501-_nc_syntax = 0;                        /* termcap or terminfo? */
     22502-NCURSES_EXPORT_VAR(long)
     22503-_nc_curr_file_pos = 0;         /* file offset of current line */
     22504-NCURSES_EXPORT_VAR(long)
     22505-_nc_comment_start = 0;         /* start of comment range before name */
     22506-NCURSES_EXPORT_VAR(long)
     22507-_nc_comment_end = 0;           /* end of comment range before name */
     22508-NCURSES_EXPORT_VAR(long)
     22509-_nc_start_line = 0;            /* start line of current entry */
     22510+NCURSES_EXPORT_VAR (int) _nc_syntax = 0;         /* termcap or terminfo? */
     22511+NCURSES_EXPORT_VAR (long) _nc_curr_file_pos = 0; /* file offset of current line */
     22512+NCURSES_EXPORT_VAR (long) _nc_comment_start = 0; /* start of comment range before name */
     22513+NCURSES_EXPORT_VAR (long) _nc_comment_end = 0;   /* end of comment range before name */
     22514+NCURSES_EXPORT_VAR (long) _nc_start_line = 0;    /* start line of current entry */
     22515 
     22516-NCURSES_EXPORT_VAR(struct token)
     22517-_nc_curr_token =
     22518+NCURSES_EXPORT_VAR (struct token) _nc_curr_token =
     22519 {
     22520     0, 0, 0
     22521 };
     22522@@ -91,8 +85,7 @@
     22523 static char *pushname;
     22524 
     22525 #if NCURSES_EXT_FUNCS
     22526-NCURSES_EXPORT_VAR(bool)
     22527-_nc_disable_period = FALSE;    /* used by tic -a option */
     22528+NCURSES_EXPORT_VAR (bool) _nc_disable_period = FALSE; /* used by tic -a option */
     22529 #endif
     22530 
     22531 /*****************************************************************************
     22532@@ -637,7 +630,8 @@
     22533                /* just to get rid of the compiler warning */
     22534                type = UNDEF;
     22535                if (!silent)
     22536-                   _nc_warning("Illegal character - '%s'", unctrl((chtype) ch));
     22537+                   _nc_warning("Illegal character - '%s'",
     22538+                               unctrl((chtype) ch));
     22539            }
     22540        }                       /* end else (first_column == FALSE) */
     22541     }                          /* end else (ch != EOF) */
    1873522542diff -Naur ncurses-5.7.orig/ncurses/tinfo/entries.c ncurses-5.7/ncurses/tinfo/entries.c
    1873622543--- ncurses-5.7.orig/ncurses/tinfo/entries.c    2008-09-27 06:11:10.000000000 -0700
    18737 +++ ncurses-5.7/ncurses/tinfo/entries.c 2009-03-22 21:17:09.916267635 -0700
     22544+++ ncurses-5.7/ncurses/tinfo/entries.c 2009-06-05 14:01:21.000000000 -0700
    1873822545@@ -1,5 +1,5 @@
    1873922546 /****************************************************************************
     
    1876522572diff -Naur ncurses-5.7.orig/ncurses/tinfo/hashed_db.c ncurses-5.7/ncurses/tinfo/hashed_db.c
    1876622573--- ncurses-5.7.orig/ncurses/tinfo/hashed_db.c  2006-08-19 12:48:38.000000000 -0700
    18767 +++ ncurses-5.7/ncurses/tinfo/hashed_db.c       2009-03-22 21:16:50.643032825 -0700
     22574+++ ncurses-5.7/ncurses/tinfo/hashed_db.c       2009-06-05 14:00:57.000000000 -0700
    1876822575@@ -1,5 +1,5 @@
    1876922576 /****************************************************************************
     
    1886922676 }
    1887022677 
     22678diff -Naur ncurses-5.7.orig/ncurses/tinfo/init_keytry.c ncurses-5.7/ncurses/tinfo/init_keytry.c
     22679--- ncurses-5.7.orig/ncurses/tinfo/init_keytry.c        2008-05-24 14:44:51.000000000 -0700
     22680+++ ncurses-5.7/ncurses/tinfo/init_keytry.c     2009-06-05 14:01:51.000000000 -0700
     22681@@ -1,5 +1,5 @@
     22682 /****************************************************************************
     22683- * Copyright (c) 1999-2006,2008 Free Software Foundation, Inc.              *
     22684+ * Copyright (c) 1999-2008,2009 Free Software Foundation, Inc.              *
     22685  *                                                                          *
     22686  * Permission is hereby granted, free of charge, to any person obtaining a  *
     22687  * copy of this software and associated documentation files (the            *
     22688@@ -27,16 +27,11 @@
     22689  ****************************************************************************/
     22690 
     22691 #include <curses.priv.h>
     22692-
     22693-#include <term.h>
     22694-/* keypad_xmit, keypad_local, meta_on, meta_off */
     22695-/* cursor_visible,cursor_normal,cursor_invisible */
     22696-
     22697 #include <tic.h>               /* struct tinfo_fkeys */
     22698 
     22699 #include <term_entry.h>
     22700 
     22701-MODULE_ID("$Id: init_keytry.c,v 1.12 2008/05/24 21:44:51 tom Exp $")
     22702+MODULE_ID("$Id: init_keytry.c,v 1.14 2009/05/10 00:48:29 tom Exp $")
     22703 
     22704 /*
     22705 **      _nc_init_keytry()
     22706@@ -50,7 +45,7 @@
     22707  * than cur_term.
     22708  */
     22709 #undef CUR
     22710-#define CUR (sp->_term)->type.
     22711+#define CUR SP_TERMTYPE
     22712 
     22713 #if    BROKEN_LINKER
     22714 #undef _nc_tinfo_fkeys
     22715@@ -102,7 +97,8 @@
     22716                if (name != 0
     22717                    && *name == 'k'
     22718                    && value != 0
     22719-                   && key_defined(value) == 0) {
     22720+                   && NCURSES_SP_NAME(key_defined) (NCURSES_SP_ARGx
     22721+                                                    value) == 0) {
     22722                    (void) _nc_add_to_try(&(sp->_keytry),
     22723                                          value,
     22724                                          n - STRCOUNT + KEY_MAX);
    1887122725diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_acs.c ncurses-5.7/ncurses/tinfo/lib_acs.c
    1887222726--- ncurses-5.7.orig/ncurses/tinfo/lib_acs.c    2008-08-16 12:22:55.000000000 -0700
    18873 +++ ncurses-5.7/ncurses/tinfo/lib_acs.c 2009-03-22 21:17:11.636377985 -0700
    18874 @@ -35,12 +35,12 @@
    18875  #include <curses.priv.h>
    18876  #include <term.h>              /* ena_acs, acs_chars */
    18877  
    18878 -MODULE_ID("$Id: lib_acs.c,v 1.36 2008/08/16 19:22:55 tom Exp $")
    18879 +MODULE_ID("$Id: lib_acs.c,v 1.37 2009/03/21 19:39:23 tom Exp $")
    18880  
    18881  #if BROKEN_LINKER || USE_REENTRANT
    18882  #define MyBuffer _nc_prescreen.real_acs_map
    18883  NCURSES_EXPORT_VAR(chtype *)
    18884 -_nc_acs_map(void)
    18885 +NCURSES_PUBLIC_VAR(acs_map)(void)
    18886  {
    18887      if (MyBuffer == 0)
    18888         MyBuffer = typeCalloc(chtype, ACS_LEN);
    18889 diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_baudrate.c ncurses-5.7/ncurses/tinfo/lib_baudrate.c
    18890 --- ncurses-5.7.orig/ncurses/tinfo/lib_baudrate.c       2008-06-28 08:19:24.000000000 -0700
    18891 +++ ncurses-5.7/ncurses/tinfo/lib_baudrate.c    2009-03-22 21:17:05.651994412 -0700
     22727+++ ncurses-5.7/ncurses/tinfo/lib_acs.c 2009-06-05 14:01:51.000000000 -0700
    1889222728@@ -1,5 +1,5 @@
    1889322729 /****************************************************************************
     
    1889722733  * Permission is hereby granted, free of charge, to any person obtaining a  *
    1889822734  * copy of this software and associated documentation files (the            *
    18899 @@ -80,7 +80,7 @@
     22735@@ -35,12 +35,16 @@
     22736 #include <curses.priv.h>
     22737 #include <term.h>              /* ena_acs, acs_chars */
     22738 
     22739-MODULE_ID("$Id: lib_acs.c,v 1.36 2008/08/16 19:22:55 tom Exp $")
     22740+#ifndef CUR
     22741+#define CUR SP_TERMTYPE
     22742+#endif
     22743+
     22744+MODULE_ID("$Id: lib_acs.c,v 1.39 2009/05/10 00:48:29 tom Exp $")
     22745 
     22746 #if BROKEN_LINKER || USE_REENTRANT
     22747 #define MyBuffer _nc_prescreen.real_acs_map
     22748-NCURSES_EXPORT_VAR(chtype *)
     22749-_nc_acs_map(void)
     22750+NCURSES_EXPORT(chtype *)
     22751+NCURSES_PUBLIC_VAR(acs_map) (void)
     22752 {
     22753     if (MyBuffer == 0)
     22754        MyBuffer = typeCalloc(chtype, ACS_LEN);
     22755@@ -48,7 +52,7 @@
     22756 }
     22757 #undef MyBuffer
     22758 #else
     22759-NCURSES_EXPORT_VAR(chtype) acs_map[ACS_LEN] =
     22760+NCURSES_EXPORT_VAR (chtype) acs_map[ACS_LEN] =
     22761 {
     22762     0
     22763 };
     22764@@ -57,6 +61,9 @@
     22765 NCURSES_EXPORT(void)
     22766 _nc_init_acs(void)
     22767 {
     22768+#if NCURSES_SP_FUNCS
     22769+    SCREEN *sp = CURRENT_SCREEN;
     22770+#endif
     22771     chtype *fake_map = acs_map;
     22772     chtype *real_map = SP != 0 ? SP->_acs_map : fake_map;
     22773     int j;
     22774diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_baudrate.c ncurses-5.7/ncurses/tinfo/lib_baudrate.c
     22775--- ncurses-5.7.orig/ncurses/tinfo/lib_baudrate.c       2008-06-28 08:19:24.000000000 -0700
     22776+++ ncurses-5.7/ncurses/tinfo/lib_baudrate.c    2009-06-05 14:01:51.000000000 -0700
     22777@@ -1,5 +1,5 @@
     22778 /****************************************************************************
     22779- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     22780+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     22781  *                                                                          *
     22782  * Permission is hereby granted, free of charge, to any person obtaining a  *
     22783  * copy of this software and associated documentation files (the            *
     22784@@ -38,7 +38,6 @@
     22785  */
     22786 
     22787 #include <curses.priv.h>
     22788-#include <term.h>              /* cur_term, pad_char */
     22789 #include <termcap.h>           /* ospeed */
     22790 #if defined(__FreeBSD__)
     22791 #include <sys/param.h>
     22792@@ -80,7 +79,7 @@
    1890022793 #undef USE_OLD_TTY
    1890122794 #endif /* USE_OLD_TTY */
    1890222795 
    1890322796-MODULE_ID("$Id: lib_baudrate.c,v 1.27 2008/06/28 15:19:24 tom Exp $")
    18904 +MODULE_ID("$Id: lib_baudrate.c,v 1.28 2009/02/14 21:41:22 tom Exp $")
     22797+MODULE_ID("$Id: lib_baudrate.c,v 1.29 2009/02/21 17:22:13 tom Exp $")
    1890522798 
    1890622799 /*
    1890722800  *     int
    18908 @@ -195,7 +195,7 @@
     22801@@ -195,11 +194,11 @@
    1890922802 }
    1891022803 
     
    1891522808     int result;
    1891622809 
    18917 @@ -207,7 +207,7 @@
     22810-    T((T_CALLED("baudrate()")));
     22811+    T((T_CALLED("baudrate(%p)"), SP_PARM));
     22812 
     22813     /*
     22814      * In debugging, allow the environment symbol to override when we're
     22815@@ -207,7 +206,8 @@
    1891822816      * that take into account costs that depend on baudrate.
    1891922817      */
    1892022818 #ifdef TRACE
    1892122819-    if (!isatty(fileno(SP ? SP->_ofp : stdout))
    18922 +    if (!isatty(fileno(SP_PARM ? SP_PARM->_ofp : stdout))
     22820+    if (IsValidTIScreen(SP_PARM)
     22821+       && !isatty(fileno(SP_PARM ? SP_PARM->_ofp : stdout))
    1892322822        && getenv("BAUDRATE") != 0) {
    1892422823        int ret;
    1892522824        if ((ret = _nc_getenv_num("BAUDRATE")) <= 0)
    18926 @@ -236,3 +236,11 @@
     22825@@ -217,22 +217,30 @@
     22826     }
     22827 #endif
     22828 
     22829-    if (cur_term != 0) {
     22830+    if (IsValidTIScreen(SP_PARM)) {
     22831 #ifdef USE_OLD_TTY
     22832-       result = cfgetospeed(&cur_term->Nttyb);
     22833+       result = cfgetospeed(&(TerminalOf(SP_PARM)->Nttyb));
     22834        ospeed = _nc_ospeed(result);
     22835 #else /* !USE_OLD_TTY */
     22836 #ifdef TERMIOS
     22837-       ospeed = cfgetospeed(&cur_term->Nttyb);
     22838+       ospeed = cfgetospeed(&(TerminalOf(SP_PARM)->Nttyb));
     22839 #else
     22840-       ospeed = cur_term->Nttyb.sg_ospeed;
     22841+       ospeed = TerminalOf(SP_PARM)->Nttyb.sg_ospeed;
     22842 #endif
     22843        result = _nc_baudrate(ospeed);
     22844 #endif
     22845-       cur_term->_baudrate = result;
     22846+       TerminalOf(SP_PARM)->_baudrate = result;
     22847     } else {
     22848        result = ERR;
     22849     }
    1892722850 
    1892822851     returnCode(result);
     
    1893822861diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_cur_term.c ncurses-5.7/ncurses/tinfo/lib_cur_term.c
    1893922862--- ncurses-5.7.orig/ncurses/tinfo/lib_cur_term.c       2008-08-16 12:22:55.000000000 -0700
    18940 +++ ncurses-5.7/ncurses/tinfo/lib_cur_term.c    2009-03-22 21:17:09.916267635 -0700
     22863+++ ncurses-5.7/ncurses/tinfo/lib_cur_term.c    2009-06-05 14:01:55.000000000 -0700
    1894122864@@ -1,5 +1,5 @@
    1894222865 /****************************************************************************
     
    1895122874 
    1895222875-MODULE_ID("$Id: lib_cur_term.c,v 1.18 2008/08/16 19:22:55 tom Exp $")
    18953 +MODULE_ID("$Id: lib_cur_term.c,v 1.20 2009/03/14 14:39:32 tom Exp $")
     22876+MODULE_ID("$Id: lib_cur_term.c,v 1.22 2009/05/30 13:55:19 tom Exp $")
    1895422877 
    1895522878 #undef CUR
     
    1897422897 #else
    1897522898     cur_term = termp;
     22899@@ -84,7 +88,7 @@
     22900 }
     22901 
     22902 NCURSES_EXPORT(int)
     22903-del_curterm(TERMINAL * termp)
     22904+NCURSES_SP_NAME(del_curterm) (NCURSES_SP_DCLx TERMINAL * termp)
     22905 {
     22906     int rc = ERR;
     22907 
     22908@@ -94,6 +98,10 @@
     22909     if (termp != 0) {
     22910        _nc_free_termtype(&(termp->type));
     22911        FreeIfNeeded(termp->_termname);
     22912+#if USE_HOME_TERMINFO
     22913+       if (_nc_globals.home_terminfo != 0)
     22914+           FreeAndNull(_nc_globals.home_terminfo);
     22915+#endif
     22916        free(termp);
     22917        if (termp == cur_term)
     22918            set_curterm(0);
     22919@@ -103,3 +111,13 @@
     22920 
     22921     returnCode(rc);
     22922 }
     22923+
     22924+#if NCURSES_SP_FUNCS
     22925+NCURSES_EXPORT(int)
     22926+del_curterm(TERMINAL * termp)
     22927+{
     22928+    int rc = ERR;
     22929+    rc = NCURSES_SP_NAME(del_curterm) (CURRENT_SCREEN, termp);
     22930+    return (rc);
     22931+}
     22932+#endif
     22933diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_data.c ncurses-5.7/ncurses/tinfo/lib_data.c
     22934--- ncurses-5.7.orig/ncurses/tinfo/lib_data.c   2008-08-23 15:16:15.000000000 -0700
     22935+++ ncurses-5.7/ncurses/tinfo/lib_data.c        2009-06-05 14:01:55.000000000 -0700
     22936@@ -1,5 +1,5 @@
     22937 /****************************************************************************
     22938- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     22939+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     22940  *                                                                          *
     22941  * Permission is hereby granted, free of charge, to any person obtaining a  *
     22942  * copy of this software and associated documentation files (the            *
     22943@@ -41,7 +41,7 @@
     22944 
     22945 #include <curses.priv.h>
     22946 
     22947-MODULE_ID("$Id: lib_data.c,v 1.52 2008/08/23 22:16:15 tom Exp $")
     22948+MODULE_ID("$Id: lib_data.c,v 1.53 2009/05/30 15:59:25 tom Exp $")
     22949 
     22950 /*
     22951  * OS/2's native linker complains if we don't initialize public data when
     22952@@ -225,6 +225,8 @@
     22953     NULL,                      /* real_acs_map */
     22954     0,                         /* LINES */
     22955     0,                         /* COLS */
     22956+    8,                         /* TABSIZE */
     22957+    1000,                      /* ESCDELAY */
     22958     0,                         /* cur_term */
     22959 #ifdef TRACE
     22960     0L,                                /* _outchars */
    1897622961diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_has_cap.c ncurses-5.7/ncurses/tinfo/lib_has_cap.c
    1897722962--- ncurses-5.7.orig/ncurses/tinfo/lib_has_cap.c        2003-10-25 12:43:55.000000000 -0700
    18978 +++ ncurses-5.7/ncurses/tinfo/lib_has_cap.c     2009-03-22 21:17:05.651994412 -0700
     22963+++ ncurses-5.7/ncurses/tinfo/lib_has_cap.c     2009-06-05 14:01:51.000000000 -0700
    1897922964@@ -1,5 +1,5 @@
    1898022965 /****************************************************************************
     
    1899222977 
    1899322978 /*
    18994 @@ -43,10 +44,10 @@
    18995  
    18996  #include <term.h>
     22979@@ -41,25 +42,53 @@
     22980 
     22981 #include <curses.priv.h>
     22982 
     22983-#include <term.h>
     22984+#ifndef CUR
     22985+#define CUR SP_TERMTYPE
     22986+#endif
    1899722987 
    1899822988-MODULE_ID("$Id: lib_has_cap.c,v 1.4 2003/10/25 19:43:55 tom Exp $")
    18999 +MODULE_ID("$Id: lib_has_cap.c,v 1.5 2009/02/15 00:47:12 tom Exp $")
     22989+MODULE_ID("$Id: lib_has_cap.c,v 1.8 2009/05/10 00:53:52 tom Exp $")
    1900022990 
    1900122991 NCURSES_EXPORT(bool)
    19002 -has_ic(void)
    1900322992+NCURSES_SP_NAME(has_ic) (NCURSES_SP_DCL0)
     22993+{
     22994+    bool code = FALSE;
     22995+
     22996+    T((T_CALLED("has_ic(%p)"), SP_PARM));
     22997+
     22998+    if (IsValidTIScreen(SP_PARM) && IsTermInfo(SP_PARM)) {
     22999+       code = ((insert_character || parm_ich
     23000+                || (enter_insert_mode && exit_insert_mode))
     23001+               && (delete_character || parm_dch)) ? TRUE : FALSE;
     23002+    }
     23003+
     23004+    returnCode(code);
     23005+}
     23006+
     23007+#if NCURSES_SP_FUNCS
     23008+NCURSES_EXPORT(bool)
     23009 has_ic(void)
    1900423010 {
    19005      T((T_CALLED("has_ic()")));
    19006      returnCode(cur_term &&
    19007 @@ -55,11 +56,27 @@
    19008                && (delete_character || parm_dch));
    19009  }
    19010  
    19011 +#if NCURSES_SP_FUNCS
    19012  NCURSES_EXPORT(bool)
    19013 -has_il(void)
    19014 +has_ic(void)
    19015 +{
     23011-    T((T_CALLED("has_ic()")));
     23012-    returnCode(cur_term &&
     23013-              (insert_character || parm_ich
     23014-               || (enter_insert_mode && exit_insert_mode))
     23015-              && (delete_character || parm_dch));
    1901623016+    return NCURSES_SP_NAME(has_ic) (CURRENT_SCREEN);
    1901723017+}
     
    1902023020+NCURSES_EXPORT(bool)
    1902123021+NCURSES_SP_NAME(has_il) (NCURSES_SP_DCL0)
     23022+{
     23023+    bool code = FALSE;
     23024+    T((T_CALLED("has_il(%p)"), SP_PARM));
     23025+    if (IsValidTIScreen(SP_PARM) && IsTermInfo(SP_PARM)) {
     23026+       code = ((insert_line || parm_insert_line)
     23027+               && (delete_line || parm_delete_line)) ? TRUE : FALSE;
     23028+    }
     23029+
     23030+    returnCode(code);
     23031 }
     23032 
     23033+#if NCURSES_SP_FUNCS
     23034 NCURSES_EXPORT(bool)
     23035 has_il(void)
    1902223036 {
    19023      T((T_CALLED("has_il()")));
    19024      returnCode(cur_term
    19025                && (insert_line || parm_insert_line)
    19026                && (delete_line || parm_delete_line));
     23037-    T((T_CALLED("has_il()")));
     23038-    returnCode(cur_term
     23039-              && (insert_line || parm_insert_line)
     23040-              && (delete_line || parm_delete_line));
     23041+    return NCURSES_SP_NAME(has_il) (CURRENT_SCREEN);
    1902723042 }
    19028 +
    19029 +#if NCURSES_SP_FUNCS
    19030 +NCURSES_EXPORT(bool)
    19031 +has_il(void)
    19032 +{
    19033 +    return NCURSES_SP_NAME(has_il) (CURRENT_SCREEN);
    19034 +}
    1903523043+#endif
    1903623044diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_kernel.c ncurses-5.7/ncurses/tinfo/lib_kernel.c
    1903723045--- ncurses-5.7.orig/ncurses/tinfo/lib_kernel.c 2004-05-08 10:11:21.000000000 -0700
    19038 +++ ncurses-5.7/ncurses/tinfo/lib_kernel.c      2009-03-22 21:17:05.651994412 -0700
     23046+++ ncurses-5.7/ncurses/tinfo/lib_kernel.c      2009-06-05 14:01:14.000000000 -0700
    1903923047@@ -1,5 +1,5 @@
    1904023048 /****************************************************************************
     
    1914723155diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_longname.c ncurses-5.7/ncurses/tinfo/lib_longname.c
    1914823156--- ncurses-5.7.orig/ncurses/tinfo/lib_longname.c       2000-12-09 18:55:07.000000000 -0800
    19149 +++ ncurses-5.7/ncurses/tinfo/lib_longname.c    2009-03-22 21:17:05.651994412 -0700
     23157+++ ncurses-5.7/ncurses/tinfo/lib_longname.c    2009-06-05 14:01:51.000000000 -0700
    1915023158@@ -1,5 +1,5 @@
    1915123159 /****************************************************************************
     
    1916423172 
    1916523173 /*
    19166 @@ -40,10 +42,10 @@
     23174@@ -40,8 +42,38 @@
    1916723175 
    1916823176 #include <curses.priv.h>
    1916923177 
    1917023178-MODULE_ID("$Id: lib_longname.c,v 1.9 2000/12/10 02:55:07 tom Exp $")
    19171 +MODULE_ID("$Id: lib_longname.c,v 1.10 2009/02/15 00:48:15 tom Exp $")
    19172  
    19173  NCURSES_EXPORT(char *)
    19174 -longname(void)
     23179+MODULE_ID("$Id: lib_longname.c,v 1.11 2009/02/21 17:18:02 tom Exp $")
     23180 
     23181+#if USE_REENTRANT
     23182+NCURSES_EXPORT(char *)
    1917523183+NCURSES_SP_NAME(longname) (NCURSES_SP_DCL0)
    19176  {
    19177      char *ptr;
    19178  
    19179 @@ -55,3 +57,11 @@
    19180  
    19181      returnPtr(ttytype);
    19182  }
     23184+{
     23185+    static char empty[] =
     23186+    {'\0'};
     23187+    char *ptr;
     23188+
     23189+    T((T_CALLED("longname(%p)"), SP_PARM));
     23190+
     23191+    if (SP_PARM) {
     23192+       for (ptr = SP_PARM->_ttytype + strlen(SP_PARM->_ttytype);
     23193+            ptr > SP_PARM->_ttytype;
     23194+            ptr--)
     23195+           if (*ptr == '|')
     23196+               returnPtr(ptr + 1);
     23197+       returnPtr(SP_PARM->_ttytype);
     23198+    }
     23199+    return empty;
     23200+}
    1918323201+
    1918423202+#if NCURSES_SP_FUNCS
     
    1918923207+}
    1919023208+#endif
     23209+
     23210+#else
     23211 NCURSES_EXPORT(char *)
     23212 longname(void)
     23213 {
     23214@@ -49,9 +81,11 @@
     23215 
     23216     T((T_CALLED("longname()")));
     23217 
     23218-    for (ptr = ttytype + strlen(ttytype); ptr > ttytype; ptr--)
     23219+    for (ptr = ttytype + strlen(ttytype);
     23220+        ptr > ttytype;
     23221+        ptr--)
     23222        if (*ptr == '|')
     23223            returnPtr(ptr + 1);
     23224-
     23225     returnPtr(ttytype);
     23226 }
     23227+#endif
    1919123228diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_napms.c ncurses-5.7/ncurses/tinfo/lib_napms.c
    1919223229--- ncurses-5.7.orig/ncurses/tinfo/lib_napms.c  2008-05-03 14:34:13.000000000 -0700
    19193 +++ ncurses-5.7/ncurses/tinfo/lib_napms.c       2009-03-22 21:17:05.651994412 -0700
     23230+++ ncurses-5.7/ncurses/tinfo/lib_napms.c       2009-06-05 14:01:14.000000000 -0700
    1919423231@@ -1,5 +1,5 @@
    1919523232 /****************************************************************************
     
    1923523272diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_options.c ncurses-5.7/ncurses/tinfo/lib_options.c
    1923623273--- ncurses-5.7.orig/ncurses/tinfo/lib_options.c        2008-08-16 14:20:48.000000000 -0700
    19237 +++ ncurses-5.7/ncurses/tinfo/lib_options.c     2009-03-22 21:17:08.400170414 -0700
     23274+++ ncurses-5.7/ncurses/tinfo/lib_options.c     2009-06-05 14:01:54.000000000 -0700
    1923823275@@ -1,5 +1,5 @@
    1923923276 /****************************************************************************
     
    1925123288 
    1925223289 /*
    19253 @@ -43,7 +44,7 @@
     23290@@ -43,14 +44,20 @@
    1925423291 
    1925523292 #include <term.h>
    1925623293 
    1925723294-MODULE_ID("$Id: lib_options.c,v 1.58 2008/08/16 21:20:48 Werner.Fink Exp $")
    19258 +MODULE_ID("$Id: lib_options.c,v 1.60 2009/02/28 21:07:56 tom Exp $")
    19259  
    19260  static int _nc_curs_set(SCREEN *, int);
     23295+#ifndef CUR
     23296+#define CUR SP_TERMTYPE
     23297+#endif
     23298+
     23299+MODULE_ID("$Id: lib_options.c,v 1.64 2009/05/23 23:58:07 tom Exp $")
     23300 
     23301-static int _nc_curs_set(SCREEN *, int);
    1926123302 static int _nc_meta(SCREEN *, bool);
    19262 @@ -72,18 +73,26 @@
     23303 
     23304 NCURSES_EXPORT(int)
     23305 idlok(WINDOW *win, bool flag)
     23306 {
     23307+#if NCURSES_SP_FUNCS
     23308+    SCREEN *sp = CURRENT_SCREEN;
     23309+#endif
     23310     T((T_CALLED("idlok(%p,%d)"), win, flag));
     23311 
     23312     if (win) {
     23313@@ -72,18 +79,26 @@
    1926323314 }
    1926423315 
     
    1929023341 nodelay(WINDOW *win, bool flag)
    1929123342 {
    19292 @@ -158,17 +167,25 @@
     23343@@ -148,27 +163,64 @@
     23344 /* curs_set() moved here to narrow the kernel interface */
     23345 
     23346 NCURSES_EXPORT(int)
     23347-curs_set(int vis)
     23348+NCURSES_SP_NAME(curs_set) (NCURSES_SP_DCLx int vis)
     23349 {
     23350-    int result;
     23351+    int result = ERR;
     23352+
     23353+    T((T_CALLED("curs_set(%p,%d)"), SP_PARM, vis));
     23354+    if (SP_PARM != 0 && vis >= 0 && vis <= 2) {
     23355+       int cursor = SP_PARM->_cursor;
     23356 
     23357-    T((T_CALLED("curs_set(%d)"), vis));
     23358-    result = _nc_curs_set(SP, vis);
     23359+       if (vis == cursor) {
     23360+           result = cursor;
     23361+       } else {
     23362+           switch (vis) {
     23363+           case 2:
     23364+               result = _nc_putp_flush("cursor_visible", cursor_visible);
     23365+               break;
     23366+           case 1:
     23367+               result = _nc_putp_flush("cursor_normal", cursor_normal);
     23368+               break;
     23369+           case 0:
     23370+               result = _nc_putp_flush("cursor_invisible", cursor_invisible);
     23371+               break;
     23372+           }
     23373+           if (result != ERR)
     23374+               result = (cursor == -1 ? 1 : cursor);
     23375+           SP_PARM->_cursor = vis;
     23376+       }
     23377+    }
     23378     returnCode(result);
    1929323379 }
    1929423380 
     23381+#if NCURSES_SP_FUNCS
    1929523382 NCURSES_EXPORT(int)
    1929623383-typeahead(int fd)
     23384+curs_set(int vis)
     23385+{
     23386+    return (NCURSES_SP_NAME(curs_set) (CURRENT_SCREEN, vis));
     23387+}
     23388+#endif
     23389+
     23390+NCURSES_EXPORT(int)
    1929723391+NCURSES_SP_NAME(typeahead) (NCURSES_SP_DCLx int fd)
    1929823392 {
     
    1931923413 **      has_key()
    1932023414 **
    19321 @@ -204,8 +221,9 @@
     23415@@ -190,11 +242,19 @@
     23416 }
     23417 
     23418 NCURSES_EXPORT(int)
     23419+NCURSES_SP_NAME(has_key) (NCURSES_SP_DCLx int keycode)
     23420+{
     23421+    T((T_CALLED("has_key(%p,%d)"), SP_PARM, keycode));
     23422+    returnCode(SP != 0 ? has_key_internal(keycode, SP_PARM->_keytry) : FALSE);
     23423+}
     23424+
     23425+#if NCURSES_SP_FUNCS
     23426+NCURSES_EXPORT(int)
     23427 has_key(int keycode)
     23428 {
     23429-    T((T_CALLED("has_key(%d)"), keycode));
     23430-    returnCode(SP != 0 ? has_key_internal(keycode, SP->_keytry) : FALSE);
     23431+    return NCURSES_SP_NAME(has_key) (CURRENT_SCREEN, keycode);
     23432 }
     23433+#endif
     23434 #endif /* NCURSES_EXT_FUNCS */
     23435 
     23436 /*
     23437@@ -202,29 +262,26 @@
     23438  * than cur_term.
     23439  */
    1932223440 #undef CUR
    19323  #define CUR (sp->_term)->type.
     23441-#define CUR (sp->_term)->type.
     23442+#define CUR SP_TERMTYPE
    1932423443 
    1932523444-static int
    1932623445-_nc_putp(const char *name GCC_UNUSED, const char *value)
    19327 +NCURSES_EXPORT(int)
    19328 +NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_DCLx
    19329 +                          const char *name GCC_UNUSED, const char *value)
    19330  {
    19331      int rc = ERR;
    19332  
    19333 @@ -216,8 +234,17 @@
    19334      return rc;
    19335  }
    19336  
    19337 -static int
    19338 -_nc_putp_flush(const char *name, const char *value)
    19339 +#if NCURSES_SP_FUNCS
    19340 +NCURSES_EXPORT(int)
    19341 +_nc_putp(const char *name, const char *value)
    19342 +{
    19343 +    return NCURSES_SP_NAME(_nc_putp) (CURRENT_SCREEN, name, value);
    19344 +}
    19345 +#endif
    19346 +
    1934723446+NCURSES_EXPORT(int)
    1934823447+NCURSES_SP_NAME(_nc_putp_flush) (NCURSES_SP_DCLx
    1934923448+                                const char *name, const char *value)
    1935023449 {
    19351      int rc = _nc_putp(name, value);
    19352      if (rc != ERR) {
    19353 @@ -226,6 +253,14 @@
     23450-    int rc = ERR;
     23451-
     23452-    if (value) {
     23453-       TPUTS_TRACE(name);
     23454-       rc = putp(value);
     23455+    int rc = _nc_putp(name, value);
     23456+    if (rc != ERR) {
     23457+       _nc_flush();
     23458     }
    1935423459     return rc;
    1935523460 }
    1935623461 
     23462-static int
    1935723463+#if NCURSES_SP_FUNCS
    1935823464+NCURSES_EXPORT(int)
    19359 +_nc_putp_flush(const char *name, const char *value)
    19360 +{
     23465 _nc_putp_flush(const char *name, const char *value)
     23466 {
     23467-    int rc = _nc_putp(name, value);
     23468-    if (rc != ERR) {
     23469-       _nc_flush();
     23470-    }
     23471-    return rc;
    1936123472+    return NCURSES_SP_NAME(_nc_putp_flush) (CURRENT_SCREEN, name, value);
    19362 +}
     23473 }
    1936323474+#endif
    19364 +
     23475 
    1936523476 /* Turn the keypad on/off
    1936623477  *
    19367   * Note:  we flush the output because changing this mode causes some terminals
    19368 @@ -245,12 +280,12 @@
     23478@@ -245,12 +302,12 @@
    1936923479         * has wgetch() reading in more than one thread.  putp() and below
    1937023480         * may use SP explicitly.
     
    1938123491            rc = _nc_keypad(sp, flag);
    1938223492            _nc_set_screen(save_sp);
    19383 @@ -313,8 +348,8 @@
     23493@@ -276,45 +333,14 @@
     23494 }
     23495 
     23496 static int
     23497-_nc_curs_set(SCREEN *sp, int vis)
     23498-{
     23499-    int result = ERR;
     23500-
     23501-    T((T_CALLED("curs_set(%d)"), vis));
     23502-    if (sp != 0 && vis >= 0 && vis <= 2) {
     23503-       int cursor = sp->_cursor;
     23504-
     23505-       if (vis == cursor) {
     23506-           result = cursor;
     23507-       } else {
     23508-           switch (vis) {
     23509-           case 2:
     23510-               result = _nc_putp_flush("cursor_visible", cursor_visible);
     23511-               break;
     23512-           case 1:
     23513-               result = _nc_putp_flush("cursor_normal", cursor_normal);
     23514-               break;
     23515-           case 0:
     23516-               result = _nc_putp_flush("cursor_invisible", cursor_invisible);
     23517-               break;
     23518-           }
     23519-           if (result != ERR)
     23520-               result = (cursor == -1 ? 1 : cursor);
     23521-           sp->_cursor = vis;
     23522-       }
     23523-    }
     23524-    returnCode(result);
     23525-}
     23526-
     23527-static int
     23528 _nc_meta(SCREEN *sp, bool flag)
     23529 {
     23530     int result = ERR;
    1938423531 
    1938523532     /* Ok, we stay relaxed and don't signal an error if win is NULL */
     
    1939223539        if (flag) {
    1939323540            _nc_putp("meta_on", meta_on);
     23541diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_print.c ncurses-5.7/ncurses/tinfo/lib_print.c
     23542--- ncurses-5.7.orig/ncurses/tinfo/lib_print.c  2006-11-25 16:26:34.000000000 -0800
     23543+++ ncurses-5.7/ncurses/tinfo/lib_print.c       2009-06-05 14:01:51.000000000 -0700
     23544@@ -1,5 +1,5 @@
     23545 /****************************************************************************
     23546- * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc.              *
     23547+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
     23548  *                                                                          *
     23549  * Permission is hereby granted, free of charge, to any person obtaining a  *
     23550  * copy of this software and associated documentation files (the            *
     23551@@ -35,12 +35,19 @@
     23552 
     23553 #include <term.h>
     23554 
     23555-MODULE_ID("$Id: lib_print.c,v 1.16 2006/11/26 00:26:34 tom Exp $")
     23556+#ifndef CUR
     23557+#define CUR SP_TERMTYPE
     23558+#endif
     23559+
     23560+MODULE_ID("$Id: lib_print.c,v 1.18 2009/05/10 00:48:29 tom Exp $")
     23561 
     23562 NCURSES_EXPORT(int)
     23563 mcprint(char *data, int len)
     23564 /* ship binary character data to the printer via mc4/mc5/mc5p */
     23565 {
     23566+#if NCURSES_SP_FUNCS
     23567+    SCREEN *sp = CURRENT_SCREEN;
     23568+#endif
     23569     char *mybuf, *switchon;
     23570     size_t onsize, offsize, res;
     23571 
    1939423572diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_raw.c ncurses-5.7/ncurses/tinfo/lib_raw.c
    1939523573--- ncurses-5.7.orig/ncurses/tinfo/lib_raw.c    2007-09-29 14:50:22.000000000 -0700
    19396 +++ ncurses-5.7/ncurses/tinfo/lib_raw.c 2009-03-22 21:17:05.651994412 -0700
     23574+++ ncurses-5.7/ncurses/tinfo/lib_raw.c 2009-06-05 14:01:14.000000000 -0700
    1939723575@@ -1,5 +1,5 @@
    1939823576 /****************************************************************************
     
    1964323821diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_setup.c ncurses-5.7/ncurses/tinfo/lib_setup.c
    1964423822--- ncurses-5.7.orig/ncurses/tinfo/lib_setup.c  2008-08-03 15:42:33.000000000 -0700
    19645 +++ ncurses-5.7/ncurses/tinfo/lib_setup.c       2009-03-22 21:17:05.655995250 -0700
     23823+++ ncurses-5.7/ncurses/tinfo/lib_setup.c       2009-06-05 14:01:55.000000000 -0700
    1964623824@@ -1,5 +1,5 @@
    1964723825 /****************************************************************************
     
    1966423842 
    1966523843-MODULE_ID("$Id: lib_setup.c,v 1.111 2008/08/03 22:42:33 tom Exp $")
    19666 +MODULE_ID("$Id: lib_setup.c,v 1.113 2009/02/14 22:21:40 tom Exp $")
     23844+MODULE_ID("$Id: lib_setup.c,v 1.116 2009/05/30 20:39:21 tom Exp $")
    1966723845 
    1966823846 /****************************************************************************
    1966923847  *
    19670 @@ -149,21 +150,30 @@
     23848@@ -116,54 +117,68 @@
     23849     return cur_term ? cur_term->type.term_names : empty;
     23850 }
     23851 NCURSES_EXPORT(int *)
     23852-_nc_ptr_Lines(void)
     23853+_nc_ptr_Lines(SCREEN *sp)
     23854 {
     23855-    return ptrLines();
     23856+    return ptrLines(sp);
     23857 }
     23858 NCURSES_EXPORT(int)
     23859 NCURSES_PUBLIC_VAR(LINES) (void)
     23860 {
     23861-    return *_nc_ptr_Lines();
     23862+    return *_nc_ptr_Lines(CURRENT_SCREEN);
     23863 }
     23864 NCURSES_EXPORT(int *)
     23865-_nc_ptr_Cols(void)
     23866+_nc_ptr_Cols(SCREEN *sp)
     23867 {
     23868-    return ptrCols();
     23869+    return ptrCols(sp);
     23870 }
     23871 NCURSES_EXPORT(int)
     23872 NCURSES_PUBLIC_VAR(COLS) (void)
     23873 {
     23874-    return *_nc_ptr_Cols();
     23875+    return *_nc_ptr_Cols(CURRENT_SCREEN);
     23876+}
     23877+NCURSES_EXPORT(int *)
     23878+_nc_ptr_Tabsize(SCREEN *sp)
     23879+{
     23880+    return ptrTabsize(sp);
     23881 }
     23882 NCURSES_EXPORT(int)
     23883 NCURSES_PUBLIC_VAR(TABSIZE) (void)
     23884 {
     23885-    return SP ? SP->_TABSIZE : 8;
     23886+    return *_nc_ptr_Tabsize(CURRENT_SCREEN);
     23887 }
     23888 #else
     23889 NCURSES_EXPORT_VAR(char) ttytype[NAMESIZE] = "";
     23890 NCURSES_EXPORT_VAR(int) LINES = 0;
     23891 NCURSES_EXPORT_VAR(int) COLS = 0;
     23892-NCURSES_EXPORT_VAR(int) TABSIZE = 0;
     23893+NCURSES_EXPORT_VAR(int) TABSIZE = 8;
     23894 #endif
    1967123895 
    1967223896 #if NCURSES_EXT_FUNCS
     
    1970223926 #if USE_SIGWINCH
    1970323927 /*
    19704 @@ -188,13 +198,25 @@
     23928@@ -188,13 +203,25 @@
    1970523929 #endif
    1970623930 
     
    1973023954 _nc_get_screensize(SCREEN *sp, int *linep, int *colp)
    1973123955 /* Obtain lines/columns values from the environment and/or terminfo entry */
     23956@@ -604,7 +631,7 @@
     23957     /*
     23958      * We should always check the screensize, just in case.
     23959      */
     23960-    _nc_get_screensize(SP, ptrLines(), ptrCols());
     23961+    _nc_get_screensize(SP, ptrLines(SP), ptrCols(SP));
     23962 
     23963     if (errret)
     23964        *errret = TGETENT_YES;
     23965diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_termcap.c ncurses-5.7/ncurses/tinfo/lib_termcap.c
     23966--- ncurses-5.7.orig/ncurses/tinfo/lib_termcap.c        2008-08-16 12:22:55.000000000 -0700
     23967+++ ncurses-5.7/ncurses/tinfo/lib_termcap.c     2009-06-05 14:01:54.000000000 -0700
     23968@@ -1,5 +1,5 @@
     23969 /****************************************************************************
     23970- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     23971+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     23972  *                                                                          *
     23973  * Permission is hereby granted, free of charge, to any person obtaining a  *
     23974  * copy of this software and associated documentation files (the            *
     23975@@ -30,6 +30,7 @@
     23976  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
     23977  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
     23978  *     and: Thomas E. Dickey                        1996-on                 *
     23979+ *     and: Juergen Pfeifer                                                 *
     23980  *                                                                          *
     23981  * some of the code in here was contributed by:                             *
     23982  * Magnus Bengtsson, d6mbeng@dtek.chalmers.se (Nov'93)                      *
     23983@@ -45,7 +46,11 @@
     23984 
     23985 #include <term_entry.h>
     23986 
     23987-MODULE_ID("$Id: lib_termcap.c,v 1.63 2008/08/16 19:22:55 tom Exp $")
     23988+#ifndef CUR
     23989+#define CUR SP_TERMTYPE
     23990+#endif
     23991+
     23992+MODULE_ID("$Id: lib_termcap.c,v 1.66 2009/05/23 23:47:34 tom Exp $")
     23993 
     23994 NCURSES_EXPORT_VAR(char *) UP = 0;
     23995 NCURSES_EXPORT_VAR(char *) BC = 0;
     23996@@ -76,7 +81,7 @@
     23997  ***************************************************************************/
     23998 
     23999 NCURSES_EXPORT(int)
     24000-tgetent(char *bufp, const char *name)
     24001+NCURSES_SP_NAME(tgetent) (NCURSES_SP_DCLx char *bufp, const char *name)
     24002 {
     24003     int errcode;
     24004     int n;
     24005@@ -111,7 +116,7 @@
     24006             */
     24007            if (LAST_TRM != 0 && LAST_TRM != cur_term) {
     24008                TERMINAL *trm = LAST_TRM;
     24009-               del_curterm(LAST_TRM);
     24010+               NCURSES_SP_NAME(del_curterm) (NCURSES_SP_ARGx LAST_TRM);
     24011                for (CacheInx = 0; CacheInx < TGETENT_MAX; ++CacheInx)
     24012                    if (LAST_TRM == trm)
     24013                        LAST_TRM = 0;
     24014@@ -164,8 +169,8 @@
     24015        LAST_BUF = bufp;
     24016        LAST_USE = TRUE;
     24017 
     24018-       SetNoPadding(SP);
     24019-       (void) baudrate();      /* sets ospeed as a side-effect */
     24020+       SetNoPadding(SP_PARM);
     24021+       (void) NCURSES_SP_NAME(baudrate) (NCURSES_SP_ARG);      /* sets ospeed as a side-effect */
     24022 
     24023 /* LINT_PREPRO
     24024 #if 0*/
     24025@@ -177,6 +182,14 @@
     24026     returnCode(errcode);
     24027 }
     24028 
     24029+#if NCURSES_SP_FUNCS
     24030+NCURSES_EXPORT(int)
     24031+tgetent(char *bufp, const char *name)
     24032+{
     24033+    return NCURSES_SP_NAME(tgetent) (CURRENT_SCREEN, bufp, name);
     24034+}
     24035+#endif
     24036+
     24037 /***************************************************************************
     24038  *
     24039  * tgetflag(str)
     24040@@ -187,7 +200,7 @@
     24041  ***************************************************************************/
     24042 
     24043 NCURSES_EXPORT(int)
     24044-tgetflag(NCURSES_CONST char *id)
     24045+NCURSES_SP_NAME(tgetflag) (NCURSES_SP_DCLx NCURSES_CONST char *id)
     24046 {
     24047     unsigned i;
     24048 
     24049@@ -205,6 +218,14 @@
     24050     returnCode(0);             /* Solaris does this */
     24051 }
     24052 
     24053+#if NCURSES_SP_FUNCS
     24054+NCURSES_EXPORT(int)
     24055+tgetflag(NCURSES_CONST char *id)
     24056+{
     24057+    return NCURSES_SP_NAME(tgetflag) (CURRENT_SCREEN, id);
     24058+}
     24059+#endif
     24060+
     24061 /***************************************************************************
     24062  *
     24063  * tgetnum(str)
     24064@@ -215,7 +236,7 @@
     24065  ***************************************************************************/
     24066 
     24067 NCURSES_EXPORT(int)
     24068-tgetnum(NCURSES_CONST char *id)
     24069+NCURSES_SP_NAME(tgetnum) (NCURSES_SP_DCLx NCURSES_CONST char *id)
     24070 {
     24071     unsigned i;
     24072 
     24073@@ -234,6 +255,14 @@
     24074     returnCode(ABSENT_NUMERIC);
     24075 }
     24076 
     24077+#if NCURSES_SP_FUNCS
     24078+NCURSES_EXPORT(int)
     24079+tgetnum(NCURSES_CONST char *id)
     24080+{
     24081+    return NCURSES_SP_NAME(tgetnum) (CURRENT_SCREEN, id);
     24082+}
     24083+#endif
     24084+
     24085 /***************************************************************************
     24086  *
     24087  * tgetstr(str, area)
     24088@@ -244,7 +273,7 @@
     24089  ***************************************************************************/
     24090 
     24091 NCURSES_EXPORT(char *)
     24092-tgetstr(NCURSES_CONST char *id, char **area)
     24093+NCURSES_SP_NAME(tgetstr) (NCURSES_SP_DCLx NCURSES_CONST char *id, char **area)
     24094 {
     24095     unsigned i;
     24096     char *result = NULL;
     24097@@ -278,6 +307,14 @@
     24098     returnPtr(result);
     24099 }
     24100 
     24101+#if NCURSES_SP_FUNCS
     24102+NCURSES_EXPORT(char *)
     24103+tgetstr(NCURSES_CONST char *id, char **area)
     24104+{
     24105+    return NCURSES_SP_NAME(tgetstr) (CURRENT_SCREEN, id, area);
     24106+}
     24107+#endif
     24108+
     24109 #if NO_LEAKS
     24110 NCURSES_EXPORT(void)
     24111 _nc_tgetent_leaks(void)
    1973224112diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_termname.c ncurses-5.7/ncurses/tinfo/lib_termname.c
    1973324113--- ncurses-5.7.orig/ncurses/tinfo/lib_termname.c       2003-12-27 10:23:01.000000000 -0800
    19734 +++ ncurses-5.7/ncurses/tinfo/lib_termname.c    2009-03-22 21:17:07.020082134 -0700
     24114+++ ncurses-5.7/ncurses/tinfo/lib_termname.c    2009-06-05 14:01:16.000000000 -0700
    1973524115@@ -1,5 +1,5 @@
    1973624116 /****************************************************************************
     
    1977524155+}
    1977624156+#endif
     24157diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_ti.c ncurses-5.7/ncurses/tinfo/lib_ti.c
     24158--- ncurses-5.7.orig/ncurses/tinfo/lib_ti.c     2003-05-24 14:10:28.000000000 -0700
     24159+++ ncurses-5.7/ncurses/tinfo/lib_ti.c  2009-06-05 14:01:51.000000000 -0700
     24160@@ -1,5 +1,5 @@
     24161 /****************************************************************************
     24162- * Copyright (c) 1998-2000,2003 Free Software Foundation, Inc.              *
     24163+ * Copyright (c) 1998-2003,2009 Free Software Foundation, Inc.              *
     24164  *                                                                          *
     24165  * Permission is hereby granted, free of charge, to any person obtaining a  *
     24166  * copy of this software and associated documentation files (the            *
     24167@@ -36,17 +36,17 @@
     24168 #include <term_entry.h>
     24169 #include <tic.h>
     24170 
     24171-MODULE_ID("$Id: lib_ti.c,v 1.23 2003/05/24 21:10:28 tom Exp $")
     24172+MODULE_ID("$Id: lib_ti.c,v 1.24 2009/04/18 17:37:50 tom Exp $")
     24173 
     24174 NCURSES_EXPORT(int)
     24175-tigetflag(NCURSES_CONST char *str)
     24176+NCURSES_SP_NAME(tigetflag) (NCURSES_SP_DCLx NCURSES_CONST char *str)
     24177 {
     24178     unsigned i;
     24179 
     24180-    T((T_CALLED("tigetflag(%s)"), str));
     24181+    T((T_CALLED("tigetflag(%p, %s)"), SP_PARM, str));
     24182 
     24183-    if (cur_term != 0) {
     24184-       TERMTYPE *tp = &(cur_term->type);
     24185+    if (HasTInfoTerminal(SP_PARM)) {
     24186+       TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
     24187        for_each_boolean(i, tp) {
     24188            const char *capname = ExtBoolname(tp, i, boolnames);
     24189            if (!strcmp(str, capname)) {
     24190@@ -59,15 +59,23 @@
     24191     returnCode(ABSENT_BOOLEAN);
     24192 }
     24193 
     24194+#if NCURSES_SP_FUNCS
     24195 NCURSES_EXPORT(int)
     24196-tigetnum(NCURSES_CONST char *str)
     24197+tigetflag(NCURSES_CONST char *str)
     24198+{
     24199+    return NCURSES_SP_NAME(tigetflag) (CURRENT_SCREEN, str);
     24200+}
     24201+#endif
     24202+
     24203+NCURSES_EXPORT(int)
     24204+NCURSES_SP_NAME(tigetnum) (NCURSES_SP_DCLx NCURSES_CONST char *str)
     24205 {
     24206     unsigned i;
     24207 
     24208-    T((T_CALLED("tigetnum(%s)"), str));
     24209+    T((T_CALLED("tigetnum(%p, %s)"), SP_PARM, str));
     24210 
     24211-    if (cur_term != 0) {
     24212-       TERMTYPE *tp = &(cur_term->type);
     24213+    if (HasTInfoTerminal(SP_PARM)) {
     24214+       TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
     24215        for_each_number(i, tp) {
     24216            const char *capname = ExtNumname(tp, i, numnames);
     24217            if (!strcmp(str, capname)) {
     24218@@ -81,15 +89,23 @@
     24219     returnCode(CANCELLED_NUMERIC);     /* Solaris returns a -1 instead */
     24220 }
     24221 
     24222+#if NCURSES_SP_FUNCS
     24223+NCURSES_EXPORT(int)
     24224+tigetnum(NCURSES_CONST char *str)
     24225+{
     24226+    return NCURSES_SP_NAME(tigetnum) (CURRENT_SCREEN, str);
     24227+}
     24228+#endif
     24229+
     24230 NCURSES_EXPORT(char *)
     24231-tigetstr(NCURSES_CONST char *str)
     24232+NCURSES_SP_NAME(tigetstr) (NCURSES_SP_DCLx NCURSES_CONST char *str)
     24233 {
     24234     unsigned i;
     24235 
     24236-    T((T_CALLED("tigetstr(%s)"), str));
     24237+    T((T_CALLED("tigetstr(%p, %s)"), SP_PARM, str));
     24238 
     24239-    if (cur_term != 0) {
     24240-       TERMTYPE *tp = &(cur_term->type);
     24241+    if (HasTInfoTerminal(SP_PARM)) {
     24242+       TERMTYPE *tp = &(TerminalOf(SP_PARM)->type);
     24243        for_each_string(i, tp) {
     24244            const char *capname = ExtStrname(tp, i, strnames);
     24245            if (!strcmp(str, capname)) {
     24246@@ -101,3 +117,11 @@
     24247 
     24248     returnPtr(CANCELLED_STRING);
     24249 }
     24250+
     24251+#if NCURSES_SP_FUNCS
     24252+NCURSES_EXPORT(char *)
     24253+tigetstr(NCURSES_CONST char *str)
     24254+{
     24255+    return NCURSES_SP_NAME(tigetstr) (CURRENT_SCREEN, str);
     24256+}
     24257+#endif
    1977724258diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_tparm.c ncurses-5.7/ncurses/tinfo/lib_tparm.c
    1977824259--- ncurses-5.7.orig/ncurses/tinfo/lib_tparm.c  2008-08-16 12:22:55.000000000 -0700
    19779 +++ ncurses-5.7/ncurses/tinfo/lib_tparm.c       2009-03-22 21:17:07.020082134 -0700
     24260+++ ncurses-5.7/ncurses/tinfo/lib_tparm.c       2009-06-05 14:01:16.000000000 -0700
    1978024261@@ -40,10 +40,9 @@
    1978124262 #include <curses.priv.h>
     
    1979224273diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_tputs.c ncurses-5.7/ncurses/tinfo/lib_tputs.c
    1979324274--- ncurses-5.7.orig/ncurses/tinfo/lib_tputs.c  2008-06-28 06:12:15.000000000 -0700
    19794 +++ ncurses-5.7/ncurses/tinfo/lib_tputs.c       2009-03-22 21:17:08.400170414 -0700
     24275+++ ncurses-5.7/ncurses/tinfo/lib_tputs.c       2009-06-05 14:01:54.000000000 -0700
    1979524276@@ -1,5 +1,5 @@
    1979624277 /****************************************************************************
     
    1980824289 
    1980924290 /*
    19810 @@ -46,7 +47,7 @@
     24291@@ -41,12 +42,16 @@
     24292  */
     24293 
     24294 #include <curses.priv.h>
     24295+
     24296+#ifndef CUR
     24297+#define CUR SP_TERMTYPE
     24298+#endif
     24299+
     24300 #include <ctype.h>
     24301-#include <term.h>              /* padding_baud_rate, xon_xoff */
    1981124302 #include <termcap.h>           /* ospeed */
    1981224303 #include <tic.h>
    1981324304 
    1981424305-MODULE_ID("$Id: lib_tputs.c,v 1.66 2008/06/28 13:12:15 tom Exp $")
    19815 +MODULE_ID("$Id: lib_tputs.c,v 1.68 2009/02/28 21:08:18 tom Exp $")
     24306+MODULE_ID("$Id: lib_tputs.c,v 1.74 2009/05/23 23:56:23 tom Exp $")
    1981624307 
    1981724308 NCURSES_EXPORT_VAR(char) PC = 0;              /* used by termcap library */
    1981824309 NCURSES_EXPORT_VAR(NCURSES_OSPEED) ospeed = 0;        /* used by termcap library */
    19819 @@ -72,7 +73,7 @@
    19820  static int (*my_outch) (int c) = _nc_outch;
     24310@@ -69,62 +74,122 @@
     24311 }
     24312 #endif
     24313 
     24314-static int (*my_outch) (int c) = _nc_outch;
     24315+#if NCURSES_SP_FUNCS
     24316+#define my_outch SP_PARM->_outch
     24317+#else
     24318+static NCURSES_SP_OUTC my_outch = NCURSES_SP_NAME(_nc_outch);
     24319+#endif
    1982124320 
    1982224321 NCURSES_EXPORT(int)
     
    1982424323+NCURSES_SP_NAME(delay_output) (NCURSES_SP_DCLx int ms)
    1982524324 {
    19826      T((T_CALLED("delay_output(%d)"), ms));
    19827  
    19828 @@ -92,19 +93,35 @@
     24325-    T((T_CALLED("delay_output(%d)"), ms));
     24326+    T((T_CALLED("delay_output(%p,%d)"), SP_PARM, ms));
     24327 
     24328     if (no_pad_char) {
     24329-       _nc_flush();
     24330+       NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
     24331        napms(ms);
     24332     } else {
     24333        register int nullcount;
     24334 
     24335        nullcount = (ms * _nc_baudrate(ospeed)) / (BAUDBYTE * 1000);
     24336        for (_nc_nulls_sent += nullcount; nullcount > 0; nullcount--)
     24337-           my_outch(PC);
     24338-       if (my_outch == _nc_outch)
     24339-           _nc_flush();
     24340+           my_outch(NCURSES_SP_ARGx PC);
     24341+       if (my_outch == NCURSES_SP_NAME(_nc_outch))
     24342+           NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
     24343     }
     24344 
    1982924345     returnCode(OK);
    1983024346 }
     
    1983824354+#endif
    1983924355+
     24356+NCURSES_EXPORT(void)
     24357+NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_DCL0)
     24358+{
     24359+    (void) fflush(NC_OUTPUT(SP_PARM));
     24360+}
     24361+
     24362+#if NCURSES_SP_FUNCS
    1984024363 NCURSES_EXPORT(void)
    19841 -_nc_flush(void)
    19842 +NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_DCL0)
     24364 _nc_flush(void)
    1984324365 {
    19844      (void) fflush(NC_OUTPUT);
     24366-    (void) fflush(NC_OUTPUT);
     24367+    NCURSES_SP_NAME(_nc_flush) (CURRENT_SCREEN);
    1984524368 }
    19846  
    19847 +#if NCURSES_SP_FUNCS
    19848 +NCURSES_EXPORT(void)
    19849 +_nc_flush(void)
    19850 +{
    19851 +    NCURSES_SP_NAME(_nc_flush) (CURRENT_SCREEN);
    19852 +}
    1985324369+#endif
    19854 +
     24370 
    1985524371 NCURSES_EXPORT(int)
    1985624372-_nc_outch(int ch)
     
    1986624382        /*
    1986724383         * POSIX says write() is safe in a signal handler, but the
    19868 @@ -117,6 +134,14 @@
     24384         * buffered I/O is not.
     24385         */
     24386-       write(fileno(NC_OUTPUT), &tmp, 1);
     24387+       write(fileno(NC_OUTPUT(SP_PARM)), &tmp, 1);
     24388     } else {
     24389-       putc(ch, NC_OUTPUT);
     24390+       putc(ch, NC_OUTPUT(SP_PARM));
     24391     }
    1986924392     return OK;
    1987024393 }
     
    1987824401+#endif
    1987924402+
     24403+NCURSES_EXPORT(int)
     24404+NCURSES_SP_NAME(putp) (NCURSES_SP_DCLx const char *string)
     24405+{
     24406+    return NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     24407+                                  string, 1, NCURSES_SP_NAME(_nc_outch));
     24408+}
     24409+
     24410+NCURSES_EXPORT(int)
     24411+NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_DCLx
     24412+                          const char *name GCC_UNUSED,
     24413+                          const char *string)
     24414+{
     24415+    int rc = ERR;
     24416+
     24417+    if (string != 0) {
     24418+       TPUTS_TRACE(name);
     24419+       rc = NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx string);
     24420+    }
     24421+    return rc;
     24422+}
     24423+
     24424+#if NCURSES_SP_FUNCS
    1988024425 NCURSES_EXPORT(int)
    1988124426 putp(const char *string)
    1988224427 {
     24428-    return tputs(string, 1, _nc_outch);
     24429+    return NCURSES_SP_NAME(putp) (CURRENT_SCREEN, string);
     24430 }
     24431 
     24432 NCURSES_EXPORT(int)
     24433-tputs(const char *string, int affcnt, int (*outc) (int))
     24434+_nc_putp(const char *name, const char *string)
     24435+{
     24436+    return NCURSES_SP_NAME(_nc_putp) (CURRENT_SCREEN, name, string);
     24437+}
     24438+#endif
     24439+
     24440+NCURSES_EXPORT(int)
     24441+NCURSES_SP_NAME(tputs) (NCURSES_SP_DCLx
     24442+                       const char *string,
     24443+                       int affcnt,
     24444+                       NCURSES_SP_OUTC outc)
     24445 {
     24446     bool always_delay;
     24447     bool normal_delay;
     24448@@ -137,7 +202,7 @@
     24449     char addrbuf[32];
     24450 
     24451     if (USE_TRACEF(TRACE_TPUTS)) {
     24452-       if (outc == _nc_outch)
     24453+       if (outc == NCURSES_SP_NAME(_nc_outch))
     24454            (void) strcpy(addrbuf, "_nc_outch");
     24455        else
     24456            (void) sprintf(addrbuf, "%p", outc);
     24457@@ -164,7 +229,7 @@
     24458            !xon_xoff
     24459            && padding_baud_rate
     24460 #if NCURSES_NO_PADDING
     24461-           && !GetNoPadding(SP)
     24462+           && !GetNoPadding(SP_PARM)
     24463 #endif
     24464            && (_nc_baudrate(ospeed) >= padding_baud_rate);
     24465     }
     24466@@ -201,21 +266,21 @@
     24467     my_outch = outc;           /* redirect delay_output() */
     24468     while (*string) {
     24469        if (*string != '$')
     24470-           (*outc) (*string);
     24471+           (*outc) (NCURSES_SP_ARGx *string);
     24472        else {
     24473            string++;
     24474            if (*string != '<') {
     24475-               (*outc) ('$');
     24476+               (*outc) (NCURSES_SP_ARGx '$');
     24477                if (*string)
     24478-                   (*outc) (*string);
     24479+                   (*outc) (NCURSES_SP_ARGx *string);
     24480            } else {
     24481                bool mandatory;
     24482 
     24483                string++;
     24484                if ((!isdigit(UChar(*string)) && *string != '.')
     24485                    || !strchr(string, '>')) {
     24486-                   (*outc) ('$');
     24487-                   (*outc) ('<');
     24488+                   (*outc) (NCURSES_SP_ARGx '$');
     24489+                   (*outc) (NCURSES_SP_ARGx '<');
     24490                    continue;
     24491                }
     24492 
     24493@@ -250,7 +315,7 @@
     24494                    && (always_delay
     24495                        || normal_delay
     24496                        || mandatory))
     24497-                   delay_output(number / 10);
     24498+                   NCURSES_SP_NAME(delay_output) (NCURSES_SP_ARGx number / 10);
     24499 
     24500            }                   /* endelse (*string == '<') */
     24501        }                       /* endelse (*string == '$') */
     24502@@ -270,6 +335,25 @@
     24503        delay_output(trailpad / 10);
     24504 #endif /* BSD_TPUTS */
     24505 
     24506-    my_outch = _nc_outch;
     24507+    my_outch = NCURSES_SP_NAME(_nc_outch);
     24508     return OK;
     24509 }
     24510+
     24511+#if NCURSES_SP_FUNCS
     24512+NCURSES_EXPORT(int)
     24513+_nc_outc_wrapper(SCREEN *sp, int c)
     24514+{
     24515+    if (0 == sp) {
     24516+       return (ERR);
     24517+    } else {
     24518+       return sp->jump(c);
     24519+    }
     24520+}
     24521+
     24522+NCURSES_EXPORT(int)
     24523+tputs(const char *string, int affcnt, int (*outc) (int))
     24524+{
     24525+    SetSafeOutcWrapper(outc);
     24526+    return NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx string, affcnt, _nc_outc_wrapper);
     24527+}
     24528+#endif
    1988324529diff -Naur ncurses-5.7.orig/ncurses/tinfo/lib_ttyflags.c ncurses-5.7/ncurses/tinfo/lib_ttyflags.c
    1988424530--- ncurses-5.7.orig/ncurses/tinfo/lib_ttyflags.c       2008-08-03 15:10:44.000000000 -0700
    19885 +++ ncurses-5.7/ncurses/tinfo/lib_ttyflags.c    2009-03-22 21:17:05.655995250 -0700
     24531+++ ncurses-5.7/ncurses/tinfo/lib_ttyflags.c    2009-06-05 14:01:51.000000000 -0700
    1988624532@@ -1,5 +1,5 @@
    1988724533 /****************************************************************************
     
    1989124537  * Permission is hereby granted, free of charge, to any person obtaining a  *
    1989224538  * copy of this software and associated documentation files (the            *
    19893 @@ -38,7 +38,7 @@
     24539@@ -38,10 +38,14 @@
    1989424540 #include <curses.priv.h>
    1989524541 #include <term.h>              /* cur_term */
    1989624542 
    1989724543-MODULE_ID("$Id: lib_ttyflags.c,v 1.18 2008/08/03 22:10:44 tom Exp $")
    19898 +MODULE_ID("$Id: lib_ttyflags.c,v 1.19 2009/02/15 00:33:49 tom Exp $")
     24544+#ifndef CUR
     24545+#define CUR SP_TERMTYPE
     24546+#endif
     24547+
     24548+MODULE_ID("$Id: lib_ttyflags.c,v 1.24 2009/05/10 00:48:29 tom Exp $")
    1989924549 
    1990024550 NCURSES_EXPORT(int)
    19901  _nc_get_tty_mode(TTY * buf)
    19902 @@ -101,7 +101,7 @@
     24551-_nc_get_tty_mode(TTY * buf)
     24552+NCURSES_SP_NAME(_nc_get_tty_mode) (NCURSES_SP_DCLx TTY * buf)
     24553 {
     24554     int result = OK;
     24555 
     24556@@ -71,8 +75,16 @@
     24557     return (result);
    1990324558 }
    1990424559 
     24560+#if NCURSES_SP_FUNCS
     24561 NCURSES_EXPORT(int)
     24562-_nc_set_tty_mode(TTY * buf)
     24563+_nc_get_tty_mode(TTY * buf)
     24564+{
     24565+    return NCURSES_SP_NAME(_nc_get_tty_mode) (CURRENT_SCREEN, buf);
     24566+}
     24567+#endif
     24568+
     24569+NCURSES_EXPORT(int)
     24570+NCURSES_SP_NAME(_nc_set_tty_mode) (NCURSES_SP_DCLx TTY * buf)
     24571 {
     24572     int result = OK;
     24573 
     24574@@ -86,8 +98,8 @@
     24575                if (SET_TTY(cur_term->Filedes, buf) != 0) {
     24576                    if (errno == EINTR)
     24577                        continue;
     24578-                   if ((errno == ENOTTY) && (SP != 0))
     24579-                       SP->_notty = TRUE;
     24580+                   if ((errno == ENOTTY) && (SP_PARM != 0))
     24581+                       SP_PARM->_notty = TRUE;
     24582                    result = ERR;
     24583                }
     24584                break;
     24585@@ -100,8 +112,16 @@
     24586     return (result);
     24587 }
     24588 
     24589+#if NCURSES_SP_FUNCS
    1990524590 NCURSES_EXPORT(int)
    1990624591-def_shell_mode(void)
     24592+_nc_set_tty_mode(TTY * buf)
     24593+{
     24594+    return NCURSES_SP_NAME(_nc_set_tty_mode) (CURRENT_SCREEN, buf);
     24595+}
     24596+#endif
     24597+
     24598+NCURSES_EXPORT(int)
    1990724599+NCURSES_SP_NAME(def_shell_mode) (NCURSES_SP_DCL0)
    1990824600 {
    1990924601     int rc = ERR;
    1991024602 
    19911 @@ -125,8 +125,16 @@
     24603@@ -125,8 +145,16 @@
    1991224604     returnCode(rc);
    1991324605 }
     
    1992724619     int rc = ERR;
    1992824620 
    19929 @@ -148,16 +156,24 @@
     24621@@ -148,17 +176,25 @@
    1993024622     returnCode(rc);
    1993124623 }
     
    1995024642-               if (SP->_keypad_on)
    1995124643-                   _nc_keypad(SP, TRUE);
     24644-               NC_BUFFERED(TRUE);
    1995224645+           if (SP_PARM) {
    1995324646+               if (SP_PARM->_keypad_on)
    1995424647+                   _nc_keypad(SP_PARM, TRUE);
    19955                 NC_BUFFERED(TRUE);
     24648+               NC_BUFFERED(SP_PARM, TRUE);
    1995624649            }
    1995724650            returnCode(OK);
    19958 @@ -166,14 +182,22 @@
     24651        }
     24652@@ -166,22 +202,38 @@
    1995924653     returnCode(ERR);
    1996024654 }
     
    1998024674+           _nc_keypad(SP_PARM, FALSE);
    1998124675            _nc_flush();
    19982             NC_BUFFERED(FALSE);
     24676-           NC_BUFFERED(FALSE);
     24677+           NC_BUFFERED(SP_PARM, FALSE);
    1998324678        }
    19984 @@ -182,6 +206,14 @@
     24679        returnCode(_nc_set_tty_mode(&cur_term->Ottyb));
     24680     }
    1998524681     returnCode(ERR);
    1998624682 }
     
    1999924695diff -Naur ncurses-5.7.orig/ncurses/tinfo/make_keys.c ncurses-5.7/ncurses/tinfo/make_keys.c
    2000024696--- ncurses-5.7.orig/ncurses/tinfo/make_keys.c  2008-08-03 14:57:22.000000000 -0700
    20001 +++ ncurses-5.7/ncurses/tinfo/make_keys.c       2009-03-22 21:17:07.020082134 -0700
     24697+++ ncurses-5.7/ncurses/tinfo/make_keys.c       2009-06-05 14:01:16.000000000 -0700
    2000224698@@ -39,16 +39,16 @@
    2000324699 #define USE_TERMLIB 1
     
    2004424740diff -Naur ncurses-5.7.orig/ncurses/tinfo/MKcodes.awk ncurses-5.7/ncurses/tinfo/MKcodes.awk
    2004524741--- ncurses-5.7.orig/ncurses/tinfo/MKcodes.awk  2008-06-28 16:13:25.000000000 -0700
    20046 +++ ncurses-5.7/ncurses/tinfo/MKcodes.awk       2009-03-22 21:17:11.636377985 -0700
     24742+++ ncurses-5.7/ncurses/tinfo/MKcodes.awk       2009-06-05 14:01:54.000000000 -0700
    2004724743@@ -1,5 +1,5 @@
    2004824744 ##############################################################################
     
    2005724753 ##############################################################################
    2005824754-# $Id: MKcodes.awk,v 1.5 2008/06/28 23:13:25 tom Exp $
    20059 +# $Id: MKcodes.awk,v 1.6 2009/03/21 21:03:39 tom Exp $
     24755+# $Id: MKcodes.awk,v 1.8 2009/05/23 19:09:54 tom Exp $
    2006024756 function large_item(value) {
    2006124757        result = sprintf("%d,", offset);
    2006224758        offset = offset + length(value) + 1;
    20063 @@ -124,7 +124,7 @@
     24759@@ -117,28 +117,39 @@
     24760                        print  "                if ((*value = typeCalloc(NCURSES_CONST char *, size + 1)) != 0) {"
     24761                        print  "                        unsigned n;"
     24762                        print  "                        for (n = 0; n < size; ++n) {"
     24763-                       print  "                                (*value)[n] = _nc_code_blob + offsets[n];"
     24764+                       print  "                                (*value)[n] = (NCURSES_CONST char *) _nc_code_blob + offsets[n];"
     24765                        print  "                        }"
     24766                        print  "                }"
     24767                        print  "        }"
    2006424768                        print  "        return *value;"
    2006524769                        print  "}"
     
    2007024774                        print  "#define DCL(it) static IT data##it[]"
    2007124775                        print  ""
    20072 @@ -134,11 +134,22 @@
    20073                         print  "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API _nc_##it(void) { return data##it; }"
     24776                        print_strings("boolcodes", small_boolcodes);
     24777                        print_strings("numcodes", small_numcodes);
     24778                        print_strings("strcodes", small_strcodes);
     24779-                       print  "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API _nc_##it(void) { return data##it; }"
     24780+                       print  "#define FIX(it) NCURSES_IMPEXP IT * NCURSES_API NCURSES_PUBLIC_VAR(it)(void) { return data##it; }"
    2007424781                }
    2007524782                print  ""
     
    2009324800                print  "#if NO_LEAKS"
    2009424801                print  "NCURSES_EXPORT(void)"
     24802diff -Naur ncurses-5.7.orig/ncurses/tinfo/MKfallback.sh ncurses-5.7/ncurses/tinfo/MKfallback.sh
     24803--- ncurses-5.7.orig/ncurses/tinfo/MKfallback.sh        2006-07-15 09:54:20.000000000 -0700
     24804+++ ncurses-5.7/ncurses/tinfo/MKfallback.sh     2009-06-05 14:01:44.000000000 -0700
     24805@@ -1,6 +1,6 @@
     24806 #!/bin/sh
     24807 ##############################################################################
     24808-# Copyright (c) 1998-2001,2006 Free Software Foundation, Inc.                #
     24809+# Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.                #
     24810 #                                                                            #
     24811 # Permission is hereby granted, free of charge, to any person obtaining a    #
     24812 # copy of this software and associated documentation files (the "Software"), #
     24813@@ -26,7 +26,7 @@
     24814 # use or other dealings in this Software without prior written               #
     24815 # authorization.                                                             #
     24816 ##############################################################################
     24817-# $Id: MKfallback.sh,v 1.13 2006/07/15 16:54:20 tom Exp $
     24818+# $Id: MKfallback.sh,v 1.14 2009/04/18 21:01:38 tom Exp $
     24819 #
     24820 # MKfallback.sh -- create fallback table for entry reads
     24821 #
     24822@@ -63,7 +63,6 @@
     24823  */
     24824 
     24825 #include <curses.priv.h>
     24826-#include <term.h>
     24827 
     24828 EOF
     24829 
    2009524830diff -Naur ncurses-5.7.orig/ncurses/tinfo/MKnames.awk ncurses-5.7/ncurses/tinfo/MKnames.awk
    2009624831--- ncurses-5.7.orig/ncurses/tinfo/MKnames.awk  2008-10-11 14:07:56.000000000 -0700
    20097 +++ ncurses-5.7/ncurses/tinfo/MKnames.awk       2009-03-22 21:17:11.636377985 -0700
     24832+++ ncurses-5.7/ncurses/tinfo/MKnames.awk       2009-06-05 14:01:24.000000000 -0700
    2009824833@@ -1,5 +1,5 @@
    2009924834 ##############################################################################
     
    2016624901diff -Naur ncurses-5.7.orig/ncurses/tinfo/name_match.c ncurses-5.7/ncurses/tinfo/name_match.c
    2016724902--- ncurses-5.7.orig/ncurses/tinfo/name_match.c 2008-08-03 12:49:33.000000000 -0700
    20168 +++ ncurses-5.7/ncurses/tinfo/name_match.c      2009-03-22 21:17:07.020082134 -0700
     24903+++ ncurses-5.7/ncurses/tinfo/name_match.c      2009-06-05 14:01:16.000000000 -0700
    2016924904@@ -31,10 +31,9 @@
    2017024905  ****************************************************************************/
     
    2017924914 /*
    2018024915  *     _nc_first_name(char *names)
     24916diff -Naur ncurses-5.7.orig/ncurses/tinfo/parse_entry.c ncurses-5.7/ncurses/tinfo/parse_entry.c
     24917--- ncurses-5.7.orig/ncurses/tinfo/parse_entry.c        2008-08-16 14:52:03.000000000 -0700
     24918+++ ncurses-5.7/ncurses/tinfo/parse_entry.c     2009-06-05 14:01:44.000000000 -0700
     24919@@ -1,5 +1,5 @@
     24920 /****************************************************************************
     24921- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     24922+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     24923  *                                                                          *
     24924  * Permission is hereby granted, free of charge, to any person obtaining a  *
     24925  * copy of this software and associated documentation files (the            *
     24926@@ -48,7 +48,7 @@
     24927 #include <tic.h>
     24928 #include <term_entry.h>
     24929 
     24930-MODULE_ID("$Id: parse_entry.c,v 1.69 2008/08/16 21:52:03 tom Exp $")
     24931+MODULE_ID("$Id: parse_entry.c,v 1.70 2009/04/18 21:01:38 tom Exp $")
     24932 
     24933 #ifdef LINT
     24934 static short const parametrized[] =
     24935@@ -84,13 +84,13 @@
     24936     case NUMBER:
     24937        first = tp->ext_Booleans;
     24938        last = tp->ext_Numbers + first;
     24939-       offset = tp->ext_Booleans + tp->ext_Numbers;
     24940+       offset = (unsigned) (tp->ext_Booleans + tp->ext_Numbers);
     24941        tindex = tp->num_Numbers;
     24942        break;
     24943     case STRING:
     24944-       first = tp->ext_Booleans + tp->ext_Numbers;
     24945+       first = (unsigned) (tp->ext_Booleans + tp->ext_Numbers);
     24946        last = tp->ext_Strings + first;
     24947-       offset = tp->ext_Booleans + tp->ext_Numbers + tp->ext_Strings;
     24948+       offset = (unsigned) (tp->ext_Booleans + tp->ext_Numbers + tp->ext_Strings);
     24949        tindex = tp->num_Strings;
     24950        break;
     24951     case CANCEL:
     24952@@ -137,27 +137,31 @@
     24953            break;
     24954        }
     24955     }
     24956+
     24957+#define for_each_value(max) \
     24958+       for (last = (unsigned) (max - 1); last > tindex; last--)
     24959+
     24960     if (!found) {
     24961        switch (token_type) {
     24962        case BOOLEAN:
     24963-           tp->ext_Booleans += 1;
     24964-           tp->num_Booleans += 1;
     24965+           tp->ext_Booleans++;
     24966+           tp->num_Booleans++;
     24967            tp->Booleans = typeRealloc(NCURSES_SBOOL, tp->num_Booleans, tp->Booleans);
     24968-           for (last = tp->num_Booleans - 1; last > tindex; last--)
     24969+           for_each_value(tp->num_Booleans)
     24970                tp->Booleans[last] = tp->Booleans[last - 1];
     24971            break;
     24972        case NUMBER:
     24973-           tp->ext_Numbers += 1;
     24974-           tp->num_Numbers += 1;
     24975+           tp->ext_Numbers++;
     24976+           tp->num_Numbers++;
     24977            tp->Numbers = typeRealloc(short, tp->num_Numbers, tp->Numbers);
     24978-           for (last = tp->num_Numbers - 1; last > tindex; last--)
     24979+           for_each_value(tp->num_Numbers)
     24980                tp->Numbers[last] = tp->Numbers[last - 1];
     24981            break;
     24982        case STRING:
     24983-           tp->ext_Strings += 1;
     24984-           tp->num_Strings += 1;
     24985+           tp->ext_Strings++;
     24986+           tp->num_Strings++;
     24987            tp->Strings = typeRealloc(char *, tp->num_Strings, tp->Strings);
     24988-           for (last = tp->num_Strings - 1; last > tindex; last--)
     24989+           for_each_value(tp->num_Strings)
     24990                tp->Strings[last] = tp->Strings[last - 1];
     24991            break;
     24992        }
     24993@@ -170,7 +174,7 @@
     24994 
     24995     temp.nte_name = tp->ext_Names[offset];
     24996     temp.nte_type = token_type;
     24997-    temp.nte_index = tindex;
     24998+    temp.nte_index = (short) tindex;
     24999     temp.nte_link = -1;
     25000 
     25001     return &temp;
     25002@@ -444,7 +448,7 @@
     25003 
     25004            case NUMBER:
     25005                entryp->tterm.Numbers[entry_ptr->nte_index] =
     25006-                   _nc_curr_token.tk_valnumber;
     25007+                   (short) _nc_curr_token.tk_valnumber;
     25008                break;
     25009 
     25010            case STRING:
     25011@@ -788,7 +792,7 @@
     25012        for (base = other_non_function_keys;
     25013             (cp = strchr(base, ',')) != 0;
     25014             base = cp + 1) {
     25015-           size_t len = cp - base;
     25016+           size_t len = (unsigned) (cp - base);
     25017 
     25018            for (ap = ko_xlate; ap->from; ap++) {
     25019                if (len == strlen(ap->from)
     25020diff -Naur ncurses-5.7.orig/ncurses/tinfo/setbuf.c ncurses-5.7/ncurses/tinfo/setbuf.c
     25021--- ncurses-5.7.orig/ncurses/tinfo/setbuf.c     2007-05-12 12:04:02.000000000 -0700
     25022+++ ncurses-5.7/ncurses/tinfo/setbuf.c  2009-06-05 14:01:51.000000000 -0700
     25023@@ -1,5 +1,5 @@
     25024 /****************************************************************************
     25025- * Copyright (c) 1998-2003,2007 Free Software Foundation, Inc.              *
     25026+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
     25027  *                                                                          *
     25028  * Permission is hereby granted, free of charge, to any person obtaining a  *
     25029  * copy of this software and associated documentation files (the            *
     25030@@ -29,6 +29,8 @@
     25031 /****************************************************************************
     25032  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
     25033  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
     25034+ *     and: Thomas E. Dickey                        1996-on                 *
     25035+ *     and: Juergen Pfeifer                         2008                    *
     25036  ****************************************************************************/
     25037 
     25038 /*
     25039@@ -40,7 +42,7 @@
     25040 
     25041 #include <curses.priv.h>
     25042 
     25043-MODULE_ID("$Id: setbuf.c,v 1.13 2007/05/12 19:04:02 tom Exp $")
     25044+MODULE_ID("$Id: setbuf.c,v 1.14 2009/05/09 23:09:00 tom Exp $")
     25045 
     25046 /*
     25047  * If the output file descriptor is connected to a tty (the typical case) it
     25048@@ -98,11 +100,11 @@
     25049  * buffer.  So we disable this by default (there may yet be a workaround).
     25050  */
     25051 NCURSES_EXPORT(void)
     25052-_nc_set_buffer(FILE *ofp, bool buffered)
     25053+NCURSES_SP_NAME(_nc_set_buffer) (NCURSES_SP_DCLx FILE *ofp, bool buffered)
     25054 {
     25055     /* optional optimization hack -- do before any output to ofp */
     25056 #if HAVE_SETVBUF || HAVE_SETBUFFER
     25057-    if (SP->_buffered != buffered) {
     25058+    if (SP_PARM->_buffered != buffered) {
     25059        unsigned buf_len;
     25060        char *buf_ptr;
     25061 
     25062@@ -115,10 +117,10 @@
     25063 #endif
     25064        if (buffered != 0) {
     25065            buf_len = min(LINES * (COLS + 6), 2800);
     25066-           if ((buf_ptr = SP->_setbuf) == 0) {
     25067+           if ((buf_ptr = SP_PARM->_setbuf) == 0) {
     25068                if ((buf_ptr = typeMalloc(char, buf_len)) == NULL)
     25069                      return;
     25070-               SP->_setbuf = buf_ptr;
     25071+               SP_PARM->_setbuf = buf_ptr;
     25072                /* Don't try to free this! */
     25073            }
     25074 #if !USE_SETBUF_0
     25075@@ -144,7 +146,15 @@
     25076        (void) setbuffer(ofp, buf_ptr, (int) buf_len);
     25077 #endif
     25078 
     25079-       SP->_buffered = buffered;
     25080+       SP_PARM->_buffered = buffered;
     25081     }
     25082 #endif /* HAVE_SETVBUF || HAVE_SETBUFFER */
     25083 }
     25084+
     25085+#if NCURSES_SP_FUNCS
     25086+NCURSES_EXPORT(void)
     25087+_nc_set_buffer(FILE *ofp, bool buffered)
     25088+{
     25089+    return NCURSES_SP_NAME(_nc_set_buffer) (CURRENT_SCREEN, ofp, buffered);
     25090+}
     25091+#endif
    2018125092diff -Naur ncurses-5.7.orig/ncurses/tinfo/use_screen.c ncurses-5.7/ncurses/tinfo/use_screen.c
    2018225093--- ncurses-5.7.orig/ncurses/tinfo/use_screen.c 2008-06-07 12:16:56.000000000 -0700
    20183 +++ ncurses-5.7/ncurses/tinfo/use_screen.c      2009-03-22 21:17:07.020082134 -0700
     25094+++ ncurses-5.7/ncurses/tinfo/use_screen.c      2009-06-05 14:01:16.000000000 -0700
    2018425095@@ -32,7 +32,7 @@
    2018525096 
     
    2020025111 
    2020125112     code = func(screen, data);
     25113diff -Naur ncurses-5.7.orig/ncurses/tinfo/write_entry.c ncurses-5.7/ncurses/tinfo/write_entry.c
     25114--- ncurses-5.7.orig/ncurses/tinfo/write_entry.c        2008-08-03 12:24:00.000000000 -0700
     25115+++ ncurses-5.7/ncurses/tinfo/write_entry.c     2009-06-05 14:01:44.000000000 -0700
     25116@@ -1,5 +1,5 @@
     25117 /****************************************************************************
     25118- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     25119+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     25120  *                                                                          *
     25121  * Permission is hereby granted, free of charge, to any person obtaining a  *
     25122  * copy of this software and associated documentation files (the            *
     25123@@ -54,7 +54,7 @@
     25124 #define TRACE_OUT(p)           /*nothing */
     25125 #endif
     25126 
     25127-MODULE_ID("$Id: write_entry.c,v 1.72 2008/08/03 19:24:00 tom Exp $")
     25128+MODULE_ID("$Id: write_entry.c,v 1.73 2009/04/18 21:01:38 tom Exp $")
     25129 
     25130 static int total_written;
     25131 
     25132@@ -171,7 +171,11 @@
     25133        struct stat statbuf;
     25134 
     25135        if ((rc = stat(path, &statbuf)) < 0) {
     25136-           rc = mkdir(path, 0777);
     25137+           rc = mkdir(path
     25138+#if !defined(__MINGW32__)
     25139+                      ,0777
     25140+#endif
     25141+               );
     25142        } else if (_nc_access(path, R_OK | W_OK | X_OK) < 0) {
     25143            rc = -1;            /* permission denied */
     25144        } else if (!(S_ISDIR(statbuf.st_mode))) {
     25145@@ -338,6 +342,7 @@
     25146 
     25147            while (*other_names != '\0') {
     25148                ptr = other_names++;
     25149+               assert(ptr < buffer + sizeof(buffer) - 1);
     25150                while (*other_names != '|' && *other_names != '\0')
     25151                    other_names++;
     25152 
     25153@@ -385,7 +390,6 @@
     25154     }
     25155     while (*other_names != '\0') {
     25156        ptr = other_names++;
     25157-       assert(ptr < buffer + sizeof(buffer) - 1);
     25158        while (*other_names != '|' && *other_names != '\0')
     25159            other_names++;
     25160 
     25161@@ -468,18 +472,18 @@
     25162           unsigned want,
     25163           unsigned size)
     25164 {
     25165-    int have = (limit - *offset);
     25166+    unsigned have = (limit - *offset);
     25167 
     25168     want *= size;
     25169     if (have > 0) {
     25170-       if ((int) want > have)
     25171+       if (want > have)
     25172            want = have;
     25173        memcpy(dst + *offset, src, want);
     25174        *offset += want;
     25175     } else {
     25176        want = 0;
     25177     }
     25178-    return (int) (want / size);
     25179+    return (want / size);
     25180 }
     25181 
     25182 #define Write(buf, size, count) fake_write(buffer, offset, limit, (char *) buf, count, size)
     25183@@ -487,14 +491,15 @@
     25184 #undef LITTLE_ENDIAN           /* BSD/OS defines this as a feature macro */
     25185 #define HI(x)                  ((x) / 256)
     25186 #define LO(x)                  ((x) % 256)
     25187-#define LITTLE_ENDIAN(p, x)    (p)[0] = LO(x), (p)[1] = HI(x)
     25188+#define LITTLE_ENDIAN(p, x)    (p)[0] = (unsigned char)LO(x),  \
     25189+                                (p)[1] = (unsigned char)HI(x)
     25190 
     25191 #define WRITE_STRING(str) (Write(str, sizeof(char), strlen(str) + 1) == strlen(str) + 1)
     25192 
     25193 static int
     25194 compute_offsets(char **Strings, unsigned strmax, short *offsets)
     25195 {
     25196-    size_t nextfree = 0;
     25197+    int nextfree = 0;
     25198     unsigned i;
     25199 
     25200     for (i = 0; i < strmax; i++) {
     25201@@ -503,8 +508,8 @@
     25202        } else if (Strings[i] == CANCELLED_STRING) {
     25203            offsets[i] = -2;
     25204        } else {
     25205-           offsets[i] = nextfree;
     25206-           nextfree += strlen(Strings[i]) + 1;
     25207+           offsets[i] = (short) nextfree;
     25208+           nextfree += (int) strlen(Strings[i]) + 1;
     25209            TRACE_OUT(("put Strings[%d]=%s(%d)", (int) i,
     25210                       _nc_visbuf(Strings[i]), (int) nextfree));
     25211        }
     25212@@ -536,8 +541,8 @@
     25213 static unsigned
     25214 extended_Booleans(TERMTYPE *tp)
     25215 {
     25216-    unsigned short result = 0;
     25217-    unsigned short i;
     25218+    unsigned result = 0;
     25219+    unsigned i;
     25220 
     25221     for (i = 0; i < tp->ext_Booleans; ++i) {
     25222        if (tp->Booleans[BOOLCOUNT + i] == TRUE)
     25223@@ -549,8 +554,8 @@
     25224 static unsigned
     25225 extended_Numbers(TERMTYPE *tp)
     25226 {
     25227-    unsigned short result = 0;
     25228-    unsigned short i;
     25229+    unsigned result = 0;
     25230+    unsigned i;
     25231 
     25232     for (i = 0; i < tp->ext_Numbers; ++i) {
     25233        if (tp->Numbers[NUMCOUNT + i] != ABSENT_NUMERIC)
     25234@@ -597,7 +602,7 @@
     25235     size_t namelen, boolmax, nummax, strmax;
     25236     char zero = '\0';
     25237     size_t i;
     25238-    short nextfree;
     25239+    int nextfree;
     25240     short offsets[MAX_ENTRY_SIZE / 2];
     25241     unsigned char buf[MAX_ENTRY_SIZE];
     25242     unsigned last_bool = BOOLWRITE;
     25243@@ -690,7 +695,7 @@
     25244 
     25245 #if NCURSES_XNAMES
     25246     if (extended_object(tp)) {
     25247-       unsigned extcnt = NUM_EXT_NAMES(tp);
     25248+       unsigned extcnt = (unsigned) NUM_EXT_NAMES(tp);
     25249 
     25250        if (even_boundary(nextfree))
     25251            return (ERR);
    2020225252diff -Naur ncurses-5.7.orig/ncurses/trace/lib_traceatr.c ncurses-5.7/ncurses/trace/lib_traceatr.c
    2020325253--- ncurses-5.7.orig/ncurses/trace/lib_traceatr.c       2008-08-03 09:24:53.000000000 -0700
    20204 +++ ncurses-5.7/ncurses/trace/lib_traceatr.c    2009-03-22 21:17:08.400170414 -0700
     25254+++ ncurses-5.7/ncurses/trace/lib_traceatr.c    2009-06-05 14:01:51.000000000 -0700
    2020525255@@ -1,5 +1,5 @@
    2020625256 /****************************************************************************
     
    2021825268 
    2021925269 /*
    20220 @@ -39,7 +40,7 @@
     25270@@ -37,9 +38,12 @@
     25271  */
     25272 
    2022125273 #include <curses.priv.h>
    20222  #include <term.h>              /* acs_chars */
     25274-#include <term.h>              /* acs_chars */
    2022325275 
    2022425276-MODULE_ID("$Id: lib_traceatr.c,v 1.63 2008/08/03 16:24:53 tom Exp $")
    20225 +MODULE_ID("$Id: lib_traceatr.c,v 1.64 2009/02/28 21:10:20 tom Exp $")
     25277+#ifndef CUR
     25278+#define CUR SP_TERMTYPE
     25279+#endif
     25280+
     25281+MODULE_ID("$Id: lib_traceatr.c,v 1.66 2009/05/10 00:48:29 tom Exp $")
    2022625282 
    2022725283 #define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name))
    2022825284 
    20229 @@ -228,7 +229,7 @@
     25285@@ -186,6 +190,9 @@
     25286        unsigned int val;
     25287        const char *name;
     25288     } ALT_NAMES;
     25289+#if NCURSES_SP_FUNCS
     25290+    SCREEN *sp = CURRENT_SCREEN;
     25291+#endif
     25292     static const ALT_NAMES names[] =
     25293     {
     25294        {'l', "ACS_ULCORNER"},  /* upper left corner */
     25295@@ -228,7 +235,7 @@
    2023025296     if ((attr & A_ALTCHARSET) && (acs_chars != 0)) {
    2023125297        char *cp;
     
    2023625302        for (cp = acs_chars; cp[0] && cp[1]; cp += 2) {
    2023725303            if (ChCharOf(cp[1]) == ChCharOf(ch)) {
    20238 @@ -239,9 +240,9 @@
     25304@@ -239,9 +246,9 @@
    2023925305 
    2024025306        if (found != 0) {
     
    2024925315                }
    2025025316        }
    20251 @@ -260,7 +261,8 @@
     25317@@ -260,7 +267,9 @@
    2025225318        if ((found = _nc_altcharset_name(ChAttrOf(ch), ch)) != 0) {
    2025325319            (void) _nc_trace_bufcat(bufnum, found);
    2025425320        } else
    2025525321-           (void) _nc_trace_bufcat(bufnum, _nc_tracechar(SP, (int) ChCharOf(ch)));
    20256 +           (void) _nc_trace_bufcat(bufnum, _nc_tracechar(CURRENT_SCREEN,
    20257 +                                   (int) ChCharOf(ch)));
     25322+           (void) _nc_trace_bufcat(bufnum,
     25323+                                   _nc_tracechar(CURRENT_SCREEN,
     25324+                                                 (int) ChCharOf(ch)));
    2025825325 
    2025925326        if (ChAttrOf(ch) != A_NORMAL) {
    2026025327            (void) _nc_trace_bufcat(bufnum, " | ");
    20261 @@ -320,7 +322,7 @@
     25328@@ -320,7 +329,7 @@
    2026225329                        if (PUTC_ch != L'\0') {
    2026325330                            /* it could not be a multibyte sequence */
     
    2026825335                        }
    2026925336                        break;
    20270 @@ -329,7 +331,7 @@
     25337@@ -329,7 +338,7 @@
    2027125338                        if (n)
    2027225339                            (void) _nc_trace_bufcat(bufnum, ", ");
     
    2027925346diff -Naur ncurses-5.7.orig/ncurses/trace/lib_tracebits.c ncurses-5.7/ncurses/trace/lib_tracebits.c
    2028025347--- ncurses-5.7.orig/ncurses/trace/lib_tracebits.c      2008-08-03 09:09:26.000000000 -0700
    20281 +++ ncurses-5.7/ncurses/trace/lib_tracebits.c   2009-03-22 21:17:07.020082134 -0700
     25348+++ ncurses-5.7/ncurses/trace/lib_tracebits.c   2009-06-05 14:01:16.000000000 -0700
    2028225349@@ -33,9 +33,8 @@
    2028325350  ****************************************************************************/
     
    2029325360diff -Naur ncurses-5.7.orig/ncurses/trace/lib_trace.c ncurses-5.7/ncurses/trace/lib_trace.c
    2029425361--- ncurses-5.7.orig/ncurses/trace/lib_trace.c  2008-08-23 11:04:29.000000000 -0700
    20295 +++ ncurses-5.7/ncurses/trace/lib_trace.c       2009-03-22 21:17:08.400170414 -0700
     25362+++ ncurses-5.7/ncurses/trace/lib_trace.c       2009-06-05 14:01:18.000000000 -0700
    2029625363@@ -1,5 +1,5 @@
    2029725364 /****************************************************************************
     
    2035125418        _nc_prescreen._outchars += increment;
    2035225419 }
     25420diff -Naur ncurses-5.7.orig/ncurses/trace/lib_tracechr.c ncurses-5.7/ncurses/trace/lib_tracechr.c
     25421--- ncurses-5.7.orig/ncurses/trace/lib_tracechr.c       2008-08-03 08:39:29.000000000 -0700
     25422+++ ncurses-5.7/ncurses/trace/lib_tracechr.c    2009-06-05 14:01:44.000000000 -0700
     25423@@ -1,5 +1,5 @@
     25424 /****************************************************************************
     25425- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     25426+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     25427  *                                                                          *
     25428  * Permission is hereby granted, free of charge, to any person obtaining a  *
     25429  * copy of this software and associated documentation files (the            *
     25430@@ -39,7 +39,7 @@
     25431 
     25432 #include <ctype.h>
     25433 
     25434-MODULE_ID("$Id: lib_tracechr.c,v 1.19 2008/08/03 15:39:29 tom Exp $")
     25435+MODULE_ID("$Id: lib_tracechr.c,v 1.20 2009/04/18 22:48:29 tom Exp $")
     25436 
     25437 #ifdef TRACE
     25438 
     25439@@ -52,7 +52,7 @@
     25440                      : _nc_globals.tracechr_buf);
     25441 
     25442     if (ch > KEY_MIN || ch < 0) {
     25443-       name = _nc_keyname(sp, ch);
     25444+       name = safe_keyname(SP_PARM, ch);
     25445        if (name == 0 || *name == '\0')
     25446            name = "NULL";
     25447        (void) sprintf(MyBuffer, "'%.30s' = %#03o", name, ch);
     25448@@ -64,7 +64,7 @@
     25449         */
     25450        (void) sprintf(MyBuffer, "%#03o", ch);
     25451     } else {
     25452-       name = _nc_unctrl(sp, (chtype) ch);
     25453+       name = safe_unctrl(SP_PARM, (chtype) ch);
     25454        if (name == 0 || *name == 0)
     25455            name = "null";      /* shouldn't happen */
     25456        (void) sprintf(MyBuffer, "'%.30s' = %#03o", name, ch);
     25457@@ -75,7 +75,7 @@
     25458 NCURSES_EXPORT(char *)
     25459 _tracechar(int ch)
     25460 {
     25461-    return _nc_tracechar(SP, ch);
     25462+    return _nc_tracechar(CURRENT_SCREEN, ch);
     25463 }
     25464 #else
     25465 EMPTY_MODULE(_nc_lib_tracechr)
     25466diff -Naur ncurses-5.7.orig/ncurses/trace/lib_tracedmp.c ncurses-5.7/ncurses/trace/lib_tracedmp.c
     25467--- ncurses-5.7.orig/ncurses/trace/lib_tracedmp.c       2008-08-16 12:30:56.000000000 -0700
     25468+++ ncurses-5.7/ncurses/trace/lib_tracedmp.c    2009-06-05 14:01:44.000000000 -0700
     25469@@ -1,5 +1,5 @@
     25470 /****************************************************************************
     25471- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     25472+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     25473  *                                                                          *
     25474  * Permission is hereby granted, free of charge, to any person obtaining a  *
     25475  * copy of this software and associated documentation files (the            *
     25476@@ -39,7 +39,7 @@
     25477 #include <curses.priv.h>
     25478 #include <ctype.h>
     25479 
     25480-MODULE_ID("$Id: lib_tracedmp.c,v 1.31 2008/08/16 19:30:56 tom Exp $")
     25481+MODULE_ID("$Id: lib_tracedmp.c,v 1.32 2009/04/18 21:01:38 tom Exp $")
     25482 
     25483 #ifdef TRACE
     25484 
     25485@@ -68,7 +68,7 @@
     25486     if (width < win->_maxx)
     25487        ++width;
     25488     if (++width + 1 > (int) my_length) {
     25489-       my_length = 2 * (width + 1);
     25490+       my_length = (unsigned) (2 * (width + 1));
     25491        my_buffer = typeRealloc(char, my_length, my_buffer);
     25492     }
     25493 
     25494@@ -82,7 +82,7 @@
     25495         * we map those to '.' and '?' respectively.
     25496         */
     25497        for (j = 0; j < width; ++j) {
     25498-           chtype test = CharOf(win->_line[n].text[j]);
     25499+           chtype test = (chtype) CharOf(win->_line[n].text[j]);
     25500            ep[j] = (char) ((UChar(test) == test
     25501 #if USE_WIDEC_SUPPORT
     25502                             && (win->_line[n].text[j].chars[1] == 0)
     25503@@ -111,7 +111,7 @@
     25504            if (multicolumn) {
     25505                ep = my_buffer;
     25506                for (j = 0; j < width; ++j) {
     25507-                   int test = WidecExt(win->_line[n].text[j]);
     25508+                   chtype test = WidecExt(win->_line[n].text[j]);
     25509                    if (test) {
     25510                        ep[j] = (char) (test + '0');
     25511                    } else {
     25512@@ -153,7 +153,7 @@
     25513 
     25514        for (i = 0; i < 4; ++i) {
     25515            const char *hex = " 123456789ABCDEF";
     25516-           attr_t mask = (0xf << ((i + 4) * 4));
     25517+           attr_t mask = (attr_t) (0xf << ((i + 4) * 4));
     25518 
     25519            haveattrs = FALSE;
     25520            for (j = 0; j < width; ++j)
    2035325521diff -Naur ncurses-5.7.orig/ncurses/trace/lib_tracemse.c ncurses-5.7/ncurses/trace/lib_tracemse.c
    2035425522--- ncurses-5.7.orig/ncurses/trace/lib_tracemse.c       2008-08-03 08:39:29.000000000 -0700
    20355 +++ ncurses-5.7/ncurses/trace/lib_tracemse.c    2009-03-22 21:17:07.020082134 -0700
     25523+++ ncurses-5.7/ncurses/trace/lib_tracemse.c    2009-06-05 14:01:16.000000000 -0700
    2035625524@@ -38,7 +38,7 @@
    2035725525 
     
    2037225540 
    2037325541 #else /* !TRACE */
     25542diff -Naur ncurses-5.7.orig/ncurses/trace/trace_tries.c ncurses-5.7/ncurses/trace/trace_tries.c
     25543--- ncurses-5.7.orig/ncurses/trace/trace_tries.c        2008-08-03 08:43:30.000000000 -0700
     25544+++ ncurses-5.7/ncurses/trace/trace_tries.c     2009-06-05 14:01:30.000000000 -0700
     25545@@ -1,5 +1,5 @@
     25546 /****************************************************************************
     25547- * Copyright (c) 1999-2007,2008 Free Software Foundation, Inc.              *
     25548+ * Copyright (c) 1999-2008,2009 Free Software Foundation, Inc.              *
     25549  *                                                                          *
     25550  * Permission is hereby granted, free of charge, to any person obtaining a  *
     25551  * copy of this software and associated documentation files (the            *
     25552@@ -35,7 +35,7 @@
     25553 
     25554 #include <curses.priv.h>
     25555 
     25556-MODULE_ID("$Id: trace_tries.c,v 1.13 2008/08/03 15:43:30 tom Exp $")
     25557+MODULE_ID("$Id: trace_tries.c,v 1.14 2009/03/28 20:44:01 tom Exp $")
     25558 
     25559 #ifdef TRACE
     25560 #define my_buffer _nc_globals.tracetry_buf
     25561@@ -46,7 +46,7 @@
     25562 {
     25563     if (level > my_length) {
     25564        my_length = (level + 1) * 4;
     25565-       my_buffer = (unsigned char *) realloc(my_buffer, my_length);
     25566+       my_buffer = (unsigned char *) _nc_doalloc(my_buffer, my_length);
     25567     }
     25568 
     25569     while (tree != 0) {
    2037425570diff -Naur ncurses-5.7.orig/ncurses/trace/varargs.c ncurses-5.7/ncurses/trace/varargs.c
    2037525571--- ncurses-5.7.orig/ncurses/trace/varargs.c    2008-08-03 08:42:49.000000000 -0700
    20376 +++ ncurses-5.7/ncurses/trace/varargs.c 2009-03-22 21:17:07.020082134 -0700
     25572+++ ncurses-5.7/ncurses/trace/varargs.c 2009-06-05 14:01:16.000000000 -0700
    2037725573@@ -34,7 +34,7 @@
    2037825574 
     
    2039325589 #define VA_PTR(type) pval = (char *)va_arg(ap, type)
    2039425590 #define VA_STR(type) sval = va_arg(ap, type)
     25591diff -Naur ncurses-5.7.orig/ncurses/tty/hardscroll.c ncurses-5.7/ncurses/tty/hardscroll.c
     25592--- ncurses-5.7.orig/ncurses/tty/hardscroll.c   2008-08-03 16:49:30.000000000 -0700
     25593+++ ncurses-5.7/ncurses/tty/hardscroll.c        2009-06-05 14:01:44.000000000 -0700
     25594@@ -1,5 +1,5 @@
     25595 /****************************************************************************
     25596- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     25597+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     25598  *                                                                          *
     25599  * Permission is hereby granted, free of charge, to any person obtaining a  *
     25600  * copy of this software and associated documentation files (the            *
     25601@@ -147,90 +147,96 @@
     25602 
     25603 #include <curses.priv.h>
     25604 
     25605-MODULE_ID("$Id: hardscroll.c,v 1.42 2008/08/03 23:49:30 tom Exp $")
     25606+MODULE_ID("$Id: hardscroll.c,v 1.43 2009/04/18 21:41:30 tom Exp $")
     25607 
     25608 #if defined(SCROLLDEBUG) || defined(HASHDEBUG)
     25609 
     25610 # undef screen_lines
     25611-# define screen_lines MAXLINES
     25612-NCURSES_EXPORT_VAR(int)
     25613-oldnums[MAXLINES];
     25614-# define OLDNUM(n)     oldnums[n]
     25615+# define screen_lines(sp) MAXLINES
     25616+NCURSES_EXPORT_VAR (int)
     25617+  oldnums[MAXLINES];
     25618+# define OLDNUM(sp,n)  oldnums[n]
     25619 # define _tracef       printf
     25620 # undef TR
     25621 # define TR(n, a)      if (_nc_tracing & (n)) { _tracef a ; putchar('\n'); }
     25622 
     25623-extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
     25624+extern                         NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
     25625 
     25626 #else /* no debug */
     25627 
     25628 /* OLDNUM(n) indicates which line will be shifted to the position n.
     25629    if OLDNUM(n) == _NEWINDEX, then the line n in new, not shifted from
     25630    somewhere. */
     25631-NCURSES_EXPORT_VAR(int *)
     25632-_nc_oldnums = 0;               /* obsolete: keep for ABI compat */
     25633+NCURSES_EXPORT_VAR (int *)
     25634+  _nc_oldnums = 0;             /* obsolete: keep for ABI compat */
     25635 
     25636 # if USE_HASHMAP
     25637-#  define oldnums       SP->_oldnum_list
     25638-#  define OLDNUM(n)    oldnums[n]
     25639+#  define oldnums(sp)   (sp)->_oldnum_list
     25640+#  define OLDNUM(sp,n) oldnums(sp)[n]
     25641 # else                         /* !USE_HASHMAP */
     25642-#  define OLDNUM(n)    newscr->_line[n].oldindex
     25643+#  define OLDNUM(sp,n) sp->_newscr->_line[n].oldindex
     25644 # endif                                /* !USE_HASHMAP */
     25645 
     25646-#define OLDNUM_SIZE     SP->_oldnum_size
     25647+#define OLDNUM_SIZE(sp) (sp)->_oldnum_size
     25648 
     25649 #endif /* defined(SCROLLDEBUG) || defined(HASHDEBUG) */
     25650 
     25651 NCURSES_EXPORT(void)
     25652-_nc_scroll_optimize(void)
     25653+NCURSES_SP_NAME(_nc_scroll_optimize) (NCURSES_SP_DCL0)
     25654 /* scroll optimization to transform curscr to newscr */
     25655 {
     25656     int i;
     25657     int start, end, shift;
     25658 
     25659-    TR(TRACE_ICALLS, (T_CALLED("_nc_scroll_optimize")));
     25660+    TR(TRACE_ICALLS, (T_CALLED("_nc_scroll_optimize(%p)"), SP_PARM));
     25661 
     25662 #if !defined(SCROLLDEBUG) && !defined(HASHDEBUG)
     25663 #if USE_HASHMAP
     25664     /* get enough storage */
     25665-    if (OLDNUM_SIZE < screen_lines) {
     25666-       int *new_oldnums = typeRealloc(int, screen_lines, oldnums);
     25667+    if (OLDNUM_SIZE(SP_PARM) < screen_lines(SP_PARM)) {
     25668+       int *new_oldnums = typeRealloc(int, screen_lines(SP_PARM), oldnums(SP_PARM));
     25669        if (!new_oldnums)
     25670            return;
     25671-       oldnums = new_oldnums;
     25672-       OLDNUM_SIZE = screen_lines;
     25673+       oldnums(SP_PARM) = new_oldnums;
     25674+       OLDNUM_SIZE(SP_PARM) = screen_lines(SP_PARM);
     25675     }
     25676     /* calculate the indices */
     25677-    _nc_hash_map();
     25678+    NCURSES_SP_NAME(_nc_hash_map) (NCURSES_SP_ARG);
     25679 #endif
     25680 #endif /* !defined(SCROLLDEBUG) && !defined(HASHDEBUG) */
     25681 
     25682 #ifdef TRACE
     25683     if (USE_TRACEF(TRACE_UPDATE | TRACE_MOVE)) {
     25684-       _nc_linedump();
     25685+       NCURSES_SP_NAME(_nc_linedump) (NCURSES_SP_ARG);
     25686        _nc_unlock_global(tracef);
     25687     }
     25688 #endif /* TRACE */
     25689 
     25690     /* pass 1 - from top to bottom scrolling up */
     25691-    for (i = 0; i < screen_lines;) {
     25692-       while (i < screen_lines && (OLDNUM(i) == _NEWINDEX || OLDNUM(i) <= i))
     25693+    for (i = 0; i < screen_lines(SP_PARM);) {
     25694+       while (i < screen_lines(SP_PARM)
     25695+              && (OLDNUM(SP_PARM, i) == _NEWINDEX || OLDNUM(SP_PARM, i) <= i))
     25696            i++;
     25697-       if (i >= screen_lines)
     25698+       if (i >= screen_lines(SP_PARM))
     25699            break;
     25700 
     25701-       shift = OLDNUM(i) - i;  /* shift > 0 */
     25702+       shift = OLDNUM(SP_PARM, i) - i;         /* shift > 0 */
     25703        start = i;
     25704 
     25705        i++;
     25706-       while (i < screen_lines && OLDNUM(i) != _NEWINDEX && OLDNUM(i) - i
     25707-              == shift)
     25708+       while (i < screen_lines(SP_PARM)
     25709+              && OLDNUM(SP_PARM, i) != _NEWINDEX
     25710+              && OLDNUM(SP_PARM, i) - i == shift)
     25711            i++;
     25712        end = i - 1 + shift;
     25713 
     25714        TR(TRACE_UPDATE | TRACE_MOVE, ("scroll [%d, %d] by %d", start, end, shift));
     25715 #if !defined(SCROLLDEBUG) && !defined(HASHDEBUG)
     25716-       if (_nc_scrolln(shift, start, end, screen_lines - 1) == ERR) {
     25717+       if (NCURSES_SP_NAME(_nc_scrolln) (NCURSES_SP_ARGx
     25718+                                         shift,
     25719+                                         start,
     25720+                                         end,
     25721+                                         screen_lines(SP_PARM) - 1) == ERR) {
     25722            TR(TRACE_UPDATE | TRACE_MOVE, ("unable to scroll"));
     25723            continue;
     25724        }
     25725@@ -238,23 +244,33 @@
     25726     }
     25727 
     25728     /* pass 2 - from bottom to top scrolling down */
     25729-    for (i = screen_lines - 1; i >= 0;) {
     25730-       while (i >= 0 && (OLDNUM(i) == _NEWINDEX || OLDNUM(i) >= i))
     25731+    for (i = screen_lines(SP_PARM) - 1; i >= 0;) {
     25732+       while (i >= 0
     25733+              && (OLDNUM(SP_PARM, i) == _NEWINDEX
     25734+                  || OLDNUM(SP_PARM, i) >= i)) {
     25735            i--;
     25736+       }
     25737        if (i < 0)
     25738            break;
     25739 
     25740-       shift = OLDNUM(i) - i;  /* shift < 0 */
     25741+       shift = OLDNUM(SP_PARM, i) - i;         /* shift < 0 */
     25742        end = i;
     25743 
     25744        i--;
     25745-       while (i >= 0 && OLDNUM(i) != _NEWINDEX && OLDNUM(i) - i == shift)
     25746+       while (i >= 0
     25747+              && OLDNUM(SP_PARM, i) != _NEWINDEX
     25748+              && OLDNUM(SP_PARM, i) - i == shift) {
     25749            i--;
     25750+       }
     25751        start = i + 1 - (-shift);
     25752 
     25753        TR(TRACE_UPDATE | TRACE_MOVE, ("scroll [%d, %d] by %d", start, end, shift));
     25754 #if !defined(SCROLLDEBUG) && !defined(HASHDEBUG)
     25755-       if (_nc_scrolln(shift, start, end, screen_lines - 1) == ERR) {
     25756+       if (NCURSES_SP_NAME(_nc_scrolln) (NCURSES_SP_ARGx
     25757+                                         shift,
     25758+                                         start,
     25759+                                         end,
     25760+                                         screen_lines(SP_PARM) - 1) == ERR) {
     25761            TR(TRACE_UPDATE | TRACE_MOVE, ("unable to scroll"));
     25762            continue;
     25763        }
     25764@@ -263,24 +279,41 @@
     25765     TR(TRACE_ICALLS, (T_RETURN("")));
     25766 }
     25767 
     25768+#if NCURSES_SP_FUNCS
     25769+NCURSES_EXPORT(void)
     25770+_nc_scroll_optimize(void)
     25771+{
     25772+    NCURSES_SP_NAME(_nc_scroll_optimize) (CURRENT_SCREEN);
     25773+}
     25774+#endif
     25775+
     25776 #if defined(TRACE) || defined(SCROLLDEBUG) || defined(HASHDEBUG)
     25777 NCURSES_EXPORT(void)
     25778-_nc_linedump(void)
     25779+NCURSES_SP_NAME(_nc_linedump) (NCURSES_SP_DCL0)
     25780 /* dump the state of the real and virtual oldnum fields */
     25781 {
     25782     int n;
     25783     char *buf = 0;
     25784-    size_t want = (screen_lines + 1) * 4;
     25785+    size_t want = (screen_lines(SP_PARM) + 1) * 4;
     25786 
     25787     if ((buf = typeMalloc(char, want)) != 0) {
     25788 
     25789        (void) strcpy(buf, "virt");
     25790-       for (n = 0; n < screen_lines; n++)
     25791-           (void) sprintf(buf + strlen(buf), " %02d", OLDNUM(n));
     25792+       for (n = 0; n < screen_lines(SP_PARM); n++)
     25793+           (void) sprintf(buf + strlen(buf), " %02d", OLDNUM(SP_PARM, n));
     25794        TR(TRACE_UPDATE | TRACE_MOVE, (buf));
     25795        free(buf);
     25796     }
     25797 }
     25798+
     25799+#if NCURSES_SP_FUNCS
     25800+NCURSES_EXPORT(void)
     25801+_nc_linedump(void)
     25802+{
     25803+    NCURSES_SP_NAME(_nc_linedump) (CURRENT_SCREEN);
     25804+}
     25805+#endif
     25806+
     25807 #endif /* defined(TRACE) || defined(SCROLLDEBUG) */
     25808 
     25809 #ifdef SCROLLDEBUG
     25810diff -Naur ncurses-5.7.orig/ncurses/tty/hashmap.c ncurses-5.7/ncurses/tty/hashmap.c
     25811--- ncurses-5.7.orig/ncurses/tty/hashmap.c      2007-10-13 11:47:25.000000000 -0700
     25812+++ ncurses-5.7/ncurses/tty/hashmap.c   2009-06-05 14:01:51.000000000 -0700
     25813@@ -1,5 +1,5 @@
     25814 /****************************************************************************
     25815- * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                   *
     25816+ * Copyright (c) 1998-2007,2009 Free Software Foundation, Inc.              *
     25817  *                                                                          *
     25818  * Permission is hereby granted, free of charge, to any person obtaining a  *
     25819  * copy of this software and associated documentation files (the            *
     25820@@ -68,9 +68,12 @@
     25821 *****************************************************************************/
     25822 
     25823 #include <curses.priv.h>
     25824-#include <term.h>              /* for back_color_erase */
     25825 
     25826-MODULE_ID("$Id: hashmap.c,v 1.56 2007/10/13 18:47:25 Miroslav.Lichvar Exp $")
     25827+#ifndef CUR
     25828+#define CUR SP_TERMTYPE
     25829+#endif
     25830+
     25831+MODULE_ID("$Id: hashmap.c,v 1.59 2009/05/10 00:51:57 tom Exp $")
     25832 
     25833 #ifdef HASHDEBUG
     25834 
     25835@@ -83,25 +86,25 @@
     25836 int oldnums[MAXLINES], reallines[MAXLINES];
     25837 static NCURSES_CH_T oldtext[MAXLINES][TEXTWIDTH];
     25838 static NCURSES_CH_T newtext[MAXLINES][TEXTWIDTH];
     25839-# define OLDNUM(n)     oldnums[n]
     25840-# define OLDTEXT(n)    oldtext[n]
     25841-# define NEWTEXT(m)    newtext[m]
     25842-# define PENDING(n)     1
     25843+# define OLDNUM(sp,n)  oldnums[n]
     25844+# define OLDTEXT(sp,n) oldtext[n]
     25845+# define NEWTEXT(sp,m) newtext[m]
     25846+# define PENDING(sp,n)  1
     25847 
     25848 #else /* !HASHDEBUG */
     25849 
     25850-# define OLDNUM(n)     SP->_oldnum_list[n]
     25851-# define OLDTEXT(n)    curscr->_line[n].text
     25852-# define NEWTEXT(m)    newscr->_line[m].text
     25853-# define TEXTWIDTH     (curscr->_maxx+1)
     25854-# define PENDING(n)     (newscr->_line[n].firstchar != _NOCHANGE)
     25855+# define OLDNUM(sp,n)  (sp)->_oldnum_list[n]
     25856+# define OLDTEXT(sp,n) (sp)->_curscr->_line[n].text
     25857+# define NEWTEXT(sp,m) (sp)->_newscr->_line[m].text
     25858+# define TEXTWIDTH(sp) ((sp)->_curscr->_maxx+1)
     25859+# define PENDING(sp,n)  ((sp)->_newscr->_line[n].firstchar != _NOCHANGE)
     25860 
     25861 #endif /* !HASHDEBUG */
     25862 
     25863-#define oldhash                (SP->oldhash)
     25864-#define newhash                (SP->newhash)
     25865-#define hashtab                (SP->hashtab)
     25866-#define lines_alloc    (SP->hashtab_len)
     25867+#define oldhash(sp)    ((sp)->oldhash)
     25868+#define newhash(sp)    ((sp)->newhash)
     25869+#define hashtab(sp)    ((sp)->hashtab)
     25870+#define lines_alloc(sp)        ((sp)->hashtab_len)
     25871 
     25872 #if USE_WIDEC_SUPPORT
     25873 #define HASH_VAL(ch) (ch.chars[0])
     25874@@ -112,12 +115,12 @@
     25875 static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT);
     25876 
     25877 static NCURSES_INLINE unsigned long
     25878-hash(NCURSES_CH_T * text)
     25879+hash(SCREEN *sp, NCURSES_CH_T * text)
     25880 {
     25881     int i;
     25882     NCURSES_CH_T ch;
     25883     unsigned long result = 0;
     25884-    for (i = TEXTWIDTH; i > 0; i--) {
     25885+    for (i = TEXTWIDTH(sp); i > 0; i--) {
     25886        ch = *text++;
     25887        result += (result << 5) + HASH_VAL(ch);
     25888     }
     25889@@ -126,12 +129,12 @@
     25890 
     25891 /* approximate update cost */
     25892 static int
     25893-update_cost(NCURSES_CH_T * from, NCURSES_CH_T * to)
     25894+update_cost(SCREEN *sp, NCURSES_CH_T * from, NCURSES_CH_T * to)
     25895 {
     25896     int cost = 0;
     25897     int i;
     25898 
     25899-    for (i = TEXTWIDTH; i > 0; i--, from++, to++)
     25900+    for (i = TEXTWIDTH(sp); i > 0; i--, from++, to++)
     25901        if (!(CharEq(*from, *to)))
     25902            cost++;
     25903 
     25904@@ -139,7 +142,7 @@
     25905 }
     25906 
     25907 static int
     25908-update_cost_from_blank(NCURSES_CH_T * to)
     25909+update_cost_from_blank(SCREEN *sp, NCURSES_CH_T * to)
     25910 {
     25911     int cost = 0;
     25912     int i;
     25913@@ -148,7 +151,7 @@
     25914     if (back_color_erase)
     25915        SetPair(blank, GetPair(stdscr->_nc_bkgd));
     25916 
     25917-    for (i = TEXTWIDTH; i > 0; i--, to++)
     25918+    for (i = TEXTWIDTH(sp); i > 0; i--, to++)
     25919        if (!(CharEq(blank, *to)))
     25920            cost++;
     25921 
     25922@@ -160,14 +163,14 @@
     25923  * effective. 'blank' indicates whether the line 'to' would become blank.
     25924  */
     25925 static NCURSES_INLINE bool
     25926-cost_effective(const int from, const int to, const bool blank)
     25927+cost_effective(SCREEN *sp, const int from, const int to, const bool blank)
     25928 {
     25929     int new_from;
     25930 
     25931     if (from == to)
     25932        return FALSE;
     25933 
     25934-    new_from = OLDNUM(from);
     25935+    new_from = OLDNUM(sp, from);
     25936     if (new_from == _NEWINDEX)
     25937        new_from = from;
     25938 
     25939@@ -175,16 +178,17 @@
     25940      * On the left side of >= is the cost before moving;
     25941      * on the right side -- cost after moving.
     25942      */
     25943-    return (((blank ? update_cost_from_blank(NEWTEXT(to))
     25944-             : update_cost(OLDTEXT(to), NEWTEXT(to)))
     25945-            + update_cost(OLDTEXT(new_from), NEWTEXT(from)))
     25946-           >= ((new_from == from ? update_cost_from_blank(NEWTEXT(from))
     25947-                : update_cost(OLDTEXT(new_from), NEWTEXT(from)))
     25948-               + update_cost(OLDTEXT(from), NEWTEXT(to)))) ? TRUE : FALSE;
     25949+    return (((blank ? update_cost_from_blank(sp, NEWTEXT(sp, to))
     25950+             : update_cost(sp, OLDTEXT(sp, to), NEWTEXT(sp, to)))
     25951+            + update_cost(sp, OLDTEXT(sp, new_from), NEWTEXT(sp, from)))
     25952+           >= ((new_from == from ? update_cost_from_blank(sp, NEWTEXT(sp, from))
     25953+                : update_cost(sp, OLDTEXT(sp, new_from), NEWTEXT(sp, from)))
     25954+               + update_cost(sp, OLDTEXT(sp, from), NEWTEXT(sp, to))))
     25955+       ? TRUE : FALSE;
     25956 }
     25957 
     25958 static void
     25959-grow_hunks(void)
     25960+grow_hunks(SCREEN *sp)
     25961 {
     25962     int start, end, shift;
     25963     int back_limit, forward_limit;     /* limits for cells to fill */
     25964@@ -200,35 +204,36 @@
     25965     back_ref_limit = 0;
     25966 
     25967     i = 0;
     25968-    while (i < screen_lines && OLDNUM(i) == _NEWINDEX)
     25969+    while (i < screen_lines(sp) && OLDNUM(sp, i) == _NEWINDEX)
     25970        i++;
     25971-    for (; i < screen_lines; i = next_hunk) {
     25972+    for (; i < screen_lines(sp); i = next_hunk) {
     25973        start = i;
     25974-       shift = OLDNUM(i) - i;
     25975+       shift = OLDNUM(sp, i) - i;
     25976 
     25977        /* get forward limit */
     25978        i = start + 1;
     25979-       while (i < screen_lines && OLDNUM(i) != _NEWINDEX && OLDNUM(i) - i
     25980-              == shift)
     25981+       while (i < screen_lines(sp)
     25982+              && OLDNUM(sp, i) != _NEWINDEX
     25983+              && OLDNUM(sp, i) - i == shift)
     25984            i++;
     25985        end = i;
     25986-       while (i < screen_lines && OLDNUM(i) == _NEWINDEX)
     25987+       while (i < screen_lines(sp) && OLDNUM(sp, i) == _NEWINDEX)
     25988            i++;
     25989        next_hunk = i;
     25990        forward_limit = i;
     25991-       if (i >= screen_lines || OLDNUM(i) >= i)
     25992+       if (i >= screen_lines(sp) || OLDNUM(sp, i) >= i)
     25993            forward_ref_limit = i;
     25994        else
     25995-           forward_ref_limit = OLDNUM(i);
     25996+           forward_ref_limit = OLDNUM(sp, i);
     25997 
     25998        i = start - 1;
     25999        /* grow back */
     26000        if (shift < 0)
     26001            back_limit = back_ref_limit + (-shift);
     26002        while (i >= back_limit) {
     26003-           if (newhash[i] == oldhash[i + shift]
     26004-               || cost_effective(i + shift, i, shift < 0)) {
     26005-               OLDNUM(i) = i + shift;
     26006+           if (newhash(sp)[i] == oldhash(sp)[i + shift]
     26007+               || cost_effective(sp, i + shift, i, shift < 0)) {
     26008+               OLDNUM(sp, i) = i + shift;
     26009                TR(TRACE_UPDATE | TRACE_MOVE,
     26010                   ("connected new line %d to old line %d (backward continuation)",
     26011                    i, i + shift));
     26012@@ -246,9 +251,9 @@
     26013        if (shift > 0)
     26014            forward_limit = forward_ref_limit - shift;
     26015        while (i < forward_limit) {
     26016-           if (newhash[i] == oldhash[i + shift]
     26017-               || cost_effective(i + shift, i, shift > 0)) {
     26018-               OLDNUM(i) = i + shift;
     26019+           if (newhash(sp)[i] == oldhash(sp)[i + shift]
     26020+               || cost_effective(sp, i + shift, i, shift > 0)) {
     26021+               OLDNUM(sp, i) = i + shift;
     26022                TR(TRACE_UPDATE | TRACE_MOVE,
     26023                   ("connected new line %d to old line %d (forward continuation)",
     26024                    i, i + shift));
     26025@@ -268,51 +273,53 @@
     26026 }
     26027 
     26028 NCURSES_EXPORT(void)
     26029-_nc_hash_map(void)
     26030+NCURSES_SP_NAME(_nc_hash_map) (NCURSES_SP_DCL0)
     26031 {
     26032-    HASHMAP *sp;
     26033+    HASHMAP *hsp;
     26034     register int i;
     26035     int start, shift, size;
     26036 
     26037-    if (screen_lines > lines_alloc) {
     26038-       if (hashtab)
     26039-           free(hashtab);
     26040-       hashtab = typeMalloc(HASHMAP, (screen_lines + 1) * 2);
     26041-       if (!hashtab) {
     26042-           if (oldhash) {
     26043-               FreeAndNull(oldhash);
     26044+    if (screen_lines(SP_PARM) > lines_alloc(SP_PARM)) {
     26045+       if (hashtab(SP_PARM))
     26046+           free(hashtab(SP_PARM));
     26047+       hashtab(SP_PARM) = typeMalloc(HASHMAP, (screen_lines(SP_PARM) + 1) * 2);
     26048+       if (!hashtab(SP_PARM)) {
     26049+           if (oldhash(SP_PARM)) {
     26050+               FreeAndNull(oldhash(SP_PARM));
     26051            }
     26052-           lines_alloc = 0;
     26053+           lines_alloc(SP_PARM) = 0;
     26054            return;
     26055        }
     26056-       lines_alloc = screen_lines;
     26057+       lines_alloc(SP_PARM) = screen_lines(SP_PARM);
     26058     }
     26059 
     26060-    if (oldhash && newhash) {
     26061+    if (oldhash(SP_PARM) && newhash(SP_PARM)) {
     26062        /* re-hash only changed lines */
     26063-       for (i = 0; i < screen_lines; i++) {
     26064-           if (PENDING(i))
     26065-               newhash[i] = hash(NEWTEXT(i));
     26066+       for (i = 0; i < screen_lines(SP_PARM); i++) {
     26067+           if (PENDING(SP_PARM, i))
     26068+               newhash(SP_PARM)[i] = hash(SP_PARM, NEWTEXT(SP_PARM, i));
     26069        }
     26070     } else {
     26071        /* re-hash all */
     26072-       if (oldhash == 0)
     26073-           oldhash = typeCalloc(unsigned long, (unsigned) screen_lines);
     26074-       if (newhash == 0)
     26075-           newhash = typeCalloc(unsigned long, (unsigned) screen_lines);
     26076-       if (!oldhash || !newhash)
     26077+       if (oldhash(SP_PARM) == 0)
     26078+           oldhash(SP_PARM) = typeCalloc(unsigned long,
     26079+                                           (unsigned) screen_lines(SP_PARM));
     26080+       if (newhash(SP_PARM) == 0)
     26081+           newhash(SP_PARM) = typeCalloc(unsigned long,
     26082+                                           (unsigned) screen_lines(SP_PARM));
     26083+       if (!oldhash(SP_PARM) || !newhash(SP_PARM))
     26084            return;             /* malloc failure */
     26085-       for (i = 0; i < screen_lines; i++) {
     26086-           newhash[i] = hash(NEWTEXT(i));
     26087-           oldhash[i] = hash(OLDTEXT(i));
     26088+       for (i = 0; i < screen_lines(SP_PARM); i++) {
     26089+           newhash(SP_PARM)[i] = hash(SP_PARM, NEWTEXT(SP_PARM, i));
     26090+           oldhash(SP_PARM)[i] = hash(SP_PARM, OLDTEXT(SP_PARM, i));
     26091        }
     26092     }
     26093 
     26094 #ifdef HASH_VERIFY
     26095-    for (i = 0; i < screen_lines; i++) {
     26096-       if (newhash[i] != hash(NEWTEXT(i)))
     26097+    for (i = 0; i < screen_lines(SP_PARM); i++) {
     26098+       if (newhash(SP_PARM)[i] != hash(SP_PARM, NEWTEXT(SP_PARM, i)))
     26099            fprintf(stderr, "error in newhash[%d]\n", i);
     26100-       if (oldhash[i] != hash(OLDTEXT(i)))
     26101+       if (oldhash(SP_PARM)[i] != hash(SP_PARM, OLDTEXT(SP_PARM, i)))
     26102            fprintf(stderr, "error in oldhash[%d]\n", i);
     26103     }
     26104 #endif
     26105@@ -320,28 +327,29 @@
     26106     /*
     26107      * Set up and count line-hash values.
     26108      */
     26109-    memset(hashtab, '\0', sizeof(*hashtab) * (screen_lines + 1) * 2);
     26110-    for (i = 0; i < screen_lines; i++) {
     26111-       unsigned long hashval = oldhash[i];
     26112+    memset(hashtab(SP_PARM), '\0',
     26113+          sizeof(*(hashtab(SP_PARM))) * (screen_lines(SP_PARM) + 1) * 2);
     26114+    for (i = 0; i < screen_lines(SP_PARM); i++) {
     26115+       unsigned long hashval = oldhash(SP_PARM)[i];
     26116 
     26117-       for (sp = hashtab; sp->hashval; sp++)
     26118-           if (sp->hashval == hashval)
     26119+       for (hsp = hashtab(SP_PARM); hsp->hashval; hsp++)
     26120+           if (hsp->hashval == hashval)
     26121                break;
     26122-       sp->hashval = hashval;  /* in case this is a new entry */
     26123-       sp->oldcount++;
     26124-       sp->oldindex = i;
     26125+       hsp->hashval = hashval; /* in case this is a new entry */
     26126+       hsp->oldcount++;
     26127+       hsp->oldindex = i;
     26128     }
     26129-    for (i = 0; i < screen_lines; i++) {
     26130-       unsigned long hashval = newhash[i];
     26131+    for (i = 0; i < screen_lines(SP_PARM); i++) {
     26132+       unsigned long hashval = newhash(SP_PARM)[i];
     26133 
     26134-       for (sp = hashtab; sp->hashval; sp++)
     26135-           if (sp->hashval == hashval)
     26136+       for (hsp = hashtab(SP_PARM); hsp->hashval; hsp++)
     26137+           if (hsp->hashval == hashval)
     26138                break;
     26139-       sp->hashval = hashval;  /* in case this is a new entry */
     26140-       sp->newcount++;
     26141-       sp->newindex = i;
     26142+       hsp->hashval = hashval; /* in case this is a new entry */
     26143+       hsp->newcount++;
     26144+       hsp->newindex = i;
     26145 
     26146-       OLDNUM(i) = _NEWINDEX;  /* initialize old indices array */
     26147+       OLDNUM(SP_PARM, i) = _NEWINDEX;         /* initialize old indices array */
     26148     }
     26149 
     26150     /*
     26151@@ -351,16 +359,16 @@
     26152      * extending hunks by cost_effective. Otherwise, it does not
     26153      * have any side effects.
     26154      */
     26155-    for (sp = hashtab; sp->hashval; sp++)
     26156-       if (sp->oldcount == 1 && sp->newcount == 1
     26157-           && sp->oldindex != sp->newindex) {
     26158+    for (hsp = hashtab(SP_PARM); hsp->hashval; hsp++)
     26159+       if (hsp->oldcount == 1 && hsp->newcount == 1
     26160+           && hsp->oldindex != hsp->newindex) {
     26161            TR(TRACE_UPDATE | TRACE_MOVE,
     26162               ("new line %d is hash-identical to old line %d (unique)",
     26163-               sp->newindex, sp->oldindex));
     26164-           OLDNUM(sp->newindex) = sp->oldindex;
     26165+               hsp->newindex, hsp->oldindex));
     26166+           OLDNUM(SP_PARM, hsp->newindex) = hsp->oldindex;
     26167        }
     26168 
     26169-    grow_hunks();
     26170+    grow_hunks(SP_PARM);
     26171 
     26172     /*
     26173      * Eliminate bad or impossible shifts -- this includes removing
     26174@@ -368,58 +376,83 @@
     26175      * those which are to be moved too far, they are likely to destroy
     26176      * more than carry.
     26177      */
     26178-    for (i = 0; i < screen_lines;) {
     26179-       while (i < screen_lines && OLDNUM(i) == _NEWINDEX)
     26180+    for (i = 0; i < screen_lines(SP_PARM);) {
     26181+       while (i < screen_lines(SP_PARM) && OLDNUM(SP_PARM, i) == _NEWINDEX)
     26182            i++;
     26183-       if (i >= screen_lines)
     26184+       if (i >= screen_lines(SP_PARM))
     26185            break;
     26186        start = i;
     26187-       shift = OLDNUM(i) - i;
     26188+       shift = OLDNUM(SP_PARM, i) - i;
     26189        i++;
     26190-       while (i < screen_lines && OLDNUM(i) != _NEWINDEX && OLDNUM(i) - i
     26191-              == shift)
     26192+       while (i < screen_lines(SP_PARM)
     26193+              && OLDNUM(SP_PARM, i) != _NEWINDEX
     26194+              && OLDNUM(SP_PARM, i) - i == shift)
     26195            i++;
     26196        size = i - start;
     26197        if (size < 3 || size + min(size / 8, 2) < abs(shift)) {
     26198            while (start < i) {
     26199-               OLDNUM(start) = _NEWINDEX;
     26200+               OLDNUM(SP_PARM, start) = _NEWINDEX;
     26201                start++;
     26202            }
     26203        }
     26204     }
     26205 
     26206     /* After clearing invalid hunks, try grow the rest. */
     26207-    grow_hunks();
     26208+    grow_hunks(SP_PARM);
     26209 }
     26210 
     26211+#if NCURSES_SP_FUNCS
     26212+NCURSES_EXPORT(void)
     26213+_nc_hash_map(void)
     26214+{
     26215+    NCURSES_SP_NAME(_nc_hash_map) (CURRENT_SCREEN);
     26216+}
     26217+#endif
     26218+
     26219+NCURSES_EXPORT(void)
     26220+NCURSES_SP_NAME(_nc_make_oldhash) (NCURSES_SP_DCLx int i)
     26221+{
     26222+    if (oldhash(SP_PARM))
     26223+       oldhash(SP_PARM)[i] = hash(SP_PARM, OLDTEXT(SP_PARM, i));
     26224+}
     26225+
     26226+#if NCURSES_SP_FUNCS
     26227 NCURSES_EXPORT(void)
     26228 _nc_make_oldhash(int i)
     26229 {
     26230-    if (oldhash)
     26231-       oldhash[i] = hash(OLDTEXT(i));
     26232+    NCURSES_SP_NAME(_nc_make_oldhash) (CURRENT_SCREEN, i);
     26233 }
     26234+#endif
     26235 
     26236 NCURSES_EXPORT(void)
     26237-_nc_scroll_oldhash(int n, int top, int bot)
     26238+NCURSES_SP_NAME(_nc_scroll_oldhash) (NCURSES_SP_DCLx int n, int top, int bot)
     26239 {
     26240     size_t size;
     26241     int i;
     26242 
     26243-    if (!oldhash)
     26244+    if (!oldhash(SP_PARM))
     26245        return;
     26246 
     26247-    size = sizeof(*oldhash) * (bot - top + 1 - abs(n));
     26248+    size = sizeof(*(oldhash(SP_PARM))) * (bot - top + 1 - abs(n));
     26249     if (n > 0) {
     26250-       memmove(oldhash + top, oldhash + top + n, size);
     26251+       memmove(oldhash(SP_PARM) + top, oldhash(SP_PARM) + top + n, size);
     26252        for (i = bot; i > bot - n; i--)
     26253-           oldhash[i] = hash(OLDTEXT(i));
     26254+           oldhash(SP_PARM)[i] = hash(SP_PARM, OLDTEXT(SP_PARM, i));
     26255     } else {
     26256-       memmove(oldhash + top - n, oldhash + top, size);
     26257+       memmove(oldhash(SP_PARM) + top - n, oldhash(SP_PARM) + top, size);
     26258        for (i = top; i < top - n; i++)
     26259-           oldhash[i] = hash(OLDTEXT(i));
     26260+           oldhash(SP_PARM)[i] = hash(SP_PARM, OLDTEXT(SP_PARM, i));
     26261     }
     26262 }
     26263 
     26264+#if NCURSES_SP_FUNCS
     26265+NCURSES_EXPORT(void)
     26266+_nc_scroll_oldhash(int n, int top, int bot)
     26267+{
     26268+    NCURSES_SP_NAME(_nc_scroll_oldhash) (CURRENT_SCREEN, n, top, bot);
     26269+}
     26270+#endif
     26271+
     26272 #ifdef HASHDEBUG
     26273 static void
     26274 usage(void)
    2039526275diff -Naur ncurses-5.7.orig/ncurses/tty/lib_mvcur.c ncurses-5.7/ncurses/tty/lib_mvcur.c
    2039626276--- ncurses-5.7.orig/ncurses/tty/lib_mvcur.c    2008-08-16 12:30:58.000000000 -0700
    20397 +++ ncurses-5.7/ncurses/tty/lib_mvcur.c 2009-03-22 21:17:05.655995250 -0700
     26277+++ ncurses-5.7/ncurses/tty/lib_mvcur.c 2009-06-05 14:01:51.000000000 -0700
    2039826278@@ -1,5 +1,5 @@
    2039926279 /****************************************************************************
     
    2041126291 
    2041226292 /*
    20413 @@ -155,7 +156,7 @@
    20414  #include <term.h>
     26293@@ -109,8 +110,8 @@
     26294  * LONG_DIST and (b) further inward from the right or left edge than LONG_DIST,
     26295  * we'll consider nonlocal.
     26296  */
     26297-#define NOT_LOCAL(fy, fx, ty, tx)      ((tx > LONG_DIST) \
     26298-                && (tx < screen_columns - 1 - LONG_DIST) \
     26299+#define NOT_LOCAL(sp, fy, fx, ty, tx)  ((tx > LONG_DIST) \
     26300+                && (tx < screen_columns(sp) - 1 - LONG_DIST) \
     26301                 && (abs(ty-fy) + abs(tx-fx) > LONG_DIST))
     26302 
     26303 /****************************************************************************
     26304@@ -152,13 +153,16 @@
     26305  */
     26306 
     26307 #include <curses.priv.h>
     26308-#include <term.h>
    2041526309 #include <ctype.h>
    2041626310 
    2041726311-MODULE_ID("$Id: lib_mvcur.c,v 1.113 2008/08/16 19:30:58 tom Exp $")
    20418 +MODULE_ID("$Id: lib_mvcur.c,v 1.114 2009/02/15 00:50:33 tom Exp $")
    20419  
    20420  #define WANT_CHAR(y, x)        SP->_newscr->_line[y].text[x]   /* desired state */
    20421  #define BAUDRATE       cur_term->_baudrate     /* bits per second */
    20422 @@ -853,9 +854,10 @@
     26312+#ifndef CUR
     26313+#define CUR SP_TERMTYPE
     26314+#endif
     26315+
     26316+MODULE_ID("$Id: lib_mvcur.c,v 1.120 2009/05/10 00:52:29 tom Exp $")
     26317 
     26318-#define WANT_CHAR(y, x)        SP->_newscr->_line[y].text[x]   /* desired state */
     26319-#define BAUDRATE       cur_term->_baudrate     /* bits per second */
     26320+#define WANT_CHAR(sp, y, x) (sp)->_newscr->_line[y].text[x]    /* desired state */
     26321+#define BAUDRATE(sp)   cur_term->_baudrate     /* bits per second */
     26322 
     26323 #if defined(MAIN) || defined(NCURSES_TEST)
     26324 #include <sys/time.h>
     26325@@ -169,7 +173,7 @@
     26326 
     26327 #define OPT_SIZE 512
     26328 
     26329-static int normalized_cost(const char *const cap, int affcnt);
     26330+static int normalized_cost(NCURSES_SP_DCLx const char *const cap, int affcnt);
     26331 
     26332 /****************************************************************************
     26333  *
     26334@@ -179,34 +183,34 @@
     26335 
     26336 #ifdef TRACE
     26337 static int
     26338-trace_cost_of(const char *capname, const char *cap, int affcnt)
     26339+trace_cost_of(NCURSES_SP_DCLx const char *capname, const char *cap, int affcnt)
     26340 {
     26341-    int result = _nc_msec_cost(cap, affcnt);
     26342+    int result = NCURSES_SP_NAME(_nc_msec_cost) (NCURSES_SP_ARGx cap, affcnt);
     26343     TR(TRACE_CHARPUT | TRACE_MOVE,
     26344        ("CostOf %s %d %s", capname, result, _nc_visbuf(cap)));
     26345     return result;
     26346 }
     26347-#define CostOf(cap,affcnt) trace_cost_of(#cap,cap,affcnt);
     26348+#define CostOf(cap,affcnt) trace_cost_of(NCURSES_SP_ARGx #cap, cap, affcnt)
     26349 
     26350 static int
     26351-trace_normalized_cost(const char *capname, const char *cap, int affcnt)
     26352+trace_normalized_cost(NCURSES_SP_DCLx const char *capname, const char *cap, int affcnt)
     26353 {
     26354-    int result = normalized_cost(cap, affcnt);
     26355+    int result = normalized_cost(NCURSES_SP_ARGx cap, affcnt);
     26356     TR(TRACE_CHARPUT | TRACE_MOVE,
     26357        ("NormalizedCost %s %d %s", capname, result, _nc_visbuf(cap)));
     26358     return result;
     26359 }
     26360-#define NormalizedCost(cap,affcnt) trace_normalized_cost(#cap,cap,affcnt);
     26361+#define NormalizedCost(cap,affcnt) trace_normalized_cost(NCURSES_SP_ARGx #cap, cap, affcnt)
     26362 
     26363 #else
     26364 
     26365-#define CostOf(cap,affcnt) _nc_msec_cost(cap,affcnt);
     26366-#define NormalizedCost(cap,affcnt) normalized_cost(cap,affcnt);
     26367+#define CostOf(cap,affcnt) NCURSES_SP_NAME(_nc_msec_cost)(NCURSES_SP_ARGx cap, affcnt)
     26368+#define NormalizedCost(cap,affcnt) normalized_cost(NCURSES_SP_ARGx cap, affcnt)
     26369 
     26370 #endif
     26371 
     26372 NCURSES_EXPORT(int)
     26373-_nc_msec_cost(const char *const cap, int affcnt)
     26374+NCURSES_SP_NAME(_nc_msec_cost) (NCURSES_SP_DCLx const char *const cap, int affcnt)
     26375 /* compute the cost of a given operation */
     26376 {
     26377     if (cap == 0)
     26378@@ -230,45 +234,56 @@
     26379                }
     26380 
     26381 #if NCURSES_NO_PADDING
     26382-               if (!GetNoPadding(SP))
     26383+               if (!GetNoPadding(SP_PARM))
     26384 #endif
     26385                    cum_cost += number * 10;
     26386            } else
     26387-               cum_cost += SP->_char_padding;
     26388+               cum_cost += SP_PARM->_char_padding;
     26389        }
     26390 
     26391        return ((int) cum_cost);
     26392     }
     26393 }
     26394 
     26395+#if NCURSES_SP_FUNCS
     26396+NCURSES_EXPORT(int)
     26397+_nc_msec_cost(const char *const cap, int affcnt)
     26398+{
     26399+    return NCURSES_SP_NAME(_nc_msec_cost) (CURRENT_SCREEN, cap, affcnt);
     26400+}
     26401+#endif
     26402+
     26403 static int
     26404-normalized_cost(const char *const cap, int affcnt)
     26405+normalized_cost(NCURSES_SP_DCLx const char *const cap, int affcnt)
     26406 /* compute the effective character-count for an operation (round up) */
     26407 {
     26408-    int cost = _nc_msec_cost(cap, affcnt);
     26409+    int cost = NCURSES_SP_NAME(_nc_msec_cost) (NCURSES_SP_ARGx cap, affcnt);
     26410     if (cost != INFINITY)
     26411-       cost = (cost + SP->_char_padding - 1) / SP->_char_padding;
     26412+       cost = (cost + SP_PARM->_char_padding - 1) / SP_PARM->_char_padding;
     26413     return cost;
     26414 }
     26415 
     26416 static void
     26417-reset_scroll_region(void)
     26418+reset_scroll_region(NCURSES_SP_DCL0)
     26419 /* Set the scroll-region to a known state (the default) */
     26420 {
     26421     if (change_scroll_region) {
     26422-       TPUTS_TRACE("change_scroll_region");
     26423-       putp(TPARM_2(change_scroll_region, 0, screen_lines - 1));
     26424+       NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
     26425+                                  "change_scroll_region",
     26426+                                  TPARM_2(change_scroll_region,
     26427+                                          0, screen_lines(SP_PARM) - 1));
     26428     }
     26429 }
     26430 
     26431 NCURSES_EXPORT(void)
     26432-_nc_mvcur_resume(void)
     26433+NCURSES_SP_NAME(_nc_mvcur_resume) (NCURSES_SP_DCL0)
     26434 /* what to do at initialization time and after each shellout */
     26435 {
     26436     /* initialize screen for cursor access */
     26437     if (enter_ca_mode) {
     26438-       TPUTS_TRACE("enter_ca_mode");
     26439-       putp(enter_ca_mode);
     26440+       NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
     26441+                                  "enter_ca_mode",
     26442+                                  enter_ca_mode);
     26443     }
     26444 
     26445     /*
     26446@@ -280,53 +295,63 @@
     26447      * they know the screen size.  This is useful when you're running
     26448      * a vt100 emulation through xterm.
     26449      */
     26450-    reset_scroll_region();
     26451-    SP->_cursrow = SP->_curscol = -1;
     26452+    reset_scroll_region(NCURSES_SP_ARG);
     26453+    SP_PARM->_cursrow = SP_PARM->_curscol = -1;
     26454 
     26455     /* restore cursor shape */
     26456-    if (SP->_cursor != -1) {
     26457-       int cursor = SP->_cursor;
     26458-       SP->_cursor = -1;
     26459-       curs_set(cursor);
     26460+    if (SP_PARM->_cursor != -1) {
     26461+       int cursor = SP_PARM->_cursor;
     26462+       SP_PARM->_cursor = -1;
     26463+       NCURSES_SP_NAME(curs_set) (NCURSES_SP_ARGx cursor);
     26464     }
     26465 }
     26466 
     26467+#if NCURSES_SP_FUNCS
     26468 NCURSES_EXPORT(void)
     26469-_nc_mvcur_init(void)
     26470+_nc_mvcur_resume(void)
     26471+{
     26472+    NCURSES_SP_NAME(_nc_mvcur_resume) (CURRENT_SCREEN);
     26473+}
     26474+#endif
     26475+
     26476+NCURSES_EXPORT(void)
     26477+NCURSES_SP_NAME(_nc_mvcur_init) (NCURSES_SP_DCL0)
     26478 /* initialize the cost structure */
     26479 {
     26480-    if (isatty(fileno(SP->_ofp)))
     26481-       SP->_char_padding = ((BAUDBYTE * 1000 * 10)
     26482-                            / (BAUDRATE > 0 ? BAUDRATE : 9600));
     26483+    if (SP_PARM->_ofp && isatty(fileno(SP_PARM->_ofp)))
     26484+       SP_PARM->_char_padding = ((BAUDBYTE * 1000 * 10)
     26485+                                 / (BAUDRATE(SP_PARM) > 0
     26486+                                    ? BAUDRATE(SP_PARM)
     26487+                                    : 9600));
     26488     else
     26489-       SP->_char_padding = 1;  /* must be nonzero */
     26490-    if (SP->_char_padding <= 0)
     26491-       SP->_char_padding = 1;  /* must be nonzero */
     26492-    TR(TRACE_CHARPUT | TRACE_MOVE, ("char_padding %d msecs", SP->_char_padding));
     26493+       SP_PARM->_char_padding = 1;     /* must be nonzero */
     26494+    if (SP_PARM->_char_padding <= 0)
     26495+       SP_PARM->_char_padding = 1;     /* must be nonzero */
     26496+    TR(TRACE_CHARPUT | TRACE_MOVE, ("char_padding %d msecs", SP_PARM->_char_padding));
     26497 
     26498     /* non-parameterized local-motion strings */
     26499-    SP->_cr_cost = CostOf(carriage_return, 0);
     26500-    SP->_home_cost = CostOf(cursor_home, 0);
     26501-    SP->_ll_cost = CostOf(cursor_to_ll, 0);
     26502+    SP_PARM->_cr_cost = CostOf(carriage_return, 0);
     26503+    SP_PARM->_home_cost = CostOf(cursor_home, 0);
     26504+    SP_PARM->_ll_cost = CostOf(cursor_to_ll, 0);
     26505 #if USE_HARD_TABS
     26506     if (getenv("NCURSES_NO_HARD_TABS") == 0) {
     26507-       SP->_ht_cost = CostOf(tab, 0);
     26508-       SP->_cbt_cost = CostOf(back_tab, 0);
     26509+       SP_PARM->_ht_cost = CostOf(tab, 0);
     26510+       SP_PARM->_cbt_cost = CostOf(back_tab, 0);
     26511     } else {
     26512-       SP->_ht_cost = INFINITY;
     26513-       SP->_cbt_cost = INFINITY;
     26514+       SP_PARM->_ht_cost = INFINITY;
     26515+       SP_PARM->_cbt_cost = INFINITY;
     26516     }
     26517 #endif /* USE_HARD_TABS */
     26518-    SP->_cub1_cost = CostOf(cursor_left, 0);
     26519-    SP->_cuf1_cost = CostOf(cursor_right, 0);
     26520-    SP->_cud1_cost = CostOf(cursor_down, 0);
     26521-    SP->_cuu1_cost = CostOf(cursor_up, 0);
     26522-
     26523-    SP->_smir_cost = CostOf(enter_insert_mode, 0);
     26524-    SP->_rmir_cost = CostOf(exit_insert_mode, 0);
     26525-    SP->_ip_cost = 0;
     26526+    SP_PARM->_cub1_cost = CostOf(cursor_left, 0);
     26527+    SP_PARM->_cuf1_cost = CostOf(cursor_right, 0);
     26528+    SP_PARM->_cud1_cost = CostOf(cursor_down, 0);
     26529+    SP_PARM->_cuu1_cost = CostOf(cursor_up, 0);
     26530+
     26531+    SP_PARM->_smir_cost = CostOf(enter_insert_mode, 0);
     26532+    SP_PARM->_rmir_cost = CostOf(exit_insert_mode, 0);
     26533+    SP_PARM->_ip_cost = 0;
     26534     if (insert_padding) {
     26535-       SP->_ip_cost = CostOf(insert_padding, 0);
     26536+       SP_PARM->_ip_cost = CostOf(insert_padding, 0);
     26537     }
     26538 
     26539     /*
     26540@@ -335,7 +360,7 @@
     26541      * can treat it like absolute screen addressing.  This seems to be true
     26542      * for all cursor_mem_address terminal types in the terminfo database.
     26543      */
     26544-    SP->_address_cursor = cursor_address ? cursor_address : cursor_mem_address;
     26545+    SP_PARM->_address_cursor = cursor_address ? cursor_address : cursor_mem_address;
     26546 
     26547     /*
     26548      * Parametrized local-motion strings.  This static cost computation
     26549@@ -361,40 +386,43 @@
     26550      * All these averages depend on the assumption that all parameter values
     26551      * are equally probable.
     26552      */
     26553-    SP->_cup_cost = CostOf(TPARM_2(SP->_address_cursor, 23, 23), 1);
     26554-    SP->_cub_cost = CostOf(TPARM_1(parm_left_cursor, 23), 1);
     26555-    SP->_cuf_cost = CostOf(TPARM_1(parm_right_cursor, 23), 1);
     26556-    SP->_cud_cost = CostOf(TPARM_1(parm_down_cursor, 23), 1);
     26557-    SP->_cuu_cost = CostOf(TPARM_1(parm_up_cursor, 23), 1);
     26558-    SP->_hpa_cost = CostOf(TPARM_1(column_address, 23), 1);
     26559-    SP->_vpa_cost = CostOf(TPARM_1(row_address, 23), 1);
     26560+    SP_PARM->_cup_cost = CostOf(TPARM_2(SP_PARM->_address_cursor, 23, 23), 1);
     26561+    SP_PARM->_cub_cost = CostOf(TPARM_1(parm_left_cursor, 23), 1);
     26562+    SP_PARM->_cuf_cost = CostOf(TPARM_1(parm_right_cursor, 23), 1);
     26563+    SP_PARM->_cud_cost = CostOf(TPARM_1(parm_down_cursor, 23), 1);
     26564+    SP_PARM->_cuu_cost = CostOf(TPARM_1(parm_up_cursor, 23), 1);
     26565+    SP_PARM->_hpa_cost = CostOf(TPARM_1(column_address, 23), 1);
     26566+    SP_PARM->_vpa_cost = CostOf(TPARM_1(row_address, 23), 1);
     26567 
     26568     /* non-parameterized screen-update strings */
     26569-    SP->_ed_cost = NormalizedCost(clr_eos, 1);
     26570-    SP->_el_cost = NormalizedCost(clr_eol, 1);
     26571-    SP->_el1_cost = NormalizedCost(clr_bol, 1);
     26572-    SP->_dch1_cost = NormalizedCost(delete_character, 1);
     26573-    SP->_ich1_cost = NormalizedCost(insert_character, 1);
     26574+    SP_PARM->_ed_cost = NormalizedCost(clr_eos, 1);
     26575+    SP_PARM->_el_cost = NormalizedCost(clr_eol, 1);
     26576+    SP_PARM->_el1_cost = NormalizedCost(clr_bol, 1);
     26577+    SP_PARM->_dch1_cost = NormalizedCost(delete_character, 1);
     26578+    SP_PARM->_ich1_cost = NormalizedCost(insert_character, 1);
     26579 
     26580     /*
     26581      * If this is a bce-terminal, we want to bias the choice so we use clr_eol
     26582      * rather than spaces at the end of a line.
     26583      */
     26584     if (back_color_erase)
     26585-       SP->_el_cost = 0;
     26586+       SP_PARM->_el_cost = 0;
     26587 
     26588     /* parameterized screen-update strings */
     26589-    SP->_dch_cost = NormalizedCost(TPARM_1(parm_dch, 23), 1);
     26590-    SP->_ich_cost = NormalizedCost(TPARM_1(parm_ich, 23), 1);
     26591-    SP->_ech_cost = NormalizedCost(TPARM_1(erase_chars, 23), 1);
     26592-    SP->_rep_cost = NormalizedCost(TPARM_2(repeat_char, ' ', 23), 1);
     26593-
     26594-    SP->_cup_ch_cost = NormalizedCost(TPARM_2(SP->_address_cursor, 23, 23), 1);
     26595-    SP->_hpa_ch_cost = NormalizedCost(TPARM_1(column_address, 23), 1);
     26596-    SP->_cuf_ch_cost = NormalizedCost(TPARM_1(parm_right_cursor, 23), 1);
     26597-    SP->_inline_cost = min(SP->_cup_ch_cost,
     26598-                          min(SP->_hpa_ch_cost,
     26599-                              SP->_cuf_ch_cost));
     26600+    SP_PARM->_dch_cost = NormalizedCost(TPARM_1(parm_dch, 23), 1);
     26601+    SP_PARM->_ich_cost = NormalizedCost(TPARM_1(parm_ich, 23), 1);
     26602+    SP_PARM->_ech_cost = NormalizedCost(TPARM_1(erase_chars, 23), 1);
     26603+    SP_PARM->_rep_cost = NormalizedCost(TPARM_2(repeat_char, ' ', 23), 1);
     26604+
     26605+    SP_PARM->_cup_ch_cost = NormalizedCost(
     26606+                                             TPARM_2(SP_PARM->_address_cursor,
     26607+                                                     23, 23),
     26608+                                             1);
     26609+    SP_PARM->_hpa_ch_cost = NormalizedCost(TPARM_1(column_address, 23), 1);
     26610+    SP_PARM->_cuf_ch_cost = NormalizedCost(TPARM_1(parm_right_cursor, 23), 1);
     26611+    SP_PARM->_inline_cost = min(SP_PARM->_cup_ch_cost,
     26612+                               min(SP_PARM->_hpa_ch_cost,
     26613+                                   SP_PARM->_cuf_ch_cost));
     26614 
     26615     /*
     26616      * If save_cursor is used within enter_ca_mode, we should not use it for
     26617@@ -411,30 +439,40 @@
     26618     }
     26619 
     26620     /*
     26621-     * A different, possibly better way to arrange this would be to set
     26622-     * SP->_endwin = TRUE at window initialization time and let this be
     26623+     * A different, possibly better way to arrange this would be to set the
     26624+     * SCREEN's _endwin to TRUE at window initialization time and let this be
     26625      * called by doupdate's return-from-shellout code.
     26626      */
     26627+    NCURSES_SP_NAME(_nc_mvcur_resume) (NCURSES_SP_ARG);
     26628+}
     26629+
     26630+#if NCURSES_SP_FUNCS
     26631+NCURSES_EXPORT(void)
     26632+_nc_mvcur_init(void)
     26633+{
     26634+    NCURSES_SP_NAME(_nc_mvcur_init) (CURRENT_SCREEN);
     26635     _nc_mvcur_resume();
     26636 }
     26637+#endif
     26638 
     26639 NCURSES_EXPORT(void)
     26640-_nc_mvcur_wrap(void)
     26641+NCURSES_SP_NAME(_nc_mvcur_wrap) (NCURSES_SP_DCL0)
     26642 /* wrap up cursor-addressing mode */
     26643 {
     26644     /* leave cursor at screen bottom */
     26645-    mvcur(-1, -1, screen_lines - 1, 0);
     26646+    mvcur(-1, -1, screen_lines(CURRENT_SCREEN) - 1, 0);
     26647 
     26648     /* set cursor to normal mode */
     26649-    if (SP->_cursor != -1) {
     26650-       int cursor = SP->_cursor;
     26651-       curs_set(1);
     26652-       SP->_cursor = cursor;
     26653+    if (SP_PARM->_cursor != -1) {
     26654+       int cursor = SP_PARM->_cursor;
     26655+       NCURSES_SP_NAME(curs_set) (NCURSES_SP_ARGx 1);
     26656+       SP_PARM->_cursor = cursor;
     26657     }
     26658 
     26659     if (exit_ca_mode) {
     26660-       TPUTS_TRACE("exit_ca_mode");
     26661-       putp(exit_ca_mode);
     26662+       NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
     26663+                                  "exit_ca_mode",
     26664+                                  exit_ca_mode);
     26665     }
     26666     /*
     26667      * Reset terminal's tab counter.  There's a long-time bug that
     26668@@ -444,8 +482,16 @@
     26669      * escape sequences that reset things as column positions.
     26670      * Utter a \r to reset this invisibly.
     26671      */
     26672-    _nc_outch('\r');
     26673+    NCURSES_SP_NAME(_nc_outch) (NCURSES_SP_ARGx '\r');
     26674+}
     26675+
     26676+#if NCURSES_SP_FUNCS
     26677+NCURSES_EXPORT(void)
     26678+_nc_mvcur_wrap(void)
     26679+{
     26680+    NCURSES_SP_NAME(_nc_mvcur_wrap) (CURRENT_SCREEN);
     26681 }
     26682+#endif
     26683 
     26684 /****************************************************************************
     26685  *
     26686@@ -486,8 +532,13 @@
     26687 #define LASTTAB(fr)    ((fr > 0) ? ((fr - 1) / init_tabs) * init_tabs : -1)
     26688 
     26689 static int
     26690-relative_move(string_desc * target, int from_y, int from_x, int to_y, int
     26691-             to_x, bool ovw)
     26692+relative_move(NCURSES_SP_DCLx
     26693+             string_desc * target,
     26694+             int from_y,
     26695+             int from_x,
     26696+             int to_y,
     26697+             int to_x,
     26698+             bool ovw)
     26699 /* move via local motions (cuu/cuu1/cud/cud1/cub1/cub/cuf1/cuf/vpa/hpa) */
     26700 {
     26701     string_desc save;
     26702@@ -500,38 +551,38 @@
     26703 
     26704        if (row_address != 0
     26705            && _nc_safe_strcat(target, TPARM_1(row_address, to_y))) {
     26706-           vcost = SP->_vpa_cost;
     26707+           vcost = SP_PARM->_vpa_cost;
     26708        }
     26709 
     26710        if (to_y > from_y) {
     26711            n = (to_y - from_y);
     26712 
     26713            if (parm_down_cursor
     26714-               && SP->_cud_cost < vcost
     26715+               && SP_PARM->_cud_cost < vcost
     26716                && _nc_safe_strcat(_nc_str_copy(target, &save),
     26717                                   TPARM_1(parm_down_cursor, n))) {
     26718-               vcost = SP->_cud_cost;
     26719+               vcost = SP_PARM->_cud_cost;
     26720            }
     26721 
     26722            if (cursor_down
     26723-               && (*cursor_down != '\n' || SP->_nl)
     26724-               && (n * SP->_cud1_cost < vcost)) {
     26725+               && (*cursor_down != '\n' || SP_PARM->_nl)
     26726+               && (n * SP_PARM->_cud1_cost < vcost)) {
     26727                vcost = repeated_append(_nc_str_copy(target, &save), 0,
     26728-                                       SP->_cud1_cost, n, cursor_down);
     26729+                                       SP_PARM->_cud1_cost, n, cursor_down);
     26730            }
     26731        } else {                /* (to_y < from_y) */
     26732            n = (from_y - to_y);
     26733 
     26734            if (parm_up_cursor
     26735-               && SP->_cuu_cost < vcost
     26736+               && SP_PARM->_cuu_cost < vcost
     26737                && _nc_safe_strcat(_nc_str_copy(target, &save),
     26738                                   TPARM_1(parm_up_cursor, n))) {
     26739-               vcost = SP->_cuu_cost;
     26740+               vcost = SP_PARM->_cuu_cost;
     26741            }
     26742 
     26743-           if (cursor_up && (n * SP->_cuu1_cost < vcost)) {
     26744+           if (cursor_up && (n * SP_PARM->_cuu1_cost < vcost)) {
     26745                vcost = repeated_append(_nc_str_copy(target, &save), 0,
     26746-                                       SP->_cuu1_cost, n, cursor_up);
     26747+                                       SP_PARM->_cuu1_cost, n, cursor_up);
     26748            }
     26749        }
     26750 
     26751@@ -550,17 +601,17 @@
     26752        if (column_address
     26753            && _nc_safe_strcat(_nc_str_copy(target, &save),
     26754                               TPARM_1(column_address, to_x))) {
     26755-           hcost = SP->_hpa_cost;
     26756+           hcost = SP_PARM->_hpa_cost;
     26757        }
     26758 
     26759        if (to_x > from_x) {
     26760            n = to_x - from_x;
     26761 
     26762            if (parm_right_cursor
     26763-               && SP->_cuf_cost < hcost
     26764+               && SP_PARM->_cuf_cost < hcost
     26765                && _nc_safe_strcat(_nc_str_copy(target, &save),
     26766                                   TPARM_1(parm_right_cursor, n))) {
     26767-               hcost = SP->_cuf_cost;
     26768+               hcost = SP_PARM->_cuf_cost;
     26769            }
     26770 
     26771            if (cursor_right) {
     26772@@ -575,7 +626,7 @@
     26773 
     26774                    for (fr = from_x; (nxt = NEXTTAB(fr)) <= to_x; fr = nxt) {
     26775                        lhcost = repeated_append(&check, lhcost,
     26776-                                                SP->_ht_cost, 1, tab);
     26777+                                                SP_PARM->_ht_cost, 1, tab);
     26778                        if (lhcost == INFINITY)
     26779                            break;
     26780                    }
     26781@@ -599,7 +650,7 @@
     26782                    && n < (int) check.s_size
     26783                    && vcost == 0
     26784                    && str[0] == '\0') {
     26785-                   int wanted = CharOf(WANT_CHAR(to_y, from_x));
     26786+                   int wanted = CharOf(WANT_CHAR(SP_PARM, to_y, from_x));
     26787                    if (is8bits(wanted) && isdigit(wanted))
     26788                        ovw = FALSE;
     26789                }
     26790@@ -616,8 +667,8 @@
     26791                    int i;
     26792 
     26793                    for (i = 0; i < n; i++) {
     26794-                       NCURSES_CH_T ch = WANT_CHAR(to_y, from_x + i);
     26795-                       if (!SameAttrOf(ch, SCREEN_ATTRS(SP))
     26796+                       NCURSES_CH_T ch = WANT_CHAR(SP_PARM, to_y, from_x + i);
     26797+                       if (!SameAttrOf(ch, SCREEN_ATTRS(SP_PARM))
     26798 #if USE_WIDEC_SUPPORT
     26799                            || !Charable(ch)
     26800 #endif
     26801@@ -631,13 +682,13 @@
     26802                    int i;
     26803 
     26804                    for (i = 0; i < n; i++)
     26805-                       *check.s_tail++ = (char) CharOf(WANT_CHAR(to_y,
     26806+                       *check.s_tail++ = (char) CharOf(WANT_CHAR(SP_PARM, to_y,
     26807                                                                  from_x + i));
     26808                    *check.s_tail = '\0';
     26809                    check.s_size -= n;
     26810-                   lhcost += n * SP->_char_padding;
     26811+                   lhcost += n * SP_PARM->_char_padding;
     26812                } else {
     26813-                   lhcost = repeated_append(&check, lhcost, SP->_cuf1_cost,
     26814+                   lhcost = repeated_append(&check, lhcost, SP_PARM->_cuf1_cost,
     26815                                             n, cursor_right);
     26816                }
     26817 
     26818@@ -650,10 +701,10 @@
     26819            n = from_x - to_x;
     26820 
     26821            if (parm_left_cursor
     26822-               && SP->_cub_cost < hcost
     26823+               && SP_PARM->_cub_cost < hcost
     26824                && _nc_safe_strcat(_nc_str_copy(target, &save),
     26825                                   TPARM_1(parm_left_cursor, n))) {
     26826-               hcost = SP->_cub_cost;
     26827+               hcost = SP_PARM->_cub_cost;
     26828            }
     26829 
     26830            if (cursor_left) {
     26831@@ -667,7 +718,8 @@
     26832 
     26833                    for (fr = from_x; (nxt = LASTTAB(fr)) >= to_x; fr = nxt) {
     26834                        lhcost = repeated_append(&check, lhcost,
     26835-                                                SP->_cbt_cost, 1, back_tab);
     26836+                                                SP_PARM->_cbt_cost,
     26837+                                                1, back_tab);
     26838                        if (lhcost == INFINITY)
     26839                            break;
     26840                    }
     26841@@ -676,7 +728,9 @@
     26842                }
     26843 #endif /* USE_HARD_TABS */
     26844 
     26845-               lhcost = repeated_append(&check, lhcost, SP->_cub1_cost, n, cursor_left);
     26846+               lhcost = repeated_append(&check, lhcost,
     26847+                                        SP_PARM->_cub1_cost,
     26848+                                        n, cursor_left);
     26849 
     26850                if (lhcost < hcost
     26851                    && _nc_safe_strcat(_nc_str_copy(target, &save), str)) {
     26852@@ -705,7 +759,7 @@
     26853  */
     26854 
     26855 static NCURSES_INLINE int
     26856-onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
     26857+onscreen_mvcur(NCURSES_SP_DCLx int yold, int xold, int ynew, int xnew, bool ovw)
     26858 /* onscreen move from (yold, xold) to (ynew, xnew) */
     26859 {
     26860     string_desc result;
     26861@@ -723,9 +777,9 @@
     26862 #define InitResult _nc_str_init(&result, buffer, sizeof(buffer))
     26863 
     26864     /* tactic #0: use direct cursor addressing */
     26865-    if (_nc_safe_strcpy(InitResult, TPARM_2(SP->_address_cursor, ynew, xnew))) {
     26866+    if (_nc_safe_strcpy(InitResult, TPARM_2(SP_PARM->_address_cursor, ynew, xnew))) {
     26867        tactic = 0;
     26868-       usecost = SP->_cup_cost;
     26869+       usecost = SP_PARM->_cup_cost;
     26870 
     26871 #if defined(TRACE) || defined(NCURSES_TEST)
     26872        if (!(_nc_optimize_enable & OPTIMIZE_MVCUR))
     26873@@ -740,7 +794,7 @@
     26874         * (like, say, local-movement \n getting mapped to some obscure
     26875         * character because A_ALTCHARSET is on).
     26876         */
     26877-       if (yold == -1 || xold == -1 || NOT_LOCAL(yold, xold, ynew, xnew)) {
     26878+       if (yold == -1 || xold == -1 || NOT_LOCAL(SP_PARM, yold, xold, ynew, xnew)) {
     26879 #if defined(MAIN) || defined(NCURSES_TEST)
     26880            if (!profiling) {
     26881                (void) fputs("nonlocal\n", stderr);
     26882@@ -754,8 +808,10 @@
     26883 #ifndef NO_OPTIMIZE
     26884     /* tactic #1: use local movement */
     26885     if (yold != -1 && xold != -1
     26886-       && ((newcost = relative_move(NullResult, yold, xold, ynew, xnew,
     26887-                                    ovw)) != INFINITY)
     26888+       && ((newcost = relative_move(NCURSES_SP_ARGx
     26889+                                    NullResult,
     26890+                                    yold, xold,
     26891+                                    ynew, xnew, ovw)) != INFINITY)
     26892        && newcost < usecost) {
     26893        tactic = 1;
     26894        usecost = newcost;
     26895@@ -763,42 +819,51 @@
     26896 
     26897     /* tactic #2: use carriage-return + local movement */
     26898     if (yold != -1 && carriage_return
     26899-       && ((newcost = relative_move(NullResult, yold, 0, ynew, xnew, ovw))
     26900-           != INFINITY)
     26901-       && SP->_cr_cost + newcost < usecost) {
     26902+       && ((newcost = relative_move(NCURSES_SP_ARGx
     26903+                                    NullResult,
     26904+                                    yold, 0,
     26905+                                    ynew, xnew, ovw)) != INFINITY)
     26906+       && SP_PARM->_cr_cost + newcost < usecost) {
     26907        tactic = 2;
     26908-       usecost = SP->_cr_cost + newcost;
     26909+       usecost = SP_PARM->_cr_cost + newcost;
     26910     }
     26911 
     26912     /* tactic #3: use home-cursor + local movement */
     26913     if (cursor_home
     26914-       && ((newcost = relative_move(NullResult, 0, 0, ynew, xnew, ovw)) != INFINITY)
     26915-       && SP->_home_cost + newcost < usecost) {
     26916+       && ((newcost = relative_move(NCURSES_SP_ARGx
     26917+                                    NullResult,
     26918+                                    0, 0,
     26919+                                    ynew, xnew, ovw)) != INFINITY)
     26920+       && SP_PARM->_home_cost + newcost < usecost) {
     26921        tactic = 3;
     26922-       usecost = SP->_home_cost + newcost;
     26923+       usecost = SP_PARM->_home_cost + newcost;
     26924     }
     26925 
     26926     /* tactic #4: use home-down + local movement */
     26927     if (cursor_to_ll
     26928-       && ((newcost = relative_move(NullResult, screen_lines - 1, 0, ynew,
     26929-                                    xnew, ovw)) != INFINITY)
     26930-       && SP->_ll_cost + newcost < usecost) {
     26931+       && ((newcost = relative_move(NCURSES_SP_ARGx
     26932+                                    NullResult,
     26933+                                    screen_lines(SP_PARM) - 1, 0,
     26934+                                    ynew, xnew, ovw)) != INFINITY)
     26935+       && SP_PARM->_ll_cost + newcost < usecost) {
     26936        tactic = 4;
     26937-       usecost = SP->_ll_cost + newcost;
     26938+       usecost = SP_PARM->_ll_cost + newcost;
     26939     }
     26940 
     26941     /*
     26942      * tactic #5: use left margin for wrap to right-hand side,
     26943      * unless strange wrap behavior indicated by xenl might hose us.
     26944      */
     26945-    t5_cr_cost = (xold > 0 ? SP->_cr_cost : 0);
     26946+    t5_cr_cost = (xold > 0 ? SP_PARM->_cr_cost : 0);
     26947     if (auto_left_margin && !eat_newline_glitch
     26948        && yold > 0 && cursor_left
     26949-       && ((newcost = relative_move(NullResult, yold - 1, screen_columns -
     26950-                                    1, ynew, xnew, ovw)) != INFINITY)
     26951-       && t5_cr_cost + SP->_cub1_cost + newcost < usecost) {
     26952+       && ((newcost = relative_move(NCURSES_SP_ARGx
     26953+                                    NullResult,
     26954+                                    yold - 1, screen_columns(SP_PARM) - 1,
     26955+                                    ynew, xnew, ovw)) != INFINITY)
     26956+       && t5_cr_cost + SP_PARM->_cub1_cost + newcost < usecost) {
     26957        tactic = 5;
     26958-       usecost = t5_cr_cost + SP->_cub1_cost + newcost;
     26959+       usecost = t5_cr_cost + SP_PARM->_cub1_cost + newcost;
     26960     }
     26961 
     26962     /*
     26963@@ -808,26 +873,39 @@
     26964        InitResult;
     26965     switch (tactic) {
     26966     case 1:
     26967-       (void) relative_move(&result, yold, xold, ynew, xnew, ovw);
     26968+       (void) relative_move(NCURSES_SP_ARGx
     26969+                            &result,
     26970+                            yold, xold,
     26971+                            ynew, xnew, ovw);
     26972        break;
     26973     case 2:
     26974        (void) _nc_safe_strcpy(&result, carriage_return);
     26975-       (void) relative_move(&result, yold, 0, ynew, xnew, ovw);
     26976+       (void) relative_move(NCURSES_SP_ARGx
     26977+                            &result,
     26978+                            yold, 0,
     26979+                            ynew, xnew, ovw);
     26980        break;
     26981     case 3:
     26982        (void) _nc_safe_strcpy(&result, cursor_home);
     26983-       (void) relative_move(&result, 0, 0, ynew, xnew, ovw);
     26984+       (void) relative_move(NCURSES_SP_ARGx
     26985+                            &result, 0, 0,
     26986+                            ynew, xnew, ovw);
     26987        break;
     26988     case 4:
     26989        (void) _nc_safe_strcpy(&result, cursor_to_ll);
     26990-       (void) relative_move(&result, screen_lines - 1, 0, ynew, xnew, ovw);
     26991+       (void) relative_move(NCURSES_SP_ARGx
     26992+                            &result,
     26993+                            screen_lines(SP_PARM) - 1, 0,
     26994+                            ynew, xnew, ovw);
     26995        break;
     26996     case 5:
     26997        if (xold > 0)
     26998            (void) _nc_safe_strcat(&result, carriage_return);
     26999        (void) _nc_safe_strcat(&result, cursor_left);
     27000-       (void) relative_move(&result, yold - 1, screen_columns - 1, ynew,
     27001-                            xnew, ovw);
     27002+       (void) relative_move(NCURSES_SP_ARGx
     27003+                            &result,
     27004+                            yold - 1, screen_columns(SP_PARM) - 1,
     27005+                            ynew, xnew, ovw);
     27006        break;
     27007     }
     27008 #endif /* !NO_OPTIMIZE */
     27009@@ -845,17 +923,19 @@
     27010 
     27011     if (usecost != INFINITY) {
     27012        TPUTS_TRACE("mvcur");
     27013-       tputs(buffer, 1, _nc_outch);
     27014-       SP->_cursrow = ynew;
     27015-       SP->_curscol = xnew;
     27016+       NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     27017+                               buffer, 1, NCURSES_SP_NAME(_nc_outch));
     27018+       SP_PARM->_cursrow = ynew;
     27019+       SP_PARM->_curscol = xnew;
     27020        return (OK);
     27021     } else
    2042327022        return (ERR);
    2042427023 }
     
    2043327032     NCURSES_CH_T oldattr;
    2043427033     int code;
    20435 @@ -863,7 +865,7 @@
     27034@@ -863,7 +943,7 @@
    2043627035     TR(TRACE_CALLS | TRACE_MOVE, (T_CALLED("mvcur(%d,%d,%d,%d)"),
    2043727036                                  yold, xold, ynew, xnew));
     
    2044227041     } else if (yold == ynew && xold == xnew) {
    2044327042        code = OK;
    20444 @@ -884,7 +886,7 @@
     27043@@ -874,9 +954,9 @@
     27044         * column position implied by wraparound or the lack thereof and
     27045         * rolling up the screen to get ynew on the screen.
     27046         */
     27047-       if (xnew >= screen_columns) {
     27048-           ynew += xnew / screen_columns;
     27049-           xnew %= screen_columns;
     27050+       if (xnew >= screen_columns(SP_PARM)) {
     27051+           ynew += xnew / screen_columns(SP_PARM);
     27052+           xnew %= screen_columns(SP_PARM);
     27053        }
     27054 
     27055        /*
     27056@@ -884,38 +964,40 @@
    2044527057         * character set -- these have a strong tendency to screw up the CR &
    2044627058         * LF used for local character motions!
     
    2045127063            || (AttrOf(oldattr) && !move_standout_mode)) {
    2045227064            TR(TRACE_CHARPUT, ("turning off (%#lx) %s before move",
    20453 @@ -896,7 +898,7 @@
    20454         if (xold >= screen_columns) {
     27065                               (unsigned long) AttrOf(oldattr),
     27066                               _traceattr(AttrOf(oldattr))));
     27067-           (void) VIDATTR(A_NORMAL, 0);
     27068+           (void) VIDATTR(SP_PARM, A_NORMAL, 0);
     27069        }
     27070 
     27071-       if (xold >= screen_columns) {
     27072+       if (xold >= screen_columns(SP_PARM)) {
    2045527073            int l;
    2045627074 
    2045727075-           if (SP->_nl) {
     27076-               l = (xold + 1) / screen_columns;
    2045827077+           if (SP_PARM->_nl) {
    20459                 l = (xold + 1) / screen_columns;
     27078+               l = (xold + 1) / screen_columns(SP_PARM);
    2046027079                yold += l;
    20461                 if (yold >= screen_lines)
    20462 @@ -940,7 +942,7 @@
     27080-               if (yold >= screen_lines)
     27081-                   l -= (yold - screen_lines - 1);
     27082+               if (yold >= screen_lines(SP_PARM))
     27083+                   l -= (yold - screen_lines(SP_PARM) - 1);
     27084 
     27085                if (l > 0) {
     27086                    if (carriage_return) {
     27087-                       TPUTS_TRACE("carriage_return");
     27088-                       putp(carriage_return);
     27089+                       NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
     27090+                                                  "carriage_return",
     27091+                                                  carriage_return);
     27092                    } else
     27093-                       _nc_outch('\r');
     27094+                       NCURSES_SP_NAME(_nc_outch) (NCURSES_SP_ARGx '\r');
     27095                    xold = 0;
     27096 
     27097                    while (l > 0) {
     27098                        if (newline) {
     27099-                           TPUTS_TRACE("newline");
     27100-                           putp(newline);
     27101+                           NCURSES_SP_NAME(_nc_putp) (NCURSES_SP_ARGx
     27102+                                                      "newline",
     27103+                                                      newline);
     27104                        } else
     27105-                           _nc_outch('\n');
     27106+                           NCURSES_SP_NAME(_nc_outch) (NCURSES_SP_ARGx '\n');
     27107                        l--;
     27108                    }
     27109                }
     27110@@ -929,27 +1011,35 @@
     27111            }
     27112        }
     27113 
     27114-       if (yold > screen_lines - 1)
     27115-           yold = screen_lines - 1;
     27116-       if (ynew > screen_lines - 1)
     27117-           ynew = screen_lines - 1;
     27118+       if (yold > screen_lines(SP_PARM) - 1)
     27119+           yold = screen_lines(SP_PARM) - 1;
     27120+       if (ynew > screen_lines(SP_PARM) - 1)
     27121+           ynew = screen_lines(SP_PARM) - 1;
     27122 
     27123        /* destination location is on screen now */
     27124-       code = onscreen_mvcur(yold, xold, ynew, xnew, TRUE);
     27125+       code = onscreen_mvcur(NCURSES_SP_ARGx yold, xold, ynew, xnew, TRUE);
     27126 
    2046327127        /*
    2046427128         * Restore attributes if we disabled them before moving.
     
    2046927133                               (unsigned long) AttrOf(oldattr),
    2047027134                               _traceattr(AttrOf(oldattr))));
    20471 @@ -950,6 +952,14 @@
     27135-           (void) VIDATTR(AttrOf(oldattr), GetPair(oldattr));
     27136+           (void) VIDATTR(SP_PARM, AttrOf(oldattr), GetPair(oldattr));
     27137        }
     27138     }
    2047227139     returnCode(code);
    2047327140 }
     
    2048427151 NCURSES_EXPORT_VAR(int) _nc_optimize_enable = OPTIMIZE_ALL;
    2048527152 #endif
     27153@@ -1212,25 +1302,25 @@
     27154                           speeds[i], overhead, totalest);
     27155            }
     27156        } else if (buf[0] == 'c') {
     27157-           (void) printf("char padding: %d\n", SP->_char_padding);
     27158-           (void) printf("cr cost: %d\n", SP->_cr_cost);
     27159-           (void) printf("cup cost: %d\n", SP->_cup_cost);
     27160-           (void) printf("home cost: %d\n", SP->_home_cost);
     27161-           (void) printf("ll cost: %d\n", SP->_ll_cost);
     27162+           (void) printf("char padding: %d\n", CURRENT_SCREEN->_char_padding);
     27163+           (void) printf("cr cost: %d\n", CURRENT_SCREEN->_cr_cost);
     27164+           (void) printf("cup cost: %d\n", CURRENT_SCREEN->_cup_cost);
     27165+           (void) printf("home cost: %d\n", CURRENT_SCREEN->_home_cost);
     27166+           (void) printf("ll cost: %d\n", CURRENT_SCREEN->_ll_cost);
     27167 #if USE_HARD_TABS
     27168-           (void) printf("ht cost: %d\n", SP->_ht_cost);
     27169-           (void) printf("cbt cost: %d\n", SP->_cbt_cost);
     27170+           (void) printf("ht cost: %d\n", CURRENT_SCREEN->_ht_cost);
     27171+           (void) printf("cbt cost: %d\n", CURRENT_SCREEN->_cbt_cost);
     27172 #endif /* USE_HARD_TABS */
     27173-           (void) printf("cub1 cost: %d\n", SP->_cub1_cost);
     27174-           (void) printf("cuf1 cost: %d\n", SP->_cuf1_cost);
     27175-           (void) printf("cud1 cost: %d\n", SP->_cud1_cost);
     27176-           (void) printf("cuu1 cost: %d\n", SP->_cuu1_cost);
     27177-           (void) printf("cub cost: %d\n", SP->_cub_cost);
     27178-           (void) printf("cuf cost: %d\n", SP->_cuf_cost);
     27179-           (void) printf("cud cost: %d\n", SP->_cud_cost);
     27180-           (void) printf("cuu cost: %d\n", SP->_cuu_cost);
     27181-           (void) printf("hpa cost: %d\n", SP->_hpa_cost);
     27182-           (void) printf("vpa cost: %d\n", SP->_vpa_cost);
     27183+           (void) printf("cub1 cost: %d\n", CURRENT_SCREEN->_cub1_cost);
     27184+           (void) printf("cuf1 cost: %d\n", CURRENT_SCREEN->_cuf1_cost);
     27185+           (void) printf("cud1 cost: %d\n", CURRENT_SCREEN->_cud1_cost);
     27186+           (void) printf("cuu1 cost: %d\n", CURRENT_SCREEN->_cuu1_cost);
     27187+           (void) printf("cub cost: %d\n", CURRENT_SCREEN->_cub_cost);
     27188+           (void) printf("cuf cost: %d\n", CURRENT_SCREEN->_cuf_cost);
     27189+           (void) printf("cud cost: %d\n", CURRENT_SCREEN->_cud_cost);
     27190+           (void) printf("cuu cost: %d\n", CURRENT_SCREEN->_cuu_cost);
     27191+           (void) printf("hpa cost: %d\n", CURRENT_SCREEN->_hpa_cost);
     27192+           (void) printf("vpa cost: %d\n", CURRENT_SCREEN->_vpa_cost);
     27193        } else if (buf[0] == 'x' || buf[0] == 'q')
     27194            break;
     27195        else
     27196diff -Naur ncurses-5.7.orig/ncurses/tty/lib_tstp.c ncurses-5.7/ncurses/tty/lib_tstp.c
     27197--- ncurses-5.7.orig/ncurses/tty/lib_tstp.c     2008-05-03 09:24:56.000000000 -0700
     27198+++ ncurses-5.7/ncurses/tty/lib_tstp.c  2009-06-05 14:01:51.000000000 -0700
     27199@@ -1,5 +1,5 @@
     27200 /****************************************************************************
     27201- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     27202+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     27203  *                                                                          *
     27204  * Permission is hereby granted, free of charge, to any person obtaining a  *
     27205  * copy of this software and associated documentation files (the            *
     27206@@ -46,7 +46,7 @@
     27207 #define _POSIX_SOURCE
     27208 #endif
     27209 
     27210-MODULE_ID("$Id: lib_tstp.c,v 1.37 2008/05/03 16:24:56 tom Exp $")
     27211+MODULE_ID("$Id: lib_tstp.c,v 1.39 2009/05/09 15:46:20 tom Exp $")
     27212 
     27213 #if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC)
     27214 #define USE_SIGTSTP 1
     27215@@ -59,16 +59,20 @@
     27216 signal_name(int sig)
     27217 {
     27218     switch (sig) {
     27219+#ifdef SIGALRM
     27220     case SIGALRM:
     27221        return "SIGALRM";
     27222+#endif
     27223 #ifdef SIGCONT
     27224     case SIGCONT:
     27225        return "SIGCONT";
     27226 #endif
     27227     case SIGINT:
     27228        return "SIGINT";
     27229+#ifdef SIGQUIT
     27230     case SIGQUIT:
     27231        return "SIGQUIT";
     27232+#endif
     27233     case SIGTERM:
     27234        return "SIGTERM";
     27235 #ifdef SIGTSTP
     27236@@ -136,6 +140,7 @@
     27237 static void
     27238 tstp(int dummy GCC_UNUSED)
     27239 {
     27240+    SCREEN *sp = CURRENT_SCREEN;
     27241     sigset_t mask, omask;
     27242     sigaction_t act, oact;
     27243 
     27244@@ -154,11 +159,11 @@
     27245      * parent was stopped before us, and we would likely pick up the
     27246      * settings already modified by the shell.
     27247      */
     27248-    if (SP != 0 && !SP->_endwin)       /* don't do this if we're not in curses */
     27249+    if (sp != 0 && !sp->_endwin)       /* don't do this if we're not in curses */
     27250 #if HAVE_TCGETPGRP
     27251        if (tcgetpgrp(STDIN_FILENO) == getpgrp())
     27252 #endif
     27253-           def_prog_mode();
     27254+           NCURSES_SP_NAME(def_prog_mode) (NCURSES_SP_ARG);
     27255 
     27256     /*
     27257      * Block window change and timer signals.  The latter
     27258@@ -166,7 +171,9 @@
     27259      * to repaint the screen.
     27260      */
     27261     (void) sigemptyset(&mask);
     27262+#ifdef SIGALRM
     27263     (void) sigaddset(&mask, SIGALRM);
     27264+#endif
     27265 #if USE_SIGWINCH
     27266     (void) sigaddset(&mask, SIGWINCH);
     27267 #endif
     27268@@ -185,7 +192,7 @@
     27269      * End window mode, which also resets the terminal state to the
     27270      * original (pre-curses) modes.
     27271      */
     27272-    endwin();
     27273+    NCURSES_SP_NAME(endwin) (NCURSES_SP_ARG);
     27274 
     27275     /* Unblock SIGTSTP. */
     27276     (void) sigemptyset(&mask);
     27277@@ -212,19 +219,19 @@
     27278 
     27279     T(("SIGCONT received"));
     27280     sigaction(SIGTSTP, &oact, NULL);
     27281-    flushinp();
     27282+    NCURSES_SP_NAME(flushinp) (NCURSES_SP_ARG);
     27283 
     27284     /*
     27285      * If the user modified the tty state while suspended, he wants
     27286      * those changes to stick.  So save the new "default" terminal state.
     27287      */
     27288-    def_shell_mode();
     27289+    NCURSES_SP_NAME(def_shell_mode) (NCURSES_SP_ARG);
     27290 
     27291     /*
     27292      * This relies on the fact that doupdate() will restore the
     27293      * program-mode tty state, and issue enter_ca_mode if need be.
     27294      */
     27295-    doupdate();
     27296+    NCURSES_SP_NAME(doupdate) (NCURSES_SP_ARG);
     27297 
     27298     /* Reset the signals. */
     27299     (void) sigprocmask(SIG_SETMASK, &omask, NULL);
     27300@@ -234,6 +241,8 @@
     27301 static void
     27302 cleanup(int sig)
     27303 {
     27304+    SCREEN *sp = CURRENT_SCREEN;
     27305+
     27306     /*
     27307      * Actually, doing any sort of I/O from within an signal handler is
     27308      * "unsafe".  But we'll _try_ to clean up the screen and terminal
     27309@@ -241,7 +250,10 @@
     27310      */
     27311     if (!_nc_globals.cleanup_nested++
     27312        && (sig == SIGINT
     27313-           || sig == SIGQUIT)) {
     27314+#ifdef SIGQUIT
     27315+           || sig == SIGQUIT
     27316+#endif
     27317+       )) {
     27318 #if HAVE_SIGACTION || HAVE_SIGVEC
     27319        sigaction_t act;
     27320        sigemptyset(&act.sa_mask);
     27321@@ -257,12 +269,12 @@
     27322                if (scan->_ofp != 0
     27323                    && isatty(fileno(scan->_ofp))) {
     27324                    scan->_cleanup = TRUE;
     27325-                   scan->_outch = _nc_outch;
     27326+                   scan->_outch = NCURSES_SP_NAME(_nc_outch);
     27327                }
     27328                set_term(scan);
     27329-               endwin();
     27330-               if (SP)
     27331-                   SP->_endwin = FALSE;        /* in case we have an atexit! */
     27332+               NCURSES_SP_NAME(endwin) (NCURSES_SP_ARG);
     27333+               if (sp)
     27334+                   sp->_endwin = FALSE;        /* in case we have an atexit! */
     27335            }
     27336        }
     27337     }
     27338diff -Naur ncurses-5.7.orig/ncurses/tty/lib_twait.c ncurses-5.7/ncurses/tty/lib_twait.c
     27339--- ncurses-5.7.orig/ncurses/tty/lib_twait.c    2008-08-30 13:08:19.000000000 -0700
     27340+++ ncurses-5.7/ncurses/tty/lib_twait.c 2009-06-05 14:01:44.000000000 -0700
     27341@@ -1,5 +1,5 @@
     27342 /****************************************************************************
     27343- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     27344+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     27345  *                                                                          *
     27346  * Permission is hereby granted, free of charge, to any person obtaining a  *
     27347  * copy of this software and associated documentation files (the            *
     27348@@ -65,10 +65,12 @@
     27349 #  include <sys/select.h>
     27350 # endif
     27351 #endif
     27352-
     27353+#ifdef __MINGW32__
     27354+#  include <sys/time.h>
     27355+#endif
     27356 #undef CUR
     27357 
     27358-MODULE_ID("$Id: lib_twait.c,v 1.59 2008/08/30 20:08:19 tom Exp $")
     27359+MODULE_ID("$Id: lib_twait.c,v 1.60 2009/04/18 21:01:13 tom Exp $")
     27360 
     27361 static long
     27362 _nc_gettime(TimeType * t0, bool first)
     27363@@ -124,15 +126,27 @@
     27364 }
     27365 #endif /* NCURSES_WGETCH_EVENTS */
     27366 
     27367+#if (USE_FUNC_POLL || HAVE_SELECT)
     27368+#  define MAYBE_UNUSED
     27369+#else
     27370+#  define MAYBE_UNUSED GCC_UNUSED
     27371+#endif
     27372+
     27373+#if (USE_FUNC_POLL || HAVE_SELECT)
     27374+#  define MAYBE_UNUSED
     27375+#else
     27376+#  define MAYBE_UNUSED GCC_UNUSED
     27377+#endif
     27378+
     27379 /*
     27380  * Wait a specified number of milliseconds, returning nonzero if the timer
     27381  * didn't expire before there is activity on the specified file descriptors.
     27382  * The file-descriptors are specified by the mode:
     27383- *     0 - none (absolute time)
     27384- *     1 - ncurses' normal input-descriptor
     27385- *     2 - mouse descriptor, if any
     27386- *     3 - either input or mouse.
     27387- *
     27388+ *     TW_NONE    0 - none (absolute time)
     27389+ *     TW_INPUT   1 - ncurses' normal input-descriptor
     27390+ *     TW_MOUSE   2 - mouse descriptor, if any
     27391+ *     TW_ANY     3 - either input or mouse.
     27392+ *      TW_EVENT   4 -
     27393  * Experimental:  if NCURSES_WGETCH_EVENTS is defined, (mode & 4) determines
     27394  * whether to pay attention to evl argument.  If set, the smallest of
     27395  * millisecond and of timeout of evl is taken.
     27396@@ -143,16 +157,18 @@
     27397  * descriptors.
     27398  */
     27399 NCURSES_EXPORT(int)
     27400-_nc_timed_wait(SCREEN *sp,
     27401-              int mode,
     27402+_nc_timed_wait(SCREEN *sp MAYBE_UNUSED,
     27403+              int mode MAYBE_UNUSED,
     27404               int milliseconds,
     27405               int *timeleft
     27406               EVENTLIST_2nd(_nc_eventlist * evl))
     27407 {
     27408-    int fd;
     27409     int count;
     27410-    int result = 0;
     27411+    int result = TW_NONE;
     27412     TimeType t0;
     27413+#if (USE_FUNC_POLL || HAVE_SELECT)
     27414+    int fd;
     27415+#endif
     27416 
     27417 #ifdef NCURSES_WGETCH_EVENTS
     27418     int timeout_is_event = 0;
     27419@@ -174,7 +190,7 @@
     27420                      milliseconds, mode));
     27421 
     27422 #ifdef NCURSES_WGETCH_EVENTS
     27423-    if (mode & 4) {
     27424+    if (mode & TW_EVENT) {
     27425        int event_delay = _nc_eventlist_timeout(evl);
     27426 
     27427        if (event_delay >= 0
     27428@@ -193,7 +209,7 @@
     27429     count = 0;
     27430 
     27431 #ifdef NCURSES_WGETCH_EVENTS
     27432-    if ((mode & 4) && evl)
     27433+    if ((mode & TW_EVENT) && evl)
     27434        evl->result_flags = 0;
     27435 #endif
     27436 
     27437@@ -201,23 +217,23 @@
     27438     memset(fd_list, 0, sizeof(fd_list));
     27439 
     27440 #ifdef NCURSES_WGETCH_EVENTS
     27441-    if ((mode & 4) && evl)
     27442+    if ((mode & TW_EVENT) && evl)
     27443        fds = typeMalloc(struct pollfd, MIN_FDS + evl->count);
     27444 #endif
     27445 
     27446-    if (mode & 1) {
     27447+    if (mode & TW_INPUT) {
     27448        fds[count].fd = sp->_ifd;
     27449        fds[count].events = POLLIN;
     27450        count++;
     27451     }
     27452-    if ((mode & 2)
     27453+    if ((mode & TW_MOUSE)
     27454        && (fd = sp->_mouse_fd) >= 0) {
     27455        fds[count].fd = fd;
     27456        fds[count].events = POLLIN;
     27457        count++;
     27458     }
     27459 #ifdef NCURSES_WGETCH_EVENTS
     27460-    if ((mode & 4) && evl) {
     27461+    if ((mode & TW_EVENT) && evl) {
     27462        for (n = 0; n < evl->count; ++n) {
     27463            _nc_event *ev = evl->events[n];
     27464 
     27465@@ -234,7 +250,7 @@
     27466     result = poll(fds, (unsigned) count, milliseconds);
     27467 
     27468 #ifdef NCURSES_WGETCH_EVENTS
     27469-    if ((mode & 4) && evl) {
     27470+    if ((mode & TW_EVENT) && evl) {
     27471        int c;
     27472 
     27473        if (!result)
     27474@@ -276,8 +292,8 @@
     27475      *
     27476      * FIXME: this assumes mode&1 if milliseconds < 0 (see lib_getch.c).
     27477      */
     27478-    result = 0;
     27479-    if (mode & 1) {
     27480+    result = TW_NONE;
     27481+    if (mode & TW_INPUT) {
     27482        int step = (milliseconds < 0) ? 0 : 5000;
     27483        bigtime_t d;
     27484        bigtime_t useconds = milliseconds * 1000;
     27485@@ -313,17 +329,17 @@
     27486      */
     27487     FD_ZERO(&set);
     27488 
     27489-    if (mode & 1) {
     27490+    if (mode & TW_INPUT) {
     27491        FD_SET(sp->_ifd, &set);
     27492        count = sp->_ifd + 1;
     27493     }
     27494-    if ((mode & 2)
     27495+    if ((mode & TW_MOUSE)
     27496        && (fd = sp->_mouse_fd) >= 0) {
     27497        FD_SET(fd, &set);
     27498        count = max(fd, count) + 1;
     27499     }
     27500 #ifdef NCURSES_WGETCH_EVENTS
     27501-    if ((mode & 4) && evl) {
     27502+    if ((mode & TW_EVENT) && evl) {
     27503        for (n = 0; n < evl->count; ++n) {
     27504            _nc_event *ev = evl->events[n];
     27505 
     27506@@ -346,7 +362,7 @@
     27507     }
     27508 
     27509 #ifdef NCURSES_WGETCH_EVENTS
     27510-    if ((mode & 4) && evl) {
     27511+    if ((mode & TW_EVENT) && evl) {
     27512        evl->result_flags = 0;
     27513        for (n = 0; n < evl->count; ++n) {
     27514            _nc_event *ev = evl->events[n];
     27515@@ -428,22 +444,22 @@
     27516                }
     27517            }
     27518 #elif defined(__BEOS__)
     27519-           result = 1;         /* redundant, but simple */
     27520+           result = TW_INPUT;  /* redundant, but simple */
     27521 #elif HAVE_SELECT
     27522-           if ((mode & 2)
     27523+           if ((mode & TW_MOUSE)
     27524                && (fd = sp->_mouse_fd) >= 0
     27525                && FD_ISSET(fd, &set))
     27526-               result |= 2;
     27527-           if ((mode & 1)
     27528+               result |= TW_MOUSE;
     27529+           if ((mode & TW_INPUT)
     27530                && FD_ISSET(sp->_ifd, &set))
     27531-               result |= 1;
     27532+               result |= TW_INPUT;
     27533 #endif
     27534        } else
     27535            result = 0;
     27536     }
     27537 #ifdef NCURSES_WGETCH_EVENTS
     27538-    if ((mode & 4) && evl && evl->result_flags)
     27539-       result |= 4;
     27540+    if ((mode & TW_EVENT) && evl && evl->result_flags)
     27541+       result |= TW_EVENT;
     27542 #endif
     27543 
     27544     return (result);
    2048627545diff -Naur ncurses-5.7.orig/ncurses/tty/lib_vidattr.c ncurses-5.7/ncurses/tty/lib_vidattr.c
    2048727546--- ncurses-5.7.orig/ncurses/tty/lib_vidattr.c  2007-06-30 14:58:04.000000000 -0700
    20488 +++ ncurses-5.7/ncurses/tty/lib_vidattr.c       2009-03-22 21:17:07.020082134 -0700
     27547+++ ncurses-5.7/ncurses/tty/lib_vidattr.c       2009-06-05 14:01:51.000000000 -0700
    2048927548@@ -1,5 +1,5 @@
    2049027549 /****************************************************************************
     
    2050427563 
    2050527564 /*
    20506 @@ -65,7 +66,7 @@
     27565@@ -65,9 +66,15 @@
    2050727566 #include <curses.priv.h>
    2050827567 #include <term.h>
    2050927568 
    2051027569-MODULE_ID("$Id: lib_vidattr.c,v 1.49 2007/06/30 21:58:04 tom Exp $")
    20511 +MODULE_ID("$Id: lib_vidattr.c,v 1.51 2009/02/21 21:43:40 tom Exp $")
    20512  
    20513  #define doPut(mode) TPUTS_TRACE(#mode); tputs(mode, 1, outc)
    20514  
    20515 @@ -299,7 +300,7 @@
     27570+#ifndef CUR
     27571+#define CUR SP_TERMTYPE
     27572+#endif
     27573+
     27574+MODULE_ID("$Id: lib_vidattr.c,v 1.56 2009/05/10 00:48:29 tom Exp $")
     27575 
     27576-#define doPut(mode) TPUTS_TRACE(#mode); tputs(mode, 1, outc)
     27577+#define doPut(mode) \
     27578+       TPUTS_TRACE(#mode); \
     27579+       NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx mode, 1, outc)
     27580 
     27581 #define TurnOn(mask,mode) \
     27582        if ((turn_on & mask) && mode) { doPut(mode); }
     27583@@ -83,21 +90,24 @@
     27584                if ((pair != old_pair) \
     27585                 || (fix_pair0 && (pair == 0)) \
     27586                 || (reverse ^ ((old_attr & A_REVERSE) != 0))) { \
     27587-                       _nc_do_color(old_pair, pair, reverse, outc); \
     27588+                    NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_ARGx \
     27589+                                    old_pair, pair, reverse, outc); \
     27590                } \
     27591        }
     27592 
     27593 #define PreviousAttr _nc_prescreen.previous_attr
     27594 
     27595 NCURSES_EXPORT(int)
     27596-vidputs(chtype newmode, int (*outc) (int))
     27597+NCURSES_SP_NAME(vidputs) (NCURSES_SP_DCLx
     27598+                         chtype newmode,
     27599+                         NCURSES_SP_OUTC outc)
     27600 {
     27601     attr_t turn_on, turn_off;
     27602     int pair;
     27603     bool reverse = FALSE;
     27604-    bool can_color = (SP == 0 || SP->_coloron);
     27605+    bool can_color = (SP_PARM == 0 || SP_PARM->_coloron);
     27606 #if NCURSES_EXT_FUNCS
     27607-    bool fix_pair0 = (SP != 0 && SP->_coloron && !SP->_default_color);
     27608+    bool fix_pair0 = (SP_PARM != 0 && SP_PARM->_coloron && !SP_PARM->_default_color);
     27609 #else
     27610 #define fix_pair0 FALSE
     27611 #endif
     27612@@ -106,12 +116,12 @@
     27613     T((T_CALLED("vidputs(%s)"), _traceattr(newmode)));
     27614 
     27615     /* this allows us to go on whether or not newterm() has been called */
     27616-    if (SP)
     27617-       PreviousAttr = AttrOf(SCREEN_ATTRS(SP));
     27618+    if (SP_PARM)
     27619+       PreviousAttr = AttrOf(SCREEN_ATTRS(SP_PARM));
     27620 
     27621     TR(TRACE_ATTRS, ("previous attribute was %s", _traceattr(PreviousAttr)));
     27622 
     27623-    if ((SP != 0)
     27624+    if ((SP_PARM != 0)
     27625        && (magic_cookie_glitch > 0)) {
     27626 #if USE_XMC_SUPPORT
     27627        static const chtype table[] =
     27628@@ -135,7 +145,7 @@
     27629         * the terminfo max_attributes value.
     27630         */
     27631        for (n = 0; n < SIZEOF(table); ++n) {
     27632-           if ((table[n] & SP->_ok_attributes) == 0) {
     27633+           if ((table[n] & SP_PARM->_ok_attributes) == 0) {
     27634                newmode &= ~table[n];
     27635            } else if ((table[n] & newmode) != 0) {
     27636                if (used++ >= limit) {
     27637@@ -148,7 +158,7 @@
     27638            }
     27639        }
     27640 #else
     27641-       newmode &= ~(SP->_xmc_suppress);
     27642+       newmode &= ~(SP_PARM->_xmc_suppress);
     27643 #endif
     27644        TR(TRACE_ATTRS, ("suppressed attribute is %s", _traceattr(newmode)));
     27645     }
     27646@@ -208,10 +218,10 @@
     27647            if (exit_attribute_mode) {
     27648                doPut(exit_attribute_mode);
     27649            } else {
     27650-               if (!SP || SP->_use_rmul) {
     27651+               if (!SP_PARM || SP_PARM->_use_rmul) {
     27652                    TurnOff(A_UNDERLINE, exit_underline_mode);
     27653                }
     27654-               if (!SP || SP->_use_rmso) {
     27655+               if (!SP_PARM || SP_PARM->_use_rmso) {
     27656                    TurnOff(A_STANDOUT, exit_standout_mode);
     27657                }
     27658            }
     27659@@ -222,16 +232,18 @@
     27660     } else if (set_attributes) {
     27661        if (turn_on || turn_off) {
     27662            TPUTS_TRACE("set_attributes");
     27663-           tputs(tparm(set_attributes,
     27664-                       (newmode & A_STANDOUT) != 0,
     27665-                       (newmode & A_UNDERLINE) != 0,
     27666-                       (newmode & A_REVERSE) != 0,
     27667-                       (newmode & A_BLINK) != 0,
     27668-                       (newmode & A_DIM) != 0,
     27669-                       (newmode & A_BOLD) != 0,
     27670-                       (newmode & A_INVIS) != 0,
     27671-                       (newmode & A_PROTECT) != 0,
     27672-                       (newmode & A_ALTCHARSET) != 0), 1, outc);
     27673+           NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     27674+                                   tparm(set_attributes,
     27675+                                         (newmode & A_STANDOUT) != 0,
     27676+                                         (newmode & A_UNDERLINE) != 0,
     27677+                                         (newmode & A_REVERSE) != 0,
     27678+                                         (newmode & A_BLINK) != 0,
     27679+                                         (newmode & A_DIM) != 0,
     27680+                                         (newmode & A_BOLD) != 0,
     27681+                                         (newmode & A_INVIS) != 0,
     27682+                                         (newmode & A_PROTECT) != 0,
     27683+                                         (newmode & A_ALTCHARSET) != 0),
     27684+                                   1, outc);
     27685            PreviousAttr &= ALL_BUT_COLOR;
     27686        }
     27687        SetColorsIf((pair != 0) || fix_pair0, PreviousAttr);
     27688@@ -241,11 +253,11 @@
     27689 
     27690        TurnOff(A_ALTCHARSET, exit_alt_charset_mode);
     27691 
     27692-       if (!SP || SP->_use_rmul) {
     27693+       if (!SP_PARM || SP_PARM->_use_rmul) {
     27694            TurnOff(A_UNDERLINE, exit_underline_mode);
     27695        }
     27696 
     27697-       if (!SP || SP->_use_rmso) {
     27698+       if (!SP_PARM || SP_PARM->_use_rmso) {
     27699            TurnOff(A_STANDOUT, exit_standout_mode);
     27700        }
     27701 
     27702@@ -282,8 +294,8 @@
     27703     if (reverse)
     27704        newmode |= A_REVERSE;
     27705 
     27706-    if (SP)
     27707-       SetAttr(SCREEN_ATTRS(SP), newmode);
     27708+    if (SP_PARM)
     27709+       SetAttr(SCREEN_ATTRS(SP_PARM), newmode);
     27710     else
     27711        PreviousAttr = newmode;
     27712 
     27713@@ -291,15 +303,33 @@
    2051627714 }
     27715 
     27716 NCURSES_EXPORT(int)
     27717+NCURSES_SP_NAME(vidattr) (NCURSES_SP_DCLx
     27718+                         chtype newmode)
     27719+{
     27720+    return NCURSES_SP_NAME(vidputs) (NCURSES_SP_ARGx
     27721+                                    newmode,
     27722+                                    NCURSES_SP_NAME(_nc_outch));
     27723+}
     27724+
     27725+#if NCURSES_SP_FUNCS
     27726+NCURSES_EXPORT(int)
     27727+vidputs(chtype newmode, NCURSES_OUTC outc)
     27728+{
     27729+    SetSafeOutcWrapper(outc);
     27730+    return NCURSES_SP_NAME(vidputs) (CURRENT_SCREEN, newmode, _nc_outc_wrapper);
     27731+}
     27732+
     27733+NCURSES_EXPORT(int)
     27734 vidattr(chtype newmode)
     27735 {
     27736     T((T_CALLED("vidattr(%s)"), _traceattr(newmode)));
     27737 
     27738     returnCode(vidputs(newmode, _nc_outch));
     27739 }
     27740+#endif
    2051727741 
    2051827742 NCURSES_EXPORT(chtype)
     
    2052227746     chtype attrs = A_NORMAL;
    2052327747 
    20524 @@ -331,8 +332,16 @@
     27748@@ -331,8 +361,16 @@
    2052527749     if (enter_underline_mode)
    2052627750        attrs |= A_UNDERLINE;
     
    2054327767diff -Naur ncurses-5.7.orig/ncurses/tty/tty_update.c ncurses-5.7/ncurses/tty/tty_update.c
    2054427768--- ncurses-5.7.orig/ncurses/tty/tty_update.c   2008-08-30 13:08:19.000000000 -0700
    20545 +++ ncurses-5.7/ncurses/tty/tty_update.c        2009-03-22 21:17:05.655995250 -0700
     27769+++ ncurses-5.7/ncurses/tty/tty_update.c        2009-06-05 14:01:52.000000000 -0700
    2054627770@@ -1,5 +1,5 @@
    2054727771 /****************************************************************************
     
    2055927783 
    2056027784 /*-----------------------------------------------------------------
    20561 @@ -78,7 +79,7 @@
     27785@@ -38,12 +39,16 @@
     27786  *
     27787  *     The routine doupdate() and its dependents.
     27788  *     All physical output is concentrated here (except _nc_outch()
     27789-  *    in lib_tputs.c).
     27790+ *     in lib_tputs.c).
     27791  *
     27792  *-----------------------------------------------------------------*/
     27793 
     27794 #include <curses.priv.h>
     27795 
     27796+#ifndef CUR
     27797+#define CUR SP_TERMTYPE
     27798+#endif
     27799+
     27800 #if defined __HAIKU__ && defined __BEOS__
     27801 #undef __BEOS__
     27802 #endif
     27803@@ -76,9 +81,8 @@
     27804 #endif
     27805 
    2056227806 #include <ctype.h>
    20563  #include <term.h>
     27807-#include <term.h>
    2056427808 
    2056527809-MODULE_ID("$Id: tty_update.c,v 1.246 2008/08/30 20:08:19 tom Exp $")
    20566 +MODULE_ID("$Id: tty_update.c,v 1.248 2009/02/15 00:51:22 tom Exp $")
     27810+MODULE_ID("$Id: tty_update.c,v 1.256 2009/05/17 00:13:49 tom Exp $")
    2056727811 
    2056827812 /*
    2056927813  * This define controls the line-breakout optimization.  Every once in a
    20570 @@ -618,7 +619,7 @@
     27814@@ -91,7 +95,7 @@
     27815  */
     27816 #define CHECK_INTERVAL 5
     27817 
     27818-#define FILL_BCE() (SP->_coloron && !SP->_default_color && !back_color_erase)
     27819+#define FILL_BCE(sp) (sp->_coloron && !sp->_default_color && !back_color_erase)
     27820 
     27821 static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT);
     27822 static NCURSES_CH_T normal = NewChar(BLANK_TEXT);
     27823@@ -103,13 +107,23 @@
     27824  */
     27825 /* #define POSITION_DEBUG */
     27826 
     27827-static NCURSES_INLINE NCURSES_CH_T ClrBlank(WINDOW *win);
     27828+static NCURSES_INLINE NCURSES_CH_T ClrBlank(NCURSES_SP_DCLx WINDOW *win);
     27829+
     27830+#if NCURSES_SP_FUNCS
     27831+static int ClrBottom(SCREEN *, int total);
     27832+static void ClearScreen(SCREEN *, NCURSES_CH_T blank);
     27833+static void ClrUpdate(SCREEN *);
     27834+static void DelChar(SCREEN *, int count);
     27835+static void InsStr(SCREEN *, NCURSES_CH_T * line, int count);
     27836+static void TransformLine(SCREEN *, int const lineno);
     27837+#else
     27838 static int ClrBottom(int total);
     27839 static void ClearScreen(NCURSES_CH_T blank);
     27840 static void ClrUpdate(void);
     27841 static void DelChar(int count);
     27842 static void InsStr(NCURSES_CH_T * line, int count);
     27843 static void TransformLine(int const lineno);
     27844+#endif
     27845 
     27846 #ifdef POSITION_DEBUG
     27847 /****************************************************************************
     27848@@ -119,7 +133,7 @@
     27849  ****************************************************************************/
     27850 
     27851 static void
     27852-position_check(int expected_y, int expected_x, char *legend)
     27853+position_check(NCURSES_SP_DCLx int expected_y, int expected_x, char *legend)
     27854 /* check to see if the real cursor position matches the virtual */
     27855 {
     27856     char buf[20];
     27857@@ -129,10 +143,10 @@
     27858     if (!_nc_tracing || (expected_y < 0 && expected_x < 0))
     27859        return;
     27860 
     27861-    _nc_flush();
     27862+    NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
     27863     memset(buf, '\0', sizeof(buf));
     27864-    putp("\033[6n");           /* only works on ANSI-compatibles */
     27865-    _nc_flush();
     27866+    NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx "\033[6n"); /* only works on ANSI-compatibles */
     27867+    NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
     27868     *(s = buf) = 0;
     27869     do {
     27870        int ask = sizeof(buf) - 1 - (s - buf);
     27871@@ -152,8 +166,12 @@
     27872        if (expected_y < 0)
     27873            expected_y = y - 1;
     27874        if (y - 1 != expected_y || x - 1 != expected_x) {
     27875-           beep();
     27876-           tputs(tparm("\033[%d;%dH", expected_y + 1, expected_x + 1), 1, _nc_outch);
     27877+           NCURSES_SP_NAME(beep) (NCURSES_SP_ARG);
     27878+           NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     27879+                                   tparm("\033[%d;%dH",
     27880+                                         expected_y + 1,
     27881+                                         expected_x + 1),
     27882+                                   1, NCURSES_SP_NAME(_nc_outch));
     27883            _tracef("position seen (%d, %d) doesn't match expected one (%d, %d) in %s",
     27884                    y - 1, x - 1, expected_y, expected_x, legend);
     27885        } else {
     27886@@ -162,7 +180,7 @@
     27887     }
     27888 }
     27889 #else
     27890-#define position_check(expected_y, expected_x, legend) /* nothing */
     27891+#define position_check(sp, expected_y, expected_x, legend)     /* nothing */
     27892 #endif /* POSITION_DEBUG */
     27893 
     27894 /****************************************************************************
     27895@@ -172,19 +190,19 @@
     27896  ****************************************************************************/
     27897 
     27898 static NCURSES_INLINE void
     27899-GoTo(int const row, int const col)
     27900+GoTo(NCURSES_SP_DCLx int const row, int const col)
     27901 {
     27902     TR(TRACE_MOVE, ("GoTo(%d, %d) from (%d, %d)",
     27903-                   row, col, SP->_cursrow, SP->_curscol));
     27904+                   row, col, SP_PARM->_cursrow, SP_PARM->_curscol));
     27905 
     27906-    position_check(SP->_cursrow, SP->_curscol, "GoTo");
     27907+    position_check(SP_PARM, SP_PARM->_cursrow, SP_PARM->_curscol, "GoTo");
     27908 
     27909-    mvcur(SP->_cursrow, SP->_curscol, row, col);
     27910-    position_check(SP->_cursrow, SP->_curscol, "GoTo2");
     27911+    mvcur(SP_PARM->_cursrow, SP_PARM->_curscol, row, col);
     27912+    position_check(SP_PARM, SP_PARM->_cursrow, SP_PARM->_curscol, "GoTo2");
     27913 }
     27914 
     27915 static NCURSES_INLINE void
     27916-PutAttrChar(CARG_CH_T ch)
     27917+PutAttrChar(NCURSES_SP_DCLx CARG_CH_T ch)
     27918 {
     27919     int chlen = 1;
     27920     NCURSES_CH_T my_ch;
     27921@@ -194,7 +212,7 @@
     27922 
     27923     TR(TRACE_CHARPUT, ("PutAttrChar(%s) at (%d, %d)",
     27924                       _tracech_t(ch),
     27925-                      SP->_cursrow, SP->_curscol));
     27926+                      SP_PARM->_cursrow, SP_PARM->_curscol));
     27927 #if USE_WIDEC_SUPPORT
     27928     /*
     27929      * If this is not a valid character, there is nothing more to do.
     27930@@ -224,12 +242,12 @@
     27931         */
     27932        if (is8bits(CharOf(CHDEREF(ch)))
     27933            && (isprint(CharOf(CHDEREF(ch)))
     27934-               || (SP->_legacy_coding > 0 && CharOf(CHDEREF(ch)) >= 160)
     27935-               || (SP->_legacy_coding > 1 && CharOf(CHDEREF(ch)) >= 128)
     27936+               || (SP_PARM->_legacy_coding > 0 && CharOf(CHDEREF(ch)) >= 160)
     27937+               || (SP_PARM->_legacy_coding > 1 && CharOf(CHDEREF(ch)) >= 128)
     27938                || (AttrOf(attr) & A_ALTCHARSET
     27939                    && ((CharOfD(ch) < ACS_LEN
     27940-                        && SP->_acs_map != 0
     27941-                        && SP->_acs_map[CharOfD(ch)] != 0)
     27942+                        && SP_PARM->_acs_map != 0
     27943+                        && SP_PARM->_acs_map[CharOfD(ch)] != 0)
     27944                        || (CharOfD(ch) >= 128))))) {
     27945            ;
     27946        } else {
     27947@@ -241,7 +259,7 @@
     27948 #endif
     27949 
     27950     if ((AttrOf(attr) & A_ALTCHARSET)
     27951-       && SP->_acs_map != 0
     27952+       && SP_PARM->_acs_map != 0
     27953        && CharOfD(ch) < ACS_LEN) {
     27954        my_ch = CHDEREF(ch);    /* work around const param */
     27955 #if USE_WIDEC_SUPPORT
     27956@@ -251,8 +269,8 @@
     27957         * character, and uses the wide-character mapping when we expect the
     27958         * normal one to be broken (by mis-design ;-).
     27959         */
     27960-       if (SP->_screen_acs_fix
     27961-           && SP->_screen_acs_map[CharOf(my_ch)]) {
     27962+       if (SP_PARM->_screen_acs_fix
     27963+           && SP_PARM->_screen_acs_map[CharOf(my_ch)]) {
     27964            RemAttr(attr, A_ALTCHARSET);
     27965            my_ch = _nc_wacs[CharOf(my_ch)];
     27966        }
     27967@@ -265,9 +283,9 @@
     27968         */
     27969        if (AttrOf(attr) & A_ALTCHARSET) {
     27970            int j = CharOfD(ch);
     27971-           chtype temp = UChar(SP->_acs_map[j]);
     27972+           chtype temp = UChar(SP_PARM->_acs_map[j]);
     27973 
     27974-           if (!(SP->_screen_acs_map[j])) {
     27975+           if (!(SP_PARM->_screen_acs_map[j])) {
     27976                RemAttr(attr, A_ALTCHARSET);
     27977                if (temp == 0)
     27978                    temp = ' ';
     27979@@ -282,28 +300,28 @@
     27980        ch = CHREF(tilde);
     27981     }
     27982 
     27983-    UpdateAttrs(attr);
     27984+    UpdateAttrs(SP_PARM, attr);
     27985 #if !USE_WIDEC_SUPPORT
     27986     /* FIXME - we do this special case for signal handling, should see how to
     27987      * make it work for wide characters.
     27988      */
     27989-    if (SP->_outch != 0) {
     27990-       SP->_outch(UChar(ch));
     27991+    if (SP_PARM->_outch != 0) {
     27992+       SP_PARM->_outch(NCURSES_SP_ARGx UChar(ch));
     27993     } else
     27994 #endif
     27995     {
     27996-       PUTC(CHDEREF(ch), SP->_ofp);    /* macro's fastest... */
     27997+       PUTC(CHDEREF(ch), SP_PARM->_ofp);       /* macro's fastest... */
     27998        COUNT_OUTCHARS(1);
     27999     }
     28000-    SP->_curscol += chlen;
     28001+    SP_PARM->_curscol += chlen;
     28002     if (char_padding) {
     28003        TPUTS_TRACE("char_padding");
     28004-       putp(char_padding);
     28005+       NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx char_padding);
     28006     }
     28007 }
     28008 
     28009 static bool
     28010-check_pending(void)
     28011+check_pending(NCURSES_SP_DCL0)
     28012 /* check for pending input */
     28013 {
     28014     bool have_pending = FALSE;
     28015@@ -313,13 +331,13 @@
     28016      * have the refreshing slow down drastically (or stop) if there's an
     28017      * unread character available.
     28018      */
     28019-    if (SP->_fifohold != 0)
     28020+    if (SP_PARM->_fifohold != 0)
     28021        return FALSE;
     28022 
     28023-    if (SP->_checkfd >= 0) {
     28024+    if (SP_PARM->_checkfd >= 0) {
     28025 #if USE_FUNC_POLL
     28026        struct pollfd fds[1];
     28027-       fds[0].fd = SP->_checkfd;
     28028+       fds[0].fd = SP_PARM->_checkfd;
     28029        fds[0].events = POLLIN;
     28030        if (poll(fds, 1, 0) > 0) {
     28031            have_pending = TRUE;
     28032@@ -347,43 +365,52 @@
     28033            ktimeout.tv_usec = 0;
     28034 
     28035        FD_ZERO(&fdset);
     28036-       FD_SET(SP->_checkfd, &fdset);
     28037-       if (select(SP->_checkfd + 1, &fdset, NULL, NULL, &ktimeout) != 0) {
     28038+       FD_SET(SP_PARM->_checkfd, &fdset);
     28039+       if (select(SP_PARM->_checkfd + 1, &fdset, NULL, NULL, &ktimeout) != 0) {
     28040            have_pending = TRUE;
     28041        }
     28042 #endif
     28043     }
     28044     if (have_pending) {
     28045-       SP->_fifohold = 5;
     28046-       _nc_flush();
     28047+       SP_PARM->_fifohold = 5;
     28048+       NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
     28049     }
     28050     return FALSE;
     28051 }
     28052 
     28053 /* put char at lower right corner */
     28054 static void
     28055-PutCharLR(const ARG_CH_T ch)
     28056+PutCharLR(NCURSES_SP_DCLx const ARG_CH_T ch)
     28057 {
     28058     if (!auto_right_margin) {
     28059        /* we can put the char directly */
     28060-       PutAttrChar(ch);
     28061+       PutAttrChar(NCURSES_SP_ARGx ch);
     28062     } else if (enter_am_mode && exit_am_mode) {
     28063        /* we can suppress automargin */
     28064        TPUTS_TRACE("exit_am_mode");
     28065-       putp(exit_am_mode);
     28066+       NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_am_mode);
     28067 
     28068-       PutAttrChar(ch);
     28069-       SP->_curscol--;
     28070-       position_check(SP->_cursrow, SP->_curscol, "exit_am_mode");
     28071+       PutAttrChar(NCURSES_SP_ARGx ch);
     28072+       SP_PARM->_curscol--;
     28073+       position_check(SP_PARM,
     28074+                      SP_PARM->_cursrow,
     28075+                      SP_PARM->_curscol,
     28076+                      "exit_am_mode");
     28077 
     28078        TPUTS_TRACE("enter_am_mode");
     28079-       putp(enter_am_mode);
     28080+       NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx enter_am_mode);
     28081     } else if ((enter_insert_mode && exit_insert_mode)
     28082               || insert_character || parm_ich) {
     28083-       GoTo(screen_lines - 1, screen_columns - 2);
     28084-       PutAttrChar(ch);
     28085-       GoTo(screen_lines - 1, screen_columns - 2);
     28086-       InsStr(newscr->_line[screen_lines - 1].text + screen_columns - 2, 1);
     28087+       GoTo(NCURSES_SP_ARGx
     28088+            screen_lines(SP_PARM) - 1,
     28089+            screen_columns(SP_PARM) - 2);
     28090+       PutAttrChar(NCURSES_SP_ARGx ch);
     28091+       GoTo(NCURSES_SP_ARGx
     28092+            screen_lines(SP_PARM) - 1,
     28093+            screen_columns(SP_PARM) - 2);
     28094+       InsStr(NCURSES_SP_ARGx
     28095+              NewScreen(SP_PARM)->_line[screen_lines(SP_PARM) - 1].text +
     28096+              screen_columns(SP_PARM) - 2, 1);
     28097     }
     28098 }
     28099 
     28100@@ -391,7 +418,7 @@
     28101  * Wrap the cursor position, i.e., advance to the beginning of the next line.
     28102  */
     28103 static void
     28104-wrap_cursor(void)
     28105+wrap_cursor(NCURSES_SP_DCL0)
     28106 {
     28107     if (eat_newline_glitch) {
     28108        /*
     28109@@ -407,40 +434,45 @@
     28110         * it's safe to just tell the code that the cursor is in hyperspace and
     28111         * let the next mvcur() call straighten things out.
     28112         */
     28113-       SP->_curscol = -1;
     28114-       SP->_cursrow = -1;
     28115+       SP_PARM->_curscol = -1;
     28116+       SP_PARM->_cursrow = -1;
     28117     } else if (auto_right_margin) {
     28118-       SP->_curscol = 0;
     28119-       SP->_cursrow++;
     28120+       SP_PARM->_curscol = 0;
     28121+       SP_PARM->_cursrow++;
     28122        /*
     28123         * We've actually moved - but may have to work around problems with
     28124         * video attributes not working.
     28125         */
     28126-       if (!move_standout_mode && AttrOf(SCREEN_ATTRS(SP))) {
     28127+       if (!move_standout_mode && AttrOf(SCREEN_ATTRS(SP_PARM))) {
     28128            TR(TRACE_CHARPUT, ("turning off (%#lx) %s before wrapping",
     28129-                              (unsigned long) AttrOf(SCREEN_ATTRS(SP)),
     28130-                              _traceattr(AttrOf(SCREEN_ATTRS(SP)))));
     28131-           (void) VIDATTR(A_NORMAL, 0);
     28132+                              (unsigned long) AttrOf(SCREEN_ATTRS(SP_PARM)),
     28133+                              _traceattr(AttrOf(SCREEN_ATTRS(SP_PARM)))));
     28134+           (void) VIDATTR(SP_PARM, A_NORMAL, 0);
     28135        }
     28136     } else {
     28137-       SP->_curscol--;
     28138+       SP_PARM->_curscol--;
     28139     }
     28140-    position_check(SP->_cursrow, SP->_curscol, "wrap_cursor");
     28141+    position_check(SP_PARM,
     28142+                  SP_PARM->_cursrow,
     28143+                  SP_PARM->_curscol,
     28144+                  "wrap_cursor");
     28145 }
     28146 
     28147 static NCURSES_INLINE void
     28148-PutChar(const ARG_CH_T ch)
     28149+PutChar(NCURSES_SP_DCLx const ARG_CH_T ch)
     28150 /* insert character, handling automargin stuff */
     28151 {
     28152-    if (SP->_cursrow == screen_lines - 1 && SP->_curscol == screen_columns - 1)
     28153-       PutCharLR(ch);
     28154-    else
     28155-       PutAttrChar(ch);
     28156+    if (SP_PARM->_cursrow == screen_lines(SP_PARM) - 1 &&
     28157+       SP_PARM->_curscol == screen_columns(SP_PARM) - 1) {
     28158+       PutCharLR(NCURSES_SP_ARGx ch);
     28159+    } else {
     28160+       PutAttrChar(NCURSES_SP_ARGx ch);
     28161+    }
     28162 
     28163-    if (SP->_curscol >= screen_columns)
     28164-       wrap_cursor();
     28165+    if (SP_PARM->_curscol >= screen_columns(SP_PARM))
     28166+       wrap_cursor(NCURSES_SP_ARG);
     28167 
     28168-    position_check(SP->_cursrow, SP->_curscol, "PutChar");
     28169+    position_check(SP_PARM, SP_PARM->_cursrow, SP_PARM->_curscol, "PutChar");
     28170 }
     28171 
     28172 /*
     28173@@ -450,19 +482,19 @@
     28174  * or can be output by clearing (A_COLOR in case of bce-terminal) are excluded.
     28175  */
     28176 static NCURSES_INLINE bool
     28177-can_clear_with(ARG_CH_T ch)
     28178+can_clear_with(NCURSES_SP_DCLx ARG_CH_T ch)
     28179 {
     28180-    if (!back_color_erase && SP->_coloron) {
     28181+    if (!back_color_erase && SP_PARM->_coloron) {
     28182 #if NCURSES_EXT_FUNCS
     28183        int pair;
     28184 
     28185-       if (!SP->_default_color)
     28186+       if (!SP_PARM->_default_color)
     28187            return FALSE;
     28188-       if (SP->_default_fg != C_MASK || SP->_default_bg != C_MASK)
     28189+       if (SP_PARM->_default_fg != C_MASK || SP_PARM->_default_bg != C_MASK)
     28190            return FALSE;
     28191        if ((pair = GetPair(CHDEREF(ch))) != 0) {
     28192            short fg, bg;
     28193-           pair_content(pair, &fg, &bg);
     28194+           NCURSES_SP_NAME(pair_content) (NCURSES_SP_ARGx pair, &fg, &bg);
     28195            if (fg != C_MASK || bg != C_MASK)
     28196                return FALSE;
     28197        }
     28198@@ -488,7 +520,7 @@
     28199  * This code is optimized using ech and rep.
     28200  */
     28201 static int
     28202-EmitRange(const NCURSES_CH_T * ntext, int num)
     28203+EmitRange(NCURSES_SP_DCLx const NCURSES_CH_T * ntext, int num)
     28204 {
     28205     int i;
     28206 
     28207@@ -500,13 +532,13 @@
     28208            NCURSES_CH_T ntext0;
     28209 
     28210            while (num > 1 && !CharEq(ntext[0], ntext[1])) {
     28211-               PutChar(CHREF(ntext[0]));
     28212+               PutChar(NCURSES_SP_ARGx CHREF(ntext[0]));
     28213                ntext++;
     28214                num--;
     28215            }
     28216            ntext0 = ntext[0];
     28217            if (num == 1) {
     28218-               PutChar(CHREF(ntext0));
     28219+               PutChar(NCURSES_SP_ARGx CHREF(ntext0));
     28220                return 0;
     28221            }
     28222            runcount = 2;
     28223@@ -523,10 +555,10 @@
     28224             * which it would be marginally advantageous.
     28225             */
     28226            if (erase_chars
     28227-               && runcount > SP->_ech_cost + SP->_cup_ch_cost
     28228-               && can_clear_with(CHREF(ntext0))) {
     28229-               UpdateAttrs(ntext0);
     28230-               putp(TPARM_1(erase_chars, runcount));
     28231+               && runcount > SP_PARM->_ech_cost + SP_PARM->_cup_ch_cost
     28232+               && can_clear_with(NCURSES_SP_ARGx CHREF(ntext0))) {
     28233+               UpdateAttrs(SP_PARM, ntext0);
     28234+               NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx TPARM_1(erase_chars, runcount));
     28235 
     28236                /*
     28237                 * If this is the last part of the given interval,
     28238@@ -534,27 +566,34 @@
     28239                 * last update on the line.
     28240                 */
     28241                if (runcount < num) {
     28242-                   GoTo(SP->_cursrow, SP->_curscol + runcount);
     28243+                   GoTo(NCURSES_SP_ARGx
     28244+                        SP_PARM->_cursrow,
     28245+                        SP_PARM->_curscol + runcount);
     28246                } else {
     28247                    return 1;   /* cursor stays in the middle */
     28248                }
     28249-           } else if (repeat_char && runcount > SP->_rep_cost) {
     28250-               bool wrap_possible = (SP->_curscol + runcount >= screen_columns);
     28251+           } else if (repeat_char && runcount > SP_PARM->_rep_cost) {
     28252+               bool wrap_possible = (SP_PARM->_curscol + runcount >=
     28253+                                     screen_columns(SP_PARM));
     28254                int rep_count = runcount;
     28255 
     28256                if (wrap_possible)
     28257                    rep_count--;
     28258 
     28259-               UpdateAttrs(ntext0);
     28260-               tputs(TPARM_2(repeat_char, CharOf(ntext0), rep_count),
     28261-                     rep_count, _nc_outch);
     28262-               SP->_curscol += rep_count;
     28263+               UpdateAttrs(SP_PARM, ntext0);
     28264+               NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     28265+                                       TPARM_2(repeat_char,
     28266+                                               CharOf(ntext0),
     28267+                                               rep_count),
     28268+                                       rep_count,
     28269+                                       NCURSES_SP_NAME(_nc_outch));
     28270+               SP_PARM->_curscol += rep_count;
     28271 
     28272                if (wrap_possible)
     28273-                   PutChar(CHREF(ntext0));
     28274+                   PutChar(NCURSES_SP_ARGx CHREF(ntext0));
     28275            } else {
     28276                for (i = 0; i < runcount; i++)
     28277-                   PutChar(CHREF(ntext[i]));
     28278+                   PutChar(NCURSES_SP_ARGx CHREF(ntext[i]));
     28279            }
     28280            ntext += runcount;
     28281            num -= runcount;
     28282@@ -563,7 +602,7 @@
     28283     }
     28284 
     28285     for (i = 0; i < num; i++)
     28286-       PutChar(CHREF(ntext[i]));
     28287+       PutChar(NCURSES_SP_ARGx CHREF(ntext[i]));
     28288     return 0;
     28289 }
     28290 
     28291@@ -576,39 +615,40 @@
     28292  * Returns: same as EmitRange
     28293  */
     28294 static int
     28295-PutRange(const NCURSES_CH_T * otext,
     28296+PutRange(NCURSES_SP_DCLx
     28297+        const NCURSES_CH_T * otext,
     28298         const NCURSES_CH_T * ntext,
     28299         int row,
     28300         int first, int last)
     28301 {
     28302     int i, j, same;
     28303 
     28304-    TR(TRACE_CHARPUT, ("PutRange(%p, %p, %d, %d, %d)",
     28305-                      otext, ntext, row, first, last));
     28306+    TR(TRACE_CHARPUT, ("PutRange(%p, %p, %p, %d, %d, %d)",
     28307+                      SP_PARM, otext, ntext, row, first, last));
     28308 
     28309     if (otext != ntext
     28310-       && (last - first + 1) > SP->_inline_cost) {
     28311+       && (last - first + 1) > SP_PARM->_inline_cost) {
     28312        for (j = first, same = 0; j <= last; j++) {
     28313            if (!same && isWidecExt(otext[j]))
     28314                continue;
     28315            if (CharEq(otext[j], ntext[j])) {
     28316                same++;
     28317            } else {
     28318-               if (same > SP->_inline_cost) {
     28319-                   EmitRange(ntext + first, j - same - first);
     28320-                   GoTo(row, first = j);
     28321+               if (same > SP_PARM->_inline_cost) {
     28322+                   EmitRange(NCURSES_SP_ARGx ntext + first, j - same - first);
     28323+                   GoTo(NCURSES_SP_ARGx row, first = j);
     28324                }
     28325                same = 0;
     28326            }
     28327        }
     28328-       i = EmitRange(ntext + first, j - same - first);
     28329+       i = EmitRange(NCURSES_SP_ARGx ntext + first, j - same - first);
     28330        /*
     28331         * Always return 1 for the next GoTo() after a PutRange() if we found
     28332         * identical characters at end of interval
     28333         */
     28334        return (same == 0 ? i : 1);
     28335     }
     28336-    return EmitRange(ntext + first, last - first + 1);
     28337+    return EmitRange(NCURSES_SP_ARGx ntext + first, last - first + 1);
     28338 }
     28339 
     28340 /* leave unbracketed here so 'indent' works */
     28341@@ -618,7 +658,7 @@
    2057128342                if_USE_SCROLL_HINTS(win->_line[row].oldindex = row)
    2057228343 
     
    2057728348     int i;
    2057828349     int nonempty;
    20579 @@ -645,11 +646,11 @@
     28350@@ -628,28 +668,47 @@
     28351 
     28352     T((T_CALLED("doupdate()")));
     28353 
     28354-    if (curscr == 0
     28355-       || newscr == 0)
     28356+#if !USE_REENTRANT
     28357+    /*
     28358+     * It is "legal" but unlikely that an application could assign a new
     28359+     * value to one of the standard windows.  Check for that possibility
     28360+     * and try to recover.
     28361+     *
     28362+     * We do not allow applications to assign new values in the reentrant
     28363+     * model.
     28364+     */
     28365+#define SyncScreens(internal,exported) \
     28366+       if (internal == 0) internal = exported; \
     28367+       if (internal != exported) exported = internal
     28368+
     28369+    SyncScreens(CurScreen(SP_PARM), curscr);
     28370+    SyncScreens(NewScreen(SP_PARM), newscr);
     28371+    SyncScreens(StdScreen(SP_PARM), stdscr);
     28372+#endif
     28373+
     28374+    if (CurScreen(SP_PARM) == 0
     28375+       || NewScreen(SP_PARM) == 0
     28376+       || StdScreen(SP_PARM) == 0)
     28377        returnCode(ERR);
     28378 
     28379 #ifdef TRACE
     28380     if (USE_TRACEF(TRACE_UPDATE)) {
     28381-       if (curscr->_clear)
     28382+       if (CurScreen(SP_PARM)->_clear)
     28383            _tracef("curscr is clear");
     28384        else
     28385-           _tracedump("curscr", curscr);
     28386-       _tracedump("newscr", newscr);
     28387+           _tracedump("curscr", CurScreen(SP_PARM));
     28388+       _tracedump("newscr", NewScreen(SP_PARM));
     28389        _nc_unlock_global(tracef);
     28390     }
     28391 #endif /* TRACE */
    2058028392 
    2058128393     _nc_signal_handler(FALSE);
     
    2059228404         * This is a transparent extension:  XSI does not address it,
    2059328405         * and applications need not know that ncurses can do it.
    20594 @@ -658,20 +659,20 @@
     28406@@ -658,20 +717,20 @@
    2059528407         * (this can happen in an xterm, for example), and resize the
    2059628408         * ncurses data structures accordingly.
     
    2060528417 
    2060628418        T(("coming back from shell mode"));
    20607         reset_prog_mode();
    20608  
    20609         _nc_mvcur_resume();
    20610         _nc_screen_resume();
     28419-       reset_prog_mode();
     28420+       NCURSES_SP_NAME(reset_prog_mode) (NCURSES_SP_ARG);
     28421 
     28422-       _nc_mvcur_resume();
     28423-       _nc_screen_resume();
    2061128424-       SP->_mouse_resume(SP);
     28425+       NCURSES_SP_NAME(_nc_mvcur_resume) (NCURSES_SP_ARG);
     28426+       NCURSES_SP_NAME(_nc_screen_resume) (NCURSES_SP_ARG);
    2061228427+       SP_PARM->_mouse_resume(SP_PARM);
    2061328428 
     
    2061728432 #if USE_TRACE_TIMES
    2061828433     /* zero the metering machinery */
    20619 @@ -699,7 +700,7 @@
    20620             for (j = 0; j < screen_columns; j++) {
     28434@@ -695,11 +754,11 @@
     28435        int j, k;
     28436        attr_t rattr = A_NORMAL;
     28437 
     28438-       for (i = 0; i < screen_lines; i++) {
     28439-           for (j = 0; j < screen_columns; j++) {
     28440+       for (i = 0; i < screen_lines(SP_PARM); i++) {
     28441+           for (j = 0; j < screen_columns(SP_PARM); j++) {
    2062128442                bool failed = FALSE;
    20622                 NCURSES_CH_T *thisline = newscr->_line[i].text;
     28443-               NCURSES_CH_T *thisline = newscr->_line[i].text;
    2062328444-               attr_t thisattr = AttrOf(thisline[j]) & SP->_xmc_triggers;
     28445+               NCURSES_CH_T *thisline = NewScreen(SP_PARM)->_line[i].text;
    2062428446+               attr_t thisattr = AttrOf(thisline[j]) & SP_PARM->_xmc_triggers;
    2062528447                attr_t turnon = thisattr & ~rattr;
    2062628448 
    2062728449                /* is an attribute turned on here? */
    20628 @@ -717,7 +718,7 @@
     28450@@ -717,8 +776,8 @@
    2062928451                 * there's enough room to set the attribute before the first
    2063028452                 * non-blank in the run.
    2063128453                 */
    2063228454-#define SAFE(a)        (!((a) & SP->_xmc_triggers))
    20633 +#define SAFE(a)        (!((a) & SP_PARM->_xmc_triggers))
    20634                 if (ISBLANK(thisline[j]) && SAFE(turnon)) {
     28455-               if (ISBLANK(thisline[j]) && SAFE(turnon)) {
     28456+#define SAFE(scr,a)    (!((a) & (scr)->_xmc_triggers))
     28457+               if (ISBLANK(thisline[j]) && SAFE(SP_PARM, turnon)) {
    2063528458                    RemAttr(thisline[j], turnon);
    2063628459                    continue;
    20637 @@ -748,7 +749,7 @@
    20638                     for (m = i; m < screen_lines; m++) {
    20639                         for (; n < screen_columns; n++) {
    20640                             attr_t testattr = AttrOf(newscr->_line[m].text[n]);
     28460                }
     28461@@ -727,14 +786,14 @@
     28462                for (k = 1; k <= magic_cookie_glitch; k++) {
     28463                    if (j - k < 0
     28464                        || !ISBLANK(thisline[j - k])
     28465-                       || !SAFE(AttrOf(thisline[j - k]))) {
     28466+                       || !SAFE(SP_PARM, AttrOf(thisline[j - k]))) {
     28467                        failed = TRUE;
     28468                        TR(TRACE_ATTRS, ("No room at start in %d,%d%s%s",
     28469                                         i, j - k,
     28470                                         (ISBLANK(thisline[j - k])
     28471                                          ? ""
     28472                                          : ":nonblank"),
     28473-                                        (SAFE(AttrOf(thisline[j - k]))
     28474+                                        (SAFE(SP_PARM, AttrOf(thisline[j - k]))
     28475                                          ? ""
     28476                                          : ":unsafe")));
     28477                        break;
     28478@@ -745,10 +804,12 @@
     28479                    int m, n = j;
     28480 
     28481                    /* find end of span, if it's onscreen */
     28482-                   for (m = i; m < screen_lines; m++) {
     28483-                       for (; n < screen_columns; n++) {
     28484-                           attr_t testattr = AttrOf(newscr->_line[m].text[n]);
    2064128485-                           if ((testattr & SP->_xmc_triggers) == rattr) {
     28486+                   for (m = i; m < screen_lines(SP_PARM); m++) {
     28487+                       for (; n < screen_columns(SP_PARM); n++) {
     28488+                           attr_t testattr
     28489+                           = AttrOf(NewScreen(SP_PARM)->_line[m].text[n]);
     28490+
    2064228491+                           if ((testattr & SP_PARM->_xmc_triggers) == rattr) {
    2064328492                                end_onscreen = TRUE;
    2064428493                                TR(TRACE_ATTRS,
    2064528494                                   ("Range attributed with %s ends at (%d, %d)",
    20646 @@ -809,7 +810,7 @@
    20647                     for (p = i; p < screen_lines; p++) {
    20648                         for (; q < screen_columns; q++) {
    20649                             attr_t testattr = AttrOf(newscr->_line[p].text[q]);
     28495@@ -764,7 +825,8 @@
     28496                  foundit:;
     28497 
     28498                    if (end_onscreen) {
     28499-                       NCURSES_CH_T *lastline = newscr->_line[m].text;
     28500+                       NCURSES_CH_T *lastline =
     28501+                       NewScreen(SP_PARM)->_line[m].text;
     28502 
     28503                        /*
     28504                         * If there are safely-attributed blanks at the end of
     28505@@ -773,15 +835,15 @@
     28506                         */
     28507                        while (n >= 0
     28508                               && ISBLANK(lastline[n])
     28509-                              && SAFE(AttrOf(lastline[n]))) {
     28510+                              && SAFE(SP_PARM, AttrOf(lastline[n]))) {
     28511                            RemAttr(lastline[n--], turnon);
     28512                        }
     28513 
     28514                        /* check that there's enough room at end of span */
     28515                        for (k = 1; k <= magic_cookie_glitch; k++) {
     28516-                           if (n + k >= screen_columns
     28517+                           if (n + k >= screen_columns(SP_PARM)
     28518                                || !ISBLANK(lastline[n + k])
     28519-                               || !SAFE(AttrOf(lastline[n + k]))) {
     28520+                               || !SAFE(SP_PARM, AttrOf(lastline[n + k]))) {
     28521                                failed = TRUE;
     28522                                TR(TRACE_ATTRS,
     28523                                   ("No room at end in %d,%d%s%s",
     28524@@ -789,7 +851,7 @@
     28525                                    (ISBLANK(lastline[n + k])
     28526                                     ? ""
     28527                                     : ":nonblank"),
     28528-                                   (SAFE(AttrOf(lastline[n + k]))
     28529+                                   (SAFE(SP_PARM, AttrOf(lastline[n + k]))
     28530                                     ? ""
     28531                                     : ":unsafe")));
     28532                                break;
     28533@@ -806,12 +868,13 @@
     28534                        _traceattr(turnon), i, j));
     28535 
     28536                    /* turn off new attributes over span */
     28537-                   for (p = i; p < screen_lines; p++) {
     28538-                       for (; q < screen_columns; q++) {
     28539-                           attr_t testattr = AttrOf(newscr->_line[p].text[q]);
    2065028540-                           if ((testattr & SP->_xmc_triggers) == rattr)
     28541+                   for (p = i; p < screen_lines(SP_PARM); p++) {
     28542+                       for (; q < screen_columns(SP_PARM); q++) {
     28543+                           attr_t testattr =
     28544+                           AttrOf(NewScreen(SP_PARM)->_line[p].text[q]);
    2065128545+                           if ((testattr & SP_PARM->_xmc_triggers) == rattr)
    2065228546                                goto foundend;
    20653                             RemAttr(newscr->_line[p].text[q], turnon);
     28547-                           RemAttr(newscr->_line[p].text[q], turnon);
     28548+                           RemAttr(NewScreen(SP_PARM)->_line[p].text[q], turnon);
    2065428549                        }
    20655 @@ -857,7 +858,7 @@
    20656  
    20657         nonempty = min(screen_lines, newscr->_maxy + 1);
     28550                        q = 0;
     28551                    }
     28552@@ -837,7 +900,7 @@
     28553        /* show altered highlights after magic-cookie check */
     28554        if (USE_TRACEF(TRACE_UPDATE)) {
     28555            _tracef("After magic-cookie check...");
     28556-           _tracedump("newscr", newscr);
     28557+           _tracedump("newscr", NewScreen(SP_PARM));
     28558            _nc_unlock_global(tracef);
     28559        }
     28560 #endif /* TRACE */
     28561@@ -845,23 +908,23 @@
     28562 #endif /* USE_XMC_SUPPORT */
     28563 
     28564     nonempty = 0;
     28565-    if (curscr->_clear || newscr->_clear) {    /* force refresh ? */
     28566-       ClrUpdate();
     28567-       curscr->_clear = FALSE; /* reset flag */
     28568-       newscr->_clear = FALSE; /* reset flag */
     28569+    if (CurScreen(SP_PARM)->_clear || NewScreen(SP_PARM)->_clear) {    /* force refresh ? */
     28570+       ClrUpdate(NCURSES_SP_ARG);
     28571+       CurScreen(SP_PARM)->_clear = FALSE;     /* reset flag */
     28572+       NewScreen(SP_PARM)->_clear = FALSE;     /* reset flag */
     28573     } else {
     28574        int changedlines = CHECK_INTERVAL;
     28575 
     28576-       if (check_pending())
     28577+       if (check_pending(NCURSES_SP_ARG))
     28578            goto cleanup;
     28579 
     28580-       nonempty = min(screen_lines, newscr->_maxy + 1);
     28581+       nonempty = min(screen_lines(SP_PARM), NewScreen(SP_PARM)->_maxy + 1);
    2065828582 
    2065928583-       if (SP->_scrolling) {
     
    2066228586        }
    2066328587 
    20664 @@ -940,6 +941,14 @@
     28588-       nonempty = ClrBottom(nonempty);
     28589+       nonempty = ClrBottom(NCURSES_SP_ARGx nonempty);
     28590 
     28591        TR(TRACE_UPDATE, ("Transforming lines, nonempty %d", nonempty));
     28592        for (i = 0; i < nonempty; i++) {
     28593@@ -869,46 +932,46 @@
     28594             * Here is our line-breakout optimization.
     28595             */
     28596            if (changedlines == CHECK_INTERVAL) {
     28597-               if (check_pending())
     28598+               if (check_pending(NCURSES_SP_ARG))
     28599                    goto cleanup;
     28600                changedlines = 0;
     28601            }
     28602 
     28603            /*
     28604-            * newscr->line[i].firstchar is normally set
     28605-            * by wnoutrefresh.  curscr->line[i].firstchar
     28606+            * newscr.line[i].firstchar is normally set
     28607+            * by wnoutrefresh.  curscr.line[i].firstchar
     28608             * is normally set by _nc_scroll_window in the
     28609             * vertical-movement optimization code,
     28610             */
     28611-           if (newscr->_line[i].firstchar != _NOCHANGE
     28612-               || curscr->_line[i].firstchar != _NOCHANGE) {
     28613-               TransformLine(i);
     28614+           if (NewScreen(SP_PARM)->_line[i].firstchar != _NOCHANGE
     28615+               || CurScreen(SP_PARM)->_line[i].firstchar != _NOCHANGE) {
     28616+               TransformLine(NCURSES_SP_ARGx i);
     28617                changedlines++;
     28618            }
     28619 
     28620            /* mark line changed successfully */
     28621-           if (i <= newscr->_maxy) {
     28622-               MARK_NOCHANGE(newscr, i);
     28623+           if (i <= NewScreen(SP_PARM)->_maxy) {
     28624+               MARK_NOCHANGE(NewScreen(SP_PARM), i);
     28625            }
     28626-           if (i <= curscr->_maxy) {
     28627-               MARK_NOCHANGE(curscr, i);
     28628+           if (i <= CurScreen(SP_PARM)->_maxy) {
     28629+               MARK_NOCHANGE(CurScreen(SP_PARM), i);
     28630            }
     28631        }
     28632     }
     28633 
     28634     /* put everything back in sync */
     28635-    for (i = nonempty; i <= newscr->_maxy; i++) {
     28636-       MARK_NOCHANGE(newscr, i);
     28637+    for (i = nonempty; i <= NewScreen(SP_PARM)->_maxy; i++) {
     28638+       MARK_NOCHANGE(NewScreen(SP_PARM), i);
     28639     }
     28640-    for (i = nonempty; i <= curscr->_maxy; i++) {
     28641-       MARK_NOCHANGE(curscr, i);
     28642+    for (i = nonempty; i <= CurScreen(SP_PARM)->_maxy; i++) {
     28643+       MARK_NOCHANGE(CurScreen(SP_PARM), i);
     28644     }
     28645 
     28646-    if (!newscr->_leaveok) {
     28647-       curscr->_curx = newscr->_curx;
     28648-       curscr->_cury = newscr->_cury;
     28649+    if (!NewScreen(SP_PARM)->_leaveok) {
     28650+       CurScreen(SP_PARM)->_curx = NewScreen(SP_PARM)->_curx;
     28651+       CurScreen(SP_PARM)->_cury = NewScreen(SP_PARM)->_cury;
     28652 
     28653-       GoTo(curscr->_cury, curscr->_curx);
     28654+       GoTo(NCURSES_SP_ARGx CurScreen(SP_PARM)->_cury, CurScreen(SP_PARM)->_curx);
     28655     }
     28656 
     28657   cleanup:
     28658@@ -921,10 +984,10 @@
     28659 #if USE_XMC_SUPPORT
     28660     if (magic_cookie_glitch != 0)
     28661 #endif
     28662-       UpdateAttrs(normal);
     28663+       UpdateAttrs(SP_PARM, normal);
     28664 
     28665-    _nc_flush();
     28666-    WINDOW_ATTRS(curscr) = WINDOW_ATTRS(newscr);
     28667+    NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
     28668+    WINDOW_ATTRS(CurScreen(SP_PARM)) = WINDOW_ATTRS(NewScreen(SP_PARM));
     28669 
     28670 #if USE_TRACE_TIMES
     28671     (void) times(&after);
     28672@@ -940,6 +1003,14 @@
    2066528673     returnCode(OK);
    2066628674 }
     
    2067728685  *     ClrBlank(win)
    2067828686  *
    20679 @@ -1165,8 +1174,8 @@
     28687@@ -951,10 +1022,10 @@
     28688  *     in the wbkgd() call.  Assume 'stdscr' for this case.
     28689  */
     28690 #define BCE_ATTRS (A_NORMAL|A_COLOR)
     28691-#define BCE_BKGD(win) (((win) == curscr ? stdscr : (win))->_nc_bkgd)
     28692+#define BCE_BKGD(win) (((win) == CurScreen(SP_PARM) ? StdScreen(SP_PARM) : (win))->_nc_bkgd)
     28693 
     28694 static NCURSES_INLINE NCURSES_CH_T
     28695-ClrBlank(WINDOW *win)
     28696+ClrBlank(NCURSES_SP_DCLx WINDOW *win)
     28697 {
     28698     NCURSES_CH_T blank = blankchar;
     28699     if (back_color_erase)
     28700@@ -970,23 +1041,24 @@
     28701 */
     28702 
     28703 static void
     28704-ClrUpdate(void)
     28705+ClrUpdate(NCURSES_SP_DCL0)
     28706 {
     28707-    int i;
     28708-    NCURSES_CH_T blank = ClrBlank(stdscr);
     28709-    int nonempty = min(screen_lines, newscr->_maxy + 1);
     28710-
     28711     TR(TRACE_UPDATE, (T_CALLED("ClrUpdate")));
     28712+    if (0 != SP_PARM) {
     28713+       int i;
     28714+       NCURSES_CH_T blank = ClrBlank(NCURSES_SP_ARGx StdScreen(SP_PARM));
     28715+       int nonempty = min(screen_lines(SP_PARM),
     28716+                          NewScreen(SP_PARM)->_maxy + 1);
     28717 
     28718-    ClearScreen(blank);
     28719+       ClearScreen(NCURSES_SP_ARGx blank);
     28720 
     28721-    TR(TRACE_UPDATE, ("updating screen from scratch"));
     28722+       TR(TRACE_UPDATE, ("updating screen from scratch"));
     28723 
     28724-    nonempty = ClrBottom(nonempty);
     28725-
     28726-    for (i = 0; i < nonempty; i++)
     28727-       TransformLine(i);
     28728+       nonempty = ClrBottom(NCURSES_SP_ARGx nonempty);
     28729 
     28730+       for (i = 0; i < nonempty; i++)
     28731+           TransformLine(NCURSES_SP_ARGx i);
     28732+    }
     28733     TR(TRACE_UPDATE, (T_RETURN("")));
     28734 }
     28735 
     28736@@ -997,15 +1069,16 @@
     28737 */
     28738 
     28739 static void
     28740-ClrToEOL(NCURSES_CH_T blank, bool needclear)
     28741+ClrToEOL(NCURSES_SP_DCLx NCURSES_CH_T blank, bool needclear)
     28742 {
     28743     int j;
     28744 
     28745-    if (curscr != 0
     28746-       && SP->_cursrow >= 0) {
     28747-       for (j = SP->_curscol; j < screen_columns; j++) {
     28748+    if (CurScreen(SP_PARM) != 0
     28749+       && SP_PARM->_cursrow >= 0) {
     28750+       for (j = SP_PARM->_curscol; j < screen_columns(SP_PARM); j++) {
     28751            if (j >= 0) {
     28752-               NCURSES_CH_T *cp = &(curscr->_line[SP->_cursrow].text[j]);
     28753+               NCURSES_CH_T *cp =
     28754+               &(CurScreen(SP_PARM)->_line[SP_PARM->_cursrow].text[j]);
     28755 
     28756                if (!CharEq(*cp, blank)) {
     28757                    *cp = blank;
     28758@@ -1018,14 +1091,14 @@
     28759     }
     28760 
     28761     if (needclear) {
     28762-       UpdateAttrs(blank);
     28763+       UpdateAttrs(SP_PARM, blank);
     28764        TPUTS_TRACE("clr_eol");
     28765-       if (clr_eol && SP->_el_cost <= (screen_columns - SP->_curscol)) {
     28766-           putp(clr_eol);
     28767+       if (clr_eol && SP_PARM->_el_cost <= (screen_columns(SP_PARM) - SP_PARM->_curscol)) {
     28768+           NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx clr_eol);
     28769        } else {
     28770-           int count = (screen_columns - SP->_curscol);
     28771+           int count = (screen_columns(SP_PARM) - SP_PARM->_curscol);
     28772            while (count-- > 0)
     28773-               PutChar(CHREF(blank));
     28774+               PutChar(NCURSES_SP_ARGx CHREF(blank));
     28775        }
     28776     }
     28777 }
     28778@@ -1037,23 +1110,29 @@
     28779 */
     28780 
     28781 static void
     28782-ClrToEOS(NCURSES_CH_T blank)
     28783+ClrToEOS(NCURSES_SP_DCLx NCURSES_CH_T blank)
     28784 {
     28785     int row, col;
     28786 
     28787-    row = SP->_cursrow;
     28788-    col = SP->_curscol;
     28789-
     28790-    UpdateAttrs(blank);
     28791-    TPUTS_TRACE("clr_eos");
     28792-    tputs(clr_eos, screen_lines - row, _nc_outch);
     28793+    if (0 == SP_PARM)
     28794+       return;
     28795 
     28796-    while (col < screen_columns)
     28797-       curscr->_line[row].text[col++] = blank;
     28798+    row = SP_PARM->_cursrow;
     28799+    col = SP_PARM->_curscol;
     28800 
     28801-    for (row++; row < screen_lines; row++) {
     28802-       for (col = 0; col < screen_columns; col++)
     28803-           curscr->_line[row].text[col] = blank;
     28804+    UpdateAttrs(SP_PARM, blank);
     28805+    TPUTS_TRACE("clr_eos");
     28806+    NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     28807+                           clr_eos,
     28808+                           screen_lines(SP_PARM) - row,
     28809+                           NCURSES_SP_NAME(_nc_outch));
     28810+
     28811+    while (col < screen_columns(SP_PARM))
     28812+       CurScreen(SP_PARM)->_line[row].text[col++] = blank;
     28813+
     28814+    for (row++; row < screen_lines(SP_PARM); row++) {
     28815+       for (col = 0; col < screen_columns(SP_PARM); col++)
     28816+           CurScreen(SP_PARM)->_line[row].text[col] = blank;
     28817     }
     28818 }
     28819 
     28820@@ -1065,26 +1144,26 @@
     28821  *     screen, checking if each is blank, and one or more are changed.
     28822  */
     28823 static int
     28824-ClrBottom(int total)
     28825+ClrBottom(NCURSES_SP_DCLx int total)
     28826 {
     28827     int row;
     28828     int col;
     28829     int top = total;
     28830-    int last = min(screen_columns, newscr->_maxx + 1);
     28831-    NCURSES_CH_T blank = newscr->_line[total - 1].text[last - 1];
     28832+    int last = min(screen_columns(SP_PARM), NewScreen(SP_PARM)->_maxx + 1);
     28833+    NCURSES_CH_T blank = NewScreen(SP_PARM)->_line[total - 1].text[last - 1];
     28834     bool ok;
     28835 
     28836-    if (clr_eos && can_clear_with(CHREF(blank))) {
     28837+    if (clr_eos && can_clear_with(NCURSES_SP_ARGx CHREF(blank))) {
     28838 
     28839        for (row = total - 1; row >= 0; row--) {
     28840            for (col = 0, ok = TRUE; ok && col < last; col++) {
     28841-               ok = (CharEq(newscr->_line[row].text[col], blank));
     28842+               ok = (CharEq(NewScreen(SP_PARM)->_line[row].text[col], blank));
     28843            }
     28844            if (!ok)
     28845                break;
     28846 
     28847            for (col = 0; ok && col < last; col++) {
     28848-               ok = (CharEq(curscr->_line[row].text[col], blank));
     28849+               ok = (CharEq(CurScreen(SP_PARM)->_line[row].text[col], blank));
     28850            }
     28851            if (!ok)
     28852                top = row;
     28853@@ -1092,11 +1171,11 @@
     28854 
     28855        /* don't use clr_eos for just one line if clr_eol available */
     28856        if (top < total) {
     28857-           GoTo(top, 0);
     28858-           ClrToEOS(blank);
     28859-           if (SP->oldhash && SP->newhash) {
     28860-               for (row = top; row < screen_lines; row++)
     28861-                   SP->oldhash[row] = SP->newhash[row];
     28862+           GoTo(NCURSES_SP_ARGx top, 0);
     28863+           ClrToEOS(NCURSES_SP_ARGx blank);
     28864+           if (SP_PARM->oldhash && SP_PARM->newhash) {
     28865+               for (row = top; row < screen_lines(SP_PARM); row++)
     28866+                   SP_PARM->oldhash[row] = SP_PARM->newhash[row];
     28867            }
     28868        }
     28869     }
     28870@@ -1105,15 +1184,15 @@
     28871 
     28872 #if USE_XMC_SUPPORT
     28873 #if USE_WIDEC_SUPPORT
     28874-#define check_xmc_transition(a, b) \
     28875-    ((((a)->attr ^ (b)->attr) & ~((a)->attr) & SP->_xmc_triggers) != 0)
     28876-#define xmc_turn_on(a,b) check_xmc_transition(&(a), &(b))
     28877+#define check_xmc_transition(sp, a, b)                                 \
     28878+    ((((a)->attr ^ (b)->attr) & ~((a)->attr) & (sp)->_xmc_triggers) != 0)
     28879+#define xmc_turn_on(sp,a,b) check_xmc_transition(sp,&(a), &(b))
     28880 #else
     28881-#define xmc_turn_on(a,b) ((((a)^(b)) & ~(a) & SP->_xmc_triggers) != 0)
     28882+#define xmc_turn_on(sp,a,b) ((((a)^(b)) & ~(a) & (sp)->_xmc_triggers) != 0)
     28883 #endif
     28884 
     28885-#define xmc_new(r,c) newscr->_line[r].text[c]
     28886-#define xmc_turn_off(a,b) xmc_turn_on(b,a)
     28887+#define xmc_new(sp,r,c) NewScreen(SP_PARM)->_line[r].text[c]
     28888+#define xmc_turn_off(sp,a,b) xmc_turn_on(sp,b,a)
     28889 #endif /* USE_XMC_SUPPORT */
     28890 
     28891 /*
     28892@@ -1135,19 +1214,19 @@
     28893 */
     28894 
     28895 static void
     28896-TransformLine(int const lineno)
     28897+TransformLine(NCURSES_SP_DCLx int const lineno)
     28898 {
     28899     int firstChar, oLastChar, nLastChar;
     28900-    NCURSES_CH_T *newLine = newscr->_line[lineno].text;
     28901-    NCURSES_CH_T *oldLine = curscr->_line[lineno].text;
     28902+    NCURSES_CH_T *newLine = NewScreen(SP_PARM)->_line[lineno].text;
     28903+    NCURSES_CH_T *oldLine = CurScreen(SP_PARM)->_line[lineno].text;
     28904     int n;
     28905     bool attrchanged = FALSE;
     28906 
     28907-    TR(TRACE_UPDATE, (T_CALLED("TransformLine(%d)"), lineno));
     28908+    TR(TRACE_UPDATE, (T_CALLED("TransformLine(%p, %d)"), SP_PARM, lineno));
     28909 
     28910     /* copy new hash value to old one */
     28911-    if (SP->oldhash && SP->newhash)
     28912-       SP->oldhash[lineno] = SP->newhash[lineno];
     28913+    if (SP_PARM->oldhash && SP_PARM->newhash)
     28914+       SP_PARM->oldhash[lineno] = SP_PARM->newhash[lineno];
     28915 
     28916     /*
     28917      * If we have colors, there is the possibility of having two color pairs
     28918@@ -1155,19 +1234,20 @@
     28919      * for this case, and update the old line with the new line's colors when
     28920      * they are equivalent.
     28921      */
     28922-    if (SP->_coloron) {
     28923+    if (SP_PARM->_coloron) {
     28924        int oldPair;
     28925        int newPair;
     28926 
     28927-       for (n = 0; n < screen_columns; n++) {
     28928+       for (n = 0; n < screen_columns(SP_PARM); n++) {
     28929            if (!CharEq(newLine[n], oldLine[n])) {
     28930                oldPair = GetPair(oldLine[n]);
    2068028931                newPair = GetPair(newLine[n]);
    2068128932                if (oldPair != newPair
     
    2068328934-                   if (oldPair < COLOR_PAIRS
    2068428935-                       && newPair < COLOR_PAIRS
    20685 +                   if (oldPair < SP->_pair_limit
    20686 +                       && newPair < SP->_pair_limit
    20687                         && SP->_color_pairs[oldPair] == SP->_color_pairs[newPair]) {
     28936-                       && SP->_color_pairs[oldPair] == SP->_color_pairs[newPair]) {
     28937+                   if (oldPair < SP_PARM->_pair_limit
     28938+                       && newPair < SP_PARM->_pair_limit
     28939+                       && (SP_PARM->_color_pairs[oldPair] ==
     28940+                           SP_PARM->_color_pairs[newPair])) {
    2068828941                        SetPair(oldLine[n], GetPair(newLine[n]));
    2068928942                    }
     28943                }
     28944@@ -1177,7 +1257,7 @@
     28945 
     28946     if (ceol_standout_glitch && clr_eol) {
     28947        firstChar = 0;
     28948-       while (firstChar < screen_columns) {
     28949+       while (firstChar < screen_columns(SP_PARM)) {
     28950            if (!SameAttrOf(newLine[firstChar], oldLine[firstChar])) {
     28951                attrchanged = TRUE;
     28952                break;
     28953@@ -1189,9 +1269,13 @@
     28954     firstChar = 0;
     28955 
     28956     if (attrchanged) {         /* we may have to disregard the whole line */
     28957-       GoTo(lineno, firstChar);
     28958-       ClrToEOL(ClrBlank(curscr), FALSE);
     28959-       PutRange(oldLine, newLine, lineno, 0, (screen_columns - 1));
     28960+       GoTo(NCURSES_SP_ARGx lineno, firstChar);
     28961+       ClrToEOL(NCURSES_SP_ARGx
     28962+                ClrBlank(NCURSES_SP_ARGx CurScreen(SP_PARM)),
     28963+                FALSE);
     28964+       PutRange(NCURSES_SP_ARGx
     28965+                oldLine, newLine, lineno, 0,
     28966+                screen_columns(SP_PARM) - 1);
     28967 #if USE_XMC_SUPPORT
     28968 
     28969        /*
     28970@@ -1206,8 +1290,8 @@
     28971         * following operation.
     28972         */
     28973     } else if (magic_cookie_glitch > 0) {
     28974-       GoTo(lineno, firstChar);
     28975-       for (n = 0; n < screen_columns; n++) {
     28976+       GoTo(NCURSES_SP_ARGx lineno, firstChar);
     28977+       for (n = 0; n < screen_columns(SP_PARM); n++) {
     28978            int m = n + magic_cookie_glitch;
     28979 
     28980            /* check for turn-on:
     28981@@ -1216,26 +1300,30 @@
     28982             */
     28983            if (ISBLANK(newLine[n])
     28984                && ((n > 0
     28985-                    && xmc_turn_on(newLine[n - 1], newLine[n]))
     28986+                    && xmc_turn_on(SP_PARM, newLine[n - 1], newLine[n]))
     28987                    || (n == 0
     28988                        && lineno > 0
     28989-                       && xmc_turn_on(xmc_new(lineno - 1, screen_columns - 1),
     28990+                       && xmc_turn_on(SP_PARM,
     28991+                                      xmc_new(SP_PARM, lineno - 1,
     28992+                                              screen_columns(SP_PARM) - 1),
     28993                                       newLine[n])))) {
     28994                n = m;
     28995            }
     28996 
     28997-           PutChar(CHREF(newLine[n]));
     28998+           PutChar(NCURSES_SP_ARGx CHREF(newLine[n]));
     28999 
     29000            /* check for turn-off:
     29001             * If we are writing an attributed non-blank, where the
     29002             * next cell is blank, and not attributed.
     29003             */
     29004            if (!ISBLANK(newLine[n])
     29005-               && ((n + 1 < screen_columns
     29006-                    && xmc_turn_off(newLine[n], newLine[n + 1]))
     29007-                   || (n + 1 >= screen_columns
     29008-                       && lineno + 1 < screen_lines
     29009-                       && xmc_turn_off(newLine[n], xmc_new(lineno + 1, 0))))) {
     29010+               && ((n + 1 < screen_columns(SP_PARM)
     29011+                    && xmc_turn_off(SP_PARM, newLine[n], newLine[n + 1]))
     29012+                   || (n + 1 >= screen_columns(SP_PARM)
     29013+                       && lineno + 1 < screen_lines(SP_PARM)
     29014+                       && xmc_turn_off(SP_PARM,
     29015+                                       newLine[n],
     29016+                                       xmc_new(SP_PARM, lineno + 1, 0))))) {
     29017                n = m;
     29018            }
     29019 
     29020@@ -1246,38 +1334,42 @@
     29021 
     29022        /* it may be cheap to clear leading whitespace with clr_bol */
     29023        blank = newLine[0];
     29024-       if (clr_bol && can_clear_with(CHREF(blank))) {
     29025+       if (clr_bol && can_clear_with(NCURSES_SP_ARGx CHREF(blank))) {
     29026            int oFirstChar, nFirstChar;
     29027 
     29028-           for (oFirstChar = 0; oFirstChar < screen_columns; oFirstChar++)
     29029+           for (oFirstChar = 0;
     29030+                oFirstChar < screen_columns(SP_PARM);
     29031+                oFirstChar++)
     29032                if (!CharEq(oldLine[oFirstChar], blank))
     29033                    break;
     29034-           for (nFirstChar = 0; nFirstChar < screen_columns; nFirstChar++)
     29035+           for (nFirstChar = 0;
     29036+                nFirstChar < screen_columns(SP_PARM);
     29037+                nFirstChar++)
     29038                if (!CharEq(newLine[nFirstChar], blank))
     29039                    break;
     29040 
     29041            if (nFirstChar == oFirstChar) {
     29042                firstChar = nFirstChar;
     29043                /* find the first differing character */
     29044-               while (firstChar < screen_columns
     29045+               while (firstChar < screen_columns(SP_PARM)
     29046                       && CharEq(newLine[firstChar], oldLine[firstChar]))
     29047                    firstChar++;
     29048            } else if (oFirstChar > nFirstChar) {
     29049                firstChar = nFirstChar;
     29050            } else {            /* oFirstChar < nFirstChar */
     29051                firstChar = oFirstChar;
     29052-               if (SP->_el1_cost < nFirstChar - oFirstChar) {
     29053-                   if (nFirstChar >= screen_columns
     29054-                       && SP->_el_cost <= SP->_el1_cost) {
     29055-                       GoTo(lineno, 0);
     29056-                       UpdateAttrs(blank);
     29057+               if (SP_PARM->_el1_cost < nFirstChar - oFirstChar) {
     29058+                   if (nFirstChar >= screen_columns(SP_PARM)
     29059+                       && SP_PARM->_el_cost <= SP_PARM->_el1_cost) {
     29060+                       GoTo(NCURSES_SP_ARGx lineno, 0);
     29061+                       UpdateAttrs(SP_PARM, blank);
     29062                        TPUTS_TRACE("clr_eol");
     29063-                       putp(clr_eol);
     29064+                       NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx clr_eol);
     29065                    } else {
     29066-                       GoTo(lineno, nFirstChar - 1);
     29067-                       UpdateAttrs(blank);
     29068+                       GoTo(NCURSES_SP_ARGx lineno, nFirstChar - 1);
     29069+                       UpdateAttrs(SP_PARM, blank);
     29070                        TPUTS_TRACE("clr_bol");
     29071-                       putp(clr_bol);
     29072+                       NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx clr_bol);
     29073                    }
     29074 
     29075                    while (firstChar < nFirstChar)
     29076@@ -1286,29 +1378,34 @@
     29077            }
     29078        } else {
     29079            /* find the first differing character */
     29080-           while (firstChar < screen_columns
     29081+           while (firstChar < screen_columns(SP_PARM)
     29082                   && CharEq(newLine[firstChar], oldLine[firstChar]))
     29083                firstChar++;
     29084        }
     29085        /* if there wasn't one, we're done */
     29086-       if (firstChar >= screen_columns) {
     29087+       if (firstChar >= screen_columns(SP_PARM)) {
     29088            TR(TRACE_UPDATE, (T_RETURN("")));
     29089            return;
     29090        }
     29091 
     29092-       blank = newLine[screen_columns - 1];
     29093+       blank = newLine[screen_columns(SP_PARM) - 1];
     29094 
     29095-       if (!can_clear_with(CHREF(blank))) {
     29096+       if (!can_clear_with(NCURSES_SP_ARGx CHREF(blank))) {
     29097            /* find the last differing character */
     29098-           nLastChar = screen_columns - 1;
     29099+           nLastChar = screen_columns(SP_PARM) - 1;
     29100 
     29101            while (nLastChar > firstChar
     29102                   && CharEq(newLine[nLastChar], oldLine[nLastChar]))
     29103                nLastChar--;
     29104 
     29105            if (nLastChar >= firstChar) {
     29106-               GoTo(lineno, firstChar);
     29107-               PutRange(oldLine, newLine, lineno, firstChar, nLastChar);
     29108+               GoTo(NCURSES_SP_ARGx lineno, firstChar);
     29109+               PutRange(NCURSES_SP_ARGx
     29110+                        oldLine,
     29111+                        newLine,
     29112+                        lineno,
     29113+                        firstChar,
     29114+                        nLastChar);
     29115                memcpy(oldLine + firstChar,
     29116                       newLine + firstChar,
     29117                       (nLastChar - firstChar + 1) * sizeof(NCURSES_CH_T));
     29118@@ -1318,32 +1415,43 @@
     29119        }
     29120 
     29121        /* find last non-blank character on old line */
     29122-       oLastChar = screen_columns - 1;
     29123+       oLastChar = screen_columns(SP_PARM) - 1;
     29124        while (oLastChar > firstChar && CharEq(oldLine[oLastChar], blank))
     29125            oLastChar--;
     29126 
     29127        /* find last non-blank character on new line */
     29128-       nLastChar = screen_columns - 1;
     29129+       nLastChar = screen_columns(SP_PARM) - 1;
     29130        while (nLastChar > firstChar && CharEq(newLine[nLastChar], blank))
     29131            nLastChar--;
     29132 
     29133        if ((nLastChar == firstChar)
     29134-           && (SP->_el_cost < (oLastChar - nLastChar))) {
     29135-           GoTo(lineno, firstChar);
     29136+           && (SP_PARM->_el_cost < (oLastChar - nLastChar))) {
     29137+           GoTo(NCURSES_SP_ARGx lineno, firstChar);
     29138            if (!CharEq(newLine[firstChar], blank))
     29139-               PutChar(CHREF(newLine[firstChar]));
     29140-           ClrToEOL(blank, FALSE);
     29141+               PutChar(NCURSES_SP_ARGx CHREF(newLine[firstChar]));
     29142+           ClrToEOL(NCURSES_SP_ARGx blank, FALSE);
     29143        } else if ((nLastChar != oLastChar)
     29144                   && (!CharEq(newLine[nLastChar], oldLine[oLastChar])
     29145                       || !(_nc_idcok && has_ic()))) {
     29146-           GoTo(lineno, firstChar);
     29147-           if ((oLastChar - nLastChar) > SP->_el_cost) {
     29148-               if (PutRange(oldLine, newLine, lineno, firstChar, nLastChar))
     29149-                   GoTo(lineno, nLastChar + 1);
     29150-               ClrToEOL(blank, FALSE);
     29151+           GoTo(NCURSES_SP_ARGx lineno, firstChar);
     29152+           if ((oLastChar - nLastChar) > SP_PARM->_el_cost) {
     29153+               if (PutRange(NCURSES_SP_ARGx
     29154+                            oldLine,
     29155+                            newLine,
     29156+                            lineno,
     29157+                            firstChar,
     29158+                            nLastChar)) {
     29159+                   GoTo(NCURSES_SP_ARGx lineno, nLastChar + 1);
     29160+               }
     29161+               ClrToEOL(NCURSES_SP_ARGx blank, FALSE);
     29162            } else {
     29163                n = max(nLastChar, oLastChar);
     29164-               PutRange(oldLine, newLine, lineno, firstChar, n);
     29165+               PutRange(NCURSES_SP_ARGx
     29166+                        oldLine,
     29167+                        newLine,
     29168+                        lineno,
     29169+                        firstChar,
     29170+                        n);
     29171            }
     29172        } else {
     29173            int nLastNonblank = nLastChar;
     29174@@ -1364,8 +1472,13 @@
     29175 
     29176            n = min(oLastChar, nLastChar);
     29177            if (n >= firstChar) {
     29178-               GoTo(lineno, firstChar);
     29179-               PutRange(oldLine, newLine, lineno, firstChar, n);
     29180+               GoTo(NCURSES_SP_ARGx lineno, firstChar);
     29181+               PutRange(NCURSES_SP_ARGx
     29182+                        oldLine,
     29183+                        newLine,
     29184+                        lineno,
     29185+                        firstChar,
     29186+                        n);
     29187            }
     29188 
     29189            if (oLastChar < nLastChar) {
     29190@@ -1376,21 +1489,26 @@
     29191                    --oLastChar;
     29192                }
     29193 #endif
     29194-               GoTo(lineno, n + 1);
     29195+               GoTo(NCURSES_SP_ARGx lineno, n + 1);
     29196                if ((nLastChar < nLastNonblank)
     29197-                   || InsCharCost(nLastChar - oLastChar) > (m - n)) {
     29198-                   PutRange(oldLine, newLine, lineno, n + 1, m);
     29199+                   || InsCharCost(SP_PARM, nLastChar - oLastChar) > (m - n)) {
     29200+                   PutRange(NCURSES_SP_ARGx
     29201+                            oldLine,
     29202+                            newLine,
     29203+                            lineno,
     29204+                            n + 1,
     29205+                            m);
     29206                } else {
     29207-                   InsStr(&newLine[n + 1], nLastChar - oLastChar);
     29208+                   InsStr(NCURSES_SP_ARGx &newLine[n + 1], nLastChar - oLastChar);
     29209                }
     29210            } else if (oLastChar > nLastChar) {
     29211-               GoTo(lineno, n + 1);
     29212-               if (DelCharCost(oLastChar - nLastChar)
     29213-                   > SP->_el_cost + nLastNonblank - (n + 1)) {
     29214-                   if (PutRange(oldLine, newLine, lineno,
     29215+               GoTo(NCURSES_SP_ARGx lineno, n + 1);
     29216+               if (DelCharCost(SP_PARM, oLastChar - nLastChar)
     29217+                   > SP_PARM->_el_cost + nLastNonblank - (n + 1)) {
     29218+                   if (PutRange(NCURSES_SP_ARGx oldLine, newLine, lineno,
     29219                                 n + 1, nLastNonblank))
     29220-                       GoTo(lineno, nLastNonblank + 1);
     29221-                   ClrToEOL(blank, FALSE);
     29222+                         GoTo(NCURSES_SP_ARGx lineno, nLastNonblank + 1);
     29223+                   ClrToEOL(NCURSES_SP_ARGx blank, FALSE);
     29224                } else {
     29225                    /*
     29226                     * The delete-char sequence will
     29227@@ -1400,18 +1518,18 @@
     29228                     * setting the video attributes from
     29229                     * the last character on the row.
     29230                     */
     29231-                   UpdateAttrs(blank);
     29232-                   DelChar(oLastChar - nLastChar);
     29233+                   UpdateAttrs(SP_PARM, blank);
     29234+                   DelChar(NCURSES_SP_ARGx oLastChar - nLastChar);
     29235                }
     29236            }
     29237        }
     29238     }
     29239 
     29240     /* update the code's internal representation */
     29241-    if (screen_columns > firstChar)
     29242+    if (screen_columns(SP_PARM) > firstChar)
     29243        memcpy(oldLine + firstChar,
     29244               newLine + firstChar,
     29245-              (screen_columns - firstChar) * sizeof(NCURSES_CH_T));
     29246+              (screen_columns(SP_PARM) - firstChar) * sizeof(NCURSES_CH_T));
     29247     TR(TRACE_UPDATE, (T_RETURN("")));
     29248     return;
     29249 }
     29250@@ -1424,7 +1542,7 @@
     29251 */
     29252 
     29253 static void
     29254-ClearScreen(NCURSES_CH_T blank)
     29255+ClearScreen(NCURSES_SP_DCLx NCURSES_CH_T blank)
     29256 {
     29257     int i, j;
     29258     bool fast_clear = (clear_screen || clr_eos || clr_eol);
     29259@@ -1432,9 +1550,13 @@
     29260     TR(TRACE_UPDATE, ("ClearScreen() called"));
     29261 
     29262 #if NCURSES_EXT_FUNCS
     29263-    if (SP->_coloron
     29264-       && !SP->_default_color) {
     29265-       _nc_do_color(GET_SCREEN_PAIR(SP), 0, FALSE, _nc_outch);
     29266+    if (SP_PARM->_coloron
     29267+       && !SP_PARM->_default_color) {
     29268+       NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_ARGx
     29269+                                      GET_SCREEN_PAIR(SP_PARM),
     29270+                                      0,
     29271+                                      FALSE,
     29272+                                      NCURSES_SP_NAME(_nc_outch));
     29273        if (!back_color_erase) {
     29274            fast_clear = FALSE;
     29275        }
     29276@@ -1443,42 +1565,48 @@
     29277 
     29278     if (fast_clear) {
     29279        if (clear_screen) {
     29280-           UpdateAttrs(blank);
     29281+           UpdateAttrs(SP_PARM, blank);
     29282            TPUTS_TRACE("clear_screen");
     29283-           putp(clear_screen);
     29284-           SP->_cursrow = SP->_curscol = 0;
     29285-           position_check(SP->_cursrow, SP->_curscol, "ClearScreen");
     29286+           NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx clear_screen);
     29287+           SP_PARM->_cursrow = SP_PARM->_curscol = 0;
     29288+           position_check(SP_PARM,
     29289+                          SP_PARM->_cursrow,
     29290+                          SP_PARM->_curscol,
     29291+                          "ClearScreen");
     29292        } else if (clr_eos) {
     29293-           SP->_cursrow = SP->_curscol = -1;
     29294-           GoTo(0, 0);
     29295+           SP_PARM->_cursrow = SP_PARM->_curscol = -1;
     29296+           GoTo(NCURSES_SP_ARGx 0, 0);
     29297 
     29298-           UpdateAttrs(blank);
     29299+           UpdateAttrs(SP_PARM, blank);
     29300            TPUTS_TRACE("clr_eos");
     29301-           tputs(clr_eos, screen_lines, _nc_outch);
     29302+           NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     29303+                                   clr_eos,
     29304+                                   screen_lines(SP_PARM),
     29305+                                   NCURSES_SP_NAME(_nc_outch));
     29306        } else if (clr_eol) {
     29307-           SP->_cursrow = SP->_curscol = -1;
     29308+           SP_PARM->_cursrow = SP_PARM->_curscol = -1;
     29309 
     29310-           UpdateAttrs(blank);
     29311-           for (i = 0; i < screen_lines; i++) {
     29312-               GoTo(i, 0);
     29313+           UpdateAttrs(SP_PARM, blank);
     29314+           for (i = 0; i < screen_lines(SP_PARM); i++) {
     29315+               GoTo(NCURSES_SP_ARGx i, 0);
     29316                TPUTS_TRACE("clr_eol");
     29317-               putp(clr_eol);
     29318+               NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx clr_eol);
     29319            }
     29320-           GoTo(0, 0);
     29321+           GoTo(NCURSES_SP_ARGx 0, 0);
     29322        }
     29323     } else {
     29324-       UpdateAttrs(blank);
     29325-       for (i = 0; i < screen_lines; i++) {
     29326-           GoTo(i, 0);
     29327-           for (j = 0; j < screen_columns; j++)
     29328-               PutChar(CHREF(blank));
     29329-       }
     29330-       GoTo(0, 0);
     29331+       UpdateAttrs(SP_PARM, blank);
     29332+       for (i = 0; i < screen_lines(SP_PARM); i++) {
     29333+           GoTo(NCURSES_SP_ARGx i, 0);
     29334+           for (j = 0; j < screen_columns(SP_PARM); j++)
     29335+               PutChar(NCURSES_SP_ARGx CHREF(blank));
     29336+       }
     29337+       GoTo(NCURSES_SP_ARGx 0, 0);
     29338     }
     29339 
     29340-    for (i = 0; i < screen_lines; i++) {
     29341-       for (j = 0; j < screen_columns; j++)
     29342-           curscr->_line[i].text[j] = blank;
     29343+    for (i = 0; i < screen_lines(SP_PARM); i++) {
     29344+       for (j = 0; j < screen_columns(SP_PARM); j++)
     29345+           CurScreen(SP_PARM)->_line[i].text[j] = blank;
     29346     }
     29347 
     29348     TR(TRACE_UPDATE, ("screen cleared"));
     29349@@ -1492,49 +1620,52 @@
     29350 */
     29351 
     29352 static void
     29353-InsStr(NCURSES_CH_T * line, int count)
     29354+InsStr(NCURSES_SP_DCLx NCURSES_CH_T * line, int count)
     29355 {
     29356-    TR(TRACE_UPDATE, ("InsStr(%p,%d) called", line, count));
     29357+    TR(TRACE_UPDATE, ("InsStr(%p, %p,%d) called", SP_PARM, line, count));
     29358 
     29359     /* Prefer parm_ich as it has the smallest cost - no need to shift
     29360      * the whole line on each character. */
     29361     /* The order must match that of InsCharCost. */
     29362     if (parm_ich) {
     29363        TPUTS_TRACE("parm_ich");
     29364-       tputs(TPARM_1(parm_ich, count), count, _nc_outch);
     29365+       NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     29366+                               TPARM_1(parm_ich, count),
     29367+                               count,
     29368+                               NCURSES_SP_NAME(_nc_outch));
     29369        while (count) {
     29370-           PutAttrChar(CHREF(*line));
     29371+           PutAttrChar(NCURSES_SP_ARGx CHREF(*line));
     29372            line++;
     29373            count--;
     29374        }
     29375     } else if (enter_insert_mode && exit_insert_mode) {
     29376        TPUTS_TRACE("enter_insert_mode");
     29377-       putp(enter_insert_mode);
     29378+       NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx enter_insert_mode);
     29379        while (count) {
     29380-           PutAttrChar(CHREF(*line));
     29381+           PutAttrChar(NCURSES_SP_ARGx CHREF(*line));
     29382            if (insert_padding) {
     29383                TPUTS_TRACE("insert_padding");
     29384-               putp(insert_padding);
     29385+               NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_padding);
     29386            }
     29387            line++;
     29388            count--;
     29389        }
     29390        TPUTS_TRACE("exit_insert_mode");
     29391-       putp(exit_insert_mode);
     29392+       NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_insert_mode);
     29393     } else {
     29394        while (count) {
     29395            TPUTS_TRACE("insert_character");
     29396-           putp(insert_character);
     29397-           PutAttrChar(CHREF(*line));
     29398+           NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_character);
     29399+           PutAttrChar(NCURSES_SP_ARGx CHREF(*line));
     29400            if (insert_padding) {
     29401                TPUTS_TRACE("insert_padding");
     29402-               putp(insert_padding);
     29403+               NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_padding);
     29404            }
     29405            line++;
     29406            count--;
     29407        }
     29408     }
     29409-    position_check(SP->_cursrow, SP->_curscol, "InsStr");
     29410+    position_check(SP_PARM, SP_PARM->_cursrow, SP_PARM->_curscol, "InsStr");
     29411 }
     29412 
     29413 /*
     29414@@ -1545,22 +1676,25 @@
     29415 */
     29416 
     29417 static void
     29418-DelChar(int count)
     29419+DelChar(NCURSES_SP_DCLx int count)
     29420 {
     29421     int n;
     29422 
     29423-    TR(TRACE_UPDATE, ("DelChar(%d) called, position = (%ld,%ld)",
     29424-                     count,
     29425-                     (long) newscr->_cury,
     29426-                     (long) newscr->_curx));
     29427+    TR(TRACE_UPDATE, ("DelChar(%p, %d) called, position = (%ld,%ld)",
     29428+                     SP_PARM, count,
     29429+                     (long) NewScreen(SP_PARM)->_cury,
     29430+                     (long) NewScreen(SP_PARM)->_curx));
     29431 
     29432     if (parm_dch) {
     29433        TPUTS_TRACE("parm_dch");
     29434-       tputs(TPARM_1(parm_dch, count), count, _nc_outch);
     29435+       NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     29436+                               TPARM_1(parm_dch, count),
     29437+                               count,
     29438+                               NCURSES_SP_NAME(_nc_outch));
     29439     } else {
     29440        for (n = 0; n < count; n++) {
     29441            TPUTS_TRACE("delete_character");
     29442-           putp(delete_character);
     29443+           NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx delete_character);
     29444        }
     29445     }
     29446 }
     29447@@ -1599,54 +1733,66 @@
     29448 
     29449 /* Try to scroll up assuming given csr (miny, maxy). Returns ERR on failure */
     29450 static int
     29451-scroll_csr_forward(int n, int top, int bot, int miny, int maxy, NCURSES_CH_T blank)
     29452+scroll_csr_forward(NCURSES_SP_DCLx
     29453+                  int n,
     29454+                  int top,
     29455+                  int bot,
     29456+                  int miny,
     29457+                  int maxy,
     29458+                  NCURSES_CH_T blank)
     29459 {
     29460     int i;
     29461 
     29462     if (n == 1 && scroll_forward && top == miny && bot == maxy) {
     29463-       GoTo(bot, 0);
     29464-       UpdateAttrs(blank);
     29465+       GoTo(NCURSES_SP_ARGx bot, 0);
     29466+       UpdateAttrs(SP_PARM, blank);
     29467        TPUTS_TRACE("scroll_forward");
     29468-       putp(scroll_forward);
     29469+       NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx scroll_forward);
     29470     } else if (n == 1 && delete_line && bot == maxy) {
     29471-       GoTo(top, 0);
     29472-       UpdateAttrs(blank);
     29473+       GoTo(NCURSES_SP_ARGx top, 0);
     29474+       UpdateAttrs(SP_PARM, blank);
     29475        TPUTS_TRACE("delete_line");
     29476-       putp(delete_line);
     29477+       NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx delete_line);
     29478     } else if (parm_index && top == miny && bot == maxy) {
     29479-       GoTo(bot, 0);
     29480-       UpdateAttrs(blank);
     29481+       GoTo(NCURSES_SP_ARGx bot, 0);
     29482+       UpdateAttrs(SP_PARM, blank);
     29483        TPUTS_TRACE("parm_index");
     29484-       tputs(TPARM_2(parm_index, n, 0), n, _nc_outch);
     29485+       NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     29486+                               TPARM_2(parm_index, n, 0),
     29487+                               n,
     29488+                               NCURSES_SP_NAME(_nc_outch));
     29489     } else if (parm_delete_line && bot == maxy) {
     29490-       GoTo(top, 0);
     29491-       UpdateAttrs(blank);
     29492+       GoTo(NCURSES_SP_ARGx top, 0);
     29493+       UpdateAttrs(SP_PARM, blank);
     29494        TPUTS_TRACE("parm_delete_line");
     29495-       tputs(TPARM_2(parm_delete_line, n, 0), n, _nc_outch);
     29496+       NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     29497+                               TPARM_2(parm_delete_line, n, 0),
     29498+                               n,
     29499+                               NCURSES_SP_NAME(_nc_outch));
     29500     } else if (scroll_forward && top == miny && bot == maxy) {
     29501-       GoTo(bot, 0);
     29502-       UpdateAttrs(blank);
     29503+       GoTo(NCURSES_SP_ARGx bot, 0);
     29504+       UpdateAttrs(SP_PARM, blank);
     29505        for (i = 0; i < n; i++) {
     29506            TPUTS_TRACE("scroll_forward");
     29507-           putp(scroll_forward);
     29508+           NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx scroll_forward);
     29509        }
     29510     } else if (delete_line && bot == maxy) {
     29511-       GoTo(top, 0);
     29512-       UpdateAttrs(blank);
     29513+       GoTo(NCURSES_SP_ARGx top, 0);
     29514+       UpdateAttrs(SP_PARM, blank);
     29515        for (i = 0; i < n; i++) {
     29516            TPUTS_TRACE("delete_line");
     29517-           putp(delete_line);
     29518+           NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx delete_line);
     29519        }
     29520     } else
     29521        return ERR;
     29522 
     29523 #if NCURSES_EXT_FUNCS
     29524-    if (FILL_BCE()) {
     29525+    if (FILL_BCE(SP_PARM)) {
     29526        int j;
     29527        for (i = 0; i < n; i++) {
     29528-           GoTo(bot - i, 0);
     29529-           for (j = 0; j < screen_columns; j++)
     29530-               PutChar(CHREF(blank));
     29531+           GoTo(NCURSES_SP_ARGx bot - i, 0);
     29532+           for (j = 0; j < screen_columns(SP_PARM); j++)
     29533+               PutChar(NCURSES_SP_ARGx CHREF(blank));
     29534        }
     29535     }
     29536 #endif
     29537@@ -1656,55 +1802,66 @@
     29538 /* Try to scroll down assuming given csr (miny, maxy). Returns ERR on failure */
     29539 /* n > 0 */
     29540 static int
     29541-scroll_csr_backward(int n, int top, int bot, int miny, int maxy,
     29542+scroll_csr_backward(NCURSES_SP_DCLx
     29543+                   int n,
     29544+                   int top,
     29545+                   int bot,
     29546+                   int miny,
     29547+                   int maxy,
     29548                    NCURSES_CH_T blank)
     29549 {
     29550     int i;
     29551 
     29552     if (n == 1 && scroll_reverse && top == miny && bot == maxy) {
     29553-       GoTo(top, 0);
     29554-       UpdateAttrs(blank);
     29555+       GoTo(NCURSES_SP_ARGx top, 0);
     29556+       UpdateAttrs(SP_PARM, blank);
     29557        TPUTS_TRACE("scroll_reverse");
     29558-       putp(scroll_reverse);
     29559+       NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx scroll_reverse);
     29560     } else if (n == 1 && insert_line && bot == maxy) {
     29561-       GoTo(top, 0);
     29562-       UpdateAttrs(blank);
     29563+       GoTo(NCURSES_SP_ARGx top, 0);
     29564+       UpdateAttrs(SP_PARM, blank);
     29565        TPUTS_TRACE("insert_line");
     29566-       putp(insert_line);
     29567+       NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_line);
     29568     } else if (parm_rindex && top == miny && bot == maxy) {
     29569-       GoTo(top, 0);
     29570-       UpdateAttrs(blank);
     29571+       GoTo(NCURSES_SP_ARGx top, 0);
     29572+       UpdateAttrs(SP_PARM, blank);
     29573        TPUTS_TRACE("parm_rindex");
     29574-       tputs(TPARM_2(parm_rindex, n, 0), n, _nc_outch);
     29575+       NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     29576+                               TPARM_2(parm_rindex, n, 0),
     29577+                               n,
     29578+                               NCURSES_SP_NAME(_nc_outch));
     29579     } else if (parm_insert_line && bot == maxy) {
     29580-       GoTo(top, 0);
     29581-       UpdateAttrs(blank);
     29582+       GoTo(NCURSES_SP_ARGx top, 0);
     29583+       UpdateAttrs(SP_PARM, blank);
     29584        TPUTS_TRACE("parm_insert_line");
     29585-       tputs(TPARM_2(parm_insert_line, n, 0), n, _nc_outch);
     29586+       NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     29587+                               TPARM_2(parm_insert_line, n, 0),
     29588+                               n,
     29589+                               NCURSES_SP_NAME(_nc_outch));
     29590     } else if (scroll_reverse && top == miny && bot == maxy) {
     29591-       GoTo(top, 0);
     29592-       UpdateAttrs(blank);
     29593+       GoTo(NCURSES_SP_ARGx top, 0);
     29594+       UpdateAttrs(SP_PARM, blank);
     29595        for (i = 0; i < n; i++) {
     29596            TPUTS_TRACE("scroll_reverse");
     29597-           putp(scroll_reverse);
     29598+           NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx scroll_reverse);
     29599        }
     29600     } else if (insert_line && bot == maxy) {
     29601-       GoTo(top, 0);
     29602-       UpdateAttrs(blank);
     29603+       GoTo(NCURSES_SP_ARGx top, 0);
     29604+       UpdateAttrs(SP_PARM, blank);
     29605        for (i = 0; i < n; i++) {
     29606            TPUTS_TRACE("insert_line");
     29607-           putp(insert_line);
     29608+           NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_line);
     29609        }
     29610     } else
     29611        return ERR;
     29612 
     29613 #if NCURSES_EXT_FUNCS
     29614-    if (FILL_BCE()) {
     29615+    if (FILL_BCE(SP_PARM)) {
     29616        int j;
     29617        for (i = 0; i < n; i++) {
     29618-           GoTo(top + i, 0);
     29619-           for (j = 0; j < screen_columns; j++)
     29620-               PutChar(CHREF(blank));
     29621+           GoTo(NCURSES_SP_ARGx top + i, 0);
     29622+           for (j = 0; j < screen_columns(SP_PARM); j++)
     29623+               PutChar(NCURSES_SP_ARGx CHREF(blank));
     29624        }
     29625     }
     29626 #endif
     29627@@ -1714,40 +1871,46 @@
     29628 /* scroll by using delete_line at del and insert_line at ins */
     29629 /* n > 0 */
     29630 static int
     29631-scroll_idl(int n, int del, int ins, NCURSES_CH_T blank)
     29632+scroll_idl(NCURSES_SP_DCLx int n, int del, int ins, NCURSES_CH_T blank)
     29633 {
     29634     int i;
     29635 
     29636     if (!((parm_delete_line || delete_line) && (parm_insert_line || insert_line)))
     29637        return ERR;
     29638 
     29639-    GoTo(del, 0);
     29640-    UpdateAttrs(blank);
     29641+    GoTo(NCURSES_SP_ARGx del, 0);
     29642+    UpdateAttrs(SP_PARM, blank);
     29643     if (n == 1 && delete_line) {
     29644        TPUTS_TRACE("delete_line");
     29645-       putp(delete_line);
     29646+       NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx delete_line);
     29647     } else if (parm_delete_line) {
     29648        TPUTS_TRACE("parm_delete_line");
     29649-       tputs(TPARM_2(parm_delete_line, n, 0), n, _nc_outch);
     29650+       NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     29651+                               TPARM_2(parm_delete_line, n, 0),
     29652+                               n,
     29653+                               NCURSES_SP_NAME(_nc_outch));
     29654     } else {                   /* if (delete_line) */
     29655        for (i = 0; i < n; i++) {
     29656            TPUTS_TRACE("delete_line");
     29657-           putp(delete_line);
     29658+           NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx delete_line);
     29659        }
     29660     }
     29661 
     29662-    GoTo(ins, 0);
     29663-    UpdateAttrs(blank);
     29664+    GoTo(NCURSES_SP_ARGx ins, 0);
     29665+    UpdateAttrs(SP_PARM, blank);
     29666     if (n == 1 && insert_line) {
     29667        TPUTS_TRACE("insert_line");
     29668-       putp(insert_line);
     29669+       NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_line);
     29670     } else if (parm_insert_line) {
     29671        TPUTS_TRACE("parm_insert_line");
     29672-       tputs(TPARM_2(parm_insert_line, n, 0), n, _nc_outch);
     29673+       NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     29674+                               TPARM_2(parm_insert_line, n, 0),
     29675+                               n,
     29676+                               NCURSES_SP_NAME(_nc_outch));
     29677     } else {                   /* if (insert_line) */
     29678        for (i = 0; i < n; i++) {
     29679            TPUTS_TRACE("insert_line");
     29680-           putp(insert_line);
     29681+           NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx insert_line);
     29682        }
     29683     }
     29684 
     29685@@ -1763,10 +1926,14 @@
     29686  * save/restore cursor capabilities if the terminal has them.
     29687  */
     29688 NCURSES_EXPORT(int)
     29689-_nc_scrolln(int n, int top, int bot, int maxy)
     29690+NCURSES_SP_NAME(_nc_scrolln) (NCURSES_SP_DCLx
     29691+                             int n,
     29692+                             int top,
     29693+                             int bot,
     29694+                             int maxy)
     29695 /* scroll region from top to bot by n lines */
     29696 {
     29697-    NCURSES_CH_T blank = ClrBlank(stdscr);
     29698+    NCURSES_CH_T blank = ClrBlank(NCURSES_SP_ARGx StdScreen(SP_PARM));
     29699     int i;
     29700     bool cursor_saved = FALSE;
     29701     int res;
     29702@@ -1787,34 +1954,36 @@
     29703         * Explicitly clear if stuff pushed off top of region might
     29704         * be saved by the terminal.
     29705         */
     29706-       res = scroll_csr_forward(n, top, bot, 0, maxy, blank);
     29707+       res = scroll_csr_forward(NCURSES_SP_ARGx n, top, bot, 0, maxy, blank);
     29708 
     29709        if (res == ERR && change_scroll_region) {
     29710            if ((((n == 1 && scroll_forward) || parm_index)
     29711-                && (SP->_cursrow == bot || SP->_cursrow == bot - 1))
     29712+                && (SP_PARM->_cursrow == bot || SP_PARM->_cursrow == bot - 1))
     29713                && save_cursor && restore_cursor) {
     29714                cursor_saved = TRUE;
     29715                TPUTS_TRACE("save_cursor");
     29716-               putp(save_cursor);
     29717+               NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx save_cursor);
     29718            }
     29719            TPUTS_TRACE("change_scroll_region");
     29720-           putp(TPARM_2(change_scroll_region, top, bot));
     29721+           NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx
     29722+                                  TPARM_2(change_scroll_region, top, bot));
     29723            if (cursor_saved) {
     29724                TPUTS_TRACE("restore_cursor");
     29725-               putp(restore_cursor);
     29726+               NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx restore_cursor);
     29727            } else {
     29728-               SP->_cursrow = SP->_curscol = -1;
     29729+               SP_PARM->_cursrow = SP_PARM->_curscol = -1;
     29730            }
     29731 
     29732-           res = scroll_csr_forward(n, top, bot, top, bot, blank);
     29733+           res = scroll_csr_forward(NCURSES_SP_ARGx n, top, bot, top, bot, blank);
     29734 
     29735            TPUTS_TRACE("change_scroll_region");
     29736-           putp(TPARM_2(change_scroll_region, 0, maxy));
     29737-           SP->_cursrow = SP->_curscol = -1;
     29738+           NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx
     29739+                                  TPARM_2(change_scroll_region, 0, maxy));
     29740+           SP_PARM->_cursrow = SP_PARM->_curscol = -1;
     29741        }
     29742 
     29743        if (res == ERR && _nc_idlok)
     29744-           res = scroll_idl(n, top, bot - n + 1, blank);
     29745+           res = scroll_idl(NCURSES_SP_ARGx n, top, bot - n + 1, blank);
     29746 
     29747        /*
     29748         * Clear the newly shifted-in text.
     29749@@ -1823,44 +1992,49 @@
     29750            && (non_dest_scroll_region || (memory_below && bot == maxy))) {
     29751            static const NCURSES_CH_T blank2 = NewChar(BLANK_TEXT);
     29752            if (bot == maxy && clr_eos) {
     29753-               GoTo(bot - n + 1, 0);
     29754-               ClrToEOS(blank2);
     29755+               GoTo(NCURSES_SP_ARGx bot - n + 1, 0);
     29756+               ClrToEOS(NCURSES_SP_ARGx blank2);
     29757            } else {
     29758                for (i = 0; i < n; i++) {
     29759-                   GoTo(bot - i, 0);
     29760-                   ClrToEOL(blank2, FALSE);
     29761+                   GoTo(NCURSES_SP_ARGx bot - i, 0);
     29762+                   ClrToEOL(NCURSES_SP_ARGx blank2, FALSE);
     29763                }
     29764            }
     29765        }
     29766 
     29767     } else {                   /* (n < 0) - scroll down (backward) */
     29768-       res = scroll_csr_backward(-n, top, bot, 0, maxy, blank);
     29769+       res = scroll_csr_backward(NCURSES_SP_ARGx -n, top, bot, 0, maxy, blank);
     29770 
     29771        if (res == ERR && change_scroll_region) {
     29772-           if (top != 0 && (SP->_cursrow == top || SP->_cursrow == top - 1)
     29773+           if (top != 0
     29774+               && (SP_PARM->_cursrow == top ||
     29775+                   SP_PARM->_cursrow == top - 1)
     29776                && save_cursor && restore_cursor) {
     29777                cursor_saved = TRUE;
     29778                TPUTS_TRACE("save_cursor");
     29779-               putp(save_cursor);
     29780+               NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx save_cursor);
     29781            }
     29782            TPUTS_TRACE("change_scroll_region");
     29783-           putp(TPARM_2(change_scroll_region, top, bot));
     29784+           NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx
     29785+                                  TPARM_2(change_scroll_region, top, bot));
     29786            if (cursor_saved) {
     29787                TPUTS_TRACE("restore_cursor");
     29788-               putp(restore_cursor);
     29789+               NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx restore_cursor);
     29790            } else {
     29791-               SP->_cursrow = SP->_curscol = -1;
     29792+               SP_PARM->_cursrow = SP_PARM->_curscol = -1;
     29793            }
     29794 
     29795-           res = scroll_csr_backward(-n, top, bot, top, bot, blank);
     29796+           res = scroll_csr_backward(NCURSES_SP_ARGx
     29797+                                     -n, top, bot, top, bot, blank);
     29798 
     29799            TPUTS_TRACE("change_scroll_region");
     29800-           putp(TPARM_2(change_scroll_region, 0, maxy));
     29801-           SP->_cursrow = SP->_curscol = -1;
     29802+           NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx
     29803+                                  TPARM_2(change_scroll_region, 0, maxy));
     29804+           SP_PARM->_cursrow = SP_PARM->_curscol = -1;
     29805        }
     29806 
     29807        if (res == ERR && _nc_idlok)
     29808-           res = scroll_idl(-n, bot + n + 1, top, blank);
     29809+           res = scroll_idl(NCURSES_SP_ARGx -n, bot + n + 1, top, blank);
     29810 
     29811        /*
     29812         * Clear the newly shifted-in text.
     29813@@ -1869,8 +2043,8 @@
     29814            && (non_dest_scroll_region || (memory_above && top == 0))) {
     29815            static const NCURSES_CH_T blank2 = NewChar(BLANK_TEXT);
     29816            for (i = 0; i < -n; i++) {
     29817-               GoTo(i + top, 0);
     29818-               ClrToEOL(blank2, FALSE);
     29819+               GoTo(NCURSES_SP_ARGx i + top, 0);
     29820+               ClrToEOL(NCURSES_SP_ARGx blank2, FALSE);
     29821            }
     29822        }
     29823     }
     29824@@ -1878,99 +2052,156 @@
     29825     if (res == ERR)
     29826        return (ERR);
     29827 
     29828-    _nc_scroll_window(curscr, n, top, bot, blank);
     29829+    _nc_scroll_window(CurScreen(SP_PARM), n, top, bot, blank);
     29830 
     29831     /* shift hash values too - they can be reused */
     29832-    _nc_scroll_oldhash(n, top, bot);
     29833+    NCURSES_SP_NAME(_nc_scroll_oldhash) (NCURSES_SP_ARGx n, top, bot);
     29834 
     29835     return (OK);
     29836 }
     29837 
     29838+#if NCURSES_SP_FUNCS
     29839+NCURSES_EXPORT(int)
     29840+_nc_scrolln(int n, int top, int bot, int maxy)
     29841+{
     29842+    return NCURSES_SP_NAME(_nc_scrolln) (CURRENT_SCREEN, n, top, bot, maxy);
     29843+}
     29844+#endif
     29845+
     29846 NCURSES_EXPORT(void)
     29847-_nc_screen_resume(void)
     29848+NCURSES_SP_NAME(_nc_screen_resume) (NCURSES_SP_DCL0)
     29849 {
     29850+    assert(SP_PARM);
     29851+
     29852     /* make sure terminal is in a sane known state */
     29853-    SetAttr(SCREEN_ATTRS(SP), A_NORMAL);
     29854-    newscr->_clear = TRUE;
     29855+    SetAttr(SCREEN_ATTRS(SP_PARM), A_NORMAL);
     29856+    NewScreen(SP_PARM)->_clear = TRUE;
     29857 
     29858     /* reset color pairs and definitions */
     29859-    if (SP->_coloron || SP->_color_defs)
     29860+    if (SP_PARM->_coloron || SP_PARM->_color_defs)
     29861        _nc_reset_colors();
     29862 
     29863     /* restore user-defined colors, if any */
     29864-    if (SP->_color_defs < 0) {
     29865+    if (SP_PARM->_color_defs < 0) {
     29866        int n;
     29867-       SP->_color_defs = -(SP->_color_defs);
     29868-       for (n = 0; n < SP->_color_defs; ++n) {
     29869-           if (SP->_color_table[n].init) {
     29870-               init_color(n,
     29871-                          SP->_color_table[n].r,
     29872-                          SP->_color_table[n].g,
     29873-                          SP->_color_table[n].b);
     29874+       SP_PARM->_color_defs = -(SP_PARM->_color_defs);
     29875+       for (n = 0; n < SP_PARM->_color_defs; ++n) {
     29876+           if (SP_PARM->_color_table[n].init) {
     29877+               NCURSES_SP_NAME(init_color) (NCURSES_SP_ARGx n,
     29878+                                            SP_PARM->_color_table[n].r,
     29879+                                            SP_PARM->_color_table[n].g,
     29880+                                            SP_PARM->_color_table[n].b);
     29881            }
     29882        }
     29883     }
     29884 
     29885     if (exit_attribute_mode)
     29886-       putp(exit_attribute_mode);
     29887+       NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_attribute_mode);
     29888     else {
     29889        /* turn off attributes */
     29890        if (exit_alt_charset_mode)
     29891-           putp(exit_alt_charset_mode);
     29892+           NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_alt_charset_mode);
     29893        if (exit_standout_mode)
     29894-           putp(exit_standout_mode);
     29895+           NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_standout_mode);
     29896        if (exit_underline_mode)
     29897-           putp(exit_underline_mode);
     29898+           NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_underline_mode);
     29899     }
     29900     if (exit_insert_mode)
     29901-       putp(exit_insert_mode);
     29902+       NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx exit_insert_mode);
     29903     if (enter_am_mode && exit_am_mode)
     29904-       putp(auto_right_margin ? enter_am_mode : exit_am_mode);
     29905+       NCURSES_SP_NAME(putp) (NCURSES_SP_ARGx
     29906+                              (auto_right_margin
     29907+                               ? enter_am_mode
     29908+                               : exit_am_mode));
     29909 }
     29910 
     29911+#if NCURSES_SP_FUNCS
     29912+NCURSES_EXPORT(void)
     29913+_nc_screen_resume(void)
     29914+{
     29915+    NCURSES_SP_NAME(_nc_screen_resume) (CURRENT_SCREEN);
     29916+}
     29917+#endif
     29918+
     29919+NCURSES_EXPORT(void)
     29920+NCURSES_SP_NAME(_nc_screen_init) (NCURSES_SP_DCL0)
     29921+{
     29922+    NCURSES_SP_NAME(_nc_screen_resume) (NCURSES_SP_ARG);
     29923+}
     29924+
     29925+#if NCURSES_SP_FUNCS
     29926 NCURSES_EXPORT(void)
     29927 _nc_screen_init(void)
     29928 {
     29929-    _nc_screen_resume();
     29930+    NCURSES_SP_NAME(_nc_screen_init) (CURRENT_SCREEN);
     29931 }
     29932+#endif
     29933 
     29934 /* wrap up screen handling */
     29935 NCURSES_EXPORT(void)
     29936-_nc_screen_wrap(void)
     29937+NCURSES_SP_NAME(_nc_screen_wrap) (NCURSES_SP_DCL0)
     29938 {
     29939-    UpdateAttrs(normal);
     29940+    if (SP_PARM == 0)
     29941+       return;
     29942+
     29943+    UpdateAttrs(SP_PARM, normal);
     29944 #if NCURSES_EXT_FUNCS
     29945-    if (SP->_coloron
     29946-       && !SP->_default_color) {
     29947+    if (SP_PARM->_coloron
     29948+       && !SP_PARM->_default_color) {
     29949        static const NCURSES_CH_T blank = NewChar(BLANK_TEXT);
     29950-       SP->_default_color = TRUE;
     29951-       _nc_do_color(-1, 0, FALSE, _nc_outch);
     29952-       SP->_default_color = FALSE;
     29953+       SP_PARM->_default_color = TRUE;
     29954+       NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_ARGx
     29955+                                      -1, 0,
     29956+                                      FALSE,
     29957+                                      NCURSES_SP_NAME(_nc_outch));
     29958+       SP_PARM->_default_color = FALSE;
     29959 
     29960-       mvcur(SP->_cursrow, SP->_curscol, screen_lines - 1, 0);
     29961+       mvcur(SP_PARM->_cursrow,
     29962+             SP_PARM->_curscol,
     29963+             screen_lines(SP_PARM) - 1, 0);
     29964 
     29965-       ClrToEOL(blank, TRUE);
     29966+       ClrToEOL(NCURSES_SP_ARGx blank, TRUE);
     29967     }
     29968 #endif
     29969-    if (SP->_color_defs) {
     29970+    if (SP_PARM->_color_defs) {
     29971        _nc_reset_colors();
     29972     }
     29973 }
     29974 
     29975+#if NCURSES_SP_FUNCS
     29976+NCURSES_EXPORT(void)
     29977+_nc_screen_wrap(void)
     29978+{
     29979+    NCURSES_SP_NAME(_nc_screen_wrap) (CURRENT_SCREEN);
     29980+}
     29981+#endif
     29982+
     29983 #if USE_XMC_SUPPORT
     29984 NCURSES_EXPORT(void)
     29985-_nc_do_xmc_glitch(attr_t previous)
     29986+NCURSES_SP_NAME(_nc_do_xmc_glitch) (NCURSES_SP_DCLx attr_t previous)
     29987 {
     29988-    attr_t chg = XMC_CHANGES(previous ^ AttrOf(SCREEN_ATTRS(SP)));
     29989+    if (SP_PARM != 0) {
     29990+       attr_t chg = XMC_CHANGES(previous ^ AttrOf(SCREEN_ATTRS(SP_PARM)));
     29991 
     29992-    while (chg != 0) {
     29993-       if (chg & 1) {
     29994-           SP->_curscol += magic_cookie_glitch;
     29995-           if (SP->_curscol >= SP->_columns)
     29996-               wrap_cursor();
     29997-           TR(TRACE_UPDATE, ("bumped to %d,%d after cookie", SP->_cursrow, SP->_curscol));
     29998+       while (chg != 0) {
     29999+           if (chg & 1) {
     30000+               SP_PARM->_curscol += magic_cookie_glitch;
     30001+               if (SP_PARM->_curscol >= SP_PARM->_columns)
     30002+                   wrap_cursor(NCURSES_SP_ARG);
     30003+               TR(TRACE_UPDATE, ("bumped to %d,%d after cookie",
     30004+                                 SP_PARM->_cursrow, SP_PARM->_curscol));
     30005+           }
     30006+           chg >>= 1;
     30007        }
     30008-       chg >>= 1;
     30009     }
     30010 }
     30011+
     30012+#if NCURSES_SP_FUNCS
     30013+NCURSES_EXPORT(void)
     30014+_nc_do_xmc_glitch(attr_t previous)
     30015+{
     30016+    NCURSES_SP_NAME(_nc_do_xmc_glitch) (CURRENT_SCREEN, previous);
     30017+}
     30018+#endif
     30019+
     30020 #endif /* USE_XMC_SUPPORT */
    2069030021diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_cchar.c ncurses-5.7/ncurses/widechar/lib_cchar.c
    2069130022--- ncurses-5.7.orig/ncurses/widechar/lib_cchar.c       2007-05-12 12:03:06.000000000 -0700
    20692 +++ ncurses-5.7/ncurses/widechar/lib_cchar.c    2009-03-22 21:17:07.020082134 -0700
     30023+++ ncurses-5.7/ncurses/widechar/lib_cchar.c    2009-06-05 14:01:16.000000000 -0700
    2069330024@@ -1,5 +1,5 @@
    2069430025 /****************************************************************************
     
    2071830049 
    2071930050     TR(TRACE_CCALLS, (T_CALLED("setcchar(%p,%s,%lu,%d,%p)"),
     30051diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_get_wch.c ncurses-5.7/ncurses/widechar/lib_get_wch.c
     30052--- ncurses-5.7.orig/ncurses/widechar/lib_get_wch.c     2008-08-16 12:22:55.000000000 -0700
     30053+++ ncurses-5.7/ncurses/widechar/lib_get_wch.c  2009-06-05 14:01:44.000000000 -0700
     30054@@ -1,5 +1,5 @@
     30055 /****************************************************************************
     30056- * Copyright (c) 2002-2007,2008 Free Software Foundation, Inc.              *
     30057+ * Copyright (c) 2002-2008,2009 Free Software Foundation, Inc.              *
     30058  *                                                                          *
     30059  * Permission is hereby granted, free of charge, to any person obtaining a  *
     30060  * copy of this software and associated documentation files (the            *
     30061@@ -40,7 +40,7 @@
     30062 #include <curses.priv.h>
     30063 #include <ctype.h>
     30064 
     30065-MODULE_ID("$Id: lib_get_wch.c,v 1.17 2008/08/16 19:22:55 tom Exp $")
     30066+MODULE_ID("$Id: lib_get_wch.c,v 1.18 2009/04/18 22:41:33 tom Exp $")
     30067 
     30068 #if HAVE_MBTOWC && HAVE_MBLEN
     30069 #define reset_mbytes(state) mblen(NULL, 0), mbtowc(NULL, NULL, 0)
     30070@@ -95,12 +95,12 @@
     30071                 * whether the improvement would be worth the effort.
     30072                 */
     30073                if (count != 0) {
     30074-                   _nc_ungetch(sp, (int) value);
     30075+                   safe_ungetch (SP_PARM, (int) value);
     30076                    code = ERR;
     30077                }
     30078                break;
     30079            } else if (count + 1 >= sizeof(buffer)) {
     30080-               _nc_ungetch(sp, (int) value);
     30081+               safe_ungetch (SP_PARM, (int) value);
     30082                code = ERR;
     30083                break;
     30084            } else {
     30085@@ -111,7 +111,7 @@
     30086                    reset_mbytes(state);
     30087                    if (check_mbytes(wch, buffer, count, state) != status) {
     30088                        code = ERR;     /* the two calls should match */
     30089-                       _nc_ungetch(sp, (int) value);
     30090+                       safe_ungetch (SP_PARM, (int) value);
     30091                    }
     30092                    value = wch;
     30093                    break;
    2072030094diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_get_wstr.c ncurses-5.7/ncurses/widechar/lib_get_wstr.c
    2072130095--- ncurses-5.7.orig/ncurses/widechar/lib_get_wstr.c    2008-08-16 12:25:33.000000000 -0700
    20722 +++ ncurses-5.7/ncurses/widechar/lib_get_wstr.c 2009-03-22 21:17:07.020082134 -0700
     30096+++ ncurses-5.7/ncurses/widechar/lib_get_wstr.c 2009-06-05 14:01:16.000000000 -0700
    2072330097@@ -38,9 +38,8 @@
    2072430098 */
     
    2073230106 static int
    2073330107 wadd_wint(WINDOW *win, wint_t *src)
     30108diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_ins_wch.c ncurses-5.7/ncurses/widechar/lib_ins_wch.c
     30109--- ncurses-5.7.orig/ncurses/widechar/lib_ins_wch.c     2005-12-03 12:24:19.000000000 -0800
     30110+++ ncurses-5.7/ncurses/widechar/lib_ins_wch.c  2009-06-05 14:01:55.000000000 -0700
     30111@@ -1,5 +1,5 @@
     30112 /****************************************************************************
     30113- * Copyright (c) 2002-2003,2005 Free Software Foundation, Inc.              *
     30114+ * Copyright (c) 2002-2005,2009 Free Software Foundation, Inc.              *
     30115  *                                                                          *
     30116  * Permission is hereby granted, free of charge, to any person obtaining a  *
     30117  * copy of this software and associated documentation files (the            *
     30118@@ -39,7 +39,7 @@
     30119 
     30120 #include <curses.priv.h>
     30121 
     30122-MODULE_ID("$Id: lib_ins_wch.c,v 1.8 2005/12/03 20:24:19 tom Exp $")
     30123+MODULE_ID("$Id: lib_ins_wch.c,v 1.9 2009/05/30 14:52:42 tom Exp $")
     30124 
     30125 /*
     30126  * Insert the given character, updating the current location to simplify
     30127@@ -112,6 +112,8 @@
     30128            n = wcslen(wstr);
     30129        code = OK;
     30130        if (n > 0) {
     30131+           SCREEN *sp = _nc_screen_of(win);
     30132+
     30133            oy = win->_cury;
     30134            ox = win->_curx;
     30135            for (cp = wstr; *cp && ((cp - wstr) < n); cp++) {
     30136@@ -129,7 +131,7 @@
     30137                    code = _nc_insert_wch(win, &tmp_cchar);
     30138                } else {
     30139                    /* tabs, other ASCII stuff */
     30140-                   code = _nc_insert_ch(win, (chtype) (*cp));
     30141+                   code = _nc_insert_ch(sp, win, (chtype) (*cp));
     30142                }
     30143                if (code != OK)
     30144                    break;
     30145diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_unget_wch.c ncurses-5.7/ncurses/widechar/lib_unget_wch.c
     30146--- ncurses-5.7.orig/ncurses/widechar/lib_unget_wch.c   2008-06-07 07:50:37.000000000 -0700
     30147+++ ncurses-5.7/ncurses/widechar/lib_unget_wch.c        2009-06-05 14:01:44.000000000 -0700
     30148@@ -1,5 +1,5 @@
     30149 /****************************************************************************
     30150- * Copyright (c) 2002-2007,2008 Free Software Foundation, Inc.              *
     30151+ * Copyright (c) 2002-2008,2009 Free Software Foundation, Inc.              *
     30152  *                                                                          *
     30153  * Permission is hereby granted, free of charge, to any person obtaining a  *
     30154  * copy of this software and associated documentation files (the            *
     30155@@ -39,7 +39,7 @@
     30156 
     30157 #include <curses.priv.h>
     30158 
     30159-MODULE_ID("$Id: lib_unget_wch.c,v 1.10 2008/06/07 14:50:37 tom Exp $")
     30160+MODULE_ID("$Id: lib_unget_wch.c,v 1.11 2009/04/04 23:57:25 tom Exp $")
     30161 
     30162 /*
     30163  * Wrapper for wcrtomb() which obtains the length needed for the given
     30164@@ -65,14 +65,14 @@
     30165 }
     30166 
     30167 NCURSES_EXPORT(int)
     30168-unget_wch(const wchar_t wch)
     30169+NCURSES_SP_NAME(unget_wch) (NCURSES_SP_DCLx const wchar_t wch)
     30170 {
     30171     int result = OK;
     30172     mbstate_t state;
     30173     size_t length;
     30174     int n;
     30175 
     30176-    T((T_CALLED("unget_wch(%#lx)"), (unsigned long) wch));
     30177+    T((T_CALLED("unget_wch(%p, %#lx)"), SP_PARM, (unsigned long) wch));
     30178 
     30179     init_mb(state);
     30180     length = _nc_wcrtomb(0, wch, &state);
     30181@@ -86,7 +86,7 @@
     30182            wcrtomb(string, wch, &state);
     30183 
     30184            for (n = (int) (length - 1); n >= 0; --n) {
     30185-               if (_nc_ungetch(SP, string[n]) != OK) {
     30186+               if (NCURSES_SP_NAME(ungetch) (NCURSES_SP_ARGx string[n]) != OK) {
     30187                    result = ERR;
     30188                    break;
     30189                }
     30190@@ -101,3 +101,11 @@
     30191 
     30192     returnCode(result);
     30193 }
     30194+
     30195+#if NCURSES_SP_FUNCS
     30196+NCURSES_EXPORT(int)
     30197+unget_wch(const wchar_t wch)
     30198+{
     30199+    return NCURSES_SP_NAME(unget_wch) (CURRENT_SCREEN, wch);
     30200+}
     30201+#endif
     30202diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_vid_attr.c ncurses-5.7/ncurses/widechar/lib_vid_attr.c
     30203--- ncurses-5.7.orig/ncurses/widechar/lib_vid_attr.c    2007-06-30 15:03:02.000000000 -0700
     30204+++ ncurses-5.7/ncurses/widechar/lib_vid_attr.c 2009-06-05 14:01:51.000000000 -0700
     30205@@ -1,5 +1,5 @@
     30206 /****************************************************************************
     30207- * Copyright (c) 2002-2006,2007 Free Software Foundation, Inc.              *
     30208+ * Copyright (c) 2002-2007,2009 Free Software Foundation, Inc.              *
     30209  *                                                                          *
     30210  * Permission is hereby granted, free of charge, to any person obtaining a  *
     30211  * copy of this software and associated documentation files (the            *
     30212@@ -33,9 +33,13 @@
     30213 #include <curses.priv.h>
     30214 #include <term.h>
     30215 
     30216-MODULE_ID("$Id: lib_vid_attr.c,v 1.5 2007/06/30 22:03:02 tom Exp $")
     30217+#ifndef CUR
     30218+#define CUR SP_TERMTYPE
     30219+#endif
     30220+
     30221+MODULE_ID("$Id: lib_vid_attr.c,v 1.11 2009/05/10 00:48:29 tom Exp $")
     30222 
     30223-#define doPut(mode) TPUTS_TRACE(#mode); tputs(mode, 1, outc)
     30224+#define doPut(mode) TPUTS_TRACE(#mode); NCURSES_SP_NAME(tputs)(NCURSES_SP_ARGx mode, 1, outc)
     30225 
     30226 #define TurnOn(mask,mode) \
     30227        if ((turn_on & mask) && mode) { doPut(mode); }
     30228@@ -50,14 +54,20 @@
     30229                if ((pair != old_pair) \
     30230                 || (fix_pair0 && (pair == 0)) \
     30231                 || (reverse ^ ((old_attr & A_REVERSE) != 0))) { \
     30232-                       _nc_do_color(old_pair, pair, reverse, outc); \
     30233+                   NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_ARGx \
     30234+                                                  old_pair, pair, \
     30235+                                                  reverse, outc); \
     30236                } \
     30237        }
     30238 
     30239 #define set_color(mode, pair) mode &= ALL_BUT_COLOR; mode |= COLOR_PAIR(pair)
     30240 
     30241 NCURSES_EXPORT(int)
     30242-vid_puts(attr_t newmode, short pair, void *opts GCC_UNUSED, int (*outc) (int))
     30243+NCURSES_SP_NAME(vid_puts) (NCURSES_SP_DCLx
     30244+                          attr_t newmode,
     30245+                          short pair,
     30246+                          void *opts GCC_UNUSED,
     30247+                          NCURSES_SP_OUTC outc)
     30248 {
     30249 #if NCURSES_EXT_COLORS
     30250     static attr_t previous_attr = A_NORMAL;
     30251@@ -65,9 +75,9 @@
     30252 
     30253     attr_t turn_on, turn_off;
     30254     bool reverse = FALSE;
     30255-    bool can_color = (SP == 0 || SP->_coloron);
     30256+    bool can_color = (SP_PARM == 0 || SP_PARM->_coloron);
     30257 #if NCURSES_EXT_FUNCS
     30258-    bool fix_pair0 = (SP != 0 && SP->_coloron && !SP->_default_color);
     30259+    bool fix_pair0 = (SP_PARM != 0 && SP_PARM->_coloron && !SP_PARM->_default_color);
     30260 #else
     30261 #define fix_pair0 FALSE
     30262 #endif
     30263@@ -76,18 +86,18 @@
     30264     T((T_CALLED("vid_puts(%s,%d)"), _traceattr(newmode), pair));
     30265 
     30266     /* this allows us to go on whether or not newterm() has been called */
     30267-    if (SP) {
     30268-       previous_attr = AttrOf(SCREEN_ATTRS(SP));
     30269-       previous_pair = GetPair(SCREEN_ATTRS(SP));
     30270+    if (SP_PARM) {
     30271+       previous_attr = AttrOf(SCREEN_ATTRS(SP_PARM));
     30272+       previous_pair = GetPair(SCREEN_ATTRS(SP_PARM));
     30273     }
     30274 
     30275     TR(TRACE_ATTRS, ("previous attribute was %s, %d",
     30276                     _traceattr(previous_attr), previous_pair));
     30277 
     30278 #if !USE_XMC_SUPPORT
     30279-    if ((SP != 0)
     30280+    if ((SP_PARM != 0)
     30281        && (magic_cookie_glitch > 0))
     30282-       newmode &= ~(SP->_xmc_suppress);
     30283+       newmode &= ~(SP_PARM->_xmc_suppress);
     30284 #endif
     30285 
     30286     /*
     30287@@ -144,10 +154,10 @@
     30288            if (exit_attribute_mode) {
     30289                doPut(exit_attribute_mode);
     30290            } else {
     30291-               if (!SP || SP->_use_rmul) {
     30292+               if (!SP_PARM || SP_PARM->_use_rmul) {
     30293                    TurnOff(A_UNDERLINE, exit_underline_mode);
     30294                }
     30295-               if (!SP || SP->_use_rmso) {
     30296+               if (!SP_PARM || SP_PARM->_use_rmso) {
     30297                    TurnOff(A_STANDOUT, exit_standout_mode);
     30298                }
     30299            }
     30300@@ -159,16 +169,18 @@
     30301     } else if (set_attributes) {
     30302        if (turn_on || turn_off) {
     30303            TPUTS_TRACE("set_attributes");
     30304-           tputs(TPARM_9(set_attributes,
     30305-                         (newmode & A_STANDOUT) != 0,
     30306-                         (newmode & A_UNDERLINE) != 0,
     30307-                         (newmode & A_REVERSE) != 0,
     30308-                         (newmode & A_BLINK) != 0,
     30309-                         (newmode & A_DIM) != 0,
     30310-                         (newmode & A_BOLD) != 0,
     30311-                         (newmode & A_INVIS) != 0,
     30312-                         (newmode & A_PROTECT) != 0,
     30313-                         (newmode & A_ALTCHARSET) != 0), 1, outc);
     30314+           NCURSES_SP_NAME(tputs) (NCURSES_SP_ARGx
     30315+                                   TPARM_9(set_attributes,
     30316+                                           (newmode & A_STANDOUT) != 0,
     30317+                                           (newmode & A_UNDERLINE) != 0,
     30318+                                           (newmode & A_REVERSE) != 0,
     30319+                                           (newmode & A_BLINK) != 0,
     30320+                                           (newmode & A_DIM) != 0,
     30321+                                           (newmode & A_BOLD) != 0,
     30322+                                           (newmode & A_INVIS) != 0,
     30323+                                           (newmode & A_PROTECT) != 0,
     30324+                                           (newmode & A_ALTCHARSET) != 0),
     30325+                                   1, outc);
     30326            previous_attr &= ALL_BUT_COLOR;
     30327            previous_pair = 0;
     30328        }
     30329@@ -179,11 +191,11 @@
     30330 
     30331        TurnOff(A_ALTCHARSET, exit_alt_charset_mode);
     30332 
     30333-       if (!SP || SP->_use_rmul) {
     30334+       if (!SP_PARM || SP_PARM->_use_rmul) {
     30335            TurnOff(A_UNDERLINE, exit_underline_mode);
     30336        }
     30337 
     30338-       if (!SP || SP->_use_rmso) {
     30339+       if (!SP_PARM || SP_PARM->_use_rmso) {
     30340            TurnOff(A_STANDOUT, exit_standout_mode);
     30341        }
     30342 
     30343@@ -221,9 +233,9 @@
     30344     if (reverse)
     30345        newmode |= A_REVERSE;
     30346 
     30347-    if (SP) {
     30348-       SetAttr(SCREEN_ATTRS(SP), newmode);
     30349-       SetPair(SCREEN_ATTRS(SP), pair);
     30350+    if (SP_PARM) {
     30351+       SetAttr(SCREEN_ATTRS(SP_PARM), newmode);
     30352+       SetPair(SCREEN_ATTRS(SP_PARM), pair);
     30353     } else {
     30354        previous_attr = newmode;
     30355        previous_pair = pair;
     30356@@ -233,29 +245,60 @@
     30357 #else
     30358     T((T_CALLED("vid_puts(%s,%d)"), _traceattr(newmode), pair));
     30359     set_color(newmode, pair);
     30360-    returnCode(vidputs(newmode, outc));
     30361+    returnCode(NCURSES_SP_NAME(vidputs) (NCURSES_SP_ARGx newmode, outc));
     30362 #endif
     30363 }
     30364 
     30365+#if NCURSES_SP_FUNCS
     30366+NCURSES_EXPORT(int)
     30367+vid_puts(attr_t newmode,
     30368+        short pair,
     30369+        void *opts GCC_UNUSED,
     30370+        NCURSES_OUTC outc)
     30371+{
     30372+    SetSafeOutcWrapper(outc);
     30373+    return NCURSES_SP_NAME(vid_puts) (CURRENT_SCREEN,
     30374+                                     newmode,
     30375+                                     pair,
     30376+                                     opts,
     30377+                                     _nc_outc_wrapper);
     30378+}
     30379+#endif
     30380+
     30381 #undef vid_attr
     30382 NCURSES_EXPORT(int)
     30383-vid_attr(attr_t newmode, short pair, void *opts)
     30384+NCURSES_SP_NAME(vid_attr) (NCURSES_SP_DCLx
     30385+                          attr_t newmode,
     30386+                          short pair,
     30387+                          void *opts)
     30388 {
     30389     T((T_CALLED("vid_attr(%s,%d)"), _traceattr(newmode), pair));
     30390-    returnCode(vid_puts(newmode, pair, opts, _nc_outch));
     30391+    returnCode(NCURSES_SP_NAME(vid_puts) (NCURSES_SP_ARGx
     30392+                                         newmode,
     30393+                                         pair,
     30394+                                         opts,
     30395+                                         NCURSES_SP_NAME(_nc_outch)));
     30396 }
     30397 
     30398+#if NCURSES_SP_FUNCS
     30399+NCURSES_EXPORT(int)
     30400+vid_attr(attr_t newmode, short pair, void *opts)
     30401+{
     30402+    return NCURSES_SP_NAME(vid_attr) (CURRENT_SCREEN, newmode, pair, opts);
     30403+}
     30404+#endif
     30405+
     30406 /*
     30407  * This implementation uses the same mask values for A_xxx and WA_xxx, so
     30408  * we can use termattrs() for part of the logic.
     30409  */
     30410 NCURSES_EXPORT(attr_t)
     30411-term_attrs(void)
     30412+NCURSES_SP_NAME(term_attrs) (NCURSES_SP_DCL0)
     30413 {
     30414     attr_t attrs;
     30415 
     30416     T((T_CALLED("term_attrs()")));
     30417-    attrs = termattrs();
     30418+    attrs = SP_PARM ? NCURSES_SP_NAME(termattrs) (NCURSES_SP_ARG) : 0;
     30419 
     30420     /* these are only supported for wide-character mode */
     30421     if (enter_horizontal_hl_mode)
     30422@@ -273,3 +316,11 @@
     30423 
     30424     returnAttr(attrs);
     30425 }
     30426+
     30427+#if NCURSES_SP_FUNCS
     30428+NCURSES_EXPORT(attr_t)
     30429+term_attrs(void)
     30430+{
     30431+    return NCURSES_SP_NAME(term_attrs) (CURRENT_SCREEN);
     30432+}
     30433+#endif
    2073430434diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_wacs.c ncurses-5.7/ncurses/widechar/lib_wacs.c
    2073530435--- ncurses-5.7.orig/ncurses/widechar/lib_wacs.c        2006-12-17 07:16:17.000000000 -0800
    20736 +++ ncurses-5.7/ncurses/widechar/lib_wacs.c     2009-03-22 21:17:07.020082134 -0700
     30436+++ ncurses-5.7/ncurses/widechar/lib_wacs.c     2009-06-05 14:01:16.000000000 -0700
    2073730437@@ -31,9 +31,8 @@
    2073830438  ****************************************************************************/
     
    2074630446 NCURSES_EXPORT_VAR(cchar_t) * _nc_wacs = 0;
    2074730447 
     30448diff -Naur ncurses-5.7.orig/ncurses/widechar/lib_wunctrl.c ncurses-5.7/ncurses/widechar/lib_wunctrl.c
     30449--- ncurses-5.7.orig/ncurses/widechar/lib_wunctrl.c     2007-06-12 13:22:32.000000000 -0700
     30450+++ ncurses-5.7/ncurses/widechar/lib_wunctrl.c  2009-06-05 14:01:44.000000000 -0700
     30451@@ -1,5 +1,5 @@
     30452 /****************************************************************************
     30453- * Copyright (c) 2001-2005,2007 Free Software Foundation, Inc.              *
     30454+ * Copyright (c) 2001-2007,2009 Free Software Foundation, Inc.              *
     30455  *                                                                          *
     30456  * Permission is hereby granted, free of charge, to any person obtaining a  *
     30457  * copy of this software and associated documentation files (the            *
     30458@@ -35,21 +35,31 @@
     30459 
     30460 #include <curses.priv.h>
     30461 
     30462-MODULE_ID("$Id: lib_wunctrl.c,v 1.12 2007/06/12 20:22:32 tom Exp $")
     30463+MODULE_ID("$Id: lib_wunctrl.c,v 1.13 2009/04/18 19:06:55 tom Exp $")
     30464 
     30465 NCURSES_EXPORT(wchar_t *)
     30466-wunctrl(cchar_t *wc)
     30467+NCURSES_SP_NAME(wunctrl) (NCURSES_SP_DCLx cchar_t *wc)
     30468 {
     30469-    static wchar_t str[CCHARW_MAX + 1], *sp;
     30470+    static wchar_t str[CCHARW_MAX + 1], *wsp;
     30471 
     30472     if (Charable(*wc)) {
     30473-       const char *p = unctrl((unsigned) _nc_to_char((wint_t) CharOf(*wc)));
     30474+       const char *p =
     30475+       NCURSES_SP_NAME(unctrl) (NCURSES_SP_ARGx
     30476+                                (unsigned) _nc_to_char((wint_t)CharOf(*wc)));
     30477 
     30478-       for (sp = str; *p; ++p) {
     30479-           *sp++ = _nc_to_widechar(*p);
     30480+       for (wsp = str; *p; ++p) {
     30481+           *wsp++ = _nc_to_widechar(*p);
     30482        }
     30483-       *sp = 0;
     30484+       *wsp = 0;
     30485        return str;
     30486     } else
     30487        return wc->chars;
     30488 }
     30489+
     30490+#if NCURSES_SP_FUNCS
     30491+NCURSES_EXPORT(wchar_t *)
     30492+wunctrl(cchar_t *wc)
     30493+{
     30494+    return NCURSES_SP_NAME(wunctrl) (CURRENT_SCREEN, wc);
     30495+}
     30496+#endif
    2074830497diff -Naur ncurses-5.7.orig/NEWS ncurses-5.7/NEWS
    2074930498--- ncurses-5.7.orig/NEWS       2008-11-01 17:56:22.000000000 -0700
    20750 +++ ncurses-5.7/NEWS    2009-03-22 21:17:11.616376588 -0700
     30499+++ ncurses-5.7/NEWS    2009-06-05 14:01:55.000000000 -0700
    2075130500@@ -1,5 +1,5 @@
    2075230501 -------------------------------------------------------------------------------
     
    2076130510 -------------------------------------------------------------------------------
    2076230511--- $Id: NEWS,v 1.1320 2008/11/02 00:56:22 tom Exp $
    20763 +-- $Id: NEWS,v 1.1373 2009/03/21 23:24:10 tom Exp $
     30512+-- $Id: NEWS,v 1.1392 2009/05/30 19:19:59 tom Exp $
    2076430513 -------------------------------------------------------------------------------
    2076530514 
    2076630515 This is a log of changes that ncurses has gone through since Zeyd started
    20767 @@ -45,6 +45,185 @@
     30516@@ -45,6 +45,257 @@
    2076830517 Changes through 1.9.9e did not credit all contributions;
    2076930518 it is not possible to add this information.
    2077030519 
     30520+20090530
     30521+       + fix an infinite recursion when adding a legacy-coding 8-bit value
     30522+         using insch() (report by Clemens Ladisch).
     30523+       + free home-terminfo string in del_curterm() (patch by Dan Weber).
     30524+       + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
     30525+
     30526+20090523
     30527+       + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
     30528+
     30529+20090516
     30530+       + work around antique BSD game's manipulation of stdscr, etc., versus
     30531+         SCREEN's copy of the pointer (Debian #528411).
     30532+       + add a cast to wattrset macro to avoid compiler warning when comparing
     30533+         its result against ERR (adapted from patch by Matt Kraii, Debian
     30534+         #528374).
     30535+
     30536+20090510
     30537+       + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
     30538+
     30539+20090502
     30540+       + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
     30541+       + add vwmterm terminfo entry (patch by Bryan Christ).
     30542+
     30543+20090425
     30544+       + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
     30545+
     30546+20090419
     30547+       + build fix for _nc_free_and_exit() change in 20090418 (report by
     30548+         Christian Ebert).
     30549+
     30550+20090418
     30551+       + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
     30552+
     30553+20090411
     30554+       + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).
     30555+         This change finishes merging for menu and panel libraries, does
     30556+         part of the form library.
     30557+
     30558+20090404
     30559+       + suppress configure check for static/dynamic linker flags for gcc on
     30560+         Darwin (report by Nelson Beebe).
     30561+
     30562+20090328
     30563+       + extend ansi.sys pfkey capability from kf1-kf10 to kf1-kf48, moving
     30564+         function key definitions from emx-base for consistency -TD
     30565+       + correct missing final 'p' in pfkey capability of ansi.sys-old (report
     30566+         by Kalle Olavi Niemitalo).
     30567+       + improve test/ncurses.c 'F' test, show combining characters in color.
     30568+       + quiet a false report by cppcheck in c++/cursesw.cc by eliminating
     30569+         a temporary variable.
     30570+       + use _nc_doalloc() rather than realloc() in a few places in ncurses
     30571+         library to avoid leak in out-of-memory condition (reports by William
     30572+         Egert and Martin Ettl based on cppcheck tool).
     30573+       + add --with-ncurses-wrap-prefix option to test/configure (discussion
     30574+         with Charles Wilson).
     30575+       + use ncurses*-config scripts if available for test/configure.
     30576+       + update test/aclocal.m4 and test/configure
     30577+       > patches by Charles Wilson:
     30578+       + modify CF_WITH_LIBTOOL configure check to allow unreleased libtool
     30579+         version numbers (e.g.  which include alphabetic chars, as well as
     30580+         digits, after the final '.').
     30581+       + improve use of -no-undefined option for libtool by setting an
     30582+         intermediate variable LT_UNDEF in the configure script, and then
     30583+         using that in the libtool link-commands.
     30584+       + fix an missing use of NCURSES_PUBLIC_VAR() in tinfo/MKcodes.awk
     30585+         from 2009031 changes.
     30586+       + improve mk-1st.awk script by writing separate cases for the
     30587+         LIBTOOL_LINK command, depending on which library (ncurses, ticlib,
     30588+         termlib) is to be linked.
     30589+       + modify configure.in to allow broken-linker configurations, not just
     30590+         enable-reentrant, to set public wrap prefix.
     30591+
    2077130592+20090321
    2077230593+       + add TICS_LIST and SHLIB_LIST to allow libtool 2.2.6 on Cygwin to
     
    2078630607+         such as "reset" by ignoring the executable suffix (reports by Charles
    2078730608+         Wilson, Samuel Thibault and Cedric Bretaudeau on Cygwin mailing
    20788 +         list). 
     30609+         list).
    2078930610+       + suppress configure check for static/dynamic linker flags for gcc on
    2079030611+         Solaris 10, since gcc is confused by absence of static libc, and
     
    2095330774diff -Naur ncurses-5.7.orig/panel/Makefile.in ncurses-5.7/panel/Makefile.in
    2095430775--- ncurses-5.7.orig/panel/Makefile.in  2007-04-28 07:56:11.000000000 -0700
    20955 +++ ncurses-5.7/panel/Makefile.in       2009-03-22 21:16:55.671355217 -0700
     30776+++ ncurses-5.7/panel/Makefile.in       2009-06-05 14:01:30.000000000 -0700
    2095630777@@ -1,6 +1,6 @@
    2095730778-# $Id: Makefile.in,v 1.52 2007/04/28 14:56:11 tom Exp $
    20958 +# $Id: Makefile.in,v 1.53 2009/01/03 19:09:26 tom Exp $
     30779+# $Id: Makefile.in,v 1.54 2009/03/28 18:22:39 Charles.Wilson Exp $
    2095930780 ##############################################################################
    2096030781-# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                #
     
    2096330784 # Permission is hereby granted, free of charge, to any person obtaining a    #
    2096430785 # copy of this software and associated documentation files (the "Software"), #
    20965 @@ -71,7 +71,7 @@
     30786@@ -64,6 +64,7 @@
     30787 LIBTOOL_LINK   = @LIB_LINK@
     30788 LIBTOOL_INSTALL        = @LIB_INSTALL@
     30789 LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
     30790+LT_UNDEF       = @LT_UNDEF@
     30791 
     30792 INSTALL                = @INSTALL@
     30793 INSTALL_LIB    = @INSTALL@ @INSTALL_LIB@
     30794@@ -71,7 +72,7 @@
    2096630795 INSTALL_DATA   = @INSTALL_DATA@
    2096730796 
     
    2097230801 LD             = @LD@
    2097330802 LN_S           = @LN_S@
     30803diff -Naur ncurses-5.7.orig/panel/p_above.c ncurses-5.7/panel/p_above.c
     30804--- ncurses-5.7.orig/panel/p_above.c    2005-02-19 08:44:57.000000000 -0800
     30805+++ ncurses-5.7/panel/p_above.c 2009-06-05 14:01:33.000000000 -0700
     30806@@ -1,5 +1,5 @@
     30807 /****************************************************************************
     30808- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
     30809+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
     30810  *                                                                          *
     30811  * Permission is hereby granted, free of charge, to any person obtaining a  *
     30812  * copy of this software and associated documentation files (the            *
     30813@@ -29,24 +29,56 @@
     30814 /****************************************************************************
     30815  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
     30816  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
     30817+ *     and: Juergen Pfeifer                         1997-1999,2008          *
     30818  ****************************************************************************/
     30819 
     30820 /* p_above.c
     30821  */
     30822 #include "panel.priv.h"
     30823 
     30824-MODULE_ID("$Id: p_above.c,v 1.6 2005/02/19 16:44:57 tom Exp $")
     30825+MODULE_ID("$Id: p_above.c,v 1.7 2009/04/11 20:03:06 tom Exp $")
     30826+
     30827+#if NCURSES_SP_FUNCS
     30828+NCURSES_EXPORT(PANEL *)
     30829+ground_panel(SCREEN * sp)
     30830+{
     30831+  T((T_CALLED("ground_panel(%p)"), sp));
     30832+  if (sp)
     30833+    {
     30834+      struct panelhook *ph = NCURSES_SP_NAME(_nc_panelhook) (sp);
     30835+
     30836+      if (_nc_bottom_panel)    /* this is the pseudo panel */
     30837+       returnPanel(_nc_bottom_panel->above);
     30838+      else
     30839+       returnPanel(0);
     30840+    }
     30841+  else
     30842+    {
     30843+      if (0 == CURRENT_SCREEN)
     30844+       returnPanel(0);
     30845+      else
     30846+       returnPanel(ground_panel(CURRENT_SCREEN));
     30847+    }
     30848+}
     30849+#endif
     30850 
     30851 NCURSES_EXPORT(PANEL *)
     30852 panel_above(const PANEL * pan)
     30853 {
     30854+  PANEL *result;
     30855+
     30856   T((T_CALLED("panel_above(%p)"), pan));
     30857-  if (!pan)
     30858+  if (pan)
     30859+    result = pan->above;
     30860+  else
     30861     {
     30862+#if NCURSES_SP_FUNCS
     30863+      result = ground_panel(CURRENT_SCREEN);
     30864+#else
     30865       /* if top and bottom are equal, we have no or only the pseudo panel;
     30866          if not, we return the panel above the pseudo panel */
     30867-      returnPanel(EMPTY_STACK()? (PANEL *) 0 : _nc_bottom_panel->above);
     30868+      result = EMPTY_STACK()? (PANEL *) 0 : _nc_bottom_panel->above;
     30869+#endif
     30870     }
     30871-  else
     30872-    returnPanel(pan->above);
     30873+  returnPanel(result);
     30874 }
     30875diff -Naur ncurses-5.7.orig/panel/panel.c ncurses-5.7/panel/panel.c
     30876--- ncurses-5.7.orig/panel/panel.c      2005-02-19 10:04:31.000000000 -0800
     30877+++ ncurses-5.7/panel/panel.c   2009-06-05 14:01:33.000000000 -0700
     30878@@ -1,5 +1,5 @@
     30879 /****************************************************************************
     30880- * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc.              *
     30881+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
     30882  *                                                                          *
     30883  * Permission is hereby granted, free of charge, to any person obtaining a  *
     30884  * copy of this software and associated documentation files (the            *
     30885@@ -29,12 +29,14 @@
     30886 /****************************************************************************
     30887  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
     30888  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
     30889+ *     and: Juergen Pfeifer                         1996-1999,2008          *
     30890+ *     and: Thomas E. Dickey                                                *
     30891  ****************************************************************************/
     30892 
     30893 /* panel.c -- implementation of panels library, some core routines */
     30894 #include "panel.priv.h"
     30895 
     30896-MODULE_ID("$Id: panel.c,v 1.23 2005/02/19 18:04:31 tom Exp $")
     30897+MODULE_ID("$Id: panel.c,v 1.24 2009/04/11 21:29:10 tom Exp $")
     30898 
     30899 /*+-------------------------------------------------------------------------
     30900        _nc_retrace_panel (pan)
     30901@@ -91,6 +93,8 @@
     30902 {
     30903   char s80[80];
     30904 
     30905+  GetPanelHook(pan);
     30906+
     30907   sprintf(s80, fmt, num, pan);
     30908   _tracef("%s b=%s t=%s", s80,
     30909          (_nc_bottom_panel) ? USER_PTR(_nc_bottom_panel->user) : "--",
     30910diff -Naur ncurses-5.7.orig/panel/panel.h ncurses-5.7/panel/panel.h
     30911--- ncurses-5.7.orig/panel/panel.h      2006-05-27 12:49:40.000000000 -0700
     30912+++ ncurses-5.7/panel/panel.h   2009-06-05 14:01:33.000000000 -0700
     30913@@ -1,5 +1,5 @@
     30914 /****************************************************************************
     30915- * Copyright (c) 1998-2001,2006 Free Software Foundation, Inc.              *
     30916+ * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc.              *
     30917  *                                                                          *
     30918  * Permission is hereby granted, free of charge, to any person obtaining a  *
     30919  * copy of this software and associated documentation files (the            *
     30920@@ -29,9 +29,10 @@
     30921 /****************************************************************************
     30922  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
     30923  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
     30924+ *     and: Juergen Pfeifer                         1996-1999,2008          *
     30925  ****************************************************************************/
     30926 
     30927-/* $Id: panel.h,v 1.10 2006/05/27 19:49:40 tom Exp $ */
     30928+/* $Id: panel.h,v 1.11 2009/04/11 19:50:40 tom Exp $ */
     30929 
     30930 /* panel.h -- interface file for panels library */
     30931 
     30932@@ -68,6 +69,13 @@
     30933 extern NCURSES_EXPORT(int)     replace_panel (PANEL *,WINDOW *);
     30934 extern NCURSES_EXPORT(int)     panel_hidden (const PANEL *);
     30935 
     30936+#if NCURSES_SP_FUNCS
     30937+extern NCURSES_EXPORT(PANEL *) ground_panel(SCREEN *);
     30938+extern NCURSES_EXPORT(PANEL *) ceiling_panel(SCREEN *);
     30939+
     30940+extern NCURSES_EXPORT(void)    NCURSES_SP_NAME(update_panels) (SCREEN*);
     30941+#endif
     30942+
     30943 #if    defined(__cplusplus)
     30944 }
     30945 #endif
     30946diff -Naur ncurses-5.7.orig/panel/panel.priv.h ncurses-5.7/panel/panel.priv.h
     30947--- ncurses-5.7.orig/panel/panel.priv.h 2008-09-27 15:36:11.000000000 -0700
     30948+++ ncurses-5.7/panel/panel.priv.h      2009-06-05 14:01:33.000000000 -0700
     30949@@ -1,5 +1,5 @@
     30950 /****************************************************************************
     30951- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc.              *
     30952+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     30953  *                                                                          *
     30954  * Permission is hereby granted, free of charge, to any person obtaining a  *
     30955  * copy of this software and associated documentation files (the            *
     30956@@ -26,7 +26,7 @@
     30957  * authorization.                                                           *
     30958  ****************************************************************************/
     30959 
     30960-/* $Id: panel.priv.h,v 1.22 2008/09/27 22:36:11 tom Exp $ */
     30961+/* $Id: panel.priv.h,v 1.23 2009/04/11 20:33:55 tom Exp $ */
     30962 
     30963 #ifndef NCURSES_PANEL_PRIV_H
     30964 #define NCURSES_PANEL_PRIV_H 1
     30965@@ -39,9 +39,11 @@
     30966 #include <string.h>
     30967 #include <assert.h>
     30968 
     30969-#include "curses.priv.h"
     30970+struct screen;              /* forward declaration */
     30971+
     30972+#include "curses.priv.h"    /* includes nc_panel.h */
     30973 #include "panel.h"
     30974-#include <nc_panel.h>
     30975+
     30976 
     30977 #if USE_RCS_IDS
     30978 #  define MODULE_ID(id) static const char Ident[] = id;
     30979@@ -83,14 +85,38 @@
     30980 #  define Touchline(pan,start,count) touchline((pan)->win,start,count)
     30981 #endif
     30982 
     30983+#if NCURSES_SP_FUNCS
     30984+#define GetScreenHook(sp) \
     30985+                       struct panelhook* ph = NCURSES_SP_NAME(_nc_panelhook)(sp)
     30986+#define GetPanelHook(pan) \
     30987+                       GetScreenHook(_nc_screen_of((pan)->win))
     30988+#define GetWindowHook(win) \
     30989+                       SCREEN* sp = _nc_screen_of(win); \
     30990+                       GetScreenHook(sp)
     30991+#define GetHook(pan)   SCREEN* sp = _nc_screen_of(pan->win); \
     30992+                       GetScreenHook(sp)
     30993+
     30994+#define _nc_stdscr_pseudo_panel ((ph)->stdscr_pseudo_panel)
     30995+#define _nc_top_panel           ((ph)->top_panel)
     30996+#define _nc_bottom_panel        ((ph)->bottom_panel)
     30997+
     30998+#else  /* !NCURSES_SP_FUNCS */
     30999+
     31000+#define GetScreenHook(sp) /* nothing */
     31001+#define GetPanelHook(pan) /* nothing */
     31002+#define GetWindowHook(win) /* nothing */
     31003+#define GetHook(pan) /* nothing */
     31004+
     31005 #define _nc_stdscr_pseudo_panel _nc_panelhook()->stdscr_pseudo_panel
     31006-#define _nc_top_panel _nc_panelhook()->top_panel
     31007-#define _nc_bottom_panel _nc_panelhook()->bottom_panel
     31008+#define _nc_top_panel           _nc_panelhook()->top_panel
     31009+#define _nc_bottom_panel        _nc_panelhook()->bottom_panel
     31010 
     31011-#define EMPTY_STACK() (_nc_top_panel==_nc_bottom_panel)
     31012-#define Is_Bottom(p)  (((p)!=(PANEL*)0) && !EMPTY_STACK() && (_nc_bottom_panel->above==(p)))
     31013-#define Is_Top(p) (((p)!=(PANEL*)0) && !EMPTY_STACK() && (_nc_top_panel==(p)))
     31014-#define Is_Pseudo(p) ((p) && ((p)==_nc_bottom_panel))
     31015+#endif /* NCURSES_SP_FUNCS */
     31016+
     31017+#define EMPTY_STACK() (_nc_top_panel == _nc_bottom_panel)
     31018+#define Is_Bottom(p)  (((p) != (PANEL*)0) && !EMPTY_STACK() && (_nc_bottom_panel->above == (p)))
     31019+#define Is_Top(p)     (((p) != (PANEL*)0) && !EMPTY_STACK() && (_nc_top_panel == (p)))
     31020+#define Is_Pseudo(p)  (((p) != (PANEL*)0) && ((p) == _nc_bottom_panel))
     31021 
     31022 /*+-------------------------------------------------------------------------
     31023        IS_LINKED(pan) - check to see if panel is in the stack
     31024@@ -122,7 +148,7 @@
     31025    ix2 = (PENDX(pan1)   < PENDX(pan2))   ? PENDX(pan1)   : PENDX(pan2);\
     31026    iy1 = (PSTARTY(pan1) < PSTARTY(pan2)) ? PSTARTY(pan2) : PSTARTY(pan1);\
     31027    iy2 = (PENDY(pan1)   < PENDY(pan2))   ? PENDY(pan1)   : PENDY(pan2);\
     31028-   assert((ix1<=ix2) && (iy1<=iy2));\
     31029+   assert((ix1<=ix2) && (iy1<=iy2))
     31030 
     31031 
     31032 /*+-------------------------------------------------------------------------
     31033@@ -136,12 +162,12 @@
     31034 {  PANEL* pan2 = ((panstart) ? (panstart) : _nc_bottom_panel);\
     31035    while(pan2) {\
     31036       if ((pan2 != pan) && PANELS_OVERLAPPED(pan,pan2)) {\
     31037-        int y,ix1,ix2,iy1,iy2;\
     31038-        COMPUTE_INTERSECTION(pan,pan2,ix1,ix2,iy1,iy2);\
     31039+        int y, ix1, ix2, iy1, iy2;\
     31040+        COMPUTE_INTERSECTION(pan, pan2, ix1, ix2, iy1, iy2);\
     31041        for(y = iy1; y <= iy2; y++) {\
     31042          if (is_linetouched(pan->win,y - PSTARTY(pan))) {\
     31043             struct ldat* line = &(pan2->win->_line[y - PSTARTY(pan2)]);\
     31044-            CHANGED_RANGE(line,ix1-PSTARTX(pan2),ix2-PSTARTX(pan2));\
     31045+            CHANGED_RANGE(line, ix1 - PSTARTX(pan2), ix2 - PSTARTX(pan2));\
     31046           }\
     31047        }\
     31048       }\
     31049@@ -180,4 +206,9 @@
     31050       err = err_if_unlinked;\
     31051   }
     31052 
     31053+#if NCURSES_SP_FUNCS
     31054+/* These may become later renamed and part of panel.h and the public API */
     31055+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_update_panels)(SCREEN*);
     31056+#endif
     31057+
     31058 #endif /* NCURSES_PANEL_PRIV_H */
     31059diff -Naur ncurses-5.7.orig/panel/p_below.c ncurses-5.7/panel/p_below.c
     31060--- ncurses-5.7.orig/panel/p_below.c    2005-02-19 08:45:10.000000000 -0800
     31061+++ ncurses-5.7/panel/p_below.c 2009-06-05 14:01:33.000000000 -0700
     31062@@ -1,5 +1,5 @@
     31063 /****************************************************************************
     31064- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
     31065+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
     31066  *                                                                          *
     31067  * Permission is hereby granted, free of charge, to any person obtaining a  *
     31068  * copy of this software and associated documentation files (the            *
     31069@@ -29,26 +29,57 @@
     31070 /****************************************************************************
     31071  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
     31072  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
     31073+ *     and: Juergen Pfeifer                         1997-1999,2008          *
     31074  ****************************************************************************/
     31075 
     31076 /* p_below.c
     31077  */
     31078 #include "panel.priv.h"
     31079 
     31080-MODULE_ID("$Id: p_below.c,v 1.6 2005/02/19 16:45:10 tom Exp $")
     31081+MODULE_ID("$Id: p_below.c,v 1.7 2009/04/11 20:17:59 tom Exp $")
     31082 
     31083+#if NCURSES_SP_FUNCS
     31084 NCURSES_EXPORT(PANEL *)
     31085-panel_below(const PANEL * pan)
     31086+ceiling_panel(SCREEN * sp)
     31087 {
     31088-  T((T_CALLED("panel_below(%p)"), pan));
     31089-  if (!pan)
     31090+  T((T_CALLED("ceiling_panel(%p)"), sp));
     31091+  if (sp)
     31092     {
     31093+      struct panelhook *ph = NCURSES_SP_NAME(_nc_panelhook) (sp);
     31094+
     31095       /* if top and bottom are equal, we have no or only the pseudo panel */
     31096       returnPanel(EMPTY_STACK()? (PANEL *) 0 : _nc_top_panel);
     31097     }
     31098   else
     31099     {
     31100+      if (0 == CURRENT_SCREEN)
     31101+       returnPanel(0);
     31102+      else
     31103+       returnPanel(ceiling_panel(CURRENT_SCREEN));
     31104+    }
     31105+}
     31106+#endif
     31107+
     31108+NCURSES_EXPORT(PANEL *)
     31109+panel_below(const PANEL * pan)
     31110+{
     31111+  PANEL *result;
     31112+
     31113+  T((T_CALLED("panel_below(%p)"), pan));
     31114+  if (pan)
     31115+    {
     31116+      GetHook(pan);
     31117       /* we must not return the pseudo panel */
     31118-      returnPanel(Is_Pseudo(pan->below) ? (PANEL *) 0 : pan->below);
     31119+      result = Is_Pseudo(pan->below) ? (PANEL *) 0 : pan->below;
     31120+    }
     31121+  else
     31122+    {
     31123+#if NCURSES_SP_FUNCS
     31124+      result = ceiling_panel(CURRENT_SCREEN);
     31125+#else
     31126+      /* if top and bottom are equal, we have no or only the pseudo panel */
     31127+      result = EMPTY_STACK()? (PANEL *) 0 : _nc_top_panel;
     31128+#endif
     31129     }
     31130+  returnPanel(result);
     31131 }
     31132diff -Naur ncurses-5.7.orig/panel/p_bottom.c ncurses-5.7/panel/p_bottom.c
     31133--- ncurses-5.7.orig/panel/p_bottom.c   2005-02-19 08:38:16.000000000 -0800
     31134+++ ncurses-5.7/panel/p_bottom.c        2009-06-05 14:01:33.000000000 -0700
     31135@@ -1,5 +1,5 @@
     31136 /****************************************************************************
     31137- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
     31138+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
     31139  *                                                                          *
     31140  * Permission is hereby granted, free of charge, to any person obtaining a  *
     31141  * copy of this software and associated documentation files (the            *
     31142@@ -29,6 +29,7 @@
     31143 /****************************************************************************
     31144  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
     31145  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
     31146+ *     and: Juergen Pfeifer                         1997-1999,2008          *
     31147  ****************************************************************************/
     31148 
     31149 /* p_bottom.c
     31150@@ -36,7 +37,7 @@
     31151  */
     31152 #include "panel.priv.h"
     31153 
     31154-MODULE_ID("$Id: p_bottom.c,v 1.11 2005/02/19 16:38:16 tom Exp $")
     31155+MODULE_ID("$Id: p_bottom.c,v 1.12 2008/11/16 00:19:59 juergen Exp $")
     31156 
     31157 NCURSES_EXPORT(int)
     31158 bottom_panel(PANEL * pan)
     31159@@ -46,6 +47,7 @@
     31160   T((T_CALLED("bottom_panel(%p)"), pan));
     31161   if (pan)
     31162     {
     31163+      GetHook(pan);
     31164       if (!Is_Bottom(pan))
     31165        {
     31166 
     31167diff -Naur ncurses-5.7.orig/panel/p_delete.c ncurses-5.7/panel/p_delete.c
     31168--- ncurses-5.7.orig/panel/p_delete.c   2005-02-19 08:38:45.000000000 -0800
     31169+++ ncurses-5.7/panel/p_delete.c        2009-06-05 14:01:33.000000000 -0700
     31170@@ -1,5 +1,5 @@
     31171 /****************************************************************************
     31172- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
     31173+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
     31174  *                                                                          *
     31175  * Permission is hereby granted, free of charge, to any person obtaining a  *
     31176  * copy of this software and associated documentation files (the            *
     31177@@ -29,6 +29,7 @@
     31178 /****************************************************************************
     31179  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
     31180  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
     31181+ *     and: Juergen Pfeifer                         1999,2008               *
     31182  ****************************************************************************/
     31183 
     31184 /* p_delete.c
     31185@@ -36,7 +37,7 @@
     31186  */
     31187 #include "panel.priv.h"
     31188 
     31189-MODULE_ID("$Id: p_delete.c,v 1.8 2005/02/19 16:38:45 tom Exp $")
     31190+MODULE_ID("$Id: p_delete.c,v 1.9 2009/04/11 18:58:36 tom Exp $")
     31191 
     31192 NCURSES_EXPORT(int)
     31193 del_panel(PANEL * pan)
     31194@@ -47,8 +48,11 @@
     31195   if (pan)
     31196     {
     31197       dBug(("--> del_panel %s", USER_PTR(pan->user)));
     31198-      HIDE_PANEL(pan, err, OK);
     31199-      free((void *)pan);
     31200+      {
     31201+       GetHook(pan);
     31202+       HIDE_PANEL(pan, err, OK);
     31203+       free((void *)pan);
     31204+      }
     31205     }
     31206   else
     31207     err = ERR;
     31208diff -Naur ncurses-5.7.orig/panel/p_hidden.c ncurses-5.7/panel/p_hidden.c
     31209--- ncurses-5.7.orig/panel/p_hidden.c   2005-02-19 08:39:17.000000000 -0800
     31210+++ ncurses-5.7/panel/p_hidden.c        2009-06-05 14:01:33.000000000 -0700
     31211@@ -1,5 +1,5 @@
     31212 /****************************************************************************
     31213- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
     31214+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
     31215  *                                                                          *
     31216  * Permission is hereby granted, free of charge, to any person obtaining a  *
     31217  * copy of this software and associated documentation files (the            *
     31218@@ -29,6 +29,7 @@
     31219 /****************************************************************************
     31220  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
     31221  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
     31222+ *     and: Juergen Pfeifer                         1997-1999,2008          *
     31223  ****************************************************************************/
     31224 
     31225 /* p_hidden.c
     31226@@ -36,13 +37,18 @@
     31227  */
     31228 #include "panel.priv.h"
     31229 
     31230-MODULE_ID("$Id: p_hidden.c,v 1.7 2005/02/19 16:39:17 tom Exp $")
     31231+MODULE_ID("$Id: p_hidden.c,v 1.8 2009/04/11 19:01:56 tom Exp $")
     31232 
     31233 NCURSES_EXPORT(int)
     31234 panel_hidden(const PANEL * pan)
     31235 {
     31236+  int rc = ERR;
     31237+
     31238   T((T_CALLED("panel_hidden(%p)"), pan));
     31239-  if (!pan)
     31240-    returnCode(ERR);
     31241-  returnCode(IS_LINKED(pan) ? FALSE : TRUE);
     31242+  if (pan)
     31243+    {
     31244+      GetHook(pan);
     31245+      rc = (IS_LINKED(pan) ? FALSE : TRUE);
     31246+    }
     31247+  returnCode(rc);
     31248 }
     31249diff -Naur ncurses-5.7.orig/panel/p_hide.c ncurses-5.7/panel/p_hide.c
     31250--- ncurses-5.7.orig/panel/p_hide.c     2005-02-19 08:39:41.000000000 -0800
     31251+++ ncurses-5.7/panel/p_hide.c  2009-06-05 14:01:33.000000000 -0700
     31252@@ -36,23 +36,27 @@
     31253  */
     31254 #include "panel.priv.h"
     31255 
     31256-MODULE_ID("$Id: p_hide.c,v 1.9 2005/02/19 16:39:41 tom Exp $")
     31257+MODULE_ID("$Id: p_hide.c,v 1.10 2009/02/07 23:11:45 tom Exp $")
     31258 
     31259 NCURSES_EXPORT(int)
     31260 hide_panel(register PANEL * pan)
     31261 {
     31262-  int err = OK;
     31263+  int err = ERR;
     31264 
     31265   T((T_CALLED("hide_panel(%p)"), pan));
     31266-  if (!pan)
     31267-    returnCode(ERR);
     31268 
     31269-  dBug(("--> hide_panel %s", USER_PTR(pan->user)));
     31270-  dStack("<u%d>", 1, pan);
     31271+  if (pan)
     31272+    {
     31273+      GetHook(pan);
     31274 
     31275-  HIDE_PANEL(pan, err, ERR);
     31276+      dBug(("--> hide_panel %s", USER_PTR(pan->user)));
     31277+      dStack("<u%d>", 1, pan);
     31278 
     31279-  dStack("<u%d>", 9, pan);
     31280+      HIDE_PANEL(pan, err, ERR);
     31281 
     31282+      err = OK;
     31283+
     31284+      dStack("<u%d>", 9, pan);
     31285+    }
     31286   returnCode(err);
     31287 }
     31288diff -Naur ncurses-5.7.orig/panel/p_move.c ncurses-5.7/panel/p_move.c
     31289--- ncurses-5.7.orig/panel/p_move.c     2005-02-19 08:46:49.000000000 -0800
     31290+++ ncurses-5.7/panel/p_move.c  2009-06-05 14:01:33.000000000 -0700
     31291@@ -1,5 +1,5 @@
     31292 /****************************************************************************
     31293- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
     31294+ * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc.              *
     31295  *                                                                          *
     31296  * Permission is hereby granted, free of charge, to any person obtaining a  *
     31297  * copy of this software and associated documentation files (the            *
     31298@@ -29,6 +29,7 @@
     31299 /****************************************************************************
     31300  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
     31301  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
     31302+ *     and: Juergen Pfeifer                         1997-1999,2009          *
     31303  ****************************************************************************/
     31304 
     31305 /* p_move.c
     31306@@ -36,21 +37,24 @@
     31307  */
     31308 #include "panel.priv.h"
     31309 
     31310-MODULE_ID("$Id: p_move.c,v 1.9 2005/02/19 16:46:49 tom Exp $")
     31311+MODULE_ID("$Id: p_move.c,v 1.10 2008/11/16 00:19:59 juergen Exp $")
     31312 
     31313 NCURSES_EXPORT(int)
     31314 move_panel(PANEL * pan, int starty, int startx)
     31315 {
     31316-  T((T_CALLED("move_panel(%p,%d,%d)"), pan, starty, startx));
     31317+  int rc = ERR;
     31318 
     31319-  if (!pan)
     31320-    returnCode(ERR);
     31321+  T((T_CALLED("move_panel(%p,%d,%d)"), pan, starty, startx));
     31322 
     31323-  if (IS_LINKED(pan))
     31324+  if (pan)
     31325     {
     31326-      Touchpan(pan);
     31327-      PANEL_UPDATE(pan, (PANEL *) 0);
     31328+      GetHook(pan);
     31329+      if (IS_LINKED(pan))
     31330+       {
     31331+         Touchpan(pan);
     31332+         PANEL_UPDATE(pan, (PANEL *) 0);
     31333+       }
     31334+      rc = mvwin(pan->win, starty, startx);
     31335     }
     31336-
     31337-  returnCode(mvwin(pan->win, starty, startx));
     31338+  returnCode(rc);
     31339 }
     31340diff -Naur ncurses-5.7.orig/panel/p_new.c ncurses-5.7/panel/p_new.c
     31341--- ncurses-5.7.orig/panel/p_new.c      2008-08-04 11:25:48.000000000 -0700
     31342+++ ncurses-5.7/panel/p_new.c   2009-06-05 14:01:33.000000000 -0700
     31343@@ -1,5 +1,5 @@
     31344 /****************************************************************************
     31345- * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc.              *
     31346+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     31347  *                                                                          *
     31348  * Permission is hereby granted, free of charge, to any person obtaining a  *
     31349  * copy of this software and associated documentation files (the            *
     31350@@ -38,7 +38,7 @@
     31351  */
     31352 #include "panel.priv.h"
     31353 
     31354-MODULE_ID("$Id: p_new.c,v 1.10 2008/08/04 18:25:48 tom Exp $")
     31355+MODULE_ID("$Id: p_new.c,v 1.14 2009/04/11 20:43:04 tom Exp $")
     31356 
     31357 #ifdef TRACE
     31358 static char *stdscr_id;
     31359@@ -50,20 +50,27 @@
     31360   Establish the pseudo panel for stdscr if necessary.
     31361 --------------------------------------------------------------------------*/
     31362 static PANEL *
     31363-root_panel(void)
     31364+root_panel(NCURSES_SP_DCL0)
     31365 {
     31366+#if NCURSES_SP_FUNCS
     31367+  struct panelhook *ph = NCURSES_SP_NAME(_nc_panelhook) (sp);
     31368+
     31369+#elif NO_LEAKS
     31370+  struct panelhook *ph = _nc_panelhook();
     31371+#endif
     31372+
     31373   if (_nc_stdscr_pseudo_panel == (PANEL *) 0)
     31374     {
     31375 
     31376-      assert(stdscr && !_nc_bottom_panel && !_nc_top_panel);
     31377+      assert(SP_PARM && SP_PARM->_stdscr && !_nc_bottom_panel && !_nc_top_panel);
     31378 #if NO_LEAKS
     31379-      _nc_panelhook()->destroy = del_panel;
     31380+      ph->destroy = del_panel;
     31381 #endif
     31382       _nc_stdscr_pseudo_panel = (PANEL *) malloc(sizeof(PANEL));
     31383       if (_nc_stdscr_pseudo_panel != 0)
     31384        {
     31385          PANEL *pan = _nc_stdscr_pseudo_panel;
     31386-         WINDOW *win = stdscr;
     31387+         WINDOW *win = SP_PARM->_stdscr;
     31388 
     31389          pan->win = win;
     31390          pan->below = (PANEL *) 0;
     31391@@ -86,13 +93,15 @@
     31392 {
     31393   PANEL *pan = (PANEL *) 0;
     31394 
     31395+  GetWindowHook(win);
     31396+
     31397   T((T_CALLED("new_panel(%p)"), win));
     31398 
     31399   if (!win)
     31400     returnPanel(pan);
     31401 
     31402   if (!_nc_stdscr_pseudo_panel)
     31403-    (void)root_panel();
     31404+    (void)root_panel(NCURSES_SP_ARG);
     31405   assert(_nc_stdscr_pseudo_panel);
     31406 
     31407   if (!(win->_flags & _ISPAD) && (pan = (PANEL *) malloc(sizeof(PANEL))))
     31408diff -Naur ncurses-5.7.orig/panel/p_replace.c ncurses-5.7/panel/p_replace.c
     31409--- ncurses-5.7.orig/panel/p_replace.c  2005-02-19 08:41:31.000000000 -0800
     31410+++ ncurses-5.7/panel/p_replace.c       2009-06-05 14:01:33.000000000 -0700
     31411@@ -36,23 +36,25 @@
     31412  */
     31413 #include "panel.priv.h"
     31414 
     31415-MODULE_ID("$Id: p_replace.c,v 1.9 2005/02/19 16:41:31 tom Exp $")
     31416+MODULE_ID("$Id: p_replace.c,v 1.10 2009/02/07 23:11:45 tom Exp $")
     31417 
     31418 NCURSES_EXPORT(int)
     31419 replace_panel(PANEL * pan, WINDOW *win)
     31420 {
     31421-  T((T_CALLED("replace_panel(%p,%p)"), pan, win));
     31422+  int rc = ERR;
     31423 
     31424-  if (!pan)
     31425-    returnCode(ERR);
     31426+  T((T_CALLED("replace_panel(%p,%p)"), pan, win));
     31427 
     31428-  if (IS_LINKED(pan))
     31429+  if (pan)
     31430     {
     31431-      Touchpan(pan);
     31432-      PANEL_UPDATE(pan, (PANEL *) 0);
     31433+      GetHook(pan);
     31434+      if (IS_LINKED(pan))
     31435+       {
     31436+         Touchpan(pan);
     31437+         PANEL_UPDATE(pan, (PANEL *) 0);
     31438+       }
     31439+      pan->win = win;
     31440+      rc = OK;
     31441     }
     31442-
     31443-  pan->win = win;
     31444-
     31445-  returnCode(OK);
     31446+  returnCode(rc);
     31447 }
     31448diff -Naur ncurses-5.7.orig/panel/p_show.c ncurses-5.7/panel/p_show.c
     31449--- ncurses-5.7.orig/panel/p_show.c     2005-02-19 08:42:02.000000000 -0800
     31450+++ ncurses-5.7/panel/p_show.c  2009-06-05 14:01:33.000000000 -0700
     31451@@ -36,34 +36,37 @@
     31452  */
     31453 #include "panel.priv.h"
     31454 
     31455-MODULE_ID("$Id: p_show.c,v 1.11 2005/02/19 16:42:02 tom Exp $")
     31456+MODULE_ID("$Id: p_show.c,v 1.12 2009/02/07 23:11:45 tom Exp $")
     31457 
     31458 NCURSES_EXPORT(int)
     31459 show_panel(PANEL * pan)
     31460 {
     31461-  int err = OK;
     31462+  int err = ERR;
     31463 
     31464   T((T_CALLED("show_panel(%p)"), pan));
     31465 
     31466-  if (!pan)
     31467-    returnCode(ERR);
     31468+  if (pan)
     31469+    {
     31470+      GetHook(pan);
     31471 
     31472-  if (Is_Top(pan))
     31473-    returnCode(OK);
     31474+      if (Is_Top(pan))
     31475+       returnCode(OK);
     31476 
     31477-  dBug(("--> show_panel %s", USER_PTR(pan->user)));
     31478+      dBug(("--> show_panel %s", USER_PTR(pan->user)));
     31479 
     31480-  HIDE_PANEL(pan, err, OK);
     31481+      HIDE_PANEL(pan, err, OK);
     31482 
     31483-  dStack("<lt%d>", 1, pan);
     31484-  assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel);
     31485+      dStack("<lt%d>", 1, pan);
     31486+      assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel);
     31487 
     31488-  _nc_top_panel->above = pan;
     31489-  pan->below = _nc_top_panel;
     31490-  pan->above = (PANEL *) 0;
     31491-  _nc_top_panel = pan;
     31492+      _nc_top_panel->above = pan;
     31493+      pan->below = _nc_top_panel;
     31494+      pan->above = (PANEL *) 0;
     31495+      _nc_top_panel = pan;
     31496 
     31497-  dStack("<lt%d>", 9, pan);
     31498+      err = OK;
     31499 
     31500-  returnCode(OK);
     31501+      dStack("<lt%d>", 9, pan);
     31502+    }
     31503+  returnCode(err);
     31504 }
     31505diff -Naur ncurses-5.7.orig/panel/p_update.c ncurses-5.7/panel/p_update.c
     31506--- ncurses-5.7.orig/panel/p_update.c   2005-02-19 08:49:47.000000000 -0800
     31507+++ ncurses-5.7/panel/p_update.c        2009-06-05 14:01:33.000000000 -0700
     31508@@ -1,5 +1,5 @@
     31509 /****************************************************************************
     31510- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc.              *
     31511+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc.              *
     31512  *                                                                          *
     31513  * Permission is hereby granted, free of charge, to any person obtaining a  *
     31514  * copy of this software and associated documentation files (the            *
     31515@@ -29,6 +29,7 @@
     31516 /****************************************************************************
     31517  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
     31518  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
     31519+ *     and: Juergen Pfeifer                         1997-1999,2008          *
     31520  ****************************************************************************/
     31521 
     31522 /* p_update.c
     31523@@ -36,28 +37,42 @@
     31524  */
     31525 #include "panel.priv.h"
     31526 
     31527-MODULE_ID("$Id: p_update.c,v 1.9 2005/02/19 16:49:47 tom Exp $")
     31528+MODULE_ID("$Id: p_update.c,v 1.10 2009/04/11 19:48:36 tom Exp $")
     31529 
     31530 NCURSES_EXPORT(void)
     31531-update_panels(void)
     31532+NCURSES_SP_NAME(update_panels) (NCURSES_SP_DCL0)
     31533 {
     31534   PANEL *pan;
     31535 
     31536-  T((T_CALLED("update_panels()")));
     31537+  T((T_CALLED("update_panels(%p)"), SP_PARM));
     31538   dBug(("--> update_panels"));
     31539-  pan = _nc_bottom_panel;
     31540-  while (pan && pan->above)
     31541-    {
     31542-      PANEL_UPDATE(pan, pan->above);
     31543-      pan = pan->above;
     31544-    }
     31545 
     31546-  pan = _nc_bottom_panel;
     31547-  while (pan)
     31548+  if (SP_PARM)
     31549     {
     31550-      Wnoutrefresh(pan);
     31551-      pan = pan->above;
     31552+      GetScreenHook(SP_PARM);
     31553+
     31554+      pan = _nc_bottom_panel;
     31555+      while (pan && pan->above)
     31556+       {
     31557+         PANEL_UPDATE(pan, pan->above);
     31558+         pan = pan->above;
     31559+       }
     31560+
     31561+      pan = _nc_bottom_panel;
     31562+      while (pan)
     31563+       {
     31564+         Wnoutrefresh(pan);
     31565+         pan = pan->above;
     31566+       }
     31567     }
     31568 
     31569   returnVoid;
     31570 }
     31571+
     31572+#if NCURSES_SP_FUNCS
     31573+NCURSES_EXPORT(void)
     31574+update_panels(void)
     31575+{
     31576+  NCURSES_SP_NAME(update_panels) (CURRENT_SCREEN);
     31577+}
     31578+#endif
    2097431579diff -Naur ncurses-5.7.orig/progs/Makefile.in ncurses-5.7/progs/Makefile.in
    2097531580--- ncurses-5.7.orig/progs/Makefile.in  2008-09-07 06:58:55.000000000 -0700
    20976 +++ ncurses-5.7/progs/Makefile.in       2009-03-22 21:17:09.916267635 -0700
     31581+++ ncurses-5.7/progs/Makefile.in       2009-06-05 14:01:30.000000000 -0700
    2097731582@@ -1,6 +1,6 @@
    2097831583-# $Id: Makefile.in,v 1.79 2008/09/07 13:58:55 tom Exp $
    20979 +# $Id: Makefile.in,v 1.81 2009/03/14 18:45:55 tom Exp $
     31584+# $Id: Makefile.in,v 1.82 2009/03/28 20:30:58 tom Exp $
    2098031585 ##############################################################################
    2098131586-# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc.                #
     
    2101331618+       echo "#include <progs.priv.h>"                                  >>$@
    2101431619+       echo "extern bool same_program(const char *, const char *);"    >>$@
    21015 +       -test -n "$x" && echo "#define SUFFIX_IGNORED \"$x\""           >>$@
     31620+       -sh -c 'if test -n "$x" ; then echo "#define SUFFIX_IGNORED \"$x\"">>$@; fi'
    2101631621+       echo "#define PROG_CAPTOINFO \"$(define_captoinfo)\""           >>$@
    2101731622+       echo "#define PROG_INFOTOCAP \"$(define_infotocap)\""           >>$@
     
    2108531690diff -Naur ncurses-5.7.orig/progs/modules ncurses-5.7/progs/modules
    2108631691--- ncurses-5.7.orig/progs/modules      2006-12-23 16:53:21.000000000 -0800
    21087 +++ ncurses-5.7/progs/modules   2009-03-22 21:17:09.916267635 -0700
     31692+++ ncurses-5.7/progs/modules   2009-06-05 14:01:21.000000000 -0700
    2108831693@@ -1,7 +1,7 @@
    2108931694-# $Id: modules,v 1.13 2006/12/24 00:53:21 tom Exp $
     
    2110831713diff -Naur ncurses-5.7.orig/progs/tabs.c ncurses-5.7/progs/tabs.c
    2110931714--- ncurses-5.7.orig/progs/tabs.c       1969-12-31 16:00:00.000000000 -0800
    21110 +++ ncurses-5.7/progs/tabs.c    2009-03-22 21:16:46.494768822 -0700
     31715+++ ncurses-5.7/progs/tabs.c    2009-06-05 14:00:52.000000000 -0700
    2111131716@@ -0,0 +1,506 @@
    2111231717+/****************************************************************************
     
    2161832223diff -Naur ncurses-5.7.orig/progs/tic.c ncurses-5.7/progs/tic.c
    2161932224--- ncurses-5.7.orig/progs/tic.c        2008-09-13 09:59:24.000000000 -0700
    21620 +++ ncurses-5.7/progs/tic.c     2009-03-22 21:17:09.916267635 -0700
     32225+++ ncurses-5.7/progs/tic.c     2009-06-05 14:01:21.000000000 -0700
    2162132226@@ -1,5 +1,5 @@
    2162232227 /****************************************************************************
     
    2165132256diff -Naur ncurses-5.7.orig/progs/tput.c ncurses-5.7/progs/tput.c
    2165232257--- ncurses-5.7.orig/progs/tput.c       2008-07-13 04:05:12.000000000 -0700
    21653 +++ ncurses-5.7/progs/tput.c    2009-03-22 21:17:09.916267635 -0700
     32258+++ ncurses-5.7/progs/tput.c    2009-06-05 14:01:21.000000000 -0700
    2165432259@@ -1,5 +1,5 @@
    2165532260 /****************************************************************************
     
    2168132286diff -Naur ncurses-5.7.orig/progs/transform.c ncurses-5.7/progs/transform.c
    2168232287--- ncurses-5.7.orig/progs/transform.c  1969-12-31 16:00:00.000000000 -0800
    21683 +++ ncurses-5.7/progs/transform.c       2009-03-22 21:17:09.916267635 -0700
     32288+++ ncurses-5.7/progs/transform.c       2009-06-05 14:01:21.000000000 -0700
    2168432289@@ -0,0 +1,79 @@
    2168532290+/****************************************************************************
     
    2176432369diff -Naur ncurses-5.7.orig/progs/tset.c ncurses-5.7/progs/tset.c
    2176532370--- ncurses-5.7.orig/progs/tset.c       2008-10-11 12:26:19.000000000 -0700
    21766 +++ ncurses-5.7/progs/tset.c    2009-03-22 21:17:09.916267635 -0700
     32371+++ ncurses-5.7/progs/tset.c    2009-06-05 14:01:21.000000000 -0700
    2176732372@@ -1,5 +1,5 @@
    2176832373 /****************************************************************************
     
    2179032395        reset_mode();
    2179132396     }
     32397diff -Naur ncurses-5.7.orig/test/aclocal.m4 ncurses-5.7/test/aclocal.m4
     32398--- ncurses-5.7.orig/test/aclocal.m4    2008-02-09 10:22:17.000000000 -0800
     32399+++ ncurses-5.7/test/aclocal.m4 2009-06-05 14:01:30.000000000 -0700
     32400@@ -1,5 +1,5 @@
     32401 dnl***************************************************************************
     32402-dnl Copyright (c) 2003-2007,2008 Free Software Foundation, Inc.              *
     32403+dnl Copyright (c) 2003-2008,2009 Free Software Foundation, Inc.              *
     32404 dnl                                                                          *
     32405 dnl Permission is hereby granted, free of charge, to any person obtaining a  *
     32406 dnl copy of this software and associated documentation files (the            *
     32407@@ -26,7 +26,7 @@
     32408 dnl authorization.                                                           *
     32409 dnl***************************************************************************
     32410 dnl
     32411-dnl $Id: aclocal.m4,v 1.22 2008/02/09 18:22:17 tom Exp $
     32412+dnl $Id: aclocal.m4,v 1.25 2009/03/28 20:09:37 tom Exp $
     32413 dnl
     32414 dnl Author: Thomas E. Dickey
     32415 dnl
     32416@@ -40,7 +40,7 @@
     32417 dnl
     32418 dnl ---------------------------------------------------------------------------
     32419 dnl ---------------------------------------------------------------------------
     32420-dnl CF_ADD_CFLAGS version: 7 updated: 2004/04/25 17:48:30
     32421+dnl CF_ADD_CFLAGS version: 8 updated: 2009/01/06 19:33:30
     32422 dnl -------------
     32423 dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
     32424 dnl The second parameter if given makes this macro verbose.
     32425@@ -110,7 +110,7 @@
     32426 
     32427 if test -n "$cf_new_cppflags" ; then
     32428        ifelse($2,,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)])
     32429-       CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
     32430+       CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
     32431 fi
     32432 
     32433 if test -n "$cf_new_extra_cppflags" ; then
     32434@@ -122,7 +122,7 @@
     32435 
     32436 ])dnl
     32437 dnl ---------------------------------------------------------------------------
     32438-dnl CF_ADD_INCDIR version: 9 updated: 2008/02/09 13:15:34
     32439+dnl CF_ADD_INCDIR version: 12 updated: 2009/01/18 10:00:47
     32440 dnl -------------
     32441 dnl Add an include-directory to $CPPFLAGS.  Don't add /usr/include, since it's
     32442 dnl redundant.  We don't normally need to add -I/usr/local/include for gcc,
     32443@@ -149,7 +149,7 @@
     32444                fi
     32445 
     32446                if test "$cf_have_incdir" = no ; then
     32447-          if test "$cf_add_incdir" = /usr/local/include ; then
     32448+                 if test "$cf_add_incdir" = /usr/local/include ; then
     32449                        if test "$GCC" = yes
     32450                        then
     32451                          cf_save_CPPFLAGS=$CPPFLAGS
     32452@@ -165,11 +165,11 @@
     32453 
     32454                if test "$cf_have_incdir" = no ; then
     32455                  CF_VERBOSE(adding $cf_add_incdir to include-path)
     32456-                 ifelse($2,,CPPFLAGS,$2)="-I$cf_add_incdir $ifelse($2,,CPPFLAGS,[$]$2)"
     32457+                 ifelse($2,,CPPFLAGS,$2)="$ifelse($2,,CPPFLAGS,$2) -I$cf_add_incdir"
     32458 
     32459-          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
     32460-          test "$cf_top_incdir" = "$cf_add_incdir" && break
     32461-          cf_add_incdir="$cf_top_incdir"
     32462+                 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
     32463+                 test "$cf_top_incdir" = "$cf_add_incdir" && break
     32464+                 cf_add_incdir="$cf_top_incdir"
     32465                else
     32466                  break
     32467                fi
     32468@@ -179,7 +179,7 @@
     32469 fi
     32470 ])dnl
     32471 dnl ---------------------------------------------------------------------------
     32472-dnl CF_ADD_LIBDIR version: 6 updated: 2008/02/09 13:15:34
     32473+dnl CF_ADD_LIBDIR version: 8 updated: 2009/01/18 10:01:08
     32474 dnl -------------
     32475 dnl    Adds to the library-path
     32476 dnl
     32477@@ -208,7 +208,7 @@
     32478       fi
     32479       if test "$cf_have_libdir" = no ; then
     32480         CF_VERBOSE(adding $cf_add_libdir to library-path)
     32481-        ifelse($2,,LDFLAGS,$2)="-L$cf_add_libdir $ifelse($2,,LDFLAGS,[$]$2)"
     32482+        ifelse($2,,LDFLAGS,$2)="-L$cf_add_libdir $ifelse($2,,LDFLAGS,$2)"
     32483       fi
     32484     fi
     32485   done
     32486@@ -289,7 +289,7 @@
     32487 fi
     32488 ])dnl
     32489 dnl ---------------------------------------------------------------------------
     32490-dnl CF_ANSI_CC_REQD version: 3 updated: 1997/09/06 13:40:44
     32491+dnl CF_ANSI_CC_REQD version: 4 updated: 2008/03/23 14:48:54
     32492 dnl ---------------
     32493 dnl For programs that must use an ANSI compiler, obtain compiler options that
     32494 dnl will make it recognize prototypes.  We'll do preprocessor checks in other
     32495@@ -298,7 +298,7 @@
     32496 AC_DEFUN([CF_ANSI_CC_REQD],
     32497 [AC_REQUIRE([CF_ANSI_CC_CHECK])
     32498 if test "$cf_cv_ansi_cc" = "no"; then
     32499-       AC_ERROR(
     32500+       AC_MSG_ERROR(
     32501 [Your compiler does not appear to recognize prototypes.
     32502 You have the following choices:
     32503        a. adjust your compiler options
     32504@@ -342,7 +342,7 @@
     32505 ])dnl
     32506   ])])dnl
     32507 dnl ---------------------------------------------------------------------------
     32508-dnl CF_CHECK_CACHE version: 10 updated: 2004/05/23 13:03:31
     32509+dnl CF_CHECK_CACHE version: 11 updated: 2008/03/23 14:45:59
     32510 dnl --------------
     32511 dnl Check if we're accidentally using a cache from a different machine.
     32512 dnl Derive the system name, as a check for reusing the autoconf cache.
     32513@@ -373,7 +373,7 @@
     32514 
     32515 if test ".$system_name" != ".$cf_cv_system_name" ; then
     32516        AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name))
     32517-       AC_ERROR("Please remove config.cache and try again.")
     32518+       AC_MSG_ERROR("Please remove config.cache and try again.")
     32519 fi
     32520 ])dnl
     32521 dnl ---------------------------------------------------------------------------
     32522@@ -399,14 +399,15 @@
     32523 fi
     32524 ])dnl
     32525 dnl ---------------------------------------------------------------------------
     32526-dnl CF_CURSES_ACS_MAP version: 3 updated: 2003/05/17 22:19:02
     32527+dnl CF_CURSES_ACS_MAP version: 5 updated: 2009/03/28 16:08:10
     32528 dnl -----------------
     32529 dnl Check for likely values of acs_map[]:
     32530 AC_DEFUN([CF_CURSES_ACS_MAP],
     32531 [
     32532+AC_REQUIRE([CF_NCURSES_WRAP_PREFIX])dnl
     32533 AC_CACHE_CHECK(for alternate character set array, cf_cv_curses_acs_map,[
     32534 cf_cv_curses_acs_map=unknown
     32535-for name in acs_map _acs_map __acs_map _nc_acs_map
     32536+for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
     32537 do
     32538 AC_TRY_LINK([
     32539 #include <${cf_cv_ncurses_header-curses.h}>
     32540@@ -441,7 +442,7 @@
     32541 fi
     32542 ])dnl
     32543 dnl ---------------------------------------------------------------------------
     32544-dnl CF_CURSES_CPPFLAGS version: 9 updated: 2006/02/04 19:44:43
     32545+dnl CF_CURSES_CPPFLAGS version: 10 updated: 2009/01/06 19:34:11
     32546 dnl ------------------
     32547 dnl Look for the curses headers.
     32548 AC_DEFUN([CF_CURSES_CPPFLAGS],[
     32549@@ -460,7 +461,7 @@
     32550        ;;
     32551 esac
     32552 ])
     32553-test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"
     32554+test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
     32555 
     32556 CF_CURSES_HEADER
     32557 CF_TERM_HEADER
     32558@@ -549,7 +550,7 @@
     32559 AC_CHECK_HEADERS($cf_cv_ncurses_header)
     32560 ])dnl
     32561 dnl ---------------------------------------------------------------------------
     32562-dnl CF_CURSES_LIBS version: 26 updated: 2007/07/29 10:32:40
     32563+dnl CF_CURSES_LIBS version: 29 updated: 2009/01/06 19:34:57
     32564 dnl --------------
     32565 dnl Look for the curses libraries.  Older curses implementations may require
     32566 dnl termcap/termlib to be linked as well.  Call CF_CURSES_CPPFLAGS first.
     32567@@ -576,7 +577,7 @@
     32568     AC_CHECK_LIB(Hcurses,initscr,[
     32569         # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
     32570         LIBS="-lHcurses $LIBS"
     32571-        CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS"
     32572+        CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
     32573         ac_cv_func_initscr=yes
     32574         ])])
     32575     ;;
     32576@@ -615,11 +616,11 @@
     32577 
     32578     # Check for library containing initscr
     32579     test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
     32580-    for cf_curs_lib in $cf_check_list xcurses jcurses unknown
     32581+       for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
     32582     do
     32583         AC_CHECK_LIB($cf_curs_lib,initscr,[break])
     32584     done
     32585-    test $cf_curs_lib = unknown && AC_ERROR(no curses library found)
     32586+    test $cf_curs_lib = unknown && AC_MSG_ERROR(no curses library found)
     32587 
     32588     LIBS="-l$cf_curs_lib $cf_save_LIBS"
     32589     if test "$cf_term_lib" = unknown ; then
     32590@@ -629,7 +630,7 @@
     32591             [cf_result=yes],
     32592             [cf_result=no])
     32593         AC_MSG_RESULT($cf_result)
     32594-        test $cf_result = no && AC_ERROR(Cannot link curses library)
     32595+        test $cf_result = no && AC_MSG_ERROR(Cannot link curses library)
     32596     elif test "$cf_curs_lib" = "$cf_term_lib" ; then
     32597         :
     32598     elif test "$cf_term_lib" != predefined ; then
     32599@@ -772,7 +773,7 @@
     32600 fi
     32601 ])dnl
     32602 dnl ---------------------------------------------------------------------------
     32603-dnl CF_FIND_LIBRARY version: 8 updated: 2004/11/23 20:14:58
     32604+dnl CF_FIND_LIBRARY version: 9 updated: 2008/03/23 14:48:54
     32605 dnl ---------------
     32606 dnl Look for a non-standard library, given parameters for AC_TRY_LINK.  We
     32607 dnl prefer a standard location, and use -L options only if we do not find the
     32608@@ -817,11 +818,124 @@
     32609 eval 'cf_found_library=[$]cf_cv_have_lib_'$1
     32610 ifelse($6,,[
     32611 if test $cf_found_library = no ; then
     32612-       AC_ERROR(Cannot link $1 library)
     32613+       AC_MSG_ERROR(Cannot link $1 library)
     32614 fi
     32615 ])
     32616 ])dnl
     32617 dnl ---------------------------------------------------------------------------
     32618+dnl CF_FIND_LINKAGE version: 13 updated: 2008/12/24 07:59:55
     32619+dnl ---------------
     32620+dnl Find a library (specifically the linkage used in the code fragment),
     32621+dnl searching for it if it is not already in the library path.
     32622+dnl See also CF_ADD_SEARCHPATH.
     32623+dnl
     32624+dnl Parameters (4-on are optional):
     32625+dnl     $1 = headers for library entrypoint
     32626+dnl     $2 = code fragment for library entrypoint
     32627+dnl     $3 = the library name without the "-l" option or ".so" suffix.
     32628+dnl     $4 = action to perform if successful (default: update CPPFLAGS, etc)
     32629+dnl     $5 = action to perform if not successful
     32630+dnl     $6 = module name, if not the same as the library name
     32631+dnl     $7 = extra libraries
     32632+dnl
     32633+dnl Sets these variables:
     32634+dnl     $cf_cv_find_linkage_$3 - yes/no according to whether linkage is found
     32635+dnl     $cf_cv_header_path_$3 - include-directory if needed
     32636+dnl     $cf_cv_library_path_$3 - library-directory if needed
     32637+dnl     $cf_cv_library_file_$3 - library-file if needed, e.g., -l$3
     32638+AC_DEFUN([CF_FIND_LINKAGE],[
     32639+
     32640+# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
     32641+# will be set on completion of the AC_TRY_LINK below.
     32642+cf_cv_header_path_$3=
     32643+cf_cv_library_path_$3=
     32644+
     32645+CF_MSG_LOG([Starting [FIND_LINKAGE]($3,$6)])
     32646+
     32647+AC_TRY_LINK([$1],[$2],
     32648+    cf_cv_find_linkage_$3=yes,[
     32649+    cf_cv_find_linkage_$3=no
     32650+
     32651+    CF_VERBOSE(find linkage for $3 library)
     32652+    CF_MSG_LOG([Searching for headers in [FIND_LINKAGE]($3,$6)])
     32653+
     32654+    cf_save_CPPFLAGS="$CPPFLAGS"
     32655+    cf_test_CPPFLAGS="$CPPFLAGS"
     32656+
     32657+    CF_HEADER_PATH(cf_search,ifelse([$6],,[$3],[$6]))
     32658+    for cf_cv_header_path_$3 in $cf_search
     32659+    do
     32660+      if test -d $cf_cv_header_path_$3 ; then
     32661+        CF_VERBOSE(... testing $cf_cv_header_path_$3)
     32662+        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_$3"
     32663+        AC_TRY_COMPILE([$1],[$2],[
     32664+            CF_VERBOSE(... found $3 headers in $cf_cv_header_path_$3)
     32665+            cf_cv_find_linkage_$3=maybe
     32666+            cf_test_CPPFLAGS="$CPPFLAGS"
     32667+            break],[
     32668+            CPPFLAGS="$cf_save_CPPFLAGS"
     32669+            ])
     32670+      fi
     32671+    done
     32672+
     32673+    if test "$cf_cv_find_linkage_$3" = maybe ; then
     32674+
     32675+      CF_MSG_LOG([Searching for $3 library in [FIND_LINKAGE]($3,$6)])
     32676+
     32677+      cf_save_LIBS="$LIBS"
     32678+      cf_save_LDFLAGS="$LDFLAGS"
     32679+
     32680+      ifelse([$6],,,[
     32681+        CPPFLAGS="$cf_test_CPPFLAGS"
     32682+        LIBS="-l$3 $7 $cf_save_LIBS"
     32683+        AC_TRY_LINK([$1],[$2],[
     32684+            CF_VERBOSE(... found $3 library in system)
     32685+            cf_cv_find_linkage_$3=yes])
     32686+            CPPFLAGS="$cf_save_CPPFLAGS"
     32687+            LIBS="$cf_save_LIBS"
     32688+            ])
     32689+
     32690+      if test "$cf_cv_find_linkage_$3" != yes ; then
     32691+        CF_LIBRARY_PATH(cf_search,$3)
     32692+        for cf_cv_library_path_$3 in $cf_search
     32693+        do
     32694+          if test -d $cf_cv_library_path_$3 ; then
     32695+            CF_VERBOSE(... testing $cf_cv_library_path_$3)
     32696+            CPPFLAGS="$cf_test_CPPFLAGS"
     32697+            LIBS="-l$3 $7 $cf_save_LIBS"
     32698+            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_$3"
     32699+            AC_TRY_LINK([$1],[$2],[
     32700+                CF_VERBOSE(... found $3 library in $cf_cv_library_path_$3)
     32701+                cf_cv_find_linkage_$3=yes
     32702+                cf_cv_library_file_$3="-l$3"
     32703+                break],[
     32704+                CPPFLAGS="$cf_save_CPPFLAGS"
     32705+                LIBS="$cf_save_LIBS"
     32706+                LDFLAGS="$cf_save_LDFLAGS"
     32707+                ])
     32708+          fi
     32709+        done
     32710+        LIBS="$cf_save_LIBS"
     32711+        CPPFLAGS="$cf_save_CPPFLAGS"
     32712+        LDFLAGS="$cf_save_LDFLAGS"
     32713+      fi
     32714+
     32715+    else
     32716+      cf_cv_find_linkage_$3=no
     32717+    fi
     32718+    ],$7)
     32719+
     32720+if test "$cf_cv_find_linkage_$3" = yes ; then
     32721+ifelse([$4],,[
     32722+  CF_ADD_INCDIR($cf_cv_header_path_$3)
     32723+  CF_ADD_LIBDIR($cf_cv_library_path_$3)
     32724+  LIBS="-l$3 $LIBS"
     32725+],[$4])
     32726+else
     32727+ifelse([$5],,AC_MSG_WARN(Cannot find $3 library),[$5])
     32728+fi
     32729+])dnl
     32730+dnl ---------------------------------------------------------------------------
     32731 dnl CF_FUNC_CURSES_VERSION version: 4 updated: 2007/04/28 09:15:55
     32732 dnl ----------------------
     32733 dnl Solaris has a data item 'curses_version', which confuses AC_CHECK_FUNCS.
     32734@@ -933,7 +1047,7 @@
     32735 fi
     32736 ])dnl
     32737 dnl ---------------------------------------------------------------------------
     32738-dnl CF_GCC_WARNINGS version: 22 updated: 2007/07/29 09:55:12
     32739+dnl CF_GCC_WARNINGS version: 24 updated: 2009/02/01 15:21:00
     32740 dnl ---------------
     32741 dnl Check if the compiler supports useful warning options.  There's a few that
     32742 dnl we don't use, simply because they're too noisy:
     32743@@ -966,7 +1080,6 @@
     32744 then
     32745 # The "-wdXXX" options suppress warnings:
     32746 # remark #1419: external declaration in primary source file
     32747-# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
     32748 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
     32749 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
     32750 # remark #193: zero used for undefined preprocessing identifier
     32751@@ -974,19 +1087,18 @@
     32752 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
     32753 # remark #869: parameter "tw" was never referenced
     32754 # remark #981: operands are evaluated in unspecified order
     32755-# warning #269: invalid format string conversion
     32756+# warning #279: controlling expression is constant
     32757 
     32758        AC_CHECKING([for $CC warning options])
     32759        cf_save_CFLAGS="$CFLAGS"
     32760        EXTRA_CFLAGS="-Wall"
     32761        for cf_opt in \
     32762                wd1419 \
     32763-               wd1682 \
     32764                wd1683 \
     32765                wd1684 \
     32766                wd193 \
     32767-               wd279 \
     32768                wd593 \
     32769+               wd279 \
     32770                wd810 \
     32771                wd869 \
     32772                wd981
     32773@@ -1028,7 +1140,7 @@
     32774                                ;;
     32775                        Winline) #(vi
     32776                                case $GCC_VERSION in
     32777-                               3.3*)
     32778+                               [[34]].*)
     32779                                        CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
     32780                                        continue;;
     32781                                esac
     32782@@ -1074,11 +1186,31 @@
     32783 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
     32784 ])dnl
     32785 dnl ---------------------------------------------------------------------------
     32786-dnl CF_HEADER_PATH version: 8 updated: 2002/11/10 14:46:59
     32787+dnl CF_HEADER_PATH version: 9 updated: 2008/12/07 19:38:31
     32788 dnl --------------
     32789-dnl Construct a search-list for a nonstandard header-file
     32790+dnl Construct a search-list of directories for a nonstandard header-file
     32791+dnl
     32792+dnl Parameters
     32793+dnl    $1 = the variable to return as result
     32794+dnl    $2 = the package name
     32795 AC_DEFUN([CF_HEADER_PATH],
     32796-[CF_SUBDIR_PATH($1,$2,include)
     32797+[
     32798+cf_header_path_list=""
     32799+if test -n "${CFLAGS}${CPPFLAGS}" ; then
     32800+       for cf_header_path in $CPPFLAGS $CFLAGS
     32801+       do
     32802+               case $cf_header_path in #(vi
     32803+               -I*)
     32804+                       cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
     32805+                       CF_ADD_SUBDIR_PATH($1,$2,include,$cf_header_path,NONE)
     32806+                       cf_header_path_list="$cf_header_path_list [$]$1"
     32807+                       ;;
     32808+               esac
     32809+       done
     32810+fi
     32811+
     32812+CF_SUBDIR_PATH($1,$2,include)
     32813+
     32814 test "$includedir" != NONE && \
     32815 test "$includedir" != "/usr/include" && \
     32816 test -d "$includedir" && {
     32817@@ -1093,6 +1225,7 @@
     32818        test -d $oldincludedir/$2 && $1="[$]$1 $oldincludedir/$2"
     32819 }
     32820 
     32821+$1="$cf_header_path_list [$]$1"
     32822 ])dnl
     32823 dnl ---------------------------------------------------------------------------
     32824 dnl CF_INHERIT_SCRIPT version: 2 updated: 2003/03/01 23:50:42
     32825@@ -1140,11 +1273,33 @@
     32826 fi
     32827 ])dnl
     32828 dnl ---------------------------------------------------------------------------
     32829-dnl CF_LIBRARY_PATH version: 7 updated: 2002/11/10 14:46:59
     32830+dnl CF_LIBRARY_PATH version: 8 updated: 2008/12/07 19:38:31
     32831 dnl ---------------
     32832-dnl Construct a search-list for a nonstandard library-file
     32833+dnl Construct a search-list of directories for a nonstandard library-file
     32834+dnl
     32835+dnl Parameters
     32836+dnl    $1 = the variable to return as result
     32837+dnl    $2 = the package name
     32838 AC_DEFUN([CF_LIBRARY_PATH],
     32839-[CF_SUBDIR_PATH($1,$2,lib)])dnl
     32840+[
     32841+cf_library_path_list=""
     32842+if test -n "${LDFLAGS}${LIBS}" ; then
     32843+       for cf_library_path in $LDFLAGS $LIBS
     32844+       do
     32845+               case $cf_library_path in #(vi
     32846+               -L*)
     32847+                       cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
     32848+                       CF_ADD_SUBDIR_PATH($1,$2,lib,$cf_library_path,NONE)
     32849+                       cf_library_path_list="$cf_library_path_list [$]$1"
     32850+                       ;;
     32851+               esac
     32852+       done
     32853+fi
     32854+
     32855+CF_SUBDIR_PATH($1,$2,lib)
     32856+
     32857+$1="$cf_library_path_list [$]$1"
     32858+])dnl
     32859 dnl ---------------------------------------------------------------------------
     32860 dnl CF_MSG_LOG version: 4 updated: 2007/07/29 09:55:12
     32861 dnl ----------
     32862@@ -1187,6 +1342,45 @@
     32863        ,[$1=no])
     32864 ])dnl
     32865 dnl ---------------------------------------------------------------------------
     32866+dnl CF_NCURSES_CONFIG version: 5 updated: 2009/01/11 15:31:22
     32867+dnl -----------------
     32868+dnl Tie together the configure-script macros for ncurses.
     32869+dnl Prefer the "-config" script from ncurses 5.6, to simplify analysis.
     32870+dnl Allow that to be overridden using the $NCURSES_CONFIG environment variable.
     32871+dnl
     32872+dnl $1 is the root library name (default: "ncurses")
     32873+AC_DEFUN([CF_NCURSES_CONFIG],
     32874+[
     32875+cf_ncuconfig_root=ifelse($1,,ncurses,$1)
     32876+
     32877+echo "Looking for ${cf_ncuconfig_root}-config"
     32878+AC_PATH_PROGS(NCURSES_CONFIG,${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config,none)
     32879+
     32880+if test "$NCURSES_CONFIG" != none ; then
     32881+
     32882+cf_cv_ncurses_header=curses.h
     32883+
     32884+CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
     32885+LIBS="`$NCURSES_CONFIG --libs` $LIBS"
     32886+
     32887+dnl like CF_NCURSES_CPPFLAGS
     32888+AC_DEFINE(NCURSES)
     32889+
     32890+dnl like CF_NCURSES_LIBS
     32891+CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_ncuconfig_root)
     32892+AC_DEFINE_UNQUOTED($cf_nculib_ROOT)
     32893+
     32894+dnl like CF_NCURSES_VERSION
     32895+cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
     32896+
     32897+else
     32898+
     32899+CF_NCURSES_CPPFLAGS(ifelse($1,,ncurses,$1))
     32900+CF_NCURSES_LIBS(ifelse($1,,ncurses,$1))
     32901+
     32902+fi
     32903+])dnl
     32904+dnl ---------------------------------------------------------------------------
     32905 dnl CF_NCURSES_CPPFLAGS version: 19 updated: 2007/07/29 13:35:20
     32906 dnl -------------------
     32907 dnl Look for the SVr4 curses clone 'ncurses' in the standard places, adjusting
     32908@@ -1238,7 +1432,7 @@
     32909 CF_NCURSES_VERSION
     32910 ])dnl
     32911 dnl ---------------------------------------------------------------------------
     32912-dnl CF_NCURSES_HEADER version: 1 updated: 2005/12/31 13:28:37
     32913+dnl CF_NCURSES_HEADER version: 2 updated: 2008/03/23 14:48:54
     32914 dnl -----------------
     32915 dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common
     32916 dnl variations of ncurses' installs.
     32917@@ -1273,7 +1467,7 @@
     32918                CPPFLAGS="$cf_save2_CPPFLAGS"
     32919                test "$cf_cv_ncurses_h2" != no && break
     32920        done
     32921-       test "$cf_cv_ncurses_h2" = no && AC_ERROR(not found)
     32922+       test "$cf_cv_ncurses_h2" = no && AC_MSG_ERROR(not found)
     32923        ])
     32924 
     32925        CF_DIRNAME(cf_1st_incdir,$cf_cv_ncurses_h2)
     32926@@ -1435,7 +1629,23 @@
     32927 test "$cf_cv_ncurses_version" = no || AC_DEFINE(NCURSES)
     32928 ])dnl
     32929 dnl ---------------------------------------------------------------------------
     32930-dnl CF_PATH_SYNTAX version: 11 updated: 2006/09/02 08:55:46
     32931+dnl CF_NCURSES_WRAP_PREFIX version: 1 updated: 2009/03/28 16:08:10
     32932+dnl ----------------------
     32933+dnl Check for ncurses "wrap-prefix" used for public variables which have been
     32934+dnl wrapped with a function to help with concurrency control.
     32935+AC_DEFUN([CF_NCURSES_WRAP_PREFIX],
     32936+[
     32937+AC_MSG_CHECKING(for ncurses wrap-prefix)
     32938+AC_ARG_WITH(ncurses-wrap-prefix,
     32939+       [  --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables],
     32940+       [NCURSES_WRAP_PREFIX=$withval],
     32941+       [NCURSES_WRAP_PREFIX=_nc_])
     32942+AC_MSG_RESULT($NCURSES_WRAP_PREFIX)
     32943+
     32944+AC_SUBST(NCURSES_WRAP_PREFIX)
     32945+])
     32946+dnl ---------------------------------------------------------------------------
     32947+dnl CF_PATH_SYNTAX version: 12 updated: 2008/03/23 14:45:59
     32948 dnl --------------
     32949 dnl Check the argument to see that it looks like a pathname.  Rewrite it if it
     32950 dnl begins with one of the prefix/exec_prefix variables, and then again if the
     32951@@ -1467,12 +1677,12 @@
     32952   $1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%`
     32953   ;;
     32954 *)
     32955-  ifelse($2,,[AC_ERROR([expected a pathname, not \"[$]$1\"])],$2)
     32956+  ifelse($2,,[AC_MSG_ERROR([expected a pathname, not \"[$]$1\"])],$2)
     32957   ;;
     32958 esac
     32959 ])dnl
     32960 dnl ---------------------------------------------------------------------------
     32961-dnl CF_PDCURSES_X11 version: 7 updated: 2006/11/12 17:31:59
     32962+dnl CF_PDCURSES_X11 version: 9 updated: 2009/01/11 15:31:37
     32963 dnl ---------------
     32964 dnl Configure for PDCurses' X11 library
     32965 AC_DEFUN([CF_PDCURSES_X11],[
     32966@@ -1482,7 +1692,7 @@
     32967 
     32968 if test "$XCURSES_CONFIG" != none ; then
     32969 
     32970-CPPFLAGS="`$XCURSES_CONFIG --cflags` $CPPFLAGS"
     32971+CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
     32972 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
     32973 
     32974 cf_cv_lib_XCurses=yes
     32975@@ -1511,7 +1721,7 @@
     32976        AC_DEFINE(XCURSES)
     32977        AC_DEFINE(HAVE_XCURSES)
     32978 else
     32979-       AC_ERROR(Cannot link with XCurses)
     32980+       AC_MSG_ERROR(Cannot link with XCurses)
     32981 fi
     32982 ])dnl
     32983 dnl ---------------------------------------------------------------------------
     32984@@ -1790,7 +2000,7 @@
     32985 $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
     32986 ])dnl
     32987 dnl ---------------------------------------------------------------------------
     32988-dnl CF_UTF8_LIB version: 4 updated: 2003/03/01 18:36:42
     32989+dnl CF_UTF8_LIB version: 5 updated: 2008/10/17 19:37:52
     32990 dnl -----------
     32991 dnl Check for multibyte support, and if not found, utf8 compatibility library
     32992 AC_DEFUN([CF_UTF8_LIB],
     32993@@ -1800,18 +2010,18 @@
     32994        AC_TRY_LINK([
     32995 #include <stdlib.h>],[putwc(0,0);],
     32996        [cf_cv_utf8_lib=yes],
     32997-       [LIBS="-lutf8 $LIBS"
     32998-        AC_TRY_LINK([
     32999-#include <libutf8.h>],[putwc(0,0);],
     33000+       [CF_FIND_LINKAGE([
     33001+#include <libutf8.h>],[putwc(0,0);],utf8,
     33002                [cf_cv_utf8_lib=add-on],
     33003                [cf_cv_utf8_lib=no])
     33004-       LIBS="$cf_save_LIBS"
     33005 ])])
     33006 
     33007 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
     33008 # ncurses/ncursesw:
     33009 if test "$cf_cv_utf8_lib" = "add-on" ; then
     33010        AC_DEFINE(HAVE_LIBUTF8_H)
     33011+       CF_ADD_INCDIR($cf_cv_header_path_utf8)
     33012+       CF_ADD_LIBDIR($cf_cv_library_path_utf8)
     33013        LIBS="-lutf8 $LIBS"
     33014 fi
     33015 ])dnl
     33016@@ -1866,7 +2076,7 @@
     33017 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
     33018 ])dnl
     33019 dnl ---------------------------------------------------------------------------
     33020-dnl CF_XOPEN_SOURCE version: 25 updated: 2007/01/29 18:36:38
     33021+dnl CF_XOPEN_SOURCE version: 28 updated: 2008/12/27 12:30:03
     33022 dnl ---------------
     33023 dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
     33024 dnl or adapt to the vendor's definitions to get equivalent functionality,
     33025@@ -1883,10 +2093,10 @@
     33026 cf_POSIX_C_SOURCE=ifelse($2,,199506L,$2)
     33027 
     33028 case $host_os in #(vi
     33029-aix[[45]]*) #(vi
     33030+aix[[456]]*) #(vi
     33031        CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
     33032        ;;
     33033-freebsd*) #(vi
     33034+freebsd*|dragonfly*) #(vi
     33035        # 5.x headers associate
     33036        #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
     33037        #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
     33038@@ -1900,7 +2110,7 @@
     33039 irix[[56]].*) #(vi
     33040        CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
     33041        ;;
     33042-linux*|gnu*|k*bsd*-gnu) #(vi
     33043+linux*|gnu*|mint*|k*bsd*-gnu) #(vi
     33044        CF_GNU_SOURCE
     33045        ;;
     33046 mirbsd*) #(vi
     33047@@ -2005,7 +2215,7 @@
     33048 CF_X_ATHENA_LIBS($cf_x_athena)
     33049 ])dnl
     33050 dnl ---------------------------------------------------------------------------
     33051-dnl CF_X_ATHENA_CPPFLAGS version: 2 updated: 2002/10/09 20:00:37
     33052+dnl CF_X_ATHENA_CPPFLAGS version: 3 updated: 2009/01/11 15:33:39
     33053 dnl --------------------
     33054 dnl Normally invoked by CF_X_ATHENA, with $1 set to the appropriate flavor of
     33055 dnl the Athena widgets, e.g., Xaw, Xaw3d, neXtaw.
     33056@@ -2024,7 +2234,7 @@
     33057                cf_save="$CPPFLAGS"
     33058                cf_test=X11/$cf_x_athena_root/SimpleMenu.h
     33059                if test $cf_path != default ; then
     33060-                       CPPFLAGS="-I$cf_path/include $cf_save"
     33061+                       CPPFLAGS="$cf_save -I$cf_path/include"
     33062                        AC_MSG_CHECKING(for $cf_test in $cf_path)
     33063                else
     33064                        AC_MSG_CHECKING(for $cf_test)
     33065@@ -2052,7 +2262,7 @@
     33066 fi
     33067 ])
     33068 dnl ---------------------------------------------------------------------------
     33069-dnl CF_X_ATHENA_LIBS version: 6 updated: 2006/11/30 17:57:11
     33070+dnl CF_X_ATHENA_LIBS version: 7 updated: 2008/03/23 14:46:03
     33071 dnl ----------------
     33072 dnl Normally invoked by CF_X_ATHENA, with $1 set to the appropriate flavor of
     33073 dnl the Athena widgets, e.g., Xaw, Xaw3d, neXtaw.
     33074@@ -2096,7 +2306,7 @@
     33075 done
     33076 
     33077 if test -z "$cf_x_athena_lib" ; then
     33078-       AC_ERROR(
     33079+       AC_MSG_ERROR(
     33080 [Unable to successfully link Athena library (-l$cf_x_athena_root) with test program])
     33081 fi
     33082 
     33083@@ -2104,7 +2314,7 @@
     33084 AC_DEFINE_UNQUOTED($cf_x_athena_LIBS)
     33085 ])
     33086 dnl ---------------------------------------------------------------------------
     33087-dnl CF_X_TOOLKIT version: 11 updated: 2006/11/29 19:05:14
     33088+dnl CF_X_TOOLKIT version: 12 updated: 2008/03/23 15:04:54
     33089 dnl ------------
     33090 dnl Check for X Toolkit libraries
     33091 dnl
     33092@@ -2133,7 +2343,7 @@
     33093        [$X_PRE_LIBS $LIBS $X_EXTRA_LIBS])])
     33094 
     33095 if test $cf_have_X_LIBS = no ; then
     33096-       AC_WARN(
     33097+       AC_MSG_WARN(
     33098 [Unable to successfully link X Toolkit library (-lXt) with
     33099 test program.  You will have to check and add the proper libraries by hand
     33100 to makefile.])
    2179233101diff -Naur ncurses-5.7.orig/test/clip_printw.c ncurses-5.7/test/clip_printw.c
    2179333102--- ncurses-5.7.orig/test/clip_printw.c 1969-12-31 16:00:00.000000000 -0800
    21794 +++ ncurses-5.7/test/clip_printw.c      2009-03-22 21:16:52.251135633 -0700
     33103+++ ncurses-5.7/test/clip_printw.c      2009-06-05 14:00:59.000000000 -0700
    2179533104@@ -0,0 +1,360 @@
    2179633105+/****************************************************************************
     
    2215433463+    ExitProgram(EXIT_SUCCESS);
    2215533464+}
     33465diff -Naur ncurses-5.7.orig/test/configure ncurses-5.7/test/configure
     33466--- ncurses-5.7.orig/test/configure     2008-09-06 15:11:48.000000000 -0700
     33467+++ ncurses-5.7/test/configure  2009-06-05 14:01:30.000000000 -0700
     33468@@ -194,6 +194,7 @@
     33469   --with-Xaw3d            link with Xaw 3d library
     33470   --with-neXtaw           link with neXT Athena library
     33471   --with-XawPlus          link with Athena-Plus library
     33472+  --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
     33473 EOF
     33474     exit 0 ;;
     33475 
     33476@@ -536,7 +537,7 @@
     33477 # Uses ac_ vars as temps to allow command line to override cache and checks.
     33478 # --without-x overrides everything else, but does not touch the cache.
     33479 echo $ac_n "checking for X""... $ac_c" 1>&6
     33480-echo "configure:540: checking for X" >&5
     33481+echo "configure:541: checking for X" >&5
     33482 
     33483 
     33484 # Check whether --with-x or --without-x was given.
     33485@@ -599,12 +600,12 @@
     33486 
     33487   # First, try using that file with no special directory specified.
     33488 cat > conftest.$ac_ext <<EOF
     33489-#line 603 "configure"
     33490+#line 604 "configure"
     33491 #include "confdefs.h"
     33492 #include <$x_direct_test_include>
     33493 EOF
     33494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     33495-{ (eval echo configure:608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     33496+{ (eval echo configure:609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     33497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
     33498 if test -z "$ac_err"; then
     33499   rm -rf conftest*
     33500@@ -673,14 +674,14 @@
     33501   ac_save_LIBS="$LIBS"
     33502   LIBS="-l$x_direct_test_library $LIBS"
     33503 cat > conftest.$ac_ext <<EOF
     33504-#line 677 "configure"
     33505+#line 678 "configure"
     33506 #include "confdefs.h"
     33507 
     33508 int main() {
     33509 ${x_direct_test_function}()
     33510 ; return 0; }
     33511 EOF
     33512-if { (eval echo configure:684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     33513+if { (eval echo configure:685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     33514   rm -rf conftest*
     33515   LIBS="$ac_save_LIBS"
     33516 # We can link X programs with no special library path.
     33517@@ -803,7 +804,7 @@
     33518 fi
     33519 
     33520 echo $ac_n "checking host system type""... $ac_c" 1>&6
     33521-echo "configure:807: checking host system type" >&5
     33522+echo "configure:808: checking host system type" >&5
     33523 
     33524 host_alias=$host
     33525 case "$host_alias" in
     33526@@ -851,7 +852,7 @@
     33527 
     33528 
     33529 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
     33530-echo "configure:855: checking whether ${MAKE-make} sets \${MAKE}" >&5
     33531+echo "configure:856: checking whether ${MAKE-make} sets \${MAKE}" >&5
     33532 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
     33533 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
     33534   echo $ac_n "(cached) $ac_c" 1>&6
     33535@@ -880,7 +881,7 @@
     33536 # Extract the first word of "gcc", so it can be a program name with args.
     33537 set dummy gcc; ac_word=$2
     33538 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     33539-echo "configure:884: checking for $ac_word" >&5
     33540+echo "configure:885: checking for $ac_word" >&5
     33541 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
     33542   echo $ac_n "(cached) $ac_c" 1>&6
     33543 else
     33544@@ -910,7 +911,7 @@
     33545   # Extract the first word of "cc", so it can be a program name with args.
     33546 set dummy cc; ac_word=$2
     33547 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     33548-echo "configure:914: checking for $ac_word" >&5
     33549+echo "configure:915: checking for $ac_word" >&5
     33550 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
     33551   echo $ac_n "(cached) $ac_c" 1>&6
     33552 else
     33553@@ -961,7 +962,7 @@
     33554       # Extract the first word of "cl", so it can be a program name with args.
     33555 set dummy cl; ac_word=$2
     33556 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     33557-echo "configure:965: checking for $ac_word" >&5
     33558+echo "configure:966: checking for $ac_word" >&5
     33559 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
     33560   echo $ac_n "(cached) $ac_c" 1>&6
     33561 else
     33562@@ -993,7 +994,7 @@
     33563 fi
     33564 
     33565 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
     33566-echo "configure:997: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
     33567+echo "configure:998: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
     33568 
     33569 ac_ext=c
     33570 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
     33571@@ -1004,12 +1005,12 @@
     33572 
     33573 cat > conftest.$ac_ext << EOF
     33574 
     33575-#line 1008 "configure"
     33576+#line 1009 "configure"
     33577 #include "confdefs.h"
     33578 
     33579 main(){return(0);}
     33580 EOF
     33581-if { (eval echo configure:1013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     33582+if { (eval echo configure:1014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     33583   ac_cv_prog_cc_works=yes
     33584   # If we can't run a trivial program, we are probably using a cross compiler.
     33585   if (./conftest; exit) 2>/dev/null; then
     33586@@ -1035,12 +1036,12 @@
     33587   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
     33588 fi
     33589 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
     33590-echo "configure:1039: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
     33591+echo "configure:1040: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
     33592 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
     33593 cross_compiling=$ac_cv_prog_cc_cross
     33594 
     33595 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
     33596-echo "configure:1044: checking whether we are using GNU C" >&5
     33597+echo "configure:1045: checking whether we are using GNU C" >&5
     33598 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
     33599   echo $ac_n "(cached) $ac_c" 1>&6
     33600 else
     33601@@ -1049,7 +1050,7 @@
     33602   yes;
     33603 #endif
     33604 EOF
     33605-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     33606+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
     33607   ac_cv_prog_gcc=yes
     33608 else
     33609   ac_cv_prog_gcc=no
     33610@@ -1068,7 +1069,7 @@
     33611 ac_save_CFLAGS="$CFLAGS"
     33612 CFLAGS=
     33613 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
     33614-echo "configure:1072: checking whether ${CC-cc} accepts -g" >&5
     33615+echo "configure:1073: checking whether ${CC-cc} accepts -g" >&5
     33616 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
     33617   echo $ac_n "(cached) $ac_c" 1>&6
     33618 else
     33619@@ -1100,7 +1101,7 @@
     33620 fi
     33621 
     33622 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
     33623-echo "configure:1104: checking how to run the C preprocessor" >&5
     33624+echo "configure:1105: checking how to run the C preprocessor" >&5
     33625 # On Suns, sometimes $CPP names a directory.
     33626 if test -n "$CPP" && test -d "$CPP"; then
     33627   CPP=
     33628@@ -1115,13 +1116,13 @@
     33629   # On the NeXT, cc -E runs the code through the compiler's parser,
     33630   # not just through cpp.
     33631   cat > conftest.$ac_ext <<EOF
     33632-#line 1119 "configure"
     33633+#line 1120 "configure"
     33634 #include "confdefs.h"
     33635 #include <assert.h>
     33636 Syntax Error
     33637 EOF
     33638 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     33639-{ (eval echo configure:1125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     33640+{ (eval echo configure:1126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     33641 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
     33642 if test -z "$ac_err"; then
     33643   :
     33644@@ -1132,13 +1133,13 @@
     33645   rm -rf conftest*
     33646   CPP="${CC-cc} -E -traditional-cpp"
     33647   cat > conftest.$ac_ext <<EOF
     33648-#line 1136 "configure"
     33649+#line 1137 "configure"
     33650 #include "confdefs.h"
     33651 #include <assert.h>
     33652 Syntax Error
     33653 EOF
     33654 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     33655-{ (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     33656+{ (eval echo configure:1143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     33657 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
     33658 if test -z "$ac_err"; then
     33659   :
     33660@@ -1149,13 +1150,13 @@
     33661   rm -rf conftest*
     33662   CPP="${CC-cc} -nologo -E"
     33663   cat > conftest.$ac_ext <<EOF
     33664-#line 1153 "configure"
     33665+#line 1154 "configure"
     33666 #include "confdefs.h"
     33667 #include <assert.h>
     33668 Syntax Error
     33669 EOF
     33670 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     33671-{ (eval echo configure:1159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     33672+{ (eval echo configure:1160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     33673 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
     33674 if test -z "$ac_err"; then
     33675   :
     33676@@ -1184,7 +1185,7 @@
     33677 # Extract the first word of "$ac_prog", so it can be a program name with args.
     33678 set dummy $ac_prog; ac_word=$2
     33679 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     33680-echo "configure:1188: checking for $ac_word" >&5
     33681+echo "configure:1189: checking for $ac_word" >&5
     33682 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
     33683   echo $ac_n "(cached) $ac_c" 1>&6
     33684 else
     33685@@ -1246,12 +1247,12 @@
     33686 cf_cv_libtype=
     33687 
     33688 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
     33689-echo "configure:1250: checking for Cygwin environment" >&5
     33690+echo "configure:1251: checking for Cygwin environment" >&5
     33691 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
     33692   echo $ac_n "(cached) $ac_c" 1>&6
     33693 else
     33694   cat > conftest.$ac_ext <<EOF
     33695-#line 1255 "configure"
     33696+#line 1256 "configure"
     33697 #include "confdefs.h"
     33698 
     33699 int main() {
     33700@@ -1262,7 +1263,7 @@
     33701 return __CYGWIN__;
     33702 ; return 0; }
     33703 EOF
     33704-if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33705+if { (eval echo configure:1267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33706   rm -rf conftest*
     33707   ac_cv_cygwin=yes
     33708 else
     33709@@ -1279,19 +1280,19 @@
     33710 CYGWIN=
     33711 test "$ac_cv_cygwin" = yes && CYGWIN=yes
     33712 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
     33713-echo "configure:1283: checking for mingw32 environment" >&5
     33714+echo "configure:1284: checking for mingw32 environment" >&5
     33715 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
     33716   echo $ac_n "(cached) $ac_c" 1>&6
     33717 else
     33718   cat > conftest.$ac_ext <<EOF
     33719-#line 1288 "configure"
     33720+#line 1289 "configure"
     33721 #include "confdefs.h"
     33722 
     33723 int main() {
     33724 return __MINGW32__;
     33725 ; return 0; }
     33726 EOF
     33727-if { (eval echo configure:1295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33728+if { (eval echo configure:1296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33729   rm -rf conftest*
     33730   ac_cv_mingw32=yes
     33731 else
     33732@@ -1310,7 +1311,7 @@
     33733 
     33734 
     33735 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
     33736-echo "configure:1314: checking for executable suffix" >&5
     33737+echo "configure:1315: checking for executable suffix" >&5
     33738 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
     33739   echo $ac_n "(cached) $ac_c" 1>&6
     33740 else
     33741@@ -1320,7 +1321,7 @@
     33742   rm -f conftest*
     33743   echo 'int main () { return 0; }' > conftest.$ac_ext
     33744   ac_cv_exeext=
     33745-  if { (eval echo configure:1324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     33746+  if { (eval echo configure:1325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     33747     for file in conftest.*; do
     33748       case $file in
     33749       *.c | *.o | *.obj) ;;
     33750@@ -1341,13 +1342,13 @@
     33751 ac_exeext=$EXEEXT
     33752 
     33753 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
     33754-echo "configure:1345: checking for object suffix" >&5
     33755+echo "configure:1346: checking for object suffix" >&5
     33756 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
     33757   echo $ac_n "(cached) $ac_c" 1>&6
     33758 else
     33759   rm -f conftest*
     33760 echo 'int i = 1;' > conftest.$ac_ext
     33761-if { (eval echo configure:1351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33762+if { (eval echo configure:1352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33763   for ac_file in conftest.*; do
     33764     case $ac_file in
     33765     *.c) ;;
     33766@@ -1367,7 +1368,7 @@
     33767 
     33768 
     33769 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
     33770-echo "configure:1371: checking for ${CC-cc} option to accept ANSI C" >&5
     33771+echo "configure:1372: checking for ${CC-cc} option to accept ANSI C" >&5
     33772 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
     33773   echo $ac_n "(cached) $ac_c" 1>&6
     33774 else
     33775@@ -1451,7 +1452,7 @@
     33776 
     33777 if test -n "$cf_new_cppflags" ; then
     33778       
     33779-       CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
     33780+       CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
     33781 fi
     33782 
     33783 if test -n "$cf_new_extra_cppflags" ; then
     33784@@ -1463,7 +1464,7 @@
     33785 
     33786 
     33787        cat > conftest.$ac_ext <<EOF
     33788-#line 1467 "configure"
     33789+#line 1468 "configure"
     33790 #include "confdefs.h"
     33791 
     33792 #ifndef CC_HAS_PROTOS
     33793@@ -1479,7 +1480,7 @@
     33794        struct s2 {int (*f) (double a);};
     33795 ; return 0; }
     33796 EOF
     33797-if { (eval echo configure:1483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33798+if { (eval echo configure:1484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33799   rm -rf conftest*
     33800   cf_cv_ansi_cc="$cf_arg"; break
     33801 else
     33802@@ -1558,7 +1559,7 @@
     33803 
     33804 if test -n "$cf_new_cppflags" ; then
     33805       
     33806-       CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
     33807+       CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
     33808 fi
     33809 
     33810 if test -n "$cf_new_extra_cppflags" ; then
     33811@@ -1606,9 +1607,9 @@
     33812 if test "$GCC" = yes
     33813 then
     33814        echo "checking for $CC __attribute__ directives" 1>&6
     33815-echo "configure:1610: checking for $CC __attribute__ directives" >&5
     33816+echo "configure:1611: checking for $CC __attribute__ directives" >&5
     33817 cat > conftest.$ac_ext <<EOF
     33818-#line 1612 "${as_me-configure}"
     33819+#line 1613 "${as_me-configure}"
     33820 #include "confdefs.h"
     33821 #include "conftest.h"
     33822 #include "conftest.i"
     33823@@ -1646,7 +1647,7 @@
     33824 EOF
     33825                        ;;
     33826                esac
     33827-               if { (eval echo configure:1650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33828+               if { (eval echo configure:1651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33829                        test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
     33830                        cat conftest.h >>confdefs.h
     33831                fi
     33832@@ -1659,7 +1660,7 @@
     33833 
     33834 
     33835 echo $ac_n "checking if $CC -U and -D options work together""... $ac_c" 1>&6
     33836-echo "configure:1663: checking if $CC -U and -D options work together" >&5
     33837+echo "configure:1664: checking if $CC -U and -D options work together" >&5
     33838 if eval "test \"`echo '$''{'cf_cv_cc_u_d_options'+set}'`\" = set"; then
     33839   echo $ac_n "(cached) $ac_c" 1>&6
     33840 else
     33841@@ -1667,7 +1668,7 @@
     33842        cf_save_CPPFLAGS="$CPPFLAGS"
     33843        CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
     33844        cat > conftest.$ac_ext <<EOF
     33845-#line 1671 "configure"
     33846+#line 1672 "configure"
     33847 #include "confdefs.h"
     33848 
     33849 int main() {
     33850@@ -1681,7 +1682,7 @@
     33851       
     33852 ; return 0; }
     33853 EOF
     33854-if { (eval echo configure:1685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33855+if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33856   rm -rf conftest*
     33857   
     33858        cf_cv_cc_u_d_options=yes
     33859@@ -1707,10 +1708,10 @@
     33860 cf_POSIX_C_SOURCE=199506L
     33861 
     33862 case $host_os in #(vi
     33863-aix[45]*) #(vi
     33864+aix[456]*) #(vi
     33865        CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
     33866        ;;
     33867-freebsd*) #(vi
     33868+freebsd*|dragonfly*) #(vi
     33869        # 5.x headers associate
     33870        #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
     33871        #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
     33872@@ -1724,16 +1725,16 @@
     33873 irix[56].*) #(vi
     33874        CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
     33875        ;;
     33876-linux*|gnu*|k*bsd*-gnu) #(vi
     33877+linux*|gnu*|mint*|k*bsd*-gnu) #(vi
     33878       
     33879 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
     33880-echo "configure:1731: checking if we must define _GNU_SOURCE" >&5
     33881+echo "configure:1732: checking if we must define _GNU_SOURCE" >&5
     33882 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
     33883   echo $ac_n "(cached) $ac_c" 1>&6
     33884 else
     33885   
     33886 cat > conftest.$ac_ext <<EOF
     33887-#line 1737 "configure"
     33888+#line 1738 "configure"
     33889 #include "confdefs.h"
     33890 #include <sys/types.h>
     33891 int main() {
     33892@@ -1743,7 +1744,7 @@
     33893 #endif
     33894 ; return 0; }
     33895 EOF
     33896-if { (eval echo configure:1747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33897+if { (eval echo configure:1748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33898   rm -rf conftest*
     33899   cf_cv_gnu_source=no
     33900 else
     33901@@ -1753,7 +1754,7 @@
     33902   cf_save="$CPPFLAGS"
     33903         CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
     33904         cat > conftest.$ac_ext <<EOF
     33905-#line 1757 "configure"
     33906+#line 1758 "configure"
     33907 #include "confdefs.h"
     33908 #include <sys/types.h>
     33909 int main() {
     33910@@ -1763,7 +1764,7 @@
     33911 #endif
     33912 ; return 0; }
     33913 EOF
     33914-if { (eval echo configure:1767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33915+if { (eval echo configure:1768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33916   rm -rf conftest*
     33917   cf_cv_gnu_source=no
     33918 else
     33919@@ -1807,13 +1808,13 @@
     33920        ;;
     33921 *)
     33922        echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
     33923-echo "configure:1811: checking if we should define _XOPEN_SOURCE" >&5
     33924+echo "configure:1812: checking if we should define _XOPEN_SOURCE" >&5
     33925 if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
     33926   echo $ac_n "(cached) $ac_c" 1>&6
     33927 else
     33928   
     33929        cat > conftest.$ac_ext <<EOF
     33930-#line 1817 "configure"
     33931+#line 1818 "configure"
     33932 #include "confdefs.h"
     33933 #include <sys/types.h>
     33934 int main() {
     33935@@ -1823,7 +1824,7 @@
     33936 #endif
     33937 ; return 0; }
     33938 EOF
     33939-if { (eval echo configure:1827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33940+if { (eval echo configure:1828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33941   rm -rf conftest*
     33942   cf_cv_xopen_source=no
     33943 else
     33944@@ -1833,7 +1834,7 @@
     33945   cf_save="$CPPFLAGS"
     33946         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
     33947         cat > conftest.$ac_ext <<EOF
     33948-#line 1837 "configure"
     33949+#line 1838 "configure"
     33950 #include "confdefs.h"
     33951 #include <sys/types.h>
     33952 int main() {
     33953@@ -1843,7 +1844,7 @@
     33954 #endif
     33955 ; return 0; }
     33956 EOF
     33957-if { (eval echo configure:1847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33958+if { (eval echo configure:1848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33959   rm -rf conftest*
     33960   cf_cv_xopen_source=no
     33961 else
     33962@@ -1898,16 +1899,16 @@
     33963 
     33964 
     33965 echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
     33966-echo "configure:1902: checking if we should define _POSIX_C_SOURCE" >&5
     33967+echo "configure:1903: checking if we should define _POSIX_C_SOURCE" >&5
     33968 if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
     33969   echo $ac_n "(cached) $ac_c" 1>&6
     33970 else
     33971   
     33972       
     33973-echo "${as_me-configure}:1908: testing if the symbol is already defined go no further ..." 1>&5
     33974+echo "${as_me-configure}:1909: testing if the symbol is already defined go no further ..." 1>&5
     33975 
     33976        cat > conftest.$ac_ext <<EOF
     33977-#line 1911 "configure"
     33978+#line 1912 "configure"
     33979 #include "confdefs.h"
     33980 #include <sys/types.h>
     33981 int main() {
     33982@@ -1917,7 +1918,7 @@
     33983 #endif
     33984 ; return 0; }
     33985 EOF
     33986-if { (eval echo configure:1921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33987+if { (eval echo configure:1922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     33988   rm -rf conftest*
     33989   cf_cv_posix_c_source=no
     33990 else
     33991@@ -1939,7 +1940,7 @@
     33992         esac
     33993         if test "$cf_want_posix_source" = yes ; then
     33994                cat > conftest.$ac_ext <<EOF
     33995-#line 1943 "configure"
     33996+#line 1944 "configure"
     33997 #include "confdefs.h"
     33998 #include <sys/types.h>
     33999 int main() {
     34000@@ -1949,7 +1950,7 @@
     34001 #endif
     34002 ; return 0; }
     34003 EOF
     34004-if { (eval echo configure:1953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34005+if { (eval echo configure:1954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34006   :
     34007 else
     34008   echo "configure: failed program was:" >&5
     34009@@ -1960,15 +1961,15 @@
     34010 rm -f conftest*
     34011         fi
     34012         
     34013-echo "${as_me-configure}:1964: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
     34014+echo "${as_me-configure}:1965: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
     34015 
     34016         CFLAGS="$cf_trim_CFLAGS"
     34017         CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
     34018         
     34019-echo "${as_me-configure}:1969: testing if the second compile does not leave our definition intact error ..." 1>&5
     34020+echo "${as_me-configure}:1970: testing if the second compile does not leave our definition intact error ..." 1>&5
     34021 
     34022         cat > conftest.$ac_ext <<EOF
     34023-#line 1972 "configure"
     34024+#line 1973 "configure"
     34025 #include "confdefs.h"
     34026 #include <sys/types.h>
     34027 int main() {
     34028@@ -1978,7 +1979,7 @@
     34029 #endif
     34030 ; return 0; }
     34031 EOF
     34032-if { (eval echo configure:1982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34033+if { (eval echo configure:1983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34034   :
     34035 else
     34036   echo "configure: failed program was:" >&5
     34037@@ -2013,12 +2014,12 @@
     34038 esac
     34039 
     34040 echo $ac_n "checking for working const""... $ac_c" 1>&6
     34041-echo "configure:2017: checking for working const" >&5
     34042+echo "configure:2018: checking for working const" >&5
     34043 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
     34044   echo $ac_n "(cached) $ac_c" 1>&6
     34045 else
     34046   cat > conftest.$ac_ext <<EOF
     34047-#line 2022 "configure"
     34048+#line 2023 "configure"
     34049 #include "confdefs.h"
     34050 
     34051 int main() {
     34052@@ -2067,7 +2068,7 @@
     34053 
     34054 ; return 0; }
     34055 EOF
     34056-if { (eval echo configure:2071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34057+if { (eval echo configure:2072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34058   rm -rf conftest*
     34059   ac_cv_c_const=yes
     34060 else
     34061@@ -2089,7 +2090,7 @@
     34062 
     34063 
     34064 echo $ac_n "checking for signal global datatype""... $ac_c" 1>&6
     34065-echo "configure:2093: checking for signal global datatype" >&5
     34066+echo "configure:2094: checking for signal global datatype" >&5
     34067 if eval "test \"`echo '$''{'cf_cv_sig_atomic_t'+set}'`\" = set"; then
     34068   echo $ac_n "(cached) $ac_c" 1>&6
     34069 else
     34070@@ -2100,7 +2101,7 @@
     34071                "int"
     34072        do
     34073        cat > conftest.$ac_ext <<EOF
     34074-#line 2104 "configure"
     34075+#line 2105 "configure"
     34076 #include "confdefs.h"
     34077 
     34078 #include <sys/types.h>
     34079@@ -2118,7 +2119,7 @@
     34080                 x = 1
     34081 ; return 0; }
     34082 EOF
     34083-if { (eval echo configure:2122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34084+if { (eval echo configure:2123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34085   rm -rf conftest*
     34086   cf_cv_sig_atomic_t=$cf_type
     34087 else
     34088@@ -2142,7 +2143,7 @@
     34089 
     34090 
     34091 echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
     34092-echo "configure:2146: checking if you want to see long compiling messages" >&5
     34093+echo "configure:2147: checking if you want to see long compiling messages" >&5
     34094 
     34095 # Check whether --enable-echo or --disable-echo was given.
     34096 if test "${enable_echo+set}" = set; then
     34097@@ -2189,7 +2190,7 @@
     34098 GCC_VERSION=none
     34099 if test "$GCC" = yes ; then
     34100        echo $ac_n "checking version of $CC""... $ac_c" 1>&6
     34101-echo "configure:2193: checking version of $CC" >&5
     34102+echo "configure:2194: checking version of $CC" >&5
     34103        GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
     34104        test -z "$GCC_VERSION" && GCC_VERSION=unknown
     34105        echo "$ac_t""$GCC_VERSION" 1>&6
     34106@@ -2199,7 +2200,7 @@
     34107 if ( test "$GCC" = yes || test "$GXX" = yes )
     34108 then
     34109 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
     34110-echo "configure:2203: checking if you want to turn on gcc warnings" >&5
     34111+echo "configure:2204: checking if you want to turn on gcc warnings" >&5
     34112 
     34113 # Check whether --enable-warnings or --disable-warnings was given.
     34114 if test "${enable_warnings+set}" = set; then
     34115@@ -2228,11 +2229,11 @@
     34116        case $host_os in
     34117        linux*|gnu*)
     34118                echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
     34119-echo "configure:2232: checking if this is really Intel C compiler" >&5
     34120+echo "configure:2233: checking if this is really Intel C compiler" >&5
     34121                cf_save_CFLAGS="$CFLAGS"
     34122                CFLAGS="$CFLAGS -no-gcc"
     34123                cat > conftest.$ac_ext <<EOF
     34124-#line 2236 "configure"
     34125+#line 2237 "configure"
     34126 #include "confdefs.h"
     34127 
     34128 int main() {
     34129@@ -2244,7 +2245,7 @@
     34130 
     34131 ; return 0; }
     34132 EOF
     34133-if { (eval echo configure:2248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34134+if { (eval echo configure:2249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34135   rm -rf conftest*
     34136   INTEL_COMPILER=yes
     34137 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
     34138@@ -2262,7 +2263,7 @@
     34139 
     34140 
     34141 cat > conftest.$ac_ext <<EOF
     34142-#line 2266 "${as_me-configure}"
     34143+#line 2267 "${as_me-configure}"
     34144 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
     34145 EOF
     34146 
     34147@@ -2270,7 +2271,6 @@
     34148 then
     34149 # The "-wdXXX" options suppress warnings:
     34150 # remark #1419: external declaration in primary source file
     34151-# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
     34152 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
     34153 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
     34154 # remark #193: zero used for undefined preprocessing identifier
     34155@@ -2278,7 +2278,7 @@
     34156 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
     34157 # remark #869: parameter "tw" was never referenced
     34158 # remark #981: operands are evaluated in unspecified order
     34159-# warning #269: invalid format string conversion
     34160+# warning #279: controlling expression is constant
     34161 
     34162        echo "checking for $CC warning options" 1>&6
     34163 echo "configure:2285: checking for $CC warning options" >&5
     34164@@ -2286,18 +2286,17 @@
     34165        EXTRA_CFLAGS="-Wall"
     34166        for cf_opt in \
     34167                wd1419 \
     34168-               wd1682 \
     34169                wd1683 \
     34170                wd1684 \
     34171                wd193 \
     34172-               wd279 \
     34173                wd593 \
     34174+               wd279 \
     34175                wd810 \
     34176                wd869 \
     34177                wd981
     34178        do
     34179                CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
     34180-               if { (eval echo configure:2301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34181+               if { (eval echo configure:2300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34182                        test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
     34183                        EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
     34184                fi
     34185@@ -2307,7 +2306,7 @@
     34186 elif test "$GCC" = yes
     34187 then
     34188        echo "checking for $CC warning options" 1>&6
     34189-echo "configure:2311: checking for $CC warning options" >&5
     34190+echo "configure:2310: checking for $CC warning options" >&5
     34191        cf_save_CFLAGS="$CFLAGS"
     34192        EXTRA_CFLAGS="-W -Wall"
     34193        cf_warn_CONST=""
     34194@@ -2326,7 +2325,7 @@
     34195                Wundef $cf_warn_CONST
     34196        do
     34197                CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
     34198-               if { (eval echo configure:2330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34199+               if { (eval echo configure:2329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34200                        test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
     34201                        case $cf_opt in #(vi
     34202                        Wcast-qual) #(vi
     34203@@ -2334,10 +2333,10 @@
     34204                                ;;
     34205                        Winline) #(vi
     34206                                case $GCC_VERSION in
     34207-                               3.3*)
     34208+                               [34].*)
     34209                                        test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
     34210 
     34211-echo "${as_me-configure}:2341: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
     34212+echo "${as_me-configure}:2340: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
     34213 
     34214 
     34215                                        continue;;
     34216@@ -2441,7 +2440,7 @@
     34217       
     34218 
     34219 echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
     34220-echo "configure:2445: checking for extra include directories" >&5
     34221+echo "configure:2444: checking for extra include directories" >&5
     34222 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
     34223   echo $ac_n "(cached) $ac_c" 1>&6
     34224 else
     34225@@ -2462,11 +2461,11 @@
     34226 fi
     34227 
     34228 echo "$ac_t""$cf_cv_curses_incdir" 1>&6
     34229-test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"
     34230+test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
     34231 
     34232 
     34233 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
     34234-echo "configure:2470: checking if we have identified curses headers" >&5
     34235+echo "configure:2469: checking if we have identified curses headers" >&5
     34236 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
     34237   echo $ac_n "(cached) $ac_c" 1>&6
     34238 else
     34239@@ -2479,14 +2478,14 @@
     34240        ncurses/ncurses.h
     34241 do
     34242 cat > conftest.$ac_ext <<EOF
     34243-#line 2483 "configure"
     34244+#line 2482 "configure"
     34245 #include "confdefs.h"
     34246 #include <${cf_header}>
     34247 int main() {
     34248 initscr(); tgoto("?", 0,0)
     34249 ; return 0; }
     34250 EOF
     34251-if { (eval echo configure:2490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34252+if { (eval echo configure:2489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34253   rm -rf conftest*
     34254   cf_cv_ncurses_header=$cf_header; break
     34255 else
     34256@@ -2509,17 +2508,17 @@
     34257 do
     34258 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
     34259 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
     34260-echo "configure:2513: checking for $ac_hdr" >&5
     34261+echo "configure:2512: checking for $ac_hdr" >&5
     34262 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
     34263   echo $ac_n "(cached) $ac_c" 1>&6
     34264 else
     34265   cat > conftest.$ac_ext <<EOF
     34266-#line 2518 "configure"
     34267+#line 2517 "configure"
     34268 #include "confdefs.h"
     34269 #include <$ac_hdr>
     34270 EOF
     34271 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     34272-{ (eval echo configure:2523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     34273+{ (eval echo configure:2522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     34274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
     34275 if test -z "$ac_err"; then
     34276   rm -rf conftest*
     34277@@ -2548,7 +2547,7 @@
     34278 
     34279 
     34280 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
     34281-echo "configure:2552: checking for terminfo header" >&5
     34282+echo "configure:2551: checking for terminfo header" >&5
     34283 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
     34284   echo $ac_n "(cached) $ac_c" 1>&6
     34285 else
     34286@@ -2565,7 +2564,7 @@
     34287 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
     34288 do
     34289 cat > conftest.$ac_ext <<EOF
     34290-#line 2569 "configure"
     34291+#line 2568 "configure"
     34292 #include "confdefs.h"
     34293 #include <stdio.h>
     34294 #include <${cf_cv_ncurses_header-curses.h}>
     34295@@ -2575,7 +2574,7 @@
     34296 int x = auto_left_margin
     34297 ; return 0; }
     34298 EOF
     34299-if { (eval echo configure:2579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34300+if { (eval echo configure:2578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34301   rm -rf conftest*
     34302   
     34303        cf_cv_term_header="$cf_test"
     34304@@ -2624,7 +2623,7 @@
     34305 
     34306       
     34307 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
     34308-echo "configure:2628: checking for ncurses version" >&5
     34309+echo "configure:2627: checking for ncurses version" >&5
     34310 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
     34311   echo $ac_n "(cached) $ac_c" 1>&6
     34312 else
     34313@@ -2650,7 +2649,7 @@
     34314 #endif
     34315 EOF
     34316        cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
     34317-       { (eval echo configure:2654: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
     34318+       { (eval echo configure:2653: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
     34319        if test -f conftest.out ; then
     34320                cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
     34321                test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
     34322@@ -2659,7 +2658,7 @@
     34323 
     34324 else
     34325   cat > conftest.$ac_ext <<EOF
     34326-#line 2663 "configure"
     34327+#line 2662 "configure"
     34328 #include "confdefs.h"
     34329 
     34330 #include <${cf_cv_ncurses_header-curses.h}>
     34331@@ -2683,7 +2682,7 @@
     34332        ${cf_cv_main_return-return}(0);
     34333 }
     34334 EOF
     34335-if { (eval echo configure:2687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     34336+if { (eval echo configure:2686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     34337 then
     34338   
     34339        cf_cv_ncurses_version=`cat $cf_tempfile`
     34340@@ -2707,16 +2706,16 @@
     34341       
     34342 
     34343 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
     34344-echo "configure:2711: checking if we have identified curses libraries" >&5
     34345+echo "configure:2710: checking if we have identified curses libraries" >&5
     34346 cat > conftest.$ac_ext <<EOF
     34347-#line 2713 "configure"
     34348+#line 2712 "configure"
     34349 #include "confdefs.h"
     34350 #include <${cf_cv_ncurses_header-curses.h}>
     34351 int main() {
     34352 initscr(); tgoto("?", 0,0)
     34353 ; return 0; }
     34354 EOF
     34355-if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34356+if { (eval echo configure:2719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34357   rm -rf conftest*
     34358   cf_result=yes
     34359 else
     34360@@ -2732,7 +2731,7 @@
     34361 case $host_os in #(vi
     34362 freebsd*) #(vi
     34363     echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
     34364-echo "configure:2736: checking for tgoto in -lmytinfo" >&5
     34365+echo "configure:2735: checking for tgoto in -lmytinfo" >&5
     34366 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
     34367 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     34368   echo $ac_n "(cached) $ac_c" 1>&6
     34369@@ -2740,7 +2739,7 @@
     34370   ac_save_LIBS="$LIBS"
     34371 LIBS="-lmytinfo  $LIBS"
     34372 cat > conftest.$ac_ext <<EOF
     34373-#line 2744 "configure"
     34374+#line 2743 "configure"
     34375 #include "confdefs.h"
     34376 /* Override any gcc2 internal prototype to avoid an error.  */
     34377 /* We use char because int might match the return type of a gcc2
     34378@@ -2751,7 +2750,7 @@
     34379 tgoto()
     34380 ; return 0; }
     34381 EOF
     34382-if { (eval echo configure:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34383+if { (eval echo configure:2754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34384   rm -rf conftest*
     34385   eval "ac_cv_lib_$ac_lib_var=yes"
     34386 else
     34387@@ -2774,7 +2773,7 @@
     34388     ;;
     34389 hpux10.*) #(vi
     34390     echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
     34391-echo "configure:2778: checking for initscr in -lcur_colr" >&5
     34392+echo "configure:2777: checking for initscr in -lcur_colr" >&5
     34393 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
     34394 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     34395   echo $ac_n "(cached) $ac_c" 1>&6
     34396@@ -2782,7 +2781,7 @@
     34397   ac_save_LIBS="$LIBS"
     34398 LIBS="-lcur_colr  $LIBS"
     34399 cat > conftest.$ac_ext <<EOF
     34400-#line 2786 "configure"
     34401+#line 2785 "configure"
     34402 #include "confdefs.h"
     34403 /* Override any gcc2 internal prototype to avoid an error.  */
     34404 /* We use char because int might match the return type of a gcc2
     34405@@ -2793,7 +2792,7 @@
     34406 initscr()
     34407 ; return 0; }
     34408 EOF
     34409-if { (eval echo configure:2797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34410+if { (eval echo configure:2796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34411   rm -rf conftest*
     34412   eval "ac_cv_lib_$ac_lib_var=yes"
     34413 else
     34414@@ -2816,7 +2815,7 @@
     34415   echo "$ac_t""no" 1>&6
     34416 
     34417     echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
     34418-echo "configure:2820: checking for initscr in -lHcurses" >&5
     34419+echo "configure:2819: checking for initscr in -lHcurses" >&5
     34420 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
     34421 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     34422   echo $ac_n "(cached) $ac_c" 1>&6
     34423@@ -2824,7 +2823,7 @@
     34424   ac_save_LIBS="$LIBS"
     34425 LIBS="-lHcurses  $LIBS"
     34426 cat > conftest.$ac_ext <<EOF
     34427-#line 2828 "configure"
     34428+#line 2827 "configure"
     34429 #include "confdefs.h"
     34430 /* Override any gcc2 internal prototype to avoid an error.  */
     34431 /* We use char because int might match the return type of a gcc2
     34432@@ -2835,7 +2834,7 @@
     34433 initscr()
     34434 ; return 0; }
     34435 EOF
     34436-if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34437+if { (eval echo configure:2838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34438   rm -rf conftest*
     34439   eval "ac_cv_lib_$ac_lib_var=yes"
     34440 else
     34441@@ -2853,7 +2852,7 @@
     34442   
     34443         # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
     34444         LIBS="-lHcurses $LIBS"
     34445-        CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS"
     34446+        CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
     34447         ac_cv_func_initscr=yes
     34448         
     34449 else
     34450@@ -2884,7 +2883,7 @@
     34451       if test "$cf_have_libdir" = no ; then
     34452         test -n "$verbose" && echo "   adding $cf_add_libdir to library-path" 1>&6
     34453 
     34454-echo "${as_me-configure}:2888: testing adding $cf_add_libdir to library-path ..." 1>&5
     34455+echo "${as_me-configure}:2887: testing adding $cf_add_libdir to library-path ..." 1>&5
     34456 
     34457 
     34458         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
     34459@@ -2916,7 +2915,7 @@
     34460       if test "$cf_have_libdir" = no ; then
     34461         test -n "$verbose" && echo "   adding $cf_add_libdir to library-path" 1>&6
     34462 
     34463-echo "${as_me-configure}:2920: testing adding $cf_add_libdir to library-path ..." 1>&5
     34464+echo "${as_me-configure}:2919: testing adding $cf_add_libdir to library-path ..." 1>&5
     34465 
     34466 
     34467         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
     34468@@ -2946,12 +2945,12 @@
     34469     # Check for library containing tgoto.  Do this before curses library
     34470     # because it may be needed to link the test-case for initscr.
     34471     echo $ac_n "checking for tgoto""... $ac_c" 1>&6
     34472-echo "configure:2950: checking for tgoto" >&5
     34473+echo "configure:2949: checking for tgoto" >&5
     34474 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
     34475   echo $ac_n "(cached) $ac_c" 1>&6
     34476 else
     34477   cat > conftest.$ac_ext <<EOF
     34478-#line 2955 "configure"
     34479+#line 2954 "configure"
     34480 #include "confdefs.h"
     34481 /* System header to define __stub macros and hopefully few prototypes,
     34482     which can conflict with char tgoto(); below.  */
     34483@@ -2974,7 +2973,7 @@
     34484 
     34485 ; return 0; }
     34486 EOF
     34487-if { (eval echo configure:2978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34488+if { (eval echo configure:2977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34489   rm -rf conftest*
     34490   eval "ac_cv_func_tgoto=yes"
     34491 else
     34492@@ -2995,7 +2994,7 @@
     34493         for cf_term_lib in $cf_check_list termcap termlib unknown
     34494         do
     34495             echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
     34496-echo "configure:2999: checking for tgoto in -l$cf_term_lib" >&5
     34497+echo "configure:2998: checking for tgoto in -l$cf_term_lib" >&5
     34498 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
     34499 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     34500   echo $ac_n "(cached) $ac_c" 1>&6
     34501@@ -3003,7 +3002,7 @@
     34502   ac_save_LIBS="$LIBS"
     34503 LIBS="-l$cf_term_lib  $LIBS"
     34504 cat > conftest.$ac_ext <<EOF
     34505-#line 3007 "configure"
     34506+#line 3006 "configure"
     34507 #include "confdefs.h"
     34508 /* Override any gcc2 internal prototype to avoid an error.  */
     34509 /* We use char because int might match the return type of a gcc2
     34510@@ -3014,7 +3013,7 @@
     34511 tgoto()
     34512 ; return 0; }
     34513 EOF
     34514-if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34515+if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34516   rm -rf conftest*
     34517   eval "ac_cv_lib_$ac_lib_var=yes"
     34518 else
     34519@@ -3041,10 +3040,10 @@
     34520 
     34521     # Check for library containing initscr
     34522     test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
     34523-    for cf_curs_lib in $cf_check_list xcurses jcurses unknown
     34524+       for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
     34525     do
     34526         echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
     34527-echo "configure:3048: checking for initscr in -l$cf_curs_lib" >&5
     34528+echo "configure:3047: checking for initscr in -l$cf_curs_lib" >&5
     34529 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
     34530 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     34531   echo $ac_n "(cached) $ac_c" 1>&6
     34532@@ -3052,7 +3051,7 @@
     34533   ac_save_LIBS="$LIBS"
     34534 LIBS="-l$cf_curs_lib  $LIBS"
     34535 cat > conftest.$ac_ext <<EOF
     34536-#line 3056 "configure"
     34537+#line 3055 "configure"
     34538 #include "confdefs.h"
     34539 /* Override any gcc2 internal prototype to avoid an error.  */
     34540 /* We use char because int might match the return type of a gcc2
     34541@@ -3063,7 +3062,7 @@
     34542 initscr()
     34543 ; return 0; }
     34544 EOF
     34545-if { (eval echo configure:3067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34546+if { (eval echo configure:3066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34547   rm -rf conftest*
     34548   eval "ac_cv_lib_$ac_lib_var=yes"
     34549 else
     34550@@ -3089,16 +3088,16 @@
     34551     LIBS="-l$cf_curs_lib $cf_save_LIBS"
     34552     if test "$cf_term_lib" = unknown ; then
     34553         echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
     34554-echo "configure:3093: checking if we can link with $cf_curs_lib library" >&5
     34555+echo "configure:3092: checking if we can link with $cf_curs_lib library" >&5
     34556         cat > conftest.$ac_ext <<EOF
     34557-#line 3095 "configure"
     34558+#line 3094 "configure"
     34559 #include "confdefs.h"
     34560 #include <${cf_cv_ncurses_header-curses.h}>
     34561 int main() {
     34562 initscr()
     34563 ; return 0; }
     34564 EOF
     34565-if { (eval echo configure:3102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34566+if { (eval echo configure:3101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34567   rm -rf conftest*
     34568   cf_result=yes
     34569 else
     34570@@ -3114,16 +3113,16 @@
     34571         :
     34572     elif test "$cf_term_lib" != predefined ; then
     34573         echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
     34574-echo "configure:3118: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
     34575+echo "configure:3117: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
     34576         cat > conftest.$ac_ext <<EOF
     34577-#line 3120 "configure"
     34578+#line 3119 "configure"
     34579 #include "confdefs.h"
     34580 #include <${cf_cv_ncurses_header-curses.h}>
     34581 int main() {
     34582 initscr(); tgoto((char *)0, 0, 0);
     34583 ; return 0; }
     34584 EOF
     34585-if { (eval echo configure:3127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34586+if { (eval echo configure:3126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34587   rm -rf conftest*
     34588   cf_result=no
     34589 else
     34590@@ -3133,14 +3132,14 @@
     34591   
     34592             LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
     34593             cat > conftest.$ac_ext <<EOF
     34594-#line 3137 "configure"
     34595+#line 3136 "configure"
     34596 #include "confdefs.h"
     34597 #include <${cf_cv_ncurses_header-curses.h}>
     34598 int main() {
     34599 initscr()
     34600 ; return 0; }
     34601 EOF
     34602-if { (eval echo configure:3144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34603+if { (eval echo configure:3143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     34604   rm -rf conftest*
     34605   cf_result=yes
     34606 else
     34607@@ -3162,6 +3161,76 @@
     34608        ;;
     34609 ncurses)
     34610       
     34611+cf_ncuconfig_root=ncurses
     34612+
     34613+echo "Looking for ${cf_ncuconfig_root}-config"
     34614+for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
     34615+do
     34616+# Extract the first word of "$ac_prog", so it can be a program name with args.
     34617+set dummy $ac_prog; ac_word=$2
     34618+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     34619+echo "configure:3173: checking for $ac_word" >&5
     34620+if eval "test \"`echo '$''{'ac_cv_path_NCURSES_CONFIG'+set}'`\" = set"; then
     34621+  echo $ac_n "(cached) $ac_c" 1>&6
     34622+else
     34623+  case "$NCURSES_CONFIG" in
     34624+  /*)
     34625+  ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
     34626+  ;;
     34627+  ?:/*)                         
     34628+  ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a dos path.
     34629+  ;;
     34630+  *)
     34631+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
     34632+  ac_dummy="$PATH"
     34633+  for ac_dir in $ac_dummy; do
     34634+    test -z "$ac_dir" && ac_dir=.
     34635+    if test -f $ac_dir/$ac_word; then
     34636+      ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
     34637+      break
     34638+    fi
     34639+  done
     34640+  IFS="$ac_save_ifs"
     34641+  ;;
     34642+esac
     34643+fi
     34644+NCURSES_CONFIG="$ac_cv_path_NCURSES_CONFIG"
     34645+if test -n "$NCURSES_CONFIG"; then
     34646+  echo "$ac_t""$NCURSES_CONFIG" 1>&6
     34647+else
     34648+  echo "$ac_t""no" 1>&6
     34649+fi
     34650+
     34651+test -n "$NCURSES_CONFIG" && break
     34652+done
     34653+test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
     34654+
     34655+
     34656+if test "$NCURSES_CONFIG" != none ; then
     34657+
     34658+cf_cv_ncurses_header=curses.h
     34659+
     34660+CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
     34661+LIBS="`$NCURSES_CONFIG --libs` $LIBS"
     34662+
     34663+cat >> confdefs.h <<\EOF
     34664+#define NCURSES 1
     34665+EOF
     34666+
     34667+
     34668+
     34669+cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
     34670+
     34671+cat >> confdefs.h <<EOF
     34672+#define $cf_nculib_ROOT 1
     34673+EOF
     34674+
     34675+
     34676+cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
     34677+
     34678+else
     34679+
     34680+
     34681 
     34682 cf_ncuhdr_root=ncurses
     34683 
     34684@@ -3186,20 +3255,20 @@
     34685                fi
     34686 
     34687                if test "$cf_have_incdir" = no ; then
     34688-          if test "$cf_add_incdir" = /usr/local/include ; then
     34689+                 if test "$cf_add_incdir" = /usr/local/include ; then
     34690                        if test "$GCC" = yes
     34691                        then
     34692                          cf_save_CPPFLAGS=$CPPFLAGS
     34693                          CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
     34694                          cat > conftest.$ac_ext <<EOF
     34695-#line 3196 "configure"
     34696+#line 3265 "configure"
     34697 #include "confdefs.h"
     34698 #include <stdio.h>
     34699 int main() {
     34700 printf("Hello")
     34701 ; return 0; }
     34702 EOF
     34703-if { (eval echo configure:3203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34704+if { (eval echo configure:3272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34705   :
     34706 else
     34707   echo "configure: failed program was:" >&5
     34708@@ -3216,14 +3285,14 @@
     34709                if test "$cf_have_incdir" = no ; then
     34710                  test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
     34711 
     34712-echo "${as_me-configure}:3220: testing adding $cf_add_incdir to include-path ..." 1>&5
     34713+echo "${as_me-configure}:3289: testing adding $cf_add_incdir to include-path ..." 1>&5
     34714 
     34715 
     34716-                 CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
     34717+                 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
     34718 
     34719-          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
     34720-          test "$cf_top_incdir" = "$cf_add_incdir" && break
     34721-          cf_add_incdir="$cf_top_incdir"
     34722+                 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
     34723+                 test "$cf_top_incdir" = "$cf_add_incdir" && break
     34724+                 cf_add_incdir="$cf_top_incdir"
     34725                else
     34726                  break
     34727                fi
     34728@@ -3235,7 +3304,7 @@
     34729 }
     34730 
     34731 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
     34732-echo "configure:3239: checking for $cf_ncuhdr_root header in include-path" >&5
     34733+echo "configure:3308: checking for $cf_ncuhdr_root header in include-path" >&5
     34734 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
     34735   echo $ac_n "(cached) $ac_c" 1>&6
     34736 else
     34737@@ -3246,7 +3315,7 @@
     34738        do
     34739               
     34740        cat > conftest.$ac_ext <<EOF
     34741-#line 3250 "configure"
     34742+#line 3319 "configure"
     34743 #include "confdefs.h"
     34744 
     34745 
     34746@@ -3267,7 +3336,7 @@
     34747       
     34748 ; return 0; }
     34749 EOF
     34750-if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34751+if { (eval echo configure:3340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34752   rm -rf conftest*
     34753   cf_cv_ncurses_h=$cf_header
     34754       
     34755@@ -3293,13 +3362,39 @@
     34756 else
     34757 
     34758 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
     34759-echo "configure:3297: checking for $cf_ncuhdr_root include-path" >&5
     34760+echo "configure:3366: checking for $cf_ncuhdr_root include-path" >&5
     34761 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
     34762   echo $ac_n "(cached) $ac_c" 1>&6
     34763 else
     34764   
     34765        test -n "$verbose" && echo
     34766-       cf_search=""
     34767+       
     34768+cf_header_path_list=""
     34769+if test -n "${CFLAGS}${CPPFLAGS}" ; then
     34770+       for cf_header_path in $CPPFLAGS $CFLAGS
     34771+       do
     34772+               case $cf_header_path in #(vi
     34773+               -I*)
     34774+                       cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
     34775+                       
     34776+test "$cf_header_path" != "NONE" && \
     34777+test -d "$cf_header_path" && \
     34778+ {
     34779+       test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
     34780+       test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
     34781+       test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
     34782+       test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
     34783+       test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
     34784+       test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
     34785+}
     34786+
     34787+                       cf_header_path_list="$cf_header_path_list $cf_search"
     34788+                       ;;
     34789+               esac
     34790+       done
     34791+fi
     34792+
     34793+cf_search=""
     34794 
     34795 
     34796 test "/usr" != "$prefix" && \
     34797@@ -3362,6 +3457,7 @@
     34798 }
     34799 
     34800 
     34801+
     34802 test "$includedir" != NONE && \
     34803 test "$includedir" != "/usr/include" && \
     34804 test -d "$includedir" && {
     34805@@ -3376,6 +3472,7 @@
     34806        test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
     34807 }
     34808 
     34809+cf_search="$cf_header_path_list $cf_search"
     34810 
     34811        test -n "$verbose" && echo search path $cf_search
     34812        cf_save2_CPPFLAGS="$CPPFLAGS"
     34813@@ -3400,20 +3497,20 @@
     34814                fi
     34815 
     34816                if test "$cf_have_incdir" = no ; then
     34817-          if test "$cf_add_incdir" = /usr/local/include ; then
     34818+                 if test "$cf_add_incdir" = /usr/local/include ; then
     34819                        if test "$GCC" = yes
     34820                        then
     34821                          cf_save_CPPFLAGS=$CPPFLAGS
     34822                          CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
     34823                          cat > conftest.$ac_ext <<EOF
     34824-#line 3410 "configure"
     34825+#line 3507 "configure"
     34826 #include "confdefs.h"
     34827 #include <stdio.h>
     34828 int main() {
     34829 printf("Hello")
     34830 ; return 0; }
     34831 EOF
     34832-if { (eval echo configure:3417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34833+if { (eval echo configure:3514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34834   :
     34835 else
     34836   echo "configure: failed program was:" >&5
     34837@@ -3430,14 +3527,14 @@
     34838                if test "$cf_have_incdir" = no ; then
     34839                  test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
     34840 
     34841-echo "${as_me-configure}:3434: testing adding $cf_add_incdir to include-path ..." 1>&5
     34842+echo "${as_me-configure}:3531: testing adding $cf_add_incdir to include-path ..." 1>&5
     34843 
     34844 
     34845-                 CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
     34846+                 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
     34847 
     34848-          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
     34849-          test "$cf_top_incdir" = "$cf_add_incdir" && break
     34850-          cf_add_incdir="$cf_top_incdir"
     34851+                 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
     34852+                 test "$cf_top_incdir" = "$cf_add_incdir" && break
     34853+                 cf_add_incdir="$cf_top_incdir"
     34854                else
     34855                  break
     34856                fi
     34857@@ -3452,7 +3549,7 @@
     34858                do
     34859                       
     34860        cat > conftest.$ac_ext <<EOF
     34861-#line 3456 "configure"
     34862+#line 3553 "configure"
     34863 #include "confdefs.h"
     34864 
     34865 
     34866@@ -3473,7 +3570,7 @@
     34867       
     34868 ; return 0; }
     34869 EOF
     34870-if { (eval echo configure:3477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34871+if { (eval echo configure:3574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34872   rm -rf conftest*
     34873   cf_cv_ncurses_h2=$cf_header
     34874       
     34875@@ -3525,20 +3622,20 @@
     34876                fi
     34877 
     34878                if test "$cf_have_incdir" = no ; then
     34879-          if test "$cf_add_incdir" = /usr/local/include ; then
     34880+                 if test "$cf_add_incdir" = /usr/local/include ; then
     34881                        if test "$GCC" = yes
     34882                        then
     34883                          cf_save_CPPFLAGS=$CPPFLAGS
     34884                          CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
     34885                          cat > conftest.$ac_ext <<EOF
     34886-#line 3535 "configure"
     34887+#line 3632 "configure"
     34888 #include "confdefs.h"
     34889 #include <stdio.h>
     34890 int main() {
     34891 printf("Hello")
     34892 ; return 0; }
     34893 EOF
     34894-if { (eval echo configure:3542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34895+if { (eval echo configure:3639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34896   :
     34897 else
     34898   echo "configure: failed program was:" >&5
     34899@@ -3555,14 +3652,14 @@
     34900                if test "$cf_have_incdir" = no ; then
     34901                  test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
     34902 
     34903-echo "${as_me-configure}:3559: testing adding $cf_add_incdir to include-path ..." 1>&5
     34904+echo "${as_me-configure}:3656: testing adding $cf_add_incdir to include-path ..." 1>&5
     34905 
     34906 
     34907-                 CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
     34908+                 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
     34909 
     34910-          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
     34911-          test "$cf_top_incdir" = "$cf_add_incdir" && break
     34912-          cf_add_incdir="$cf_top_incdir"
     34913+                 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
     34914+                 test "$cf_top_incdir" = "$cf_add_incdir" && break
     34915+                 cf_add_incdir="$cf_top_incdir"
     34916                else
     34917                  break
     34918                fi
     34919@@ -3603,7 +3700,7 @@
     34920 
     34921 
     34922 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
     34923-echo "configure:3607: checking for terminfo header" >&5
     34924+echo "configure:3704: checking for terminfo header" >&5
     34925 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
     34926   echo $ac_n "(cached) $ac_c" 1>&6
     34927 else
     34928@@ -3620,7 +3717,7 @@
     34929 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
     34930 do
     34931 cat > conftest.$ac_ext <<EOF
     34932-#line 3624 "configure"
     34933+#line 3721 "configure"
     34934 #include "confdefs.h"
     34935 #include <stdio.h>
     34936 #include <${cf_cv_ncurses_header-curses.h}>
     34937@@ -3630,7 +3727,7 @@
     34938 int x = auto_left_margin
     34939 ; return 0; }
     34940 EOF
     34941-if { (eval echo configure:3634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34942+if { (eval echo configure:3731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     34943   rm -rf conftest*
     34944   
     34945        cf_cv_term_header="$cf_test"
     34946@@ -3685,7 +3782,7 @@
     34947 
     34948 
     34949 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
     34950-echo "configure:3689: checking for ncurses version" >&5
     34951+echo "configure:3786: checking for ncurses version" >&5
     34952 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
     34953   echo $ac_n "(cached) $ac_c" 1>&6
     34954 else
     34955@@ -3711,7 +3808,7 @@
     34956 #endif
     34957 EOF
     34958        cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
     34959-       { (eval echo configure:3715: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
     34960+       { (eval echo configure:3812: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
     34961        if test -f conftest.out ; then
     34962                cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
     34963                test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
     34964@@ -3720,7 +3817,7 @@
     34965 
     34966 else
     34967   cat > conftest.$ac_ext <<EOF
     34968-#line 3724 "configure"
     34969+#line 3821 "configure"
     34970 #include "confdefs.h"
     34971 
     34972 #include <${cf_cv_ncurses_header-curses.h}>
     34973@@ -3744,7 +3841,7 @@
     34974        ${cf_cv_main_return-return}(0);
     34975 }
     34976 EOF
     34977-if { (eval echo configure:3748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     34978+if { (eval echo configure:3845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     34979 then
     34980   
     34981        cf_cv_ncurses_version=`cat $cf_tempfile`
     34982@@ -3766,7 +3863,7 @@
     34983 
     34984 
     34985 
     34986-       
     34987+
     34988 
     34989 cf_nculib_root=ncurses
     34990        # This works, except for the special case where we find gpm, but
     34991@@ -3775,7 +3872,7 @@
     34992 cf_ncurses_LIBS=""
     34993 cf_ncurses_SAVE="$LIBS"
     34994 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
     34995-echo "configure:3779: checking for Gpm_Open in -lgpm" >&5
     34996+echo "configure:3876: checking for Gpm_Open in -lgpm" >&5
     34997 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
     34998 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     34999   echo $ac_n "(cached) $ac_c" 1>&6
     35000@@ -3783,7 +3880,7 @@
     35001   ac_save_LIBS="$LIBS"
     35002 LIBS="-lgpm  $LIBS"
     35003 cat > conftest.$ac_ext <<EOF
     35004-#line 3787 "configure"
     35005+#line 3884 "configure"
     35006 #include "confdefs.h"
     35007 /* Override any gcc2 internal prototype to avoid an error.  */
     35008 /* We use char because int might match the return type of a gcc2
     35009@@ -3794,7 +3891,7 @@
     35010 Gpm_Open()
     35011 ; return 0; }
     35012 EOF
     35013-if { (eval echo configure:3798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35014+if { (eval echo configure:3895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35015   rm -rf conftest*
     35016   eval "ac_cv_lib_$ac_lib_var=yes"
     35017 else
     35018@@ -3810,7 +3907,7 @@
     35019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
     35020   echo "$ac_t""yes" 1>&6
     35021   echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
     35022-echo "configure:3814: checking for initscr in -lgpm" >&5
     35023+echo "configure:3911: checking for initscr in -lgpm" >&5
     35024 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
     35025 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     35026   echo $ac_n "(cached) $ac_c" 1>&6
     35027@@ -3818,7 +3915,7 @@
     35028   ac_save_LIBS="$LIBS"
     35029 LIBS="-lgpm  $LIBS"
     35030 cat > conftest.$ac_ext <<EOF
     35031-#line 3822 "configure"
     35032+#line 3919 "configure"
     35033 #include "confdefs.h"
     35034 /* Override any gcc2 internal prototype to avoid an error.  */
     35035 /* We use char because int might match the return type of a gcc2
     35036@@ -3829,7 +3926,7 @@
     35037 initscr()
     35038 ; return 0; }
     35039 EOF
     35040-if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35041+if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35042   rm -rf conftest*
     35043   eval "ac_cv_lib_$ac_lib_var=yes"
     35044 else
     35045@@ -3861,7 +3958,7 @@
     35046        # version of ncurses (but it should do no harm, since it's static).
     35047        if test "$cf_nculib_root" = ncurses ; then
     35048                echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
     35049-echo "configure:3865: checking for tgoto in -lmytinfo" >&5
     35050+echo "configure:3962: checking for tgoto in -lmytinfo" >&5
     35051 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
     35052 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     35053   echo $ac_n "(cached) $ac_c" 1>&6
     35054@@ -3869,7 +3966,7 @@
     35055   ac_save_LIBS="$LIBS"
     35056 LIBS="-lmytinfo  $LIBS"
     35057 cat > conftest.$ac_ext <<EOF
     35058-#line 3873 "configure"
     35059+#line 3970 "configure"
     35060 #include "confdefs.h"
     35061 /* Override any gcc2 internal prototype to avoid an error.  */
     35062 /* We use char because int might match the return type of a gcc2
     35063@@ -3880,7 +3977,7 @@
     35064 tgoto()
     35065 ; return 0; }
     35066 EOF
     35067-if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35068+if { (eval echo configure:3981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35069   rm -rf conftest*
     35070   eval "ac_cv_lib_$ac_lib_var=yes"
     35071 else
     35072@@ -3928,7 +4025,7 @@
     35073       if test "$cf_have_libdir" = no ; then
     35074         test -n "$verbose" && echo "   adding $cf_add_libdir to library-path" 1>&6
     35075 
     35076-echo "${as_me-configure}:3932: testing adding $cf_add_libdir to library-path ..." 1>&5
     35077+echo "${as_me-configure}:4029: testing adding $cf_add_libdir to library-path ..." 1>&5
     35078 
     35079 
     35080         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
     35081@@ -3943,12 +4040,12 @@
     35082        eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
     35083        cf_libdir=""
     35084        echo $ac_n "checking for initscr""... $ac_c" 1>&6
     35085-echo "configure:3947: checking for initscr" >&5
     35086+echo "configure:4044: checking for initscr" >&5
     35087 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
     35088   echo $ac_n "(cached) $ac_c" 1>&6
     35089 else
     35090   cat > conftest.$ac_ext <<EOF
     35091-#line 3952 "configure"
     35092+#line 4049 "configure"
     35093 #include "confdefs.h"
     35094 /* System header to define __stub macros and hopefully few prototypes,
     35095     which can conflict with char initscr(); below.  */
     35096@@ -3971,7 +4068,7 @@
     35097 
     35098 ; return 0; }
     35099 EOF
     35100-if { (eval echo configure:3975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35101+if { (eval echo configure:4072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35102   rm -rf conftest*
     35103   eval "ac_cv_func_initscr=yes"
     35104 else
     35105@@ -3991,17 +4088,17 @@
     35106 
     35107                cf_save_LIBS="$LIBS"
     35108                echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
     35109-echo "configure:3995: checking for initscr in -l$cf_nculib_root" >&5
     35110+echo "configure:4092: checking for initscr in -l$cf_nculib_root" >&5
     35111                LIBS="-l$cf_nculib_root $LIBS"
     35112                cat > conftest.$ac_ext <<EOF
     35113-#line 3998 "configure"
     35114+#line 4095 "configure"
     35115 #include "confdefs.h"
     35116 #include <${cf_cv_ncurses_header-curses.h}>
     35117 int main() {
     35118 initscr()
     35119 ; return 0; }
     35120 EOF
     35121-if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35122+if { (eval echo configure:4102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35123   rm -rf conftest*
     35124   echo "$ac_t""yes" 1>&6
     35125                         eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
     35126@@ -4011,7 +4108,33 @@
     35127   cat conftest.$ac_ext >&5
     35128   rm -rf conftest*
     35129   echo "$ac_t""no" 1>&6
     35130-                       cf_search=""
     35131+                       
     35132+cf_library_path_list=""
     35133+if test -n "${LDFLAGS}${LIBS}" ; then
     35134+       for cf_library_path in $LDFLAGS $LIBS
     35135+       do
     35136+               case $cf_library_path in #(vi
     35137+               -L*)
     35138+                       cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
     35139+                       
     35140+test "$cf_library_path" != "NONE" && \
     35141+test -d "$cf_library_path" && \
     35142+ {
     35143+       test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
     35144+       test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
     35145+       test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
     35146+       test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
     35147+       test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
     35148+       test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
     35149+}
     35150+
     35151+                       cf_library_path_list="$cf_library_path_list $cf_search"
     35152+                       ;;
     35153+               esac
     35154+       done
     35155+fi
     35156+
     35157+cf_search=""
     35158 
     35159 
     35160 test "/usr" != "$prefix" && \
     35161@@ -4074,20 +4197,23 @@
     35162 }
     35163 
     35164 
     35165+
     35166+cf_search="$cf_library_path_list $cf_search"
     35167+
     35168                        for cf_libdir in $cf_search
     35169                        do
     35170                                echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
     35171-echo "configure:4081: checking for -l$cf_nculib_root in $cf_libdir" >&5
     35172+echo "configure:4207: checking for -l$cf_nculib_root in $cf_libdir" >&5
     35173                                LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
     35174                                cat > conftest.$ac_ext <<EOF
     35175-#line 4084 "configure"
     35176+#line 4210 "configure"
     35177 #include "confdefs.h"
     35178 #include <${cf_cv_ncurses_header-curses.h}>
     35179 int main() {
     35180 initscr()
     35181 ; return 0; }
     35182 EOF
     35183-if { (eval echo configure:4091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35184+if { (eval echo configure:4217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35185   rm -rf conftest*
     35186   echo "$ac_t""yes" 1>&6
     35187                                         eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
     35188@@ -4118,7 +4244,7 @@
     35189 
     35190 if test -n "$cf_ncurses_LIBS" ; then
     35191        echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
     35192-echo "configure:4122: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
     35193+echo "configure:4248: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
     35194        cf_ncurses_SAVE="$LIBS"
     35195        for p in $cf_ncurses_LIBS ; do
     35196                q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
     35197@@ -4127,14 +4253,14 @@
     35198                fi
     35199        done
     35200        cat > conftest.$ac_ext <<EOF
     35201-#line 4131 "configure"
     35202+#line 4257 "configure"
     35203 #include "confdefs.h"
     35204 #include <${cf_cv_ncurses_header-curses.h}>
     35205 int main() {
     35206 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
     35207 ; return 0; }
     35208 EOF
     35209-if { (eval echo configure:4138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35210+if { (eval echo configure:4264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35211   rm -rf conftest*
     35212   echo "$ac_t""yes" 1>&6
     35213 else
     35214@@ -4155,19 +4281,22 @@
     35215 EOF
     35216 
     35217 
     35218+
     35219+fi
     35220+
     35221        ;;
     35222 ncursesw)
     35223        cf_cv_libtype=w
     35224       
     35225 echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
     35226-echo "configure:4164: checking for multibyte character support" >&5
     35227+echo "configure:4293: checking for multibyte character support" >&5
     35228 if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
     35229   echo $ac_n "(cached) $ac_c" 1>&6
     35230 else
     35231   
     35232        cf_save_LIBS="$LIBS"
     35233        cat > conftest.$ac_ext <<EOF
     35234-#line 4171 "configure"
     35235+#line 4300 "configure"
     35236 #include "confdefs.h"
     35237 
     35238 #include <stdlib.h>
     35239@@ -4175,16 +4304,26 @@
     35240 putwc(0,0);
     35241 ; return 0; }
     35242 EOF
     35243-if { (eval echo configure:4179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35244+if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35245   rm -rf conftest*
     35246   cf_cv_utf8_lib=yes
     35247 else
     35248   echo "configure: failed program was:" >&5
     35249   cat conftest.$ac_ext >&5
     35250   rm -rf conftest*
     35251-  LIBS="-lutf8 $LIBS"
     35252-        cat > conftest.$ac_ext <<EOF
     35253-#line 4188 "configure"
     35254
     35255+
     35256+# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
     35257+# will be set on completion of the AC_TRY_LINK below.
     35258+cf_cv_header_path_utf8=
     35259+cf_cv_library_path_utf8=
     35260+
     35261+
     35262+echo "${as_me-configure}:4323: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
     35263+
     35264+
     35265+cat > conftest.$ac_ext <<EOF
     35266+#line 4327 "configure"
     35267 #include "confdefs.h"
     35268 
     35269 #include <libutf8.h>
     35270@@ -4192,17 +4331,341 @@
     35271 putwc(0,0);
     35272 ; return 0; }
     35273 EOF
     35274-if { (eval echo configure:4196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35275+if { (eval echo configure:4335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35276   rm -rf conftest*
     35277-  cf_cv_utf8_lib=add-on
     35278+  cf_cv_find_linkage_utf8=yes
     35279 else
     35280   echo "configure: failed program was:" >&5
     35281   cat conftest.$ac_ext >&5
     35282   rm -rf conftest*
     35283-  cf_cv_utf8_lib=no
     35284
     35285+    cf_cv_find_linkage_utf8=no
     35286+
     35287+    test -n "$verbose" && echo "       find linkage for utf8 library" 1>&6
     35288+
     35289+echo "${as_me-configure}:4347: testing find linkage for utf8 library ..." 1>&5
     35290+
     35291+
     35292+   
     35293+echo "${as_me-configure}:4351: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
     35294+
     35295+
     35296+    cf_save_CPPFLAGS="$CPPFLAGS"
     35297+    cf_test_CPPFLAGS="$CPPFLAGS"
     35298+
     35299+   
     35300+cf_header_path_list=""
     35301+if test -n "${CFLAGS}${CPPFLAGS}" ; then
     35302+       for cf_header_path in $CPPFLAGS $CFLAGS
     35303+       do
     35304+               case $cf_header_path in #(vi
     35305+               -I*)
     35306+                       cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
     35307+                       
     35308+test "$cf_header_path" != "NONE" && \
     35309+test -d "$cf_header_path" && \
     35310+ {
     35311+       test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
     35312+       test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
     35313+       test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
     35314+       test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
     35315+       test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
     35316+       test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
     35317+}
     35318+
     35319+                       cf_header_path_list="$cf_header_path_list $cf_search"
     35320+                       ;;
     35321+               esac
     35322+       done
     35323+fi
     35324+
     35325+cf_search=""
     35326+
     35327+
     35328+test "/usr" != "$prefix" && \
     35329+test -d "/usr" && \
     35330+(test $prefix = NONE || test -d $prefix) && {
     35331+       test -n "$verbose" && echo "    ... testing for include-directories under /usr"
     35332+       test -d /usr/include &&          cf_search="$cf_search /usr/include"
     35333+       test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
     35334+       test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
     35335+       test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
     35336+       test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
     35337+}
     35338+
     35339+
     35340+test "$prefix" != "NONE" && \
     35341+test -d "$prefix" && \
     35342+ {
     35343+       test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
     35344+       test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
     35345+       test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
     35346+       test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
     35347+       test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
     35348+       test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
     35349+}
     35350+
     35351+
     35352+test "/usr/local" != "$prefix" && \
     35353+test -d "/usr/local" && \
     35354+(test $prefix = NONE || test -d $prefix) && {
     35355+       test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
     35356+       test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
     35357+       test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
     35358+       test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
     35359+       test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
     35360+       test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
     35361+}
     35362+
     35363+
     35364+test "/opt" != "$prefix" && \
     35365+test -d "/opt" && \
     35366+(test $prefix = NONE || test -d $prefix) && {
     35367+       test -n "$verbose" && echo "    ... testing for include-directories under /opt"
     35368+       test -d /opt/include &&          cf_search="$cf_search /opt/include"
     35369+       test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
     35370+       test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
     35371+       test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
     35372+       test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
     35373+}
     35374+
     35375+
     35376+test "$HOME" != "$prefix" && \
     35377+test -d "$HOME" && \
     35378+(test $prefix = NONE || test -d $prefix) && {
     35379+       test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
     35380+       test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
     35381+       test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
     35382+       test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
     35383+       test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
     35384+       test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
     35385+}
     35386+
     35387+
     35388+
     35389+test "$includedir" != NONE && \
     35390+test "$includedir" != "/usr/include" && \
     35391+test -d "$includedir" && {
     35392+       test -d $includedir &&    cf_search="$cf_search $includedir"
     35393+       test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
     35394+}
     35395+
     35396+test "$oldincludedir" != NONE && \
     35397+test "$oldincludedir" != "/usr/include" && \
     35398+test -d "$oldincludedir" && {
     35399+       test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
     35400+       test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
     35401+}
     35402+
     35403+cf_search="$cf_header_path_list $cf_search"
     35404+
     35405+    for cf_cv_header_path_utf8 in $cf_search
     35406+    do
     35407+      if test -d $cf_cv_header_path_utf8 ; then
     35408+        test -n "$verbose" && echo "   ... testing $cf_cv_header_path_utf8" 1>&6
     35409+
     35410+echo "${as_me-configure}:4468: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
     35411+
     35412+
     35413+        CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
     35414+        cat > conftest.$ac_ext <<EOF
     35415+#line 4473 "configure"
     35416+#include "confdefs.h"
     35417+
     35418+#include <libutf8.h>
     35419+int main() {
     35420+putwc(0,0);
     35421+; return 0; }
     35422+EOF
     35423+if { (eval echo configure:4481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     35424+  rm -rf conftest*
     35425
     35426+            test -n "$verbose" && echo "       ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
     35427+
     35428+echo "${as_me-configure}:4486: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
     35429+
     35430+
     35431+            cf_cv_find_linkage_utf8=maybe
     35432+            cf_test_CPPFLAGS="$CPPFLAGS"
     35433+            break
     35434+else
     35435+  echo "configure: failed program was:" >&5
     35436+  cat conftest.$ac_ext >&5
     35437+  rm -rf conftest*
     35438
     35439+            CPPFLAGS="$cf_save_CPPFLAGS"
     35440+           
     35441 fi
     35442 rm -f conftest*
     35443-       LIBS="$cf_save_LIBS"
     35444+      fi
     35445+    done
     35446+
     35447+    if test "$cf_cv_find_linkage_utf8" = maybe ; then
     35448+
     35449+     
     35450+echo "${as_me-configure}:4507: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
     35451+
     35452+
     35453+      cf_save_LIBS="$LIBS"
     35454+      cf_save_LDFLAGS="$LDFLAGS"
     35455+
     35456+     
     35457+
     35458+      if test "$cf_cv_find_linkage_utf8" != yes ; then
     35459+       
     35460+cf_library_path_list=""
     35461+if test -n "${LDFLAGS}${LIBS}" ; then
     35462+       for cf_library_path in $LDFLAGS $LIBS
     35463+       do
     35464+               case $cf_library_path in #(vi
     35465+               -L*)
     35466+                       cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
     35467+                       
     35468+test "$cf_library_path" != "NONE" && \
     35469+test -d "$cf_library_path" && \
     35470+ {
     35471+       test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
     35472+       test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
     35473+       test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
     35474+       test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
     35475+       test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
     35476+       test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
     35477+}
     35478+
     35479+                       cf_library_path_list="$cf_library_path_list $cf_search"
     35480+                       ;;
     35481+               esac
     35482+       done
     35483+fi
     35484+
     35485+cf_search=""
     35486+
     35487+
     35488+test "/usr" != "$prefix" && \
     35489+test -d "/usr" && \
     35490+(test $prefix = NONE || test -d $prefix) && {
     35491+       test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
     35492+       test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
     35493+       test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
     35494+       test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
     35495+       test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
     35496+       test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
     35497+}
     35498+
     35499+
     35500+test "$prefix" != "NONE" && \
     35501+test -d "$prefix" && \
     35502+ {
     35503+       test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
     35504+       test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
     35505+       test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
     35506+       test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
     35507+       test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
     35508+       test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
     35509+}
     35510+
     35511+
     35512+test "/usr/local" != "$prefix" && \
     35513+test -d "/usr/local" && \
     35514+(test $prefix = NONE || test -d $prefix) && {
     35515+       test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
     35516+       test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
     35517+       test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
     35518+       test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
     35519+       test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
     35520+       test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
     35521+}
     35522+
     35523+
     35524+test "/opt" != "$prefix" && \
     35525+test -d "/opt" && \
     35526+(test $prefix = NONE || test -d $prefix) && {
     35527+       test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
     35528+       test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
     35529+       test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
     35530+       test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
     35531+       test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
     35532+       test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
     35533+}
     35534+
     35535+
     35536+test "$HOME" != "$prefix" && \
     35537+test -d "$HOME" && \
     35538+(test $prefix = NONE || test -d $prefix) && {
     35539+       test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
     35540+       test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
     35541+       test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
     35542+       test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
     35543+       test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
     35544+       test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
     35545+}
     35546+
     35547+
     35548+
     35549+cf_search="$cf_library_path_list $cf_search"
     35550+
     35551+        for cf_cv_library_path_utf8 in $cf_search
     35552+        do
     35553+          if test -d $cf_cv_library_path_utf8 ; then
     35554+            test -n "$verbose" && echo "       ... testing $cf_cv_library_path_utf8" 1>&6
     35555+
     35556+echo "${as_me-configure}:4613: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
     35557+
     35558+
     35559+            CPPFLAGS="$cf_test_CPPFLAGS"
     35560+            LIBS="-lutf8  $cf_save_LIBS"
     35561+            LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
     35562+            cat > conftest.$ac_ext <<EOF
     35563+#line 4620 "configure"
     35564+#include "confdefs.h"
     35565+
     35566+#include <libutf8.h>
     35567+int main() {
     35568+putwc(0,0);
     35569+; return 0; }
     35570+EOF
     35571+if { (eval echo configure:4628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     35572+  rm -rf conftest*
     35573
     35574+                test -n "$verbose" && echo "   ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
     35575+
     35576+echo "${as_me-configure}:4633: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
     35577+
     35578+
     35579+                cf_cv_find_linkage_utf8=yes
     35580+                cf_cv_library_file_utf8="-lutf8"
     35581+                break
     35582+else
     35583+  echo "configure: failed program was:" >&5
     35584+  cat conftest.$ac_ext >&5
     35585+  rm -rf conftest*
     35586
     35587+                CPPFLAGS="$cf_save_CPPFLAGS"
     35588+                LIBS="$cf_save_LIBS"
     35589+                LDFLAGS="$cf_save_LDFLAGS"
     35590+               
     35591+fi
     35592+rm -f conftest*
     35593+          fi
     35594+        done
     35595+        LIBS="$cf_save_LIBS"
     35596+        CPPFLAGS="$cf_save_CPPFLAGS"
     35597+        LDFLAGS="$cf_save_LDFLAGS"
     35598+      fi
     35599+
     35600+    else
     35601+      cf_cv_find_linkage_utf8=no
     35602+    fi
     35603+   
     35604+fi
     35605+rm -f conftest*
     35606+
     35607+if test "$cf_cv_find_linkage_utf8" = yes ; then
     35608+cf_cv_utf8_lib=add-on
     35609+else
     35610+cf_cv_utf8_lib=no
     35611+fi
     35612+
     35613 
     35614 fi
     35615 rm -f conftest*
     35616@@ -4217,10 +4680,174 @@
     35617 #define HAVE_LIBUTF8_H 1
     35618 EOF
     35619 
     35620+       
     35621+if test -n "$cf_cv_header_path_utf8" ; then
     35622+  for cf_add_incdir in $cf_cv_header_path_utf8
     35623+  do
     35624+       while test $cf_add_incdir != /usr/include
     35625+       do
     35626+         if test -d $cf_add_incdir
     35627+         then
     35628+               cf_have_incdir=no
     35629+               if test -n "$CFLAGS$CPPFLAGS" ; then
     35630+                 # a loop is needed to ensure we can add subdirs of existing dirs
     35631+                 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
     35632+                       if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
     35633+                         cf_have_incdir=yes; break
     35634+                       fi
     35635+                 done
     35636+               fi
     35637+
     35638+               if test "$cf_have_incdir" = no ; then
     35639+                 if test "$cf_add_incdir" = /usr/local/include ; then
     35640+                       if test "$GCC" = yes
     35641+                       then
     35642+                         cf_save_CPPFLAGS=$CPPFLAGS
     35643+                         CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
     35644+                         cat > conftest.$ac_ext <<EOF
     35645+#line 4709 "configure"
     35646+#include "confdefs.h"
     35647+#include <stdio.h>
     35648+int main() {
     35649+printf("Hello")
     35650+; return 0; }
     35651+EOF
     35652+if { (eval echo configure:4716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     35653+  :
     35654+else
     35655+  echo "configure: failed program was:" >&5
     35656+  cat conftest.$ac_ext >&5
     35657+  rm -rf conftest*
     35658+  cf_have_incdir=yes
     35659+fi
     35660+rm -f conftest*
     35661+                         CPPFLAGS=$cf_save_CPPFLAGS
     35662+                       fi
     35663+                 fi
     35664+               fi
     35665+
     35666+               if test "$cf_have_incdir" = no ; then
     35667+                 test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
     35668+
     35669+echo "${as_me-configure}:4733: testing adding $cf_add_incdir to include-path ..." 1>&5
     35670+
     35671+
     35672+                 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
     35673+
     35674+                 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
     35675+                 test "$cf_top_incdir" = "$cf_add_incdir" && break
     35676+                 cf_add_incdir="$cf_top_incdir"
     35677+               else
     35678+                 break
     35679+               fi
     35680+         fi
     35681+       done
     35682+  done
     35683+fi
     35684+
     35685+       
     35686+if test -n "$cf_cv_library_path_utf8" ; then
     35687+  for cf_add_libdir in $cf_cv_library_path_utf8
     35688+  do
     35689+    if test $cf_add_libdir = /usr/lib ; then
     35690+      :
     35691+    elif test -d $cf_add_libdir
     35692+    then
     35693+      cf_have_libdir=no
     35694+      if test -n "$LDFLAGS$LIBS" ; then
     35695+        # a loop is needed to ensure we can add subdirs of existing dirs
     35696+        for cf_test_libdir in $LDFLAGS $LIBS ; do
     35697+          if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
     35698+            cf_have_libdir=yes; break
     35699+          fi
     35700+        done
     35701+      fi
     35702+      if test "$cf_have_libdir" = no ; then
     35703+        test -n "$verbose" && echo "   adding $cf_add_libdir to library-path" 1>&6
     35704+
     35705+echo "${as_me-configure}:4769: testing adding $cf_add_libdir to library-path ..." 1>&5
     35706+
     35707+
     35708+        LDFLAGS="-L$cf_add_libdir $LDFLAGS"
     35709+      fi
     35710+    fi
     35711+  done
     35712+fi
     35713+
     35714        LIBS="-lutf8 $LIBS"
     35715 fi
     35716 
     35717       
     35718+cf_ncuconfig_root=ncursesw
     35719+
     35720+echo "Looking for ${cf_ncuconfig_root}-config"
     35721+for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
     35722+do
     35723+# Extract the first word of "$ac_prog", so it can be a program name with args.
     35724+set dummy $ac_prog; ac_word=$2
     35725+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     35726+echo "configure:4790: checking for $ac_word" >&5
     35727+if eval "test \"`echo '$''{'ac_cv_path_NCURSES_CONFIG'+set}'`\" = set"; then
     35728+  echo $ac_n "(cached) $ac_c" 1>&6
     35729+else
     35730+  case "$NCURSES_CONFIG" in
     35731+  /*)
     35732+  ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
     35733+  ;;
     35734+  ?:/*)                         
     35735+  ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a dos path.
     35736+  ;;
     35737+  *)
     35738+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
     35739+  ac_dummy="$PATH"
     35740+  for ac_dir in $ac_dummy; do
     35741+    test -z "$ac_dir" && ac_dir=.
     35742+    if test -f $ac_dir/$ac_word; then
     35743+      ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
     35744+      break
     35745+    fi
     35746+  done
     35747+  IFS="$ac_save_ifs"
     35748+  ;;
     35749+esac
     35750+fi
     35751+NCURSES_CONFIG="$ac_cv_path_NCURSES_CONFIG"
     35752+if test -n "$NCURSES_CONFIG"; then
     35753+  echo "$ac_t""$NCURSES_CONFIG" 1>&6
     35754+else
     35755+  echo "$ac_t""no" 1>&6
     35756+fi
     35757+
     35758+test -n "$NCURSES_CONFIG" && break
     35759+done
     35760+test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
     35761+
     35762+
     35763+if test "$NCURSES_CONFIG" != none ; then
     35764+
     35765+cf_cv_ncurses_header=curses.h
     35766+
     35767+CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
     35768+LIBS="`$NCURSES_CONFIG --libs` $LIBS"
     35769+
     35770+cat >> confdefs.h <<\EOF
     35771+#define NCURSES 1
     35772+EOF
     35773+
     35774+
     35775+
     35776+cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
     35777+
     35778+cat >> confdefs.h <<EOF
     35779+#define $cf_nculib_ROOT 1
     35780+EOF
     35781+
     35782+
     35783+cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
     35784+
     35785+else
     35786+
     35787+
     35788 
     35789 cf_ncuhdr_root=ncursesw
     35790 
     35791@@ -4245,20 +4872,20 @@
     35792                fi
     35793 
     35794                if test "$cf_have_incdir" = no ; then
     35795-          if test "$cf_add_incdir" = /usr/local/include ; then
     35796+                 if test "$cf_add_incdir" = /usr/local/include ; then
     35797                        if test "$GCC" = yes
     35798                        then
     35799                          cf_save_CPPFLAGS=$CPPFLAGS
     35800                          CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
     35801                          cat > conftest.$ac_ext <<EOF
     35802-#line 4255 "configure"
     35803+#line 4882 "configure"
     35804 #include "confdefs.h"
     35805 #include <stdio.h>
     35806 int main() {
     35807 printf("Hello")
     35808 ; return 0; }
     35809 EOF
     35810-if { (eval echo configure:4262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     35811+if { (eval echo configure:4889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     35812   :
     35813 else
     35814   echo "configure: failed program was:" >&5
     35815@@ -4275,14 +4902,14 @@
     35816                if test "$cf_have_incdir" = no ; then
     35817                  test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
     35818 
     35819-echo "${as_me-configure}:4279: testing adding $cf_add_incdir to include-path ..." 1>&5
     35820+echo "${as_me-configure}:4906: testing adding $cf_add_incdir to include-path ..." 1>&5
     35821 
     35822 
     35823-                 CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
     35824+                 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
     35825 
     35826-          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
     35827-          test "$cf_top_incdir" = "$cf_add_incdir" && break
     35828-          cf_add_incdir="$cf_top_incdir"
     35829+                 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
     35830+                 test "$cf_top_incdir" = "$cf_add_incdir" && break
     35831+                 cf_add_incdir="$cf_top_incdir"
     35832                else
     35833                  break
     35834                fi
     35835@@ -4294,7 +4921,7 @@
     35836 }
     35837 
     35838 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
     35839-echo "configure:4298: checking for $cf_ncuhdr_root header in include-path" >&5
     35840+echo "configure:4925: checking for $cf_ncuhdr_root header in include-path" >&5
     35841 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
     35842   echo $ac_n "(cached) $ac_c" 1>&6
     35843 else
     35844@@ -4305,7 +4932,7 @@
     35845        do
     35846               
     35847        cat > conftest.$ac_ext <<EOF
     35848-#line 4309 "configure"
     35849+#line 4936 "configure"
     35850 #include "confdefs.h"
     35851 
     35852 
     35853@@ -4334,7 +4961,7 @@
     35854       
     35855 ; return 0; }
     35856 EOF
     35857-if { (eval echo configure:4338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     35858+if { (eval echo configure:4965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     35859   rm -rf conftest*
     35860   cf_cv_ncurses_h=$cf_header
     35861       
     35862@@ -4360,13 +4987,39 @@
     35863 else
     35864 
     35865 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
     35866-echo "configure:4364: checking for $cf_ncuhdr_root include-path" >&5
     35867+echo "configure:4991: checking for $cf_ncuhdr_root include-path" >&5
     35868 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
     35869   echo $ac_n "(cached) $ac_c" 1>&6
     35870 else
     35871   
     35872        test -n "$verbose" && echo
     35873-       cf_search=""
     35874+       
     35875+cf_header_path_list=""
     35876+if test -n "${CFLAGS}${CPPFLAGS}" ; then
     35877+       for cf_header_path in $CPPFLAGS $CFLAGS
     35878+       do
     35879+               case $cf_header_path in #(vi
     35880+               -I*)
     35881+                       cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
     35882+                       
     35883+test "$cf_header_path" != "NONE" && \
     35884+test -d "$cf_header_path" && \
     35885+ {
     35886+       test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
     35887+       test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
     35888+       test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
     35889+       test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
     35890+       test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
     35891+       test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
     35892+}
     35893+
     35894+                       cf_header_path_list="$cf_header_path_list $cf_search"
     35895+                       ;;
     35896+               esac
     35897+       done
     35898+fi
     35899+
     35900+cf_search=""
     35901 
     35902 
     35903 test "/usr" != "$prefix" && \
     35904@@ -4429,6 +5082,7 @@
     35905 }
     35906 
     35907 
     35908+
     35909 test "$includedir" != NONE && \
     35910 test "$includedir" != "/usr/include" && \
     35911 test -d "$includedir" && {
     35912@@ -4443,6 +5097,7 @@
     35913        test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
     35914 }
     35915 
     35916+cf_search="$cf_header_path_list $cf_search"
     35917 
     35918        test -n "$verbose" && echo search path $cf_search
     35919        cf_save2_CPPFLAGS="$CPPFLAGS"
     35920@@ -4467,20 +5122,20 @@
     35921                fi
     35922 
     35923                if test "$cf_have_incdir" = no ; then
     35924-          if test "$cf_add_incdir" = /usr/local/include ; then
     35925+                 if test "$cf_add_incdir" = /usr/local/include ; then
     35926                        if test "$GCC" = yes
     35927                        then
     35928                          cf_save_CPPFLAGS=$CPPFLAGS
     35929                          CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
     35930                          cat > conftest.$ac_ext <<EOF
     35931-#line 4477 "configure"
     35932+#line 5132 "configure"
     35933 #include "confdefs.h"
     35934 #include <stdio.h>
     35935 int main() {
     35936 printf("Hello")
     35937 ; return 0; }
     35938 EOF
     35939-if { (eval echo configure:4484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     35940+if { (eval echo configure:5139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     35941   :
     35942 else
     35943   echo "configure: failed program was:" >&5
     35944@@ -4497,14 +5152,14 @@
     35945                if test "$cf_have_incdir" = no ; then
     35946                  test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
     35947 
     35948-echo "${as_me-configure}:4501: testing adding $cf_add_incdir to include-path ..." 1>&5
     35949+echo "${as_me-configure}:5156: testing adding $cf_add_incdir to include-path ..." 1>&5
     35950 
     35951 
     35952-                 CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
     35953+                 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
     35954 
     35955-          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
     35956-          test "$cf_top_incdir" = "$cf_add_incdir" && break
     35957-          cf_add_incdir="$cf_top_incdir"
     35958+                 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
     35959+                 test "$cf_top_incdir" = "$cf_add_incdir" && break
     35960+                 cf_add_incdir="$cf_top_incdir"
     35961                else
     35962                  break
     35963                fi
     35964@@ -4519,7 +5174,7 @@
     35965                do
     35966                       
     35967        cat > conftest.$ac_ext <<EOF
     35968-#line 4523 "configure"
     35969+#line 5178 "configure"
     35970 #include "confdefs.h"
     35971 
     35972 
     35973@@ -4540,7 +5195,7 @@
     35974       
     35975 ; return 0; }
     35976 EOF
     35977-if { (eval echo configure:4544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     35978+if { (eval echo configure:5199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     35979   rm -rf conftest*
     35980   cf_cv_ncurses_h2=$cf_header
     35981       
     35982@@ -4592,20 +5247,20 @@
     35983                fi
     35984 
     35985                if test "$cf_have_incdir" = no ; then
     35986-          if test "$cf_add_incdir" = /usr/local/include ; then
     35987+                 if test "$cf_add_incdir" = /usr/local/include ; then
     35988                        if test "$GCC" = yes
     35989                        then
     35990                          cf_save_CPPFLAGS=$CPPFLAGS
     35991                          CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
     35992                          cat > conftest.$ac_ext <<EOF
     35993-#line 4602 "configure"
     35994+#line 5257 "configure"
     35995 #include "confdefs.h"
     35996 #include <stdio.h>
     35997 int main() {
     35998 printf("Hello")
     35999 ; return 0; }
     36000 EOF
     36001-if { (eval echo configure:4609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     36002+if { (eval echo configure:5264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     36003   :
     36004 else
     36005   echo "configure: failed program was:" >&5
     36006@@ -4622,14 +5277,14 @@
     36007                if test "$cf_have_incdir" = no ; then
     36008                  test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
     36009 
     36010-echo "${as_me-configure}:4626: testing adding $cf_add_incdir to include-path ..." 1>&5
     36011+echo "${as_me-configure}:5281: testing adding $cf_add_incdir to include-path ..." 1>&5
     36012 
     36013 
     36014-                 CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
     36015+                 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
     36016 
     36017-          cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
     36018-          test "$cf_top_incdir" = "$cf_add_incdir" && break
     36019-          cf_add_incdir="$cf_top_incdir"
     36020+                 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
     36021+                 test "$cf_top_incdir" = "$cf_add_incdir" && break
     36022+                 cf_add_incdir="$cf_top_incdir"
     36023                else
     36024                  break
     36025                fi
     36026@@ -4670,7 +5325,7 @@
     36027 
     36028 
     36029 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
     36030-echo "configure:4674: checking for terminfo header" >&5
     36031+echo "configure:5329: checking for terminfo header" >&5
     36032 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
     36033   echo $ac_n "(cached) $ac_c" 1>&6
     36034 else
     36035@@ -4687,7 +5342,7 @@
     36036 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
     36037 do
     36038 cat > conftest.$ac_ext <<EOF
     36039-#line 4691 "configure"
     36040+#line 5346 "configure"
     36041 #include "confdefs.h"
     36042 #include <stdio.h>
     36043 #include <${cf_cv_ncurses_header-curses.h}>
     36044@@ -4697,7 +5352,7 @@
     36045 int x = auto_left_margin
     36046 ; return 0; }
     36047 EOF
     36048-if { (eval echo configure:4701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     36049+if { (eval echo configure:5356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     36050   rm -rf conftest*
     36051   
     36052        cf_cv_term_header="$cf_test"
     36053@@ -4752,7 +5407,7 @@
     36054 
     36055 
     36056 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
     36057-echo "configure:4756: checking for ncurses version" >&5
     36058+echo "configure:5411: checking for ncurses version" >&5
     36059 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
     36060   echo $ac_n "(cached) $ac_c" 1>&6
     36061 else
     36062@@ -4778,7 +5433,7 @@
     36063 #endif
     36064 EOF
     36065        cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
     36066-       { (eval echo configure:4782: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
     36067+       { (eval echo configure:5437: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
     36068        if test -f conftest.out ; then
     36069                cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
     36070                test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
     36071@@ -4787,7 +5442,7 @@
     36072 
     36073 else
     36074   cat > conftest.$ac_ext <<EOF
     36075-#line 4791 "configure"
     36076+#line 5446 "configure"
     36077 #include "confdefs.h"
     36078 
     36079 #include <${cf_cv_ncurses_header-curses.h}>
     36080@@ -4811,7 +5466,7 @@
     36081        ${cf_cv_main_return-return}(0);
     36082 }
     36083 EOF
     36084-if { (eval echo configure:4815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     36085+if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     36086 then
     36087   
     36088        cf_cv_ncurses_version=`cat $cf_tempfile`
     36089@@ -4833,7 +5488,7 @@
     36090 
     36091 
     36092 
     36093-       
     36094+
     36095 
     36096 cf_nculib_root=ncursesw
     36097        # This works, except for the special case where we find gpm, but
     36098@@ -4842,7 +5497,7 @@
     36099 cf_ncurses_LIBS=""
     36100 cf_ncurses_SAVE="$LIBS"
     36101 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
     36102-echo "configure:4846: checking for Gpm_Open in -lgpm" >&5
     36103+echo "configure:5501: checking for Gpm_Open in -lgpm" >&5
     36104 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
     36105 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     36106   echo $ac_n "(cached) $ac_c" 1>&6
     36107@@ -4850,7 +5505,7 @@
     36108   ac_save_LIBS="$LIBS"
     36109 LIBS="-lgpm  $LIBS"
     36110 cat > conftest.$ac_ext <<EOF
     36111-#line 4854 "configure"
     36112+#line 5509 "configure"
     36113 #include "confdefs.h"
     36114 /* Override any gcc2 internal prototype to avoid an error.  */
     36115 /* We use char because int might match the return type of a gcc2
     36116@@ -4861,7 +5516,7 @@
     36117 Gpm_Open()
     36118 ; return 0; }
     36119 EOF
     36120-if { (eval echo configure:4865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36121+if { (eval echo configure:5520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36122   rm -rf conftest*
     36123   eval "ac_cv_lib_$ac_lib_var=yes"
     36124 else
     36125@@ -4877,7 +5532,7 @@
     36126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
     36127   echo "$ac_t""yes" 1>&6
     36128   echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
     36129-echo "configure:4881: checking for initscr in -lgpm" >&5
     36130+echo "configure:5536: checking for initscr in -lgpm" >&5
     36131 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
     36132 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     36133   echo $ac_n "(cached) $ac_c" 1>&6
     36134@@ -4885,7 +5540,7 @@
     36135   ac_save_LIBS="$LIBS"
     36136 LIBS="-lgpm  $LIBS"
     36137 cat > conftest.$ac_ext <<EOF
     36138-#line 4889 "configure"
     36139+#line 5544 "configure"
     36140 #include "confdefs.h"
     36141 /* Override any gcc2 internal prototype to avoid an error.  */
     36142 /* We use char because int might match the return type of a gcc2
     36143@@ -4896,7 +5551,7 @@
     36144 initscr()
     36145 ; return 0; }
     36146 EOF
     36147-if { (eval echo configure:4900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36148+if { (eval echo configure:5555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36149   rm -rf conftest*
     36150   eval "ac_cv_lib_$ac_lib_var=yes"
     36151 else
     36152@@ -4928,7 +5583,7 @@
     36153        # version of ncurses (but it should do no harm, since it's static).
     36154        if test "$cf_nculib_root" = ncurses ; then
     36155                echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
     36156-echo "configure:4932: checking for tgoto in -lmytinfo" >&5
     36157+echo "configure:5587: checking for tgoto in -lmytinfo" >&5
     36158 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
     36159 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     36160   echo $ac_n "(cached) $ac_c" 1>&6
     36161@@ -4936,7 +5591,7 @@
     36162   ac_save_LIBS="$LIBS"
     36163 LIBS="-lmytinfo  $LIBS"
     36164 cat > conftest.$ac_ext <<EOF
     36165-#line 4940 "configure"
     36166+#line 5595 "configure"
     36167 #include "confdefs.h"
     36168 /* Override any gcc2 internal prototype to avoid an error.  */
     36169 /* We use char because int might match the return type of a gcc2
     36170@@ -4947,7 +5602,7 @@
     36171 tgoto()
     36172 ; return 0; }
     36173 EOF
     36174-if { (eval echo configure:4951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36175+if { (eval echo configure:5606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36176   rm -rf conftest*
     36177   eval "ac_cv_lib_$ac_lib_var=yes"
     36178 else
     36179@@ -4995,7 +5650,7 @@
     36180       if test "$cf_have_libdir" = no ; then
     36181         test -n "$verbose" && echo "   adding $cf_add_libdir to library-path" 1>&6
     36182 
     36183-echo "${as_me-configure}:4999: testing adding $cf_add_libdir to library-path ..." 1>&5
     36184+echo "${as_me-configure}:5654: testing adding $cf_add_libdir to library-path ..." 1>&5
     36185 
     36186 
     36187         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
     36188@@ -5010,12 +5665,12 @@
     36189        eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
     36190        cf_libdir=""
     36191        echo $ac_n "checking for initscr""... $ac_c" 1>&6
     36192-echo "configure:5014: checking for initscr" >&5
     36193+echo "configure:5669: checking for initscr" >&5
     36194 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
     36195   echo $ac_n "(cached) $ac_c" 1>&6
     36196 else
     36197   cat > conftest.$ac_ext <<EOF
     36198-#line 5019 "configure"
     36199+#line 5674 "configure"
     36200 #include "confdefs.h"
     36201 /* System header to define __stub macros and hopefully few prototypes,
     36202     which can conflict with char initscr(); below.  */
     36203@@ -5038,7 +5693,7 @@
     36204 
     36205 ; return 0; }
     36206 EOF
     36207-if { (eval echo configure:5042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36208+if { (eval echo configure:5697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36209   rm -rf conftest*
     36210   eval "ac_cv_func_initscr=yes"
     36211 else
     36212@@ -5058,17 +5713,17 @@
     36213 
     36214                cf_save_LIBS="$LIBS"
     36215                echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
     36216-echo "configure:5062: checking for initscr in -l$cf_nculib_root" >&5
     36217+echo "configure:5717: checking for initscr in -l$cf_nculib_root" >&5
     36218                LIBS="-l$cf_nculib_root $LIBS"
     36219                cat > conftest.$ac_ext <<EOF
     36220-#line 5065 "configure"
     36221+#line 5720 "configure"
     36222 #include "confdefs.h"
     36223 #include <${cf_cv_ncurses_header-curses.h}>
     36224 int main() {
     36225 initscr()
     36226 ; return 0; }
     36227 EOF
     36228-if { (eval echo configure:5072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36229+if { (eval echo configure:5727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36230   rm -rf conftest*
     36231   echo "$ac_t""yes" 1>&6
     36232                         eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
     36233@@ -5078,7 +5733,33 @@
     36234   cat conftest.$ac_ext >&5
     36235   rm -rf conftest*
     36236   echo "$ac_t""no" 1>&6
     36237-                       cf_search=""
     36238+                       
     36239+cf_library_path_list=""
     36240+if test -n "${LDFLAGS}${LIBS}" ; then
     36241+       for cf_library_path in $LDFLAGS $LIBS
     36242+       do
     36243+               case $cf_library_path in #(vi
     36244+               -L*)
     36245+                       cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
     36246+                       
     36247+test "$cf_library_path" != "NONE" && \
     36248+test -d "$cf_library_path" && \
     36249+ {
     36250+       test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
     36251+       test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
     36252+       test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
     36253+       test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
     36254+       test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
     36255+       test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
     36256+}
     36257+
     36258+                       cf_library_path_list="$cf_library_path_list $cf_search"
     36259+                       ;;
     36260+               esac
     36261+       done
     36262+fi
     36263+
     36264+cf_search=""
     36265 
     36266 
     36267 test "/usr" != "$prefix" && \
     36268@@ -5141,20 +5822,23 @@
     36269 }
     36270 
     36271 
     36272+
     36273+cf_search="$cf_library_path_list $cf_search"
     36274+
     36275                        for cf_libdir in $cf_search
     36276                        do
     36277                                echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
     36278-echo "configure:5148: checking for -l$cf_nculib_root in $cf_libdir" >&5
     36279+echo "configure:5832: checking for -l$cf_nculib_root in $cf_libdir" >&5
     36280                                LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
     36281                                cat > conftest.$ac_ext <<EOF
     36282-#line 5151 "configure"
     36283+#line 5835 "configure"
     36284 #include "confdefs.h"
     36285 #include <${cf_cv_ncurses_header-curses.h}>
     36286 int main() {
     36287 initscr()
     36288 ; return 0; }
     36289 EOF
     36290-if { (eval echo configure:5158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36291+if { (eval echo configure:5842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36292   rm -rf conftest*
     36293   echo "$ac_t""yes" 1>&6
     36294                                         eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
     36295@@ -5185,7 +5869,7 @@
     36296 
     36297 if test -n "$cf_ncurses_LIBS" ; then
     36298        echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
     36299-echo "configure:5189: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
     36300+echo "configure:5873: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
     36301        cf_ncurses_SAVE="$LIBS"
     36302        for p in $cf_ncurses_LIBS ; do
     36303                q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
     36304@@ -5194,14 +5878,14 @@
     36305                fi
     36306        done
     36307        cat > conftest.$ac_ext <<EOF
     36308-#line 5198 "configure"
     36309+#line 5882 "configure"
     36310 #include "confdefs.h"
     36311 #include <${cf_cv_ncurses_header-curses.h}>
     36312 int main() {
     36313 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
     36314 ; return 0; }
     36315 EOF
     36316-if { (eval echo configure:5205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36317+if { (eval echo configure:5889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36318   rm -rf conftest*
     36319   echo "$ac_t""yes" 1>&6
     36320 else
     36321@@ -5222,6 +5906,9 @@
     36322 EOF
     36323 
     36324 
     36325+
     36326+fi
     36327+
     36328        ;;
     36329 pdcurses) #(vi
     36330        if test "$no_x" = yes; then
     36331@@ -5244,17 +5931,17 @@
     36332     case "`(uname -sr) 2>/dev/null`" in
     36333     "SunOS 5"*)
     36334       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
     36335-echo "configure:5248: checking whether -R must be followed by a space" >&5
     36336+echo "configure:5935: checking whether -R must be followed by a space" >&5
     36337       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
     36338       cat > conftest.$ac_ext <<EOF
     36339-#line 5251 "configure"
     36340+#line 5938 "configure"
     36341 #include "confdefs.h"
     36342 
     36343 int main() {
     36344 
     36345 ; return 0; }
     36346 EOF
     36347-if { (eval echo configure:5258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36348+if { (eval echo configure:5945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36349   rm -rf conftest*
     36350   ac_R_nospace=yes
     36351 else
     36352@@ -5270,14 +5957,14 @@
     36353       else
     36354        LIBS="$ac_xsave_LIBS -R $x_libraries"
     36355        cat > conftest.$ac_ext <<EOF
     36356-#line 5274 "configure"
     36357+#line 5961 "configure"
     36358 #include "confdefs.h"
     36359 
     36360 int main() {
     36361 
     36362 ; return 0; }
     36363 EOF
     36364-if { (eval echo configure:5281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36365+if { (eval echo configure:5968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36366   rm -rf conftest*
     36367   ac_R_space=yes
     36368 else
     36369@@ -5309,7 +5996,7 @@
     36370     # libraries were built with DECnet support.  And karl@cs.umb.edu says
     36371     # the Alpha needs dnet_stub (dnet does not exist).
     36372     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
     36373-echo "configure:5313: checking for dnet_ntoa in -ldnet" >&5
     36374+echo "configure:6000: checking for dnet_ntoa in -ldnet" >&5
     36375 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
     36376 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     36377   echo $ac_n "(cached) $ac_c" 1>&6
     36378@@ -5317,7 +6004,7 @@
     36379   ac_save_LIBS="$LIBS"
     36380 LIBS="-ldnet  $LIBS"
     36381 cat > conftest.$ac_ext <<EOF
     36382-#line 5321 "configure"
     36383+#line 6008 "configure"
     36384 #include "confdefs.h"
     36385 /* Override any gcc2 internal prototype to avoid an error.  */
     36386 /* We use char because int might match the return type of a gcc2
     36387@@ -5328,7 +6015,7 @@
     36388 dnet_ntoa()
     36389 ; return 0; }
     36390 EOF
     36391-if { (eval echo configure:5332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36392+if { (eval echo configure:6019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36393   rm -rf conftest*
     36394   eval "ac_cv_lib_$ac_lib_var=yes"
     36395 else
     36396@@ -5350,7 +6037,7 @@
     36397 
     36398     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
     36399       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
     36400-echo "configure:5354: checking for dnet_ntoa in -ldnet_stub" >&5
     36401+echo "configure:6041: checking for dnet_ntoa in -ldnet_stub" >&5
     36402 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
     36403 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     36404   echo $ac_n "(cached) $ac_c" 1>&6
     36405@@ -5358,7 +6045,7 @@
     36406   ac_save_LIBS="$LIBS"
     36407 LIBS="-ldnet_stub  $LIBS"
     36408 cat > conftest.$ac_ext <<EOF
     36409-#line 5362 "configure"
     36410+#line 6049 "configure"
     36411 #include "confdefs.h"
     36412 /* Override any gcc2 internal prototype to avoid an error.  */
     36413 /* We use char because int might match the return type of a gcc2
     36414@@ -5369,7 +6056,7 @@
     36415 dnet_ntoa()
     36416 ; return 0; }
     36417 EOF
     36418-if { (eval echo configure:5373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36419+if { (eval echo configure:6060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36420   rm -rf conftest*
     36421   eval "ac_cv_lib_$ac_lib_var=yes"
     36422 else
     36423@@ -5398,12 +6085,12 @@
     36424     # The nsl library prevents programs from opening the X display
     36425     # on Irix 5.2, according to dickey@clark.net.
     36426     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
     36427-echo "configure:5402: checking for gethostbyname" >&5
     36428+echo "configure:6089: checking for gethostbyname" >&5
     36429 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
     36430   echo $ac_n "(cached) $ac_c" 1>&6
     36431 else
     36432   cat > conftest.$ac_ext <<EOF
     36433-#line 5407 "configure"
     36434+#line 6094 "configure"
     36435 #include "confdefs.h"
     36436 /* System header to define __stub macros and hopefully few prototypes,
     36437     which can conflict with char gethostbyname(); below.  */
     36438@@ -5426,7 +6113,7 @@
     36439 
     36440 ; return 0; }
     36441 EOF
     36442-if { (eval echo configure:5430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36443+if { (eval echo configure:6117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36444   rm -rf conftest*
     36445   eval "ac_cv_func_gethostbyname=yes"
     36446 else
     36447@@ -5447,7 +6134,7 @@
     36448 
     36449     if test $ac_cv_func_gethostbyname = no; then
     36450       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
     36451-echo "configure:5451: checking for gethostbyname in -lnsl" >&5
     36452+echo "configure:6138: checking for gethostbyname in -lnsl" >&5
     36453 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
     36454 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     36455   echo $ac_n "(cached) $ac_c" 1>&6
     36456@@ -5455,7 +6142,7 @@
     36457   ac_save_LIBS="$LIBS"
     36458 LIBS="-lnsl  $LIBS"
     36459 cat > conftest.$ac_ext <<EOF
     36460-#line 5459 "configure"
     36461+#line 6146 "configure"
     36462 #include "confdefs.h"
     36463 /* Override any gcc2 internal prototype to avoid an error.  */
     36464 /* We use char because int might match the return type of a gcc2
     36465@@ -5466,7 +6153,7 @@
     36466 gethostbyname()
     36467 ; return 0; }
     36468 EOF
     36469-if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36470+if { (eval echo configure:6157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36471   rm -rf conftest*
     36472   eval "ac_cv_lib_$ac_lib_var=yes"
     36473 else
     36474@@ -5496,12 +6183,12 @@
     36475     # -lsocket must be given before -lnsl if both are needed.
     36476     # We assume that if connect needs -lnsl, so does gethostbyname.
     36477     echo $ac_n "checking for connect""... $ac_c" 1>&6
     36478-echo "configure:5500: checking for connect" >&5
     36479+echo "configure:6187: checking for connect" >&5
     36480 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
     36481   echo $ac_n "(cached) $ac_c" 1>&6
     36482 else
     36483   cat > conftest.$ac_ext <<EOF
     36484-#line 5505 "configure"
     36485+#line 6192 "configure"
     36486 #include "confdefs.h"
     36487 /* System header to define __stub macros and hopefully few prototypes,
     36488     which can conflict with char connect(); below.  */
     36489@@ -5524,7 +6211,7 @@
     36490 
     36491 ; return 0; }
     36492 EOF
     36493-if { (eval echo configure:5528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36494+if { (eval echo configure:6215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36495   rm -rf conftest*
     36496   eval "ac_cv_func_connect=yes"
     36497 else
     36498@@ -5545,7 +6232,7 @@
     36499 
     36500     if test $ac_cv_func_connect = no; then
     36501       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
     36502-echo "configure:5549: checking for connect in -lsocket" >&5
     36503+echo "configure:6236: checking for connect in -lsocket" >&5
     36504 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
     36505 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     36506   echo $ac_n "(cached) $ac_c" 1>&6
     36507@@ -5553,7 +6240,7 @@
     36508   ac_save_LIBS="$LIBS"
     36509 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
     36510 cat > conftest.$ac_ext <<EOF
     36511-#line 5557 "configure"
     36512+#line 6244 "configure"
     36513 #include "confdefs.h"
     36514 /* Override any gcc2 internal prototype to avoid an error.  */
     36515 /* We use char because int might match the return type of a gcc2
     36516@@ -5564,7 +6251,7 @@
     36517 connect()
     36518 ; return 0; }
     36519 EOF
     36520-if { (eval echo configure:5568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36521+if { (eval echo configure:6255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36522   rm -rf conftest*
     36523   eval "ac_cv_lib_$ac_lib_var=yes"
     36524 else
     36525@@ -5588,12 +6275,12 @@
     36526 
     36527     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
     36528     echo $ac_n "checking for remove""... $ac_c" 1>&6
     36529-echo "configure:5592: checking for remove" >&5
     36530+echo "configure:6279: checking for remove" >&5
     36531 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
     36532   echo $ac_n "(cached) $ac_c" 1>&6
     36533 else
     36534   cat > conftest.$ac_ext <<EOF
     36535-#line 5597 "configure"
     36536+#line 6284 "configure"
     36537 #include "confdefs.h"
     36538 /* System header to define __stub macros and hopefully few prototypes,
     36539     which can conflict with char remove(); below.  */
     36540@@ -5616,7 +6303,7 @@
     36541 
     36542 ; return 0; }
     36543 EOF
     36544-if { (eval echo configure:5620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36545+if { (eval echo configure:6307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36546   rm -rf conftest*
     36547   eval "ac_cv_func_remove=yes"
     36548 else
     36549@@ -5637,7 +6324,7 @@
     36550 
     36551     if test $ac_cv_func_remove = no; then
     36552       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
     36553-echo "configure:5641: checking for remove in -lposix" >&5
     36554+echo "configure:6328: checking for remove in -lposix" >&5
     36555 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
     36556 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     36557   echo $ac_n "(cached) $ac_c" 1>&6
     36558@@ -5645,7 +6332,7 @@
     36559   ac_save_LIBS="$LIBS"
     36560 LIBS="-lposix  $LIBS"
     36561 cat > conftest.$ac_ext <<EOF
     36562-#line 5649 "configure"
     36563+#line 6336 "configure"
     36564 #include "confdefs.h"
     36565 /* Override any gcc2 internal prototype to avoid an error.  */
     36566 /* We use char because int might match the return type of a gcc2
     36567@@ -5656,7 +6343,7 @@
     36568 remove()
     36569 ; return 0; }
     36570 EOF
     36571-if { (eval echo configure:5660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36572+if { (eval echo configure:6347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36573   rm -rf conftest*
     36574   eval "ac_cv_lib_$ac_lib_var=yes"
     36575 else
     36576@@ -5680,12 +6367,12 @@
     36577 
     36578     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     36579     echo $ac_n "checking for shmat""... $ac_c" 1>&6
     36580-echo "configure:5684: checking for shmat" >&5
     36581+echo "configure:6371: checking for shmat" >&5
     36582 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
     36583   echo $ac_n "(cached) $ac_c" 1>&6
     36584 else
     36585   cat > conftest.$ac_ext <<EOF
     36586-#line 5689 "configure"
     36587+#line 6376 "configure"
     36588 #include "confdefs.h"
     36589 /* System header to define __stub macros and hopefully few prototypes,
     36590     which can conflict with char shmat(); below.  */
     36591@@ -5708,7 +6395,7 @@
     36592 
     36593 ; return 0; }
     36594 EOF
     36595-if { (eval echo configure:5712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36596+if { (eval echo configure:6399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36597   rm -rf conftest*
     36598   eval "ac_cv_func_shmat=yes"
     36599 else
     36600@@ -5729,7 +6416,7 @@
     36601 
     36602     if test $ac_cv_func_shmat = no; then
     36603       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
     36604-echo "configure:5733: checking for shmat in -lipc" >&5
     36605+echo "configure:6420: checking for shmat in -lipc" >&5
     36606 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
     36607 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     36608   echo $ac_n "(cached) $ac_c" 1>&6
     36609@@ -5737,7 +6424,7 @@
     36610   ac_save_LIBS="$LIBS"
     36611 LIBS="-lipc  $LIBS"
     36612 cat > conftest.$ac_ext <<EOF
     36613-#line 5741 "configure"
     36614+#line 6428 "configure"
     36615 #include "confdefs.h"
     36616 /* Override any gcc2 internal prototype to avoid an error.  */
     36617 /* We use char because int might match the return type of a gcc2
     36618@@ -5748,7 +6435,7 @@
     36619 shmat()
     36620 ; return 0; }
     36621 EOF
     36622-if { (eval echo configure:5752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36623+if { (eval echo configure:6439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36624   rm -rf conftest*
     36625   eval "ac_cv_lib_$ac_lib_var=yes"
     36626 else
     36627@@ -5781,7 +6468,7 @@
     36628   # libraries we check for below, so use a different variable.
     36629   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
     36630   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
     36631-echo "configure:5785: checking for IceConnectionNumber in -lICE" >&5
     36632+echo "configure:6472: checking for IceConnectionNumber in -lICE" >&5
     36633 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
     36634 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     36635   echo $ac_n "(cached) $ac_c" 1>&6
     36636@@ -5789,7 +6476,7 @@
     36637   ac_save_LIBS="$LIBS"
     36638 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
     36639 cat > conftest.$ac_ext <<EOF
     36640-#line 5793 "configure"
     36641+#line 6480 "configure"
     36642 #include "confdefs.h"
     36643 /* Override any gcc2 internal prototype to avoid an error.  */
     36644 /* We use char because int might match the return type of a gcc2
     36645@@ -5800,7 +6487,7 @@
     36646 IceConnectionNumber()
     36647 ; return 0; }
     36648 EOF
     36649-if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36650+if { (eval echo configure:6491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36651   rm -rf conftest*
     36652   eval "ac_cv_lib_$ac_lib_var=yes"
     36653 else
     36654@@ -5836,7 +6523,7 @@
     36655 
     36656 test -n "$verbose" && echo "   checking additions to CFLAGS" 1>&6
     36657 
     36658-echo "${as_me-configure}:5840: testing checking additions to CFLAGS ..." 1>&5
     36659+echo "${as_me-configure}:6527: testing checking additions to CFLAGS ..." 1>&5
     36660 
     36661 
     36662 cf_check_cflags="$CFLAGS"
     36663@@ -5898,7 +6585,7 @@
     36664 if test -n "$cf_new_cflags" ; then
     36665        test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
     36666 
     36667-echo "${as_me-configure}:5902: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
     36668+echo "${as_me-configure}:6589: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
     36669 
     36670 
     36671        CFLAGS="$CFLAGS $cf_new_cflags"
     36672@@ -5907,16 +6594,16 @@
     36673 if test -n "$cf_new_cppflags" ; then
     36674        test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
     36675 
     36676-echo "${as_me-configure}:5911: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
     36677+echo "${as_me-configure}:6598: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
     36678 
     36679 
     36680-       CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
     36681+       CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
     36682 fi
     36683 
     36684 if test -n "$cf_new_extra_cppflags" ; then
     36685        test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
     36686 
     36687-echo "${as_me-configure}:5920: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
     36688+echo "${as_me-configure}:6607: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
     36689 
     36690 
     36691        EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
     36692@@ -5927,14 +6614,14 @@
     36693 
     36694 if test "$cf_check_cflags" != "$CFLAGS" ; then
     36695 cat > conftest.$ac_ext <<EOF
     36696-#line 5931 "configure"
     36697+#line 6618 "configure"
     36698 #include "confdefs.h"
     36699 #include <stdio.h>
     36700 int main() {
     36701 printf("Hello world");
     36702 ; return 0; }
     36703 EOF
     36704-if { (eval echo configure:5938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36705+if { (eval echo configure:6625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36706   :
     36707 else
     36708   echo "configure: failed program was:" >&5
     36709@@ -5942,13 +6629,13 @@
     36710   rm -rf conftest*
     36711   test -n "$verbose" && echo " test-compile failed.  Undoing change to \$CFLAGS" 1>&6
     36712 
     36713-echo "${as_me-configure}:5946: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
     36714+echo "${as_me-configure}:6633: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
     36715 
     36716 
     36717         if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
     36718                 test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
     36719 
     36720-echo "${as_me-configure}:5952: testing but keeping change to \$CPPFLAGS ..." 1>&5
     36721+echo "${as_me-configure}:6639: testing but keeping change to \$CPPFLAGS ..." 1>&5
     36722 
     36723 
     36724         fi
     36725@@ -5959,12 +6646,12 @@
     36726 
     36727 
     36728 echo $ac_n "checking for XOpenDisplay""... $ac_c" 1>&6
     36729-echo "configure:5963: checking for XOpenDisplay" >&5
     36730+echo "configure:6650: checking for XOpenDisplay" >&5
     36731 if eval "test \"`echo '$''{'ac_cv_func_XOpenDisplay'+set}'`\" = set"; then
     36732   echo $ac_n "(cached) $ac_c" 1>&6
     36733 else
     36734   cat > conftest.$ac_ext <<EOF
     36735-#line 5968 "configure"
     36736+#line 6655 "configure"
     36737 #include "confdefs.h"
     36738 /* System header to define __stub macros and hopefully few prototypes,
     36739     which can conflict with char XOpenDisplay(); below.  */
     36740@@ -5987,7 +6674,7 @@
     36741 
     36742 ; return 0; }
     36743 EOF
     36744-if { (eval echo configure:5991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36745+if { (eval echo configure:6678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36746   rm -rf conftest*
     36747   eval "ac_cv_func_XOpenDisplay=yes"
     36748 else
     36749@@ -6006,7 +6693,7 @@
     36750   echo "$ac_t""no" 1>&6
     36751 
     36752 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
     36753-echo "configure:6010: checking for XOpenDisplay in -lX11" >&5
     36754+echo "configure:6697: checking for XOpenDisplay in -lX11" >&5
     36755 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
     36756 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     36757   echo $ac_n "(cached) $ac_c" 1>&6
     36758@@ -6014,7 +6701,7 @@
     36759   ac_save_LIBS="$LIBS"
     36760 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
     36761 cat > conftest.$ac_ext <<EOF
     36762-#line 6018 "configure"
     36763+#line 6705 "configure"
     36764 #include "confdefs.h"
     36765 /* Override any gcc2 internal prototype to avoid an error.  */
     36766 /* We use char because int might match the return type of a gcc2
     36767@@ -6025,7 +6712,7 @@
     36768 XOpenDisplay()
     36769 ; return 0; }
     36770 EOF
     36771-if { (eval echo configure:6029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36772+if { (eval echo configure:6716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36773   rm -rf conftest*
     36774   eval "ac_cv_lib_$ac_lib_var=yes"
     36775 else
     36776@@ -6049,12 +6736,12 @@
     36777 
     36778 
     36779 echo $ac_n "checking for XtAppInitialize""... $ac_c" 1>&6
     36780-echo "configure:6053: checking for XtAppInitialize" >&5
     36781+echo "configure:6740: checking for XtAppInitialize" >&5
     36782 if eval "test \"`echo '$''{'ac_cv_func_XtAppInitialize'+set}'`\" = set"; then
     36783   echo $ac_n "(cached) $ac_c" 1>&6
     36784 else
     36785   cat > conftest.$ac_ext <<EOF
     36786-#line 6058 "configure"
     36787+#line 6745 "configure"
     36788 #include "confdefs.h"
     36789 /* System header to define __stub macros and hopefully few prototypes,
     36790     which can conflict with char XtAppInitialize(); below.  */
     36791@@ -6077,7 +6764,7 @@
     36792 
     36793 ; return 0; }
     36794 EOF
     36795-if { (eval echo configure:6081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36796+if { (eval echo configure:6768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36797   rm -rf conftest*
     36798   eval "ac_cv_func_XtAppInitialize=yes"
     36799 else
     36800@@ -6096,7 +6783,7 @@
     36801   echo "$ac_t""no" 1>&6
     36802 
     36803 echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6
     36804-echo "configure:6100: checking for XtAppInitialize in -lXt" >&5
     36805+echo "configure:6787: checking for XtAppInitialize in -lXt" >&5
     36806 ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'`
     36807 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     36808   echo $ac_n "(cached) $ac_c" 1>&6
     36809@@ -6104,7 +6791,7 @@
     36810   ac_save_LIBS="$LIBS"
     36811 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
     36812 cat > conftest.$ac_ext <<EOF
     36813-#line 6108 "configure"
     36814+#line 6795 "configure"
     36815 #include "confdefs.h"
     36816 /* Override any gcc2 internal prototype to avoid an error.  */
     36817 /* We use char because int might match the return type of a gcc2
     36818@@ -6115,7 +6802,7 @@
     36819 XtAppInitialize()
     36820 ; return 0; }
     36821 EOF
     36822-if { (eval echo configure:6119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36823+if { (eval echo configure:6806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36824   rm -rf conftest*
     36825   eval "ac_cv_lib_$ac_lib_var=yes"
     36826 else
     36827@@ -6153,7 +6840,7 @@
     36828 cf_x_athena=${cf_x_athena-Xaw}
     36829 
     36830 echo $ac_n "checking if you want to link with Xaw 3d library""... $ac_c" 1>&6
     36831-echo "configure:6157: checking if you want to link with Xaw 3d library" >&5
     36832+echo "configure:6844: checking if you want to link with Xaw 3d library" >&5
     36833 withval=
     36834 
     36835 # Check whether --with-Xaw3d or --without-Xaw3d was given.
     36836@@ -6170,7 +6857,7 @@
     36837 fi
     36838 
     36839 echo $ac_n "checking if you want to link with neXT Athena library""... $ac_c" 1>&6
     36840-echo "configure:6174: checking if you want to link with neXT Athena library" >&5
     36841+echo "configure:6861: checking if you want to link with neXT Athena library" >&5
     36842 withval=
     36843 
     36844 # Check whether --with-neXtaw or --without-neXtaw was given.
     36845@@ -6187,7 +6874,7 @@
     36846 fi
     36847 
     36848 echo $ac_n "checking if you want to link with Athena-Plus library""... $ac_c" 1>&6
     36849-echo "configure:6191: checking if you want to link with Athena-Plus library" >&5
     36850+echo "configure:6878: checking if you want to link with Athena-Plus library" >&5
     36851 withval=
     36852 
     36853 # Check whether --with-XawPlus or --without-XawPlus was given.
     36854@@ -6204,7 +6891,7 @@
     36855 fi
     36856 
     36857 echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
     36858-echo "configure:6208: checking for XextCreateExtension in -lXext" >&5
     36859+echo "configure:6895: checking for XextCreateExtension in -lXext" >&5
     36860 ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'`
     36861 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     36862   echo $ac_n "(cached) $ac_c" 1>&6
     36863@@ -6212,7 +6899,7 @@
     36864   ac_save_LIBS="$LIBS"
     36865 LIBS="-lXext  $LIBS"
     36866 cat > conftest.$ac_ext <<EOF
     36867-#line 6216 "configure"
     36868+#line 6903 "configure"
     36869 #include "confdefs.h"
     36870 /* Override any gcc2 internal prototype to avoid an error.  */
     36871 /* We use char because int might match the return type of a gcc2
     36872@@ -6223,7 +6910,7 @@
     36873 XextCreateExtension()
     36874 ; return 0; }
     36875 EOF
     36876-if { (eval echo configure:6227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36877+if { (eval echo configure:6914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36878   rm -rf conftest*
     36879   eval "ac_cv_lib_$ac_lib_var=yes"
     36880 else
     36881@@ -6260,15 +6947,15 @@
     36882                cf_save="$CPPFLAGS"
     36883                cf_test=X11/$cf_x_athena_root/SimpleMenu.h
     36884                if test $cf_path != default ; then
     36885-                       CPPFLAGS="-I$cf_path/include $cf_save"
     36886+                       CPPFLAGS="$cf_save -I$cf_path/include"
     36887                        echo $ac_n "checking for $cf_test in $cf_path""... $ac_c" 1>&6
     36888-echo "configure:6266: checking for $cf_test in $cf_path" >&5
     36889+echo "configure:6953: checking for $cf_test in $cf_path" >&5
     36890                else
     36891                        echo $ac_n "checking for $cf_test""... $ac_c" 1>&6
     36892-echo "configure:6269: checking for $cf_test" >&5
     36893+echo "configure:6956: checking for $cf_test" >&5
     36894                fi
     36895                cat > conftest.$ac_ext <<EOF
     36896-#line 6272 "configure"
     36897+#line 6959 "configure"
     36898 #include "confdefs.h"
     36899 
     36900 #include <X11/Intrinsic.h>
     36901@@ -6277,7 +6964,7 @@
     36902 
     36903 ; return 0; }
     36904 EOF
     36905-if { (eval echo configure:6281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     36906+if { (eval echo configure:6968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     36907   rm -rf conftest*
     36908   cf_result=yes
     36909 else
     36910@@ -6324,21 +7011,21 @@
     36911                        if test $cf_path != default ; then
     36912                                LIBS="-L$cf_path/lib $cf_lib $LIBS"
     36913                                echo $ac_n "checking for $cf_lib in $cf_path""... $ac_c" 1>&6
     36914-echo "configure:6328: checking for $cf_lib in $cf_path" >&5
     36915+echo "configure:7015: checking for $cf_lib in $cf_path" >&5
     36916                        else
     36917                                LIBS="$cf_lib $LIBS"
     36918                                echo $ac_n "checking for $cf_test in $cf_lib""... $ac_c" 1>&6
     36919-echo "configure:6332: checking for $cf_test in $cf_lib" >&5
     36920+echo "configure:7019: checking for $cf_test in $cf_lib" >&5
     36921                        fi
     36922                        cat > conftest.$ac_ext <<EOF
     36923-#line 6335 "configure"
     36924+#line 7022 "configure"
     36925 #include "confdefs.h"
     36926 
     36927 int main() {
     36928 $cf_test()
     36929 ; return 0; }
     36930 EOF
     36931-if { (eval echo configure:6342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36932+if { (eval echo configure:7029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     36933   rm -rf conftest*
     36934   cf_result=yes
     36935 else
     36936@@ -6379,7 +7066,7 @@
     36937 # Extract the first word of "$ac_prog", so it can be a program name with args.
     36938 set dummy $ac_prog; ac_word=$2
     36939 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     36940-echo "configure:6383: checking for $ac_word" >&5
     36941+echo "configure:7070: checking for $ac_word" >&5
     36942 if eval "test \"`echo '$''{'ac_cv_path_XCURSES_CONFIG'+set}'`\" = set"; then
     36943   echo $ac_n "(cached) $ac_c" 1>&6
     36944 else
     36945@@ -6418,7 +7105,7 @@
     36946 
     36947 if test "$XCURSES_CONFIG" != none ; then
     36948 
     36949-CPPFLAGS="`$XCURSES_CONFIG --cflags` $CPPFLAGS"
     36950+CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
     36951 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
     36952 
     36953 cf_cv_lib_XCurses=yes
     36954@@ -6429,7 +7116,7 @@
     36955 
     36956 test -n "$verbose" && echo "   checking additions to CFLAGS" 1>&6
     36957 
     36958-echo "${as_me-configure}:6433: testing checking additions to CFLAGS ..." 1>&5
     36959+echo "${as_me-configure}:7120: testing checking additions to CFLAGS ..." 1>&5
     36960 
     36961 
     36962 cf_check_cflags="$CFLAGS"
     36963@@ -6491,7 +7178,7 @@
     36964 if test -n "$cf_new_cflags" ; then
     36965        test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
     36966 
     36967-echo "${as_me-configure}:6495: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
     36968+echo "${as_me-configure}:7182: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
     36969 
     36970 
     36971        CFLAGS="$CFLAGS $cf_new_cflags"
     36972@@ -6500,16 +7187,16 @@
     36973 if test -n "$cf_new_cppflags" ; then
     36974        test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
     36975 
     36976-echo "${as_me-configure}:6504: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
     36977+echo "${as_me-configure}:7191: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
     36978 
     36979 
     36980-       CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
     36981+       CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
     36982 fi
     36983 
     36984 if test -n "$cf_new_extra_cppflags" ; then
     36985        test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
     36986 
     36987-echo "${as_me-configure}:6513: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
     36988+echo "${as_me-configure}:7200: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
     36989 
     36990 
     36991        EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
     36992@@ -6520,14 +7207,14 @@
     36993 
     36994 if test "$cf_check_cflags" != "$CFLAGS" ; then
     36995 cat > conftest.$ac_ext <<EOF
     36996-#line 6524 "configure"
     36997+#line 7211 "configure"
     36998 #include "confdefs.h"
     36999 #include <stdio.h>
     37000 int main() {
     37001 printf("Hello world");
     37002 ; return 0; }
     37003 EOF
     37004-if { (eval echo configure:6531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37005+if { (eval echo configure:7218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37006   :
     37007 else
     37008   echo "configure: failed program was:" >&5
     37009@@ -6535,13 +7222,13 @@
     37010   rm -rf conftest*
     37011   test -n "$verbose" && echo " test-compile failed.  Undoing change to \$CFLAGS" 1>&6
     37012 
     37013-echo "${as_me-configure}:6539: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
     37014+echo "${as_me-configure}:7226: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
     37015 
     37016 
     37017         if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
     37018                 test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
     37019 
     37020-echo "${as_me-configure}:6545: testing but keeping change to \$CPPFLAGS ..." 1>&5
     37021+echo "${as_me-configure}:7232: testing but keeping change to \$CPPFLAGS ..." 1>&5
     37022 
     37023 
     37024         fi
     37025@@ -6551,7 +7238,7 @@
     37026 fi
     37027 
     37028 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
     37029-echo "configure:6555: checking for XOpenDisplay in -lX11" >&5
     37030+echo "configure:7242: checking for XOpenDisplay in -lX11" >&5
     37031 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
     37032 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     37033   echo $ac_n "(cached) $ac_c" 1>&6
     37034@@ -6559,7 +7246,7 @@
     37035   ac_save_LIBS="$LIBS"
     37036 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
     37037 cat > conftest.$ac_ext <<EOF
     37038-#line 6563 "configure"
     37039+#line 7250 "configure"
     37040 #include "confdefs.h"
     37041 /* Override any gcc2 internal prototype to avoid an error.  */
     37042 /* We use char because int might match the return type of a gcc2
     37043@@ -6570,7 +7257,7 @@
     37044 XOpenDisplay()
     37045 ; return 0; }
     37046 EOF
     37047-if { (eval echo configure:6574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37048+if { (eval echo configure:7261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37049   rm -rf conftest*
     37050   eval "ac_cv_lib_$ac_lib_var=yes"
     37051 else
     37052@@ -6591,14 +7278,14 @@
     37053 fi
     37054 
     37055 echo $ac_n "checking for XCurses library""... $ac_c" 1>&6
     37056-echo "configure:6595: checking for XCurses library" >&5
     37057+echo "configure:7282: checking for XCurses library" >&5
     37058 if eval "test \"`echo '$''{'cf_cv_lib_XCurses'+set}'`\" = set"; then
     37059   echo $ac_n "(cached) $ac_c" 1>&6
     37060 else
     37061   
     37062 LIBS="-lXCurses $LIBS"
     37063 cat > conftest.$ac_ext <<EOF
     37064-#line 6602 "configure"
     37065+#line 7289 "configure"
     37066 #include "confdefs.h"
     37067 
     37068 #include <xcurses.h>
     37069@@ -6608,7 +7295,7 @@
     37070 XCursesExit();
     37071 ; return 0; }
     37072 EOF
     37073-if { (eval echo configure:6612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37074+if { (eval echo configure:7299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37075   rm -rf conftest*
     37076   cf_cv_lib_XCurses=yes
     37077 else
     37078@@ -6653,7 +7340,7 @@
     37079 *)
     37080        # look for curses-related libraries
     37081        echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
     37082-echo "configure:6657: checking for new_panel in -lpanel$cf_cv_libtype" >&5
     37083+echo "configure:7344: checking for new_panel in -lpanel$cf_cv_libtype" >&5
     37084 ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
     37085 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     37086   echo $ac_n "(cached) $ac_c" 1>&6
     37087@@ -6661,7 +7348,7 @@
     37088   ac_save_LIBS="$LIBS"
     37089 LIBS="-lpanel$cf_cv_libtype  $LIBS"
     37090 cat > conftest.$ac_ext <<EOF
     37091-#line 6665 "configure"
     37092+#line 7352 "configure"
     37093 #include "confdefs.h"
     37094 /* Override any gcc2 internal prototype to avoid an error.  */
     37095 /* We use char because int might match the return type of a gcc2
     37096@@ -6672,7 +7359,7 @@
     37097 new_panel()
     37098 ; return 0; }
     37099 EOF
     37100-if { (eval echo configure:6676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37101+if { (eval echo configure:7363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37102   rm -rf conftest*
     37103   eval "ac_cv_lib_$ac_lib_var=yes"
     37104 else
     37105@@ -6700,7 +7387,7 @@
     37106 fi
     37107 
     37108        echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
     37109-echo "configure:6704: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
     37110+echo "configure:7391: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
     37111 ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
     37112 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     37113   echo $ac_n "(cached) $ac_c" 1>&6
     37114@@ -6708,7 +7395,7 @@
     37115   ac_save_LIBS="$LIBS"
     37116 LIBS="-lmenu$cf_cv_libtype  $LIBS"
     37117 cat > conftest.$ac_ext <<EOF
     37118-#line 6712 "configure"
     37119+#line 7399 "configure"
     37120 #include "confdefs.h"
     37121 /* Override any gcc2 internal prototype to avoid an error.  */
     37122 /* We use char because int might match the return type of a gcc2
     37123@@ -6719,7 +7406,7 @@
     37124 menu_driver()
     37125 ; return 0; }
     37126 EOF
     37127-if { (eval echo configure:6723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37128+if { (eval echo configure:7410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37129   rm -rf conftest*
     37130   eval "ac_cv_lib_$ac_lib_var=yes"
     37131 else
     37132@@ -6747,7 +7434,7 @@
     37133 fi
     37134 
     37135        echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
     37136-echo "configure:6751: checking for form_driver in -lform$cf_cv_libtype" >&5
     37137+echo "configure:7438: checking for form_driver in -lform$cf_cv_libtype" >&5
     37138 ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
     37139 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     37140   echo $ac_n "(cached) $ac_c" 1>&6
     37141@@ -6755,7 +7442,7 @@
     37142   ac_save_LIBS="$LIBS"
     37143 LIBS="-lform$cf_cv_libtype  $LIBS"
     37144 cat > conftest.$ac_ext <<EOF
     37145-#line 6759 "configure"
     37146+#line 7446 "configure"
     37147 #include "confdefs.h"
     37148 /* Override any gcc2 internal prototype to avoid an error.  */
     37149 /* We use char because int might match the return type of a gcc2
     37150@@ -6766,7 +7453,7 @@
     37151 form_driver()
     37152 ; return 0; }
     37153 EOF
     37154-if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37155+if { (eval echo configure:7457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37156   rm -rf conftest*
     37157   eval "ac_cv_lib_$ac_lib_var=yes"
     37158 else
     37159@@ -6805,17 +7492,17 @@
     37160 do
     37161 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
     37162 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
     37163-echo "configure:6809: checking for $ac_hdr" >&5
     37164+echo "configure:7496: checking for $ac_hdr" >&5
     37165 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
     37166   echo $ac_n "(cached) $ac_c" 1>&6
     37167 else
     37168   cat > conftest.$ac_ext <<EOF
     37169-#line 6814 "configure"
     37170+#line 7501 "configure"
     37171 #include "confdefs.h"
     37172 #include <$ac_hdr>
     37173 EOF
     37174 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     37175-{ (eval echo configure:6819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     37176+{ (eval echo configure:7506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     37177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
     37178 if test -z "$ac_err"; then
     37179   rm -rf conftest*
     37180@@ -6845,12 +7532,12 @@
     37181 esac
     37182 
     37183 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
     37184-echo "configure:6849: checking return type of signal handlers" >&5
     37185+echo "configure:7536: checking return type of signal handlers" >&5
     37186 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
     37187   echo $ac_n "(cached) $ac_c" 1>&6
     37188 else
     37189   cat > conftest.$ac_ext <<EOF
     37190-#line 6854 "configure"
     37191+#line 7541 "configure"
     37192 #include "confdefs.h"
     37193 #include <sys/types.h>
     37194 #include <signal.h>
     37195@@ -6867,7 +7554,7 @@
     37196 int i;
     37197 ; return 0; }
     37198 EOF
     37199-if { (eval echo configure:6871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     37200+if { (eval echo configure:7558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     37201   rm -rf conftest*
     37202   ac_cv_type_signal=void
     37203 else
     37204@@ -6887,12 +7574,12 @@
     37205 
     37206 
     37207 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
     37208-echo "configure:6891: checking for ANSI C header files" >&5
     37209+echo "configure:7578: checking for ANSI C header files" >&5
     37210 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
     37211   echo $ac_n "(cached) $ac_c" 1>&6
     37212 else
     37213   cat > conftest.$ac_ext <<EOF
     37214-#line 6896 "configure"
     37215+#line 7583 "configure"
     37216 #include "confdefs.h"
     37217 #include <stdlib.h>
     37218 #include <stdarg.h>
     37219@@ -6900,7 +7587,7 @@
     37220 #include <float.h>
     37221 EOF
     37222 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     37223-{ (eval echo configure:6904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     37224+{ (eval echo configure:7591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     37225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
     37226 if test -z "$ac_err"; then
     37227   rm -rf conftest*
     37228@@ -6917,7 +7604,7 @@
     37229 if test $ac_cv_header_stdc = yes; then
     37230   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
     37231 cat > conftest.$ac_ext <<EOF
     37232-#line 6921 "configure"
     37233+#line 7608 "configure"
     37234 #include "confdefs.h"
     37235 #include <string.h>
     37236 EOF
     37237@@ -6935,7 +7622,7 @@
     37238 if test $ac_cv_header_stdc = yes; then
     37239   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
     37240 cat > conftest.$ac_ext <<EOF
     37241-#line 6939 "configure"
     37242+#line 7626 "configure"
     37243 #include "confdefs.h"
     37244 #include <stdlib.h>
     37245 EOF
     37246@@ -6956,7 +7643,7 @@
     37247   :
     37248 else
     37249   cat > conftest.$ac_ext <<EOF
     37250-#line 6960 "configure"
     37251+#line 7647 "configure"
     37252 #include "confdefs.h"
     37253 #include <ctype.h>
     37254 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
     37255@@ -6967,7 +7654,7 @@
     37256 exit (0); }
     37257 
     37258 EOF
     37259-if { (eval echo configure:6971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     37260+if { (eval echo configure:7658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     37261 then
     37262   :
     37263 else
     37264@@ -6991,12 +7678,12 @@
     37265 fi
     37266 
     37267 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
     37268-echo "configure:6995: checking whether time.h and sys/time.h may both be included" >&5
     37269+echo "configure:7682: checking whether time.h and sys/time.h may both be included" >&5
     37270 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
     37271   echo $ac_n "(cached) $ac_c" 1>&6
     37272 else
     37273   cat > conftest.$ac_ext <<EOF
     37274-#line 7000 "configure"
     37275+#line 7687 "configure"
     37276 #include "confdefs.h"
     37277 #include <sys/types.h>
     37278 #include <sys/time.h>
     37279@@ -7005,7 +7692,7 @@
     37280 struct tm *tp;
     37281 ; return 0; }
     37282 EOF
     37283-if { (eval echo configure:7009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     37284+if { (eval echo configure:7696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     37285   rm -rf conftest*
     37286   ac_cv_header_time=yes
     37287 else
     37288@@ -7038,17 +7725,17 @@
     37289 do
     37290 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
     37291 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
     37292-echo "configure:7042: checking for $ac_hdr" >&5
     37293+echo "configure:7729: checking for $ac_hdr" >&5
     37294 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
     37295   echo $ac_n "(cached) $ac_c" 1>&6
     37296 else
     37297   cat > conftest.$ac_ext <<EOF
     37298-#line 7047 "configure"
     37299+#line 7734 "configure"
     37300 #include "confdefs.h"
     37301 #include <$ac_hdr>
     37302 EOF
     37303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
     37304-{ (eval echo configure:7052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     37305+{ (eval echo configure:7739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     37306 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
     37307 if test -z "$ac_err"; then
     37308   rm -rf conftest*
     37309@@ -7089,12 +7776,12 @@
     37310 
     37311 do
     37312 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
     37313-echo "configure:7093: checking for $ac_func" >&5
     37314+echo "configure:7780: checking for $ac_func" >&5
     37315 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
     37316   echo $ac_n "(cached) $ac_c" 1>&6
     37317 else
     37318   cat > conftest.$ac_ext <<EOF
     37319-#line 7098 "configure"
     37320+#line 7785 "configure"
     37321 #include "confdefs.h"
     37322 /* System header to define __stub macros and hopefully few prototypes,
     37323     which can conflict with char $ac_func(); below.  */
     37324@@ -7117,7 +7804,7 @@
     37325 
     37326 ; return 0; }
     37327 EOF
     37328-if { (eval echo configure:7121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37329+if { (eval echo configure:7808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37330   rm -rf conftest*
     37331   eval "ac_cv_func_$ac_func=yes"
     37332 else
     37333@@ -7144,13 +7831,13 @@
     37334 
     37335 
     37336 echo $ac_n "checking if we must define _XOPEN_SOURCE_EXTENDED""... $ac_c" 1>&6
     37337-echo "configure:7148: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
     37338+echo "configure:7835: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
     37339 if eval "test \"`echo '$''{'cf_cv_need_xopen_extension'+set}'`\" = set"; then
     37340   echo $ac_n "(cached) $ac_c" 1>&6
     37341 else
     37342   
     37343 cat > conftest.$ac_ext <<EOF
     37344-#line 7154 "configure"
     37345+#line 7841 "configure"
     37346 #include "confdefs.h"
     37347 
     37348 #include <stdlib.h>
     37349@@ -7162,7 +7849,7 @@
     37350        getbegyx(stdscr, y1, x1)
     37351 ; return 0; }
     37352 EOF
     37353-if { (eval echo configure:7166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37354+if { (eval echo configure:7853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37355   rm -rf conftest*
     37356   cf_cv_need_xopen_extension=no
     37357 else
     37358@@ -7170,7 +7857,7 @@
     37359   cat conftest.$ac_ext >&5
     37360   rm -rf conftest*
     37361   cat > conftest.$ac_ext <<EOF
     37362-#line 7174 "configure"
     37363+#line 7861 "configure"
     37364 #include "confdefs.h"
     37365 
     37366 #define _XOPEN_SOURCE_EXTENDED
     37367@@ -7183,7 +7870,7 @@
     37368        getbegyx(stdscr, y1, x1)
     37369 ; return 0; }
     37370 EOF
     37371-if { (eval echo configure:7187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37372+if { (eval echo configure:7874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37373   rm -rf conftest*
     37374   cf_cv_need_xopen_extension=yes
     37375 else
     37376@@ -7202,7 +7889,7 @@
     37377 
     37378 
     37379 echo $ac_n "checking for term.h""... $ac_c" 1>&6
     37380-echo "configure:7206: checking for term.h" >&5
     37381+echo "configure:7893: checking for term.h" >&5
     37382 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
     37383   echo $ac_n "(cached) $ac_c" 1>&6
     37384 else
     37385@@ -7215,7 +7902,7 @@
     37386        term.h
     37387 do
     37388        cat > conftest.$ac_ext <<EOF
     37389-#line 7219 "configure"
     37390+#line 7906 "configure"
     37391 #include "confdefs.h"
     37392 
     37393 #include <${cf_cv_ncurses_header-curses.h}>
     37394@@ -7224,7 +7911,7 @@
     37395 WINDOW *x
     37396 ; return 0; }
     37397 EOF
     37398-if { (eval echo configure:7228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     37399+if { (eval echo configure:7915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     37400   rm -rf conftest*
     37401   cf_cv_term_header=$cf_header
     37402         break
     37403@@ -7301,9 +7988,9 @@
     37404 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
     37405 
     37406        echo $ac_n "checking for ${cf_func}""... $ac_c" 1>&6
     37407-echo "configure:7305: checking for ${cf_func}" >&5
     37408+echo "configure:7992: checking for ${cf_func}" >&5
     37409       
     37410-echo "${as_me-configure}:7307: testing ${cf_func} ..." 1>&5
     37411+echo "${as_me-configure}:7994: testing ${cf_func} ..." 1>&5
     37412 
     37413        if eval "test \"`echo '$''{'cf_cv_func_$cf_func'+set}'`\" = set"; then
     37414   echo $ac_n "(cached) $ac_c" 1>&6
     37415@@ -7312,7 +7999,7 @@
     37416                eval cf_result='$ac_cv_func_'$cf_func
     37417                if test ".$cf_result" != ".no"; then
     37418                        cat > conftest.$ac_ext <<EOF
     37419-#line 7316 "configure"
     37420+#line 8003 "configure"
     37421 #include "confdefs.h"
     37422 
     37423 #ifdef HAVE_XCURSES
     37424@@ -7341,7 +8028,7 @@
     37425                       
     37426 ; return 0; }
     37427 EOF
     37428-if { (eval echo configure:7345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37429+if { (eval echo configure:8032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37430   rm -rf conftest*
     37431   cf_result=yes
     37432 else
     37433@@ -7369,13 +8056,13 @@
     37434 
     37435 
     37436 echo $ac_n "checking for ncurses extended functions""... $ac_c" 1>&6
     37437-echo "configure:7373: checking for ncurses extended functions" >&5
     37438+echo "configure:8060: checking for ncurses extended functions" >&5
     37439 if eval "test \"`echo '$''{'cf_cv_ncurses_ext_funcs'+set}'`\" = set"; then
     37440   echo $ac_n "(cached) $ac_c" 1>&6
     37441 else
     37442   
     37443 cat > conftest.$ac_ext <<EOF
     37444-#line 7379 "configure"
     37445+#line 8066 "configure"
     37446 #include "confdefs.h"
     37447 
     37448 #include <${cf_cv_ncurses_header-curses.h}>
     37449@@ -7395,7 +8082,7 @@
     37450        (void) wresize (0, 0, 0);
     37451 ; return 0; }
     37452 EOF
     37453-if { (eval echo configure:7399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37454+if { (eval echo configure:8086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37455   rm -rf conftest*
     37456   cf_cv_ncurses_ext_funcs=yes
     37457 else
     37458@@ -7415,13 +8102,13 @@
     37459 
     37460 
     37461 echo $ac_n "checking for wide-character functions""... $ac_c" 1>&6
     37462-echo "configure:7419: checking for wide-character functions" >&5
     37463+echo "configure:8106: checking for wide-character functions" >&5
     37464 if eval "test \"`echo '$''{'cf_cv_widechar_funcs'+set}'`\" = set"; then
     37465   echo $ac_n "(cached) $ac_c" 1>&6
     37466 else
     37467   
     37468 cat > conftest.$ac_ext <<EOF
     37469-#line 7425 "configure"
     37470+#line 8112 "configure"
     37471 #include "confdefs.h"
     37472 
     37473 #include <${cf_cv_ncurses_header-curses.h}>
     37474@@ -7433,7 +8120,7 @@
     37475       
     37476 ; return 0; }
     37477 EOF
     37478-if { (eval echo configure:7437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37479+if { (eval echo configure:8124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37480   rm -rf conftest*
     37481   cf_cv_widechar_funcs=yes
     37482 else
     37483@@ -7461,13 +8148,13 @@
     37484 
     37485 
     37486 echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
     37487-echo "configure:7465: checking if sys/time.h works with sys/select.h" >&5
     37488+echo "configure:8152: checking if sys/time.h works with sys/select.h" >&5
     37489 if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
     37490   echo $ac_n "(cached) $ac_c" 1>&6
     37491 else
     37492   
     37493 cat > conftest.$ac_ext <<EOF
     37494-#line 7471 "configure"
     37495+#line 8158 "configure"
     37496 #include "confdefs.h"
     37497 
     37498 #include <sys/types.h>
     37499@@ -7482,7 +8169,7 @@
     37500 
     37501 ; return 0; }
     37502 EOF
     37503-if { (eval echo configure:7486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     37504+if { (eval echo configure:8173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     37505   rm -rf conftest*
     37506   cf_cv_sys_time_select=yes
     37507 else
     37508@@ -7503,7 +8190,7 @@
     37509 
     37510 
     37511 echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
     37512-echo "configure:7507: checking for function curses_version" >&5
     37513+echo "configure:8194: checking for function curses_version" >&5
     37514 if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
     37515   echo $ac_n "(cached) $ac_c" 1>&6
     37516 else
     37517@@ -7512,7 +8199,7 @@
     37518   cf_cv_func_curses_version=unknown
     37519 else
     37520   cat > conftest.$ac_ext <<EOF
     37521-#line 7516 "configure"
     37522+#line 8203 "configure"
     37523 #include "confdefs.h"
     37524 
     37525 #include <${cf_cv_ncurses_header-curses.h}>
     37526@@ -7524,7 +8211,7 @@
     37527 }
     37528 
     37529 EOF
     37530-if { (eval echo configure:7528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     37531+if { (eval echo configure:8215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     37532 then
     37533   cf_cv_func_curses_version=yes
     37534 
     37535@@ -7548,17 +8235,33 @@
     37536 
     37537 
     37538 
     37539+echo $ac_n "checking for ncurses wrap-prefix""... $ac_c" 1>&6
     37540+echo "configure:8240: checking for ncurses wrap-prefix" >&5
     37541+
     37542+# Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
     37543+if test "${with_ncurses_wrap_prefix+set}" = set; then
     37544+  withval="$with_ncurses_wrap_prefix"
     37545+  NCURSES_WRAP_PREFIX=$withval
     37546+else
     37547+  NCURSES_WRAP_PREFIX=_nc_
     37548+fi
     37549+
     37550+echo "$ac_t""$NCURSES_WRAP_PREFIX" 1>&6
     37551+
     37552+
     37553+
     37554+
     37555 echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
     37556-echo "configure:7553: checking for alternate character set array" >&5
     37557+echo "configure:8256: checking for alternate character set array" >&5
     37558 if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
     37559   echo $ac_n "(cached) $ac_c" 1>&6
     37560 else
     37561   
     37562 cf_cv_curses_acs_map=unknown
     37563-for name in acs_map _acs_map __acs_map _nc_acs_map
     37564+for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
     37565 do
     37566 cat > conftest.$ac_ext <<EOF
     37567-#line 7562 "configure"
     37568+#line 8265 "configure"
     37569 #include "confdefs.h"
     37570 
     37571 #include <${cf_cv_ncurses_header-curses.h}>
     37572@@ -7569,7 +8272,7 @@
     37573 
     37574 ; return 0; }
     37575 EOF
     37576-if { (eval echo configure:7573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37577+if { (eval echo configure:8276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37578   rm -rf conftest*
     37579   cf_cv_curses_acs_map=$name; break
     37580 else
     37581@@ -7590,7 +8293,7 @@
     37582 
     37583 
     37584 echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
     37585-echo "configure:7594: checking for wide alternate character set array" >&5
     37586+echo "configure:8297: checking for wide alternate character set array" >&5
     37587 if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
     37588   echo $ac_n "(cached) $ac_c" 1>&6
     37589 else
     37590@@ -7599,7 +8302,7 @@
     37591        for name in wacs_map _wacs_map __wacs_map _nc_wacs
     37592        do
     37593        cat > conftest.$ac_ext <<EOF
     37594-#line 7603 "configure"
     37595+#line 8306 "configure"
     37596 #include "confdefs.h"
     37597 
     37598 #ifndef _XOPEN_SOURCE_EXTENDED
     37599@@ -7610,7 +8313,7 @@
     37600 $name['k'] = *WACS_PLUS
     37601 ; return 0; }
     37602 EOF
     37603-if { (eval echo configure:7614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37604+if { (eval echo configure:8317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     37605   rm -rf conftest*
     37606   cf_cv_curses_wacs_map=$name
     37607         break
     37608@@ -7626,9 +8329,9 @@
     37609 
     37610 
     37611 echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
     37612-echo "configure:7630: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
     37613+echo "configure:8333: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
     37614 cat > conftest.$ac_ext <<EOF
     37615-#line 7632 "configure"
     37616+#line 8335 "configure"
     37617 #include "confdefs.h"
     37618 
     37619 #ifndef _XOPEN_SOURCE_EXTENDED
     37620@@ -7641,7 +8344,7 @@
     37621 
     37622 ; return 0; }
     37623 EOF
     37624-if { (eval echo configure:7645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     37625+if { (eval echo configure:8348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     37626   rm -rf conftest*
     37627   cf_result=yes
     37628 else
     37629@@ -7669,9 +8372,9 @@
     37630 
     37631 
     37632 echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
     37633-echo "configure:7673: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
     37634+echo "configure:8376: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
     37635 cat > conftest.$ac_ext <<EOF
     37636-#line 7675 "configure"
     37637+#line 8378 "configure"
     37638 #include "confdefs.h"
     37639 
     37640 #ifndef _XOPEN_SOURCE_EXTENDED
     37641@@ -7684,7 +8387,7 @@
     37642 
     37643 ; return 0; }
     37644 EOF
     37645-if { (eval echo configure:7688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     37646+if { (eval echo configure:8391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     37647   rm -rf conftest*
     37648   cf_result=yes
     37649 else
     37650@@ -7891,11 +8594,13 @@
     37651 s%@SHOW_CC@%$SHOW_CC%g
     37652 s%@ECHO_CC@%$ECHO_CC%g
     37653 s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
     37654+s%@NCURSES_CONFIG@%$NCURSES_CONFIG%g
     37655 s%@X_CFLAGS@%$X_CFLAGS%g
     37656 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
     37657 s%@X_LIBS@%$X_LIBS%g
     37658 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
     37659 s%@XCURSES_CONFIG@%$XCURSES_CONFIG%g
     37660+s%@NCURSES_WRAP_PREFIX@%$NCURSES_WRAP_PREFIX%g
     37661 
     37662 CEOF
     37663 EOF
     37664diff -Naur ncurses-5.7.orig/test/configure.in ncurses-5.7/test/configure.in
     37665--- ncurses-5.7.orig/test/configure.in  2008-09-06 15:10:23.000000000 -0700
     37666+++ ncurses-5.7/test/configure.in       2009-06-05 14:01:30.000000000 -0700
     37667@@ -28,7 +28,7 @@
     37668 dnl
     37669 dnl Author: Thomas E. Dickey 1996, etc.
     37670 dnl
     37671-dnl $Id: configure.in,v 1.67 2008/09/06 22:10:23 tom Exp $
     37672+dnl $Id: configure.in,v 1.68 2009/03/28 19:49:55 tom Exp $
     37673 dnl This is a simple configuration-script for the ncurses test programs that
     37674 dnl allows the test-directory to be separately configured against a reference
     37675 dnl system (i.e., sysvr4 curses)
     37676@@ -125,14 +125,12 @@
     37677        CF_CURSES_LIBS
     37678        ;;
     37679 ncurses)
     37680-       CF_NCURSES_CPPFLAGS
     37681-       CF_NCURSES_LIBS
     37682+       CF_NCURSES_CONFIG
     37683        ;;
     37684 ncursesw)
     37685        cf_cv_libtype=w
     37686        CF_UTF8_LIB
     37687-       CF_NCURSES_CPPFLAGS(ncursesw)
     37688-       CF_NCURSES_LIBS(ncursesw)
     37689+       CF_NCURSES_CONFIG(ncursesw)
     37690        ;;
     37691 pdcurses) #(vi
     37692        CF_PDCURSES_X11
    2215637693diff -Naur ncurses-5.7.orig/test/demo_forms.c ncurses-5.7/test/demo_forms.c
    2215737694--- ncurses-5.7.orig/test/demo_forms.c  2008-10-18 13:38:20.000000000 -0700
    22158 +++ ncurses-5.7/test/demo_forms.c       2009-03-22 21:16:52.251135633 -0700
     37695+++ ncurses-5.7/test/demo_forms.c       2009-06-05 14:01:55.000000000 -0700
     37696@@ -1,5 +1,5 @@
     37697 /****************************************************************************
     37698- * Copyright (c) 2003-2007,2008 Free Software Foundation, Inc.              *
     37699+ * Copyright (c) 2003-2008,2009 Free Software Foundation, Inc.              *
     37700  *                                                                          *
     37701  * Permission is hereby granted, free of charge, to any person obtaining a  *
     37702  * copy of this software and associated documentation files (the            *
    2215937703@@ -26,7 +26,7 @@
    2216037704  * authorization.                                                           *
     
    2216237706 /*
    2216337707- * $Id: demo_forms.c,v 1.30 2008/10/18 20:38:20 tom Exp $
    22164 + * $Id: demo_forms.c,v 1.31 2008/12/20 19:23:00 tom Exp $
     37708+ * $Id: demo_forms.c,v 1.32 2009/05/30 16:52:42 tom Exp $
    2216537709  *
    2216637710  * Demonstrate a variety of functions from the form library.
     
    2218937733            set_field_buffer(f, 0, t_value);
    2219037734     }
     37735@@ -444,8 +451,11 @@
     37736 
     37737        free_form(form);
     37738     }
     37739-    for (c = 0; f[c] != 0; c++)
     37740+    for (c = 0; f[c] != 0; c++) {
     37741+       void *ptr = field_userptr(f[c]);
     37742+       free(ptr);
     37743        free_field(f[c]);
     37744+    }
     37745     noraw();
     37746     nl();
     37747 
     37748diff -Naur ncurses-5.7.orig/test/ditto.c ncurses-5.7/test/ditto.c
     37749--- ncurses-5.7.orig/test/ditto.c       2008-08-04 06:21:41.000000000 -0700
     37750+++ ncurses-5.7/test/ditto.c    2009-06-05 14:01:49.000000000 -0700
     37751@@ -29,7 +29,7 @@
     37752 /*
     37753  * Author: Thomas E. Dickey (1998-on)
     37754  *
     37755- * $Id: ditto.c,v 1.32 2008/08/04 13:21:41 tom Exp $
     37756+ * $Id: ditto.c,v 1.33 2008/11/16 00:19:59 juergen Exp $
     37757  *
     37758  * The program illustrates how to set up multiple screens from a single
     37759  * program.
     37760@@ -137,8 +137,8 @@
     37761 {
     37762     int result = -1;
     37763     if (peek->sequence < fifo->sequence) {
     37764-       peek->sequence += 1;
     37765        result = fifo->data[THIS_FIFO(peek->sequence)];
     37766+       peek->sequence += 1;
     37767     }
     37768     return result;
     37769 }
     37770@@ -188,7 +188,11 @@
     37771 }
     37772 
     37773 static void
     37774-init_screen(SCREEN *sp GCC_UNUSED, void *arg)
     37775+init_screen(
     37776+#if HAVE_USE_WINDOW
     37777+              SCREEN *sp GCC_UNUSED,
     37778+#endif
     37779+              void *arg)
     37780 {
     37781     DITTO *target = (DITTO *) arg;
     37782     int high, wide;
     37783@@ -237,6 +241,7 @@
     37784     target->which1 = which1;
     37785     target->titles = source;
     37786     target->length = length;
     37787+    target->fifo.head = -1;
     37788     target->screen = newterm((char *) 0,       /* assume $TERM is the same */
     37789                             target->output,
     37790                             target->input);
     37791@@ -248,7 +253,11 @@
     37792 }
     37793 
     37794 static int
     37795-close_screen(SCREEN *sp GCC_UNUSED, void *arg GCC_UNUSED)
     37796+close_screen(
     37797+#if HAVE_USE_WINDOW
     37798+               SCREEN *sp GCC_UNUSED,
     37799+#endif
     37800+               void *arg GCC_UNUSED)
     37801 {
     37802     (void) sp;
     37803     (void) arg;
     37804@@ -259,7 +268,11 @@
     37805  * Read data from the 'source' screen.
     37806  */
     37807 static int
     37808-read_screen(SCREEN *sp GCC_UNUSED, void *arg)
     37809+read_screen(
     37810+#if HAVE_USE_WINDOW
     37811+              SCREEN *sp GCC_UNUSED,
     37812+#endif
     37813+              void *arg)
     37814 {
     37815     DDATA *data = (DDATA *) arg;
     37816     DITTO *ditto = &(data->ditto[data->source]);
     37817@@ -278,7 +291,11 @@
     37818  * Write all of the data that's in fifos for the 'target' screen.
     37819  */
     37820 static int
     37821-write_screen(SCREEN *sp GCC_UNUSED, void *arg GCC_UNUSED)
     37822+write_screen(
     37823+#if HAVE_USE_WINDOW
     37824+               SCREEN *sp GCC_UNUSED,
     37825+#endif
     37826+               void *arg GCC_UNUSED)
     37827 {
     37828     DDATA *data = (DDATA *) arg;
     37829     DITTO *ditto = &(data->ditto[data->target]);
     37830@@ -360,7 +377,7 @@
     37831 
     37832     if (argc <= 1)
     37833        usage();
     37834-
     37835+   
     37836     if ((data = typeCalloc(DITTO, (size_t) argc)) == 0)
     37837        failed("calloc data");
     37838 
    2219137839diff -Naur ncurses-5.7.orig/test/edit_field.c ncurses-5.7/test/edit_field.c
    2219237840--- ncurses-5.7.orig/test/edit_field.c  2008-10-18 13:40:20.000000000 -0700
    22193 +++ ncurses-5.7/test/edit_field.c       2009-03-22 21:16:52.251135633 -0700
     37841+++ ncurses-5.7/test/edit_field.c       2009-06-05 14:00:59.000000000 -0700
    2219437842@@ -26,7 +26,7 @@
    2219537843  * authorization.                                                           *
     
    2221437862diff -Naur ncurses-5.7.orig/test/edit_field.h ncurses-5.7/test/edit_field.h
    2221537863--- ncurses-5.7.orig/test/edit_field.h  2006-06-03 09:38:57.000000000 -0700
    22216 +++ ncurses-5.7/test/edit_field.h       2009-03-22 21:16:52.251135633 -0700
     37864+++ ncurses-5.7/test/edit_field.h       2009-06-05 14:00:59.000000000 -0700
    2221737865@@ -1,5 +1,5 @@
    2221837866 /****************************************************************************
     
    2224437892diff -Naur ncurses-5.7.orig/test/filter.c ncurses-5.7/test/filter.c
    2224537893--- ncurses-5.7.orig/test/filter.c      2006-12-09 08:53:47.000000000 -0800
    22246 +++ ncurses-5.7/test/filter.c   2009-03-22 21:16:49.034929738 -0700
     37894+++ ncurses-5.7/test/filter.c   2009-06-05 14:00:55.000000000 -0700
    2224737895@@ -1,5 +1,5 @@
    2224837896 /****************************************************************************
     
    2231637964diff -Naur ncurses-5.7.orig/test/insdelln.c ncurses-5.7/test/insdelln.c
    2231737965--- ncurses-5.7.orig/test/insdelln.c    1969-12-31 16:00:00.000000000 -0800
    22318 +++ ncurses-5.7/test/insdelln.c 2009-03-22 21:16:52.251135633 -0700
     37966+++ ncurses-5.7/test/insdelln.c 2009-06-05 14:00:59.000000000 -0700
    2231937967@@ -0,0 +1,380 @@
    2232037968+/****************************************************************************
     
    2270038348diff -Naur ncurses-5.7.orig/test/modules ncurses-5.7/test/modules
    2270138349--- ncurses-5.7.orig/test/modules       2007-08-18 10:57:08.000000000 -0700
    22702 +++ ncurses-5.7/test/modules    2009-03-22 21:16:52.251135633 -0700
     38350+++ ncurses-5.7/test/modules    2009-06-05 14:00:59.000000000 -0700
    2270338351@@ -1,4 +1,4 @@
    2270438352-# $Id: modules,v 1.36 2007/08/18 17:57:08 tom Exp $
     
    2272538373diff -Naur ncurses-5.7.orig/test/ncurses.c ncurses-5.7/test/ncurses.c
    2272638374--- ncurses-5.7.orig/test/ncurses.c     2008-09-27 07:34:58.000000000 -0700
    22727 +++ ncurses-5.7/test/ncurses.c  2009-03-22 21:17:02.199776504 -0700
     38375+++ ncurses-5.7/test/ncurses.c  2009-06-05 14:01:49.000000000 -0700
     38376@@ -1,5 +1,5 @@
     38377 /****************************************************************************
     38378- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc.              *
     38379+ * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
     38380  *                                                                          *
     38381  * Permission is hereby granted, free of charge, to any person obtaining a  *
     38382  * copy of this software and associated documentation files (the            *
    2272838383@@ -40,7 +40,7 @@
    2272938384    Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
     
    2273138386 
    2273238387-$Id: ncurses.c,v 1.329 2008/09/27 14:34:58 tom Exp $
    22733 +$Id: ncurses.c,v 1.336 2009/01/25 00:39:14 tom Exp $
     38388+$Id: ncurses.c,v 1.339 2009/04/04 22:46:11 juergen Exp $
    2273438389 
    2273538390 ***************************************************************************/
    2273638391 
    22737 @@ -569,8 +569,11 @@
     38392@@ -483,7 +483,11 @@
     38393        addstr("Shelling out...");
     38394     def_prog_mode();
     38395     endwin();
     38396+#ifdef __MINGW32__
     38397+    system("cmd.exe");
     38398+#else
     38399     system("sh");
     38400+#endif
     38401     if (message)
     38402        addstr("returned from shellout.\n");
     38403     refresh();
     38404@@ -569,8 +573,11 @@
    2273838405  *
    2273938406  ****************************************************************************/
     
    2274838415     keypad(win, flags['k']);   /* should be redundant, but for testing */
    2274938416     meta(win, flags['m']);     /* force this to a known state */
    22750 @@ -581,7 +584,17 @@
     38417@@ -581,7 +588,17 @@
    2275138418 }
    2275238419 
     
    2276738434     static const char *help[] =
    2276838435     {
    22769 @@ -731,13 +744,10 @@
     38436@@ -731,13 +748,10 @@
    2277038437     int first_y, first_x;
    2277138438     int c;
     
    2278338450     getyx(win, first_y, first_x);
    2278438451 
    22785 @@ -835,12 +845,18 @@
     38452@@ -835,12 +849,18 @@
    2278638453                }
    2278738454 #endif
     
    2280738474            } else {
    2280838475                if (isprint(c))
    22809 @@ -854,6 +870,9 @@
     38476@@ -854,6 +874,9 @@
    2281038477     }
    2281138478 
     
    2281738484 
    2281838485 static int
    22819 @@ -978,15 +997,12 @@
     38486@@ -905,6 +928,7 @@
     38487     wgetch_test(0, stdscr, delay);
     38488     forget_boxes();
     38489     finish_getch_test();
     38490+    slk_clear();
     38491 }
     38492 
     38493 #if USE_WIDEC_SUPPORT
     38494@@ -978,15 +1002,12 @@
    2282038495     int first_y, first_x;
    2282138496     wint_t c;
     
    2283538510     getyx(win, first_y, first_x);
    2283638511 
    22837 @@ -1096,14 +1112,14 @@
     38512@@ -1096,14 +1117,14 @@
    2283838513                    resize_wide_boxes(level, win);
    2283938514                }
     
    2285538530            }
    2285638531            wgetch_wrap(win, first_y);
    22857 @@ -1111,6 +1127,9 @@
     38532@@ -1111,6 +1132,9 @@
    2285838533     }
    2285938534 
     
    2286538540 
    2286638541 static void
    22867 @@ -1840,6 +1859,8 @@
     38542@@ -1122,6 +1146,7 @@
     38543     wget_wch_test(0, stdscr, delay);
     38544     forget_boxes();
     38545     finish_getch_test();
     38546+    slk_clear();
     38547 }
     38548 #endif
     38549 
     38550@@ -1840,6 +1865,8 @@
    2286838551            width = 4;
    2286938552        } else if (color >= 8) {
     
    2287438557            strcpy(temp, the_color_names[color]);
    2287538558        }
    22876 @@ -1874,6 +1895,8 @@
     38559@@ -1874,6 +1901,8 @@
    2287738560     mvwprintw(helpwin, row++, col,
    2287838561              "  n/N     toggle text/number on/off");
     
    2288338566 #if USE_WIDEC_SUPPORT
    2288438567     if (wide) {
    22885 @@ -1906,12 +1929,19 @@
     38568@@ -1906,12 +1935,19 @@
    2288638569     bool done = FALSE;
    2288738570     bool opt_acsc = FALSE;
     
    2290638589     while (!done) {
    2290738590        int shown = 0;
    22908 @@ -1926,12 +1956,14 @@
     38591@@ -1926,12 +1962,14 @@
    2290938592            hello = "Hello";
    2291038593            per_row = 8;
     
    2292338606        clrtobot();
    2292438607        (void) mvprintw(top + 1, 0,
    22925 @@ -1942,7 +1974,7 @@
     38608@@ -1942,7 +1980,7 @@
    2292638609 
    2292738610        /* show color names/numbers across the top */
     
    2293238615        /* show a grid of colors, with color names/ numbers on the left */
    2293338616        for (i = (short) (base_row * per_row); i < pairs_max; i++) {
    22934 @@ -1950,9 +1982,11 @@
     38617@@ -1950,9 +1988,11 @@
    2293538618            int col = (i % per_row + 1) * width;
    2293638619            short pair = i;
     
    2294638629                init_pair(pair, fg, bg);
    2294738630                attron((attr_t) COLOR_PAIR(pair));
    22948 @@ -1960,6 +1994,8 @@
     38631@@ -1960,6 +2000,8 @@
    2294938632                    attron((attr_t) A_ALTCHARSET);
    2295038633                if (opt_bold)
     
    2295538638                if (opt_nums) {
    2295638639                    sprintf(numbered, "{%02X}", i);
    22957 @@ -1968,8 +2004,8 @@
     38640@@ -1968,8 +2010,8 @@
    2295838641                printw("%-*.*s", width, width, hello);
    2295938642                attrset(A_NORMAL);
     
    2296638649                ++shown;
    2296738650            } else if (shown) {
    22968 @@ -1996,6 +2032,12 @@
     38651@@ -1996,6 +2038,12 @@
    2296938652        case 'N':
    2297038653            opt_nums = TRUE;
     
    2297938662            done = TRUE;
    2298038663            continue;
    22981 @@ -2073,7 +2115,7 @@
     38664@@ -2073,7 +2121,7 @@
    2298238665     int base_row = 0;
    2298338666     int grid_top = top + 3;
     
    2298838671     int per_row;
    2298938672     char numbered[80];
    22990 @@ -2081,12 +2123,22 @@
     38673@@ -2081,12 +2129,22 @@
    2299138674     bool done = FALSE;
    2299238675     bool opt_acsc = FALSE;
     
    2301138694        int shown = 0;
    2301238695 
    23013 @@ -2100,6 +2152,8 @@
     38696@@ -2100,6 +2158,8 @@
    2301438697            hello = "Hello";
    2301538698            per_row = 8;
     
    2302038703            make_fullwidth_text(buffer, hello);
    2302138704            width *= 2;
    23022 @@ -2111,8 +2165,9 @@
     38705@@ -2111,8 +2171,9 @@
    2302338706        row_limit = (pairs_max + per_row - 1) / per_row;
    2302438707 
     
    2303238715        clrtobot();
    2303338716        (void) mvprintw(top + 1, 0,
    23034 @@ -2123,7 +2178,7 @@
     38717@@ -2123,7 +2184,7 @@
    2303538718 
    2303638719        /* show color names/numbers across the top */
     
    2304138724        /* show a grid of colors, with color names/ numbers on the left */
    2304238725        for (i = (base_row * per_row); i < pairs_max; i++) {
    23043 @@ -2132,12 +2187,14 @@
     38726@@ -2132,12 +2193,14 @@
    2304438727            short pair = (short) i;
    2304538728 
     
    2305738740                if (opt_nums) {
    2305838741                    sprintf(numbered, "{%02X}", i);
    23059 @@ -2150,8 +2207,8 @@
     38742@@ -2150,8 +2213,8 @@
    2306038743                addnwstr(buffer, width);
    2306138744                attr_set(A_NORMAL, 0, NULL);
     
    2306838751                ++shown;
    2306938752            } else if (shown) {
    23070 @@ -2178,6 +2235,12 @@
     38753@@ -2178,6 +2241,12 @@
    2307138754        case 'N':
    2307238755            opt_nums = TRUE;
     
    2308138764            done = TRUE;
    2308238765            continue;
    23083 @@ -2802,6 +2865,7 @@
     38766@@ -2802,6 +2871,7 @@
    2308438767 } attrs_to_cycle[] = {
    2308538768     { A_NORMAL,                "normal" },
     
    2308938772     { A_UNDERLINE,     "underline" },
    2309038773 };
    23091 @@ -2902,7 +2966,7 @@
     38774@@ -2902,7 +2972,7 @@
    2309238775        do {
    2309338776            if (C1)
     
    2309838781                /* (yes, this _is_ crude) */
    2309938782                while ((reply = Getchar()) != ERR) {
    23100 @@ -2951,7 +3015,7 @@
     38783@@ -2951,7 +3021,7 @@
    2310138784                 */
    2310238785                break;
     
    2310738790            }
    2310838791        } while (--count > 0);
    23109 @@ -2969,15 +3033,23 @@
     38792@@ -2969,15 +3039,23 @@
    2311038793     mvaddstr(0, 20, "Display of the ACS Line-Drawing Set");
    2311138794     attroff(A_BOLD);
     
    2313938822 
    2314038823 }
    23141 @@ -3002,7 +3074,7 @@
     38824@@ -3002,7 +3080,7 @@
    2314238825 {
    2314338826     int n;
     
    2314838831     erase();
    2314938832     attron(A_BOLD);
    23150 @@ -3238,7 +3310,7 @@
     38833@@ -3212,7 +3290,7 @@
     38834             * the display.
     38835             */
     38836            if (wcwidth(code) == 0)
     38837-               addch(space | A_REVERSE);
     38838+               addch(space | (A_REVERSE ^ attr) | COLOR_PAIR(pair));
     38839            /*
     38840             * This could use add_wch(), but is done for comparison with the
     38841             * normal 'f' test (and to make a test-case for echo_wchar()).
     38842@@ -3238,7 +3316,7 @@
    2315138843     int col = (n / height) * COLS / 2;
    2315238844 
     
    2315738849     }
    2315838850     return n + 1;
    23159 @@ -3307,12 +3379,12 @@
     38851@@ -3307,12 +3385,12 @@
    2316038852 
    2316138853 #undef MERGE_ATTR
     
    2317238864     (void) repeat;
    2317338865     erase();
    23174 @@ -3321,17 +3393,23 @@
     38866@@ -3321,17 +3399,23 @@
    2317538867     attroff(A_BOLD);
    2317638868     refresh();
     
    2320638898 
    2320738899 }
    23208 @@ -5804,7 +5882,7 @@
     38900@@ -5804,7 +5888,7 @@
    2320938901        break;
    2321038902     case 2:
     
    2321738909diff -Naur ncurses-5.7.orig/test/programs ncurses-5.7/test/programs
    2321838910--- ncurses-5.7.orig/test/programs      2008-08-16 14:47:39.000000000 -0700
    23219 +++ ncurses-5.7/test/programs   2009-03-22 21:16:52.255135912 -0700
     38911+++ ncurses-5.7/test/programs   2009-06-05 14:00:59.000000000 -0700
    2322038912@@ -1,4 +1,4 @@
    2322138913-# $Id: programs,v 1.14 2008/08/16 21:47:39 tom Exp $
     
    2324238934diff -Naur ncurses-5.7.orig/test/railroad.c ncurses-5.7/test/railroad.c
    2324338935--- ncurses-5.7.orig/test/railroad.c    2008-02-09 10:08:43.000000000 -0800
    23244 +++ ncurses-5.7/test/railroad.c 2009-03-22 21:17:08.400170414 -0700
     38936+++ ncurses-5.7/test/railroad.c 2009-06-05 14:01:18.000000000 -0700
    2324538937@@ -29,7 +29,7 @@
    2324638938 /*
     
    2328938981diff -Naur ncurses-5.7.orig/test/README ncurses-5.7/test/README
    2329038982--- ncurses-5.7.orig/test/README        2008-10-18 14:02:45.000000000 -0700
    23291 +++ ncurses-5.7/test/README     2009-03-22 21:16:52.251135633 -0700
     38983+++ ncurses-5.7/test/README     2009-06-05 14:00:59.000000000 -0700
    2329238984@@ -25,7 +25,7 @@
    2329338985 -- sale, use or other dealings in this Software without prior written        --
     
    2358539277diff -Naur ncurses-5.7.orig/test/test.priv.h ncurses-5.7/test/test.priv.h
    2358639278--- ncurses-5.7.orig/test/test.priv.h   2008-10-04 14:53:41.000000000 -0700
    23587 +++ ncurses-5.7/test/test.priv.h        2009-03-22 21:16:52.255135912 -0700
     39279+++ ncurses-5.7/test/test.priv.h        2009-06-05 14:01:49.000000000 -0700
    2358839280@@ -29,7 +29,7 @@
    2358939281 /****************************************************************************
     
    2359139283  ****************************************************************************/
    2359239284-/* $Id: test.priv.h,v 1.79 2008/10/04 21:53:41 tom Exp $ */
    23593 +/* $Id: test.priv.h,v 1.80 2008/12/20 16:37:20 tom Exp $ */
     39285+/* $Id: test.priv.h,v 1.81 2008/12/28 20:20:39 juergen Exp $ */
    2359439286 
    2359539287 #ifndef __TEST_PRIV_H
     
    2360539297  * Workaround for HPUX
    2360639298  */
     39299@@ -464,6 +467,14 @@
     39300 #define EXIT_FAILURE 1
     39301 #endif
     39302 
     39303+#ifdef __MINGW32__
     39304+#include <nc_mingw.h>
     39305+/* conflicts in test/firstlast.c */
     39306+#undef large
     39307+#undef small
     39308+
     39309+#endif
     39310+
     39311 /* Use this to quiet gcc's -Wwrite-strings warnings, but accommodate SVr4
     39312  * curses which doesn't have const parameters declared (so far) in the places
     39313  * that XSI shows.
     39314@@ -560,7 +571,7 @@
     39315 #define USING_SCREEN(s,func,data) use_screen(s, (NCURSES_SCREEN_CB) func, data)
     39316 #define WANT_USE_SCREEN() extern void _nc_want_use_screen(void)
     39317 #else
     39318-#define USING_SCREEN(s,func,data) func(s,data)
     39319+#define USING_SCREEN(s,func,data) func(data)
     39320 #define WANT_USE_SCREEN() extern void _nc_want_use_screen(void)
     39321 #endif
     39322 
     39323diff -Naur ncurses-5.7.orig/test/view.c ncurses-5.7/test/view.c
     39324--- ncurses-5.7.orig/test/view.c        2008-09-06 15:10:50.000000000 -0700
     39325+++ ncurses-5.7/test/view.c     2009-06-05 14:01:49.000000000 -0700
     39326@@ -50,7 +50,7 @@
     39327  * scroll operation worked, and the refresh() code only had to do a
     39328  * partial repaint.
     39329  *
     39330- * $Id: view.c,v 1.69 2008/09/06 22:10:50 tom Exp $
     39331+ * $Id: view.c,v 1.70 2008/11/16 00:19:59 juergen Exp $
     39332  */
     39333 
     39334 #include <test.priv.h>
     39335@@ -62,8 +62,10 @@
     39336 #if HAVE_TERMIOS_H
     39337 # include <termios.h>
     39338 #else
     39339+#if !defined(__MINGW32__)
     39340 # include <sgtty.h>
     39341 #endif
     39342+#endif
     39343 
     39344 #if !defined(sun) || !HAVE_TERMIOS_H
     39345 # if HAVE_SYS_IOCTL_H
     39346diff -Naur ncurses-5.7.orig/test/worm.c ncurses-5.7/test/worm.c
     39347--- ncurses-5.7.orig/test/worm.c        2008-10-04 14:54:09.000000000 -0700
     39348+++ ncurses-5.7/test/worm.c     2009-06-05 14:01:49.000000000 -0700
     39349@@ -61,7 +61,7 @@
     39350   traces will be dumped.  The program stops and waits for one character of
     39351   input at the beginning and end of the interval.
     39352 
     39353-  $Id: worm.c,v 1.58 2008/10/04 21:54:09 tom Exp $
     39354+  $Id: worm.c,v 1.59 2008/11/16 00:19:59 juergen Exp $
     39355 */
     39356 
     39357 #include <test.priv.h>
     39358@@ -330,7 +330,11 @@
     39359     while (!quit_worm(((struct worm *) arg) - worm)) {
     39360        while (compare < sequence) {
     39361            ++compare;
     39362+#if HAVE_USE_WINDOW
     39363            use_window(stdscr, draw_worm, arg);
     39364+#else
     39365+           draw_worm(stdscr, arg);
     39366+#endif
     39367        }
     39368     }
     39369     Trace(("...start_worm (done)"));
     39370@@ -356,7 +360,13 @@
     39371     }
     39372 #else
     39373     for (n = 0, w = &worm[0]; n < number; n++, w++) {
     39374-       if (USING_WINDOW2(stdscr, draw_worm, w))
     39375+       if (
     39376+#if HAVE_USE_WINDOW
     39377+              USING_WINDOW2(stdscr, draw_worm, w)
     39378+#else
     39379+              draw_worm(stdscr, w)
     39380+#endif
     39381+           )
     39382            done = TRUE;
     39383     }
     39384 #endif
    2360739385diff -Naur ncurses-5.7.orig/TO-DO ncurses-5.7/TO-DO
    2360839386--- ncurses-5.7.orig/TO-DO      2008-10-11 12:22:27.000000000 -0700
    23609 +++ ncurses-5.7/TO-DO   2009-03-22 21:16:47.770848442 -0700
     39387+++ ncurses-5.7/TO-DO   2009-06-05 14:00:53.000000000 -0700
    2361039388@@ -25,7 +25,7 @@
    2361139389 -- sale, use or other dealings in this Software without prior written        --
Note: See TracChangeset for help on using the changeset viewer.