From: Thomas E. Dickey Date: Sun, 22 Apr 2007 00:57:08 +0000 (+0000) Subject: ncurses 5.6 - patch 20070421 X-Git-Tag: v5.7~71 X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff_plain;h=7a27c7d49c2e8b4a1ecbe85b4423d647cbc75ea5;hp=efd59f16f336b4c4c698ff783e1723f3161026ef ncurses 5.6 - patch 20070421 --- diff --git a/NEWS b/NEWS index 6b5cfabc..a2177f8b 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.1116 2007/04/14 20:25:08 tom Exp $ +-- $Id: NEWS,v 1.1118 2007/04/21 23:57:53 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,15 @@ See the AUTHORS file for the corresponding full names. Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20060421 + + move most static variables into structures _nc_globals and + _nc_prescreen, to simplify storage. + + add/use configure script macro CF_SIG_ATOMIC_T, use the corresponding + type for data manipulated by signal handlers (prompted by comments + in mailing.openbsd.bugs newsgroup). + + modify CF_WITH_LIBTOOL to allow one to pass options such as -static + to the libtool create- and link-operations. + 20060414 + fix whitespace in curs_opaque.3x which caused a spurious ';' in the installed aliases (report by Peter Santoro). diff --git a/aclocal.m4 b/aclocal.m4 index 309351f8..cbb29c50 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -28,7 +28,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.428 2007/03/31 15:53:01 tom Exp $ +dnl $Id: aclocal.m4,v 1.429 2007/04/19 20:04:46 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -3992,6 +3992,41 @@ done fi ])dnl dnl --------------------------------------------------------------------------- +dnl CF_SIG_ATOMIC_T version: 2 updated: 2005/09/18 17:27:12 +dnl --------------- +dnl signal handler, but there are some gcc depedencies in that recommendation. +dnl Try anyway. +AC_DEFUN([CF_SIG_ATOMIC_T], +[ +AC_MSG_CHECKING(for signal global datatype) +AC_CACHE_VAL(cf_cv_sig_atomic_t,[ + for cf_type in \ + "volatile sig_atomic_t" \ + "sig_atomic_t" \ + "int" + do + AC_TRY_COMPILE([ +#include +#include +#include + +extern $cf_type x; +$cf_type x; +static void handler(int sig) +{ + x = 5; +}], + [signal(SIGINT, handler); + x = 1], + [cf_cv_sig_atomic_t=$cf_type], + [cf_cv_sig_atomic_t=no]) + test "$cf_cv_sig_atomic_t" != no && break + done + ]) +AC_MSG_RESULT($cf_cv_sig_atomic_t) +test "$cf_cv_sig_atomic_t" != no && AC_DEFINE_UNQUOTED(SIG_ATOMIC_T, $cf_cv_sig_atomic_t) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_SIZECHANGE version: 8 updated: 2000/11/04 12:22:16 dnl ------------- dnl Check for definitions & structures needed for window size-changing @@ -4592,7 +4627,7 @@ if test "$with_gpm" != no ; then fi ]) dnl --------------------------------------------------------------------------- -dnl CF_WITH_LIBTOOL version: 16 updated: 2007/03/25 18:05:48 +dnl CF_WITH_LIBTOOL version: 18 updated: 2007/04/08 20:02:38 dnl --------------- dnl Provide a configure option to incorporate libtool. Define several useful dnl symbols for the makefile rules. @@ -4641,7 +4676,7 @@ LIB_PREP="$RANLIB" # doing: LIB_CLEAN= LIB_COMPILE= -LIB_LINK= +LIB_LINK='${CC}' LIB_INSTALL= LIB_UNINSTALL= @@ -4667,12 +4702,12 @@ ifdef([AC_PROG_LIBTOOL],[ AC_MSG_ERROR(Cannot find libtool) fi ])dnl - LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` -o' + LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o' LIB_OBJECT='${OBJECTS:.o=.lo}' LIB_SUFFIX=.la LIB_CLEAN='${LIBTOOL} --mode=clean' LIB_COMPILE='${LIBTOOL} --mode=compile' - LIB_LINK='${LIBTOOL} --mode=link' + LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}' LIB_INSTALL='${LIBTOOL} --mode=install' LIB_UNINSTALL='${LIBTOOL} --mode=uninstall' LIB_PREP=: @@ -4707,6 +4742,7 @@ test -z "$LIBTOOL" && ECHO_LT= AC_SUBST(LIBTOOL) AC_SUBST(LIBTOOL_CXX) +AC_SUBST(LIBTOOL_OPTS) AC_SUBST(LIB_CREATE) AC_SUBST(LIB_OBJECT) diff --git a/c++/Makefile.in b/c++/Makefile.in index 0e058371..a085538b 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.81 2007/03/31 15:46:42 tom Exp $ +# $Id: Makefile.in,v 1.82 2007/04/19 20:13:32 tom Exp $ ############################################################################## # Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # # # @@ -75,6 +75,7 @@ CXXLIBS = @CXXLIBS@ INCDIR = ../include CPPFLAGS = -I../c++ -I$(INCDIR) -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@ +CC = ${CXX} CCFLAGS = $(CPPFLAGS) $(CXXFLAGS) CFLAGS_LIBTOOL = $(CCFLAGS) @@ -92,7 +93,7 @@ ABI_VERSION = @cf_cv_abi_version@ LOCAL_LIBDIR = @top_builddir@/lib -LINK = @LINK_PROGS@ $(LIBTOOL_LINK) $(CXX) @CXXLDFLAGS@ +LINK = @LINK_PROGS@ $(LIBTOOL_LINK) @CXXLDFLAGS@ SHLIB_DIRS = -L../lib SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ # @SHLIB_LIST@ diff --git a/configure b/configure index 964656dd..ec18b511 100755 --- a/configure +++ b/configure @@ -4026,7 +4026,7 @@ LIB_PREP="$RANLIB" # doing: LIB_CLEAN= LIB_COMPILE= -LIB_LINK= +LIB_LINK='${CC}' LIB_INSTALL= LIB_UNINSTALL= @@ -4122,12 +4122,12 @@ fi echo "$as_me: error: Cannot find libtool" >&2;} { (exit 1); exit 1; }; } fi - LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` -o' + LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o' LIB_OBJECT='${OBJECTS:.o=.lo}' LIB_SUFFIX=.la LIB_CLEAN='${LIBTOOL} --mode=clean' LIB_COMPILE='${LIBTOOL} --mode=compile' - LIB_LINK='${LIBTOOL} --mode=link' + LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}' LIB_INSTALL='${LIBTOOL} --mode=install' LIB_UNINSTALL='${LIBTOOL} --mode=uninstall' LIB_PREP=: @@ -11431,6 +11431,70 @@ EOF ;; esac +echo "$as_me:11434: checking for signal global datatype" >&5 +echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6 +if test "${cf_cv_sig_atomic_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + for cf_type in \ + "volatile sig_atomic_t" \ + "sig_atomic_t" \ + "int" + do + cat >conftest.$ac_ext <<_ACEOF +#line 11446 "configure" +#include "confdefs.h" + +#include +#include +#include + +extern $cf_type x; +$cf_type x; +static void handler(int sig) +{ + x = 5; +} +int +main () +{ +signal(SIGINT, handler); + x = 1 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:11469: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:11472: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:11475: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:11478: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cf_cv_sig_atomic_t=$cf_type +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +cf_cv_sig_atomic_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + test "$cf_cv_sig_atomic_t" != no && break + done + +fi + +echo "$as_me:11492: result: $cf_cv_sig_atomic_t" >&5 +echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6 +test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <>confdefs.h <<\EOF @@ -11442,7 +11506,7 @@ fi if test $NCURSES_CHTYPE = auto ; then -echo "$as_me:11445: checking for type of chtype" >&5 +echo "$as_me:11509: checking for type of chtype" >&5 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6 if test "${cf_cv_typeof_chtype+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -11452,7 +11516,7 @@ else cf_cv_typeof_chtype=long else cat >conftest.$ac_ext <<_ACEOF -#line 11455 "configure" +#line 11519 "configure" #include "confdefs.h" #define WANT_BITS 31 @@ -11487,15 +11551,15 @@ int main() _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:11490: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11554: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11493: \$? = $ac_status" >&5 + echo "$as_me:11557: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:11495: \"$ac_try\"") >&5 + { (eval echo "$as_me:11559: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11498: \$? = $ac_status" >&5 + echo "$as_me:11562: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_typeof_chtype=`cat cf_test.out` else @@ -11510,7 +11574,7 @@ fi fi -echo "$as_me:11513: result: $cf_cv_typeof_chtype" >&5 +echo "$as_me:11577: result: $cf_cv_typeof_chtype" >&5 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6 cat >>confdefs.h <&5 +echo "$as_me:11589: checking if unsigned literals are legal" >&5 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6 if test "${cf_cv_unsigned_literals+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 11532 "configure" +#line 11596 "configure" #include "confdefs.h" int @@ -11541,16 +11605,16 @@ long x = 1L + 1UL + 1U + 1 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:11544: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11608: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11547: \$? = $ac_status" >&5 + echo "$as_me:11611: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:11550: \"$ac_try\"") >&5 + { (eval echo "$as_me:11614: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11553: \$? = $ac_status" >&5 + echo "$as_me:11617: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_unsigned_literals=yes else @@ -11562,7 +11626,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:11565: result: $cf_cv_unsigned_literals" >&5 +echo "$as_me:11629: result: $cf_cv_unsigned_literals" >&5 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6 cf_cv_1UL="1" @@ -11578,14 +11642,14 @@ test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t="" ### Checks for external-data -echo "$as_me:11581: checking if external errno is declared" >&5 +echo "$as_me:11645: checking if external errno is declared" >&5 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6 if test "${cf_cv_dcl_errno+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 11588 "configure" +#line 11652 "configure" #include "confdefs.h" #ifdef HAVE_STDLIB_H @@ -11603,16 +11667,16 @@ long x = (long) errno } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:11606: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:11670: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11609: \$? = $ac_status" >&5 + echo "$as_me:11673: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:11612: \"$ac_try\"") >&5 + { (eval echo "$as_me:11676: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11615: \$? = $ac_status" >&5 + echo "$as_me:11679: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_dcl_errno=yes else @@ -11623,7 +11687,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:11626: result: $cf_cv_dcl_errno" >&5 +echo "$as_me:11690: result: $cf_cv_dcl_errno" >&5 echo "${ECHO_T}$cf_cv_dcl_errno" >&6 if test "$cf_cv_dcl_errno" = no ; then @@ -11638,14 +11702,14 @@ fi # It's possible (for near-UNIX clones) that the data doesn't exist -echo "$as_me:11641: checking if external errno exists" >&5 +echo "$as_me:11705: checking if external errno exists" >&5 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6 if test "${cf_cv_have_errno+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 11648 "configure" +#line 11712 "configure" #include "confdefs.h" #undef errno @@ -11660,16 +11724,16 @@ errno = 2 } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:11663: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11727: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11666: \$? = $ac_status" >&5 + echo "$as_me:11730: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:11669: \"$ac_try\"") >&5 + { (eval echo "$as_me:11733: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11672: \$? = $ac_status" >&5 + echo "$as_me:11736: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_have_errno=yes else @@ -11680,7 +11744,7 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:11683: result: $cf_cv_have_errno" >&5 +echo "$as_me:11747: result: $cf_cv_have_errno" >&5 echo "${ECHO_T}$cf_cv_have_errno" >&6 if test "$cf_cv_have_errno" = yes ; then @@ -11693,7 +11757,7 @@ EOF fi -echo "$as_me:11696: checking if data-only library module links" >&5 +echo "$as_me:11760: checking if data-only library module links" >&5 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6 if test "${cf_cv_link_dataonly+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -11701,20 +11765,20 @@ else rm -f conftest.a cat >conftest.$ac_ext <&5 + if { (eval echo "$as_me:11771: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11710: \$? = $ac_status" >&5 + echo "$as_me:11774: \$? = $ac_status" >&5 (exit $ac_status); } ; then mv conftest.o data.o && \ ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null fi rm -f conftest.$ac_ext data.o cat >conftest.$ac_ext <&5 + if { (eval echo "$as_me:11794: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:11733: \$? = $ac_status" >&5 + echo "$as_me:11797: \$? = $ac_status" >&5 (exit $ac_status); }; then mv conftest.o func.o && \ ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null @@ -11743,7 +11807,7 @@ EOF cf_cv_link_dataonly=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 11746 "configure" +#line 11810 "configure" #include "confdefs.h" int main() @@ -11754,15 +11818,15 @@ else _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:11757: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11821: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11760: \$? = $ac_status" >&5 + echo "$as_me:11824: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:11762: \"$ac_try\"") >&5 + { (eval echo "$as_me:11826: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11765: \$? = $ac_status" >&5 + echo "$as_me:11829: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_link_dataonly=yes else @@ -11777,7 +11841,7 @@ fi fi -echo "$as_me:11780: result: $cf_cv_link_dataonly" >&5 +echo "$as_me:11844: result: $cf_cv_link_dataonly" >&5 echo "${ECHO_T}$cf_cv_link_dataonly" >&6 if test "$cf_cv_link_dataonly" = no ; then @@ -11812,13 +11876,13 @@ vsnprintf \ do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:11815: checking for $ac_func" >&5 +echo "$as_me:11879: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 11821 "configure" +#line 11885 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. */ @@ -11849,16 +11913,16 @@ f = $ac_func; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:11852: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11916: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11855: \$? = $ac_status" >&5 + echo "$as_me:11919: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:11858: \"$ac_try\"") >&5 + { (eval echo "$as_me:11922: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11861: \$? = $ac_status" >&5 + echo "$as_me:11925: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else @@ -11868,7 +11932,7 @@ eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:11871: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "$as_me:11935: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <&5 +echo "$as_me:11947: checking for terminal-capability database functions" >&5 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6 if test "${cf_cv_cgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 11890 "configure" +#line 11954 "configure" #include "confdefs.h" #include @@ -11907,16 +11971,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:11910: \"$ac_link\"") >&5 +if { (eval echo "$as_me:11974: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11913: \$? = $ac_status" >&5 + echo "$as_me:11977: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:11916: \"$ac_try\"") >&5 + { (eval echo "$as_me:11980: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11919: \$? = $ac_status" >&5 + echo "$as_me:11983: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_cgetent=yes else @@ -11928,7 +11992,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:11931: result: $cf_cv_cgetent" >&5 +echo "$as_me:11995: result: $cf_cv_cgetent" >&5 echo "${ECHO_T}$cf_cv_cgetent" >&6 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF #define HAVE_BSD_CGETENT 1 @@ -11936,14 +12000,14 @@ EOF fi -echo "$as_me:11939: checking for isascii" >&5 +echo "$as_me:12003: checking for isascii" >&5 echo $ECHO_N "checking for isascii... $ECHO_C" >&6 if test "${cf_cv_have_isascii+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 11946 "configure" +#line 12010 "configure" #include "confdefs.h" #include int @@ -11955,16 +12019,16 @@ int x = isascii(' ') } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:11958: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12022: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:11961: \$? = $ac_status" >&5 + echo "$as_me:12025: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:11964: \"$ac_try\"") >&5 + { (eval echo "$as_me:12028: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:11967: \$? = $ac_status" >&5 + echo "$as_me:12031: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_have_isascii=yes else @@ -11975,17 +12039,17 @@ fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:11978: result: $cf_cv_have_isascii" >&5 +echo "$as_me:12042: result: $cf_cv_have_isascii" >&5 echo "${ECHO_T}$cf_cv_have_isascii" >&6 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF #define HAVE_ISASCII 1 EOF if test "$ac_cv_func_sigaction" = yes; then -echo "$as_me:11985: checking whether sigaction needs _POSIX_SOURCE" >&5 +echo "$as_me:12049: checking whether sigaction needs _POSIX_SOURCE" >&5 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 11988 "configure" +#line 12052 "configure" #include "confdefs.h" #include @@ -11999,16 +12063,16 @@ struct sigaction act } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:12002: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12066: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12005: \$? = $ac_status" >&5 + echo "$as_me:12069: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:12008: \"$ac_try\"") >&5 + { (eval echo "$as_me:12072: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12011: \$? = $ac_status" >&5 + echo "$as_me:12075: \$? = $ac_status" >&5 (exit $ac_status); }; }; then sigact_bad=no else @@ -12016,7 +12080,7 @@ else cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 12019 "configure" +#line 12083 "configure" #include "confdefs.h" #define _POSIX_SOURCE @@ -12031,16 +12095,16 @@ struct sigaction act } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:12034: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12098: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12037: \$? = $ac_status" >&5 + echo "$as_me:12101: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:12040: \"$ac_try\"") >&5 + { (eval echo "$as_me:12104: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12043: \$? = $ac_status" >&5 + echo "$as_me:12107: \$? = $ac_status" >&5 (exit $ac_status); }; }; then sigact_bad=yes cat >>confdefs.h <<\EOF @@ -12055,11 +12119,11 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext -echo "$as_me:12058: result: $sigact_bad" >&5 +echo "$as_me:12122: result: $sigact_bad" >&5 echo "${ECHO_T}$sigact_bad" >&6 fi -echo "$as_me:12062: checking if nanosleep really works" >&5 +echo "$as_me:12126: checking if nanosleep really works" >&5 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6 if test "${cf_cv_func_nanosleep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -12069,7 +12133,7 @@ if test "$cross_compiling" = yes; then cf_cv_func_nanosleep=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 12072 "configure" +#line 12136 "configure" #include "confdefs.h" #include @@ -12094,15 +12158,15 @@ int main() { _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:12097: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12161: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12100: \$? = $ac_status" >&5 + echo "$as_me:12164: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:12102: \"$ac_try\"") >&5 + { (eval echo "$as_me:12166: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12105: \$? = $ac_status" >&5 + echo "$as_me:12169: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_func_nanosleep=yes else @@ -12114,7 +12178,7 @@ fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -echo "$as_me:12117: result: $cf_cv_func_nanosleep" >&5 +echo "$as_me:12181: result: $cf_cv_func_nanosleep" >&5 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF @@ -12128,23 +12192,23 @@ unistd.h \ do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:12131: checking for $ac_header" >&5 +echo "$as_me:12195: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 12137 "configure" +#line 12201 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:12141: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:12205: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:12147: \$? = $ac_status" >&5 + echo "$as_me:12211: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -12163,7 +12227,7 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:12166: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:12230: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <&5 +echo "$as_me:12245: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 12187 "configure" +#line 12251 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:12191: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:12255: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:12197: \$? = $ac_status" >&5 + echo "$as_me:12261: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -12213,7 +12277,7 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:12216: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:12280: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <&5 + echo "$as_me:12298: checking whether termios.h needs _POSIX_SOURCE" >&5 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF -#line 12237 "configure" +#line 12301 "configure" #include "confdefs.h" #include int @@ -12246,16 +12310,16 @@ struct termios foo; int x = foo.c_iflag } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:12249: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12313: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12252: \$? = $ac_status" >&5 + echo "$as_me:12316: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:12255: \"$ac_try\"") >&5 + { (eval echo "$as_me:12319: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12258: \$? = $ac_status" >&5 + echo "$as_me:12322: \$? = $ac_status" >&5 (exit $ac_status); }; }; then termios_bad=no else @@ -12263,7 +12327,7 @@ else cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 12266 "configure" +#line 12330 "configure" #include "confdefs.h" #define _POSIX_SOURCE @@ -12277,16 +12341,16 @@ struct termios foo; int x = foo.c_iflag } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:12280: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12344: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12283: \$? = $ac_status" >&5 + echo "$as_me:12347: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:12286: \"$ac_try\"") >&5 + { (eval echo "$as_me:12350: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12289: \$? = $ac_status" >&5 + echo "$as_me:12353: \$? = $ac_status" >&5 (exit $ac_status); }; }; then termios_bad=unknown else @@ -12301,19 +12365,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext - echo "$as_me:12304: result: $termios_bad" >&5 + echo "$as_me:12368: result: $termios_bad" >&5 echo "${ECHO_T}$termios_bad" >&6 fi fi -echo "$as_me:12309: checking for tcgetattr" >&5 +echo "$as_me:12373: checking for tcgetattr" >&5 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6 if test "${cf_cv_have_tcgetattr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 12316 "configure" +#line 12380 "configure" #include "confdefs.h" #include @@ -12341,16 +12405,16 @@ tcgetattr(1, &foo); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:12344: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12408: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12347: \$? = $ac_status" >&5 + echo "$as_me:12411: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:12350: \"$ac_try\"") >&5 + { (eval echo "$as_me:12414: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12353: \$? = $ac_status" >&5 + echo "$as_me:12417: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_have_tcgetattr=yes else @@ -12360,20 +12424,20 @@ cf_cv_have_tcgetattr=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:12363: result: $cf_cv_have_tcgetattr" >&5 +echo "$as_me:12427: result: $cf_cv_have_tcgetattr" >&5 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF #define HAVE_TCGETATTR 1 EOF -echo "$as_me:12369: checking for vsscanf function or workaround" >&5 +echo "$as_me:12433: checking for vsscanf function or workaround" >&5 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6 if test "${cf_cv_func_vsscanf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 12376 "configure" +#line 12440 "configure" #include "confdefs.h" #include @@ -12389,16 +12453,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:12392: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12456: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12395: \$? = $ac_status" >&5 + echo "$as_me:12459: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:12398: \"$ac_try\"") >&5 + { (eval echo "$as_me:12462: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12401: \$? = $ac_status" >&5 + echo "$as_me:12465: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_func_vsscanf=vsscanf else @@ -12406,7 +12470,7 @@ else cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 12409 "configure" +#line 12473 "configure" #include "confdefs.h" #include @@ -12428,16 +12492,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:12431: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12495: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12434: \$? = $ac_status" >&5 + echo "$as_me:12498: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:12437: \"$ac_try\"") >&5 + { (eval echo "$as_me:12501: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12440: \$? = $ac_status" >&5 + echo "$as_me:12504: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_func_vsscanf=vfscanf else @@ -12445,7 +12509,7 @@ else cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 12448 "configure" +#line 12512 "configure" #include "confdefs.h" #include @@ -12467,16 +12531,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:12470: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12534: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12473: \$? = $ac_status" >&5 + echo "$as_me:12537: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:12476: \"$ac_try\"") >&5 + { (eval echo "$as_me:12540: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12479: \$? = $ac_status" >&5 + echo "$as_me:12543: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_func_vsscanf=_doscan else @@ -12491,7 +12555,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:12494: result: $cf_cv_func_vsscanf" >&5 +echo "$as_me:12558: result: $cf_cv_func_vsscanf" >&5 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6 case $cf_cv_func_vsscanf in #(vi @@ -12509,7 +12573,7 @@ EOF ;; esac -echo "$as_me:12512: checking for working mkstemp" >&5 +echo "$as_me:12576: checking for working mkstemp" >&5 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6 if test "${cf_cv_func_mkstemp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -12517,13 +12581,13 @@ else rm -f conftest* if test "$cross_compiling" = yes; then - echo "$as_me:12520: checking for mkstemp" >&5 + echo "$as_me:12584: checking for mkstemp" >&5 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6 if test "${ac_cv_func_mkstemp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 12526 "configure" +#line 12590 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char mkstemp (); below. */ @@ -12554,16 +12618,16 @@ f = mkstemp; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:12557: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12621: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12560: \$? = $ac_status" >&5 + echo "$as_me:12624: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:12563: \"$ac_try\"") >&5 + { (eval echo "$as_me:12627: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12566: \$? = $ac_status" >&5 + echo "$as_me:12630: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_mkstemp=yes else @@ -12573,12 +12637,12 @@ ac_cv_func_mkstemp=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:12576: result: $ac_cv_func_mkstemp" >&5 +echo "$as_me:12640: result: $ac_cv_func_mkstemp" >&5 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 12581 "configure" +#line 12645 "configure" #include "confdefs.h" #include @@ -12616,15 +12680,15 @@ int main() _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:12619: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12683: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12622: \$? = $ac_status" >&5 + echo "$as_me:12686: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:12624: \"$ac_try\"") >&5 + { (eval echo "$as_me:12688: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12627: \$? = $ac_status" >&5 + echo "$as_me:12691: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_func_mkstemp=yes @@ -12639,7 +12703,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -echo "$as_me:12642: result: $cf_cv_func_mkstemp" >&5 +echo "$as_me:12706: result: $cf_cv_func_mkstemp" >&5 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6 if test "$cf_cv_func_mkstemp" = yes ; then cat >>confdefs.h <<\EOF @@ -12657,21 +12721,21 @@ else fi if test "$cross_compiling" = yes ; then - { echo "$as_me:12660: WARNING: cross compiling: assume setvbuf params not reversed" >&5 + { echo "$as_me:12724: WARNING: cross compiling: assume setvbuf params not reversed" >&5 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;} else - echo "$as_me:12663: checking whether setvbuf arguments are reversed" >&5 + echo "$as_me:12727: checking whether setvbuf arguments are reversed" >&5 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then - { { echo "$as_me:12669: error: cannot run test program while cross compiling" >&5 + { { echo "$as_me:12733: error: cannot run test program while cross compiling" >&5 echo "$as_me: error: cannot run test program while cross compiling" >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF -#line 12674 "configure" +#line 12738 "configure" #include "confdefs.h" #include /* If setvbuf has the reversed format, exit 0. */ @@ -12688,15 +12752,15 @@ main () } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:12691: \"$ac_link\"") >&5 +if { (eval echo "$as_me:12755: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12694: \$? = $ac_status" >&5 + echo "$as_me:12758: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:12696: \"$ac_try\"") >&5 + { (eval echo "$as_me:12760: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12699: \$? = $ac_status" >&5 + echo "$as_me:12763: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_setvbuf_reversed=yes else @@ -12709,7 +12773,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f core core.* *.core fi -echo "$as_me:12712: result: $ac_cv_func_setvbuf_reversed" >&5 +echo "$as_me:12776: result: $ac_cv_func_setvbuf_reversed" >&5 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6 if test $ac_cv_func_setvbuf_reversed = yes; then @@ -12720,13 +12784,13 @@ EOF fi fi -echo "$as_me:12723: checking return type of signal handlers" >&5 +echo "$as_me:12787: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 12729 "configure" +#line 12793 "configure" #include "confdefs.h" #include #include @@ -12748,16 +12812,16 @@ int i; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:12751: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12815: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12754: \$? = $ac_status" >&5 + echo "$as_me:12818: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:12757: \"$ac_try\"") >&5 + { (eval echo "$as_me:12821: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12760: \$? = $ac_status" >&5 + echo "$as_me:12824: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void else @@ -12767,21 +12831,21 @@ ac_cv_type_signal=int fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:12770: result: $ac_cv_type_signal" >&5 +echo "$as_me:12834: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 cat >>confdefs.h <&5 +echo "$as_me:12841: checking for type sigaction_t" >&5 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6 if test "${cf_cv_type_sigaction+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 12784 "configure" +#line 12848 "configure" #include "confdefs.h" #include @@ -12794,16 +12858,16 @@ sigaction_t x } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:12797: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12861: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12800: \$? = $ac_status" >&5 + echo "$as_me:12864: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:12803: \"$ac_try\"") >&5 + { (eval echo "$as_me:12867: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12806: \$? = $ac_status" >&5 + echo "$as_me:12870: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_type_sigaction=yes else @@ -12814,13 +12878,13 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:12817: result: $cf_cv_type_sigaction" >&5 +echo "$as_me:12881: result: $cf_cv_type_sigaction" >&5 echo "${ECHO_T}$cf_cv_type_sigaction" >&6 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF #define HAVE_TYPE_SIGACTION 1 EOF -echo "$as_me:12823: checking declaration of size-change" >&5 +echo "$as_me:12887: checking declaration of size-change" >&5 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6 if test "${cf_cv_sizechange+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -12835,7 +12899,7 @@ do CPPFLAGS="$cf_save_CPPFLAGS" test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts" cat >conftest.$ac_ext <<_ACEOF -#line 12838 "configure" +#line 12902 "configure" #include "confdefs.h" #include #ifdef HAVE_TERMIOS_H @@ -12879,16 +12943,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:12882: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:12946: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:12885: \$? = $ac_status" >&5 + echo "$as_me:12949: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:12888: \"$ac_try\"") >&5 + { (eval echo "$as_me:12952: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12891: \$? = $ac_status" >&5 + echo "$as_me:12955: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_sizechange=yes else @@ -12907,7 +12971,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext done fi -echo "$as_me:12910: result: $cf_cv_sizechange" >&5 +echo "$as_me:12974: result: $cf_cv_sizechange" >&5 echo "${ECHO_T}$cf_cv_sizechange" >&6 if test "$cf_cv_sizechange" != no ; then cat >>confdefs.h <<\EOF @@ -12924,13 +12988,13 @@ EOF esac fi -echo "$as_me:12927: checking for memmove" >&5 +echo "$as_me:12991: checking for memmove" >&5 echo $ECHO_N "checking for memmove... $ECHO_C" >&6 if test "${ac_cv_func_memmove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 12933 "configure" +#line 12997 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char memmove (); below. */ @@ -12961,16 +13025,16 @@ f = memmove; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:12964: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13028: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:12967: \$? = $ac_status" >&5 + echo "$as_me:13031: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:12970: \"$ac_try\"") >&5 + { (eval echo "$as_me:13034: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:12973: \$? = $ac_status" >&5 + echo "$as_me:13037: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_memmove=yes else @@ -12980,19 +13044,19 @@ ac_cv_func_memmove=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:12983: result: $ac_cv_func_memmove" >&5 +echo "$as_me:13047: result: $ac_cv_func_memmove" >&5 echo "${ECHO_T}$ac_cv_func_memmove" >&6 if test $ac_cv_func_memmove = yes; then : else -echo "$as_me:12989: checking for bcopy" >&5 +echo "$as_me:13053: checking for bcopy" >&5 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6 if test "${ac_cv_func_bcopy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 12995 "configure" +#line 13059 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char bcopy (); below. */ @@ -13023,16 +13087,16 @@ f = bcopy; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:13026: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13090: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13029: \$? = $ac_status" >&5 + echo "$as_me:13093: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:13032: \"$ac_try\"") >&5 + { (eval echo "$as_me:13096: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13035: \$? = $ac_status" >&5 + echo "$as_me:13099: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_bcopy=yes else @@ -13042,11 +13106,11 @@ ac_cv_func_bcopy=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:13045: result: $ac_cv_func_bcopy" >&5 +echo "$as_me:13109: result: $ac_cv_func_bcopy" >&5 echo "${ECHO_T}$ac_cv_func_bcopy" >&6 if test $ac_cv_func_bcopy = yes; then - echo "$as_me:13049: checking if bcopy does overlapping moves" >&5 + echo "$as_me:13113: checking if bcopy does overlapping moves" >&5 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6 if test "${cf_cv_good_bcopy+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -13056,7 +13120,7 @@ else cf_cv_good_bcopy=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 13059 "configure" +#line 13123 "configure" #include "confdefs.h" int main() { @@ -13070,15 +13134,15 @@ int main() { _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:13073: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13137: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13076: \$? = $ac_status" >&5 + echo "$as_me:13140: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:13078: \"$ac_try\"") >&5 + { (eval echo "$as_me:13142: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13081: \$? = $ac_status" >&5 + echo "$as_me:13145: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_good_bcopy=yes else @@ -13091,7 +13155,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -echo "$as_me:13094: result: $cf_cv_good_bcopy" >&5 +echo "$as_me:13158: result: $cf_cv_good_bcopy" >&5 echo "${ECHO_T}$cf_cv_good_bcopy" >&6 else @@ -13112,7 +13176,7 @@ EOF fi -echo "$as_me:13115: checking if poll really works" >&5 +echo "$as_me:13179: checking if poll really works" >&5 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6 if test "${cf_cv_working_poll+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -13122,7 +13186,7 @@ if test "$cross_compiling" = yes; then cf_cv_working_poll=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 13125 "configure" +#line 13189 "configure" #include "confdefs.h" #include @@ -13143,15 +13207,15 @@ int main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:13146: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13210: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13149: \$? = $ac_status" >&5 + echo "$as_me:13213: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:13151: \"$ac_try\"") >&5 + { (eval echo "$as_me:13215: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13154: \$? = $ac_status" >&5 + echo "$as_me:13218: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_working_poll=yes else @@ -13163,7 +13227,7 @@ fi rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi -echo "$as_me:13166: result: $cf_cv_working_poll" >&5 +echo "$as_me:13230: result: $cf_cv_working_poll" >&5 echo "${ECHO_T}$cf_cv_working_poll" >&6 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF #define HAVE_WORKING_POLL 1 @@ -13174,23 +13238,23 @@ if test "$with_hashed_db" != no ; then #define USE_HASHED_DB 1 EOF -echo "$as_me:13177: checking for db.h" >&5 +echo "$as_me:13241: checking for db.h" >&5 echo $ECHO_N "checking for db.h... $ECHO_C" >&6 if test "${ac_cv_header_db_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 13183 "configure" +#line 13247 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:13187: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:13251: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:13193: \$? = $ac_status" >&5 + echo "$as_me:13257: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -13209,11 +13273,11 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:13212: result: $ac_cv_header_db_h" >&5 +echo "$as_me:13276: result: $ac_cv_header_db_h" >&5 echo "${ECHO_T}$ac_cv_header_db_h" >&6 if test $ac_cv_header_db_h = yes; then -echo "$as_me:13216: checking for version of db" >&5 +echo "$as_me:13280: checking for version of db" >&5 echo $ECHO_N "checking for version of db... $ECHO_C" >&6 if test "${cf_cv_hashed_db_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -13224,10 +13288,10 @@ cf_cv_hashed_db_version=unknown for cf_db_version in 1 2 3 4 do -echo "(line 13227) testing checking for db version $cf_db_version ..." 1>&5 +echo "(line 13291) testing checking for db version $cf_db_version ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 13230 "configure" +#line 13294 "configure" #include "confdefs.h" $ac_includes_default @@ -13257,16 +13321,16 @@ DBT *foo = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:13260: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13324: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13263: \$? = $ac_status" >&5 + echo "$as_me:13327: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:13266: \"$ac_try\"") >&5 + { (eval echo "$as_me:13330: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13269: \$? = $ac_status" >&5 + echo "$as_me:13333: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_hashed_db_version=$cf_db_version @@ -13280,16 +13344,16 @@ rm -f conftest.$ac_objext conftest.$ac_ext done fi -echo "$as_me:13283: result: $cf_cv_hashed_db_version" >&5 +echo "$as_me:13347: result: $cf_cv_hashed_db_version" >&5 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6 if test "$cf_cv_hashed_db_version" = unknown ; then - { { echo "$as_me:13287: error: Cannot determine version of db" >&5 + { { echo "$as_me:13351: error: Cannot determine version of db" >&5 echo "$as_me: error: Cannot determine version of db" >&2;} { (exit 1); exit 1; }; } else -echo "$as_me:13292: checking for db libraries" >&5 +echo "$as_me:13356: checking for db libraries" >&5 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6 if test "${cf_cv_hashed_db_libs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -13303,10 +13367,10 @@ do LIBS="-l$cf_db_libs $LIBS" fi -echo "(line 13306) testing checking for library "$cf_db_libs" ..." 1>&5 +echo "(line 13370) testing checking for library "$cf_db_libs" ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 13309 "configure" +#line 13373 "configure" #include "confdefs.h" $ac_includes_default @@ -13361,16 +13425,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:13364: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13428: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13367: \$? = $ac_status" >&5 + echo "$as_me:13431: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:13370: \"$ac_try\"") >&5 + { (eval echo "$as_me:13434: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13373: \$? = $ac_status" >&5 + echo "$as_me:13437: \$? = $ac_status" >&5 (exit $ac_status); }; }; then if test -n "$cf_db_libs" ; then @@ -13390,11 +13454,11 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext done fi -echo "$as_me:13393: result: $cf_cv_hashed_db_libs" >&5 +echo "$as_me:13457: result: $cf_cv_hashed_db_libs" >&5 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6 if test "$cf_cv_hashed_db_libs" = unknown ; then - { { echo "$as_me:13397: error: Cannot determine library for db" >&5 + { { echo "$as_me:13461: error: Cannot determine library for db" >&5 echo "$as_me: error: Cannot determine library for db" >&2;} { (exit 1); exit 1; }; } elif test "$cf_cv_hashed_db_libs" != default ; then @@ -13404,7 +13468,7 @@ fi else - { { echo "$as_me:13407: error: Cannot find db.h" >&5 + { { echo "$as_me:13471: error: Cannot find db.h" >&5 echo "$as_me: error: Cannot find db.h" >&2;} { (exit 1); exit 1; }; } @@ -13419,7 +13483,7 @@ fi # Just in case, check if the C compiler has a bool type. -echo "$as_me:13422: checking if we should include stdbool.h" >&5 +echo "$as_me:13486: checking if we should include stdbool.h" >&5 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6 if test "${cf_cv_header_stdbool_h+set}" = set; then @@ -13427,7 +13491,7 @@ if test "${cf_cv_header_stdbool_h+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF -#line 13430 "configure" +#line 13494 "configure" #include "confdefs.h" int @@ -13439,23 +13503,23 @@ bool foo = false } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:13442: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13506: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13445: \$? = $ac_status" >&5 + echo "$as_me:13509: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:13448: \"$ac_try\"") >&5 + { (eval echo "$as_me:13512: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13451: \$? = $ac_status" >&5 + echo "$as_me:13515: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_header_stdbool_h=0 else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 13458 "configure" +#line 13522 "configure" #include "confdefs.h" #ifndef __BEOS__ @@ -13471,16 +13535,16 @@ bool foo = false } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:13474: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13538: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13477: \$? = $ac_status" >&5 + echo "$as_me:13541: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:13480: \"$ac_try\"") >&5 + { (eval echo "$as_me:13544: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13483: \$? = $ac_status" >&5 + echo "$as_me:13547: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_header_stdbool_h=1 else @@ -13494,13 +13558,13 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi if test "$cf_cv_header_stdbool_h" = 1 -then echo "$as_me:13497: result: yes" >&5 +then echo "$as_me:13561: result: yes" >&5 echo "${ECHO_T}yes" >&6 -else echo "$as_me:13499: result: no" >&5 +else echo "$as_me:13563: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:13503: checking for builtin bool type" >&5 +echo "$as_me:13567: checking for builtin bool type" >&5 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6 if test "${cf_cv_cc_bool_type+set}" = set; then @@ -13508,7 +13572,7 @@ if test "${cf_cv_cc_bool_type+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF -#line 13511 "configure" +#line 13575 "configure" #include "confdefs.h" #include @@ -13523,16 +13587,16 @@ bool x = false } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:13526: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13590: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13529: \$? = $ac_status" >&5 + echo "$as_me:13593: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:13532: \"$ac_try\"") >&5 + { (eval echo "$as_me:13596: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13535: \$? = $ac_status" >&5 + echo "$as_me:13599: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_cc_bool_type=1 else @@ -13545,9 +13609,9 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi if test "$cf_cv_cc_bool_type" = 1 -then echo "$as_me:13548: result: yes" >&5 +then echo "$as_me:13612: result: yes" >&5 echo "${ECHO_T}yes" >&6 -else echo "$as_me:13550: result: no" >&5 +else echo "$as_me:13614: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -13569,7 +13633,7 @@ os2*) #(vi cf_stdcpp_libname=stdc++ ;; esac -echo "$as_me:13572: checking for library $cf_stdcpp_libname" >&5 +echo "$as_me:13636: checking for library $cf_stdcpp_libname" >&5 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6 if test "${cf_cv_libstdcpp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -13578,7 +13642,7 @@ else cf_save="$LIBS" LIBS="$LIBS -l$cf_stdcpp_libname" cat >conftest.$ac_ext <<_ACEOF -#line 13581 "configure" +#line 13645 "configure" #include "confdefs.h" #include @@ -13594,16 +13658,16 @@ strstreambuf foo(buf, sizeof(buf)) } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:13597: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13661: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13600: \$? = $ac_status" >&5 + echo "$as_me:13664: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:13603: \"$ac_try\"") >&5 + { (eval echo "$as_me:13667: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13606: \$? = $ac_status" >&5 + echo "$as_me:13670: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_libstdcpp=yes else @@ -13615,12 +13679,12 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS="$cf_save" fi -echo "$as_me:13618: result: $cf_cv_libstdcpp" >&5 +echo "$as_me:13682: result: $cf_cv_libstdcpp" >&5 echo "${ECHO_T}$cf_cv_libstdcpp" >&6 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname" fi - echo "$as_me:13623: checking whether $CXX understands -c and -o together" >&5 + echo "$as_me:13687: checking whether $CXX understands -c and -o together" >&5 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6 if test "${cf_cv_prog_CXX_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -13636,15 +13700,15 @@ CF_EOF # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -if { (eval echo "$as_me:13639: \"$ac_try\"") >&5 +if { (eval echo "$as_me:13703: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13642: \$? = $ac_status" >&5 + echo "$as_me:13706: \$? = $ac_status" >&5 (exit $ac_status); } && - test -f conftest2.$ac_objext && { (eval echo "$as_me:13644: \"$ac_try\"") >&5 + test -f conftest2.$ac_objext && { (eval echo "$as_me:13708: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13647: \$? = $ac_status" >&5 + echo "$as_me:13711: \$? = $ac_status" >&5 (exit $ac_status); }; then eval cf_cv_prog_CXX_c_o=yes @@ -13655,10 +13719,10 @@ rm -f conftest* fi if test $cf_cv_prog_CXX_c_o = yes; then - echo "$as_me:13658: result: yes" >&5 + echo "$as_me:13722: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:13661: result: no" >&5 + echo "$as_me:13725: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -13678,12 +13742,12 @@ os2*) #(vi ;; esac if test "$GXX" = yes; then - echo "$as_me:13681: checking for lib$cf_gpp_libname" >&5 + echo "$as_me:13745: checking for lib$cf_gpp_libname" >&5 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6 cf_save="$LIBS" LIBS="$LIBS -l$cf_gpp_libname" cat >conftest.$ac_ext <<_ACEOF -#line 13686 "configure" +#line 13750 "configure" #include "confdefs.h" #include <$cf_gpp_libname/builtin.h> @@ -13697,16 +13761,16 @@ two_arg_error_handler_t foo2 = lib_error_handler } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:13700: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13764: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13703: \$? = $ac_status" >&5 + echo "$as_me:13767: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:13706: \"$ac_try\"") >&5 + { (eval echo "$as_me:13770: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13709: \$? = $ac_status" >&5 + echo "$as_me:13773: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cxx_library=yes CXXLIBS="$CXXLIBS -l$cf_gpp_libname" @@ -13725,7 +13789,7 @@ else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 13728 "configure" +#line 13792 "configure" #include "confdefs.h" #include @@ -13739,16 +13803,16 @@ two_arg_error_handler_t foo2 = lib_error_handler } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:13742: \"$ac_link\"") >&5 +if { (eval echo "$as_me:13806: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13745: \$? = $ac_status" >&5 + echo "$as_me:13809: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:13748: \"$ac_try\"") >&5 + { (eval echo "$as_me:13812: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13751: \$? = $ac_status" >&5 + echo "$as_me:13815: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cxx_library=yes CXXLIBS="$CXXLIBS -l$cf_gpp_libname" @@ -13765,7 +13829,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS="$cf_save" - echo "$as_me:13768: result: $cf_cxx_library" >&5 + echo "$as_me:13832: result: $cf_cxx_library" >&5 echo "${ECHO_T}$cf_cxx_library" >&6 fi @@ -13781,7 +13845,7 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_main_return=return -echo "$as_me:13784: checking how to run the C++ preprocessor" >&5 +echo "$as_me:13848: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then @@ -13798,18 +13862,18 @@ do # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF -#line 13801 "configure" +#line 13865 "configure" #include "confdefs.h" #include Syntax error _ACEOF -if { (eval echo "$as_me:13806: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:13870: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:13812: \$? = $ac_status" >&5 + echo "$as_me:13876: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -13832,17 +13896,17 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 13835 "configure" +#line 13899 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:13839: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:13903: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:13845: \$? = $ac_status" >&5 + echo "$as_me:13909: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -13879,7 +13943,7 @@ fi else ac_cv_prog_CXXCPP=$CXXCPP fi -echo "$as_me:13882: result: $CXXCPP" >&5 +echo "$as_me:13946: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6 ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes @@ -13889,18 +13953,18 @@ do # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF -#line 13892 "configure" +#line 13956 "configure" #include "confdefs.h" #include Syntax error _ACEOF -if { (eval echo "$as_me:13897: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:13961: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:13903: \$? = $ac_status" >&5 + echo "$as_me:13967: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -13923,17 +13987,17 @@ rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF -#line 13926 "configure" +#line 13990 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:13930: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:13994: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:13936: \$? = $ac_status" >&5 + echo "$as_me:14000: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -13961,7 +14025,7 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:13964: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5 + { { echo "$as_me:14028: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi @@ -13976,23 +14040,23 @@ ac_main_return=return for ac_header in iostream typeinfo do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:13979: checking for $ac_header" >&5 +echo "$as_me:14043: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 13985 "configure" +#line 14049 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:13989: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:14053: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? egrep -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:13995: \$? = $ac_status" >&5 + echo "$as_me:14059: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -14011,7 +14075,7 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:14014: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:14078: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <&5 +echo "$as_me:14088: checking if we should include stdbool.h" >&5 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6 if test "${cf_cv_header_stdbool_h+set}" = set; then @@ -14029,7 +14093,7 @@ if test "${cf_cv_header_stdbool_h+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF -#line 14032 "configure" +#line 14096 "configure" #include "confdefs.h" int @@ -14041,23 +14105,23 @@ bool foo = false } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:14044: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14108: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14047: \$? = $ac_status" >&5 + echo "$as_me:14111: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:14050: \"$ac_try\"") >&5 + { (eval echo "$as_me:14114: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14053: \$? = $ac_status" >&5 + echo "$as_me:14117: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_header_stdbool_h=0 else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 14060 "configure" +#line 14124 "configure" #include "confdefs.h" #ifndef __BEOS__ @@ -14073,16 +14137,16 @@ bool foo = false } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:14076: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14140: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14079: \$? = $ac_status" >&5 + echo "$as_me:14143: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:14082: \"$ac_try\"") >&5 + { (eval echo "$as_me:14146: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14085: \$? = $ac_status" >&5 + echo "$as_me:14149: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_header_stdbool_h=1 else @@ -14096,13 +14160,13 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi if test "$cf_cv_header_stdbool_h" = 1 -then echo "$as_me:14099: result: yes" >&5 +then echo "$as_me:14163: result: yes" >&5 echo "${ECHO_T}yes" >&6 -else echo "$as_me:14101: result: no" >&5 +else echo "$as_me:14165: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:14105: checking for builtin bool type" >&5 +echo "$as_me:14169: checking for builtin bool type" >&5 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6 if test "${cf_cv_builtin_bool+set}" = set; then @@ -14110,7 +14174,7 @@ if test "${cf_cv_builtin_bool+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF -#line 14113 "configure" +#line 14177 "configure" #include "confdefs.h" #include @@ -14125,16 +14189,16 @@ bool x = false } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:14128: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14192: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14131: \$? = $ac_status" >&5 + echo "$as_me:14195: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:14134: \"$ac_try\"") >&5 + { (eval echo "$as_me:14198: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14137: \$? = $ac_status" >&5 + echo "$as_me:14201: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_builtin_bool=1 else @@ -14147,13 +14211,13 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi if test "$cf_cv_builtin_bool" = 1 -then echo "$as_me:14150: result: yes" >&5 +then echo "$as_me:14214: result: yes" >&5 echo "${ECHO_T}yes" >&6 -else echo "$as_me:14152: result: no" >&5 +else echo "$as_me:14216: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:14156: checking for size of bool" >&5 +echo "$as_me:14220: checking for size of bool" >&5 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6 if test "${cf_cv_type_of_bool+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -14164,7 +14228,7 @@ else cf_cv_type_of_bool=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 14167 "configure" +#line 14231 "configure" #include "confdefs.h" #include @@ -14206,15 +14270,15 @@ main() _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:14209: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14273: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:14212: \$? = $ac_status" >&5 + echo "$as_me:14276: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:14214: \"$ac_try\"") >&5 + { (eval echo "$as_me:14278: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14217: \$? = $ac_status" >&5 + echo "$as_me:14281: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_type_of_bool=`cat cf_test.out` if test -z "$cf_cv_type_of_bool"; then @@ -14232,18 +14296,18 @@ fi fi rm -f cf_test.out -echo "$as_me:14235: result: $cf_cv_type_of_bool" >&5 +echo "$as_me:14299: result: $cf_cv_type_of_bool" >&5 echo "${ECHO_T}$cf_cv_type_of_bool" >&6 if test "$cf_cv_type_of_bool" = unknown ; then case .$NCURSES_BOOL in #(vi .auto|.) NCURSES_BOOL=unsigned;; esac - { echo "$as_me:14241: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5 + { echo "$as_me:14305: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;} cf_cv_type_of_bool=$NCURSES_BOOL fi -echo "$as_me:14246: checking for special defines needed for etip.h" >&5 +echo "$as_me:14310: checking for special defines needed for etip.h" >&5 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6 cf_save_CXXFLAGS="$CXXFLAGS" cf_result="none" @@ -14255,7 +14319,7 @@ do test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}" test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}" cat >conftest.$ac_ext <<_ACEOF -#line 14258 "configure" +#line 14322 "configure" #include "confdefs.h" #include @@ -14269,16 +14333,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:14272: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14336: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14275: \$? = $ac_status" >&5 + echo "$as_me:14339: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:14278: \"$ac_try\"") >&5 + { (eval echo "$as_me:14342: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14281: \$? = $ac_status" >&5 + echo "$as_me:14345: \$? = $ac_status" >&5 (exit $ac_status); }; }; then test -n "$cf_math" && cat >>confdefs.h <&5 +echo "$as_me:14366: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 CXXFLAGS="$cf_save_CXXFLAGS" if test -n "$CXX"; then -echo "$as_me:14307: checking if $CXX accepts parameter initialization" >&5 +echo "$as_me:14371: checking if $CXX accepts parameter initialization" >&5 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6 if test "${cf_cv_cpp_param_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -14321,7 +14385,7 @@ ac_main_return=return cf_cv_cpp_param_init=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 14324 "configure" +#line 14388 "configure" #include "confdefs.h" class TEST { @@ -14340,15 +14404,15 @@ void main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:14343: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14407: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:14346: \$? = $ac_status" >&5 + echo "$as_me:14410: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:14348: \"$ac_try\"") >&5 + { (eval echo "$as_me:14412: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14351: \$? = $ac_status" >&5 + echo "$as_me:14415: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_cpp_param_init=yes else @@ -14367,7 +14431,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_main_return=return fi -echo "$as_me:14370: result: $cf_cv_cpp_param_init" >&5 +echo "$as_me:14434: result: $cf_cv_cpp_param_init" >&5 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6 fi test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF @@ -14376,7 +14440,7 @@ EOF if test -n "$CXX"; then -echo "$as_me:14379: checking if $CXX accepts static_cast" >&5 +echo "$as_me:14443: checking if $CXX accepts static_cast" >&5 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6 if test "${cf_cv_cpp_static_cast+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -14390,7 +14454,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_main_return=return cat >conftest.$ac_ext <<_ACEOF -#line 14393 "configure" +#line 14457 "configure" #include "confdefs.h" class NCursesPanel @@ -14434,16 +14498,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:14437: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14501: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14440: \$? = $ac_status" >&5 + echo "$as_me:14504: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:14443: \"$ac_try\"") >&5 + { (eval echo "$as_me:14507: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14446: \$? = $ac_status" >&5 + echo "$as_me:14510: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_cpp_static_cast=yes else @@ -14461,7 +14525,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_main_return=return fi -echo "$as_me:14464: result: $cf_cv_cpp_static_cast" >&5 +echo "$as_me:14528: result: $cf_cv_cpp_static_cast" >&5 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6 fi @@ -14509,7 +14573,7 @@ else else if test "$cf_cv_header_stdbool_h" = 1 ; then -echo "$as_me:14512: checking for size of bool" >&5 +echo "$as_me:14576: checking for size of bool" >&5 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6 if test "${cf_cv_type_of_bool+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -14520,7 +14584,7 @@ else cf_cv_type_of_bool=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 14523 "configure" +#line 14587 "configure" #include "confdefs.h" #include @@ -14562,15 +14626,15 @@ main() _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:14565: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14629: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:14568: \$? = $ac_status" >&5 + echo "$as_me:14632: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:14570: \"$ac_try\"") >&5 + { (eval echo "$as_me:14634: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14573: \$? = $ac_status" >&5 + echo "$as_me:14637: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_type_of_bool=`cat cf_test.out` if test -z "$cf_cv_type_of_bool"; then @@ -14588,25 +14652,25 @@ fi fi rm -f cf_test.out -echo "$as_me:14591: result: $cf_cv_type_of_bool" >&5 +echo "$as_me:14655: result: $cf_cv_type_of_bool" >&5 echo "${ECHO_T}$cf_cv_type_of_bool" >&6 if test "$cf_cv_type_of_bool" = unknown ; then case .$NCURSES_BOOL in #(vi .auto|.) NCURSES_BOOL=unsigned;; esac - { echo "$as_me:14597: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5 + { echo "$as_me:14661: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;} cf_cv_type_of_bool=$NCURSES_BOOL fi else - echo "$as_me:14603: checking for fallback type of bool" >&5 + echo "$as_me:14667: checking for fallback type of bool" >&5 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6 case "$host_cpu" in #(vi i?86) cf_cv_type_of_bool=char ;; #(vi *) cf_cv_type_of_bool=int ;; esac - echo "$as_me:14609: result: $cf_cv_type_of_bool" >&5 + echo "$as_me:14673: result: $cf_cv_type_of_bool" >&5 echo "${ECHO_T}$cf_cv_type_of_bool" >&6 fi fi @@ -14636,7 +14700,7 @@ if test "$cf_with_ada" != "no" ; then cf_ada_make=gnatmake # Extract the first word of "$cf_ada_make", so it can be a program name with args. set dummy $cf_ada_make; ac_word=$2 -echo "$as_me:14639: checking for $ac_word" >&5 +echo "$as_me:14703: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_gnat_exists+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -14651,7 +14715,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_gnat_exists="yes" -echo "$as_me:14654: found $ac_dir/$ac_word" >&5 +echo "$as_me:14718: found $ac_dir/$ac_word" >&5 break done @@ -14660,10 +14724,10 @@ fi fi gnat_exists=$ac_cv_prog_gnat_exists if test -n "$gnat_exists"; then - echo "$as_me:14663: result: $gnat_exists" >&5 + echo "$as_me:14727: result: $gnat_exists" >&5 echo "${ECHO_T}$gnat_exists" >&6 else - echo "$as_me:14666: result: no" >&5 + echo "$as_me:14730: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -14671,11 +14735,11 @@ if test "$ac_cv_prog_gnat_exists" = no; then cf_ada_make= else -echo "$as_me:14674: checking for gnat version" >&5 +echo "$as_me:14738: checking for gnat version" >&5 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\ sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'` -echo "$as_me:14678: result: $cf_gnat_version" >&5 +echo "$as_me:14742: result: $cf_gnat_version" >&5 echo "${ECHO_T}$cf_gnat_version" >&6 case $cf_gnat_version in @@ -14698,7 +14762,7 @@ esac # Extract the first word of "m4", so it can be a program name with args. set dummy m4; ac_word=$2 -echo "$as_me:14701: checking for $ac_word" >&5 +echo "$as_me:14765: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_M4_exists+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -14713,7 +14777,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_M4_exists="yes" -echo "$as_me:14716: found $ac_dir/$ac_word" >&5 +echo "$as_me:14780: found $ac_dir/$ac_word" >&5 break done @@ -14722,10 +14786,10 @@ fi fi M4_exists=$ac_cv_prog_M4_exists if test -n "$M4_exists"; then - echo "$as_me:14725: result: $M4_exists" >&5 + echo "$as_me:14789: result: $M4_exists" >&5 echo "${ECHO_T}$M4_exists" >&6 else - echo "$as_me:14728: result: no" >&5 + echo "$as_me:14792: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -14734,7 +14798,7 @@ fi echo Ada95 binding required program m4 not found. Ada95 binding disabled. fi if test "$cf_cv_prog_gnat_correct" = yes; then - echo "$as_me:14737: checking if GNAT works" >&5 + echo "$as_me:14801: checking if GNAT works" >&5 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6 rm -f conftest* @@ -14762,14 +14826,14 @@ else fi rm -f conftest* - echo "$as_me:14765: result: $cf_cv_prog_gnat_correct" >&5 + echo "$as_me:14829: result: $cf_cv_prog_gnat_correct" >&5 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6 fi fi if test "$cf_cv_prog_gnat_correct" = yes; then ADAFLAGS="-O3 -gnatpn $ADAFLAGS" - echo "$as_me:14772: checking if GNAT pragma Unreferenced works" >&5 + echo "$as_me:14836: checking if GNAT pragma Unreferenced works" >&5 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6 rm -f conftest* @@ -14796,7 +14860,7 @@ else fi rm -f conftest* - echo "$as_me:14799: result: $cf_cv_pragma_unreferenced" >&5 + echo "$as_me:14863: result: $cf_cv_pragma_unreferenced" >&5 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6 # if the pragma is supported, use it (needed in the Trace code). @@ -14848,7 +14912,7 @@ case ".$withval" in #(vi withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%` ;; *) - { { echo "$as_me:14851: error: expected a pathname, not \"$withval\"" >&5 + { { echo "$as_me:14915: error: expected a pathname, not \"$withval\"" >&5 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -14888,7 +14952,7 @@ case ".$withval" in #(vi withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%` ;; *) - { { echo "$as_me:14891: error: expected a pathname, not \"$withval\"" >&5 + { { echo "$as_me:14955: error: expected a pathname, not \"$withval\"" >&5 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -14912,7 +14976,7 @@ fi ### chooses to split module lists into libraries. ### ### (see CF_LIB_RULES). -echo "$as_me:14915: checking for library subsets" >&5 +echo "$as_me:14979: checking for library subsets" >&5 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6 LIB_SUBSETS= @@ -14937,7 +15001,7 @@ LIB_SUBSETS="${LIB_SUBSETS}base" test "$with_widec" = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar" test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs" -echo "$as_me:14940: result: $LIB_SUBSETS" >&5 +echo "$as_me:15004: result: $LIB_SUBSETS" >&5 echo "${ECHO_T}$LIB_SUBSETS" >&6 ### Construct the list of include-directories to be generated @@ -14975,7 +15039,7 @@ elif test "$includedir" != "/usr/include"; then fi ### Build up pieces for makefile rules -echo "$as_me:14978: checking default library suffix" >&5 +echo "$as_me:15042: checking default library suffix" >&5 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6 case $DFT_LWR_MODEL in @@ -14986,10 +15050,10 @@ echo $ECHO_N "checking default library suffix... $ECHO_C" >&6 shared) DFT_ARG_SUFFIX='' ;; esac test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}" -echo "$as_me:14989: result: $DFT_ARG_SUFFIX" >&5 +echo "$as_me:15053: result: $DFT_ARG_SUFFIX" >&5 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6 -echo "$as_me:14992: checking default library-dependency suffix" >&5 +echo "$as_me:15056: checking default library-dependency suffix" >&5 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6 case $DFT_LWR_MODEL in @@ -15018,10 +15082,10 @@ if test $DFT_LWR_MODEL = shared ; then ;; esac fi -echo "$as_me:15021: result: $DFT_DEP_SUFFIX" >&5 +echo "$as_me:15085: result: $DFT_DEP_SUFFIX" >&5 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6 -echo "$as_me:15024: checking default object directory" >&5 +echo "$as_me:15088: checking default object directory" >&5 echo $ECHO_N "checking default object directory... $ECHO_C" >&6 case $DFT_LWR_MODEL in @@ -15037,12 +15101,12 @@ echo $ECHO_N "checking default object directory... $ECHO_C" >&6 DFT_OBJ_SUBDIR='obj_s' ;; esac esac -echo "$as_me:15040: result: $DFT_OBJ_SUBDIR" >&5 +echo "$as_me:15104: result: $DFT_OBJ_SUBDIR" >&5 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6 # libtool thinks it can make c++ shared libraries (perhaps only g++) if test "$cf_with_cxx" = yes ; then -echo "$as_me:15045: checking c++ library-dependency suffix" >&5 +echo "$as_me:15109: checking c++ library-dependency suffix" >&5 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6 if test "$with_libtool" != "no"; then CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX @@ -15068,7 +15132,7 @@ else esac test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}" fi -echo "$as_me:15071: result: $CXX_LIB_SUFFIX" >&5 +echo "$as_me:15135: result: $CXX_LIB_SUFFIX" >&5 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6 fi @@ -15160,12 +15224,12 @@ fi # needed for Ada95 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'` -echo "$as_me:15163: checking where we will install curses.h" >&5 +echo "$as_me:15227: checking where we will install curses.h" >&5 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6 test "$with_overwrite" = no && \ test "x$includedir" = 'x${prefix}/include' && \ includedir='${prefix}/include/ncurses'${LIB_SUFFIX} -echo "$as_me:15168: result: $includedir" >&5 +echo "$as_me:15232: result: $includedir" >&5 echo "${ECHO_T}$includedir" >&6 ### Resolve a conflict between normal and wide-curses by forcing applications @@ -15173,7 +15237,7 @@ echo "${ECHO_T}$includedir" >&6 if test "$with_overwrite" != no ; then if test "$NCURSES_LIBUTF8" = 1 ; then NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)' - { echo "$as_me:15176: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5 + { echo "$as_me:15240: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;} fi fi @@ -15189,7 +15253,7 @@ EOF ### Construct the list of subdirectories for which we'll customize makefiles ### with the appropriate compile-rules. -echo "$as_me:15192: checking for src modules" >&5 +echo "$as_me:15256: checking for src modules" >&5 echo $ECHO_N "checking for src modules... $ECHO_C" >&6 # dependencies and linker-arguments for test-programs @@ -15252,7 +15316,7 @@ EOF fi fi done -echo "$as_me:15255: result: $cf_cv_src_modules" >&5 +echo "$as_me:15319: result: $cf_cv_src_modules" >&5 echo "${ECHO_T}$cf_cv_src_modules" >&6 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS" @@ -15502,7 +15566,7 @@ DEFS=-DHAVE_CONFIG_H : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:15505: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:15569: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL @@ -15678,7 +15742,7 @@ cat >>$CONFIG_STATUS <<\EOF echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:15681: error: ambiguous option: $1 + { { echo "$as_me:15745: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} @@ -15697,7 +15761,7 @@ Try \`$0 --help' for more information." >&2;} ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:15700: error: unrecognized option: $1 + -*) { { echo "$as_me:15764: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} @@ -15793,7 +15857,7 @@ do "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;; - *) { { echo "$as_me:15796: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:15860: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -15941,6 +16005,7 @@ s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t s,@cf_list_models@,$cf_list_models,;t t s,@LIBTOOL@,$LIBTOOL,;t t s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t +s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t s,@LIB_CREATE@,$LIB_CREATE,;t t s,@LIB_OBJECT@,$LIB_OBJECT,;t t s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t @@ -16170,7 +16235,7 @@ done; } esac if test x"$ac_file" != x-; then - { echo "$as_me:16173: creating $ac_file" >&5 + { echo "$as_me:16238: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi @@ -16188,7 +16253,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:16191: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:16256: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -16201,7 +16266,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:16204: error: cannot find input file: $f" >&5 + { { echo "$as_me:16269: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -16267,7 +16332,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue * ) ac_file_in=$ac_file.in ;; esac - test x"$ac_file" != x- && { echo "$as_me:16270: creating $ac_file" >&5 + test x"$ac_file" != x- && { echo "$as_me:16335: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the @@ -16278,7 +16343,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:16281: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:16346: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -16291,7 +16356,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:16294: error: cannot find input file: $f" >&5 + { { echo "$as_me:16359: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -16349,7 +16414,7 @@ cat >>$CONFIG_STATUS <<\EOF rm -f $tmp/in if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then - { echo "$as_me:16352: $ac_file is unchanged" >&5 + { echo "$as_me:16417: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ diff --git a/configure.in b/configure.in index d7911209..de761f03 100644 --- a/configure.in +++ b/configure.in @@ -28,14 +28,14 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: configure.in,v 1.413 2007/04/14 19:52:26 tom Exp $ +dnl $Id: configure.in,v 1.414 2007/04/19 20:04:08 tom Exp $ dnl Process this file with autoconf to produce a configure script. dnl dnl See http://invisible-island.net/autoconf/ for additional information. dnl dnl --------------------------------------------------------------------------- AC_PREREQ(2.13.20020210) -AC_REVISION($Revision: 1.413 $) +AC_REVISION($Revision: 1.414 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -1140,6 +1140,7 @@ CF_SYS_TIME_SELECT AC_LANG_C AC_C_CONST AC_C_INLINE +CF_SIG_ATOMIC_T NCURSES_INLINE= if test "$ac_cv_c_inline" != no ; then diff --git a/dist.mk b/dist.mk index 6b93ffde..304261bd 100644 --- a/dist.mk +++ b/dist.mk @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.589 2007/04/14 19:45:21 tom Exp $ +# $Id: dist.mk,v 1.590 2007/04/19 19:47:27 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -37,7 +37,7 @@ SHELL = /bin/sh # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 5 NCURSES_MINOR = 6 -NCURSES_PATCH = 20070414 +NCURSES_PATCH = 20070421 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/form/Makefile.in b/form/Makefile.in index 8370437f..077edcb8 100644 --- a/form/Makefile.in +++ b/form/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.45 2007/03/31 15:46:42 tom Exp $ +# $Id: Makefile.in,v 1.46 2007/04/19 20:14:01 tom Exp $ ############################################################################## # Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # # # @@ -91,7 +91,7 @@ CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@) -LINK = $(LIBTOOL_LINK) $(CC) +LINK = $(LIBTOOL_LINK) LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ SHLIB_DIRS = -L../lib diff --git a/menu/Makefile.in b/menu/Makefile.in index b439de71..8689fb43 100644 --- a/menu/Makefile.in +++ b/menu/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.46 2007/03/31 15:46:42 tom Exp $ +# $Id: Makefile.in,v 1.47 2007/04/19 20:14:11 tom Exp $ ############################################################################## # Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # # # @@ -91,7 +91,7 @@ CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@) -LINK = $(LIBTOOL_LINK) $(CC) +LINK = $(LIBTOOL_LINK) LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ SHLIB_DIRS = -L../lib diff --git a/ncurses/Makefile.in b/ncurses/Makefile.in index 076465c1..b18f1ba9 100644 --- a/ncurses/Makefile.in +++ b/ncurses/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.104 2007/03/31 15:46:42 tom Exp $ +# $Id: Makefile.in,v 1.106 2007/04/22 00:09:18 tom Exp $ ############################################################################## # Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # # # @@ -112,7 +112,7 @@ CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@) -LINK = $(LIBTOOL) $(CC) +LINK = $(LIBTOOL) LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ SHLIB_DIRS = -L../lib @@ -266,17 +266,17 @@ test_progs : $(TEST_PROGS) sh $(base)/MKlib_gen.sh "$(CPP) $(CPPFLAGS)" "$(AWK)" implemented <../include/curses.h >$@ captoinfo$x : $(tinfo)/captoinfo.c $(TEST_DEPS) - @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DMAIN $(tinfo)/captoinfo.c $(TEST_LDFLAGS) + @ECHO_LINK@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DMAIN $(tinfo)/captoinfo.c $(TEST_LDFLAGS) hardscroll$x : $(serial)/hardscroll.c $(TEST_DEPS) - @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DSCROLLDEBUG $(serial)/hardscroll.c $(TEST_LDFLAGS) + @ECHO_LINK@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DSCROLLDEBUG $(serial)/hardscroll.c $(TEST_LDFLAGS) hashmap$x : $(serial)/hashmap.c $(TEST_DEPS) - @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DHASHDEBUG $(serial)/hashmap.c $(TEST_LDFLAGS) + @ECHO_LINK@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DHASHDEBUG $(serial)/hashmap.c $(TEST_LDFLAGS) lib_mvcur$x : $(serial)/lib_mvcur.c $(TEST_DEPS) \ ../@DFT_OBJ_SUBDIR@/dump_entry$o - @ECHO_LINK@ $(CC) -o $@ $(CFLAGS_DEFAULT) -DNCURSES_TEST -I$(serial)/../../progs $(serial)/lib_mvcur.c ../@DFT_OBJ_SUBDIR@/dump_entry$o $(TEST_LDFLAGS) + @ECHO_LINK@ $(LIBTOOL_LINK) -o $@ $(CFLAGS_DEFAULT) -DNCURSES_TEST -I$(serial)/../../progs $(serial)/lib_mvcur.c ../@DFT_OBJ_SUBDIR@/dump_entry$o $(TEST_LDFLAGS) link_test$x : ./link_test.c $(TEST_DEPS) \ ../@DFT_OBJ_SUBDIR@/link_test$o diff --git a/ncurses/base/MKkeyname.awk b/ncurses/base/MKkeyname.awk index 2d449271..b27eb75a 100644 --- a/ncurses/base/MKkeyname.awk +++ b/ncurses/base/MKkeyname.awk @@ -1,4 +1,4 @@ -# $Id: MKkeyname.awk,v 1.31 2007/01/06 21:19:44 Miroslav.Lichvar Exp $ +# $Id: MKkeyname.awk,v 1.32 2007/04/21 23:01:49 tom Exp $ ############################################################################## # Copyright (c) 1999-2006,2007 Free Software Foundation, Inc. # # # @@ -48,7 +48,7 @@ END { print "static const char key_names[] = "names";" print "" print "#define SIZEOF_TABLE 256" - print "static char **keyname_table;" + print "#define MyTable _nc_globals.keyname_table" print "" print "NCURSES_EXPORT(NCURSES_CONST char *) keyname (int c)" print "{" @@ -68,10 +68,10 @@ END { print " }" print "" print " if (result == 0 && (c >= 0 && c < SIZEOF_TABLE)) {" - print " if (keyname_table == 0)" - print " keyname_table = typeCalloc(char *, SIZEOF_TABLE);" - print " if (keyname_table != 0) {" - print " if (keyname_table[c] == 0) {" + print " if (MyTable == 0)" + print " MyTable = typeCalloc(char *, SIZEOF_TABLE);" + print " if (MyTable != 0) {" + print " if (MyTable[c] == 0) {" print " int cc = c;" print " p = name;" print " if (cc >= 128) {" @@ -85,9 +85,9 @@ END { print " strcpy(p, \"^?\");" print " else" print " sprintf(p, \"%c\", cc);" - print " keyname_table[c] = strdup(name);" + print " MyTable[c] = strdup(name);" print " }" - print " result = keyname_table[c];" + print " result = MyTable[c];" print " }" print "#if NCURSES_EXT_FUNCS && NCURSES_XNAMES" print " } else if (result == 0 && cur_term != 0) {" @@ -128,11 +128,11 @@ END { print "void _nc_keyname_leaks(void)" print "{" print " int j;" - print " if (keyname_table != 0) {" + print " if (MyTable != 0) {" print " for (j = 0; j < SIZEOF_TABLE; ++j) {" - print " FreeIfNeeded(keyname_table[j]);" + print " FreeIfNeeded(MyTable[j]);" print " }" - print " FreeAndNull(keyname_table);" + print " FreeAndNull(MyTable);" print " }" print "}" print "#endif /* NO_LEAKS */" diff --git a/ncurses/base/lib_getch.c b/ncurses/base/lib_getch.c index 670ac39e..d8906dae 100644 --- a/ncurses/base/lib_getch.c +++ b/ncurses/base/lib_getch.c @@ -41,7 +41,7 @@ #include -MODULE_ID("$Id: lib_getch.c,v 1.78 2007/03/10 19:22:28 tom Exp $") +MODULE_ID("$Id: lib_getch.c,v 1.79 2007/04/19 20:57:49 tom Exp $") #include @@ -391,7 +391,7 @@ _nc_wgetch(WINDOW *win, if (ch == ERR) { #if USE_SIZECHANGE - if (SP->_sig_winch) { + if (_nc_handle_sigwinch(FALSE)) { _nc_update_screensize(); /* resizeterm can push KEY_RESIZE */ if (cooked_key_in_fifo()) { diff --git a/ncurses/base/lib_initscr.c b/ncurses/base/lib_initscr.c index d2ae2819..38744738 100644 --- a/ncurses/base/lib_initscr.c +++ b/ncurses/base/lib_initscr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -45,19 +45,18 @@ #include /* needed for ISC */ #endif -MODULE_ID("$Id: lib_initscr.c,v 1.34 2005/10/22 20:30:38 tom Exp $") +MODULE_ID("$Id: lib_initscr.c,v 1.35 2007/04/21 20:43:02 tom Exp $") NCURSES_EXPORT(WINDOW *) initscr(void) { - static bool initialized = FALSE; NCURSES_CONST char *name; START_TRACE(); T((T_CALLED("initscr()"))); /* Portable applications must not call initscr() more than once */ - if (!initialized) { - initialized = TRUE; + if (!_nc_globals.init_screen) { + _nc_globals.init_screen = TRUE; if ((name = getenv("TERM")) == 0 || *name == '\0') diff --git a/ncurses/base/lib_newterm.c b/ncurses/base/lib_newterm.c index d7235d29..05cd9b8a 100644 --- a/ncurses/base/lib_newterm.c +++ b/ncurses/base/lib_newterm.c @@ -48,7 +48,7 @@ #include /* clear_screen, cup & friends, cur_term */ #include -MODULE_ID("$Id: lib_newterm.c,v 1.65 2007/03/10 23:39:27 tom Exp $") +MODULE_ID("$Id: lib_newterm.c,v 1.67 2007/04/21 20:47:32 tom Exp $") #ifndef ONLCR /* Allows compilation under the QNX 4.2 OS */ #define ONLCR 0 @@ -94,14 +94,12 @@ _nc_initscr(void) * aside from possibly delaying a filter() call until some terminals have been * initialized. */ -static bool filter_mode = FALSE; - NCURSES_EXPORT(void) filter(void) { START_TRACE(); T((T_CALLED("filter"))); - filter_mode = TRUE; + _nc_prescreen.filter_mode = TRUE; returnVoid; } @@ -115,7 +113,7 @@ nofilter(void) { START_TRACE(); T((T_CALLED("nofilter"))); - filter_mode = FALSE; + _nc_prescreen.filter_mode = FALSE; returnVoid; } #endif @@ -132,8 +130,6 @@ newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp) START_TRACE(); T((T_CALLED("newterm(\"%s\",%p,%p)"), name, ofp, ifp)); - _nc_handle_sigwinch(0); - /* this loads the capability entry, then sets LINES and COLS */ if (setupterm(name, fileno(ofp), &errret) == ERR) { result = 0; @@ -154,7 +150,11 @@ newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp) #endif } - if (_nc_setupscreen(LINES, COLS, ofp, filter_mode, slk_format) == ERR) { + if (_nc_setupscreen(LINES, + COLS, + ofp, + _nc_prescreen.filter_mode, + slk_format) == ERR) { _nc_set_screen(current); result = 0; } else { @@ -216,6 +216,5 @@ newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp) result = SP; } } - _nc_handle_sigwinch(1); returnSP(result); } diff --git a/ncurses/base/lib_restart.c b/ncurses/base/lib_restart.c index ca27a0fc..31719093 100644 --- a/ncurses/base/lib_restart.c +++ b/ncurses/base/lib_restart.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -48,7 +48,7 @@ #include /* lines, columns, cur_term */ -MODULE_ID("$Id: lib_restart.c,v 1.6 2006/01/14 15:58:23 tom Exp $") +MODULE_ID("$Id: lib_restart.c,v 1.7 2007/04/19 21:05:25 tom Exp $") NCURSES_EXPORT(int) restartterm(NCURSES_CONST char *termp, int filenum, int *errret) @@ -61,7 +61,6 @@ restartterm(NCURSES_CONST char *termp, int filenum, int *errret) T((T_CALLED("restartterm(%s,%d,%p)"), termp, filenum, errret)); - _nc_handle_sigwinch(0); if (setupterm(termp, filenum, errret) != OK) { result = ERR; } else { @@ -94,6 +93,5 @@ restartterm(NCURSES_CONST char *termp, int filenum, int *errret) result = OK; } - _nc_handle_sigwinch(1); returnCode(result); } diff --git a/ncurses/base/lib_set_term.c b/ncurses/base/lib_set_term.c index 42638304..e94e3c7a 100644 --- a/ncurses/base/lib_set_term.c +++ b/ncurses/base/lib_set_term.c @@ -44,7 +44,7 @@ #include /* cur_term */ #include -MODULE_ID("$Id: lib_set_term.c,v 1.95 2007/03/10 23:52:01 tom Exp $") +MODULE_ID("$Id: lib_set_term.c,v 1.96 2007/04/21 20:51:44 tom Exp $") NCURSES_EXPORT(SCREEN *) set_term(SCREEN *screenp) @@ -166,8 +166,6 @@ delscreen(SCREEN *sp) returnVoid; } -static ripoff_t rippedoff[5]; -static ripoff_t *rsp = rippedoff; #define N_RIPS SIZEOF(SP->_rippedoff) static bool @@ -218,6 +216,9 @@ extract_fgbg(char *src, int *result) } #endif +#define ripoff_sp _nc_prescreen.rsp +#define ripoff_stack _nc_prescreen.rippedoff + /* OS-independent screen initializations */ NCURSES_EXPORT(int) _nc_setupscreen(int slines GCC_UNUSED, @@ -548,15 +549,22 @@ _nc_setupscreen(int slines GCC_UNUSED, def_shell_mode(); def_prog_mode(); - for (i = 0, rsp = rippedoff; rsp->line && (i < (int) N_RIPS); rsp++, i++) { - T(("ripping off line %d at %s", i, rsp->line < 0 ? "bottom" : "top")); - SP->_rippedoff[i] = rippedoff[i]; - if (rsp->hook) { - int count = (rsp->line < 0) ? -rsp->line : rsp->line; + for (i = 0, ripoff_sp = ripoff_stack; + ripoff_sp->line && (i < (int) N_RIPS); + ripoff_sp++, i++) { + + T(("ripping off line %d at %s", i, + ((ripoff_sp->line < 0) + ? "bottom" + : "top"))); + + SP->_rippedoff[i] = ripoff_stack[i]; + if (ripoff_sp->hook) { + int count = (ripoff_sp->line < 0) ? -ripoff_sp->line : ripoff_sp->line; SP->_rippedoff[i].w = newwin(count, scolumns, - ((rsp->line < 0) + ((ripoff_sp->line < 0) ? SP->_lines_avail - count : 0), 0); @@ -564,17 +572,17 @@ _nc_setupscreen(int slines GCC_UNUSED, SP->_rippedoff[i].hook(SP->_rippedoff[i].w, scolumns); else returnCode(ERR); - if (rsp->line < 0) + if (ripoff_sp->line < 0) bottom_stolen += count; else SP->_topstolen += count; SP->_lines_avail -= count; } - rsp->line = 0; + ripoff_sp->line = 0; } SP->_rip_count = i; /* reset the stack */ - rsp = rippedoff; + ripoff_sp = ripoff_stack; T(("creating stdscr")); assert((SP->_lines_avail + SP->_topstolen + bottom_stolen) == slines); @@ -600,13 +608,13 @@ _nc_ripoffline(int line, int (*init) (WINDOW *, int)) if (line != 0) { - if (rsp >= rippedoff + N_RIPS) + if (ripoff_sp >= ripoff_stack + N_RIPS) returnCode(ERR); - rsp->line = line; - rsp->hook = init; - rsp->w = 0; - rsp++; + ripoff_sp->line = line; + ripoff_sp->hook = init; + ripoff_sp->w = 0; + ripoff_sp++; } returnCode(OK); diff --git a/ncurses/base/safe_sprintf.c b/ncurses/base/safe_sprintf.c index 81fe44f0..8fc5d89d 100644 --- a/ncurses/base/safe_sprintf.c +++ b/ncurses/base/safe_sprintf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2003 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -33,7 +33,7 @@ #include #include -MODULE_ID("$Id: safe_sprintf.c,v 1.18 2003/08/09 21:52:04 tom Exp $") +MODULE_ID("$Id: safe_sprintf.c,v 1.20 2007/04/21 22:28:06 tom Exp $") #if USE_SAFE_SPRINTF @@ -207,56 +207,58 @@ _nc_printf_length(const char *fmt, va_list ap) } #endif +#define my_buffer _nc_globals.safeprint_buf +#define my_length _nc_globals.safeprint_used + /* * Wrapper for vsprintf that allocates a buffer big enough to hold the result. */ NCURSES_EXPORT(char *) _nc_printf_string(const char *fmt, va_list ap) { - static char *buf; - static size_t used; char *result = 0; if (fmt != 0) { #if USE_SAFE_SPRINTF int len = _nc_printf_length(fmt, ap); - if ((int) used < len + 1) { - used = 2 * (len + 1); - buf = typeRealloc(char, used, buf); + if ((int) my_length < len + 1) { + my_length = 2 * (len + 1); + my_buffer = typeRealloc(char, my_length, my_buffer); } - if (buf != 0) { - *buf = '\0'; + if (my_buffer != 0) { + *my_buffer = '\0'; if (len >= 0) { - vsprintf(buf, fmt, ap); + vsprintf(my_buffer, fmt, ap); } - result = buf; + result = my_buffer; } #else - static int rows, cols; +#define MyCols _nc_globals.safeprint_cols +#define MyRows _nc_globals.safeprint_rows - if (screen_lines > rows || screen_columns > cols) { - if (screen_lines > rows) - rows = screen_lines; - if (screen_columns > cols) - cols = screen_columns; - used = (rows * (cols + 1)) + 1; - buf = typeRealloc(char, used, buf); + if (screen_lines > MyRows || screen_columns > MyCols) { + if (screen_lines > MyRows) + MyRows = screen_lines; + if (screen_columns > MyCols) + MyCols = screen_columns; + my_length = (MyRows * (MyCols + 1)) + 1; + my_buffer = typeRealloc(char, my_length, my_buffer); } - if (buf != 0) { + if (my_buffer != 0) { # if HAVE_VSNPRINTF - vsnprintf(buf, used, fmt, ap); /* GNU extension */ + vsnprintf(my_buffer, my_length, fmt, ap); /* GNU extension */ # else - vsprintf(buf, fmt, ap); /* ANSI */ + vsprintf(my_buffer, fmt, ap); /* ANSI */ # endif - result = buf; + result = my_buffer; } #endif - } else if (buf != 0) { /* see _nc_freeall() */ - free(buf); - buf = 0; - used = 0; + } else if (my_buffer != 0) { /* see _nc_freeall() */ + free(my_buffer); + my_buffer = 0; + my_length = 0; } return result; } diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index 81340c87..80dbdb2b 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -34,7 +34,7 @@ /* - * $Id: curses.priv.h,v 1.325 2007/03/10 23:43:50 tom Exp $ + * $Id: curses.priv.h,v 1.330 2007/04/21 23:52:28 tom Exp $ * * curses.priv.h * @@ -407,6 +407,156 @@ typedef int (*TYPE_Gpm_GetEvent) (Gpm_Event *); #endif /* HAVE_LIBDL */ #endif /* USE_GPM_SUPPORT */ +typedef struct { + long sequence; + bool last_used; + char *fix_sgr0; /* this holds the filtered sgr0 string */ + char *last_bufp; /* help with fix_sgr0 leak */ + TERMINAL *last_term; +} TGETENT_CACHE; + +#define TGETENT_MAX 4 + +/* + * State of tparm(). + */ +#define STACKSIZE 20 + +typedef struct { + union { + int num; + char *str; + } data; + bool num_type; +} STACK_FRAME; + +#define NUM_VARS 26 + +typedef struct { +#ifdef TRACE + const char *tname; +#endif + const char *tparam_base; + + STACK_FRAME stack[STACKSIZE]; + int stack_ptr; + + char *out_buff; + size_t out_size; + size_t out_used; + + char *fmt_buff; + size_t fmt_size; + + int dynamic_var[NUM_VARS]; + int static_vars[NUM_VARS]; +} TPARM_STATE; + +typedef struct { + char *text; + size_t size; +} TRACEBUF; + +/* + * TRACEMSE_FMT is no longer than 80 columns, there are 5 numbers that + * could at most have 10 digits, and the mask contains no more than 32 bits + * with each bit representing less than 15 characters. Usually the whole + * string is less than 80 columns, but this buffer size is an absolute + * limit. + */ +#define TRACEMSE_MAX (80 + (5 * 10) + (32 * 15)) +#define TRACEMSE_FMT "id %2d at (%2d, %2d, %2d) state %4lx = {" /* } */ + +/* + * Global data which is not specific to a screen. + */ +typedef struct { + SIG_ATOMIC_T have_sigwinch; + SIG_ATOMIC_T cleanup_nested; + + bool init_signals; + bool init_screen; + + const char *comp_sourcename; + char *comp_termtype; + + bool have_tic_directory; + bool keep_tic_directory; + const char *tic_directory; + + char *dbi_list; + int dbi_size; + + char *first_name; + char **keyname_table; + + char *safeprint_buf; + size_t safeprint_used; + + TGETENT_CACHE tgetent_cache[TGETENT_MAX]; + int tgetent_index; + long tgetent_sequence; + +#if USE_HOME_TERMINFO + char *home_terminfo; +#endif + +#if !USE_SAFE_SPRINTF + int safeprint_cols; + int safeprint_rows; +#endif + +#ifdef TRACE + bool init_trace; + char trace_fname[PATH_MAX]; + int trace_level; + FILE *trace_fp; + + char *tracearg_buf; + size_t tracearg_used; + + TRACEBUF *tracebuf_ptr; + size_t tracebuf_used; + + char tracechr_buf[40]; + + char *tracedmp_buf; + size_t tracedmp_used; + + char tracemse_buf[TRACEMSE_MAX]; + + unsigned char *tracetry_buf; + size_t tracetry_used; + +#ifndef USE_TERMLIB + char traceatr_color_buf[2][80]; + int traceatr_color_sel; + int traceatr_color_last; +#endif /* USE_TERMLIB */ + +#endif /* TRACE */ +} NCURSES_GLOBALS; + +extern NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals; + +/* + * Global data which is swept up into a SCREEN when one is created. + * It may be modified before the next SCREEN is created. + */ +typedef struct { + bool use_env; + bool filter_mode; + attr_t previous_attr; + ripoff_t rippedoff[5]; + ripoff_t *rsp; + TPARM_STATE tparm_state; +#if BROKEN_LINKER || USE_REENTRANT + chtype *real_acs_map; +#endif +} NCURSES_PRESCREEN; + +extern NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen; + /* * The SCREEN structure. */ @@ -639,6 +789,7 @@ struct screen { }; extern NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain; +extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; WINDOWLIST { WINDOW win; /* first, so WINDOW_EXT() works */ diff --git a/ncurses/tinfo/comp_error.c b/ncurses/tinfo/comp_error.c index 015f3488..56c362a4 100644 --- a/ncurses/tinfo/comp_error.c +++ b/ncurses/tinfo/comp_error.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2002,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -41,36 +41,36 @@ #include -MODULE_ID("$Id: comp_error.c,v 1.30 2005/11/26 15:28:47 tom Exp $") +MODULE_ID("$Id: comp_error.c,v 1.31 2007/04/21 23:38:32 tom Exp $") NCURSES_EXPORT_VAR(bool) _nc_suppress_warnings = FALSE; NCURSES_EXPORT_VAR(int) _nc_curr_line = 0; /* current line # in input */ NCURSES_EXPORT_VAR(int) _nc_curr_col = 0; /* current column # in input */ -static const char *sourcename; -static char *termtype; +#define SourceName _nc_globals.comp_sourcename +#define TermType _nc_globals.comp_termtype NCURSES_EXPORT(const char *) _nc_get_source(void) { - return sourcename; + return SourceName; } NCURSES_EXPORT(void) _nc_set_source(const char *const name) { - sourcename = name; + SourceName = name; } NCURSES_EXPORT(void) _nc_set_type(const char *const name) { - if (termtype == 0) - termtype = typeMalloc(char, MAX_NAME_SIZE + 1); - if (termtype != 0) { - termtype[0] = '\0'; + if (TermType == 0) + TermType = typeMalloc(char, MAX_NAME_SIZE + 1); + if (TermType != 0) { + TermType[0] = '\0'; if (name) - strncat(termtype, name, MAX_NAME_SIZE); + strncat(TermType, name, MAX_NAME_SIZE); } } @@ -78,25 +78,25 @@ NCURSES_EXPORT(void) _nc_get_type(char *name) { #if NO_LEAKS - if (name == 0 && termtype != 0) { - FreeAndNull(termtype); + if (name == 0 && TermType != 0) { + FreeAndNull(TermType); return; } #endif if (name != 0) - strcpy(name, termtype != 0 ? termtype : ""); + strcpy(name, TermType != 0 ? TermType : ""); } static NCURSES_INLINE void where_is_problem(void) { - fprintf(stderr, "\"%s\"", sourcename); + fprintf(stderr, "\"%s\"", SourceName ? SourceName : "?"); if (_nc_curr_line >= 0) fprintf(stderr, ", line %d", _nc_curr_line); if (_nc_curr_col >= 0) fprintf(stderr, ", col %d", _nc_curr_col); - if (termtype != 0 && termtype[0] != '\0') - fprintf(stderr, ", terminal '%s'", termtype); + if (TermType != 0 && TermType[0] != '\0') + fprintf(stderr, ", terminal '%s'", TermType); fputc(':', stderr); fputc(' ', stderr); } diff --git a/ncurses/tinfo/db_iterator.c b/ncurses/tinfo/db_iterator.c index e69aa5e1..fdc2bb09 100644 --- a/ncurses/tinfo/db_iterator.c +++ b/ncurses/tinfo/db_iterator.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2006 Free Software Foundation, Inc. * + * Copyright (c) 2006,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -27,7 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Thomas E. Dickey 2006 * + * Author: Thomas E. Dickey * ****************************************************************************/ /* @@ -38,10 +38,11 @@ #include -MODULE_ID("$Id: db_iterator.c,v 1.5 2006/12/16 19:06:42 tom Exp $") +MODULE_ID("$Id: db_iterator.c,v 1.6 2007/04/22 00:00:26 tom Exp $") -static bool have_tic_directory = FALSE; -static bool keep_tic_directory = FALSE; +#define HaveTicDirectory _nc_globals.have_tic_directory +#define KeepTicDirectory _nc_globals.keep_tic_directory +#define TicDirectory _nc_globals.tic_directory /* * Record the "official" location of the terminfo directory, according to @@ -50,19 +51,17 @@ static bool keep_tic_directory = FALSE; NCURSES_EXPORT(const char *) _nc_tic_dir(const char *path) { - static const char *result = TERMINFO; - - if (!keep_tic_directory) { + if (!KeepTicDirectory) { if (path != 0) { - result = path; - have_tic_directory = TRUE; - } else if (!have_tic_directory && use_terminfo_vars()) { + TicDirectory = path; + HaveTicDirectory = TRUE; + } else if (!HaveTicDirectory && use_terminfo_vars()) { char *envp; if ((envp = getenv("TERMINFO")) != 0) return _nc_tic_dir(envp); } } - return result; + return TicDirectory; } /* @@ -74,16 +73,15 @@ NCURSES_EXPORT(void) _nc_keep_tic_dir(const char *path) { _nc_tic_dir(path); - keep_tic_directory = TRUE; + KeepTicDirectory = TRUE; } /* * Process the list of :-separated directories, looking for the terminal type. * We don't use strtok because it does not show us empty tokens. */ - -static char *this_db_list = 0; -static int size_db_list; +#define ThisDbList _nc_globals.dbi_list +#define ThisDbSize _nc_globals.dbi_size /* * Cleanup. @@ -91,10 +89,10 @@ static int size_db_list; NCURSES_EXPORT(void) _nc_last_db(void) { - if (this_db_list != 0) { - FreeAndNull(this_db_list); + if (ThisDbList != 0) { + FreeAndNull(ThisDbList); } - size_db_list = 0; + ThisDbSize = 0; } /* The TERMINFO_DIRS value, if defined by the configure script, begins with a @@ -104,14 +102,14 @@ static const char * next_list_item(const char *source, int *offset) { if (source != 0) { - FreeIfNeeded(this_db_list); - this_db_list = strdup(source); - size_db_list = strlen(source); + FreeIfNeeded(ThisDbList); + ThisDbList = strdup(source); + ThisDbSize = strlen(source); } - if (this_db_list != 0 && size_db_list && *offset < size_db_list) { + if (ThisDbList != 0 && ThisDbSize && *offset < ThisDbSize) { static char system_db[] = TERMINFO; - char *result = this_db_list + *offset; + char *result = ThisDbList + *offset; char *marker = strchr(result, NCURSES_PATHSEP); /* @@ -124,9 +122,9 @@ next_list_item(const char *source, int *offset) marker = result + *offset; } else { *marker++ = 0; - *offset = marker - this_db_list; + *offset = marker - ThisDbList; } - if (*result == 0 && result != (this_db_list + size_db_list)) + if (*result == 0 && result != (ThisDbList + ThisDbSize)) result = system_db; return result; } @@ -153,7 +151,7 @@ _nc_next_db(DBDIRS * state, int *offset) switch (*state) { case dbdTIC: - if (have_tic_directory) + if (HaveTicDirectory) result = _nc_tic_dir(0); break; #if USE_DATABASE diff --git a/ncurses/tinfo/home_terminfo.c b/ncurses/tinfo/home_terminfo.c index ce6576a8..92c26705 100644 --- a/ncurses/tinfo/home_terminfo.c +++ b/ncurses/tinfo/home_terminfo.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -27,7 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Thomas E. Dickey 1998,2000,2004,2005 * + * Author: Thomas E. Dickey * ****************************************************************************/ /* @@ -37,31 +37,32 @@ #include #include -MODULE_ID("$Id: home_terminfo.c,v 1.9 2005/07/02 19:43:38 tom Exp $") +MODULE_ID("$Id: home_terminfo.c,v 1.10 2007/04/21 23:11:53 tom Exp $") #define my_length (strlen(home) + sizeof(PRIVATE_INFO)) /* ncurses extension...fall back on user's private directory */ +#define MyBuffer _nc_globals.home_terminfo + NCURSES_EXPORT(char *) _nc_home_terminfo(void) { char *result = 0; -#ifdef USE_HOME_TERMINFO +#if USE_HOME_TERMINFO char *home; - static char *temp = 0; if (use_terminfo_vars()) { - if (temp == 0) { + if (MyBuffer == 0) { if ((home = getenv("HOME")) != 0 && my_length <= PATH_MAX) { - temp = typeMalloc(char, my_length); - if (temp == 0) + MyBuffer = typeMalloc(char, my_length); + if (MyBuffer == 0) _nc_err_abort(MSG_NO_MEMORY); - (void) sprintf(temp, PRIVATE_INFO, home); + (void) sprintf(MyBuffer, PRIVATE_INFO, home); } } - result = temp; + result = MyBuffer; } #endif return result; diff --git a/ncurses/tinfo/lib_acs.c b/ncurses/tinfo/lib_acs.c index 347014fe..b7909f05 100644 --- a/ncurses/tinfo/lib_acs.c +++ b/ncurses/tinfo/lib_acs.c @@ -35,17 +35,18 @@ #include #include /* ena_acs, acs_chars */ -MODULE_ID("$Id: lib_acs.c,v 1.32 2007/03/10 18:47:26 tom Exp $") +MODULE_ID("$Id: lib_acs.c,v 1.33 2007/04/21 23:31:24 tom Exp $") #if BROKEN_LINKER || USE_REENTRANT +#define MyBuffer _nc_prescreen.real_acs_map NCURSES_EXPORT_VAR(chtype *) _nc_acs_map(void) { - static chtype *the_map = 0; - if (the_map == 0) - the_map = typeCalloc(chtype, ACS_LEN); - return the_map; + if (MyBuffer == 0) + MyBuffer = typeCalloc(chtype, ACS_LEN); + return MyBuffer; } +#undef MyBuffer #else NCURSES_EXPORT_VAR(chtype) acs_map[ACS_LEN] = { diff --git a/ncurses/tinfo/lib_data.c b/ncurses/tinfo/lib_data.c index 6b2a2015..f7e6ef4d 100644 --- a/ncurses/tinfo/lib_data.c +++ b/ncurses/tinfo/lib_data.c @@ -41,7 +41,7 @@ #include -MODULE_ID("$Id: lib_data.c,v 1.19 2007/03/10 19:31:27 tom Exp $") +MODULE_ID("$Id: lib_data.c,v 1.24 2007/04/21 23:55:13 tom Exp $") /* * OS/2's native linker complains if we don't initialize public data when @@ -105,3 +105,113 @@ _nc_set_screen(SCREEN *sp) #else NCURSES_EXPORT_VAR(SCREEN *) SP = NULL; /* Some linkers require initialized data... */ #endif +/* *INDENT-OFF* */ +#define CHARS_0s { '\0' } + +#define TGETENT_0 { 0L, FALSE, NULL, NULL, NULL } +#define TGETENT_0s { TGETENT_0, TGETENT_0, TGETENT_0, TGETENT_0 } + +NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals = { + 0, /* have_sigwinch */ + 0, /* cleanup_nested */ + + FALSE, /* init_signals */ + FALSE, /* init_screen */ + + NULL, /* comp_sourcename */ + NULL, /* comp_termtype */ + + FALSE, /* have_tic_directory */ + FALSE, /* keep_tic_directory */ + TERMINFO, /* tic_directory */ + + NULL, /* dbi_list */ + 0, /* dbi_size */ + + NULL, /* first_name */ + NULL, /* keyname_table */ + + NULL, /* safeprint_buf */ + 0, /* safeprint_used */ + + TGETENT_0s, /* tgetent_cache */ + 0, /* tgetent_index */ + 0, /* tgetent_sequence */ + +#if USE_HOME_TERMINFO + NULL, /* home_terminfo */ +#endif + +#if !USE_SAFE_SPRINTF + 0, /* safeprint_cols */ + 0, /* safeprint_rows */ +#endif + +#ifdef TRACE + FALSE, /* init_trace */ + CHARS_0s, /* trace_fname */ + 0, /* trace_level */ + NULL, /* trace_fp */ + + NULL, /* tracearg_buf */ + 0, /* tracearg_used */ + + NULL, /* tracebuf_ptr */ + 0, /* tracebuf_used */ + + CHARS_0s, /* tracechr_buf */ + + NULL, /* tracedmp_buf */ + 0, /* tracedmp_used */ + + CHARS_0s, /* tracemse_buf */ + + NULL, /* tracetry_buf */ + 0, /* tracetry_used */ + +#ifndef USE_TERMLIB + { CHARS_0s, CHARS_0s }, /* traceatr_color_buf */ + 0, /* traceatr_color_sel */ + -1, /* traceatr_color_last */ +#endif /* USE_TERMLIB */ + +#endif /* TRACE */ +}; + +#define STACK_FRAME_0 { { 0 }, 0 } +#define STACK_FRAME_0s { STACK_FRAME_0 } +#define NUM_VARS_0s { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } + +#define RIPOFF_0 { 0,0,0 } +#define RIPOFF_0s { RIPOFF_0 } + +NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen = { + TRUE, /* use_env */ + FALSE, /* filter_mode */ + A_NORMAL, /* previous_attr */ + RIPOFF_0s, /* ripoff */ + NULL, /* rsp */ + { /* tparm_state */ +#ifdef TRACE + NULL, /* tname */ +#endif + NULL, /* tparam_base */ + + STACK_FRAME_0s, /* stack */ + 0, /* stack_ptr */ + + NULL, /* out_buff */ + 0, /* out_size */ + 0, /* out_used */ + + NULL, /* fmt_buff */ + 0, /* fmt_size */ + + NUM_VARS_0s, /* dynamic_var */ + NUM_VARS_0s, /* static_vars */ + }, +#if BROKEN_LINKER || USE_REENTRANT + NULL, /* real_acs_map */ +#endif +}; +/* *INDENT-ON* */ diff --git a/ncurses/tinfo/lib_setup.c b/ncurses/tinfo/lib_setup.c index 1e380d15..9a49ee74 100644 --- a/ncurses/tinfo/lib_setup.c +++ b/ncurses/tinfo/lib_setup.c @@ -53,7 +53,7 @@ #include /* lines, columns, cur_term */ -MODULE_ID("$Id: lib_setup.c,v 1.96 2007/03/10 23:36:05 tom Exp $") +MODULE_ID("$Id: lib_setup.c,v 1.98 2007/04/21 19:57:42 tom Exp $") /**************************************************************************** * @@ -127,50 +127,28 @@ NCURSES_EXPORT_VAR(int) COLS = 0; NCURSES_EXPORT_VAR(int) TABSIZE = 0; #endif -static int _use_env = TRUE; - #if USE_SIGWINCH -int -_nc_handle_sigwinch(int enable) +/* + * If we have a pending SIGWINCH, set the flag in each screen. + */ +NCURSES_EXPORT(int) +_nc_handle_sigwinch(int update) { - static int have_sigwinch = 0; /* initially no SIGWINCH's */ - static int can_resizeall = 1; /* initially enabled */ SCREEN *scan; - int result; - - switch (enable) { - default: - /* record a SIGWINCH */ - have_sigwinch = 1; - break; - case 0: - /* temporarily disable the next block */ - --can_resizeall; - break; - case 1: - /* temporarily enable the next block */ - ++can_resizeall; - break; - } - /* - * If we have a pending SIGWINCH, set the flag in each screen. - * But do this only if the block is enabled. - */ - if (can_resizeall-- >= 0) { /* test and disable */ - if (have_sigwinch) { - scan = _nc_screen_chain; - while (scan) { - scan->_sig_winch = TRUE; - scan = scan->_next_screen; - } - have_sigwinch = 0; + (void) update; /* no longer used */ + + if (_nc_globals.have_sigwinch) { + _nc_globals.have_sigwinch = 0; + + scan = _nc_screen_chain; + while (scan) { + scan->_sig_winch = TRUE; + scan = scan->_next_screen; } } - result = can_resizeall + 1; /* reenable (unless disables are nested) */ - can_resizeall = result; - return result; + return (SP ? SP->_sig_winch : 0); } #endif @@ -179,11 +157,11 @@ NCURSES_EXPORT(void) use_env(bool f) { T((T_CALLED("use_env()"))); - _use_env = f; + _nc_prescreen.use_env = f; returnVoid; } -void +NCURSES_EXPORT(void) _nc_get_screensize(int *linep, int *colp) /* Obtain lines/columns values from the environment and/or terminfo entry */ { @@ -192,8 +170,7 @@ _nc_get_screensize(int *linep, int *colp) /* figure out the size of the screen */ T(("screen size: terminfo lines = %d columns = %d", lines, columns)); - _nc_handle_sigwinch(0); - if (!_use_env) { + if (!_nc_prescreen.use_env) { *linep = (int) lines; *colp = (int) columns; } else { /* usually want to query LINES and COLUMNS from environment */ @@ -271,7 +248,6 @@ _nc_get_screensize(int *linep, int *colp) lines = (short) (*linep); columns = (short) (*colp); } - _nc_handle_sigwinch(1); T(("screen size is %dx%d", *linep, *colp)); diff --git a/ncurses/tinfo/lib_termcap.c b/ncurses/tinfo/lib_termcap.c index 111fecd0..8459266b 100644 --- a/ncurses/tinfo/lib_termcap.c +++ b/ncurses/tinfo/lib_termcap.c @@ -45,28 +45,20 @@ #include -MODULE_ID("$Id: lib_termcap.c,v 1.59 2007/01/28 00:33:11 tom Exp $") +MODULE_ID("$Id: lib_termcap.c,v 1.60 2007/04/21 22:23:46 tom Exp $") NCURSES_EXPORT_VAR(char *) UP = 0; NCURSES_EXPORT_VAR(char *) BC = 0; -typedef struct { - long sequence; - bool last_used; - char *fix_sgr0; /* this holds the filtered sgr0 string */ - char *last_bufp; /* help with fix_sgr0 leak */ - TERMINAL *last_term; -} CACHE; +#define MyCache _nc_globals.tgetent_cache +#define CacheInx _nc_globals.tgetent_index +#define CacheSeq _nc_globals.tgetent_sequence -#define MAX_CACHE 4 -static CACHE cache[MAX_CACHE]; -static int in_cache = 0; - -#define FIX_SGR0 cache[in_cache].fix_sgr0 -#define LAST_TRM cache[in_cache].last_term -#define LAST_BUF cache[in_cache].last_bufp -#define LAST_USE cache[in_cache].last_used -#define LAST_SEQ cache[in_cache].sequence +#define FIX_SGR0 MyCache[CacheInx].fix_sgr0 +#define LAST_TRM MyCache[CacheInx].last_term +#define LAST_BUF MyCache[CacheInx].last_bufp +#define LAST_USE MyCache[CacheInx].last_used +#define LAST_SEQ MyCache[CacheInx].sequence /*************************************************************************** * @@ -86,8 +78,6 @@ static int in_cache = 0; NCURSES_EXPORT(int) tgetent(char *bufp, const char *name) { - static long sequence; - int errcode; int n; bool found_cache = FALSE; @@ -109,10 +99,10 @@ tgetent(char *bufp, const char *name) * caller-supplied buffers, can have multiple terminal descriptions in * use at a given time. */ - for (n = 0; n < MAX_CACHE; ++n) { - bool same_result = (cache[n].last_used && cache[n].last_bufp == bufp); + for (n = 0; n < TGETENT_MAX; ++n) { + bool same_result = (MyCache[n].last_used && MyCache[n].last_bufp == bufp); if (same_result) { - in_cache = n; + CacheInx = n; if (FIX_SGR0 != 0) { FreeAndNull(FIX_SGR0); } @@ -122,10 +112,10 @@ tgetent(char *bufp, const char *name) if (LAST_TRM != 0 && LAST_TRM != cur_term) { TERMINAL *trm = LAST_TRM; del_curterm(LAST_TRM); - for (in_cache = 0; in_cache < MAX_CACHE; ++in_cache) + for (CacheInx = 0; CacheInx < TGETENT_MAX; ++CacheInx) if (LAST_TRM == trm) LAST_TRM = 0; - in_cache = n; + CacheInx = n; } found_cache = TRUE; break; @@ -134,15 +124,15 @@ tgetent(char *bufp, const char *name) if (!found_cache) { int best = 0; - for (in_cache = 0; in_cache < MAX_CACHE; ++in_cache) { - if (LAST_SEQ < cache[best].sequence) { - best = in_cache; + for (CacheInx = 0; CacheInx < TGETENT_MAX; ++CacheInx) { + if (LAST_SEQ < MyCache[best].sequence) { + best = CacheInx; } } - in_cache = best; + CacheInx = best; } LAST_TRM = cur_term; - LAST_SEQ = ++sequence; + LAST_SEQ = ++CacheSeq; PC = 0; UP = 0; @@ -291,7 +281,7 @@ tgetstr(NCURSES_CONST char *id, char **area) NCURSES_EXPORT(void) _nc_tgetent_leaks(void) { - for (in_cache = 0; in_cache < MAX_CACHE; ++in_cache) { + for (CacheInx = 0; CacheInx < TGETENT_MAX; ++CacheInx) { FreeIfNeeded(FIX_SGR0); del_curterm(LAST_TRM); } diff --git a/ncurses/tinfo/lib_tparm.c b/ncurses/tinfo/lib_tparm.c index 4ff98679..6a19ab9f 100644 --- a/ncurses/tinfo/lib_tparm.c +++ b/ncurses/tinfo/lib_tparm.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -43,7 +43,7 @@ #include #include -MODULE_ID("$Id: lib_tparm.c,v 1.72 2006/12/30 20:14:43 tom Exp $") +MODULE_ID("$Id: lib_tparm.c,v 1.73 2007/04/21 20:43:19 tom Exp $") /* * char * @@ -105,43 +105,9 @@ MODULE_ID("$Id: lib_tparm.c,v 1.72 2006/12/30 20:14:43 tom Exp $") * resulting in x mod y, not the reverse. */ -#define STACKSIZE 20 - -typedef struct { - union { - int num; - char *str; - } data; - bool num_type; -} stack_frame; - NCURSES_EXPORT_VAR(int) _nc_tparm_err = 0; -#define NUM_VARS 26 - -typedef struct { -#ifdef TRACE - const char *tname; -#endif - const char *tparam_base; - - stack_frame stack[STACKSIZE]; - int stack_ptr; - - char *out_buff; - size_t out_size; - size_t out_used; - - char *fmt_buff; - size_t fmt_size; - - int dynamic_var[NUM_VARS]; - int static_vars[NUM_VARS]; -} tparm_state; - -static tparm_state tps; - -#define TPS(var) tps.var +#define TPS(var) _nc_prescreen.tparm_state.var #if NO_LEAKS NCURSES_EXPORT(void) diff --git a/ncurses/tinfo/name_match.c b/ncurses/tinfo/name_match.c index fee3ba3b..c8d728fa 100644 --- a/ncurses/tinfo/name_match.c +++ b/ncurses/tinfo/name_match.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1999-2004,2005 Free Software Foundation, Inc. * + * Copyright (c) 1999-2005,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -34,38 +34,38 @@ #include #include -MODULE_ID("$Id: name_match.c,v 1.15 2005/01/22 21:47:25 tom Exp $") +MODULE_ID("$Id: name_match.c,v 1.16 2007/04/21 21:28:13 tom Exp $") /* * _nc_first_name(char *names) * * Extract the primary name from a compiled entry. */ +#define FirstName _nc_globals.first_name NCURSES_EXPORT(char *) _nc_first_name(const char *const sp) /* get the first name from the given name list */ { - static char *buf; - register unsigned n; + unsigned n; #if NO_LEAKS if (sp == 0) { - if (buf != 0) - FreeAndNull(buf); /* for leak-testing */ + if (FirstName != 0) + FreeAndNull(FirstName); return 0; } #endif - if (buf == 0) - buf = typeMalloc(char, MAX_NAME_SIZE + 1); + if (FirstName == 0) + FirstName = typeMalloc(char, MAX_NAME_SIZE + 1); for (n = 0; n < MAX_NAME_SIZE; n++) { - if ((buf[n] = sp[n]) == '\0' - || (buf[n] == '|')) + if ((FirstName[n] = sp[n]) == '\0' + || (FirstName[n] == '|')) break; } - buf[n] = '\0'; - return (buf); + FirstName[n] = '\0'; + return (FirstName); } /* diff --git a/ncurses/trace/lib_trace.c b/ncurses/trace/lib_trace.c index 7f781221..3e29f326 100644 --- a/ncurses/trace/lib_trace.c +++ b/ncurses/trace/lib_trace.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -46,7 +46,7 @@ #include -MODULE_ID("$Id: lib_trace.c,v 1.59 2006/08/19 12:05:25 tom Exp $") +MODULE_ID("$Id: lib_trace.c,v 1.61 2007/04/21 23:06:07 tom Exp $") NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */ @@ -54,29 +54,28 @@ NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */ NCURSES_EXPORT_VAR(const char *) _nc_tputs_trace = ""; NCURSES_EXPORT_VAR(long) _nc_outchars = 0; -static FILE *tracefp = 0; /* default to writing to stderr */ +#define TraceFP _nc_globals.trace_fp +#define TracePath _nc_globals.trace_fname +#define TraceLevel _nc_globals.trace_level NCURSES_EXPORT(void) trace(const unsigned int tracelevel) { - static bool been_here = FALSE; - static char my_name[PATH_MAX]; + if ((TraceFP == 0) && tracelevel) { + const char *mode = _nc_globals.init_trace ? "ab" : "wb"; - if ((tracefp == 0) && tracelevel) { - const char *mode = been_here ? "ab" : "wb"; - - if (*my_name == '\0') { - if (getcwd(my_name, sizeof(my_name) - 10) == 0) { + if (TracePath[0] == '\0') { + if (getcwd(TracePath, sizeof(TracePath) - 10) == 0) { perror("curses: Can't get working directory"); exit(EXIT_FAILURE); } - strcat(my_name, "/trace"); + strcat(TracePath, "/trace"); } - been_here = TRUE; + _nc_globals.init_trace = TRUE; _nc_tracing = tracelevel; - if (_nc_access(my_name, W_OK) < 0 - || (tracefp = fopen(my_name, mode)) == 0) { + if (_nc_access(TracePath, W_OK) < 0 + || (TraceFP = fopen(TracePath, mode)) == 0) { perror("curses: Can't open 'trace' file"); exit(EXIT_FAILURE); } @@ -85,18 +84,18 @@ trace(const unsigned int tracelevel) * end of each line. This is useful in case the program dies. */ #if HAVE_SETVBUF /* ANSI */ - (void) setvbuf(tracefp, (char *) 0, _IOLBF, 0); + (void) setvbuf(TraceFP, (char *) 0, _IOLBF, 0); #elif HAVE_SETBUF /* POSIX */ - (void) setbuffer(tracefp, (char *) 0); + (void) setbuffer(TraceFP, (char *) 0); #endif _tracef("TRACING NCURSES version %s.%d (tracelevel=%#x)", NCURSES_VERSION, NCURSES_VERSION_PATCH, tracelevel); } else if (tracelevel == 0) { - if (tracefp != 0) { - fclose(tracefp); - tracefp = 0; + if (TraceFP != 0) { + fclose(TraceFP); + TraceFP = 0; } _nc_tracing = tracelevel; } else if (_nc_tracing != tracelevel) { @@ -110,7 +109,6 @@ _tracef(const char *fmt,...) { static const char Called[] = T_CALLED(""); static const char Return[] = T_RETURN(""); - static int level; va_list ap; bool before = FALSE; bool after = FALSE; @@ -120,12 +118,12 @@ _tracef(const char *fmt,...) if (strlen(fmt) >= sizeof(Called) - 1) { if (!strncmp(fmt, Called, sizeof(Called) - 1)) { before = TRUE; - level++; + TraceLevel++; } else if (!strncmp(fmt, Return, sizeof(Return) - 1)) { after = TRUE; } if (before || after) { - if ((level <= 1) + if ((TraceLevel <= 1) || (doit & TRACE_ICALLS) != 0) doit &= (TRACE_CALLS | TRACE_CCALLS); else @@ -134,22 +132,22 @@ _tracef(const char *fmt,...) } if (doit != 0) { - if (tracefp == 0) - tracefp = stderr; + if (TraceFP == 0) + TraceFP = stderr; if (before || after) { int n; - for (n = 1; n < level; n++) - fputs("+ ", tracefp); + for (n = 1; n < TraceLevel; n++) + fputs("+ ", TraceFP); } va_start(ap, fmt); - vfprintf(tracefp, fmt, ap); - fputc('\n', tracefp); + vfprintf(TraceFP, fmt, ap); + fputc('\n', TraceFP); va_end(ap); - fflush(tracefp); + fflush(TraceFP); } - if (after && level) - level--; + if (after && TraceLevel) + TraceLevel--; errno = save_err; } diff --git a/ncurses/trace/lib_traceatr.c b/ncurses/trace/lib_traceatr.c index ee6cf5f1..6db61254 100644 --- a/ncurses/trace/lib_traceatr.c +++ b/ncurses/trace/lib_traceatr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -39,7 +39,7 @@ #include #include /* acs_chars */ -MODULE_ID("$Id: lib_traceatr.c,v 1.56 2006/12/02 21:18:28 tom Exp $") +MODULE_ID("$Id: lib_traceatr.c,v 1.58 2007/04/21 22:54:45 tom Exp $") #define COLOR_OF(c) ((c < 0) ? "default" : (c > 7 ? color_of(c) : colors[c].name)) @@ -49,23 +49,27 @@ static const char l_brace[] = {L_BRACE, 0}; static const char r_brace[] = {R_BRACE, 0}; #ifndef USE_TERMLIB + +#define my_buffer _nc_globals.traceatr_color_buf +#define my_select _nc_globals.traceatr_color_sel +#define my_cached _nc_globals.traceatr_color_last + static char * color_of(int c) { - static char buffer[2][80]; - static int sel; - static int last = -1; - - if (c != last) { - last = c; - sel = !sel; + if (c != my_cached) { + my_cached = c; + my_select = !my_select; if (c == COLOR_DEFAULT) - strcpy(buffer[sel], "default"); + strcpy(my_buffer[my_select], "default"); else - sprintf(buffer[sel], "color%d", c); + sprintf(my_buffer[my_select], "color%d", c); } - return buffer[sel]; + return my_buffer[my_select]; } + +#undef my_buffer +#undef my_select #endif /* !USE_TERMLIB */ NCURSES_EXPORT(char *) @@ -173,17 +177,19 @@ _nc_retrace_attr_t(attr_t code) const char * _nc_altcharset_name(attr_t attr, chtype ch) { + typedef struct { + unsigned int val; + const char *name; + } ALT_NAMES; + const char *result = 0; if ((attr & A_ALTCHARSET) && (acs_chars != 0)) { char *cp; char *found = 0; - static const struct { - unsigned int val; - const char *name; - } names[] = + /* *INDENT-OFF* */ + static const ALT_NAMES names[] = { - /* *INDENT-OFF* */ { 'l', "ACS_ULCORNER" }, /* upper left corner */ { 'm', "ACS_LLCORNER" }, /* lower left corner */ { 'k', "ACS_URCORNER" }, /* upper right corner */ @@ -217,9 +223,9 @@ _nc_altcharset_name(attr_t attr, chtype ch) { '|', "ACS_NEQUAL" }, /* not equal */ { '}', "ACS_STERLING" }, /* UK pound sign */ { '\0', (char *) 0 } - /* *INDENT-OFF* */ - }, - *sp; + }; + /* *INDENT-OFF* */ + const ALT_NAMES *sp; for (cp = acs_chars; cp[0] && cp[1]; cp += 2) { if (ChCharOf(cp[1]) == ChCharOf(ch)) { diff --git a/ncurses/trace/lib_tracechr.c b/ncurses/trace/lib_tracechr.c index 34a2bb61..479756ac 100644 --- a/ncurses/trace/lib_tracechr.c +++ b/ncurses/trace/lib_tracechr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -39,34 +39,35 @@ #include -MODULE_ID("$Id: lib_tracechr.c,v 1.12 2005/04/16 16:55:46 tom Exp $") +MODULE_ID("$Id: lib_tracechr.c,v 1.13 2007/04/21 23:16:37 tom Exp $") #ifdef TRACE +#define MyBuffer _nc_globals.tracechr_buf + NCURSES_EXPORT(char *) _tracechar(int ch) { - static char result[40]; NCURSES_CONST char *name; if (ch > KEY_MIN || ch < 0) { name = keyname(ch); if (name == 0 || *name == '\0') name = "NULL"; - (void) sprintf(result, "'%.30s' = %#03o", name, ch); + (void) sprintf(MyBuffer, "'%.30s' = %#03o", name, ch); } else if (!is8bits(ch) || !isprint(UChar(ch))) { /* * workaround for glibc bug: * sprintf changes the result from unctrl() to an empty string if it * does not correspond to a valid multibyte sequence. */ - (void) sprintf(result, "%#03o", ch); + (void) sprintf(MyBuffer, "%#03o", ch); } else { name = unctrl((chtype) ch); if (name == 0 || *name == 0) name = "null"; /* shouldn't happen */ - (void) sprintf(result, "'%.30s' = %#03o", name, ch); + (void) sprintf(MyBuffer, "'%.30s' = %#03o", name, ch); } - return (result); + return (MyBuffer); } #else empty_module(_nc_lib_tracechr) diff --git a/ncurses/trace/lib_tracedmp.c b/ncurses/trace/lib_tracedmp.c index 41739a92..53623136 100644 --- a/ncurses/trace/lib_tracedmp.c +++ b/ncurses/trace/lib_tracedmp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -39,15 +39,16 @@ #include #include -MODULE_ID("$Id: lib_tracedmp.c,v 1.27 2006/10/14 20:43:31 tom Exp $") +MODULE_ID("$Id: lib_tracedmp.c,v 1.28 2007/04/21 21:10:54 tom Exp $") #ifdef TRACE + +#define my_buffer _nc_globals.tracedmp_buf +#define my_length _nc_globals.tracedmp_used + NCURSES_EXPORT(void) _tracedump(const char *name, WINDOW *win) { - static char *buf = 0; - static size_t used = 0; - int i, j, n, width; /* compute narrowest possible display width */ @@ -66,13 +67,13 @@ _tracedump(const char *name, WINDOW *win) } if (width < win->_maxx) ++width; - if (++width + 1 > (int) used) { - used = 2 * (width + 1); - buf = typeRealloc(char, used, buf); + if (++width + 1 > (int) my_length) { + my_length = 2 * (width + 1); + my_buffer = typeRealloc(char, my_length, my_buffer); } for (n = 0; n <= win->_maxy; ++n) { - char *ep = buf; + char *ep = my_buffer; bool haveattrs, havecolors; /* @@ -107,7 +108,7 @@ _tracedump(const char *name, WINDOW *win) break; } if (havecolors) { - ep = buf; + ep = my_buffer; for (j = 0; j < width; ++j) { int pair = GetPair(win->_line[n].text[j]); if (pair >= 52) @@ -123,7 +124,7 @@ _tracedump(const char *name, WINDOW *win) } ep[j] = '\0'; _tracef("%*s[%2d]%*s='%s'", (int) strlen(name), - "colors", n, 8, " ", buf); + "colors", n, 8, " ", my_buffer); } for (i = 0; i < 4; ++i) { @@ -137,20 +138,20 @@ _tracedump(const char *name, WINDOW *win) break; } if (haveattrs) { - ep = buf; + ep = my_buffer; for (j = 0; j < width; ++j) ep[j] = hex[(AttrOf(win->_line[n].text[j]) & mask) >> ((i + 4) * 4)]; ep[j] = '\0'; _tracef("%*s%d[%2d]%*s='%s'", (int) strlen(name) - - 1, "attrs", i, n, 8, " ", buf); + 1, "attrs", i, n, 8, " ", my_buffer); } } } #if NO_LEAKS - free(buf); - buf = 0; - used = 0; + free(my_buffer); + my_buffer = 0; + my_length = 0; #endif } diff --git a/ncurses/trace/lib_tracemse.c b/ncurses/trace/lib_tracemse.c index 98290a1e..5edcc13a 100644 --- a/ncurses/trace/lib_tracemse.c +++ b/ncurses/trace/lib_tracemse.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2002,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -38,30 +38,23 @@ #include -MODULE_ID("$Id: lib_tracemse.c,v 1.12 2005/06/11 19:53:50 tom Exp $") +MODULE_ID("$Id: lib_tracemse.c,v 1.13 2007/04/21 21:23:00 tom Exp $") #ifdef TRACE +#define my_buffer _nc_globals.tracemse_buf + NCURSES_EXPORT(char *) _tracemouse(MEVENT const *ep) { - /* - * hmm - format is no longer than 80 columns, there are 5 numbers that - * could at most have 10 digits, and the mask contains no more than 32 bits - * with each bit representing less than 15 characters. Usually the whole - * string is less than 80 columns, but this buffer size is an absolute - * limit. - */ - static char buf[80 + (5 * 10) + (32 * 15)]; - - (void) sprintf(buf, "id %2d at (%2d, %2d, %2d) state %4lx = {", + (void) sprintf(my_buffer, TRACEMSE_FMT, ep->id, ep->x, ep->y, ep->z, (unsigned long) ep->bstate); -#define SHOW(m, s) if ((ep->bstate & m) == m) strcat(strcat(buf, s), ", ") +#define SHOW(m, s) if ((ep->bstate & m) == m) strcat(strcat(my_buffer, s), ", ") SHOW(BUTTON1_RELEASED, "release-1"); SHOW(BUTTON1_PRESSED, "press-1"); @@ -115,10 +108,10 @@ _tracemouse(MEVENT const *ep) #undef SHOW - if (buf[strlen(buf) - 1] == ' ') - buf[strlen(buf) - 2] = '\0'; - (void) strcat(buf, "}"); - return (buf); + if (my_buffer[strlen(my_buffer) - 1] == ' ') + my_buffer[strlen(my_buffer) - 2] = '\0'; + (void) strcat(my_buffer, "}"); + return (my_buffer); } #else /* !TRACE */ diff --git a/ncurses/trace/trace_buf.c b/ncurses/trace/trace_buf.c index 85b4fbe6..7bf91c67 100644 --- a/ncurses/trace/trace_buf.c +++ b/ncurses/trace/trace_buf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -35,46 +35,42 @@ #include -MODULE_ID("$Id: trace_buf.c,v 1.12 2003/03/15 21:21:36 tom Exp $") +MODULE_ID("$Id: trace_buf.c,v 1.13 2007/04/21 22:50:08 tom Exp $") -typedef struct { - char *text; - size_t size; -} LIST; +#define MyList _nc_globals.tracebuf_ptr +#define MySize _nc_globals.tracebuf_used static char * _nc_trace_alloc(int bufnum, size_t want) { char *result = 0; - static LIST *list; - static size_t have; if (bufnum >= 0) { - if ((size_t) (bufnum + 1) > have) { + if ((size_t) (bufnum + 1) > MySize) { size_t need = (bufnum + 1) * 2; - if ((list = typeRealloc(LIST, need, list)) == 0) + if ((MyList = typeRealloc(TRACEBUF, need, MyList)) == 0) return (0); - while (need > have) - list[have++].text = 0; + while (need > MySize) + MyList[MySize++].text = 0; } - if (list[bufnum].text == 0 - || want > list[bufnum].size) { - if ((list[bufnum].text = typeRealloc(char, want, list[bufnum].text)) - != 0) - list[bufnum].size = want; + if (MyList[bufnum].text == 0 + || want > MyList[bufnum].size) { + MyList[bufnum].text = typeRealloc(char, want, MyList[bufnum].text); + if (MyList[bufnum].text != 0) + MyList[bufnum].size = want; } - result = list[bufnum].text; + result = MyList[bufnum].text; } #if NO_LEAKS else { - if (have) { - while (have--) { - if (list[have].text != 0) - free(list[have].text); + if (MySize) { + while (MySize--) { + if (MyList[MySize].text != 0) + free(MyList[MySize].text); } - free(list); + free(MyList); } } #endif diff --git a/ncurses/trace/trace_tries.c b/ncurses/trace/trace_tries.c index 7cb45b88..0aa0b227 100644 --- a/ncurses/trace/trace_tries.c +++ b/ncurses/trace/trace_tries.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1999-2001,2006 Free Software Foundation, Inc. * + * Copyright (c) 1999-2006,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -35,25 +35,27 @@ #include -MODULE_ID("$Id: trace_tries.c,v 1.11 2006/12/30 16:25:45 tom Exp $") +MODULE_ID("$Id: trace_tries.c,v 1.12 2007/04/21 21:55:41 tom Exp $") #ifdef TRACE -static unsigned char *buffer; -static unsigned len; +#define my_buffer _nc_globals.tracetry_buf +#define my_length _nc_globals.tracetry_used static void recur_tries(TRIES * tree, unsigned level) { - if (level > len) - buffer = (unsigned char *) realloc(buffer, len = (level + 1) * 4); + if (level > my_length) { + my_length = (level + 1) * 4; + my_buffer = (unsigned char *) realloc(my_buffer, my_length); + } while (tree != 0) { - if ((buffer[level] = tree->ch) == 0) - buffer[level] = 128; - buffer[level + 1] = 0; + if ((my_buffer[level] = tree->ch) == 0) + my_buffer[level] = 128; + my_buffer[level + 1] = 0; if (tree->value != 0) { _tracef("%5d: %s (%s)", tree->value, - _nc_visbuf((char *) buffer), keyname(tree->value)); + _nc_visbuf((char *) my_buffer), keyname(tree->value)); } if (tree->child) recur_tries(tree->child, level + 1); @@ -64,11 +66,11 @@ recur_tries(TRIES * tree, unsigned level) NCURSES_EXPORT(void) _nc_trace_tries(TRIES * tree) { - buffer = typeMalloc(unsigned char, len = 80); + my_buffer = typeMalloc(unsigned char, my_length = 80); _tracef("BEGIN tries %p", tree); recur_tries(tree, 0); _tracef(". . . tries %p", tree); - free(buffer); + free(my_buffer); } #else diff --git a/ncurses/trace/varargs.c b/ncurses/trace/varargs.c index aee20105..bc103b74 100644 --- a/ncurses/trace/varargs.c +++ b/ncurses/trace/varargs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2001-2002,2003 Free Software Foundation, Inc. * + * Copyright (c) 2001-2003,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -34,7 +34,7 @@ #include -MODULE_ID("$Id: varargs.c,v 1.4 2003/05/24 21:10:28 tom Exp $") +MODULE_ID("$Id: varargs.c,v 1.5 2007/04/21 23:21:23 tom Exp $") #ifdef TRACE @@ -49,6 +49,9 @@ typedef enum { #define VA_PTR(type) pval = (char *)va_arg(ap, type) #define VA_STR(type) sval = va_arg(ap, type) +#define MyBuffer _nc_globals.tracearg_buf +#define MyLength _nc_globals.tracearg_used + /* * Returns a string that represents the parameter list of a printf-style call. */ @@ -56,8 +59,6 @@ NCURSES_EXPORT(char *) _nc_varargs(const char *fmt, va_list ap) { static char dummy[] = ""; - static char *result_buf; - static size_t result_len; char buffer[BUFSIZ]; const char *param; @@ -65,11 +66,11 @@ _nc_varargs(const char *fmt, va_list ap) if (fmt == 0 || *fmt == '\0') return dummy; - if (result_len == 0) - result_buf = typeMalloc(char, result_len = BUFSIZ); - if (result_buf == 0) + if (MyLength == 0) + MyBuffer = typeMalloc(char, MyLength = BUFSIZ); + if (MyBuffer == 0) return dummy; - *result_buf = '\0'; + *MyBuffer = '\0'; while (*fmt != '\0') { if (*fmt == '%') { @@ -163,9 +164,9 @@ _nc_varargs(const char *fmt, va_list ap) strcpy(buffer, "?"); break; } - result_len += strlen(param) + 2; - result_buf = typeRealloc(char, result_len, result_buf); - sprintf(result_buf + strlen(result_buf), ", %s", param); + MyLength += strlen(param) + 2; + MyBuffer = typeRealloc(char, MyLength, MyBuffer); + sprintf(MyBuffer + strlen(MyBuffer), ", %s", param); } } used = atUnknown; @@ -175,7 +176,7 @@ _nc_varargs(const char *fmt, va_list ap) } } - return (result_buf); + return (MyBuffer); } #else empty_module(_nc_varargs) diff --git a/ncurses/tty/lib_tstp.c b/ncurses/tty/lib_tstp.c index aa05daf4..2a341fa6 100644 --- a/ncurses/tty/lib_tstp.c +++ b/ncurses/tty/lib_tstp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -46,7 +46,7 @@ #define _POSIX_SOURCE #endif -MODULE_ID("$Id: lib_tstp.c,v 1.33 2006/12/30 21:44:53 tom Exp $") +MODULE_ID("$Id: lib_tstp.c,v 1.36 2007/04/21 19:51:29 tom Exp $") #if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC) #define USE_SIGTSTP 1 @@ -234,14 +234,12 @@ tstp(int dummy GCC_UNUSED) static void cleanup(int sig) { - static int nested; - /* * Actually, doing any sort of I/O from within an signal handler is * "unsafe". But we'll _try_ to clean up the screen and terminal * settings on the way out. */ - if (!nested++ + if (!_nc_globals.cleanup_nested++ && (sig == SIGINT || sig == SIGQUIT)) { #if HAVE_SIGACTION || HAVE_SIGVEC @@ -277,7 +275,7 @@ cleanup(int sig) static void sigwinch(int sig GCC_UNUSED) { - _nc_handle_sigwinch(-1); + _nc_globals.have_sigwinch = 1; } #endif /* USE_SIGWINCH */ @@ -351,8 +349,6 @@ CatchIfDefault(int sig, RETSIGTYPE (*handler) (int)) NCURSES_EXPORT(void) _nc_signal_handler(bool enable) { - static bool initialized = FALSE; - T((T_CALLED("_nc_signal_handler(%d)"), enable)); #if USE_SIGTSTP /* Xenix 2.x doesn't have SIGTSTP, for example */ { @@ -381,14 +377,14 @@ _nc_signal_handler(bool enable) } #endif /* !USE_SIGTSTP */ - if (!initialized) { + if (!_nc_globals.init_signals) { if (enable) { CatchIfDefault(SIGINT, cleanup); CatchIfDefault(SIGTERM, cleanup); #if USE_SIGWINCH CatchIfDefault(SIGWINCH, sigwinch); #endif - initialized = TRUE; + _nc_globals.init_signals = TRUE; } } returnVoid; diff --git a/ncurses/tty/lib_vidattr.c b/ncurses/tty/lib_vidattr.c index dbbbc978..4bee100a 100644 --- a/ncurses/tty/lib_vidattr.c +++ b/ncurses/tty/lib_vidattr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -65,7 +65,7 @@ #include #include -MODULE_ID("$Id: lib_vidattr.c,v 1.46 2006/01/21 23:39:40 tom Exp $") +MODULE_ID("$Id: lib_vidattr.c,v 1.48 2007/04/21 23:25:38 tom Exp $") #define doPut(mode) TPUTS_TRACE(#mode); tputs(mode, 1, outc) @@ -87,10 +87,11 @@ MODULE_ID("$Id: lib_vidattr.c,v 1.46 2006/01/21 23:39:40 tom Exp $") } \ } +#define PreviousAttr _nc_prescreen.previous_attr + NCURSES_EXPORT(int) vidputs(chtype newmode, int (*outc) (int)) { - static attr_t previous_attr = A_NORMAL; attr_t turn_on, turn_off; int pair; bool reverse = FALSE; @@ -105,14 +106,14 @@ vidputs(chtype newmode, int (*outc) (int)) /* this allows us to go on whether or not newterm() has been called */ if (SP) - previous_attr = AttrOf(SCREEN_ATTRS(SP)); + PreviousAttr = AttrOf(SCREEN_ATTRS(SP)); - TR(TRACE_ATTRS, ("previous attribute was %s", _traceattr(previous_attr))); + TR(TRACE_ATTRS, ("previous attribute was %s", _traceattr(PreviousAttr))); if ((SP != 0) && (magic_cookie_glitch > 0)) { #if USE_XMC_SUPPORT - static chtype table[] = + static const chtype table[] = { A_STANDOUT, A_UNDERLINE, @@ -183,7 +184,7 @@ vidputs(chtype newmode, int (*outc) (int)) newmode &= ~mask; } - if (newmode == previous_attr) + if (newmode == PreviousAttr) returnCode(OK); pair = PAIR_NUMBER(newmode); @@ -192,17 +193,17 @@ vidputs(chtype newmode, int (*outc) (int)) newmode &= ~A_REVERSE; } - turn_off = (~newmode & previous_attr) & ALL_BUT_COLOR; - turn_on = (newmode & ~previous_attr) & ALL_BUT_COLOR; + turn_off = (~newmode & PreviousAttr) & ALL_BUT_COLOR; + turn_on = (newmode & ~PreviousAttr) & ALL_BUT_COLOR; - SetColorsIf(((pair == 0) && !fix_pair0), previous_attr); + SetColorsIf(((pair == 0) && !fix_pair0), PreviousAttr); if (newmode == A_NORMAL) { - if ((previous_attr & A_ALTCHARSET) && exit_alt_charset_mode) { + if ((PreviousAttr & A_ALTCHARSET) && exit_alt_charset_mode) { doPut(exit_alt_charset_mode); - previous_attr &= ~A_ALTCHARSET; + PreviousAttr &= ~A_ALTCHARSET; } - if (previous_attr) { + if (PreviousAttr) { if (exit_attribute_mode) { doPut(exit_attribute_mode); } else { @@ -213,10 +214,10 @@ vidputs(chtype newmode, int (*outc) (int)) TurnOff(A_STANDOUT, exit_standout_mode); } } - previous_attr &= ALL_BUT_COLOR; + PreviousAttr &= ALL_BUT_COLOR; } - SetColorsIf((pair != 0) || fix_pair0, previous_attr); + SetColorsIf((pair != 0) || fix_pair0, PreviousAttr); } else if (set_attributes) { if (turn_on || turn_off) { TPUTS_TRACE("set_attributes"); @@ -230,9 +231,9 @@ vidputs(chtype newmode, int (*outc) (int)) (newmode & A_INVIS) != 0, (newmode & A_PROTECT) != 0, (newmode & A_ALTCHARSET) != 0), 1, outc); - previous_attr &= ALL_BUT_COLOR; + PreviousAttr &= ALL_BUT_COLOR; } - SetColorsIf((pair != 0) || fix_pair0, previous_attr); + SetColorsIf((pair != 0) || fix_pair0, PreviousAttr); } else { TR(TRACE_ATTRS, ("turning %s off", _traceattr(turn_off))); @@ -250,9 +251,9 @@ vidputs(chtype newmode, int (*outc) (int)) if (turn_off && exit_attribute_mode) { doPut(exit_attribute_mode); turn_on |= (newmode & ALL_BUT_COLOR); - previous_attr &= ALL_BUT_COLOR; + PreviousAttr &= ALL_BUT_COLOR; } - SetColorsIf((pair != 0) || fix_pair0, previous_attr); + SetColorsIf((pair != 0) || fix_pair0, PreviousAttr); TR(TRACE_ATTRS, ("turning %s on", _traceattr(turn_on))); /* *INDENT-OFF* */ @@ -283,7 +284,7 @@ vidputs(chtype newmode, int (*outc) (int)) if (SP) SetAttr(SCREEN_ATTRS(SP), newmode); else - previous_attr = newmode; + PreviousAttr = newmode; returnCode(OK); } diff --git a/ncurses/tty/tty_update.c b/ncurses/tty/tty_update.c index 6926b561..57222f15 100644 --- a/ncurses/tty/tty_update.c +++ b/ncurses/tty/tty_update.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -74,7 +74,7 @@ #include #include -MODULE_ID("$Id: tty_update.c,v 1.238 2006/11/25 22:33:21 tom Exp $") +MODULE_ID("$Id: tty_update.c,v 1.239 2007/04/19 20:57:49 tom Exp $") /* * This define controls the line-breakout optimization. Every once in a @@ -640,7 +640,7 @@ doupdate(void) SP->_fifohold--; #if USE_SIZECHANGE - if (SP->_endwin || SP->_sig_winch) { + if (SP->_endwin || _nc_handle_sigwinch(FALSE)) { /* * This is a transparent extension: XSI does not address it, * and applications need not know that ncurses can do it. diff --git a/panel/Makefile.in b/panel/Makefile.in index 692ad1cb..47057301 100644 --- a/panel/Makefile.in +++ b/panel/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.50 2007/03/31 15:46:42 tom Exp $ +# $Id: Makefile.in,v 1.51 2007/04/19 20:14:53 tom Exp $ ############################################################################## # Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # # # @@ -92,7 +92,7 @@ CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@) -LINK = $(LIBTOOL_LINK) $(CC) +LINK = $(LIBTOOL_LINK) LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@ SHLIB_DIRS = -L../lib diff --git a/progs/Makefile.in b/progs/Makefile.in index 077eeb00..ed5260e5 100644 --- a/progs/Makefile.in +++ b/progs/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.72 2007/03/31 15:46:42 tom Exp $ +# $Id: Makefile.in,v 1.73 2007/04/19 20:15:02 tom Exp $ ############################################################################## # Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # # # @@ -98,7 +98,7 @@ ABI_VERSION = @cf_cv_abi_version@ LOCAL_LIBDIR = @top_builddir@/lib LD = @LD@ -LINK = @LINK_PROGS@ $(LIBTOOL_LINK) $(CC) +LINK = @LINK_PROGS@ $(LIBTOOL_LINK) LDFLAGS = @EXTRA_LDFLAGS@ \ @TICS_ARGS@ @TINFO_ARGS@ @LDFLAGS@ @LD_MODEL@ @LIBS@ diff --git a/test/Makefile.in b/test/Makefile.in index cdd5ca25..a0c602d8 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.95 2007/01/27 22:56:17 tom Exp $ +# $Id: Makefile.in,v 1.96 2007/04/19 20:15:16 tom Exp $ ############################################################################## # Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # # # @@ -77,7 +77,7 @@ LOCAL_LIBS = @TEST_DEPS@ MATH_LIB = @MATH_LIB@ LD = @LD@ -LINK = @LINK_TESTS@ $(LIBTOOL_LINK) $(CC) $(CFLAGS) +LINK = @LINK_TESTS@ $(LIBTOOL_LINK) $(CFLAGS) LDFLAGS = @LD_MODEL@ @LOCAL_LDFLAGS@ @LDFLAGS@