From 396a05943b7da5039dd15d79c4385c7d2a75d6d4 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 13 Apr 2008 01:03:15 +0000 Subject: [PATCH] ncurses 5.6 - patch 20080412 + change test/ditto.c to use openpty() and xterm. + add locks for copywin(), dupwin(), overlap(), overlay() on their window parameters. + add locks for initscr() and newterm() on updates to the SCREEN pointer. + finish table in curs_thread.3x manpage. --- NEWS | 10 +- aclocal.m4 | 30 +- configure | 552 +++++++++++++++++++++++-------------- configure.in | 15 +- dist.mk | 4 +- man/curs_threads.3x | 32 +-- ncurses/base/lib_initscr.c | 13 +- ncurses/base/lib_newterm.c | 17 +- ncurses/base/lib_overlay.c | 166 ++++++----- ncurses/base/lib_window.c | 6 +- ncurses/base/use_window.c | 6 +- ncurses/curses.priv.h | 10 +- test/Makefile.in | 11 +- test/cardfile.c | 14 +- test/demo_altkeys.c | 6 +- test/demo_defkey.c | 8 +- test/demo_menus.c | 15 +- test/demo_panels.c | 4 +- test/ditto.c | 33 ++- test/echochar.c | 6 +- test/movewindow.c | 4 +- test/ncurses.c | 16 +- test/test.priv.h | 3 +- test/testcurs.c | 4 +- test/xmas.c | 4 +- 25 files changed, 609 insertions(+), 380 deletions(-) diff --git a/NEWS b/NEWS index dda1f6c3..a80efd0c 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.1223 2008/04/05 21:46:58 tom Exp $ +-- $Id: NEWS,v 1.1225 2008/04/12 19:41:26 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,14 @@ 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. +20080412 + + change test/ditto.c to use openpty() and xterm. + + add locks for copywin(), dupwin(), overlap(), overlay() on their + window parameters. + + add locks for initscr() and newterm() on updates to the SCREEN + pointer. + + finish table in curs_thread.3x manpage. + 20080405 + begin table in curs_thread.3x manpage describing the scope of data used by each function (or symbol) for threading analysis. diff --git a/aclocal.m4 b/aclocal.m4 index 665c30f4..faba4892 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.445 2008/03/29 19:47:32 tom Exp $ +dnl $Id: aclocal.m4,v 1.447 2008/04/12 23:49:55 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -1058,6 +1058,34 @@ int main() { test "$cf_cv_func_nanosleep" = "yes" && AC_DEFINE(HAVE_NANOSLEEP) ]) dnl --------------------------------------------------------------------------- +dnl CF_FUNC_OPENPTY version: 2 updated: 2008/04/12 19:49:01 +dnl --------------- +dnl Check for openpty() function, along with header. It may need the +dnl "util" library as well. +AC_DEFUN([CF_FUNC_OPENPTY], +[ +AC_CHECK_LIB(util,openpty,cf_cv_lib_util=yes,cf_cv_lib_util=no) +AC_CACHE_CHECK(for openpty header,cf_cv_func_openpty,[ + cf_save_LIBS="$LIBS" + test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS" + for cf_header in pty.h libutil.h util.h + do + AC_TRY_LINK([ +#include <$cf_header> +],[ + int x = openpty((int *)0, (int *)0, (char *)0, + (struct termios *)0, (struct winsize *)0); +],[ + cf_cv_func_openpty=$cf_header + break +],[ + cf_cv_func_openpty=no +]) + done + LIBS="$cf_save_LIBS" +]) +])dnl +dnl --------------------------------------------------------------------------- dnl CF_FUNC_POLL version: 4 updated: 2006/12/16 12:33:30 dnl ------------ dnl See if the poll function really works. Some platforms have poll(), but diff --git a/configure b/configure index 031d9241..7ef479b7 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.431 . +# From configure.in Revision: 1.433 . # Guess values for system-dependent variables and create Makefiles. # Generated by Autoconf 2.52.20080325. # @@ -13565,6 +13565,135 @@ test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF #define HAVE_WORKING_POLL 1 EOF +# special check for test/ditto.c + +echo "$as_me:13570: checking for openpty in -lutil" >&5 +echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6 +if test "${ac_cv_lib_util_openpty+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lutil $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line 13578 "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char openpty (); +int +main () +{ +openpty (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:13597: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:13600: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:13603: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:13606: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_util_openpty=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_util_openpty=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:13617: result: $ac_cv_lib_util_openpty" >&5 +echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6 +if test $ac_cv_lib_util_openpty = yes; then + cf_cv_lib_util=yes +else + cf_cv_lib_util=no +fi + +echo "$as_me:13625: checking for openpty header" >&5 +echo $ECHO_N "checking for openpty header... $ECHO_C" >&6 +if test "${cf_cv_func_openpty+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cf_save_LIBS="$LIBS" + test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS" + for cf_header in pty.h libutil.h util.h + do + cat >conftest.$ac_ext <<_ACEOF +#line 13636 "configure" +#include "confdefs.h" + +#include <$cf_header> + +int +main () +{ + + int x = openpty((int *)0, (int *)0, (char *)0, + (struct termios *)0, (struct winsize *)0); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:13653: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:13656: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:13659: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:13662: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + cf_cv_func_openpty=$cf_header + break + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 + + cf_cv_func_openpty=no + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + done + LIBS="$cf_save_LIBS" + +fi +echo "$as_me:13680: result: $cf_cv_func_openpty" >&5 +echo "${ECHO_T}$cf_cv_func_openpty" >&6 + +if test "$cf_cv_func_openpty" != no ; then + cat >>confdefs.h < +EOF + + cat >>confdefs.h <<\EOF +#define USE_XTERM_PTY 1 +EOF + + if test "$cf_cv_lib_util" = yes ; then + TEST_LIBS="-lutil $TEST_LIBS" + fi +fi + if test "$with_hashed_db" != no ; then cat >>confdefs.h <<\EOF #define USE_HASHED_DB 1 @@ -13600,7 +13729,7 @@ if test -n "$with_hashed_db/include" ; then cf_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" cat >conftest.$ac_ext <<_ACEOF -#line 13603 "configure" +#line 13732 "configure" #include "confdefs.h" #include int @@ -13612,16 +13741,16 @@ printf("Hello") } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:13615: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13744: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13618: \$? = $ac_status" >&5 + echo "$as_me:13747: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:13621: \"$ac_try\"") >&5 + { (eval echo "$as_me:13750: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13624: \$? = $ac_status" >&5 + echo "$as_me:13753: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -13638,7 +13767,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 -echo "${as_me-configure}:13641: testing adding $cf_add_incdir to include-path ..." 1>&5 +echo "${as_me-configure}:13770: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="-I$cf_add_incdir $CPPFLAGS" @@ -13672,7 +13801,7 @@ if test -n "$with_hashed_db/lib" ; then if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 -echo "${as_me-configure}:13675: testing adding $cf_add_libdir to library-path ..." 1>&5 +echo "${as_me-configure}:13804: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi @@ -13683,23 +13812,23 @@ fi fi esac -echo "$as_me:13686: checking for db.h" >&5 +echo "$as_me:13815: 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 13692 "configure" +#line 13821 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:13696: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:13825: \"$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:13702: \$? = $ac_status" >&5 + echo "$as_me:13831: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag @@ -13718,11 +13847,11 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:13721: result: $ac_cv_header_db_h" >&5 +echo "$as_me:13850: 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:13725: checking for version of db" >&5 +echo "$as_me:13854: 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 @@ -13733,10 +13862,10 @@ cf_cv_hashed_db_version=unknown for cf_db_version in 1 2 3 4 5 do -echo "${as_me-configure}:13736: testing checking for db version $cf_db_version ..." 1>&5 +echo "${as_me-configure}:13865: testing checking for db version $cf_db_version ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 13739 "configure" +#line 13868 "configure" #include "confdefs.h" $ac_includes_default @@ -13766,16 +13895,16 @@ DBT *foo = 0 } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:13769: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:13898: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13772: \$? = $ac_status" >&5 + echo "$as_me:13901: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:13775: \"$ac_try\"") >&5 + { (eval echo "$as_me:13904: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13778: \$? = $ac_status" >&5 + echo "$as_me:13907: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_hashed_db_version=$cf_db_version @@ -13789,16 +13918,16 @@ rm -f conftest.$ac_objext conftest.$ac_ext done fi -echo "$as_me:13792: result: $cf_cv_hashed_db_version" >&5 +echo "$as_me:13921: 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:13796: error: Cannot determine version of db" >&5 + { { echo "$as_me:13925: 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:13801: checking for db libraries" >&5 +echo "$as_me:13930: 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 @@ -13812,10 +13941,10 @@ do LIBS="-l$cf_db_libs $LIBS" fi -echo "${as_me-configure}:13815: testing checking for library "$cf_db_libs" ..." 1>&5 +echo "${as_me-configure}:13944: testing checking for library "$cf_db_libs" ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 13818 "configure" +#line 13947 "configure" #include "confdefs.h" $ac_includes_default @@ -13870,16 +13999,16 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:13873: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14002: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:13876: \$? = $ac_status" >&5 + echo "$as_me:14005: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:13879: \"$ac_try\"") >&5 + { (eval echo "$as_me:14008: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13882: \$? = $ac_status" >&5 + echo "$as_me:14011: \$? = $ac_status" >&5 (exit $ac_status); }; }; then if test -n "$cf_db_libs" ; then @@ -13899,11 +14028,11 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext done fi -echo "$as_me:13902: result: $cf_cv_hashed_db_libs" >&5 +echo "$as_me:14031: 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:13906: error: Cannot determine library for db" >&5 + { { echo "$as_me:14035: 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 @@ -13913,7 +14042,7 @@ fi else - { { echo "$as_me:13916: error: Cannot find db.h" >&5 + { { echo "$as_me:14045: error: Cannot find db.h" >&5 echo "$as_me: error: Cannot find db.h" >&2;} { (exit 1); exit 1; }; } @@ -13928,7 +14057,7 @@ fi # Just in case, check if the C compiler has a bool type. -echo "$as_me:13931: checking if we should include stdbool.h" >&5 +echo "$as_me:14060: 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 @@ -13936,7 +14065,7 @@ if test "${cf_cv_header_stdbool_h+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF -#line 13939 "configure" +#line 14068 "configure" #include "confdefs.h" int @@ -13948,23 +14077,23 @@ bool foo = false } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:13951: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14080: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13954: \$? = $ac_status" >&5 + echo "$as_me:14083: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:13957: \"$ac_try\"") >&5 + { (eval echo "$as_me:14086: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13960: \$? = $ac_status" >&5 + echo "$as_me:14089: \$? = $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 13967 "configure" +#line 14096 "configure" #include "confdefs.h" #ifndef __BEOS__ @@ -13980,16 +14109,16 @@ bool foo = false } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:13983: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14112: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:13986: \$? = $ac_status" >&5 + echo "$as_me:14115: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:13989: \"$ac_try\"") >&5 + { (eval echo "$as_me:14118: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:13992: \$? = $ac_status" >&5 + echo "$as_me:14121: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_header_stdbool_h=1 else @@ -14003,13 +14132,13 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi if test "$cf_cv_header_stdbool_h" = 1 -then echo "$as_me:14006: result: yes" >&5 +then echo "$as_me:14135: result: yes" >&5 echo "${ECHO_T}yes" >&6 -else echo "$as_me:14008: result: no" >&5 +else echo "$as_me:14137: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:14012: checking for builtin bool type" >&5 +echo "$as_me:14141: 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 @@ -14017,7 +14146,7 @@ if test "${cf_cv_cc_bool_type+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF -#line 14020 "configure" +#line 14149 "configure" #include "confdefs.h" #include @@ -14032,16 +14161,16 @@ bool x = false } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:14035: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14164: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14038: \$? = $ac_status" >&5 + echo "$as_me:14167: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:14041: \"$ac_try\"") >&5 + { (eval echo "$as_me:14170: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14044: \$? = $ac_status" >&5 + echo "$as_me:14173: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_cc_bool_type=1 else @@ -14054,9 +14183,9 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi if test "$cf_cv_cc_bool_type" = 1 -then echo "$as_me:14057: result: yes" >&5 +then echo "$as_me:14186: result: yes" >&5 echo "${ECHO_T}yes" >&6 -else echo "$as_me:14059: result: no" >&5 +else echo "$as_me:14188: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -14078,7 +14207,7 @@ os2*) #(vi cf_stdcpp_libname=stdc++ ;; esac -echo "$as_me:14081: checking for library $cf_stdcpp_libname" >&5 +echo "$as_me:14210: 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 @@ -14087,7 +14216,7 @@ else cf_save="$LIBS" LIBS="$LIBS -l$cf_stdcpp_libname" cat >conftest.$ac_ext <<_ACEOF -#line 14090 "configure" +#line 14219 "configure" #include "confdefs.h" #include @@ -14103,16 +14232,16 @@ strstreambuf foo(buf, sizeof(buf)) } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:14106: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14235: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:14109: \$? = $ac_status" >&5 + echo "$as_me:14238: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:14112: \"$ac_try\"") >&5 + { (eval echo "$as_me:14241: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14115: \$? = $ac_status" >&5 + echo "$as_me:14244: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_libstdcpp=yes else @@ -14124,12 +14253,12 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS="$cf_save" fi -echo "$as_me:14127: result: $cf_cv_libstdcpp" >&5 +echo "$as_me:14256: 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:14132: checking whether $CXX understands -c and -o together" >&5 + echo "$as_me:14261: 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 @@ -14145,15 +14274,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:14148: \"$ac_try\"") >&5 +if { (eval echo "$as_me:14277: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14151: \$? = $ac_status" >&5 + echo "$as_me:14280: \$? = $ac_status" >&5 (exit $ac_status); } && - test -f conftest2.$ac_objext && { (eval echo "$as_me:14153: \"$ac_try\"") >&5 + test -f conftest2.$ac_objext && { (eval echo "$as_me:14282: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14156: \$? = $ac_status" >&5 + echo "$as_me:14285: \$? = $ac_status" >&5 (exit $ac_status); }; then eval cf_cv_prog_CXX_c_o=yes @@ -14164,10 +14293,10 @@ rm -f conftest* fi if test $cf_cv_prog_CXX_c_o = yes; then - echo "$as_me:14167: result: yes" >&5 + echo "$as_me:14296: result: yes" >&5 echo "${ECHO_T}yes" >&6 else - echo "$as_me:14170: result: no" >&5 + echo "$as_me:14299: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -14187,12 +14316,12 @@ os2*) #(vi ;; esac if test "$GXX" = yes; then - echo "$as_me:14190: checking for lib$cf_gpp_libname" >&5 + echo "$as_me:14319: 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 14195 "configure" +#line 14324 "configure" #include "confdefs.h" #include <$cf_gpp_libname/builtin.h> @@ -14206,16 +14335,16 @@ two_arg_error_handler_t foo2 = lib_error_handler } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:14209: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14338: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:14212: \$? = $ac_status" >&5 + echo "$as_me:14341: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:14215: \"$ac_try\"") >&5 + { (eval echo "$as_me:14344: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14218: \$? = $ac_status" >&5 + echo "$as_me:14347: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cxx_library=yes CXXLIBS="$CXXLIBS -l$cf_gpp_libname" @@ -14234,7 +14363,7 @@ else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF -#line 14237 "configure" +#line 14366 "configure" #include "confdefs.h" #include @@ -14248,16 +14377,16 @@ two_arg_error_handler_t foo2 = lib_error_handler } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:14251: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14380: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:14254: \$? = $ac_status" >&5 + echo "$as_me:14383: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:14257: \"$ac_try\"") >&5 + { (eval echo "$as_me:14386: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14260: \$? = $ac_status" >&5 + echo "$as_me:14389: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cxx_library=yes CXXLIBS="$CXXLIBS -l$cf_gpp_libname" @@ -14274,7 +14403,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:14277: result: $cf_cxx_library" >&5 + echo "$as_me:14406: result: $cf_cxx_library" >&5 echo "${ECHO_T}$cf_cxx_library" >&6 fi @@ -14290,7 +14419,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:14293: checking how to run the C++ preprocessor" >&5 +echo "$as_me:14422: 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 @@ -14307,18 +14436,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 14310 "configure" +#line 14439 "configure" #include "confdefs.h" #include Syntax error _ACEOF -if { (eval echo "$as_me:14315: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:14444: \"$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:14321: \$? = $ac_status" >&5 + echo "$as_me:14450: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -14341,17 +14470,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 14344 "configure" +#line 14473 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:14348: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:14477: \"$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:14354: \$? = $ac_status" >&5 + echo "$as_me:14483: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -14388,7 +14517,7 @@ fi else ac_cv_prog_CXXCPP=$CXXCPP fi -echo "$as_me:14391: result: $CXXCPP" >&5 +echo "$as_me:14520: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6 ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes @@ -14398,18 +14527,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 14401 "configure" +#line 14530 "configure" #include "confdefs.h" #include Syntax error _ACEOF -if { (eval echo "$as_me:14406: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:14535: \"$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:14412: \$? = $ac_status" >&5 + echo "$as_me:14541: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -14432,17 +14561,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 14435 "configure" +#line 14564 "configure" #include "confdefs.h" #include _ACEOF -if { (eval echo "$as_me:14439: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:14568: \"$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:14445: \$? = $ac_status" >&5 + echo "$as_me:14574: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -14470,7 +14599,7 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:14473: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5 + { { echo "$as_me:14602: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi @@ -14485,23 +14614,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:14488: checking for $ac_header" >&5 +echo "$as_me:14617: 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 14494 "configure" +#line 14623 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF -if { (eval echo "$as_me:14498: \"$ac_cpp conftest.$ac_ext\"") >&5 +if { (eval echo "$as_me:14627: \"$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:14504: \$? = $ac_status" >&5 + echo "$as_me:14633: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag @@ -14520,7 +14649,7 @@ else fi rm -f conftest.err conftest.$ac_ext fi -echo "$as_me:14523: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "$as_me:14652: 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:14662: 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 @@ -14538,7 +14667,7 @@ if test "${cf_cv_header_stdbool_h+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF -#line 14541 "configure" +#line 14670 "configure" #include "confdefs.h" int @@ -14550,23 +14679,23 @@ bool foo = false } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:14553: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14682: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14556: \$? = $ac_status" >&5 + echo "$as_me:14685: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:14559: \"$ac_try\"") >&5 + { (eval echo "$as_me:14688: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14562: \$? = $ac_status" >&5 + echo "$as_me:14691: \$? = $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 14569 "configure" +#line 14698 "configure" #include "confdefs.h" #ifndef __BEOS__ @@ -14582,16 +14711,16 @@ bool foo = false } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:14585: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14714: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14588: \$? = $ac_status" >&5 + echo "$as_me:14717: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:14591: \"$ac_try\"") >&5 + { (eval echo "$as_me:14720: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14594: \$? = $ac_status" >&5 + echo "$as_me:14723: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_header_stdbool_h=1 else @@ -14605,13 +14734,13 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi if test "$cf_cv_header_stdbool_h" = 1 -then echo "$as_me:14608: result: yes" >&5 +then echo "$as_me:14737: result: yes" >&5 echo "${ECHO_T}yes" >&6 -else echo "$as_me:14610: result: no" >&5 +else echo "$as_me:14739: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:14614: checking for builtin bool type" >&5 +echo "$as_me:14743: 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 @@ -14619,7 +14748,7 @@ if test "${cf_cv_builtin_bool+set}" = set; then else cat >conftest.$ac_ext <<_ACEOF -#line 14622 "configure" +#line 14751 "configure" #include "confdefs.h" #include @@ -14634,16 +14763,16 @@ bool x = false } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:14637: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14766: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14640: \$? = $ac_status" >&5 + echo "$as_me:14769: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:14643: \"$ac_try\"") >&5 + { (eval echo "$as_me:14772: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14646: \$? = $ac_status" >&5 + echo "$as_me:14775: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_builtin_bool=1 else @@ -14656,13 +14785,13 @@ rm -f conftest.$ac_objext conftest.$ac_ext fi if test "$cf_cv_builtin_bool" = 1 -then echo "$as_me:14659: result: yes" >&5 +then echo "$as_me:14788: result: yes" >&5 echo "${ECHO_T}yes" >&6 -else echo "$as_me:14661: result: no" >&5 +else echo "$as_me:14790: result: no" >&5 echo "${ECHO_T}no" >&6 fi -echo "$as_me:14665: checking for size of bool" >&5 +echo "$as_me:14794: 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 @@ -14673,7 +14802,7 @@ else cf_cv_type_of_bool=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 14676 "configure" +#line 14805 "configure" #include "confdefs.h" #include @@ -14715,15 +14844,15 @@ main() _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:14718: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14847: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:14721: \$? = $ac_status" >&5 + echo "$as_me:14850: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:14723: \"$ac_try\"") >&5 + { (eval echo "$as_me:14852: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14726: \$? = $ac_status" >&5 + echo "$as_me:14855: \$? = $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 @@ -14741,18 +14870,18 @@ fi fi rm -f cf_test.out -echo "$as_me:14744: result: $cf_cv_type_of_bool" >&5 +echo "$as_me:14873: 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:14750: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5 + { echo "$as_me:14879: 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:14755: checking for special defines needed for etip.h" >&5 +echo "$as_me:14884: 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" @@ -14764,7 +14893,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 14767 "configure" +#line 14896 "configure" #include "confdefs.h" #include @@ -14778,16 +14907,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:14781: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:14910: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14784: \$? = $ac_status" >&5 + echo "$as_me:14913: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:14787: \"$ac_try\"") >&5 + { (eval echo "$as_me:14916: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14790: \$? = $ac_status" >&5 + echo "$as_me:14919: \$? = $ac_status" >&5 (exit $ac_status); }; }; then test -n "$cf_math" && cat >>confdefs.h <&5 +echo "$as_me:14940: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 CXXFLAGS="$cf_save_CXXFLAGS" if test -n "$CXX"; then -echo "$as_me:14816: checking if $CXX accepts parameter initialization" >&5 +echo "$as_me:14945: 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 @@ -14830,7 +14959,7 @@ ac_main_return=return cf_cv_cpp_param_init=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 14833 "configure" +#line 14962 "configure" #include "confdefs.h" class TEST { @@ -14849,15 +14978,15 @@ void main() { } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:14852: \"$ac_link\"") >&5 +if { (eval echo "$as_me:14981: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:14855: \$? = $ac_status" >&5 + echo "$as_me:14984: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:14857: \"$ac_try\"") >&5 + { (eval echo "$as_me:14986: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14860: \$? = $ac_status" >&5 + echo "$as_me:14989: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_cpp_param_init=yes else @@ -14876,7 +15005,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_main_return=return fi -echo "$as_me:14879: result: $cf_cv_cpp_param_init" >&5 +echo "$as_me:15008: 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 @@ -14885,7 +15014,7 @@ EOF if test -n "$CXX"; then -echo "$as_me:14888: checking if $CXX accepts static_cast" >&5 +echo "$as_me:15017: 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 @@ -14899,7 +15028,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_main_return=return cat >conftest.$ac_ext <<_ACEOF -#line 14902 "configure" +#line 15031 "configure" #include "confdefs.h" class NCursesPanel @@ -14943,16 +15072,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:14946: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:15075: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:14949: \$? = $ac_status" >&5 + echo "$as_me:15078: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:14952: \"$ac_try\"") >&5 + { (eval echo "$as_me:15081: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:14955: \$? = $ac_status" >&5 + echo "$as_me:15084: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_cpp_static_cast=yes else @@ -14970,7 +15099,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_main_return=return fi -echo "$as_me:14973: result: $cf_cv_cpp_static_cast" >&5 +echo "$as_me:15102: result: $cf_cv_cpp_static_cast" >&5 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6 fi @@ -15018,7 +15147,7 @@ else else if test "$cf_cv_header_stdbool_h" = 1 ; then -echo "$as_me:15021: checking for size of bool" >&5 +echo "$as_me:15150: 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 @@ -15029,7 +15158,7 @@ else cf_cv_type_of_bool=unknown else cat >conftest.$ac_ext <<_ACEOF -#line 15032 "configure" +#line 15161 "configure" #include "confdefs.h" #include @@ -15071,15 +15200,15 @@ main() _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:15074: \"$ac_link\"") >&5 +if { (eval echo "$as_me:15203: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:15077: \$? = $ac_status" >&5 + echo "$as_me:15206: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:15079: \"$ac_try\"") >&5 + { (eval echo "$as_me:15208: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:15082: \$? = $ac_status" >&5 + echo "$as_me:15211: \$? = $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 @@ -15097,25 +15226,25 @@ fi fi rm -f cf_test.out -echo "$as_me:15100: result: $cf_cv_type_of_bool" >&5 +echo "$as_me:15229: 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:15106: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5 + { echo "$as_me:15235: 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:15112: checking for fallback type of bool" >&5 + echo "$as_me:15241: 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:15118: result: $cf_cv_type_of_bool" >&5 + echo "$as_me:15247: result: $cf_cv_type_of_bool" >&5 echo "${ECHO_T}$cf_cv_type_of_bool" >&6 fi fi @@ -15144,7 +15273,7 @@ if test -f "${srcdir}/Ada95/Makefile.in" ; then if test "$cf_with_ada" != "no" ; then if test "$with_libtool" != "no"; then - { echo "$as_me:15147: WARNING: libtool does not support Ada - disabling feature" >&5 + { echo "$as_me:15276: WARNING: libtool does not support Ada - disabling feature" >&5 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;} cf_with_ada=no fi @@ -15154,7 +15283,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:15157: checking for $ac_word" >&5 +echo "$as_me:15286: 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 @@ -15169,7 +15298,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:15172: found $ac_dir/$ac_word" >&5 +echo "$as_me:15301: found $ac_dir/$ac_word" >&5 break done @@ -15178,10 +15307,10 @@ fi fi gnat_exists=$ac_cv_prog_gnat_exists if test -n "$gnat_exists"; then - echo "$as_me:15181: result: $gnat_exists" >&5 + echo "$as_me:15310: result: $gnat_exists" >&5 echo "${ECHO_T}$gnat_exists" >&6 else - echo "$as_me:15184: result: no" >&5 + echo "$as_me:15313: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -15189,11 +15318,11 @@ if test "$ac_cv_prog_gnat_exists" = no; then cf_ada_make= else -echo "$as_me:15192: checking for gnat version" >&5 +echo "$as_me:15321: 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:15196: result: $cf_gnat_version" >&5 +echo "$as_me:15325: result: $cf_gnat_version" >&5 echo "${ECHO_T}$cf_gnat_version" >&6 case $cf_gnat_version in @@ -15216,7 +15345,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:15219: checking for $ac_word" >&5 +echo "$as_me:15348: 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 @@ -15231,7 +15360,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:15234: found $ac_dir/$ac_word" >&5 +echo "$as_me:15363: found $ac_dir/$ac_word" >&5 break done @@ -15240,10 +15369,10 @@ fi fi M4_exists=$ac_cv_prog_M4_exists if test -n "$M4_exists"; then - echo "$as_me:15243: result: $M4_exists" >&5 + echo "$as_me:15372: result: $M4_exists" >&5 echo "${ECHO_T}$M4_exists" >&6 else - echo "$as_me:15246: result: no" >&5 + echo "$as_me:15375: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -15252,7 +15381,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:15255: checking if GNAT works" >&5 + echo "$as_me:15384: checking if GNAT works" >&5 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6 rm -f conftest* @@ -15280,14 +15409,14 @@ else fi rm -f conftest* - echo "$as_me:15283: result: $cf_cv_prog_gnat_correct" >&5 + echo "$as_me:15412: 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:15290: checking if GNAT pragma Unreferenced works" >&5 + echo "$as_me:15419: checking if GNAT pragma Unreferenced works" >&5 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6 rm -f conftest* @@ -15314,7 +15443,7 @@ else fi rm -f conftest* - echo "$as_me:15317: result: $cf_cv_pragma_unreferenced" >&5 + echo "$as_me:15446: 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). @@ -15367,7 +15496,7 @@ case ".$withval" in #(vi withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%` ;; *) - { { echo "$as_me:15370: error: expected a pathname, not \"$withval\"" >&5 + { { echo "$as_me:15499: error: expected a pathname, not \"$withval\"" >&5 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -15409,7 +15538,7 @@ case ".$withval" in #(vi withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%` ;; *) - { { echo "$as_me:15412: error: expected a pathname, not \"$withval\"" >&5 + { { echo "$as_me:15541: error: expected a pathname, not \"$withval\"" >&5 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} { (exit 1); exit 1; }; } ;; @@ -15434,7 +15563,7 @@ fi ### chooses to split module lists into libraries. ### ### (see CF_LIB_RULES). -echo "$as_me:15437: checking for library subsets" >&5 +echo "$as_me:15566: checking for library subsets" >&5 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6 LIB_SUBSETS= @@ -15459,7 +15588,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:15462: result: $LIB_SUBSETS" >&5 +echo "$as_me:15591: result: $LIB_SUBSETS" >&5 echo "${ECHO_T}$LIB_SUBSETS" >&6 ### Construct the list of include-directories to be generated @@ -15497,7 +15626,7 @@ elif test "$includedir" != "/usr/include"; then fi ### Build up pieces for makefile rules -echo "$as_me:15500: checking default library suffix" >&5 +echo "$as_me:15629: checking default library suffix" >&5 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6 case $DFT_LWR_MODEL in @@ -15508,10 +15637,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:15511: result: $DFT_ARG_SUFFIX" >&5 +echo "$as_me:15640: result: $DFT_ARG_SUFFIX" >&5 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6 -echo "$as_me:15514: checking default library-dependency suffix" >&5 +echo "$as_me:15643: checking default library-dependency suffix" >&5 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6 case $DFT_LWR_MODEL in @@ -15542,10 +15671,10 @@ if test $DFT_LWR_MODEL = shared ; then ;; esac fi -echo "$as_me:15545: result: $DFT_DEP_SUFFIX" >&5 +echo "$as_me:15674: result: $DFT_DEP_SUFFIX" >&5 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6 -echo "$as_me:15548: checking default object directory" >&5 +echo "$as_me:15677: checking default object directory" >&5 echo $ECHO_N "checking default object directory... $ECHO_C" >&6 case $DFT_LWR_MODEL in @@ -15561,12 +15690,12 @@ echo $ECHO_N "checking default object directory... $ECHO_C" >&6 DFT_OBJ_SUBDIR='obj_s' ;; esac esac -echo "$as_me:15564: result: $DFT_OBJ_SUBDIR" >&5 +echo "$as_me:15693: 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:15569: checking c++ library-dependency suffix" >&5 +echo "$as_me:15698: 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 @@ -15592,7 +15721,7 @@ else esac test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}" fi -echo "$as_me:15595: result: $CXX_LIB_SUFFIX" >&5 +echo "$as_me:15724: result: $CXX_LIB_SUFFIX" >&5 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6 fi @@ -15733,12 +15862,12 @@ fi ;; esac -echo "$as_me:15736: checking where we will install curses.h" >&5 +echo "$as_me:15865: 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:15741: result: $includedir" >&5 +echo "$as_me:15870: result: $includedir" >&5 echo "${ECHO_T}$includedir" >&6 ### Resolve a conflict between normal and wide-curses by forcing applications @@ -15746,7 +15875,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:15749: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5 + { echo "$as_me:15878: 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 @@ -15762,7 +15891,7 @@ EOF ### Construct the list of subdirectories for which we'll customize makefiles ### with the appropriate compile-rules. -echo "$as_me:15765: checking for src modules" >&5 +echo "$as_me:15894: checking for src modules" >&5 echo $ECHO_N "checking for src modules... $ECHO_C" >&6 # dependencies and linker-arguments for test-programs @@ -15825,7 +15954,7 @@ EOF fi fi done -echo "$as_me:15828: result: $cf_cv_src_modules" >&5 +echo "$as_me:15957: result: $cf_cv_src_modules" >&5 echo "${ECHO_T}$cf_cv_src_modules" >&6 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS" @@ -15974,18 +16103,18 @@ fi ### If we're building with rpath, try to link non-standard libs that way too. if test "$DFT_LWR_MODEL" = "shared"; then -echo "$as_me:15977: checking for updated LDFLAGS" >&5 +echo "$as_me:16106: checking for updated LDFLAGS" >&5 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6 if test -n "$LDFLAGS" ; then -echo "$as_me:15980: result: maybe" >&5 +echo "$as_me:16109: result: maybe" >&5 echo "${ECHO_T}maybe" >&6 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6 -echo "${as_me-configure}:15984: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5 +echo "${as_me-configure}:16113: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6 -echo "${as_me-configure}:15988: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5 +echo "${as_me-configure}:16117: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5 case "$EXTRA_LDFLAGS" in #(vi -Wl,-rpath,*) #(vi @@ -16007,7 +16136,7 @@ if test -n "$cf_rpath_hack" ; then do test -n "$verbose" && echo " Filtering $cf_rpath_src" 1>&6 -echo "${as_me-configure}:16010: testing Filtering $cf_rpath_src ..." 1>&5 +echo "${as_me-configure}:16139: testing Filtering $cf_rpath_src ..." 1>&5 case $cf_rpath_src in #(vi -L*) #(vi @@ -16018,7 +16147,7 @@ echo "${as_me-configure}:16010: testing Filtering $cf_rpath_src ..." 1>&5 fi test -n "$verbose" && echo " ...Filter $cf_rpath_tmp" 1>&6 -echo "${as_me-configure}:16021: testing ...Filter $cf_rpath_tmp ..." 1>&5 +echo "${as_me-configure}:16150: testing ...Filter $cf_rpath_tmp ..." 1>&5 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS" ;; @@ -16030,15 +16159,15 @@ echo "${as_me-configure}:16021: testing ...Filter $cf_rpath_tmp ..." 1>&5 LDFLAGS=$cf_rpath_dst test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6 -echo "${as_me-configure}:16033: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5 +echo "${as_me-configure}:16162: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6 -echo "${as_me-configure}:16037: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5 +echo "${as_me-configure}:16166: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5 fi else -echo "$as_me:16041: result: no" >&5 +echo "$as_me:16170: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -16148,7 +16277,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:16151: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:16280: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL @@ -16324,7 +16453,7 @@ cat >>$CONFIG_STATUS <<\EOF echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:16327: error: ambiguous option: $1 + { { echo "$as_me:16456: 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;} @@ -16343,7 +16472,7 @@ Try \`$0 --help' for more information." >&2;} ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:16346: error: unrecognized option: $1 + -*) { { echo "$as_me:16475: 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;} @@ -16439,7 +16568,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:16442: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:16571: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -16659,6 +16788,7 @@ s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t s,@cf_cv_1UL@,$cf_cv_1UL,;t t s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t +s,@TEST_LIBS@,$TEST_LIBS,;t t s,@CXXCPP@,$CXXCPP,;t t s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t s,@CXX_AR@,$CXX_AR,;t t @@ -16820,7 +16950,7 @@ done; } esac if test x"$ac_file" != x-; then - { echo "$as_me:16823: creating $ac_file" >&5 + { echo "$as_me:16953: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi @@ -16838,7 +16968,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:16841: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:16971: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -16851,7 +16981,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:16854: error: cannot find input file: $f" >&5 + { { echo "$as_me:16984: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -16917,7 +17047,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:16920: creating $ac_file" >&5 + test x"$ac_file" != x- && { echo "$as_me:17050: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the @@ -16928,7 +17058,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:16931: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:17061: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -16941,7 +17071,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:16944: error: cannot find input file: $f" >&5 + { { echo "$as_me:17074: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -16999,7 +17129,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:17002: $ac_file is unchanged" >&5 + { echo "$as_me:17132: $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 326aa1fb..8fa5e4ea 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.431 2008/03/29 18:38:08 tom Exp $ +dnl $Id: configure.in,v 1.433 2008/04/12 23:39:06 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.431 $) +AC_REVISION($Revision: 1.433 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -1252,6 +1252,17 @@ CF_SIZECHANGE CF_FUNC_MEMMOVE CF_FUNC_POLL +# special check for test/ditto.c +CF_FUNC_OPENPTY +if test "$cf_cv_func_openpty" != no ; then + AC_DEFINE_UNQUOTED(USE_OPENPTY_HEADER,<$cf_cv_func_openpty>) + AC_DEFINE(USE_XTERM_PTY) + if test "$cf_cv_lib_util" = yes ; then + TEST_LIBS="-lutil $TEST_LIBS" + fi +fi +AC_SUBST(TEST_LIBS) + if test "$with_hashed_db" != no ; then AC_DEFINE(USE_HASHED_DB) CF_HASHED_DB($with_hashed_db) diff --git a/dist.mk b/dist.mk index e592e3fc..3e0bf28c 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.637 2008/04/05 15:27:36 tom Exp $ +# $Id: dist.mk,v 1.638 2008/04/12 15:47:44 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 = 20080405 +NCURSES_PATCH = 20080412 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/man/curs_threads.3x b/man/curs_threads.3x index d15b6f7a..17dabdb7 100644 --- a/man/curs_threads.3x +++ b/man/curs_threads.3x @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_threads.3x,v 1.10 2008/04/05 23:51:41 tom Exp $ +.\" $Id: curs_threads.3x,v 1.12 2008/04/12 18:22:51 tom Exp $ .TH curs_threads 3X "" .na .hy 0 @@ -184,7 +184,7 @@ clrtobot/window (stdscr) clrtoeol/window (stdscr) color_content/screen color_set/window (stdscr) -copywin/window (both source, target) +copywin/window locks(source, target) cur_term/terminal curs_set/screen curscr/screen (readonly) @@ -196,11 +196,11 @@ del_curterm/screen delay_output/screen delch/window (stdscr) deleteln/window (stdscr) -delscreen/reentrant -delwin/reentrant +delscreen/global locks(screenlist, screen) +delwin/global locks(windowlist) derwin/screen doupdate/screen -dupwin/screen +dupwin/screen locks(window) echo/screen echo_wchar/window (stdscr) echochar/window (stdscr) @@ -249,7 +249,7 @@ inchnstr/window (stdscr) inchstr/window (stdscr) init_color/screen init_pair/screen -initscr/global +initscr/global locks(screenlist) innstr/window (stdscr) innwstr/window (stdscr) ins_nwstr/window (stdscr) @@ -377,10 +377,10 @@ mvwscanw/screen mvwvline/window mvwvline_set/window napms/reentrant -newpad/reentrant +newpad/global locks(windowlist) newscr/screen (readonly) -newterm/global -newwin/reentrant +newterm/global locks(screenlist) +newwin/global locks(windowlist) nl/screen nocbreak/screen nodelay/window @@ -394,8 +394,8 @@ numcodes/global (readonly) numfnames/global (readonly) numnames/global (readonly) ospeed/global -overlay/window (both source, target) -overwrite/window (both source, target) +overlay/window locks(source, target) +overwrite/window locks(source, target) pair_content/screen pecho_wchar/screen pechochar/screen @@ -411,7 +411,7 @@ refresh/screen reset_prog_mode/screen reset_shell_mode/screen resetty/terminal -resize_term/screen +resize_term/screen locks(windowlist) resizeterm/screen restartterm/screen ripoffline/global (static data) @@ -427,7 +427,7 @@ scrollok/window set_curterm/screen set_escdelay/screen set_tabsize/screen -set_term/reentrant +set_term/global locks(screenlist, screen) setcchar/reentrant setscrreg/window (stdscr) setupterm/global @@ -486,8 +486,8 @@ use_default_colors/screen use_env/global (static data) use_extended_names/global (static data) use_legacy_coding/screen -use_screen/reentrant -use_window/reentrant +use_screen/global locks(screenlist, screen) +use_window/global locks(windowlist, window) vid_attr/screen vid_puts/screen vidattr/screen @@ -568,7 +568,7 @@ wnoutrefresh/screen wprintw/window wredrawln/window wrefresh/screen -wresize/window +wresize/window locks(windowlist) wscanw/screen wscrl/window wsetscrreg/window diff --git a/ncurses/base/lib_initscr.c b/ncurses/base/lib_initscr.c index 38744738..ef360c03 100644 --- a/ncurses/base/lib_initscr.c +++ b/ncurses/base/lib_initscr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 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,15 +45,19 @@ #include /* needed for ISC */ #endif -MODULE_ID("$Id: lib_initscr.c,v 1.35 2007/04/21 20:43:02 tom Exp $") +MODULE_ID("$Id: lib_initscr.c,v 1.36 2008/04/12 18:11:36 tom Exp $") NCURSES_EXPORT(WINDOW *) initscr(void) { + WINDOW *result; + NCURSES_CONST char *name; START_TRACE(); T((T_CALLED("initscr()"))); + + _nc_lock_global(set_SP); /* Portable applications must not call initscr() more than once */ if (!_nc_globals.init_screen) { _nc_globals.init_screen = TRUE; @@ -86,5 +90,8 @@ initscr(void) /* def_shell_mode - done in newterm/_nc_setupscreen */ def_prog_mode(); } - returnWin(stdscr); + result = stdscr; + _nc_unlock_global(set_SP); + + returnWin(result); } diff --git a/ncurses/base/lib_newterm.c b/ncurses/base/lib_newterm.c index f52562ce..3620a3fd 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.68 2008/01/12 20:24:40 tom Exp $") +MODULE_ID("$Id: lib_newterm.c,v 1.69 2008/04/12 18:15:04 tom Exp $") #ifndef ONLCR /* Allows compilation under the QNX 4.2 OS */ #define ONLCR 0 @@ -123,17 +123,17 @@ newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp) { int value; int errret; - int slk_format = _nc_globals.slk_format; SCREEN *current; SCREEN *result = 0; START_TRACE(); T((T_CALLED("newterm(\"%s\",%p,%p)"), name, ofp, ifp)); + _nc_lock_global(set_SP); /* this loads the capability entry, then sets LINES and COLS */ - if (setupterm(name, fileno(ofp), &errret) == ERR) { - result = 0; - } else { + if (setupterm(name, fileno(ofp), &errret) != ERR) { + int slk_format = _nc_globals.slk_format; + /* * This actually allocates the screen structure, and saves the original * terminal settings. @@ -143,11 +143,7 @@ newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp) /* allow user to set maximum escape delay from the environment */ if ((value = _nc_getenv_num("ESCDELAY")) >= 0) { -#if USE_REENTRANT - SP->_ESCDELAY = value; -#else - ESCDELAY = value; -#endif + set_escdelay(value); } if (_nc_setupscreen(LINES, @@ -216,5 +212,6 @@ newterm(NCURSES_CONST char *name, FILE *ofp, FILE *ifp) result = SP; } } + _nc_unlock_global(set_SP); returnSP(result); } diff --git a/ncurses/base/lib_overlay.c b/ncurses/base/lib_overlay.c index 22bd2f80..26314de5 100644 --- a/ncurses/base/lib_overlay.c +++ b/ncurses/base/lib_overlay.c @@ -40,46 +40,46 @@ #include -MODULE_ID("$Id: lib_overlay.c,v 1.23 2007/04/07 17:13:52 tom Exp $") +MODULE_ID("$Id: lib_overlay.c,v 1.25 2008/04/12 17:21:59 tom Exp $") static int -overlap(const WINDOW *const s, WINDOW *const d, int const flag) +overlap(const WINDOW *const src, WINDOW *const dst, int const flag) { + int rc = ERR; int sx1, sy1, sx2, sy2; int dx1, dy1, dx2, dy2; int sminrow, smincol; int dminrow, dmincol; int dmaxrow, dmaxcol; - T((T_CALLED("overlap(%p,%p,%d)"), s, d, flag)); + T((T_CALLED("overlap(%p,%p,%d)"), src, dst, flag)); + + if (src != 0 && dst != 0) { + _nc_lock_window(src); + _nc_lock_window(dst); - if (s == 0 || d == 0) { - returnCode(ERR); - } else { T(("src : begy %ld, begx %ld, maxy %ld, maxx %ld", - (long) s->_begy, - (long) s->_begx, - (long) s->_maxy, - (long) s->_maxx)); + (long) src->_begy, + (long) src->_begx, + (long) src->_maxy, + (long) src->_maxx)); T(("dst : begy %ld, begx %ld, maxy %ld, maxx %ld", - (long) d->_begy, - (long) d->_begx, - (long) d->_maxy, - (long) d->_maxx)); - - sx1 = s->_begx; - sy1 = s->_begy; - sx2 = sx1 + s->_maxx; - sy2 = sy1 + s->_maxy; - - dx1 = d->_begx; - dy1 = d->_begy; - dx2 = dx1 + d->_maxx; - dy2 = dy1 + d->_maxy; - - if (dx2 < sx1 || dx1 > sx2 || dy2 < sy1 || dy1 > sy2) { - returnCode(ERR); /* No intersection */ - } else { + (long) dst->_begy, + (long) dst->_begx, + (long) dst->_maxy, + (long) dst->_maxx)); + + sx1 = src->_begx; + sy1 = src->_begy; + sx2 = sx1 + src->_maxx; + sy2 = sy1 + src->_maxy; + + dx1 = dst->_begx; + dy1 = dst->_begy; + dx2 = dx1 + dst->_maxx; + dy2 = dy1 + dst->_maxy; + + if (dx2 >= sx1 && dx1 <= sx2 && dy2 >= sy1 && dy1 <= sy2) { sminrow = max(sy1, dy1) - sy1; smincol = max(sx1, dx1) - sx1; dminrow = max(sy1, dy1) - dy1; @@ -87,13 +87,16 @@ overlap(const WINDOW *const s, WINDOW *const d, int const flag) dmaxrow = min(sy2, dy2) - dy1; dmaxcol = min(sx2, dx2) - dx1; - returnCode(copywin(s, d, - sminrow, smincol, - dminrow, dmincol, - dmaxrow, dmaxcol, - flag)); + rc = copywin(src, dst, + sminrow, smincol, + dminrow, dmincol, + dmaxrow, dmaxcol, + flag); } + _nc_unlock_window(dst); + _nc_unlock_window(src); } + returnCode(rc); } /* @@ -137,6 +140,7 @@ copywin(const WINDOW *src, WINDOW *dst, int dmaxrow, int dmaxcol, int over) { + int rc = ERR; int sx, sy, dx, dy; bool touched; attr_t bk; @@ -145,49 +149,63 @@ copywin(const WINDOW *src, WINDOW *dst, T((T_CALLED("copywin(%p, %p, %d, %d, %d, %d, %d, %d, %d)"), src, dst, sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol, over)); - if (!src || !dst) - returnCode(ERR); - - bk = AttrOf(dst->_nc_bkgd); - mask = ~(attr_t) ((bk & A_COLOR) ? A_COLOR : 0); - - /* make sure rectangle exists in source */ - if ((sminrow + dmaxrow - dminrow) > (src->_maxy + 1) || - (smincol + dmaxcol - dmincol) > (src->_maxx + 1)) { - returnCode(ERR); - } - - T(("rectangle exists in source")); - - /* make sure rectangle fits in destination */ - if (dmaxrow > dst->_maxy || dmaxcol > dst->_maxx) { - returnCode(ERR); - } - - T(("rectangle fits in destination")); - - for (dy = dminrow, sy = sminrow; dy <= dmaxrow; sy++, dy++) { - touched = FALSE; - for (dx = dmincol, sx = smincol; dx <= dmaxcol; sx++, dx++) { - if (over) { - if ((CharOf(src->_line[sy].text[sx]) != L(' ')) && - (!CharEq(dst->_line[dy].text[dx], src->_line[sy].text[sx]))) { - dst->_line[dy].text[dx] = src->_line[sy].text[sx]; - SetAttr(dst->_line[dy].text[dx], - (AttrOf(src->_line[sy].text[sx]) & mask) | bk); - touched = TRUE; - } - } else { - if (!CharEq(dst->_line[dy].text[dx], src->_line[sy].text[sx])) { - dst->_line[dy].text[dx] = src->_line[sy].text[sx]; - touched = TRUE; + if (src && dst) { + + _nc_lock_window(src); + _nc_lock_window(dst); + + bk = AttrOf(dst->_nc_bkgd); + mask = ~(attr_t) ((bk & A_COLOR) ? A_COLOR : 0); + + /* make sure rectangle exists in source */ + if ((sminrow + dmaxrow - dminrow) <= (src->_maxy + 1) && + (smincol + dmaxcol - dmincol) <= (src->_maxx + 1)) { + + T(("rectangle exists in source")); + + /* make sure rectangle fits in destination */ + if (dmaxrow <= dst->_maxy && dmaxcol <= dst->_maxx) { + + T(("rectangle fits in destination")); + + for (dy = dminrow, sy = sminrow; + dy <= dmaxrow; + sy++, dy++) { + + touched = FALSE; + for (dx = dmincol, sx = smincol; + dx <= dmaxcol; + sx++, dx++) { + if (over) { + if ((CharOf(src->_line[sy].text[sx]) != L(' ')) && + (!CharEq(dst->_line[dy].text[dx], + src->_line[sy].text[sx]))) { + dst->_line[dy].text[dx] = + src->_line[sy].text[sx]; + SetAttr(dst->_line[dy].text[dx], + ((AttrOf(src->_line[sy].text[sx]) & + mask) | bk)); + touched = TRUE; + } + } else { + if (!CharEq(dst->_line[dy].text[dx], + src->_line[sy].text[sx])) { + dst->_line[dy].text[dx] = + src->_line[sy].text[sx]; + touched = TRUE; + } + } + } + if (touched) { + touchline(dst, dminrow, (dmaxrow - dminrow + 1)); + } } + T(("finished copywin")); + rc = OK; } } - if (touched) { - touchline(dst, dminrow, (dmaxrow - dminrow + 1)); - } + _nc_unlock_window(dst); + _nc_unlock_window(src); } - T(("finished copywin")); - returnCode(OK); + returnCode(rc); } diff --git a/ncurses/base/lib_window.c b/ncurses/base/lib_window.c index 530b08e5..ac61cb01 100644 --- a/ncurses/base/lib_window.c +++ b/ncurses/base/lib_window.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 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 -MODULE_ID("$Id: lib_window.c,v 1.23 2007/06/30 23:36:11 tom Exp $") +MODULE_ID("$Id: lib_window.c,v 1.24 2008/04/12 22:40:21 tom Exp $") NCURSES_EXPORT(void) _nc_synchook(WINDOW *win) @@ -186,6 +186,7 @@ dupwin(WINDOW *win) if (win != 0) { + _nc_lock_window(win); if (win->_flags & _ISPAD) { nwin = newpad(win->_maxy + 1, win->_maxx + 1); @@ -243,6 +244,7 @@ dupwin(WINDOW *win) nwin->_line[i].lastchar = win->_line[i].lastchar; } } + _nc_unlock_window(win); } returnWin(nwin); } diff --git a/ncurses/base/use_window.c b/ncurses/base/use_window.c index 36578dd9..4d2c1366 100644 --- a/ncurses/base/use_window.c +++ b/ncurses/base/use_window.c @@ -32,11 +32,11 @@ #include -MODULE_ID("$Id: use_window.c,v 1.5 2008/03/29 20:24:15 tom Exp $") +MODULE_ID("$Id: use_window.c,v 1.6 2008/04/12 17:16:05 tom Exp $") #ifdef USE_PTHREADS NCURSES_EXPORT(void) -_nc_lock_window(WINDOW *win) +_nc_lock_window(const WINDOW *win) { WINDOWLIST *p; @@ -50,7 +50,7 @@ _nc_lock_window(WINDOW *win) } NCURSES_EXPORT(void) -_nc_unlock_window(WINDOW *win) +_nc_unlock_window(const WINDOW *win) { WINDOWLIST *p; diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index bd2dc32c..b4345602 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -34,7 +34,7 @@ /* - * $Id: curses.priv.h,v 1.361 2008/03/29 21:14:14 tom Exp $ + * $Id: curses.priv.h,v 1.363 2008/04/12 17:16:26 tom Exp $ * * curses.priv.h * @@ -323,8 +323,8 @@ extern NCURSES_EXPORT(int) _nc_mutex_unlock(pthread_mutex_t *); #define _nc_try_global(name) _nc_mutex_trylock(&_nc_globals.mutex_##name) #define _nc_unlock_global(name) _nc_mutex_unlock(&_nc_globals.mutex_##name) -extern NCURSES_EXPORT(void) _nc_lock_window(WINDOW *); -extern NCURSES_EXPORT(void) _nc_unlock_window(WINDOW *); +extern NCURSES_EXPORT(void) _nc_lock_window(const WINDOW *); +extern NCURSES_EXPORT(void) _nc_unlock_window(const WINDOW *); #else #error POSIX threads requires --enable-reentrant option @@ -627,7 +627,7 @@ extern NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals; #define N_RIPS 5 /* - * Global data which is swept up into a SCREEN when one is created. + * Global data which can be swept up into a SCREEN when one is created. * It may be modified before the next SCREEN is created. */ typedef struct { @@ -866,7 +866,7 @@ struct screen { int _LINES; int _COLS; #ifdef TRACE - int _outchars; + long _outchars; const char *_tputs_trace; #endif #endif diff --git a/test/Makefile.in b/test/Makefile.in index 600954f8..787b3deb 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.97 2007/04/28 15:28:28 tom Exp $ +# $Id: Makefile.in,v 1.98 2008/04/12 20:44:47 tom Exp $ ############################################################################## -# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. # +# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -75,6 +75,7 @@ ABI_VERSION = @cf_cv_abi_version@ LOCAL_LIBDIR = @top_builddir@/lib LOCAL_LIBS = @TEST_DEPS@ MATH_LIB = @MATH_LIB@ +TEST_LIBS = @TEST_LIBS@ LD = @LD@ LINK = @LINK_TESTS@ $(LIBTOOL_LINK) $(CFLAGS) @@ -90,15 +91,15 @@ LDFLAGS_SHARED = $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@ TEST_ARGS = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@ # use these for linking with all of the libraries -LIBS_DEFAULT = $(TEST_ARGS) @LIBS@ $(MATH_LIB) +LIBS_DEFAULT = $(TEST_ARGS) @LIBS@ $(TEST_LIBS) $(MATH_LIB) LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_DEFAULT) # use these for linking with the (n)curses library -LIBS_CURSES = `echo "$(TEST_ARGS) @LIBS@" | sed -e 's/-lform.*-lpanel[^ ]*//'` $(MATH_LIB) +LIBS_CURSES = `echo "$(TEST_ARGS) @LIBS@" | sed -e 's/-lform.*-lpanel[^ ]*//'` $(TEST_LIBS) $(MATH_LIB) LDFLAGS_CURSES = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_CURSES) # use these for linking with the tinfo library if we have it, or curses library if not -LIBS_TINFO = @LDFLAGS_STATIC@ @TINFO_ARGS@ @LDFLAGS_SHARED@ @LIBS@ $(MATH_LIB) +LIBS_TINFO = @LDFLAGS_STATIC@ @TINFO_ARGS@ @LDFLAGS_SHARED@ @LIBS@ $(TEST_LIBS) $(MATH_LIB) LDFLAGS_TINFO = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TINFO) LINT = @LINT@ diff --git a/test/cardfile.c b/test/cardfile.c index dc878413..a0034728 100644 --- a/test/cardfile.c +++ b/test/cardfile.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1999-2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 1999-2007,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -29,7 +29,7 @@ /* * Author: Thomas E. Dickey * - * $Id: cardfile.c,v 1.32 2007/08/11 16:34:27 tom Exp $ + * $Id: cardfile.c,v 1.33 2008/04/12 22:05:53 tom Exp $ * * File format: text beginning in column 1 is a title; other text is content. */ @@ -73,7 +73,7 @@ static char default_name[] = "cardfile.dat"; static char * strdup(const char *s) { - char *p = (char *) malloc(strlen(s) + 1); + char *p = typeMalloc(char, strlen(s) + 1); if (p) strcpy(p, s); return (p); @@ -111,7 +111,7 @@ add_title(const char *title) break; } - card = (CARD *) calloc(1, sizeof(CARD)); + card = typeCalloc(CARD, 1); card->title = strdup(title); card->content = strdup(""); @@ -135,13 +135,13 @@ add_content(CARD * card, const char *content) if ((total = strlen(content)) != 0) { if ((offset = strlen(card->content)) != 0) { total += 1 + offset; - card->content = (char *) realloc(card->content, total + 1); + card->content = typeRealloc(char, total + 1, card->content); if (card->content) strcpy(card->content + offset++, " "); } else { if (card->content != 0) free(card->content); - card->content = (char *) malloc(total + 1); + card->content = typeMalloc(char, total + 1); } if (card->content) strcpy(card->content + offset, content); @@ -336,7 +336,7 @@ form_virtualize(WINDOW *w) static FIELD ** make_fields(CARD * p, int form_high, int form_wide) { - FIELD **f = (FIELD **) calloc(3, sizeof(FIELD *)); + FIELD **f = typeCalloc(FIELD *, 3); f[0] = new_field(1, form_wide, 0, 0, 0, 0); set_field_back(f[0], A_REVERSE); diff --git a/test/demo_altkeys.c b/test/demo_altkeys.c index 001e2d14..9d46ac09 100644 --- a/test/demo_altkeys.c +++ b/test/demo_altkeys.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 2005-2006,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_altkeys.c,v 1.7 2006/12/09 16:49:49 tom Exp $ + * $Id: demo_altkeys.c,v 1.8 2008/04/12 22:06:22 tom Exp $ * * Demonstrate the define_key() function. * Thomas Dickey - 2005/10/22 @@ -110,7 +110,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) for (n = KEY_MIN; n < KEY_MAX; ++n) { char *value; if ((value = keybound(n, 0)) != 0) { - char *temp = malloc(strlen(value) + 2); + char *temp = typeMalloc(char, strlen(value) + 2); sprintf(temp, "\033%s", value); define_key(temp, n + MY_KEYS); free(temp); diff --git a/test/demo_defkey.c b/test/demo_defkey.c index 00c1cf30..e49ac298 100644 --- a/test/demo_defkey.c +++ b/test/demo_defkey.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2002-2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 2002-2007,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_defkey.c,v 1.17 2007/04/07 17:13:03 tom Exp $ + * $Id: demo_defkey.c,v 1.18 2008/04/12 22:06:12 tom Exp $ * * Demonstrate the define_key() function. * Thomas Dickey - 2002/11/23 @@ -112,10 +112,10 @@ visible(const char *string) need += strlen(temp); } if (!pass) - result = (char *) calloc(need, 1); + result = typeCalloc(char, need); } } else { - result = (char *) calloc(1, 1); + result = typeCalloc(char, 1); } return result; } diff --git a/test/demo_menus.c b/test/demo_menus.c index d572b2d1..34d582ed 100644 --- a/test/demo_menus.c +++ b/test/demo_menus.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_menus.c,v 1.23 2008/02/23 23:06:49 tom Exp $ + * $Id: demo_menus.c,v 1.24 2008/04/12 22:03:33 tom Exp $ * * Demonstrate a variety of functions from the menu library. * Thomas Dickey - 2005/4/9 @@ -112,7 +112,7 @@ static MENU *mpSelect; static char * strdup(char *s) { - char *p = (char *) malloc(strlen(s) + 1); + char *p = typeMalloc(char, strlen(s) + 1); if (p) strcpy(p, s); return (p); @@ -349,11 +349,10 @@ build_select_menu(MenuNo number, char *filename) && sb.st_size != 0) { unsigned size = sb.st_size; unsigned j, k; - char *blob = malloc(size + 1); - CONST_MENUS char **list = - (CONST_MENUS char **) calloc(sizeof(*list), size + 1); + char *blob = typeMalloc(char, size + 1); + CONST_MENUS char **list = typeCalloc(CONST_MENUS char *, size + 1); - items = (ITEM **) calloc(sizeof(ITEM *), size + 1); + items = typeCalloc(ITEM *, size + 1); if (blob != 0 && list != 0) { FILE *fp = fopen(filename, "r"); if (fp != 0) { @@ -384,7 +383,7 @@ build_select_menu(MenuNo number, char *filename) } if (ap == 0) { count = SIZEOF(labels) - 1; - items = (ITEM **) calloc(count + 1, sizeof(*items)); + items = typeCalloc(ITEM *, count + 1); ap = labels; } @@ -457,7 +456,7 @@ tracetrace(unsigned tlevel) size_t need = 12; for (n = 0; t_tbl[n].name != 0; n++) need += strlen(t_tbl[n].name) + 2; - buf = (char *) malloc(need); + buf = typeMalloc(char, need); } sprintf(buf, "0x%02x = {", tlevel); if (tlevel == 0) { diff --git a/test/demo_panels.c b/test/demo_panels.c index b4594fb4..2adc690e 100755 --- a/test/demo_panels.c +++ b/test/demo_panels.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_panels.c,v 1.29 2008/02/09 23:05:37 tom Exp $ + * $Id: demo_panels.c,v 1.30 2008/04/12 21:59:49 tom Exp $ * * Demonstrate a variety of functions from the panel library. */ @@ -205,7 +205,7 @@ mkpanel(short color, int rows, int cols, int tly, int tlx) { WINDOW *win; PANEL *pan = 0; - char *userdata = malloc(3); + char *userdata = typeMalloc(char, 3); if ((win = newwin(rows, cols, tly, tlx)) != 0) { keypad(win, TRUE); diff --git a/test/ditto.c b/test/ditto.c index 1a06feae..34ef6a53 100644 --- a/test/ditto.c +++ b/test/ditto.c @@ -29,7 +29,7 @@ /* * Author: Thomas E. Dickey 1998 * - * $Id: ditto.c,v 1.14 2008/03/29 21:35:39 tom Exp $ + * $Id: ditto.c,v 1.19 2008/04/12 23:37:32 tom Exp $ * * The program illustrates how to set up multiple screens from a single * program. Invoke the program by specifying another terminal on the same @@ -40,6 +40,10 @@ #include #include +#ifdef USE_XTERM_PTY +#include USE_OPENPTY_HEADER +#endif + typedef struct { FILE *input; FILE *output; @@ -64,6 +68,26 @@ static FILE * open_tty(char *path) { FILE *fp; +#ifdef USE_XTERM_PTY + int amaster; + int aslave; + char slave_name[1024]; + char s_option[1024]; + char *leaf; + + if (openpty(&amaster, &aslave, slave_name, 0, 0) != 0) + failed("openpty"); + if ((leaf = strrchr(slave_name, '/')) == 0) { + errno = EISDIR; + failed(slave_name); + } + sprintf(s_option, "-S%s/%d", slave_name, aslave); + if (fork()) { + execlp("xterm", "xterm", s_option, "-title", path, (char *) 0); + _exit(0); + } + fp = fdopen(amaster, "r+"); +#else struct stat sb; if (stat(path, &sb) < 0) @@ -76,6 +100,7 @@ open_tty(char *path) if (fp == 0) failed(path); printf("opened %s\n", path); +#endif return fp; } @@ -122,7 +147,7 @@ main(int argc GCC_UNUSED, if (argc <= 1) usage(); - if ((data = (DITTO *) calloc((unsigned) argc, sizeof(DITTO))) == 0) + if ((data = typeCalloc(DITTO, argc)) == 0) failed("calloc data"); data[0].input = stdin; @@ -160,7 +185,6 @@ main(int argc GCC_UNUSED, napms(20); ch = USING_SCREEN(data[which].screen, read_screen, 0); if (ch == ERR) { - /* echochar('.'); */ continue; } if (ch == CTRL('D')) @@ -174,6 +198,9 @@ main(int argc GCC_UNUSED, */ for (j = argc - 1; j >= 0; j--) { USING_SCREEN(data[j].screen, close_screen, 0); + fprintf(data[j].output, "**Closed\r\n"); + fflush(data[j].output); + fclose(data[j].output); delscreen(data[j].screen); } ExitProgram(EXIT_SUCCESS); diff --git a/test/echochar.c b/test/echochar.c index a8203821..d4de7eef 100644 --- a/test/echochar.c +++ b/test/echochar.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 2006-2007,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: echochar.c,v 1.5 2007/07/21 17:41:55 tom Exp $ + * $Id: echochar.c,v 1.6 2008/04/12 22:06:04 tom Exp $ * * Demonstrate the echochar function (compare to dots.c). * Thomas Dickey - 2006/11/4 @@ -107,7 +107,7 @@ main( if (use_colors) { start_color(); if (COLOR_PAIRS > 0) { - my_pairs = calloc((unsigned) COLOR_PAIRS, sizeof(*my_pairs)); + my_pairs = typeCalloc(char, COLOR_PAIRS); } use_colors = (my_pairs != 0); } diff --git a/test/movewindow.c b/test/movewindow.c index a45121db..d826e58d 100644 --- a/test/movewindow.c +++ b/test/movewindow.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: movewindow.c,v 1.21 2008/02/09 18:08:28 tom Exp $ + * $Id: movewindow.c,v 1.22 2008/04/12 22:01:41 tom Exp $ * * Demonstrate move functions for windows and derived windows from the curses * library. @@ -251,7 +251,7 @@ add_window(WINDOW *parent, WINDOW *child) keypad(child, TRUE); if (need > have) { - all_windows = (FRAME *) realloc(all_windows, need * sizeof(FRAME)); + all_windows = typeRealloc(FRAME, need, all_windows); } all_windows[num_windows].parent = parent; all_windows[num_windows].child = child; diff --git a/test/ncurses.c b/test/ncurses.c index 752fe87d..14e3c82e 100644 --- a/test/ncurses.c +++ b/test/ncurses.c @@ -40,7 +40,7 @@ AUTHOR Author: Eric S. Raymond 1993 Thomas E. Dickey (beginning revision 1.27 in 1996). -$Id: ncurses.c,v 1.312 2008/03/22 23:02:57 tom Exp $ +$Id: ncurses.c,v 1.313 2008/04/12 22:04:42 tom Exp $ ***************************************************************************/ @@ -637,10 +637,10 @@ remember_boxes(unsigned level, WINDOW *txt_win, WINDOW *box_win) if (winstack == 0) { len_winstack = 20; - winstack = (WINSTACK *) malloc(len_winstack * sizeof(WINSTACK)); + winstack = typeMalloc(WINSTACK, len_winstack); } else if (need >= len_winstack) { len_winstack = need; - winstack = (WINSTACK *) realloc(winstack, len_winstack * sizeof(WINSTACK)); + winstack = typeRealloc(WINSTACK, len_winstack, winstack); } winstack[level].text = txt_win; winstack[level].frame = box_win; @@ -933,7 +933,7 @@ wcstos(const wchar_t *src) memset(&state, 0, sizeof(state)); if ((need = wcsrtombs(0, &tmp, 0, &state)) > 0) { unsigned have = need; - result = (char *) calloc(have + 1, 1); + result = typeCalloc(char, have + 1); tmp = src; if (wcsrtombs(result, &tmp, have, &state) != have) { free(result); @@ -3872,7 +3872,7 @@ acs_and_scroll(void) transient((FRAME *) 0, (char *) 0); switch (c) { case CTRL('C'): - neww = (FRAME *) calloc(1, sizeof(FRAME)); + neww = typeCalloc(FRAME, 1); if ((neww->wind = getwindow()) == (WINDOW *) 0) goto breakout; @@ -3948,7 +3948,7 @@ acs_and_scroll(void) if ((fp = fopen(DUMPFILE, "r")) == (FILE *) 0) { transient(current, "Can't open screen dump file"); } else { - neww = (FRAME *) calloc(1, sizeof(FRAME)); + neww = typeCalloc(FRAME, 1); neww->next = current->next; neww->last = current; @@ -5125,7 +5125,7 @@ tracetrace(unsigned tlevel) size_t need = 12; for (n = 0; t_tbl[n].name != 0; n++) need += strlen(t_tbl[n].name) + 2; - buf = (char *) malloc(need); + buf = typeMalloc(char, need); } sprintf(buf, "0x%02x = {", tlevel); if (tlevel == 0) { @@ -6454,7 +6454,7 @@ main(int argc, char *argv[]) if (can_change_color()) { short cp; - all_colors = (RGB_DATA *) malloc(max_colors * sizeof(RGB_DATA)); + all_colors = typeMalloc(RGB_DATA, max_colors); for (cp = 0; cp < max_colors; ++cp) { color_content(cp, &all_colors[cp].red, diff --git a/test/test.priv.h b/test/test.priv.h index 08434c8a..20ffbe89 100644 --- a/test/test.priv.h +++ b/test/test.priv.h @@ -29,7 +29,7 @@ /**************************************************************************** * Author: Thomas E. Dickey 1996-on * ****************************************************************************/ -/* $Id: test.priv.h,v 1.76 2008/03/29 20:29:10 tom Exp $ */ +/* $Id: test.priv.h,v 1.77 2008/04/12 19:25:48 tom Exp $ */ #ifndef __TEST_PRIV_H #define __TEST_PRIV_H 1 @@ -449,6 +449,7 @@ extern int optind; #endif #else #define typeMalloc(type,n) (type *) malloc((n) * sizeof(type)) +#define typeCalloc(type,elts) (type *) calloc((elts), sizeof(type)) #define typeRealloc(type,n,p) (type *) realloc(p, (n) * sizeof(type)) #endif diff --git a/test/testcurs.c b/test/testcurs.c index bf602bff..2f3368c1 100644 --- a/test/testcurs.c +++ b/test/testcurs.c @@ -7,7 +7,7 @@ * wrs(5/28/93) -- modified to be consistent (perform identically) with either * PDCurses or under Unix System V, R4 * - * $Id: testcurs.c,v 1.37 2005/12/31 20:23:09 tom Exp $ + * $Id: testcurs.c,v 1.38 2008/04/12 22:00:27 tom Exp $ */ #include @@ -51,7 +51,7 @@ static const COMMAND command[] = static char * strdup(char *s) { - char *p = (char *) malloc(strlen(s) + 1); + char *p = typeMalloc(char, strlen(s) + 1); if (p) strcpy(p, s); return (p); diff --git a/test/xmas.c b/test/xmas.c index 144ccea2..9b66cca7 100644 --- a/test/xmas.c +++ b/test/xmas.c @@ -92,7 +92,7 @@ /******************************************************************************/ /* - * $Id: xmas.c,v 1.22 2006/05/20 15:35:47 tom Exp $ + * $Id: xmas.c,v 1.23 2008/04/12 22:05:04 tom Exp $ */ #include @@ -156,7 +156,7 @@ set_color(WINDOW *win, chtype color) if (has_colors()) { int n = (color + 1); if (my_pairs == 0) - my_pairs = (bool *) calloc((unsigned) (COLORS + 1), sizeof(bool)); + my_pairs = typeCalloc(bool, COLORS + 1); if (!my_pairs[n]) { init_pair(n, color, my_bg); my_pairs[n] = TRUE; -- 2.44.0