mirror of
https://github.com/Aigor44/ncursesw-morphos.git
synced 2024-12-15 07:30:12 +08:00
ncurses 5.7 - patch 20101113
+ compiler warning fixes for test programs. + various build-fixes for test-programs with pdcurses. + updated configure checks for X packages in test/configure from xterm #267 changes. + add configure check to gnatmake, to accommodate cygwin.
This commit is contained in:
parent
90e3b6f9d5
commit
52aa842907
115
Ada95/aclocal.m4
vendored
115
Ada95/aclocal.m4
vendored
@ -28,7 +28,7 @@ dnl***************************************************************************
|
||||
dnl
|
||||
dnl Author: Thomas E. Dickey
|
||||
dnl
|
||||
dnl $Id: aclocal.m4,v 1.17 2010/10/23 20:21:59 tom Exp $
|
||||
dnl $Id: aclocal.m4,v 1.18 2010/11/13 19:19:59 tom Exp $
|
||||
dnl Macros used in NCURSES Ada95 auto-configuration script.
|
||||
dnl
|
||||
dnl These macros are maintained separately from NCURSES. The copyright on
|
||||
@ -1040,6 +1040,34 @@ rm -rf conftest*
|
||||
AC_SUBST(EXTRA_CFLAGS)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_GNAT_GENERICS version: 1 updated: 2010/11/13 14:15:18
|
||||
dnl ----------------
|
||||
AC_DEFUN([CF_GNAT_GENERICS],
|
||||
[
|
||||
AC_MSG_CHECKING(if GNAT supports generics)
|
||||
case $cf_gnat_version in #(vi
|
||||
3.[[1-9]]*|[[4-9]].*) #(vi
|
||||
cf_gnat_generics=yes
|
||||
;;
|
||||
*)
|
||||
cf_gnat_generics=no
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT($cf_gnat_generics)
|
||||
|
||||
if test "$cf_gnat_generics" = yes
|
||||
then
|
||||
cf_compile_generics=generics
|
||||
cf_generic_objects="\${GENOBJS}"
|
||||
else
|
||||
cf_compile_generics=
|
||||
cf_generic_objects=
|
||||
fi
|
||||
|
||||
AC_SUBST(cf_compile_generics)
|
||||
AC_SUBST(cf_generic_objects)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_GNAT_PRAGMA_UNREF version: 1 updated: 2010/06/19 15:22:18
|
||||
dnl --------------------
|
||||
dnl Check if the gnat pragma "Unreferenced" works.
|
||||
@ -1069,6 +1097,41 @@ fi
|
||||
AC_SUBST(PRAGMA_UNREF)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_GNAT_PROJECTS version: 1 updated: 2010/11/13 14:15:18
|
||||
dnl ----------------
|
||||
AC_DEFUN([CF_GNAT_PROJECTS],
|
||||
[
|
||||
AC_MSG_CHECKING(if GNAT supports project files)
|
||||
case $cf_gnat_version in #(vi
|
||||
3.[[0-9]]*) #(vi
|
||||
cf_gnat_projects=no
|
||||
;;
|
||||
*)
|
||||
case $cf_cv_system_name in #(vi
|
||||
cygwin*) #(vi
|
||||
cf_gnat_projects=no
|
||||
;;
|
||||
*)
|
||||
cf_gnat_projects=yes
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT($cf_gnat_projects)
|
||||
|
||||
if test "$cf_gnat_projects" = yes
|
||||
then
|
||||
USE_OLD_MAKERULES="#"
|
||||
USE_GNAT_PROJECTS=""
|
||||
else
|
||||
USE_OLD_MAKERULES=""
|
||||
USE_GNAT_PROJECTS="#"
|
||||
fi
|
||||
|
||||
AC_SUBST(USE_OLD_MAKERULES)
|
||||
AC_SUBST(USE_GNAT_PROJECTS)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_GNAT_TRY_LINK version: 2 updated: 2010/08/14 18:25:37
|
||||
dnl ----------------
|
||||
dnl Verify that a test program compiles/links with GNAT.
|
||||
@ -1127,51 +1190,29 @@ fi
|
||||
rm -rf conftest*
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_GNAT_VERSION version: 15 updated: 2010/10/23 15:52:32
|
||||
dnl CF_GNAT_VERSION version: 16 updated: 2010/11/13 14:15:18
|
||||
dnl ---------------
|
||||
dnl Verify version of GNAT.
|
||||
AC_DEFUN([CF_GNAT_VERSION],
|
||||
[
|
||||
AC_MSG_CHECKING(for gnat version)
|
||||
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/ .*//'`
|
||||
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/ .*//'`
|
||||
AC_MSG_RESULT($cf_gnat_version)
|
||||
|
||||
case $cf_gnat_version in
|
||||
3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*)
|
||||
cf_cv_prog_gnat_correct=yes
|
||||
;;
|
||||
*) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
|
||||
cf_cv_prog_gnat_correct=no
|
||||
;;
|
||||
case $cf_gnat_version in #(vi
|
||||
3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*) #(vi
|
||||
cf_cv_prog_gnat_correct=yes
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN(Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding.)
|
||||
cf_cv_prog_gnat_correct=no
|
||||
;;
|
||||
esac
|
||||
|
||||
case $cf_gnat_version in
|
||||
3.[[1-9]]*|[[4-9]].*)
|
||||
cf_compile_generics=generics
|
||||
cf_generic_objects="\${GENOBJS}"
|
||||
;;
|
||||
*) cf_compile_generics=
|
||||
cf_generic_objects=
|
||||
;;
|
||||
esac
|
||||
|
||||
case $cf_gnat_version in
|
||||
3.[[0-9]]*)
|
||||
USE_OLD_MAKERULES=""
|
||||
USE_GNAT_PROJECTS="#"
|
||||
;;
|
||||
*)
|
||||
USE_OLD_MAKERULES="#"
|
||||
USE_GNAT_PROJECTS=""
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(cf_compile_generics)
|
||||
AC_SUBST(cf_generic_objects)
|
||||
|
||||
AC_SUBST(USE_OLD_MAKERULES)
|
||||
AC_SUBST(USE_GNAT_PROJECTS)
|
||||
CF_GNAT_GENERICS
|
||||
CF_GNAT_PROJECTS
|
||||
])
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_GNU_SOURCE version: 6 updated: 2005/07/09 13:23:07
|
||||
|
157
Ada95/configure
vendored
157
Ada95/configure
vendored
@ -10624,44 +10624,77 @@ else
|
||||
|
||||
echo "$as_me:10625: 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:10629: result: $cf_gnat_version" >&5
|
||||
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:10630: result: $cf_gnat_version" >&5
|
||||
echo "${ECHO_T}$cf_gnat_version" >&6
|
||||
|
||||
case $cf_gnat_version in
|
||||
3.1[1-9]*|3.[2-9]*|[4-9].*)
|
||||
cf_cv_prog_gnat_correct=yes
|
||||
;;
|
||||
*) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
|
||||
cf_cv_prog_gnat_correct=no
|
||||
;;
|
||||
case $cf_gnat_version in #(vi
|
||||
3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
|
||||
cf_cv_prog_gnat_correct=yes
|
||||
;;
|
||||
*)
|
||||
{ echo "$as_me:10638: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
|
||||
echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
|
||||
cf_cv_prog_gnat_correct=no
|
||||
;;
|
||||
esac
|
||||
|
||||
case $cf_gnat_version in
|
||||
3.[1-9]*|[4-9].*)
|
||||
cf_compile_generics=generics
|
||||
cf_generic_objects="\${GENOBJS}"
|
||||
;;
|
||||
*) cf_compile_generics=
|
||||
cf_generic_objects=
|
||||
;;
|
||||
echo "$as_me:10644: checking if GNAT supports generics" >&5
|
||||
echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
|
||||
case $cf_gnat_version in #(vi
|
||||
3.[1-9]*|[4-9].*) #(vi
|
||||
cf_gnat_generics=yes
|
||||
;;
|
||||
*)
|
||||
cf_gnat_generics=no
|
||||
;;
|
||||
esac
|
||||
echo "$as_me:10654: result: $cf_gnat_generics" >&5
|
||||
echo "${ECHO_T}$cf_gnat_generics" >&6
|
||||
|
||||
case $cf_gnat_version in
|
||||
3.[0-9]*)
|
||||
USE_OLD_MAKERULES=""
|
||||
USE_GNAT_PROJECTS="#"
|
||||
;;
|
||||
*)
|
||||
USE_OLD_MAKERULES="#"
|
||||
USE_GNAT_PROJECTS=""
|
||||
;;
|
||||
if test "$cf_gnat_generics" = yes
|
||||
then
|
||||
cf_compile_generics=generics
|
||||
cf_generic_objects="\${GENOBJS}"
|
||||
else
|
||||
cf_compile_generics=
|
||||
cf_generic_objects=
|
||||
fi
|
||||
|
||||
echo "$as_me:10666: checking if GNAT supports project files" >&5
|
||||
echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
|
||||
case $cf_gnat_version in #(vi
|
||||
3.[0-9]*) #(vi
|
||||
cf_gnat_projects=no
|
||||
;;
|
||||
*)
|
||||
case $cf_cv_system_name in #(vi
|
||||
cygwin*) #(vi
|
||||
cf_gnat_projects=no
|
||||
;;
|
||||
*)
|
||||
cf_gnat_projects=yes
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
echo "$as_me:10683: result: $cf_gnat_projects" >&5
|
||||
echo "${ECHO_T}$cf_gnat_projects" >&6
|
||||
|
||||
if test "$cf_gnat_projects" = yes
|
||||
then
|
||||
USE_OLD_MAKERULES="#"
|
||||
USE_GNAT_PROJECTS=""
|
||||
else
|
||||
USE_OLD_MAKERULES=""
|
||||
USE_GNAT_PROJECTS="#"
|
||||
fi
|
||||
|
||||
# Extract the first word of "m4", so it can be a program name with args.
|
||||
set dummy m4; ac_word=$2
|
||||
echo "$as_me:10664: checking for $ac_word" >&5
|
||||
echo "$as_me:10697: 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
|
||||
@ -10676,7 +10709,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:10679: found $ac_dir/$ac_word" >&5
|
||||
echo "$as_me:10712: found $ac_dir/$ac_word" >&5
|
||||
break
|
||||
done
|
||||
|
||||
@ -10685,10 +10718,10 @@ fi
|
||||
fi
|
||||
M4_exists=$ac_cv_prog_M4_exists
|
||||
if test -n "$M4_exists"; then
|
||||
echo "$as_me:10688: result: $M4_exists" >&5
|
||||
echo "$as_me:10721: result: $M4_exists" >&5
|
||||
echo "${ECHO_T}$M4_exists" >&6
|
||||
else
|
||||
echo "$as_me:10691: result: no" >&5
|
||||
echo "$as_me:10724: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
fi
|
||||
|
||||
@ -10697,7 +10730,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:10700: checking if GNAT works" >&5
|
||||
echo "$as_me:10733: checking if GNAT works" >&5
|
||||
echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
|
||||
|
||||
rm -rf conftest*
|
||||
@ -10725,7 +10758,7 @@ else
|
||||
fi
|
||||
rm -rf conftest*
|
||||
|
||||
echo "$as_me:10728: result: $cf_cv_prog_gnat_correct" >&5
|
||||
echo "$as_me:10761: result: $cf_cv_prog_gnat_correct" >&5
|
||||
echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
|
||||
fi
|
||||
fi
|
||||
@ -10734,7 +10767,7 @@ fi
|
||||
|
||||
ADAFLAGS="$ADAFLAGS -O3 -gnatpn"
|
||||
|
||||
echo "$as_me:10737: checking if GNAT pragma Unreferenced works" >&5
|
||||
echo "$as_me:10770: checking if GNAT pragma Unreferenced works" >&5
|
||||
echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
|
||||
if test "${cf_cv_pragma_unreferenced+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
@ -10765,7 +10798,7 @@ fi
|
||||
rm -rf conftest*
|
||||
|
||||
fi
|
||||
echo "$as_me:10768: result: $cf_cv_pragma_unreferenced" >&5
|
||||
echo "$as_me:10801: 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).
|
||||
@ -10775,7 +10808,7 @@ else
|
||||
PRAGMA_UNREF=FALSE
|
||||
fi
|
||||
|
||||
echo "$as_me:10778: checking for ada-compiler" >&5
|
||||
echo "$as_me:10811: checking for ada-compiler" >&5
|
||||
echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
|
||||
|
||||
# Check whether --with-ada-compiler or --without-ada-compiler was given.
|
||||
@ -10786,12 +10819,12 @@ else
|
||||
cf_ada_compiler=gnatmake
|
||||
fi;
|
||||
|
||||
echo "$as_me:10789: result: $cf_ada_compiler" >&5
|
||||
echo "$as_me:10822: result: $cf_ada_compiler" >&5
|
||||
echo "${ECHO_T}$cf_ada_compiler" >&6
|
||||
|
||||
cf_ada_package=terminal_interface
|
||||
|
||||
echo "$as_me:10794: checking for ada-include" >&5
|
||||
echo "$as_me:10827: checking for ada-include" >&5
|
||||
echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
|
||||
|
||||
# Check whether --with-ada-include or --without-ada-include was given.
|
||||
@ -10827,7 +10860,7 @@ case ".$withval" in #(vi
|
||||
withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
|
||||
;;
|
||||
*)
|
||||
{ { echo "$as_me:10830: error: expected a pathname, not \"$withval\"" >&5
|
||||
{ { echo "$as_me:10863: error: expected a pathname, not \"$withval\"" >&5
|
||||
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
;;
|
||||
@ -10836,10 +10869,10 @@ esac
|
||||
fi
|
||||
ADA_INCLUDE="$withval"
|
||||
|
||||
echo "$as_me:10839: result: $ADA_INCLUDE" >&5
|
||||
echo "$as_me:10872: result: $ADA_INCLUDE" >&5
|
||||
echo "${ECHO_T}$ADA_INCLUDE" >&6
|
||||
|
||||
echo "$as_me:10842: checking for ada-objects" >&5
|
||||
echo "$as_me:10875: checking for ada-objects" >&5
|
||||
echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
|
||||
|
||||
# Check whether --with-ada-objects or --without-ada-objects was given.
|
||||
@ -10875,7 +10908,7 @@ case ".$withval" in #(vi
|
||||
withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
|
||||
;;
|
||||
*)
|
||||
{ { echo "$as_me:10878: error: expected a pathname, not \"$withval\"" >&5
|
||||
{ { echo "$as_me:10911: error: expected a pathname, not \"$withval\"" >&5
|
||||
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
;;
|
||||
@ -10884,10 +10917,10 @@ esac
|
||||
fi
|
||||
ADA_OBJECTS="$withval"
|
||||
|
||||
echo "$as_me:10887: result: $ADA_OBJECTS" >&5
|
||||
echo "$as_me:10920: result: $ADA_OBJECTS" >&5
|
||||
echo "${ECHO_T}$ADA_OBJECTS" >&6
|
||||
|
||||
echo "$as_me:10890: checking if an Ada95 shared-library should be built" >&5
|
||||
echo "$as_me:10923: checking if an Ada95 shared-library should be built" >&5
|
||||
echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
|
||||
|
||||
# Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
|
||||
@ -10897,7 +10930,7 @@ if test "${with_ada_sharedlib+set}" = set; then
|
||||
else
|
||||
with_ada_sharedlib=no
|
||||
fi;
|
||||
echo "$as_me:10900: result: $with_ada_sharedlib" >&5
|
||||
echo "$as_me:10933: result: $with_ada_sharedlib" >&5
|
||||
echo "${ECHO_T}$with_ada_sharedlib" >&6
|
||||
|
||||
ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
|
||||
@ -10955,7 +10988,7 @@ elif test "$includedir" != "/usr/include"; then
|
||||
fi
|
||||
|
||||
### Build up pieces for makefile rules
|
||||
echo "$as_me:10958: checking default library suffix" >&5
|
||||
echo "$as_me:10991: checking default library suffix" >&5
|
||||
echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
|
||||
|
||||
case $DFT_LWR_MODEL in
|
||||
@ -10966,10 +10999,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:10969: result: $DFT_ARG_SUFFIX" >&5
|
||||
echo "$as_me:11002: result: $DFT_ARG_SUFFIX" >&5
|
||||
echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
|
||||
|
||||
echo "$as_me:10972: checking default library-dependency suffix" >&5
|
||||
echo "$as_me:11005: checking default library-dependency suffix" >&5
|
||||
echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
|
||||
|
||||
case $DFT_LWR_MODEL in #(vi
|
||||
@ -11022,10 +11055,10 @@ echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
|
||||
esac
|
||||
test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
|
||||
test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
|
||||
echo "$as_me:11025: result: $DFT_DEP_SUFFIX" >&5
|
||||
echo "$as_me:11058: result: $DFT_DEP_SUFFIX" >&5
|
||||
echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
|
||||
|
||||
echo "$as_me:11028: checking default object directory" >&5
|
||||
echo "$as_me:11061: checking default object directory" >&5
|
||||
echo $ECHO_N "checking default object directory... $ECHO_C" >&6
|
||||
|
||||
case $DFT_LWR_MODEL in
|
||||
@ -11041,7 +11074,7 @@ echo $ECHO_N "checking default object directory... $ECHO_C" >&6
|
||||
DFT_OBJ_SUBDIR='obj_s' ;;
|
||||
esac
|
||||
esac
|
||||
echo "$as_me:11044: result: $DFT_OBJ_SUBDIR" >&5
|
||||
echo "$as_me:11077: result: $DFT_OBJ_SUBDIR" >&5
|
||||
echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
|
||||
|
||||
### Set up low-level terminfo dependencies for makefiles.
|
||||
@ -11254,7 +11287,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:11257: creating $CONFIG_STATUS" >&5
|
||||
{ echo "$as_me:11290: creating $CONFIG_STATUS" >&5
|
||||
echo "$as_me: creating $CONFIG_STATUS" >&6;}
|
||||
cat >$CONFIG_STATUS <<_ACEOF
|
||||
#! $SHELL
|
||||
@ -11430,7 +11463,7 @@ cat >>$CONFIG_STATUS <<\EOF
|
||||
echo "$ac_cs_version"; exit 0 ;;
|
||||
--he | --h)
|
||||
# Conflict between --help and --header
|
||||
{ { echo "$as_me:11433: error: ambiguous option: $1
|
||||
{ { echo "$as_me:11466: 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;}
|
||||
@ -11449,7 +11482,7 @@ Try \`$0 --help' for more information." >&2;}
|
||||
ac_need_defaults=false;;
|
||||
|
||||
# This is an error.
|
||||
-*) { { echo "$as_me:11452: error: unrecognized option: $1
|
||||
-*) { { echo "$as_me:11485: 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;}
|
||||
@ -11519,7 +11552,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:11522: error: invalid argument: $ac_config_target" >&5
|
||||
*) { { echo "$as_me:11555: error: invalid argument: $ac_config_target" >&5
|
||||
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
|
||||
{ (exit 1); exit 1; }; };;
|
||||
esac
|
||||
@ -11830,7 +11863,7 @@ done; }
|
||||
esac
|
||||
|
||||
if test x"$ac_file" != x-; then
|
||||
{ echo "$as_me:11833: creating $ac_file" >&5
|
||||
{ echo "$as_me:11866: creating $ac_file" >&5
|
||||
echo "$as_me: creating $ac_file" >&6;}
|
||||
rm -f "$ac_file"
|
||||
fi
|
||||
@ -11848,7 +11881,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:11851: error: cannot find input file: $f" >&5
|
||||
test -f "$f" || { { echo "$as_me:11884: error: cannot find input file: $f" >&5
|
||||
echo "$as_me: error: cannot find input file: $f" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
echo $f;;
|
||||
@ -11861,7 +11894,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
|
||||
echo $srcdir/$f
|
||||
else
|
||||
# /dev/null tree
|
||||
{ { echo "$as_me:11864: error: cannot find input file: $f" >&5
|
||||
{ { echo "$as_me:11897: error: cannot find input file: $f" >&5
|
||||
echo "$as_me: error: cannot find input file: $f" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi;;
|
||||
@ -11927,7 +11960,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:11930: creating $ac_file" >&5
|
||||
test x"$ac_file" != x- && { echo "$as_me:11963: creating $ac_file" >&5
|
||||
echo "$as_me: creating $ac_file" >&6;}
|
||||
|
||||
# First look for the input files in the build tree, otherwise in the
|
||||
@ -11938,7 +11971,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:11941: error: cannot find input file: $f" >&5
|
||||
test -f "$f" || { { echo "$as_me:11974: error: cannot find input file: $f" >&5
|
||||
echo "$as_me: error: cannot find input file: $f" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
echo $f;;
|
||||
@ -11951,7 +11984,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
|
||||
echo $srcdir/$f
|
||||
else
|
||||
# /dev/null tree
|
||||
{ { echo "$as_me:11954: error: cannot find input file: $f" >&5
|
||||
{ { echo "$as_me:11987: error: cannot find input file: $f" >&5
|
||||
echo "$as_me: error: cannot find input file: $f" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi;;
|
||||
@ -12009,7 +12042,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:12012: $ac_file is unchanged" >&5
|
||||
{ echo "$as_me:12045: $ac_file is unchanged" >&5
|
||||
echo "$as_me: $ac_file is unchanged" >&6;}
|
||||
else
|
||||
ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
|
9
NEWS
9
NEWS
@ -25,7 +25,7 @@
|
||||
-- sale, use or other dealings in this Software without prior written --
|
||||
-- authorization. --
|
||||
-------------------------------------------------------------------------------
|
||||
-- $Id: NEWS,v 1.1607 2010/11/06 22:12:59 tom Exp $
|
||||
-- $Id: NEWS,v 1.1610 2010/11/13 20:23:02 tom Exp $
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
This is a log of changes that ncurses has gone through since Zeyd started
|
||||
@ -45,6 +45,13 @@ 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.
|
||||
|
||||
20101113
|
||||
+ compiler warning fixes for test programs.
|
||||
+ various build-fixes for test-programs with pdcurses.
|
||||
+ updated configure checks for X packages in test/configure from xterm
|
||||
#267 changes.
|
||||
+ add configure check to gnatmake, to accommodate cygwin.
|
||||
|
||||
20101106
|
||||
+ correct list of sub-directories needed in Ada95 tree for building as
|
||||
a separate package.
|
||||
|
115
aclocal.m4
vendored
115
aclocal.m4
vendored
@ -28,7 +28,7 @@ dnl***************************************************************************
|
||||
dnl
|
||||
dnl Author: Thomas E. Dickey 1995-on
|
||||
dnl
|
||||
dnl $Id: aclocal.m4,v 1.546 2010/10/23 20:14:30 tom Exp $
|
||||
dnl $Id: aclocal.m4,v 1.547 2010/11/13 19:17:50 tom Exp $
|
||||
dnl Macros used in NCURSES auto-configuration script.
|
||||
dnl
|
||||
dnl These macros are maintained separately from NCURSES. The copyright on
|
||||
@ -1769,6 +1769,34 @@ rm -rf conftest*
|
||||
AC_SUBST(EXTRA_CFLAGS)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_GNAT_GENERICS version: 1 updated: 2010/11/13 14:15:18
|
||||
dnl ----------------
|
||||
AC_DEFUN([CF_GNAT_GENERICS],
|
||||
[
|
||||
AC_MSG_CHECKING(if GNAT supports generics)
|
||||
case $cf_gnat_version in #(vi
|
||||
3.[[1-9]]*|[[4-9]].*) #(vi
|
||||
cf_gnat_generics=yes
|
||||
;;
|
||||
*)
|
||||
cf_gnat_generics=no
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT($cf_gnat_generics)
|
||||
|
||||
if test "$cf_gnat_generics" = yes
|
||||
then
|
||||
cf_compile_generics=generics
|
||||
cf_generic_objects="\${GENOBJS}"
|
||||
else
|
||||
cf_compile_generics=
|
||||
cf_generic_objects=
|
||||
fi
|
||||
|
||||
AC_SUBST(cf_compile_generics)
|
||||
AC_SUBST(cf_generic_objects)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_GNAT_PRAGMA_UNREF version: 1 updated: 2010/06/19 15:22:18
|
||||
dnl --------------------
|
||||
dnl Check if the gnat pragma "Unreferenced" works.
|
||||
@ -1798,6 +1826,41 @@ fi
|
||||
AC_SUBST(PRAGMA_UNREF)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_GNAT_PROJECTS version: 1 updated: 2010/11/13 14:15:18
|
||||
dnl ----------------
|
||||
AC_DEFUN([CF_GNAT_PROJECTS],
|
||||
[
|
||||
AC_MSG_CHECKING(if GNAT supports project files)
|
||||
case $cf_gnat_version in #(vi
|
||||
3.[[0-9]]*) #(vi
|
||||
cf_gnat_projects=no
|
||||
;;
|
||||
*)
|
||||
case $cf_cv_system_name in #(vi
|
||||
cygwin*) #(vi
|
||||
cf_gnat_projects=no
|
||||
;;
|
||||
*)
|
||||
cf_gnat_projects=yes
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT($cf_gnat_projects)
|
||||
|
||||
if test "$cf_gnat_projects" = yes
|
||||
then
|
||||
USE_OLD_MAKERULES="#"
|
||||
USE_GNAT_PROJECTS=""
|
||||
else
|
||||
USE_OLD_MAKERULES=""
|
||||
USE_GNAT_PROJECTS="#"
|
||||
fi
|
||||
|
||||
AC_SUBST(USE_OLD_MAKERULES)
|
||||
AC_SUBST(USE_GNAT_PROJECTS)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_GNAT_TRY_LINK version: 2 updated: 2010/08/14 18:25:37
|
||||
dnl ----------------
|
||||
dnl Verify that a test program compiles/links with GNAT.
|
||||
@ -1856,51 +1919,29 @@ fi
|
||||
rm -rf conftest*
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_GNAT_VERSION version: 15 updated: 2010/10/23 15:52:32
|
||||
dnl CF_GNAT_VERSION version: 16 updated: 2010/11/13 14:15:18
|
||||
dnl ---------------
|
||||
dnl Verify version of GNAT.
|
||||
AC_DEFUN([CF_GNAT_VERSION],
|
||||
[
|
||||
AC_MSG_CHECKING(for gnat version)
|
||||
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/ .*//'`
|
||||
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/ .*//'`
|
||||
AC_MSG_RESULT($cf_gnat_version)
|
||||
|
||||
case $cf_gnat_version in
|
||||
3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*)
|
||||
cf_cv_prog_gnat_correct=yes
|
||||
;;
|
||||
*) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
|
||||
cf_cv_prog_gnat_correct=no
|
||||
;;
|
||||
case $cf_gnat_version in #(vi
|
||||
3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*) #(vi
|
||||
cf_cv_prog_gnat_correct=yes
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN(Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding.)
|
||||
cf_cv_prog_gnat_correct=no
|
||||
;;
|
||||
esac
|
||||
|
||||
case $cf_gnat_version in
|
||||
3.[[1-9]]*|[[4-9]].*)
|
||||
cf_compile_generics=generics
|
||||
cf_generic_objects="\${GENOBJS}"
|
||||
;;
|
||||
*) cf_compile_generics=
|
||||
cf_generic_objects=
|
||||
;;
|
||||
esac
|
||||
|
||||
case $cf_gnat_version in
|
||||
3.[[0-9]]*)
|
||||
USE_OLD_MAKERULES=""
|
||||
USE_GNAT_PROJECTS="#"
|
||||
;;
|
||||
*)
|
||||
USE_OLD_MAKERULES="#"
|
||||
USE_GNAT_PROJECTS=""
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(cf_compile_generics)
|
||||
AC_SUBST(cf_generic_objects)
|
||||
|
||||
AC_SUBST(USE_OLD_MAKERULES)
|
||||
AC_SUBST(USE_GNAT_PROJECTS)
|
||||
CF_GNAT_GENERICS
|
||||
CF_GNAT_PROJECTS
|
||||
])
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_GNU_SOURCE version: 6 updated: 2005/07/09 13:23:07
|
||||
|
207
configure
vendored
207
configure
vendored
@ -17983,44 +17983,77 @@ else
|
||||
|
||||
echo "$as_me:17984: 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:17988: result: $cf_gnat_version" >&5
|
||||
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:17989: result: $cf_gnat_version" >&5
|
||||
echo "${ECHO_T}$cf_gnat_version" >&6
|
||||
|
||||
case $cf_gnat_version in
|
||||
3.1[1-9]*|3.[2-9]*|[4-9].*)
|
||||
cf_cv_prog_gnat_correct=yes
|
||||
;;
|
||||
*) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
|
||||
cf_cv_prog_gnat_correct=no
|
||||
;;
|
||||
case $cf_gnat_version in #(vi
|
||||
3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
|
||||
cf_cv_prog_gnat_correct=yes
|
||||
;;
|
||||
*)
|
||||
{ echo "$as_me:17997: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
|
||||
echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
|
||||
cf_cv_prog_gnat_correct=no
|
||||
;;
|
||||
esac
|
||||
|
||||
case $cf_gnat_version in
|
||||
3.[1-9]*|[4-9].*)
|
||||
cf_compile_generics=generics
|
||||
cf_generic_objects="\${GENOBJS}"
|
||||
;;
|
||||
*) cf_compile_generics=
|
||||
cf_generic_objects=
|
||||
;;
|
||||
echo "$as_me:18003: checking if GNAT supports generics" >&5
|
||||
echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
|
||||
case $cf_gnat_version in #(vi
|
||||
3.[1-9]*|[4-9].*) #(vi
|
||||
cf_gnat_generics=yes
|
||||
;;
|
||||
*)
|
||||
cf_gnat_generics=no
|
||||
;;
|
||||
esac
|
||||
echo "$as_me:18013: result: $cf_gnat_generics" >&5
|
||||
echo "${ECHO_T}$cf_gnat_generics" >&6
|
||||
|
||||
case $cf_gnat_version in
|
||||
3.[0-9]*)
|
||||
USE_OLD_MAKERULES=""
|
||||
USE_GNAT_PROJECTS="#"
|
||||
;;
|
||||
*)
|
||||
USE_OLD_MAKERULES="#"
|
||||
USE_GNAT_PROJECTS=""
|
||||
;;
|
||||
if test "$cf_gnat_generics" = yes
|
||||
then
|
||||
cf_compile_generics=generics
|
||||
cf_generic_objects="\${GENOBJS}"
|
||||
else
|
||||
cf_compile_generics=
|
||||
cf_generic_objects=
|
||||
fi
|
||||
|
||||
echo "$as_me:18025: checking if GNAT supports project files" >&5
|
||||
echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
|
||||
case $cf_gnat_version in #(vi
|
||||
3.[0-9]*) #(vi
|
||||
cf_gnat_projects=no
|
||||
;;
|
||||
*)
|
||||
case $cf_cv_system_name in #(vi
|
||||
cygwin*) #(vi
|
||||
cf_gnat_projects=no
|
||||
;;
|
||||
*)
|
||||
cf_gnat_projects=yes
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
echo "$as_me:18042: result: $cf_gnat_projects" >&5
|
||||
echo "${ECHO_T}$cf_gnat_projects" >&6
|
||||
|
||||
if test "$cf_gnat_projects" = yes
|
||||
then
|
||||
USE_OLD_MAKERULES="#"
|
||||
USE_GNAT_PROJECTS=""
|
||||
else
|
||||
USE_OLD_MAKERULES=""
|
||||
USE_GNAT_PROJECTS="#"
|
||||
fi
|
||||
|
||||
# Extract the first word of "m4", so it can be a program name with args.
|
||||
set dummy m4; ac_word=$2
|
||||
echo "$as_me:18023: checking for $ac_word" >&5
|
||||
echo "$as_me:18056: 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
|
||||
@ -18035,7 +18068,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:18038: found $ac_dir/$ac_word" >&5
|
||||
echo "$as_me:18071: found $ac_dir/$ac_word" >&5
|
||||
break
|
||||
done
|
||||
|
||||
@ -18044,10 +18077,10 @@ fi
|
||||
fi
|
||||
M4_exists=$ac_cv_prog_M4_exists
|
||||
if test -n "$M4_exists"; then
|
||||
echo "$as_me:18047: result: $M4_exists" >&5
|
||||
echo "$as_me:18080: result: $M4_exists" >&5
|
||||
echo "${ECHO_T}$M4_exists" >&6
|
||||
else
|
||||
echo "$as_me:18050: result: no" >&5
|
||||
echo "$as_me:18083: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
fi
|
||||
|
||||
@ -18056,7 +18089,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:18059: checking if GNAT works" >&5
|
||||
echo "$as_me:18092: checking if GNAT works" >&5
|
||||
echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
|
||||
|
||||
rm -rf conftest*
|
||||
@ -18084,7 +18117,7 @@ else
|
||||
fi
|
||||
rm -rf conftest*
|
||||
|
||||
echo "$as_me:18087: result: $cf_cv_prog_gnat_correct" >&5
|
||||
echo "$as_me:18120: result: $cf_cv_prog_gnat_correct" >&5
|
||||
echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
|
||||
fi
|
||||
fi
|
||||
@ -18093,7 +18126,7 @@ fi
|
||||
|
||||
ADAFLAGS="$ADAFLAGS -O3 -gnatpn"
|
||||
|
||||
echo "$as_me:18096: checking if GNAT pragma Unreferenced works" >&5
|
||||
echo "$as_me:18129: checking if GNAT pragma Unreferenced works" >&5
|
||||
echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
|
||||
if test "${cf_cv_pragma_unreferenced+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
@ -18124,7 +18157,7 @@ fi
|
||||
rm -rf conftest*
|
||||
|
||||
fi
|
||||
echo "$as_me:18127: result: $cf_cv_pragma_unreferenced" >&5
|
||||
echo "$as_me:18160: 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).
|
||||
@ -18134,7 +18167,7 @@ else
|
||||
PRAGMA_UNREF=FALSE
|
||||
fi
|
||||
|
||||
echo "$as_me:18137: checking for ada-compiler" >&5
|
||||
echo "$as_me:18170: checking for ada-compiler" >&5
|
||||
echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
|
||||
|
||||
# Check whether --with-ada-compiler or --without-ada-compiler was given.
|
||||
@ -18145,12 +18178,12 @@ else
|
||||
cf_ada_compiler=gnatmake
|
||||
fi;
|
||||
|
||||
echo "$as_me:18148: result: $cf_ada_compiler" >&5
|
||||
echo "$as_me:18181: result: $cf_ada_compiler" >&5
|
||||
echo "${ECHO_T}$cf_ada_compiler" >&6
|
||||
|
||||
cf_ada_package=terminal_interface
|
||||
|
||||
echo "$as_me:18153: checking for ada-include" >&5
|
||||
echo "$as_me:18186: checking for ada-include" >&5
|
||||
echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
|
||||
|
||||
# Check whether --with-ada-include or --without-ada-include was given.
|
||||
@ -18186,7 +18219,7 @@ case ".$withval" in #(vi
|
||||
withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
|
||||
;;
|
||||
*)
|
||||
{ { echo "$as_me:18189: error: expected a pathname, not \"$withval\"" >&5
|
||||
{ { echo "$as_me:18222: error: expected a pathname, not \"$withval\"" >&5
|
||||
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
;;
|
||||
@ -18195,10 +18228,10 @@ esac
|
||||
fi
|
||||
ADA_INCLUDE="$withval"
|
||||
|
||||
echo "$as_me:18198: result: $ADA_INCLUDE" >&5
|
||||
echo "$as_me:18231: result: $ADA_INCLUDE" >&5
|
||||
echo "${ECHO_T}$ADA_INCLUDE" >&6
|
||||
|
||||
echo "$as_me:18201: checking for ada-objects" >&5
|
||||
echo "$as_me:18234: checking for ada-objects" >&5
|
||||
echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
|
||||
|
||||
# Check whether --with-ada-objects or --without-ada-objects was given.
|
||||
@ -18234,7 +18267,7 @@ case ".$withval" in #(vi
|
||||
withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
|
||||
;;
|
||||
*)
|
||||
{ { echo "$as_me:18237: error: expected a pathname, not \"$withval\"" >&5
|
||||
{ { echo "$as_me:18270: error: expected a pathname, not \"$withval\"" >&5
|
||||
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
;;
|
||||
@ -18243,10 +18276,10 @@ esac
|
||||
fi
|
||||
ADA_OBJECTS="$withval"
|
||||
|
||||
echo "$as_me:18246: result: $ADA_OBJECTS" >&5
|
||||
echo "$as_me:18279: result: $ADA_OBJECTS" >&5
|
||||
echo "${ECHO_T}$ADA_OBJECTS" >&6
|
||||
|
||||
echo "$as_me:18249: checking if an Ada95 shared-library should be built" >&5
|
||||
echo "$as_me:18282: checking if an Ada95 shared-library should be built" >&5
|
||||
echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
|
||||
|
||||
# Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
|
||||
@ -18256,7 +18289,7 @@ if test "${with_ada_sharedlib+set}" = set; then
|
||||
else
|
||||
with_ada_sharedlib=no
|
||||
fi;
|
||||
echo "$as_me:18259: result: $with_ada_sharedlib" >&5
|
||||
echo "$as_me:18292: result: $with_ada_sharedlib" >&5
|
||||
echo "${ECHO_T}$with_ada_sharedlib" >&6
|
||||
|
||||
ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
|
||||
@ -18287,7 +18320,7 @@ fi
|
||||
### chooses to split module lists into libraries.
|
||||
###
|
||||
### (see CF_LIB_RULES).
|
||||
echo "$as_me:18290: checking for library subsets" >&5
|
||||
echo "$as_me:18323: checking for library subsets" >&5
|
||||
echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
|
||||
LIB_SUBSETS=
|
||||
|
||||
@ -18328,7 +18361,7 @@ fi
|
||||
test "$with_widec" = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
|
||||
test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
|
||||
|
||||
echo "$as_me:18331: result: $LIB_SUBSETS" >&5
|
||||
echo "$as_me:18364: result: $LIB_SUBSETS" >&5
|
||||
echo "${ECHO_T}$LIB_SUBSETS" >&6
|
||||
|
||||
### Construct the list of include-directories to be generated
|
||||
@ -18366,7 +18399,7 @@ elif test "$includedir" != "/usr/include"; then
|
||||
fi
|
||||
|
||||
### Build up pieces for makefile rules
|
||||
echo "$as_me:18369: checking default library suffix" >&5
|
||||
echo "$as_me:18402: checking default library suffix" >&5
|
||||
echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
|
||||
|
||||
case $DFT_LWR_MODEL in
|
||||
@ -18377,10 +18410,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:18380: result: $DFT_ARG_SUFFIX" >&5
|
||||
echo "$as_me:18413: result: $DFT_ARG_SUFFIX" >&5
|
||||
echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
|
||||
|
||||
echo "$as_me:18383: checking default library-dependency suffix" >&5
|
||||
echo "$as_me:18416: checking default library-dependency suffix" >&5
|
||||
echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
|
||||
|
||||
case $DFT_LWR_MODEL in #(vi
|
||||
@ -18433,10 +18466,10 @@ echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
|
||||
esac
|
||||
test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
|
||||
test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
|
||||
echo "$as_me:18436: result: $DFT_DEP_SUFFIX" >&5
|
||||
echo "$as_me:18469: result: $DFT_DEP_SUFFIX" >&5
|
||||
echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
|
||||
|
||||
echo "$as_me:18439: checking default object directory" >&5
|
||||
echo "$as_me:18472: checking default object directory" >&5
|
||||
echo $ECHO_N "checking default object directory... $ECHO_C" >&6
|
||||
|
||||
case $DFT_LWR_MODEL in
|
||||
@ -18452,12 +18485,12 @@ echo $ECHO_N "checking default object directory... $ECHO_C" >&6
|
||||
DFT_OBJ_SUBDIR='obj_s' ;;
|
||||
esac
|
||||
esac
|
||||
echo "$as_me:18455: result: $DFT_OBJ_SUBDIR" >&5
|
||||
echo "$as_me:18488: 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:18460: checking c++ library-dependency suffix" >&5
|
||||
echo "$as_me:18493: 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
|
||||
@ -18514,7 +18547,7 @@ else
|
||||
test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
|
||||
test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
|
||||
fi
|
||||
echo "$as_me:18517: result: $CXX_LIB_SUFFIX" >&5
|
||||
echo "$as_me:18550: result: $CXX_LIB_SUFFIX" >&5
|
||||
echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
|
||||
|
||||
fi
|
||||
@ -18668,19 +18701,19 @@ fi
|
||||
|
||||
if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
|
||||
then
|
||||
echo "$as_me:18671: checking if linker supports switching between static/dynamic" >&5
|
||||
echo "$as_me:18704: checking if linker supports switching between static/dynamic" >&5
|
||||
echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
|
||||
|
||||
rm -f libconftest.a
|
||||
cat >conftest.$ac_ext <<EOF
|
||||
#line 18676 "configure"
|
||||
#line 18709 "configure"
|
||||
#include <stdio.h>
|
||||
int cf_ldflags_static(FILE *fp) { return fflush(fp); }
|
||||
EOF
|
||||
if { (eval echo "$as_me:18680: \"$ac_compile\"") >&5
|
||||
if { (eval echo "$as_me:18713: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:18683: \$? = $ac_status" >&5
|
||||
echo "$as_me:18716: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } ; then
|
||||
( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
|
||||
( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
|
||||
@ -18691,10 +18724,10 @@ EOF
|
||||
|
||||
LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line 18694 "configure"
|
||||
#line 18727 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#line 18697 "configure"
|
||||
#line 18730 "configure"
|
||||
#include <stdio.h>
|
||||
int cf_ldflags_static(FILE *fp);
|
||||
|
||||
@ -18709,16 +18742,16 @@ main ()
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:18712: \"$ac_link\"") >&5
|
||||
if { (eval echo "$as_me:18745: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:18715: \$? = $ac_status" >&5
|
||||
echo "$as_me:18748: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:18718: \"$ac_try\"") >&5
|
||||
{ (eval echo "$as_me:18751: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:18721: \$? = $ac_status" >&5
|
||||
echo "$as_me:18754: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
cf_ldflags_static=yes
|
||||
else
|
||||
@ -18731,7 +18764,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
||||
rm -f libconftest.*
|
||||
LIBS="$cf_save_LIBS"
|
||||
|
||||
echo "$as_me:18734: result: $cf_ldflags_static" >&5
|
||||
echo "$as_me:18767: result: $cf_ldflags_static" >&5
|
||||
echo "${ECHO_T}$cf_ldflags_static" >&6
|
||||
|
||||
if test $cf_ldflags_static != yes
|
||||
@ -18747,12 +18780,12 @@ fi
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "$as_me:18750: checking where we will install curses.h" >&5
|
||||
echo "$as_me:18783: 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:18755: result: $includedir" >&5
|
||||
echo "$as_me:18788: result: $includedir" >&5
|
||||
echo "${ECHO_T}$includedir" >&6
|
||||
|
||||
### Resolve a conflict between normal and wide-curses by forcing applications
|
||||
@ -18760,7 +18793,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:18763: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
|
||||
{ echo "$as_me:18796: 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
|
||||
@ -18777,7 +18810,7 @@ EOF
|
||||
### Construct the list of subdirectories for which we'll customize makefiles
|
||||
### with the appropriate compile-rules.
|
||||
|
||||
echo "$as_me:18780: checking for src modules" >&5
|
||||
echo "$as_me:18813: checking for src modules" >&5
|
||||
echo $ECHO_N "checking for src modules... $ECHO_C" >&6
|
||||
|
||||
# dependencies and linker-arguments for test-programs
|
||||
@ -18840,7 +18873,7 @@ EOF
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo "$as_me:18843: result: $cf_cv_src_modules" >&5
|
||||
echo "$as_me:18876: result: $cf_cv_src_modules" >&5
|
||||
echo "${ECHO_T}$cf_cv_src_modules" >&6
|
||||
|
||||
TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
|
||||
@ -19046,7 +19079,7 @@ fi
|
||||
|
||||
# Extract the first word of "tic", so it can be a program name with args.
|
||||
set dummy tic; ac_word=$2
|
||||
echo "$as_me:19049: checking for $ac_word" >&5
|
||||
echo "$as_me:19082: checking for $ac_word" >&5
|
||||
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
|
||||
if test "${ac_cv_path_TIC_PATH+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
@ -19063,7 +19096,7 @@ for ac_dir in $ac_dummy; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if $as_executable_p "$ac_dir/$ac_word"; then
|
||||
ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
|
||||
echo "$as_me:19066: found $ac_dir/$ac_word" >&5
|
||||
echo "$as_me:19099: found $ac_dir/$ac_word" >&5
|
||||
break
|
||||
fi
|
||||
done
|
||||
@ -19075,10 +19108,10 @@ fi
|
||||
TIC_PATH=$ac_cv_path_TIC_PATH
|
||||
|
||||
if test -n "$TIC_PATH"; then
|
||||
echo "$as_me:19078: result: $TIC_PATH" >&5
|
||||
echo "$as_me:19111: result: $TIC_PATH" >&5
|
||||
echo "${ECHO_T}$TIC_PATH" >&6
|
||||
else
|
||||
echo "$as_me:19081: result: no" >&5
|
||||
echo "$as_me:19114: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
fi
|
||||
|
||||
@ -19086,7 +19119,7 @@ if test -n "$FALLBACK_LIST"
|
||||
then
|
||||
if test "$TIC_PATH" = unknown
|
||||
then
|
||||
{ echo "$as_me:19089: WARNING: no tic program found for fallbacks" >&5
|
||||
{ echo "$as_me:19122: WARNING: no tic program found for fallbacks" >&5
|
||||
echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
|
||||
fi
|
||||
fi
|
||||
@ -19185,7 +19218,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:19188: creating $CONFIG_STATUS" >&5
|
||||
{ echo "$as_me:19221: creating $CONFIG_STATUS" >&5
|
||||
echo "$as_me: creating $CONFIG_STATUS" >&6;}
|
||||
cat >$CONFIG_STATUS <<_ACEOF
|
||||
#! $SHELL
|
||||
@ -19361,7 +19394,7 @@ cat >>$CONFIG_STATUS <<\EOF
|
||||
echo "$ac_cs_version"; exit 0 ;;
|
||||
--he | --h)
|
||||
# Conflict between --help and --header
|
||||
{ { echo "$as_me:19364: error: ambiguous option: $1
|
||||
{ { echo "$as_me:19397: 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;}
|
||||
@ -19380,7 +19413,7 @@ Try \`$0 --help' for more information." >&2;}
|
||||
ac_need_defaults=false;;
|
||||
|
||||
# This is an error.
|
||||
-*) { { echo "$as_me:19383: error: unrecognized option: $1
|
||||
-*) { { echo "$as_me:19416: 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;}
|
||||
@ -19486,7 +19519,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:19489: error: invalid argument: $ac_config_target" >&5
|
||||
*) { { echo "$as_me:19522: error: invalid argument: $ac_config_target" >&5
|
||||
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
|
||||
{ (exit 1); exit 1; }; };;
|
||||
esac
|
||||
@ -19892,7 +19925,7 @@ done; }
|
||||
esac
|
||||
|
||||
if test x"$ac_file" != x-; then
|
||||
{ echo "$as_me:19895: creating $ac_file" >&5
|
||||
{ echo "$as_me:19928: creating $ac_file" >&5
|
||||
echo "$as_me: creating $ac_file" >&6;}
|
||||
rm -f "$ac_file"
|
||||
fi
|
||||
@ -19910,7 +19943,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:19913: error: cannot find input file: $f" >&5
|
||||
test -f "$f" || { { echo "$as_me:19946: error: cannot find input file: $f" >&5
|
||||
echo "$as_me: error: cannot find input file: $f" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
echo $f;;
|
||||
@ -19923,7 +19956,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
|
||||
echo $srcdir/$f
|
||||
else
|
||||
# /dev/null tree
|
||||
{ { echo "$as_me:19926: error: cannot find input file: $f" >&5
|
||||
{ { echo "$as_me:19959: error: cannot find input file: $f" >&5
|
||||
echo "$as_me: error: cannot find input file: $f" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi;;
|
||||
@ -19989,7 +20022,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:19992: creating $ac_file" >&5
|
||||
test x"$ac_file" != x- && { echo "$as_me:20025: creating $ac_file" >&5
|
||||
echo "$as_me: creating $ac_file" >&6;}
|
||||
|
||||
# First look for the input files in the build tree, otherwise in the
|
||||
@ -20000,7 +20033,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:20003: error: cannot find input file: $f" >&5
|
||||
test -f "$f" || { { echo "$as_me:20036: error: cannot find input file: $f" >&5
|
||||
echo "$as_me: error: cannot find input file: $f" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
echo $f;;
|
||||
@ -20013,7 +20046,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
|
||||
echo $srcdir/$f
|
||||
else
|
||||
# /dev/null tree
|
||||
{ { echo "$as_me:20016: error: cannot find input file: $f" >&5
|
||||
{ { echo "$as_me:20049: error: cannot find input file: $f" >&5
|
||||
echo "$as_me: error: cannot find input file: $f" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi;;
|
||||
@ -20071,7 +20104,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:20074: $ac_file is unchanged" >&5
|
||||
{ echo "$as_me:20107: $ac_file is unchanged" >&5
|
||||
echo "$as_me: $ac_file is unchanged" >&6;}
|
||||
else
|
||||
ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
|
4
dist.mk
4
dist.mk
@ -25,7 +25,7 @@
|
||||
# use or other dealings in this Software without prior written #
|
||||
# authorization. #
|
||||
##############################################################################
|
||||
# $Id: dist.mk,v 1.779 2010/11/06 13:46:35 tom Exp $
|
||||
# $Id: dist.mk,v 1.780 2010/11/13 16:26:43 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 = 7
|
||||
NCURSES_PATCH = 20101106
|
||||
NCURSES_PATCH = 20101113
|
||||
|
||||
# We don't append the patch to the version, since this only applies to releases
|
||||
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
|
||||
|
79
test/aclocal.m4
vendored
79
test/aclocal.m4
vendored
@ -26,7 +26,7 @@ dnl sale, use or other dealings in this Software without prior written *
|
||||
dnl authorization. *
|
||||
dnl***************************************************************************
|
||||
dnl
|
||||
dnl $Id: aclocal.m4,v 1.42 2010/11/06 19:25:57 tom Exp $
|
||||
dnl $Id: aclocal.m4,v 1.44 2010/11/14 00:44:52 tom Exp $
|
||||
dnl
|
||||
dnl Author: Thomas E. Dickey
|
||||
dnl
|
||||
@ -237,6 +237,19 @@ dnl $1 = libraries to add, with the "-l", etc.
|
||||
dnl $2 = variable to update (default $LIBS)
|
||||
AC_DEFUN([CF_ADD_LIBS],[ifelse($2,,LIBS,[$2])="$1 [$]ifelse($2,,LIBS,[$2])"])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_ADD_LIB_AFTER version: 2 updated: 2010/11/08 20:33:46
|
||||
dnl ----------------
|
||||
dnl Add a given library after another, e.g., following the one it satisfies a
|
||||
dnl dependency for.
|
||||
dnl
|
||||
dnl $1 = the first library
|
||||
dnl $2 = its dependency
|
||||
AC_DEFUN([CF_ADD_LIB_AFTER],[
|
||||
CF_VERBOSE(...before $LIBS)
|
||||
LIBS=`echo "$LIBS" | sed -e "s/[[ ]][[ ]]*/ /g" -e "s,$1 ,$1 $2 ," -e 's/ / /g'`
|
||||
CF_VERBOSE(...after $LIBS)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_ADD_SUBDIR_PATH version: 3 updated: 2010/07/03 20:58:12
|
||||
dnl ------------------
|
||||
dnl Append to a search-list for a nonstandard header/lib-file
|
||||
@ -1683,7 +1696,7 @@ AC_DEFINE(NCURSES)
|
||||
CF_NCURSES_VERSION
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_NCURSES_EXT_FUNCS version: 2 updated: 2010/10/23 15:54:49
|
||||
dnl CF_NCURSES_EXT_FUNCS version: 3 updated: 2010/11/13 19:43:23
|
||||
dnl --------------------
|
||||
dnl Since 2007/11/17, ncurses has defined NCURSES_EXT_FUNCS; earlier versions
|
||||
dnl may provide these functions. Define the symbol if it is not defined, and
|
||||
@ -1715,7 +1728,7 @@ AC_TRY_LINK([
|
||||
[cf_cv_ncurses_ext_funcs=no])
|
||||
])
|
||||
])
|
||||
test "$cf_cv_ncurses_ext_funcs" == yes && AC_DEFINE(NCURSES_EXT_FUNCS)
|
||||
test "$cf_cv_ncurses_ext_funcs" = yes && AC_DEFINE(NCURSES_EXT_FUNCS)
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_NCURSES_HEADER version: 2 updated: 2008/03/23 14:48:54
|
||||
@ -2601,7 +2614,7 @@ if test -n "$cf_xopen_source" ; then
|
||||
fi
|
||||
])
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_X_ATHENA version: 17 updated: 2010/10/23 15:52:32
|
||||
dnl CF_X_ATHENA version: 20 updated: 2010/11/09 05:18:02
|
||||
dnl -----------
|
||||
dnl Check for Xaw (Athena) libraries
|
||||
dnl
|
||||
@ -2659,6 +2672,27 @@ if test "$PKG_CONFIG" != none ; then
|
||||
cf_x_athena_lib="$cf_pkgconfig_libs"
|
||||
CF_UPPER(cf_x_athena_LIBS,HAVE_LIB_$cf_x_athena)
|
||||
AC_DEFINE_UNQUOTED($cf_x_athena_LIBS)
|
||||
|
||||
AC_CACHE_CHECK(for usable $cf_x_athena/Xmu package,cf_cv_xaw_compat,[
|
||||
AC_TRY_LINK([
|
||||
#include <X11/Xmu/CharSet.h>
|
||||
],[
|
||||
int check = XmuCompareISOLatin1("big", "small")
|
||||
],[cf_cv_xaw_compat=yes],[cf_cv_xaw_compat=no])])
|
||||
|
||||
if test "$cf_cv_xaw_compat" = no
|
||||
then
|
||||
# workaround for broken ".pc" files...
|
||||
case "$cf_x_athena_lib" in #(vi
|
||||
*-lXmu*) #(vi
|
||||
;;
|
||||
*)
|
||||
CF_VERBOSE(work around broken package)
|
||||
CF_TRY_PKG_CONFIG(xmu,,[CF_ADD_LIB_AFTER(-lXt,-lXmu)])
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
break])
|
||||
done
|
||||
fi
|
||||
@ -2778,7 +2812,7 @@ CF_TRY_PKG_CONFIG(Xext,,[
|
||||
[CF_ADD_LIB(Xext)])])
|
||||
])dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl CF_X_TOOLKIT version: 15 updated: 2010/06/14 17:42:30
|
||||
dnl CF_X_TOOLKIT version: 19 updated: 2010/11/09 05:18:02
|
||||
dnl ------------
|
||||
dnl Check for X Toolkit libraries
|
||||
dnl
|
||||
@ -2791,21 +2825,30 @@ cf_have_X_LIBS=no
|
||||
|
||||
CF_TRY_PKG_CONFIG(xt,[
|
||||
|
||||
# workaround for broken ".pc" files used for X Toolkit.
|
||||
case "x$X_PRE_LIBS" in #(vi
|
||||
*-lICE*)
|
||||
case "x$LIBS" in #(vi
|
||||
*-lICE*) #(vi
|
||||
;;
|
||||
*)
|
||||
CF_VERBOSE(work around broken package)
|
||||
CF_VERBOSE(...before $LIBS)
|
||||
LIBS=`echo "$LIBS" | sed -e "s/[[ ]][[ ]]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/ / /g'`
|
||||
CF_VERBOSE(...after $LIBS)
|
||||
AC_CACHE_CHECK(for usable X Toolkit package,cf_cv_xt_compat,[
|
||||
AC_TRY_LINK([
|
||||
#include <X11/Shell.h>
|
||||
],[int num = IceConnectionNumber(0)
|
||||
],[cf_cv_xt_compat=no],[cf_cv_xt_compat=no])])
|
||||
|
||||
if test "$cf_cv_xt_compat" = no
|
||||
then
|
||||
# workaround for broken ".pc" files used for X Toolkit.
|
||||
case "x$X_PRE_LIBS" in #(vi
|
||||
*-lICE*)
|
||||
case "x$LIBS" in #(vi
|
||||
*-lICE*) #(vi
|
||||
;;
|
||||
*)
|
||||
CF_VERBOSE(work around broken package)
|
||||
CF_TRY_PKG_CONFIG(ice,
|
||||
[CF_TRY_PKG_CONFIG(sm)],
|
||||
[CF_ADD_LIB_AFTER(-lXt,$X_PRE_LIBS)])
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
cf_have_X_LIBS=yes
|
||||
],[
|
||||
|
40
test/bs.c
40
test/bs.c
@ -34,7 +34,7 @@
|
||||
* v2.0 featuring strict ANSI/POSIX conformance, November 1993.
|
||||
* v2.1 with ncurses mouse support, September 1995
|
||||
*
|
||||
* $Id: bs.c,v 1.51 2010/05/01 19:12:26 tom Exp $
|
||||
* $Id: bs.c,v 1.52 2010/11/13 20:07:52 tom Exp $
|
||||
*/
|
||||
|
||||
#include <test.priv.h>
|
||||
@ -401,17 +401,17 @@ initgame(void)
|
||||
MvAddStr(CYBASE + BDEPTH, CXBASE - 3, numbers);
|
||||
|
||||
MvPrintw(HYBASE, HXBASE,
|
||||
"To position your ships: move the cursor to a spot, then");
|
||||
"To position your ships: move the cursor to a spot, then");
|
||||
MvPrintw(HYBASE + 1, HXBASE,
|
||||
"type the first letter of a ship type to select it, then");
|
||||
"type the first letter of a ship type to select it, then");
|
||||
MvPrintw(HYBASE + 2, HXBASE,
|
||||
"type a direction ([hjkl] or [4862]), indicating how the");
|
||||
"type a direction ([hjkl] or [4862]), indicating how the");
|
||||
MvPrintw(HYBASE + 3, HXBASE,
|
||||
"ship should be pointed. You may also type a ship letter");
|
||||
"ship should be pointed. You may also type a ship letter");
|
||||
MvPrintw(HYBASE + 4, HXBASE,
|
||||
"followed by `r' to position it randomly, or type `R' to");
|
||||
"followed by `r' to position it randomly, or type `R' to");
|
||||
MvPrintw(HYBASE + 5, HXBASE,
|
||||
"place all remaining ships randomly.");
|
||||
"place all remaining ships randomly.");
|
||||
|
||||
MvAddStr(MYBASE, MXBASE, "Aiming keys:");
|
||||
MvAddStr(SYBASE, SXBASE, "y k u 7 8 9");
|
||||
@ -519,17 +519,17 @@ initgame(void)
|
||||
turn = rnd(2);
|
||||
|
||||
MvPrintw(HYBASE, HXBASE,
|
||||
"To fire, move the cursor to your chosen aiming point ");
|
||||
"To fire, move the cursor to your chosen aiming point ");
|
||||
MvPrintw(HYBASE + 1, HXBASE,
|
||||
"and strike any key other than a motion key. ");
|
||||
"and strike any key other than a motion key. ");
|
||||
MvPrintw(HYBASE + 2, HXBASE,
|
||||
" ");
|
||||
" ");
|
||||
MvPrintw(HYBASE + 3, HXBASE,
|
||||
" ");
|
||||
" ");
|
||||
MvPrintw(HYBASE + 4, HXBASE,
|
||||
" ");
|
||||
" ");
|
||||
MvPrintw(HYBASE + 5, HXBASE,
|
||||
" ");
|
||||
" ");
|
||||
|
||||
(void) prompt(0, "Press any key to start...", "");
|
||||
(void) getch();
|
||||
@ -548,11 +548,11 @@ getcoord(int atcpu)
|
||||
for (;;) {
|
||||
if (atcpu) {
|
||||
MvPrintw(CYBASE + BDEPTH + 1, CXBASE + 11, "(%d, %c)",
|
||||
curx, 'A' + cury);
|
||||
curx, 'A' + cury);
|
||||
cgoto(cury, curx);
|
||||
} else {
|
||||
MvPrintw(PYBASE + BDEPTH + 1, PXBASE + 11, "(%d, %c)",
|
||||
curx, 'A' + cury);
|
||||
curx, 'A' + cury);
|
||||
pgoto(cury, curx);
|
||||
}
|
||||
|
||||
@ -955,8 +955,8 @@ cpufire(int x, int y)
|
||||
hit = board[PLAYER][x][y] ? MARK_HIT : MARK_MISS;
|
||||
hits[COMPUTER][x][y] = (char) hit;
|
||||
MvPrintw(PROMPTLINE, 0,
|
||||
"I shoot at %c%d. I %s!", y + 'A', x, hit ? "hit" :
|
||||
"miss");
|
||||
"I shoot at %c%d. I %s!", y + 'A', x, hit ? "hit" :
|
||||
"miss");
|
||||
if ((sunk = (hit && (ss = hitship(x, y)))) != 0)
|
||||
(void) printw(" I've sunk your %s", ss->name);
|
||||
(void) clrtoeol();
|
||||
@ -1108,8 +1108,8 @@ cputurn(void)
|
||||
}
|
||||
#ifdef DEBUG
|
||||
MvPrintw(PROMPTLINE + 2, 0,
|
||||
"New state %d, x=%d, y=%d, d=%d",
|
||||
next, x, y, d);
|
||||
"New state %d, x=%d, y=%d, d=%d",
|
||||
next, x, y, d);
|
||||
#endif /* DEBUG */
|
||||
return ((hit) ? TRUE : FALSE);
|
||||
}
|
||||
@ -1136,7 +1136,7 @@ playagain(void)
|
||||
if (cpuwon >= 10)
|
||||
++j;
|
||||
MvPrintw(1, (COLWIDTH - j) / 2,
|
||||
"%s: %d Computer: %d", name, plywon, cpuwon);
|
||||
"%s: %d Computer: %d", name, plywon, cpuwon);
|
||||
|
||||
prompt(2, (awinna())? "Want to be humiliated again, %s [yn]? "
|
||||
: "Going to give me a chance for revenge, %s [yn]? ", name);
|
||||
|
@ -29,7 +29,7 @@
|
||||
/*
|
||||
* Author: Thomas E. Dickey
|
||||
*
|
||||
* $Id: cardfile.c,v 1.37 2010/05/01 22:19:02 tom Exp $
|
||||
* $Id: cardfile.c,v 1.38 2010/11/14 00:58:45 tom Exp $
|
||||
*
|
||||
* File format: text beginning in column 1 is a title; other text is content.
|
||||
*/
|
||||
@ -91,7 +91,7 @@ skip(const char *buffer)
|
||||
static void
|
||||
trim(char *buffer)
|
||||
{
|
||||
unsigned n = strlen(buffer);
|
||||
size_t n = strlen(buffer);
|
||||
while (n-- && isspace(UChar(buffer[n])))
|
||||
buffer[n] = 0;
|
||||
}
|
||||
@ -129,7 +129,7 @@ add_title(const char *title)
|
||||
static void
|
||||
add_content(CARD * card, const char *content)
|
||||
{
|
||||
unsigned total, offset;
|
||||
size_t total, offset;
|
||||
|
||||
content = skip(content);
|
||||
if ((total = strlen(content)) != 0) {
|
||||
|
@ -26,7 +26,7 @@
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
/*
|
||||
* $Id: clip_printw.c,v 1.6 2010/05/01 19:13:46 tom Exp $
|
||||
* $Id: clip_printw.c,v 1.7 2010/11/13 20:48:48 tom Exp $
|
||||
*
|
||||
* demonstrate how to use printw without wrapping.
|
||||
*/
|
||||
@ -43,7 +43,7 @@ typedef struct {
|
||||
unsigned v;
|
||||
int status;
|
||||
int pair;
|
||||
unsigned attr;
|
||||
attr_t attr;
|
||||
int count;
|
||||
int ch;
|
||||
const char *c_msg;
|
||||
@ -111,7 +111,9 @@ color_params(unsigned state, int *pair)
|
||||
|
||||
start_color();
|
||||
for (n = 0; n < SIZEOF(table); ++n) {
|
||||
init_pair(table[n].pair, table[n].fg, table[n].bg);
|
||||
init_pair((short) table[n].pair,
|
||||
(short) table[n].fg,
|
||||
(short) table[n].bg);
|
||||
}
|
||||
}
|
||||
if (state < SIZEOF(table)) {
|
||||
@ -123,11 +125,11 @@ color_params(unsigned state, int *pair)
|
||||
}
|
||||
|
||||
static const char *
|
||||
video_params(unsigned state, unsigned *attr)
|
||||
video_params(unsigned state, attr_t *attr)
|
||||
{
|
||||
/* *INDENT-OFF* */
|
||||
static struct {
|
||||
unsigned attr;
|
||||
attr_t attr;
|
||||
const char *msg;
|
||||
} table[] = {
|
||||
{ A_NORMAL, "normal" },
|
||||
@ -327,12 +329,12 @@ test_clipping(WINDOW *win)
|
||||
do {
|
||||
switch (st.ch) {
|
||||
case '.': /* change from current position */
|
||||
(void) wattrset(win, st.attr | COLOR_PAIR(st.pair));
|
||||
(void) wattrset(win, st.attr | (chtype) COLOR_PAIR(st.pair));
|
||||
if (st.count > 0) {
|
||||
need = st.count + 1;
|
||||
need = (unsigned) st.count + 1;
|
||||
sprintf(fmt, "%%c%%%ds%%c", st.count);
|
||||
} else {
|
||||
need = getmaxx(win) - 1;
|
||||
need = (unsigned) getmaxx(win) - 1;
|
||||
strcpy(fmt, "%c%s%c");
|
||||
}
|
||||
if ((buffer = typeMalloc(char, need)) != 0) {
|
||||
|
1251
test/configure
vendored
1251
test/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -26,7 +26,7 @@
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
/*
|
||||
* $Id: demo_altkeys.c,v 1.8 2008/04/12 22:06:22 tom Exp $
|
||||
* $Id: demo_altkeys.c,v 1.9 2010/11/14 00:59:26 tom Exp $
|
||||
*
|
||||
* Demonstrate the define_key() function.
|
||||
* Thomas Dickey - 2005/10/22
|
||||
@ -128,8 +128,8 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
|
||||
|
||||
#if HAVE_GETTIMEOFDAY
|
||||
gettimeofday(¤t, 0);
|
||||
secs = current.tv_sec - previous.tv_sec;
|
||||
msecs = (current.tv_usec - previous.tv_usec) / 1000;
|
||||
secs = (int) (current.tv_sec - previous.tv_sec);
|
||||
msecs = (int) ((current.tv_usec - previous.tv_usec) / 1000);
|
||||
if (msecs < 0) {
|
||||
msecs += 1000;
|
||||
--secs;
|
||||
|
@ -26,7 +26,7 @@
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
/*
|
||||
* $Id: demo_defkey.c,v 1.19 2008/08/04 16:24:47 tom Exp $
|
||||
* $Id: demo_defkey.c,v 1.20 2010/11/14 00:59:35 tom Exp $
|
||||
*
|
||||
* Demonstrate the define_key() function.
|
||||
* Thomas Dickey - 2002/11/23
|
||||
@ -98,7 +98,7 @@ static char *
|
||||
visible(const char *string)
|
||||
{
|
||||
char *result = 0;
|
||||
unsigned need = 1;
|
||||
size_t need = 1;
|
||||
int pass;
|
||||
int n;
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
/*
|
||||
* $Id: demo_forms.c,v 1.35 2010/05/01 21:56:10 tom Exp $
|
||||
* $Id: demo_forms.c,v 1.36 2010/11/13 20:49:50 tom Exp $
|
||||
*
|
||||
* Demonstrate a variety of functions from the form library.
|
||||
* Thomas Dickey - 2003/4/26
|
||||
@ -83,7 +83,7 @@ make_label(int frow, int fcol, NCURSES_CONST char *label)
|
||||
|
||||
if (f) {
|
||||
set_field_buffer(f, 0, label);
|
||||
set_field_opts(f, (int) (field_opts(f) & ~O_ACTIVE));
|
||||
set_field_opts(f, (int) ((unsigned) field_opts(f) & ~O_ACTIVE));
|
||||
}
|
||||
return (f);
|
||||
}
|
||||
@ -216,7 +216,7 @@ my_form_driver(FORM * form, int c)
|
||||
case MY_EDT_MODE:
|
||||
if ((field = current_field(form)) != 0) {
|
||||
set_current_field(form, another_field(form, field));
|
||||
if (field_opts(field) & O_EDIT) {
|
||||
if ((unsigned) field_opts(field) & O_EDIT) {
|
||||
field_opts_off(field, O_EDIT);
|
||||
set_field_status(field, 0);
|
||||
} else {
|
||||
@ -292,7 +292,7 @@ show_current_field(WINDOW *win, FORM * form)
|
||||
waddstr(win, "other");
|
||||
}
|
||||
|
||||
if (field_opts(field) & O_EDIT)
|
||||
if ((unsigned) field_opts(field) & O_EDIT)
|
||||
waddstr(win, " editable");
|
||||
else
|
||||
waddstr(win, " readonly");
|
||||
|
@ -26,7 +26,7 @@
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
/*
|
||||
* $Id: demo_menus.c,v 1.30 2010/05/01 19:12:26 tom Exp $
|
||||
* $Id: demo_menus.c,v 1.31 2010/11/13 20:06:46 tom Exp $
|
||||
*
|
||||
* Demonstrate a variety of functions from the menu library.
|
||||
* Thomas Dickey - 2005/4/9
|
||||
@ -547,7 +547,7 @@ perform_trace_menu(int cmd)
|
||||
Trace(("trace level interactively set to %s", tracetrace(_nc_tracing)));
|
||||
|
||||
MvPrintw(LINES - 2, 0,
|
||||
"Trace level is %s\n", tracetrace(_nc_tracing));
|
||||
"Trace level is %s\n", tracetrace(_nc_tracing));
|
||||
refresh();
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 2009 Free Software Foundation, Inc. *
|
||||
* Copyright (c) 2009,2010 Free Software Foundation, Inc. *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a *
|
||||
* copy of this software and associated documentation files (the *
|
||||
@ -29,7 +29,7 @@
|
||||
/*
|
||||
* Author: Thomas E. Dickey
|
||||
*
|
||||
* $Id: demo_terminfo.c,v 1.6 2009/07/17 01:02:08 tom Exp $
|
||||
* $Id: demo_terminfo.c,v 1.8 2010/11/13 20:51:50 tom Exp $
|
||||
*
|
||||
* A simple demo of the terminfo interface.
|
||||
*/
|
||||
@ -42,6 +42,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAVE_TIGETSTR
|
||||
#if defined(HAVE_CURSES_DATA_BOOLNAMES) || defined(DECL_CURSES_DATA_BOOLNAMES)
|
||||
|
||||
static bool b_opt = FALSE;
|
||||
@ -175,13 +176,13 @@ demo_terminfo(char *name)
|
||||
|| (NUM_NUMBERS(term) != NUMCOUNT)
|
||||
|| (NUM_STRINGS(term) != STRCOUNT))) {
|
||||
for (n = BOOLCOUNT; n < NUM_BOOLEANS(term); ++n) {
|
||||
dumpit(ExtBoolname(term, n, boolnames));
|
||||
dumpit(ExtBoolname(term, (int) n, boolnames));
|
||||
}
|
||||
for (n = NUMCOUNT; n < NUM_NUMBERS(term); ++n) {
|
||||
dumpit(ExtNumname(term, n, numnames));
|
||||
dumpit(ExtNumname(term, (int) n, numnames));
|
||||
}
|
||||
for (n = STRCOUNT; n < NUM_STRINGS(term); ++n) {
|
||||
dumpit(ExtStrname(term, n, strnames));
|
||||
dumpit(ExtStrname(term, (int) n, strnames));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -302,3 +303,11 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
|
||||
ExitProgram(EXIT_FAILURE);
|
||||
}
|
||||
#endif
|
||||
#else /* !HAVE_TIGETSTR */
|
||||
int
|
||||
main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
|
||||
{
|
||||
printf("This program requires the terminfo functions such as tigetstr\n");
|
||||
ExitProgram(EXIT_FAILURE);
|
||||
}
|
||||
#endif /* HAVE_TIGETSTR */
|
||||
|
@ -29,7 +29,7 @@
|
||||
/*
|
||||
* Author: Thomas E. Dickey (1998-on)
|
||||
*
|
||||
* $Id: ditto.c,v 1.39 2010/07/03 19:41:04 tom Exp $
|
||||
* $Id: ditto.c,v 1.40 2010/11/14 01:06:47 tom Exp $
|
||||
*
|
||||
* The program illustrates how to set up multiple screens from a single
|
||||
* program.
|
||||
@ -326,6 +326,7 @@ show_ditto(DITTO * data, int count, DDATA * ddata)
|
||||
{
|
||||
int n;
|
||||
|
||||
(void) data;
|
||||
for (n = 0; n < count; n++) {
|
||||
ddata->target = n;
|
||||
USING_SCREEN(data[n].screen, write_screen, (void *) ddata);
|
||||
|
21
test/dots.c
21
test/dots.c
@ -29,7 +29,7 @@
|
||||
/*
|
||||
* Author: Thomas E. Dickey <dickey@clark.net> 1999
|
||||
*
|
||||
* $Id: dots.c,v 1.20 2010/05/01 22:04:08 tom Exp $
|
||||
* $Id: dots.c,v 1.22 2010/11/14 01:00:02 tom Exp $
|
||||
*
|
||||
* A simple demo of the terminfo interface.
|
||||
*/
|
||||
@ -82,7 +82,7 @@ cleanup(void)
|
||||
|
||||
printf("\n\n%ld total chars, rate %.2f/sec\n",
|
||||
total_chars,
|
||||
((double) (total_chars) / (time((time_t *) 0) - started)));
|
||||
((double) (total_chars) / (double) (time((time_t *) 0) - started)));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -91,21 +91,20 @@ onsig(int n GCC_UNUSED)
|
||||
interrupted = TRUE;
|
||||
}
|
||||
|
||||
static float
|
||||
static double
|
||||
ranf(void)
|
||||
{
|
||||
long r = (rand() & 077777);
|
||||
return ((float) r / 32768.);
|
||||
return ((double) r / 32768.);
|
||||
}
|
||||
|
||||
int
|
||||
main(
|
||||
int argc GCC_UNUSED,
|
||||
char *argv[]GCC_UNUSED)
|
||||
main(int argc GCC_UNUSED,
|
||||
char *argv[]GCC_UNUSED)
|
||||
{
|
||||
int x, y, z, p;
|
||||
float r;
|
||||
float c;
|
||||
double r;
|
||||
double c;
|
||||
|
||||
CATCHALL(onsig);
|
||||
|
||||
@ -120,8 +119,8 @@ main(
|
||||
max_colors = -1;
|
||||
}
|
||||
|
||||
r = (float) (lines - 4);
|
||||
c = (float) (columns - 4);
|
||||
r = (double) (lines - 4);
|
||||
c = (double) (columns - 4);
|
||||
started = time((time_t *) 0);
|
||||
|
||||
while (!interrupted) {
|
||||
|
@ -29,7 +29,7 @@
|
||||
/*
|
||||
* Author: Thomas E. Dickey - 2007
|
||||
*
|
||||
* $Id: dots_mvcur.c,v 1.4 2009/10/10 16:14:24 tom Exp $
|
||||
* $Id: dots_mvcur.c,v 1.6 2010/11/14 01:00:44 tom Exp $
|
||||
*
|
||||
* A simple demo of the terminfo interface, and mvcur.
|
||||
*/
|
||||
@ -83,7 +83,7 @@ cleanup(void)
|
||||
|
||||
printf("\n\n%ld total chars, rate %.2f/sec\n",
|
||||
total_chars,
|
||||
((double) (total_chars) / (time((time_t *) 0) - started)));
|
||||
((double) (total_chars) / (double) (time((time_t *) 0) - started)));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -92,22 +92,21 @@ onsig(int n GCC_UNUSED)
|
||||
interrupted = TRUE;
|
||||
}
|
||||
|
||||
static float
|
||||
static double
|
||||
ranf(void)
|
||||
{
|
||||
long r = (rand() & 077777);
|
||||
return ((float) r / 32768.);
|
||||
return ((double) r / 32768.);
|
||||
}
|
||||
|
||||
int
|
||||
main(
|
||||
int argc GCC_UNUSED,
|
||||
char *argv[]GCC_UNUSED)
|
||||
main(int argc GCC_UNUSED,
|
||||
char *argv[]GCC_UNUSED)
|
||||
{
|
||||
int x0 = 1, y0 = 1;
|
||||
int x, y, z, p;
|
||||
float r;
|
||||
float c;
|
||||
double r;
|
||||
double c;
|
||||
SCREEN *sp;
|
||||
|
||||
CATCHALL(onsig);
|
||||
@ -124,8 +123,8 @@ main(
|
||||
max_colors = -1;
|
||||
}
|
||||
|
||||
r = (float) (lines - 4);
|
||||
c = (float) (columns - 4);
|
||||
r = (double) (lines - 4);
|
||||
c = (double) (columns - 4);
|
||||
started = time((time_t *) 0);
|
||||
|
||||
while (!interrupted) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 2006-2007,2008 Free Software Foundation, Inc. *
|
||||
* Copyright (c) 2006-2008,2010 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.6 2008/04/12 22:06:04 tom Exp $
|
||||
* $Id: echochar.c,v 1.8 2010/11/14 01:00:44 tom Exp $
|
||||
*
|
||||
* Demonstrate the echochar function (compare to dots.c).
|
||||
* Thomas Dickey - 2006/11/4
|
||||
@ -49,7 +49,7 @@ cleanup(void)
|
||||
|
||||
printf("\n\n%ld total chars, rate %.2f/sec\n",
|
||||
total_chars,
|
||||
((double) (total_chars) / (time((time_t *) 0) - started)));
|
||||
((double) (total_chars) / (double) (time((time_t *) 0) - started)));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -58,11 +58,11 @@ onsig(int n GCC_UNUSED)
|
||||
interrupted = TRUE;
|
||||
}
|
||||
|
||||
static float
|
||||
static double
|
||||
ranf(void)
|
||||
{
|
||||
long r = (rand() & 077777);
|
||||
return ((float) r / 32768.);
|
||||
return ((double) r / 32768.);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -70,19 +70,20 @@ set_color(char *my_pairs, int fg, int bg)
|
||||
{
|
||||
int pair = (fg * COLORS) + bg;
|
||||
if (!my_pairs[pair]) {
|
||||
init_pair(pair, fg, bg);
|
||||
init_pair((short) pair,
|
||||
(short) fg,
|
||||
(short) bg);
|
||||
}
|
||||
attron(COLOR_PAIR(pair));
|
||||
}
|
||||
|
||||
int
|
||||
main(
|
||||
int argc GCC_UNUSED,
|
||||
char *argv[]GCC_UNUSED)
|
||||
main(int argc GCC_UNUSED,
|
||||
char *argv[]GCC_UNUSED)
|
||||
{
|
||||
int ch, x, y, z, p;
|
||||
float r;
|
||||
float c;
|
||||
double r;
|
||||
double c;
|
||||
bool use_colors;
|
||||
bool opt_r = FALSE;
|
||||
char *my_pairs = 0;
|
||||
@ -107,7 +108,7 @@ main(
|
||||
if (use_colors) {
|
||||
start_color();
|
||||
if (COLOR_PAIRS > 0) {
|
||||
my_pairs = typeCalloc(char, COLOR_PAIRS);
|
||||
my_pairs = typeCalloc(char, (size_t) COLOR_PAIRS);
|
||||
}
|
||||
use_colors = (my_pairs != 0);
|
||||
}
|
||||
@ -116,8 +117,8 @@ main(
|
||||
|
||||
curs_set(0);
|
||||
|
||||
r = (float) (LINES - 4);
|
||||
c = (float) (COLS - 4);
|
||||
r = (double) (LINES - 4);
|
||||
c = (double) (COLS - 4);
|
||||
started = time((time_t *) 0);
|
||||
|
||||
while (!interrupted) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
|
||||
* Copyright (c) 1998-2008,2010 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 <dickey@clark.net> 1998
|
||||
*
|
||||
* $Id: filter.c,v 1.12 2008/12/06 21:59:27 tom Exp $
|
||||
* $Id: filter.c,v 1.13 2010/11/13 20:55:54 tom Exp $
|
||||
*/
|
||||
#include <test.priv.h>
|
||||
|
||||
@ -132,7 +132,7 @@ main(int argc, char *argv[])
|
||||
if (use_default_colors() != ERR)
|
||||
background = -1;
|
||||
#endif
|
||||
init_pair(1, COLOR_CYAN, background);
|
||||
init_pair(1, COLOR_CYAN, (short) background);
|
||||
underline = COLOR_PAIR(1);
|
||||
} else {
|
||||
underline = A_UNDERLINE;
|
||||
|
@ -26,13 +26,13 @@
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
/*
|
||||
* $Id: firework.c,v 1.26 2010/05/01 19:12:26 tom Exp $
|
||||
* $Id: firework.c,v 1.27 2010/11/13 20:58:25 tom Exp $
|
||||
*/
|
||||
#include <test.priv.h>
|
||||
|
||||
#include <time.h>
|
||||
|
||||
static int my_bg = COLOR_BLACK;
|
||||
static short my_bg = COLOR_BLACK;
|
||||
|
||||
static void
|
||||
cleanup(void)
|
||||
@ -70,7 +70,7 @@ showit(void)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
static short
|
||||
get_colour(chtype *bold)
|
||||
{
|
||||
int attr;
|
||||
@ -81,7 +81,7 @@ get_colour(chtype *bold)
|
||||
*bold = A_BOLD;
|
||||
attr &= 7;
|
||||
}
|
||||
return (attr);
|
||||
return (short) (attr);
|
||||
}
|
||||
|
||||
static
|
||||
@ -162,7 +162,7 @@ main(
|
||||
}
|
||||
curs_set(0);
|
||||
|
||||
seed = time((time_t *) 0);
|
||||
seed = (unsigned) time((time_t *) 0);
|
||||
srand(seed);
|
||||
for (;;) {
|
||||
do {
|
||||
@ -187,7 +187,7 @@ main(
|
||||
showit();
|
||||
flag = 0;
|
||||
}
|
||||
seed = time((time_t *) 0);
|
||||
seed = (unsigned) time((time_t *) 0);
|
||||
srand(seed);
|
||||
explode(LINES - row, start + (diff * direction));
|
||||
erase();
|
||||
|
@ -29,7 +29,7 @@
|
||||
/*
|
||||
* Author: Thomas E. Dickey, 2006
|
||||
*
|
||||
* $Id: foldkeys.c,v 1.3 2006/12/09 16:54:07 tom Exp $
|
||||
* $Id: foldkeys.c,v 1.4 2010/11/14 01:00:53 tom Exp $
|
||||
*
|
||||
* Demonstrate a method for altering key definitions at runtime.
|
||||
*
|
||||
@ -229,8 +229,8 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
|
||||
|
||||
#if HAVE_GETTIMEOFDAY
|
||||
gettimeofday(¤t, 0);
|
||||
secs = current.tv_sec - previous.tv_sec;
|
||||
msecs = (current.tv_usec - previous.tv_usec) / 1000;
|
||||
secs = (int) (current.tv_sec - previous.tv_sec);
|
||||
msecs = (int) ((current.tv_usec - previous.tv_usec) / 1000);
|
||||
if (msecs < 0) {
|
||||
msecs += 1000;
|
||||
--secs;
|
||||
|
@ -33,7 +33,7 @@
|
||||
* modified 10-18-89 for curses (jrl)
|
||||
* 10-18-89 added signal handling
|
||||
*
|
||||
* $Id: gdc.c,v 1.33 2010/05/01 19:12:26 tom Exp $
|
||||
* $Id: gdc.c,v 1.34 2010/11/13 21:01:23 tom Exp $
|
||||
*/
|
||||
|
||||
#include <test.priv.h>
|
||||
@ -211,7 +211,7 @@ main(int argc, char *argv[])
|
||||
hascolor = has_colors();
|
||||
|
||||
if (hascolor) {
|
||||
int bg = COLOR_BLACK;
|
||||
short bg = COLOR_BLACK;
|
||||
start_color();
|
||||
#if HAVE_USE_DEFAULT_COLORS
|
||||
if (use_default_colors() == OK)
|
||||
|
22
test/hanoi.c
22
test/hanoi.c
@ -41,7 +41,7 @@
|
||||
*
|
||||
* Date: 05.Nov.90
|
||||
*
|
||||
* $Id: hanoi.c,v 1.29 2010/05/01 19:12:26 tom Exp $
|
||||
* $Id: hanoi.c,v 1.31 2010/11/14 01:01:07 tom Exp $
|
||||
*/
|
||||
|
||||
#include <test.priv.h>
|
||||
@ -67,8 +67,12 @@ struct Peg {
|
||||
|
||||
static struct Peg Pegs[NPEGS];
|
||||
static int PegPos[] =
|
||||
{LEFTPEG, MIDPEG, RIGHTPEG};
|
||||
static int TileColour[] =
|
||||
{
|
||||
LEFTPEG,
|
||||
MIDPEG,
|
||||
RIGHTPEG
|
||||
};
|
||||
static short TileColour[] =
|
||||
{
|
||||
COLOR_GREEN, /* Length 3 */
|
||||
COLOR_MAGENTA, /* Length 5 */
|
||||
@ -132,14 +136,14 @@ main(int argc, char **argv)
|
||||
initscr();
|
||||
if (has_colors()) {
|
||||
int i;
|
||||
int bg = COLOR_BLACK;
|
||||
short bg = COLOR_BLACK;
|
||||
start_color();
|
||||
#if HAVE_USE_DEFAULT_COLORS
|
||||
if (use_default_colors() == OK)
|
||||
bg = -1;
|
||||
#endif
|
||||
for (i = 0; i < 9; i++)
|
||||
init_pair(i + 1, bg, TileColour[i]);
|
||||
init_pair((short) (i + 1), bg, TileColour[i]);
|
||||
}
|
||||
cbreak();
|
||||
if (LINES < 24) {
|
||||
@ -212,7 +216,7 @@ InitTiles(int NTiles)
|
||||
int Size, SlotNo;
|
||||
|
||||
for (Size = NTiles * 2 + 1, SlotNo = 0; Size >= 3; Size -= 2)
|
||||
Pegs[0].Length[SlotNo++] = Size;
|
||||
Pegs[0].Length[SlotNo++] = (size_t) Size;
|
||||
|
||||
Pegs[0].Count = NTiles;
|
||||
Pegs[1].Count = 0;
|
||||
@ -246,8 +250,8 @@ DisplayTiles(void)
|
||||
/* Draw tiles */
|
||||
for (peg = 0; peg < NPEGS; peg++) {
|
||||
for (SlotNo = 0; SlotNo < Pegs[peg].Count; SlotNo++) {
|
||||
unsigned len = Pegs[peg].Length[SlotNo];
|
||||
if (len < sizeof(TileBuf) - 1 && len < (unsigned) PegPos[peg]) {
|
||||
size_t len = Pegs[peg].Length[SlotNo];
|
||||
if (len < sizeof(TileBuf) - 1 && len < (size_t) PegPos[peg]) {
|
||||
memset(TileBuf, ' ', len);
|
||||
TileBuf[len] = '\0';
|
||||
if (has_colors())
|
||||
@ -255,7 +259,7 @@ DisplayTiles(void)
|
||||
else
|
||||
(void) attrset(A_REVERSE);
|
||||
MvAddStr(BASELINE - (SlotNo + 1),
|
||||
(int) (PegPos[peg] - len / 2),
|
||||
(PegPos[peg] - (int) len / 2),
|
||||
TileBuf);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
|
||||
* Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a *
|
||||
* copy of this software and associated documentation files (the *
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
* Generate timing statistics for vertical-motion optimization.
|
||||
*
|
||||
* $Id: hashtest.c,v 1.30 2009/10/10 16:14:53 tom Exp $
|
||||
* $Id: hashtest.c,v 1.31 2010/11/13 23:43:15 tom Exp $
|
||||
*/
|
||||
|
||||
#include <test.priv.h>
|
||||
@ -86,7 +86,8 @@ genlines(int base)
|
||||
|
||||
move(head_lines, 0);
|
||||
for (i = head_lines; i < LINES - foot_lines; i++) {
|
||||
chtype c = (base - LO_CHAR + i) % (HI_CHAR - LO_CHAR + 1) + LO_CHAR;
|
||||
chtype c = (chtype) ((base - LO_CHAR + i) % (HI_CHAR - LO_CHAR + 1)
|
||||
+ LO_CHAR);
|
||||
int hi = (extend_corner || (i < LINES - 1)) ? COLS : COLS - 1;
|
||||
for (j = 0; j < hi; j++)
|
||||
addch(c);
|
||||
|
10
test/inchs.c
10
test/inchs.c
@ -26,7 +26,7 @@
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
/*
|
||||
* $Id: inchs.c,v 1.10 2010/05/01 19:13:46 tom Exp $
|
||||
* $Id: inchs.c,v 1.11 2010/11/13 23:41:23 tom Exp $
|
||||
*
|
||||
* Author: Thomas E Dickey
|
||||
*/
|
||||
@ -158,10 +158,10 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin)
|
||||
if (txtwin != stdscr) {
|
||||
wmove(txtwin, txt_y, txt_x);
|
||||
|
||||
if ((ch = winch(txtwin)) != ERR) {
|
||||
if ((ch = (int) winch(txtwin)) != ERR) {
|
||||
if (waddch(chrwin, (chtype) ch) != ERR) {
|
||||
for (j = txt_x + 1; j < getmaxx(txtwin); ++j) {
|
||||
if ((ch = mvwinch(txtwin, txt_y, j)) != ERR) {
|
||||
if ((ch = (int) mvwinch(txtwin, txt_y, j)) != ERR) {
|
||||
if (waddch(chrwin, (chtype) ch) == ERR) {
|
||||
break;
|
||||
}
|
||||
@ -174,10 +174,10 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin)
|
||||
} else {
|
||||
move(txt_y, txt_x);
|
||||
|
||||
if ((ch = inch()) != ERR) {
|
||||
if ((ch = (int) inch()) != ERR) {
|
||||
if (waddch(chrwin, (chtype) ch) != ERR) {
|
||||
for (j = txt_x + 1; j < getmaxx(txtwin); ++j) {
|
||||
if ((ch = mvinch(txt_y, j)) != ERR) {
|
||||
if ((ch = (int) mvinch(txt_y, j)) != ERR) {
|
||||
if (waddch(chrwin, (chtype) ch) == ERR) {
|
||||
break;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
/*
|
||||
* $Id: ins_wide.c,v 1.12 2010/05/01 19:12:26 tom Exp $
|
||||
* $Id: ins_wide.c,v 1.13 2010/11/13 23:40:32 tom Exp $
|
||||
*
|
||||
* Demonstrate the wins_wstr() and wins_wch functions.
|
||||
* Thomas Dickey - 2002/11/23
|
||||
@ -146,7 +146,7 @@ ConvertCh(chtype source, cchar_t *target)
|
||||
{
|
||||
wchar_t tmp_wchar[2];
|
||||
|
||||
tmp_wchar[0] = source;
|
||||
tmp_wchar[0] = (wchar_t) source;
|
||||
tmp_wchar[1] = 0;
|
||||
if (setcchar(target, tmp_wchar, A_NORMAL, 0, (void *) 0) == ERR) {
|
||||
beep();
|
||||
@ -412,19 +412,19 @@ test_inserts(int level)
|
||||
switch (option) {
|
||||
case oDefault:
|
||||
if (move(limit + row, col) != ERR) {
|
||||
InsCh(ch);
|
||||
InsCh((chtype) ch);
|
||||
}
|
||||
break;
|
||||
case oMove:
|
||||
MvInsCh(limit + row, col, ch);
|
||||
MvInsCh(limit + row, col, (chtype) ch);
|
||||
break;
|
||||
case oWindow:
|
||||
if (wmove(work, limit + row, col) != ERR) {
|
||||
WInsCh(work, ch);
|
||||
WInsCh(work, (chtype) ch);
|
||||
}
|
||||
break;
|
||||
case oMoveWindow:
|
||||
MvWInsCh(work, limit + row, col, ch);
|
||||
MvWInsCh(work, limit + row, col, (chtype) ch);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
/*
|
||||
* $Id: insdelln.c,v 1.4 2010/05/01 19:11:55 tom Exp $
|
||||
* $Id: insdelln.c,v 1.5 2010/11/13 23:39:38 tom Exp $
|
||||
*
|
||||
* test-driver for deleteln, wdeleteln, insdelln, winsdelln, insertln, winsertln
|
||||
*/
|
||||
@ -56,8 +56,8 @@ color_params(unsigned state, int *pair)
|
||||
{
|
||||
/* *INDENT-OFF* */
|
||||
static struct {
|
||||
int pair;
|
||||
int fg, bg;
|
||||
short pair;
|
||||
short fg, bg;
|
||||
const char *msg;
|
||||
} table[] = {
|
||||
{ 0, COLOR_DEFAULT, COLOR_DEFAULT, "default" },
|
||||
@ -300,7 +300,7 @@ test_winsdelln(WINDOW *win)
|
||||
init_status(win, &st);
|
||||
|
||||
do {
|
||||
(void) wattrset(win, st.attr | COLOR_PAIR(st.pair));
|
||||
(void) wattrset(win, st.attr | (attr_t) COLOR_PAIR(st.pair));
|
||||
switch (st.ch) {
|
||||
case 'i':
|
||||
for (n = 0; n < st.count; ++n)
|
||||
@ -341,7 +341,7 @@ test_insdelln(void)
|
||||
init_status(stdscr, &st);
|
||||
|
||||
do {
|
||||
(void) attrset(st.attr | COLOR_PAIR(st.pair));
|
||||
(void) attrset(st.attr | (attr_t) COLOR_PAIR(st.pair));
|
||||
switch (st.ch) {
|
||||
case 'i':
|
||||
for (n = 0; n < st.count; ++n)
|
||||
|
@ -33,7 +33,7 @@
|
||||
* Eric S. Raymond <esr@snark.thyrsus.com> July 22 1995. Mouse support
|
||||
* added September 20th 1995.
|
||||
*
|
||||
* $Id: knight.c,v 1.29 2010/05/01 19:11:55 tom Exp $
|
||||
* $Id: knight.c,v 1.31 2010/11/13 20:44:21 tom Exp $
|
||||
*/
|
||||
|
||||
#include <test.priv.h>
|
||||
@ -119,9 +119,9 @@ init_program(void)
|
||||
bg = -1;
|
||||
#endif
|
||||
|
||||
(void) init_pair(TRAIL_COLOR, COLOR_CYAN, bg);
|
||||
(void) init_pair(PLUS_COLOR, COLOR_RED, bg);
|
||||
(void) init_pair(MINUS_COLOR, COLOR_GREEN, bg);
|
||||
(void) init_pair(TRAIL_COLOR, (short) COLOR_CYAN, (short) bg);
|
||||
(void) init_pair(PLUS_COLOR, (short) COLOR_RED, (short) bg);
|
||||
(void) init_pair(MINUS_COLOR, (short) COLOR_GREEN, (short) bg);
|
||||
|
||||
trail |= COLOR_PAIR(TRAIL_COLOR);
|
||||
plus |= COLOR_PAIR(PLUS_COLOR);
|
||||
@ -156,7 +156,7 @@ help1(void)
|
||||
(void) waddstr(helpwin, "of legal moves.\n\n");
|
||||
|
||||
MvWAddStr(helpwin, NOTIFYY - INSTRY, 0,
|
||||
"Press `?' to go to keystroke help.");
|
||||
"Press `?' to go to keystroke help.");
|
||||
}
|
||||
|
||||
static void
|
||||
@ -182,7 +182,7 @@ help2(void)
|
||||
(void) waddstr(helpwin, "center key. Use F/B to review the path.\n");
|
||||
|
||||
MvWAddStr(helpwin, NOTIFYY - INSTRY, 0,
|
||||
"Press `?' to go to game explanation");
|
||||
"Press `?' to go to game explanation");
|
||||
}
|
||||
|
||||
static void
|
||||
@ -319,12 +319,12 @@ find_next_move(int *y, int *x)
|
||||
newx = oldx + offsets[k].x;
|
||||
if (chksqr(newy, newx)) {
|
||||
if (first < 0)
|
||||
first = k;
|
||||
first = (int) k;
|
||||
if (newy == *y
|
||||
&& newx == *x) {
|
||||
found = k;
|
||||
found = (int) k;
|
||||
} else if (found >= 0) {
|
||||
next = k;
|
||||
next = (int) k;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -586,8 +586,8 @@ play(void)
|
||||
history[movecount - 1].y,
|
||||
history[movecount - 1].x,
|
||||
rw, col);
|
||||
history[movecount].y = rw;
|
||||
history[movecount].x = col;
|
||||
history[movecount].y = (short) rw;
|
||||
history[movecount].x = (short) col;
|
||||
movecount++;
|
||||
trialcount++;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Copyright (c) 2009 Free Software Foundation, Inc. *
|
||||
* Copyright (c) 2009,2010 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 *
|
||||
@ -86,7 +86,7 @@ read_linedata(WINDOW *work)
|
||||
continue;
|
||||
}
|
||||
} else if (code != ERR) {
|
||||
result = ch;
|
||||
result = (int) ch;
|
||||
break;
|
||||
} else {
|
||||
break;
|
||||
|
@ -26,7 +26,7 @@
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
/*
|
||||
* $Id: movewindow.c,v 1.23 2010/05/01 19:11:55 tom Exp $
|
||||
* $Id: movewindow.c,v 1.24 2010/11/13 23:34:55 tom Exp $
|
||||
*
|
||||
* Demonstrate move functions for windows and derived windows from the curses
|
||||
* library.
|
||||
@ -311,7 +311,7 @@ next_window(WINDOW *win)
|
||||
int n = window2num(win);
|
||||
|
||||
if (n++ >= 0) {
|
||||
result = all_windows[n % num_windows].child;
|
||||
result = all_windows[(unsigned) n % num_windows].child;
|
||||
wmove(result, 0, 0);
|
||||
wrefresh(result);
|
||||
}
|
||||
@ -326,8 +326,8 @@ prev_window(WINDOW *win)
|
||||
|
||||
if (n-- >= 0) {
|
||||
if (n < 0)
|
||||
n = num_windows - 1;
|
||||
result = all_windows[n % num_windows].child;
|
||||
n = (int) (num_windows - 1);
|
||||
result = all_windows[(unsigned) n % num_windows].child;
|
||||
wmove(result, 0, 0);
|
||||
wrefresh(result);
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ AUTHOR
|
||||
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
|
||||
Thomas E. Dickey (beginning revision 1.27 in 1996).
|
||||
|
||||
$Id: ncurses.c,v 1.360 2010/07/24 18:04:58 tom Exp $
|
||||
$Id: ncurses.c,v 1.362 2010/11/14 01:04:13 tom Exp $
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
@ -1534,7 +1534,7 @@ attr_test(void)
|
||||
if (init_pair(pair, fg, bg) == ERR) {
|
||||
beep();
|
||||
} else {
|
||||
normal |= COLOR_PAIR(pair);
|
||||
normal |= (chtype) COLOR_PAIR(pair);
|
||||
}
|
||||
}
|
||||
if (tx >= 0) {
|
||||
@ -1542,7 +1542,7 @@ attr_test(void)
|
||||
if (init_pair(pair, tx, bg) == ERR) {
|
||||
beep();
|
||||
} else {
|
||||
extras |= COLOR_PAIR(pair);
|
||||
extras |= (chtype) COLOR_PAIR(pair);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1827,9 +1827,9 @@ wide_attr_test(void)
|
||||
|
||||
for (j = 0; j < SIZEOF(attrs_to_test); ++j) {
|
||||
row = wide_show_attr(row, n, j == k,
|
||||
ac |
|
||||
attrs_to_test[j].attr |
|
||||
attrs_to_test[k].attr,
|
||||
((attr_t) ac |
|
||||
attrs_to_test[j].attr |
|
||||
attrs_to_test[k].attr),
|
||||
extras,
|
||||
attrs_to_test[j].name);
|
||||
}
|
||||
@ -2415,7 +2415,7 @@ color_edit(void)
|
||||
(i == current ? '>' : ' '),
|
||||
(i < (int) SIZEOF(the_color_names)
|
||||
? the_color_names[i] : numeric));
|
||||
(void) attrset(COLOR_PAIR(i));
|
||||
(void) attrset((attr_t) COLOR_PAIR(i));
|
||||
addstr(" ");
|
||||
(void) attrset(A_NORMAL);
|
||||
|
||||
@ -2709,9 +2709,9 @@ cycle_colors(int ch, int *fg, int *bg, short *pair)
|
||||
|
||||
#if HAVE_SLK_COLOR
|
||||
static void
|
||||
call_slk_color(short fg, short bg)
|
||||
call_slk_color(int fg, int bg)
|
||||
{
|
||||
init_pair(1, bg, fg);
|
||||
init_pair(1, (short) bg, (short) fg);
|
||||
slk_color(1);
|
||||
MvPrintw(SLK_WORK, 0, "Colors %d/%d\n", fg, bg);
|
||||
clrtoeol();
|
||||
@ -3085,7 +3085,8 @@ static void
|
||||
show_box_chars(int repeat, attr_t attr, short pair)
|
||||
{
|
||||
(void) repeat;
|
||||
attr |= COLOR_PAIR(pair);
|
||||
|
||||
attr |= (attr_t) COLOR_PAIR(pair);
|
||||
|
||||
erase();
|
||||
attron(A_BOLD);
|
||||
@ -3133,7 +3134,7 @@ show_acs_chars(int repeat, attr_t attr, short pair)
|
||||
{
|
||||
int n;
|
||||
|
||||
#define BOTH(name) #name, colored_chtype(name, attr, pair)
|
||||
#define BOTH(name) #name, colored_chtype(name, attr, (chtype) pair)
|
||||
|
||||
erase();
|
||||
attron(A_BOLD);
|
||||
@ -3339,8 +3340,11 @@ show_upper_widechars(int first, int repeat, int space, attr_t attr, short pair)
|
||||
* Mark them with reverse-video to make them simpler to find on
|
||||
* the display.
|
||||
*/
|
||||
if (wcwidth(code) == 0)
|
||||
addch(space | (A_REVERSE ^ attr) | COLOR_PAIR(pair));
|
||||
if (wcwidth(code) == 0) {
|
||||
addch((chtype) space |
|
||||
(A_REVERSE ^ attr) |
|
||||
(attr_t) COLOR_PAIR(pair));
|
||||
}
|
||||
/*
|
||||
* This could use add_wch(), but is done for comparison with the
|
||||
* normal 'f' test (and to make a test-case for echo_wchar()).
|
||||
@ -4468,7 +4472,7 @@ mkpanel(short color, int rows, int cols, int tly, int tlx)
|
||||
short bg = color;
|
||||
|
||||
init_pair(color, fg, bg);
|
||||
wbkgdset(win, (chtype) (COLOR_PAIR(color) | ' '));
|
||||
wbkgdset(win, (attr_t) (COLOR_PAIR(color) | ' '));
|
||||
} else {
|
||||
wbkgdset(win, A_BOLD | ' ');
|
||||
}
|
||||
@ -5062,11 +5066,11 @@ panner(WINDOW *pad,
|
||||
|
||||
doupdate();
|
||||
#if HAVE_GETTIMEOFDAY
|
||||
#define TIMEVAL2S(data) ((double) data.tv_sec + ((double) data.tv_usec / 1.0e6))
|
||||
if (timing) {
|
||||
double elapsed;
|
||||
gettimeofday(&after, 0);
|
||||
elapsed = (after.tv_sec + after.tv_usec / 1.0e6)
|
||||
- (before.tv_sec + before.tv_usec / 1.0e6);
|
||||
elapsed = (TIMEVAL2S(after) - TIMEVAL2S(before));
|
||||
move(LINES - 1, COLS - 12);
|
||||
printw("Secs: %2.03f", elapsed);
|
||||
refresh();
|
||||
@ -5584,7 +5588,7 @@ make_label(int frow, int fcol, NCURSES_CONST char *label)
|
||||
|
||||
if (f) {
|
||||
set_field_buffer(f, 0, label);
|
||||
set_field_opts(f, (int) (field_opts(f) & ~O_ACTIVE));
|
||||
set_field_opts(f, (int) ((unsigned) field_opts(f) & ~O_ACTIVE));
|
||||
}
|
||||
return (f);
|
||||
}
|
||||
@ -6048,11 +6052,11 @@ overlap_test_1_attr(WINDOW *win, int flavor, int col)
|
||||
break;
|
||||
case 2:
|
||||
init_pair(cpair, COLOR_BLUE, COLOR_WHITE);
|
||||
(void) wattrset(win, COLOR_PAIR(cpair) | A_NORMAL);
|
||||
(void) wattrset(win, (attr_t) COLOR_PAIR(cpair) | A_NORMAL);
|
||||
break;
|
||||
case 3:
|
||||
init_pair(cpair, COLOR_WHITE, COLOR_BLUE);
|
||||
(void) wattrset(win, COLOR_PAIR(cpair) | A_BOLD);
|
||||
(void) wattrset(win, (attr_t) COLOR_PAIR(cpair) | A_BOLD);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -6709,7 +6713,7 @@ main(int argc, char *argv[])
|
||||
break;
|
||||
#if USE_LIBPANEL
|
||||
case 's':
|
||||
nap_msec = atol(optarg);
|
||||
nap_msec = (int) atol(optarg);
|
||||
break;
|
||||
#endif
|
||||
#ifdef TRACE
|
||||
|
@ -2,7 +2,7 @@
|
||||
* newdemo.c - A demo program using PDCurses. The program illustrate
|
||||
* the use of colours for text output.
|
||||
*
|
||||
* $Id: newdemo.c,v 1.33 2010/05/01 19:07:34 tom Exp $
|
||||
* $Id: newdemo.c,v 1.34 2010/11/13 23:33:42 tom Exp $
|
||||
*/
|
||||
|
||||
#include <test.priv.h>
|
||||
@ -66,7 +66,7 @@ WaitForUser(WINDOW *win)
|
||||
nodelay(win, TRUE);
|
||||
t = time((time_t *) 0);
|
||||
while (1) {
|
||||
if ((int) (key = wgetch(win)) != ERR) {
|
||||
if ((int) (key = (chtype) wgetch(win)) != ERR) {
|
||||
if (key == 'q' || key == 'Q')
|
||||
return 1;
|
||||
else
|
||||
@ -83,8 +83,8 @@ set_colors(WINDOW *win, int pair, int foreground, int background)
|
||||
if (has_colors()) {
|
||||
if (pair > COLOR_PAIRS)
|
||||
pair = COLOR_PAIRS;
|
||||
init_pair(pair, foreground, background);
|
||||
(void) wattrset(win, COLOR_PAIR(pair));
|
||||
init_pair((short) pair, (short) foreground, (short) background);
|
||||
(void) wattrset(win, (attr_t) COLOR_PAIR(pair));
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ use_colors(WINDOW *win, int pair, chtype attrs)
|
||||
if (has_colors()) {
|
||||
if (pair > COLOR_PAIRS)
|
||||
pair = COLOR_PAIRS;
|
||||
attrs |= COLOR_PAIR(pair);
|
||||
attrs |= (chtype) COLOR_PAIR(pair);
|
||||
}
|
||||
(void) wattrset(win, attrs);
|
||||
return attrs;
|
||||
@ -321,10 +321,10 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
|
||||
set_colors(win, 7, COLOR_RED, COLOR_GREEN);
|
||||
memset(save, ' ', sizeof(save));
|
||||
for (i = 2; i < width - 4; ++i) {
|
||||
k = mvwinch(win, 4, i);
|
||||
k = (int) mvwinch(win, 4, i);
|
||||
if (k == ERR)
|
||||
break;
|
||||
save[j++] = c = k;
|
||||
save[j++] = c = (chtype) k;
|
||||
c &= A_CHARTEXT;
|
||||
MvWAddCh(win, 4, i, c);
|
||||
}
|
||||
|
16
test/rain.c
16
test/rain.c
@ -26,7 +26,7 @@
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
/*
|
||||
* $Id: rain.c,v 1.37 2010/09/25 22:16:12 juergen Exp $
|
||||
* $Id: rain.c,v 1.38 2010/11/13 20:11:46 tom Exp $
|
||||
*/
|
||||
#include <test.priv.h>
|
||||
|
||||
@ -74,23 +74,23 @@ onsig(int n GCC_UNUSED)
|
||||
ExitProgram(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
static float
|
||||
static double
|
||||
ranf(void)
|
||||
{
|
||||
long r = (rand() & 077777);
|
||||
return ((float) r / 32768.);
|
||||
return ((double) r / 32768.);
|
||||
}
|
||||
|
||||
static int
|
||||
random_x(void)
|
||||
{
|
||||
return (((float) (COLS - 4) * ranf()) + 2);
|
||||
return (int) (((double) (COLS - 4) * ranf()) + 2);
|
||||
}
|
||||
|
||||
static int
|
||||
random_y(void)
|
||||
{
|
||||
return (((float) (LINES - 4) * ranf()) + 2);
|
||||
return (int) (((double) (LINES - 4) * ranf()) + 2);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -102,7 +102,7 @@ next_j(int j)
|
||||
--j;
|
||||
if (has_colors()) {
|
||||
int z = (int) (3 * ranf());
|
||||
chtype color = COLOR_PAIR(z);
|
||||
chtype color = (chtype) COLOR_PAIR(z);
|
||||
if (z)
|
||||
color |= A_BOLD;
|
||||
(void) attrset(color);
|
||||
@ -314,8 +314,8 @@ main(int argc GCC_UNUSED,
|
||||
if (use_default_colors() == OK)
|
||||
bg = -1;
|
||||
#endif
|
||||
init_pair(1, COLOR_BLUE, bg);
|
||||
init_pair(2, COLOR_CYAN, bg);
|
||||
init_pair(1, COLOR_BLUE, (short) bg);
|
||||
init_pair(2, COLOR_CYAN, (short) bg);
|
||||
}
|
||||
nl();
|
||||
noecho();
|
||||
|
@ -26,7 +26,7 @@
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
/*
|
||||
* $Id: savescreen.c,v 1.12 2010/05/01 22:04:08 tom Exp $
|
||||
* $Id: savescreen.c,v 1.13 2010/11/13 21:18:00 tom Exp $
|
||||
*
|
||||
* Demonstrate save/restore functions from the curses library.
|
||||
* Thomas Dickey - 2007/7/14
|
||||
@ -189,8 +189,8 @@ main(int argc, char *argv[])
|
||||
if (has_colors()) {
|
||||
start_color();
|
||||
for (ch = 0; ch < COLOR_PAIRS; ++ch) {
|
||||
short pair = ch % COLOR_PAIRS;
|
||||
init_pair(pair, COLOR_WHITE, ch % COLORS);
|
||||
short pair = (short) (ch % COLOR_PAIRS);
|
||||
init_pair(pair, COLOR_WHITE, (short) (ch % COLORS));
|
||||
}
|
||||
}
|
||||
|
||||
@ -289,8 +289,8 @@ main(int argc, char *argv[])
|
||||
}
|
||||
++which;
|
||||
if (has_colors()) {
|
||||
short pair = which % COLOR_PAIRS;
|
||||
bkgd(COLOR_PAIR(pair));
|
||||
short pair = (short) (which % COLOR_PAIRS);
|
||||
bkgd((chtype) COLOR_PAIR(pair));
|
||||
}
|
||||
} else {
|
||||
beep();
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: tclock.c,v 1.27 2010/05/01 18:47:19 tom Exp $ */
|
||||
/* $Id: tclock.c,v 1.29 2010/11/14 01:04:52 tom Exp $ */
|
||||
|
||||
#include <test.priv.h>
|
||||
|
||||
@ -67,7 +67,7 @@ dline(int pair, int from_x, int from_y, int x2, int y2, char ch)
|
||||
int d;
|
||||
|
||||
if (has_colors())
|
||||
(void) attrset(COLOR_PAIR(pair));
|
||||
(void) attrset((attr_t) COLOR_PAIR(pair));
|
||||
|
||||
dx = x2 - from_x;
|
||||
dy = y2 - from_y;
|
||||
@ -130,7 +130,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
|
||||
struct tm *t;
|
||||
char szChar[10];
|
||||
char *text;
|
||||
int my_bg = COLOR_BLACK;
|
||||
short my_bg = COLOR_BLACK;
|
||||
#if HAVE_GETTIMEOFDAY
|
||||
struct timeval current;
|
||||
double fraction = 0.0;
|
||||
@ -201,7 +201,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
|
||||
|
||||
#if HAVE_GETTIMEOFDAY
|
||||
gettimeofday(¤t, 0);
|
||||
fraction = (current.tv_usec / 1.0e6);
|
||||
fraction = ((double) current.tv_usec / 1.0e6);
|
||||
#endif
|
||||
sangle = ((t->tm_sec + fraction) * (2.0 * PI) / 60.0);
|
||||
sdx = A2X(sangle, sradius);
|
||||
|
@ -29,7 +29,7 @@
|
||||
/****************************************************************************
|
||||
* Author: Thomas E. Dickey 1996-on *
|
||||
****************************************************************************/
|
||||
/* $Id: test.priv.h,v 1.95 2010/05/01 19:03:04 tom Exp $ */
|
||||
/* $Id: test.priv.h,v 1.97 2010/11/13 20:33:36 tom Exp $ */
|
||||
|
||||
#ifndef __TEST_PRIV_H
|
||||
#define __TEST_PRIV_H 1
|
||||
@ -186,10 +186,6 @@
|
||||
#define HAVE_TYPEAHEAD 0
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_TIGETSTR
|
||||
#define HAVE_TIGETSTR 0
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WINSSTR
|
||||
#define HAVE_WINSSTR 0
|
||||
#endif
|
||||
@ -228,7 +224,7 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <signal.h> /* include before curses.h to work around glibc bug */
|
||||
#include <signal.h> /* include before curses.h to work around glibc bug */
|
||||
|
||||
#if NEED_WCHAR_H
|
||||
#include <wchar.h>
|
||||
@ -290,20 +286,20 @@ extern int optind;
|
||||
#if HAVE_LOCALE_H
|
||||
#include <locale.h>
|
||||
#else
|
||||
#define setlocale(name,string) /* nothing */
|
||||
#define setlocale(name,string) /* nothing */
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifndef GCC_NORETURN
|
||||
#define GCC_NORETURN /* nothing */
|
||||
#define GCC_NORETURN /* nothing */
|
||||
#endif
|
||||
#ifndef GCC_PRINTFLIKE
|
||||
#define GCC_PRINTFLIKE(a,b) /* nothing */
|
||||
#define GCC_PRINTFLIKE(a,b) /* nothing */
|
||||
#endif
|
||||
#ifndef GCC_UNUSED
|
||||
#define GCC_UNUSED /* nothing */
|
||||
#define GCC_UNUSED /* nothing */
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETNSTR
|
||||
@ -372,17 +368,17 @@ extern int optind;
|
||||
#define ESCAPE CTRL('[')
|
||||
|
||||
#ifndef KEY_MIN
|
||||
#define KEY_MIN 256 /* not defined in Solaris 8 */
|
||||
#define KEY_MIN 256 /* not defined in Solaris 8 */
|
||||
#endif
|
||||
|
||||
#ifdef DECL_CURSES_DATA_BOOLNAMES
|
||||
extern char *boolnames[], *boolcodes[], *boolfnames[],
|
||||
*numnames[], *numcodes[], *numfnames[],
|
||||
*strnames[], *strcodes[], *strfnames[];
|
||||
extern char *boolnames[], *boolcodes[], *boolfnames[];
|
||||
extern char *numnames[], *numcodes[], *numfnames[];
|
||||
extern char *strnames[], *strcodes[], *strfnames[];
|
||||
#endif
|
||||
|
||||
#define colored_chtype(ch, attr, pair) \
|
||||
((ch) | (attr) | COLOR_PAIR(pair))
|
||||
((chtype) (ch) | (chtype) (attr) | (chtype) COLOR_PAIR(pair))
|
||||
|
||||
/*
|
||||
* Workaround for HPUX
|
||||
@ -521,7 +517,7 @@ extern char *boolnames[], *boolcodes[], *boolfnames[],
|
||||
* that XSI shows.
|
||||
*/
|
||||
#ifndef NCURSES_CONST
|
||||
#define NCURSES_CONST /* nothing */
|
||||
#define NCURSES_CONST /* nothing */
|
||||
#endif
|
||||
|
||||
/* out-of-band values for representing absent capabilities */
|
||||
@ -534,7 +530,7 @@ extern char *boolnames[], *boolcodes[], *boolfnames[],
|
||||
#define CANCELLED_NUMERIC (-2)
|
||||
#define CANCELLED_STRING (char *)(-1)
|
||||
|
||||
#define VALID_BOOLEAN(s) ((unsigned char)(s) <= 1) /* reject "-1" */
|
||||
#define VALID_BOOLEAN(s) ((unsigned char)(s) <= 1) /* reject "-1" */
|
||||
#define VALID_NUMERIC(s) ((s) >= 0)
|
||||
#define VALID_STRING(s) ((s) != CANCELLED_STRING && (s) != ABSENT_STRING)
|
||||
|
||||
@ -598,7 +594,7 @@ extern char *tgoto(char *, int, int); /* available, but not prototyped */
|
||||
#ifdef NCURSES_VERSION
|
||||
#define CONST_MENUS const
|
||||
#else
|
||||
#define CONST_MENUS /* nothing */
|
||||
#define CONST_MENUS /* nothing */
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_USE_WINDOW
|
||||
@ -614,8 +610,8 @@ extern char *tgoto(char *, int, int); /* available, but not prototyped */
|
||||
*/
|
||||
|
||||
#if !HAVE_USE_WINDOW
|
||||
typedef int (*NCURSES_WINDOW_CB)(WINDOW *, void *);
|
||||
typedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *);
|
||||
typedef int (*NCURSES_WINDOW_CB) (WINDOW *, void *);
|
||||
typedef int (*NCURSES_SCREEN_CB) (SCREEN *, void *);
|
||||
#endif
|
||||
|
||||
#if HAVE_USE_WINDOW
|
||||
|
@ -26,7 +26,7 @@
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
/*
|
||||
* $Id: test_add_wchstr.c,v 1.8 2010/05/01 19:13:46 tom Exp $
|
||||
* $Id: test_add_wchstr.c,v 1.9 2010/11/13 21:14:50 tom Exp $
|
||||
*
|
||||
* Demonstrate the waddwchstr() and wadd_wch functions.
|
||||
* Thomas Dickey - 2009/9/12
|
||||
@ -189,7 +189,7 @@ ConvertCh(chtype source, cchar_t *target)
|
||||
{
|
||||
wchar_t tmp_wchar[2];
|
||||
|
||||
tmp_wchar[0] = source;
|
||||
tmp_wchar[0] = (wchar_t) source;
|
||||
tmp_wchar[1] = 0;
|
||||
if (setcchar(target, tmp_wchar, A_NORMAL, 0, (void *) 0) == ERR) {
|
||||
beep();
|
||||
@ -456,19 +456,19 @@ test_add_wchstr(int level)
|
||||
switch (option) {
|
||||
case oDefault:
|
||||
if (move(limit + row, col) != ERR) {
|
||||
AddCh(ch);
|
||||
AddCh((chtype) ch);
|
||||
}
|
||||
break;
|
||||
case oMove:
|
||||
MvAddCh(limit + row, col, ch);
|
||||
MvAddCh(limit + row, col, (chtype) ch);
|
||||
break;
|
||||
case oWindow:
|
||||
if (wmove(work, limit + row, col) != ERR) {
|
||||
WAddCh(work, ch);
|
||||
WAddCh(work, (chtype) ch);
|
||||
}
|
||||
break;
|
||||
case oMoveWindow:
|
||||
MvWAddCh(work, limit + row, col, ch);
|
||||
MvWAddCh(work, limit + row, col, (chtype) ch);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
/*
|
||||
* $Id: test_addwstr.c,v 1.3 2010/05/01 19:13:46 tom Exp $
|
||||
* $Id: test_addwstr.c,v 1.4 2010/11/13 21:13:53 tom Exp $
|
||||
*
|
||||
* Demonstrate the waddwstr() and wadd_wch functions.
|
||||
* Thomas Dickey - 2009/9/12
|
||||
@ -151,7 +151,7 @@ ConvertCh(chtype source, cchar_t *target)
|
||||
{
|
||||
wchar_t tmp_wchar[2];
|
||||
|
||||
tmp_wchar[0] = source;
|
||||
tmp_wchar[0] = (wchar_t) source;
|
||||
tmp_wchar[1] = 0;
|
||||
if (setcchar(target, tmp_wchar, A_NORMAL, 0, (void *) 0) == ERR) {
|
||||
beep();
|
||||
@ -420,19 +420,19 @@ test_inserts(int level)
|
||||
switch (option) {
|
||||
case oDefault:
|
||||
if (move(limit + row, col) != ERR) {
|
||||
AddCh(ch);
|
||||
AddCh((chtype) ch);
|
||||
}
|
||||
break;
|
||||
case oMove:
|
||||
MvAddCh(limit + row, col, ch);
|
||||
MvAddCh(limit + row, col, (chtype) ch);
|
||||
break;
|
||||
case oWindow:
|
||||
if (wmove(work, limit + row, col) != ERR) {
|
||||
WAddCh(work, ch);
|
||||
WAddCh(work, (chtype) ch);
|
||||
}
|
||||
break;
|
||||
case oMoveWindow:
|
||||
MvWAddCh(work, limit + row, col, ch);
|
||||
MvWAddCh(work, limit + row, col, (chtype) ch);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
* authorization. *
|
||||
****************************************************************************/
|
||||
/*
|
||||
* $Id: test_arrays.c,v 1.4 2009/07/17 00:09:00 tom Exp $
|
||||
* $Id: test_arrays.c,v 1.5 2010/11/13 19:57:57 tom Exp $
|
||||
*
|
||||
* Author: Thomas E Dickey
|
||||
*
|
||||
@ -47,6 +47,7 @@ extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[];
|
||||
#define USE_TINFO
|
||||
#include <test.priv.h>
|
||||
|
||||
#if HAVE_TIGETSTR
|
||||
#if defined(HAVE_CURSES_DATA_BOOLNAMES) || defined(DECL_CURSES_DATA_BOOLNAMES)
|
||||
|
||||
#define DUMP(name) dump_array(#name, name)
|
||||
@ -88,3 +89,11 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
|
||||
ExitProgram(EXIT_FAILURE);
|
||||
}
|
||||
#endif
|
||||
#else /* !HAVE_TIGETSTR */
|
||||
int
|
||||
main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
|
||||
{
|
||||
printf("This program requires the terminfo functions such as tigetstr\n");
|
||||
ExitProgram(EXIT_FAILURE);
|
||||
}
|
||||
#endif /* HAVE_TIGETSTR */
|
||||
|
@ -1,5 +1,4 @@
|
||||
/*
|
||||
*
|
||||
* This is a test program for the PDCurses screen package for IBM PC type
|
||||
* machines.
|
||||
*
|
||||
@ -7,7 +6,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.42 2010/05/01 19:23:19 tom Exp $
|
||||
* $Id: testcurs.c,v 1.43 2010/11/13 21:02:28 tom Exp $
|
||||
*/
|
||||
|
||||
#include <test.priv.h>
|
||||
@ -416,7 +415,7 @@ inputTest(WINDOW *win)
|
||||
"%d %[][a-zA-Z]s",
|
||||
"%d %[^0-9]"
|
||||
};
|
||||
const char *format = fmt[repeat % SIZEOF(fmt)];
|
||||
const char *format = fmt[(unsigned) repeat % SIZEOF(fmt)];
|
||||
|
||||
wclear(win);
|
||||
MvWAddStr(win, 3, 2, "The window should have moved");
|
||||
|
29
test/view.c
29
test/view.c
@ -50,7 +50,7 @@
|
||||
* scroll operation worked, and the refresh() code only had to do a
|
||||
* partial repaint.
|
||||
*
|
||||
* $Id: view.c,v 1.79 2010/05/01 21:56:10 tom Exp $
|
||||
* $Id: view.c,v 1.81 2010/11/14 01:06:02 tom Exp $
|
||||
*/
|
||||
|
||||
#include <test.priv.h>
|
||||
@ -178,7 +178,7 @@ ch_len(NCURSES_CH_T * src)
|
||||
static NCURSES_CH_T *
|
||||
ch_dup(char *src)
|
||||
{
|
||||
unsigned len = strlen(src);
|
||||
unsigned len = (unsigned) strlen(src);
|
||||
NCURSES_CH_T *dst = typeMalloc(NCURSES_CH_T, len + 1);
|
||||
unsigned j, k;
|
||||
#if USE_WIDEC_SUPPORT
|
||||
@ -197,7 +197,7 @@ ch_dup(char *src)
|
||||
#endif
|
||||
for (j = k = 0; j < len; j++) {
|
||||
#if USE_WIDEC_SUPPORT
|
||||
rc = check_mbytes(wch, src + j, len - j, state);
|
||||
rc = (size_t) check_mbytes(wch, src + j, len - j, state);
|
||||
if (rc == (size_t) -1 || rc == (size_t) -2)
|
||||
break;
|
||||
j += rc - 1;
|
||||
@ -214,7 +214,7 @@ ch_dup(char *src)
|
||||
wstr[l++] = L' ';
|
||||
wstr[l++] = wch;
|
||||
#else
|
||||
dst[k++] = src[j];
|
||||
dst[k++] = (chtype) UChar(src[j]);
|
||||
#endif
|
||||
}
|
||||
#if USE_WIDEC_SUPPORT
|
||||
@ -291,7 +291,7 @@ main(int argc, char *argv[])
|
||||
if (optind + 1 != argc)
|
||||
usage();
|
||||
|
||||
if ((vec_lines = typeCalloc(NCURSES_CH_T *, MAXLINES + 2)) == 0)
|
||||
if ((vec_lines = typeCalloc(NCURSES_CH_T *, (size_t) MAXLINES + 2)) == 0)
|
||||
usage();
|
||||
|
||||
assert(vec_lines != 0);
|
||||
@ -333,14 +333,14 @@ main(int argc, char *argv[])
|
||||
} else {
|
||||
sprintf(d, "\\%03o", UChar(*s));
|
||||
d += strlen(d);
|
||||
col = (d - temp);
|
||||
col = (int) (d - temp);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
*lptr = ch_dup(temp);
|
||||
}
|
||||
(void) fclose(fp);
|
||||
num_lines = lptr - vec_lines;
|
||||
num_lines = (int) (lptr - vec_lines);
|
||||
|
||||
(void) initscr(); /* initialize the curses library */
|
||||
keypad(stdscr, TRUE); /* enable keyboard mapping */
|
||||
@ -405,7 +405,7 @@ main(int argc, char *argv[])
|
||||
lptr++;
|
||||
else
|
||||
break;
|
||||
scrl(lptr - olptr);
|
||||
scrl((int) (lptr - olptr));
|
||||
break;
|
||||
|
||||
case KEY_UP:
|
||||
@ -416,7 +416,7 @@ main(int argc, char *argv[])
|
||||
lptr--;
|
||||
else
|
||||
break;
|
||||
scrl(lptr - olptr);
|
||||
scrl((int) (lptr - olptr));
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
@ -539,9 +539,12 @@ show_all(const char *tag)
|
||||
|
||||
#if CAN_RESIZE
|
||||
sprintf(temp, "%.20s (%3dx%3d) col %d ", tag, LINES, COLS, shift);
|
||||
i = strlen(temp);
|
||||
if ((i + 7) < (int) sizeof(temp))
|
||||
sprintf(temp + i, "view %.*s", (int) (sizeof(temp) - 7 - i), fname);
|
||||
i = (int) strlen(temp);
|
||||
if ((i + 7) < (int) sizeof(temp)) {
|
||||
sprintf(temp + i, "view %.*s",
|
||||
(int) (sizeof(temp) - 7 - (size_t) i),
|
||||
fname);
|
||||
}
|
||||
#else
|
||||
(void) tag;
|
||||
sprintf(temp, "view %.*s", (int) sizeof(temp) - 7, fname);
|
||||
@ -551,7 +554,7 @@ show_all(const char *tag)
|
||||
clrtoeol();
|
||||
this_time = time((time_t *) 0);
|
||||
strcpy(temp, ctime(&this_time));
|
||||
if ((i = strlen(temp)) != 0) {
|
||||
if ((i = (int) strlen(temp)) != 0) {
|
||||
temp[--i] = 0;
|
||||
if (move(0, COLS - i - 2) != ERR)
|
||||
printw(" %s", temp);
|
||||
|
38
test/worm.c
38
test/worm.c
@ -61,7 +61,7 @@ Options:
|
||||
traces will be dumped. The program stops and waits for one character of
|
||||
input at the beginning and end of the interval.
|
||||
|
||||
$Id: worm.c,v 1.59 2008/11/16 00:19:59 juergen Exp $
|
||||
$Id: worm.c,v 1.60 2010/11/13 20:21:21 tom Exp $
|
||||
*/
|
||||
|
||||
#include <test.priv.h>
|
||||
@ -79,7 +79,7 @@ static chtype flavor[] =
|
||||
{
|
||||
'O', '*', '#', '$', '%', '0', '@',
|
||||
};
|
||||
static const short xinc[] =
|
||||
static const int xinc[] =
|
||||
{
|
||||
1, 1, 1, 0, -1, -1, -1, 0
|
||||
}, yinc[] =
|
||||
@ -90,8 +90,8 @@ static const short xinc[] =
|
||||
typedef struct worm {
|
||||
int orientation;
|
||||
int head;
|
||||
short *xpos;
|
||||
short *ypos;
|
||||
int *xpos;
|
||||
int *ypos;
|
||||
chtype attrs;
|
||||
#ifdef USE_PTHREADS
|
||||
pthread_t thread;
|
||||
@ -102,7 +102,7 @@ static unsigned long sequence = 0;
|
||||
static bool quitting = FALSE;
|
||||
|
||||
static WORM worm[MAX_WORMS];
|
||||
static short **refs;
|
||||
static int **refs;
|
||||
static int last_x, last_y;
|
||||
|
||||
static const char *field;
|
||||
@ -216,11 +216,11 @@ onsig(int sig GCC_UNUSED)
|
||||
ExitProgram(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
static float
|
||||
static double
|
||||
ranf(void)
|
||||
{
|
||||
long r = (rand() & 077777);
|
||||
return ((float) r / 32768.);
|
||||
return ((double) r / 32768.);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -228,7 +228,7 @@ draw_worm(WINDOW *win, void *data)
|
||||
{
|
||||
WORM *w = (WORM *) data;
|
||||
const struct options *op;
|
||||
unsigned mask = ~(1 << (w - worm));
|
||||
unsigned mask = (unsigned) (~(1 << (w - worm)));
|
||||
chtype attrs = w->attrs | ((mask & pending) ? A_REVERSE : 0);
|
||||
|
||||
int x;
|
||||
@ -291,7 +291,7 @@ draw_worm(WINDOW *win, void *data)
|
||||
w->orientation = op->opts[0];
|
||||
break;
|
||||
default:
|
||||
w->orientation = op->opts[(int) (ranf() * (float) op->nopts)];
|
||||
w->orientation = op->opts[(int) (ranf() * (double) op->nopts)];
|
||||
break;
|
||||
}
|
||||
|
||||
@ -390,7 +390,7 @@ update_refs(WINDOW *win)
|
||||
(void) win;
|
||||
if (last_x != COLS - 1) {
|
||||
for (y = 0; y <= last_y; y++) {
|
||||
refs[y] = typeRealloc(short, COLS, refs[y]);
|
||||
refs[y] = typeRealloc(int, (size_t) COLS, refs[y]);
|
||||
for (x = last_x + 1; x < COLS; x++)
|
||||
refs[y][x] = 0;
|
||||
}
|
||||
@ -399,9 +399,9 @@ update_refs(WINDOW *win)
|
||||
if (last_y != LINES - 1) {
|
||||
for (y = LINES; y <= last_y; y++)
|
||||
free(refs[y]);
|
||||
refs = typeRealloc(short *, LINES, refs);
|
||||
refs = typeRealloc(int *, (size_t) LINES, refs);
|
||||
for (y = last_y + 1; y < LINES; y++) {
|
||||
refs[y] = typeMalloc(short, COLS);
|
||||
refs[y] = typeMalloc(int, (size_t) COLS);
|
||||
for (x = 0; x < COLS; x++)
|
||||
refs[y][x] = 0;
|
||||
}
|
||||
@ -417,7 +417,7 @@ main(int argc, char *argv[])
|
||||
int x, y;
|
||||
int n;
|
||||
struct worm *w;
|
||||
short *ip;
|
||||
int *ip;
|
||||
bool done = FALSE;
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
@ -488,7 +488,7 @@ main(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
#define SET_COLOR(num, fg) \
|
||||
init_pair(num+1, fg, bg); \
|
||||
init_pair(num+1, (short) fg, (short) bg); \
|
||||
flavor[num] |= COLOR_PAIR(num+1) | A_BOLD
|
||||
|
||||
SET_COLOR(0, COLOR_GREEN);
|
||||
@ -501,9 +501,9 @@ main(int argc, char *argv[])
|
||||
}
|
||||
#endif /* A_COLOR */
|
||||
|
||||
refs = typeMalloc(short *, LINES);
|
||||
refs = typeMalloc(int *, (size_t) LINES);
|
||||
for (y = 0; y < LINES; y++) {
|
||||
refs[y] = typeMalloc(short, COLS);
|
||||
refs[y] = typeMalloc(int, (size_t) COLS);
|
||||
for (x = 0; x < COLS; x++) {
|
||||
refs[y][x] = 0;
|
||||
}
|
||||
@ -515,18 +515,18 @@ main(int argc, char *argv[])
|
||||
#endif /* BADCORNER */
|
||||
|
||||
for (n = number, w = &worm[0]; --n >= 0; w++) {
|
||||
w->attrs = flavor[n % SIZEOF(flavor)];
|
||||
w->attrs = flavor[(unsigned) n % SIZEOF(flavor)];
|
||||
w->orientation = 0;
|
||||
w->head = 0;
|
||||
|
||||
if (!(ip = typeMalloc(short, (length + 1)))) {
|
||||
if (!(ip = typeMalloc(int, (size_t) (length + 1)))) {
|
||||
fprintf(stderr, "%s: out of memory\n", *argv);
|
||||
ExitProgram(EXIT_FAILURE);
|
||||
}
|
||||
w->xpos = ip;
|
||||
for (x = length; --x >= 0;)
|
||||
*ip++ = -1;
|
||||
if (!(ip = typeMalloc(short, (length + 1)))) {
|
||||
if (!(ip = typeMalloc(int, (size_t) (length + 1)))) {
|
||||
fprintf(stderr, "%s: out of memory\n", *argv);
|
||||
ExitProgram(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -92,7 +92,7 @@
|
||||
/******************************************************************************/
|
||||
|
||||
/*
|
||||
* $Id: xmas.c,v 1.26 2010/05/01 18:29:50 tom Exp $
|
||||
* $Id: xmas.c,v 1.27 2010/11/13 20:24:10 tom Exp $
|
||||
*/
|
||||
#include <test.priv.h>
|
||||
|
||||
@ -154,11 +154,11 @@ static void
|
||||
set_color(WINDOW *win, chtype color)
|
||||
{
|
||||
if (has_colors()) {
|
||||
int n = (color + 1);
|
||||
int n = (int) (color + 1);
|
||||
if (my_pairs == 0)
|
||||
my_pairs = typeCalloc(bool, COLORS + 1);
|
||||
my_pairs = typeCalloc(bool, (size_t) (COLORS + 1));
|
||||
if (!my_pairs[n]) {
|
||||
init_pair(n, color, my_bg);
|
||||
init_pair((short) n, (short) color, (short) my_bg);
|
||||
my_pairs[n] = TRUE;
|
||||
}
|
||||
wattroff(win, A_COLOR);
|
||||
|
Loading…
Reference in New Issue
Block a user