ncurses 5.9 - patch 20140802

+ minor portability fixes for MinGW:
  + ensure WINVER is defined in makefiles rather than using headers
  + add check for gnatprep "-T" option
  + work around bug introduced by gcc 4.8.1 in MinGW which breaks
    "trace" feature:
    http://stackoverflow.com/questions/20877689/gcc-4-8-1-minggw-d-option-does-not-work-as-usual
+ fix most compiler warnings for Cygwin ncurses-examples.
+ restore "redundant" -I options in test/Makefile.in, since they are
  typically needed when building the derived ncurses-examples package
  (cf: 20140726).
This commit is contained in:
Thomas E. Dickey 2014-08-03 01:14:25 +00:00
parent c6f54649ed
commit 73b54c0812
37 changed files with 975 additions and 883 deletions

13
Ada95/aclocal.m4 vendored
View File

@ -28,7 +28,7 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey
dnl
dnl $Id: aclocal.m4,v 1.90 2014/07/26 22:58:13 tom Exp $
dnl $Id: aclocal.m4,v 1.91 2014/08/02 22:40:45 tom Exp $
dnl Macros used in NCURSES Ada95 auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
@ -1206,6 +1206,17 @@ rm -rf conftest*
AC_SUBST(EXTRA_CFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GNATPREP_OPT_T version: 1 updated: 2014/08/02 18:37:25
dnl -----------------
AC_DEFUN([CF_GNATPREP_OPT_T],[
AC_CACHE_CHECK(if GNATPREP supports -T option,cf_cv_gnatprep_opt_t,[
cf_cv_gnatprep_opt_t=no
gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
])
test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
AC_SUBST(GNATPREP_OPTS)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GNAT_GENERICS version: 2 updated: 2011/03/23 20:24:41
dnl ----------------
AC_DEFUN([CF_GNAT_GENERICS],

99
Ada95/configure vendored
View File

@ -1,5 +1,5 @@
#! /bin/sh
# From configure.in Revision: 1.55 .
# From configure.in Revision: 1.56 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by Autoconf 2.52.20121002.
#
@ -11606,7 +11606,21 @@ echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
echo "$as_me:11606: result: $ADAFLAGS" >&5
echo "${ECHO_T}$ADAFLAGS" >&6
echo "$as_me:11609: checking if GNAT supports generics" >&5
echo "$as_me:11609: checking if GNATPREP supports -T option" >&5
echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
if test "${cf_cv_gnatprep_opt_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cf_cv_gnatprep_opt_t=no
gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
fi
echo "$as_me:11619: result: $cf_cv_gnatprep_opt_t" >&5
echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
echo "$as_me:11623: 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
@ -11616,7 +11630,7 @@ case $cf_gnat_version in #(vi
cf_gnat_generics=no
;;
esac
echo "$as_me:11619: result: $cf_gnat_generics" >&5
echo "$as_me:11633: result: $cf_gnat_generics" >&5
echo "${ECHO_T}$cf_gnat_generics" >&6
if test "$cf_gnat_generics" = yes
@ -11628,7 +11642,7 @@ else
cf_generic_objects=
fi
echo "$as_me:11631: checking if GNAT supports SIGINT" >&5
echo "$as_me:11645: checking if GNAT supports SIGINT" >&5
echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
if test "${cf_cv_gnat_sigint+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@ -11676,7 +11690,7 @@ fi
rm -rf conftest* *~conftest*
fi
echo "$as_me:11679: result: $cf_cv_gnat_sigint" >&5
echo "$as_me:11693: result: $cf_cv_gnat_sigint" >&5
echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
if test $cf_cv_gnat_sigint = yes ; then
@ -11689,7 +11703,7 @@ cf_gnat_libraries=no
cf_gnat_projects=no
if test "$enable_gnat_projects" != no ; then
echo "$as_me:11692: checking if GNAT supports project files" >&5
echo "$as_me:11706: 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
@ -11749,15 +11763,15 @@ CF_EOF
esac
;;
esac
echo "$as_me:11752: result: $cf_gnat_projects" >&5
echo "$as_me:11766: result: $cf_gnat_projects" >&5
echo "${ECHO_T}$cf_gnat_projects" >&6
fi # enable_gnat_projects
if test $cf_gnat_projects = yes
then
echo "$as_me:11758: checking if GNAT supports libraries" >&5
echo "$as_me:11772: checking if GNAT supports libraries" >&5
echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
echo "$as_me:11760: result: $cf_gnat_libraries" >&5
echo "$as_me:11774: result: $cf_gnat_libraries" >&5
echo "${ECHO_T}$cf_gnat_libraries" >&6
fi
@ -11777,7 +11791,7 @@ else
USE_GNAT_LIBRARIES="#"
fi
echo "$as_me:11780: checking for ada-compiler" >&5
echo "$as_me:11794: 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.
@ -11788,12 +11802,12 @@ else
cf_ada_compiler=gnatmake
fi;
echo "$as_me:11791: result: $cf_ada_compiler" >&5
echo "$as_me:11805: result: $cf_ada_compiler" >&5
echo "${ECHO_T}$cf_ada_compiler" >&6
cf_ada_package=terminal_interface
echo "$as_me:11796: checking for ada-include" >&5
echo "$as_me:11810: 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.
@ -11829,7 +11843,7 @@ case ".$withval" in #(vi
withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
;;
*)
{ { echo "$as_me:11832: error: expected a pathname, not \"$withval\"" >&5
{ { echo "$as_me:11846: error: expected a pathname, not \"$withval\"" >&5
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
{ (exit 1); exit 1; }; }
;;
@ -11838,10 +11852,10 @@ esac
fi
eval ADA_INCLUDE="$withval"
echo "$as_me:11841: result: $ADA_INCLUDE" >&5
echo "$as_me:11855: result: $ADA_INCLUDE" >&5
echo "${ECHO_T}$ADA_INCLUDE" >&6
echo "$as_me:11844: checking for ada-objects" >&5
echo "$as_me:11858: 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.
@ -11877,7 +11891,7 @@ case ".$withval" in #(vi
withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
;;
*)
{ { echo "$as_me:11880: error: expected a pathname, not \"$withval\"" >&5
{ { echo "$as_me:11894: error: expected a pathname, not \"$withval\"" >&5
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
{ (exit 1); exit 1; }; }
;;
@ -11886,10 +11900,10 @@ esac
fi
eval ADA_OBJECTS="$withval"
echo "$as_me:11889: result: $ADA_OBJECTS" >&5
echo "$as_me:11903: result: $ADA_OBJECTS" >&5
echo "${ECHO_T}$ADA_OBJECTS" >&6
echo "$as_me:11892: checking if an Ada95 shared-library should be built" >&5
echo "$as_me:11906: 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.
@ -11899,7 +11913,7 @@ if test "${with_ada_sharedlib+set}" = set; then
else
with_ada_sharedlib=no
fi;
echo "$as_me:11902: result: $with_ada_sharedlib" >&5
echo "$as_me:11916: result: $with_ada_sharedlib" >&5
echo "${ECHO_T}$with_ada_sharedlib" >&6
ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
@ -11915,12 +11929,12 @@ then
fi
else
{ { echo "$as_me:11918: error: No usable Ada compiler found" >&5
{ { echo "$as_me:11932: error: No usable Ada compiler found" >&5
echo "$as_me: error: No usable Ada compiler found" >&2;}
{ (exit 1); exit 1; }; }
fi
else
{ { echo "$as_me:11923: error: The Ada compiler is needed for this package" >&5
{ { echo "$as_me:11937: error: The Ada compiler is needed for this package" >&5
echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
{ (exit 1); exit 1; }; }
fi
@ -11971,7 +11985,7 @@ elif test "$includedir" != "/usr/include"; then
fi
### Build up pieces for makefile rules
echo "$as_me:11974: checking default library suffix" >&5
echo "$as_me:11988: checking default library suffix" >&5
echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
case $DFT_LWR_MODEL in
@ -11982,10 +11996,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:11985: result: $DFT_ARG_SUFFIX" >&5
echo "$as_me:11999: result: $DFT_ARG_SUFFIX" >&5
echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
echo "$as_me:11988: checking default library-dependency suffix" >&5
echo "$as_me:12002: checking default library-dependency suffix" >&5
echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
case X$DFT_LWR_MODEL in #(vi
@ -12040,10 +12054,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:12043: result: $DFT_DEP_SUFFIX" >&5
echo "$as_me:12057: result: $DFT_DEP_SUFFIX" >&5
echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
echo "$as_me:12046: checking default object directory" >&5
echo "$as_me:12060: checking default object directory" >&5
echo $ECHO_N "checking default object directory... $ECHO_C" >&6
case $DFT_LWR_MODEL in
@ -12059,7 +12073,7 @@ echo $ECHO_N "checking default object directory... $ECHO_C" >&6
DFT_OBJ_SUBDIR='obj_s' ;;
esac
esac
echo "$as_me:12062: result: $DFT_OBJ_SUBDIR" >&5
echo "$as_me:12076: result: $DFT_OBJ_SUBDIR" >&5
echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
### Set up low-level terminfo dependencies for makefiles.
@ -12269,7 +12283,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:12272: creating $CONFIG_STATUS" >&5
{ echo "$as_me:12286: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
@ -12445,7 +12459,7 @@ cat >>$CONFIG_STATUS <<\EOF
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
{ { echo "$as_me:12448: error: ambiguous option: $1
{ { echo "$as_me:12462: 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;}
@ -12464,7 +12478,7 @@ Try \`$0 --help' for more information." >&2;}
ac_need_defaults=false;;
# This is an error.
-*) { { echo "$as_me:12467: error: unrecognized option: $1
-*) { { echo "$as_me:12481: 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;}
@ -12535,7 +12549,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:12538: error: invalid argument: $ac_config_target" >&5
*) { { echo "$as_me:12552: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
@ -12718,6 +12732,7 @@ s,@ADA_TRACE@,$ADA_TRACE,;t t
s,@gnat_exists@,$gnat_exists,;t t
s,@M4_exists@,$M4_exists,;t t
s,@cf_ada_make@,$cf_ada_make,;t t
s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
s,@cf_compile_generics@,$cf_compile_generics,;t t
s,@cf_generic_objects@,$cf_generic_objects,;t t
s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
@ -12857,7 +12872,7 @@ done; }
esac
if test x"$ac_file" != x-; then
{ echo "$as_me:12860: creating $ac_file" >&5
{ echo "$as_me:12875: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
@ -12875,7 +12890,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:12878: error: cannot find input file: $f" >&5
test -f "$f" || { { echo "$as_me:12893: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@ -12888,7 +12903,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
{ { echo "$as_me:12891: error: cannot find input file: $f" >&5
{ { echo "$as_me:12906: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@ -12904,7 +12919,7 @@ cat >>$CONFIG_STATUS <<\EOF
if test -n "$ac_seen"; then
ac_used=`grep '@datarootdir@' $ac_item`
if test -z "$ac_used"; then
{ echo "$as_me:12907: WARNING: datarootdir was used implicitly but not set:
{ echo "$as_me:12922: WARNING: datarootdir was used implicitly but not set:
$ac_seen" >&5
echo "$as_me: WARNING: datarootdir was used implicitly but not set:
$ac_seen" >&2;}
@ -12913,7 +12928,7 @@ $ac_seen" >&2;}
fi
ac_seen=`grep '${datarootdir}' $ac_item`
if test -n "$ac_seen"; then
{ echo "$as_me:12916: WARNING: datarootdir was used explicitly but not set:
{ echo "$as_me:12931: WARNING: datarootdir was used explicitly but not set:
$ac_seen" >&5
echo "$as_me: WARNING: datarootdir was used explicitly but not set:
$ac_seen" >&2;}
@ -12950,7 +12965,7 @@ s,@INSTALL@,$ac_INSTALL,;t t
ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
if test -z "$ac_init"; then
ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
{ echo "$as_me:12953: WARNING: Variable $ac_name is used but was not set:
{ echo "$as_me:12968: WARNING: Variable $ac_name is used but was not set:
$ac_seen" >&5
echo "$as_me: WARNING: Variable $ac_name is used but was not set:
$ac_seen" >&2;}
@ -12961,7 +12976,7 @@ $ac_seen" >&2;}
egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
if test -s $tmp/out; then
ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
{ echo "$as_me:12964: WARNING: Some variables may not be substituted:
{ echo "$as_me:12979: WARNING: Some variables may not be substituted:
$ac_seen" >&5
echo "$as_me: WARNING: Some variables may not be substituted:
$ac_seen" >&2;}
@ -13010,7 +13025,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:13013: creating $ac_file" >&5
test x"$ac_file" != x- && { echo "$as_me:13028: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
# First look for the input files in the build tree, otherwise in the
@ -13021,7 +13036,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:13024: error: cannot find input file: $f" >&5
test -f "$f" || { { echo "$as_me:13039: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@ -13034,7 +13049,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
{ { echo "$as_me:13037: error: cannot find input file: $f" >&5
{ { echo "$as_me:13052: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@ -13092,7 +13107,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:13095: $ac_file is unchanged" >&5
{ echo "$as_me:13110: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \

View File

@ -28,14 +28,14 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey
dnl
dnl $Id: configure.in,v 1.55 2014/06/01 16:40:55 tom Exp $
dnl $Id: configure.in,v 1.56 2014/08/02 20:29:22 tom Exp $
dnl Process this file with autoconf to produce a configure script.
dnl
dnl See http://invisible-island.net/autoconf/ for additional information.
dnl
dnl ---------------------------------------------------------------------------
AC_PREREQ(2.52.20030208)
AC_REVISION($Revision: 1.55 $)
AC_REVISION($Revision: 1.56 $)
AC_INIT(gen/gen.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
@ -477,6 +477,8 @@ if test "$cf_with_ada" != "no" ; then
if test "$cf_cv_prog_gnat_correct" = yes; then
CF_FIXUP_ADAFLAGS
CF_GNATPREP_OPT_T
CF_GNAT_GENERICS
CF_GNAT_SIGINT
CF_GNAT_PROJECTS

View File

@ -28,7 +28,7 @@
#
# Author: Juergen Pfeifer, 1996
#
# $Id: Makefile.in,v 1.69 2014/06/01 00:10:58 tom Exp $
# $Id: Makefile.in,v 1.70 2014/08/02 20:31:47 tom Exp $
#
.SUFFIXES:
@ -215,7 +215,7 @@ BASEDEPS=$(ABASE).ads $(ABASE)-aux.ads $(ABASE).adb
$(ABASE)-trace.adb : $(srcdir)/$(ABASE)-trace.adb_p
rm -f $@
$(ADAPREP) -DADA_TRACE=@ADA_TRACE@ $(srcdir)/$(ABASE)-trace.adb_p $@
$(ADAPREP) -DADA_TRACE=@ADA_TRACE@ @GNATPREP_OPTS@ $(srcdir)/$(ABASE)-trace.adb_p $@
###############################################################################
# Use these definitions when building a shared library.

14
NEWS
View File

@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: NEWS,v 1.2246 2014/07/26 22:50:27 tom Exp $
-- $Id: NEWS,v 1.2250 2014/08/02 20:51:48 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
@ -45,6 +45,18 @@ 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.
20140802
+ minor portability fixes for MinGW:
+ ensure WINVER is defined in makefiles rather than using headers
+ add check for gnatprep "-T" option
+ work around bug introduced by gcc 4.8.1 in MinGW which breaks
"trace" feature:
http://stackoverflow.com/questions/20877689/gcc-4-8-1-minggw-d-option-does-not-work-as-usual
+ fix most compiler warnings for Cygwin ncurses-examples.
+ restore "redundant" -I options in test/Makefile.in, since they are
typically needed when building the derived ncurses-examples package
(cf: 20140726).
20140726
+ eliminate some redundant -I options used for building libraries, and
ensure that ${srcdir} is added to the include-options (prompted by

13
aclocal.m4 vendored
View File

@ -28,7 +28,7 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
dnl $Id: aclocal.m4,v 1.704 2014/07/26 22:56:21 tom Exp $
dnl $Id: aclocal.m4,v 1.706 2014/08/02 22:38:39 tom Exp $
dnl Macros used in NCURSES auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
@ -2152,6 +2152,17 @@ if test $cf_cv_getopt_header = getopt.h ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GNATPREP_OPT_T version: 1 updated: 2014/08/02 18:37:25
dnl -----------------
AC_DEFUN([CF_GNATPREP_OPT_T],[
AC_CACHE_CHECK(if GNATPREP supports -T option,cf_cv_gnatprep_opt_t,[
cf_cv_gnatprep_opt_t=no
gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
])
test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
AC_SUBST(GNATPREP_OPTS)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GNAT_GENERICS version: 2 updated: 2011/03/23 20:24:41
dnl ----------------
AC_DEFUN([CF_GNAT_GENERICS],

1482
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -28,14 +28,14 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
dnl $Id: configure.in,v 1.582 2014/06/01 14:05:06 tom Exp $
dnl $Id: configure.in,v 1.583 2014/08/02 20:35:31 tom Exp $
dnl Process this file with autoconf to produce a configure script.
dnl
dnl See http://invisible-island.net/autoconf/ for additional information.
dnl
dnl ---------------------------------------------------------------------------
AC_PREREQ(2.52.20030208)
AC_REVISION($Revision: 1.582 $)
AC_REVISION($Revision: 1.583 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
@ -1358,6 +1358,7 @@ CF_DISABLE_GNAT_PROJECTS
### Checks for libraries.
case $cf_cv_system_name in #(vi
*mingw32*) #(vi
CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
LIBS=" -lpsapi $LIBS"
;;
*)
@ -1620,6 +1621,8 @@ dnl At the moment we support no other Ada95 compiler.
CF_ADD_ADAFLAGS(-gnatpn)
CF_FIXUP_ADAFLAGS
CF_GNATPREP_OPT_T
CF_GNAT_GENERICS
CF_GNAT_SIGINT
CF_GNAT_PROJECTS

View File

@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: dist.mk,v 1.998 2014/07/26 00:13:04 tom Exp $
# $Id: dist.mk,v 1.999 2014/08/01 23:41:10 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 = 9
NCURSES_PATCH = 20140726
NCURSES_PATCH = 20140802
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)

View File

@ -32,7 +32,7 @@
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
/* $Id: curses.h.in,v 1.239 2014/03/22 22:57:35 tom Exp $ */
/* $Id: curses.h.in,v 1.240 2014/08/02 16:01:30 tom Exp $ */
#ifndef __NCURSES_H
#define __NCURSES_H
@ -1154,7 +1154,7 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /*
#if !NCURSES_OPAQUE
#if NCURSES_WIDECHAR && @NCURSES_EXT_COLORS@
#define wattrset(win,at) ((win) \
? ((win)->_color = PAIR_NUMBER(at), \
? ((win)->_color = NCURSES_CAST(int, PAIR_NUMBER(at)), \
(win)->_attrs = NCURSES_CAST(attr_t, at), \
OK) \
: ERR)

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. *
* Copyright (c) 1998-2009,2014 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 *
@ -25,11 +25,27 @@
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************/
/* $Id: ncurses_dll.h.in,v 1.8 2009/04/04 22:26:27 tom Exp $ */
/* $Id: ncurses_dll.h.in,v 1.9 2014/08/02 21:30:20 tom Exp $ */
#ifndef NCURSES_DLL_H_incl
#define NCURSES_DLL_H_incl 1
/* 2014-08-02 workaround for broken MinGW compiler.
* Oddly, only TRACE is mapped to trace - the other -D's are okay.
* suggest TDM as an alternative.
*/
#if defined(__MINGW64__)
#elif defined(__MINGW32__)
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
#ifdef trace
#undef trace
#define TRACE
#endif
#endif /* broken compiler */
#endif /* MingW */
/*
* For reentrant code, we map the various global variables into SCREEN by
* using functions to access them.

View File

@ -1,8 +1,8 @@
ncurses6 (5.9-20140726) unstable; urgency=low
ncurses6 (5.9-20140802) unstable; urgency=low
* latest weekly patch
-- Thomas E. Dickey <dickey@invisible-island.net> Fri, 25 Jul 2014 20:13:04 -0400
-- Thomas E. Dickey <dickey@invisible-island.net> Fri, 01 Aug 2014 19:41:10 -0400
ncurses6 (5.9-20131005) unstable; urgency=low

View File

@ -1,8 +1,8 @@
ncurses6 (5.9-20140726) unstable; urgency=low
ncurses6 (5.9-20140802) unstable; urgency=low
* latest weekly patch
-- Thomas E. Dickey <dickey@invisible-island.net> Fri, 25 Jul 2014 20:13:04 -0400
-- Thomas E. Dickey <dickey@invisible-island.net> Fri, 01 Aug 2014 19:41:10 -0400
ncurses6 (5.9-20131005) unstable; urgency=low

View File

@ -1,8 +1,8 @@
ncurses6 (5.9-20140726) unstable; urgency=low
ncurses6 (5.9-20140802) unstable; urgency=low
* latest weekly patch
-- Thomas E. Dickey <dickey@invisible-island.net> Fri, 25 Jul 2014 20:13:04 -0400
-- Thomas E. Dickey <dickey@invisible-island.net> Fri, 01 Aug 2014 19:41:10 -0400
ncurses6 (5.9-20120608) unstable; urgency=low

View File

@ -1,4 +1,4 @@
; $Id: mingw-ncurses.nsi,v 1.53 2014/07/26 00:13:04 tom Exp $
; $Id: mingw-ncurses.nsi,v 1.54 2014/08/01 23:41:10 tom Exp $
; TODO add examples
; TODO bump ABI to 6
@ -10,7 +10,7 @@
!define VERSION_MAJOR "5"
!define VERSION_MINOR "9"
!define VERSION_YYYY "2014"
!define VERSION_MMDD "0726"
!define VERSION_MMDD "0802"
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
!define MY_ABI "5"

View File

@ -3,7 +3,7 @@
Summary: shared libraries for terminal handling
Name: mingw32-ncurses6
Version: 5.9
Release: 20140726
Release: 20140802
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz

View File

@ -1,7 +1,7 @@
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 5.9
Release: 20140726
Release: 20140802
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz

View File

@ -1,4 +1,4 @@
# $Id: Makefile.in,v 1.112 2014/07/26 22:51:31 tom Exp $
# $Id: Makefile.in,v 1.113 2014/08/02 15:45:05 tom Exp $
##############################################################################
# Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. #
# #
@ -75,7 +75,7 @@ CC = @CC@
CPP = @CPP@
CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
CPPFLAGS = -DHAVE_CONFIG_H @CPPFLAGS@
CPPFLAGS = -I. -I$(srcdir) -I../test -DHAVE_CONFIG_H @CPPFLAGS@
CCFLAGS = $(CPPFLAGS) $(CFLAGS)

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2008-2010,2012 Free Software Foundation, Inc. *
* Copyright (c) 2008-2012,2014 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: clip_printw.c,v 1.9 2012/11/18 00:39:48 tom Exp $
* $Id: clip_printw.c,v 1.10 2014/08/02 23:13:29 tom Exp $
*
* demonstrate how to use printw without wrapping.
*/
@ -331,7 +331,7 @@ test_clipping(WINDOW *win)
do {
switch (st.ch) {
case '.': /* change from current position */
(void) wattrset(win, (int) (st.attr | (chtype) COLOR_PAIR(st.pair)));
(void) wattrset(win, AttrArg(COLOR_PAIR(st.pair), st.attr));
if (st.count > 0) {
need = (unsigned) st.count + 1;
sprintf(fmt, "%%c%%%ds%%c", st.count);

View File

@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
* $Id: demo_forms.c,v 1.48 2014/07/27 00:26:01 tom Exp $
* $Id: demo_forms.c,v 1.49 2014/08/02 23:11:57 tom Exp $
*
* Demonstrate a variety of functions from the form library.
* Thomas Dickey - 2003/4/26
@ -398,13 +398,13 @@ show_current_field(WINDOW *win, FORM * form)
}
waddch(win, ' ');
(void) wattrset(win, (int) field_fore(field));
(void) wattrset(win, AttrArg(field_fore(field), 0));
waddstr(win, "fore");
wattroff(win, (int) field_fore(field));
waddch(win, '/');
(void) wattrset(win, (int) field_back(field));
(void) wattrset(win, AttrArg(field_back(field), 0));
waddstr(win, "back");
wattroff(win, (int) field_back(field));

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2005-2012,2013 Free Software Foundation, Inc. *
* Copyright (c) 2005-2013,2014 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
* $Id: demo_menus.c,v 1.52 2013/09/28 21:55:02 tom Exp $
* $Id: demo_menus.c,v 1.53 2014/08/02 17:24:07 tom Exp $
*
* Demonstrate a variety of functions from the menu library.
* Thomas Dickey - 2005/4/9
@ -315,7 +315,7 @@ menu_destroy(MENU * m)
if ((count > 0) && (m == mpSelect)) {
if (blob && loaded_file) {
Trace(("freeing blob %p", blob));
free((char *) blob);
free((void *) blob);
}
free(items);
items = 0;

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2007-2008,2010 Free Software Foundation, Inc. *
* Copyright (c) 2007-2010,2014 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
* $Id: demo_panels.c,v 1.37 2010/05/01 22:19:02 tom Exp $
* $Id: demo_panels.c,v 1.38 2014/08/02 17:24:07 tom Exp $
*
* Demonstrate a variety of functions from the panel library.
*/
@ -406,7 +406,7 @@ make_fullwidth_digit(cchar_t *target, int digit)
{
wchar_t source[2];
source[0] = digit + 0xff10;
source[0] = (wchar_t) (digit + 0xff10);
source[1] = 0;
setcchar(target, source, A_NORMAL, 0, 0);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2010,2013 Free Software Foundation, Inc. *
* Copyright (c) 1998-2013,2014 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: firework.c,v 1.29 2013/04/27 19:46:53 tom Exp $
* $Id: firework.c,v 1.30 2014/08/02 17:24:07 tom Exp $
*/
#include <test.priv.h>
@ -94,14 +94,14 @@ explode(int row, int col)
showit();
init_pair(1, get_colour(&bold), my_bg);
(void) attrset((chtype) COLOR_PAIR(1) | bold);
(void) attrset(AttrArg(COLOR_PAIR(1), bold));
MvPrintw(row - 1, col - 1, " - ");
MvPrintw(row + 0, col - 1, "-+-");
MvPrintw(row + 1, col - 1, " - ");
showit();
init_pair(1, get_colour(&bold), my_bg);
(void) attrset((chtype) COLOR_PAIR(1) | bold);
(void) attrset(AttrArg(COLOR_PAIR(1), bold));
MvPrintw(row - 2, col - 2, " --- ");
MvPrintw(row - 1, col - 2, "-+++-");
MvPrintw(row + 0, col - 2, "-+#+-");
@ -110,7 +110,7 @@ explode(int row, int col)
showit();
init_pair(1, get_colour(&bold), my_bg);
(void) attrset((chtype) COLOR_PAIR(1) | bold);
(void) attrset(AttrArg(COLOR_PAIR(1), bold));
MvPrintw(row - 2, col - 2, " +++ ");
MvPrintw(row - 1, col - 2, "++#++");
MvPrintw(row + 0, col - 2, "+# #+");
@ -119,7 +119,7 @@ explode(int row, int col)
showit();
init_pair(1, get_colour(&bold), my_bg);
(void) attrset((chtype) COLOR_PAIR(1) | bold);
(void) attrset(AttrArg(COLOR_PAIR(1), bold));
MvPrintw(row - 2, col - 2, " # ");
MvPrintw(row - 1, col - 2, "## ##");
MvPrintw(row + 0, col - 2, "# #");
@ -128,7 +128,7 @@ explode(int row, int col)
showit();
init_pair(1, get_colour(&bold), my_bg);
(void) attrset((chtype) COLOR_PAIR(1) | bold);
(void) attrset(AttrArg(COLOR_PAIR(1), bold));
MvPrintw(row - 2, col - 2, " # # ");
MvPrintw(row - 1, col - 2, "# #");
MvPrintw(row + 0, col - 2, " ");
@ -173,7 +173,7 @@ main(
direction = (start > end) ? -1 : 1;
diff = abs(start - end);
} while (diff < 2 || diff >= LINES - 2);
(void) attrset(A_NORMAL);
(void) attrset(AttrArg(0, A_NORMAL));
for (row = 0; row < diff; row++) {
MvPrintw(LINES - row, start + (row * direction),
(direction < 0) ? "\\" : "/");

View File

@ -31,7 +31,7 @@
****************************************************************************/
/*
* $Id: form_driver_w.c,v 1.12 2014/06/01 20:37:19 tom Exp $
* $Id: form_driver_w.c,v 1.13 2014/08/02 17:24:55 tom Exp $
*
* Test form_driver_w (int, int, wchar_t), a wide char aware
* replacement of form_driver.
@ -123,7 +123,7 @@ main(void)
done = TRUE;
break;
default:
form_driver_w(my_form, OK, ch);
form_driver_w(my_form, OK, (wchar_t) ch);
break;
}
break;

View File

@ -33,7 +33,7 @@
* modified 10-18-89 for curses (jrl)
* 10-18-89 added signal handling
*
* $Id: gdc.c,v 1.40 2014/02/15 17:34:36 tom Exp $
* $Id: gdc.c,v 1.41 2014/08/02 16:36:20 tom Exp $
*/
#include <test.priv.h>
@ -89,7 +89,7 @@ drawbox(bool scrolling)
int n;
if (hascolor)
(void) attrset((attr_t) COLOR_PAIR(PAIR_FRAMES));
(void) attrset(AttrArg(COLOR_PAIR(PAIR_FRAMES), 0));
MvAddCh(YBASE - 1, XBASE - 1, ACS_ULCORNER);
hline(ACS_HLINE, XLENGTH);
@ -113,7 +113,7 @@ drawbox(bool scrolling)
vline(ACS_VLINE, YDEPTH);
if (hascolor)
(void) attrset((attr_t) COLOR_PAIR(PAIR_OTHERS));
(void) attrset(AttrArg(COLOR_PAIR(PAIR_OTHERS), 0));
}
static void
@ -274,7 +274,7 @@ main(int argc, char *argv[])
init_pair(PAIR_DIGITS, COLOR_BLACK, COLOR_RED);
init_pair(PAIR_OTHERS, COLOR_RED, bg);
init_pair(PAIR_FRAMES, COLOR_WHITE, bg);
(void) attrset((attr_t) COLOR_PAIR(PAIR_OTHERS));
(void) attrset(AttrArg(COLOR_PAIR(PAIR_OTHERS), 0));
}
restart:

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. *
* Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -41,7 +41,7 @@
*
* Date: 05.Nov.90
*
* $Id: hanoi.c,v 1.35 2013/09/28 22:02:17 tom Exp $
* $Id: hanoi.c,v 1.36 2014/08/02 17:24:07 tom Exp $
*/
#include <test.priv.h>
@ -254,7 +254,7 @@ DisplayTiles(void)
memset(TileBuf, ' ', len);
TileBuf[len] = '\0';
if (has_colors())
(void) attrset((attr_t) COLOR_PAIR(LENTOIND(len)));
(void) attrset(AttrArg(COLOR_PAIR(LENTOIND(len)), 0));
else
(void) attrset(A_REVERSE);
MvAddStr(BASELINE - (SlotNo + 1),

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2002-2010,2012 Free Software Foundation, Inc. *
* Copyright (c) 2002-2012,2014 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: ins_wide.c,v 1.20 2012/12/16 00:51:02 tom Exp $
* $Id: ins_wide.c,v 1.21 2014/08/02 17:24:55 tom Exp $
*
* Demonstrate the wins_wstr() and wins_wch functions.
* Thomas Dickey - 2002/11/23
@ -132,7 +132,7 @@ ColOf(wchar_t *buffer, int length, int margin)
result += 2;
break;
default:
result += wcwidth(ch);
result += wcwidth((wchar_t) ch);
if (ch < 32)
++result;
break;
@ -390,7 +390,7 @@ test_inserts(int level)
}
break;
default:
buffer[length++] = ch;
buffer[length++] = (wchar_t) ch;
buffer[length] = '\0';
/* put the string in, one character at a time */

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2008-2010,2012 Free Software Foundation, Inc. *
* Copyright (c) 2008-2012,2014 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: insdelln.c,v 1.7 2012/11/18 00:37:58 tom Exp $
* $Id: insdelln.c,v 1.9 2014/08/02 23:09:32 tom Exp $
*
* test-driver for deleteln, wdeleteln, insdelln, winsdelln, insertln, winsertln
*/
@ -302,7 +302,7 @@ test_winsdelln(WINDOW *win)
init_status(win, &st);
do {
(void) wattrset(win, (int) (st.attr | (attr_t) COLOR_PAIR(st.pair)));
(void) wattrset(win, AttrArg(COLOR_PAIR(st.pair), st.attr));
switch (st.ch) {
case 'i':
for (n = 0; n < st.count; ++n)
@ -343,7 +343,7 @@ test_insdelln(void)
init_status(stdscr, &st);
do {
(void) attrset(st.attr | (attr_t) COLOR_PAIR(st.pair));
(void) attrset(AttrArg(COLOR_PAIR(st.pair), st.attr));
switch (st.ch) {
case 'i':
for (n = 0; n < st.count; ++n)

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2007,2008 Free Software Foundation, Inc. *
* Copyright (c) 2007-2008,2014 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: key_names.c,v 1.4 2008/10/11 20:22:37 tom Exp $
* $Id: key_names.c,v 1.5 2014/08/02 17:24:55 tom Exp $
*/
#include <test.priv.h>
@ -77,7 +77,7 @@ main(int argc, char *argv[])
endwin();
}
for (n = -1; n < KEY_MAX + 512; n++) {
const char *result = key_name(n);
const char *result = key_name((wchar_t) n);
if (result != 0)
printf("%d(%5o):%s\n", n, n, result);
}

View File

@ -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.412 2014/07/27 00:24:00 tom Exp $
$Id: ncurses.c,v 1.414 2014/08/02 23:10:26 tom Exp $
***************************************************************************/
@ -305,7 +305,7 @@ wGetstring(WINDOW *win, char *buffer, int limit)
static wchar_t
fullwidth_digit(int ch)
{
return (ch + 0xff10 - '0');
return (wchar_t) (ch + 0xff10 - '0');
}
static void
@ -323,7 +323,7 @@ make_narrow_text(wchar_t *target, const char *source)
{
int ch;
while ((ch = *source++) != 0) {
*target++ = ch;
*target++ = (wchar_t) ch;
}
*target = 0;
}
@ -1436,7 +1436,7 @@ show_attr(WINDOW *win, int row, int skip, bool arrow, chtype attr, const char *n
(void) waddch(win, ch | attr);
}
} else {
(void) wattrset(win, (int) attr);
(void) wattrset(win, AttrArg(attr, 0));
(void) waddstr(win, attr_test_string);
(void) wattroff(win, (int) attr);
}
@ -1685,9 +1685,9 @@ static wchar_t wide_attr_test_string[MAX_ATTRSTRING + 1];
#define FULL_HI 0xff5e
#define HALF_LO 0x20
#define isFullWidth(ch) ((ch) >= FULL_LO && (ch) <= FULL_HI)
#define ToNormalWidth(ch) (((ch) - FULL_LO) + HALF_LO)
#define ToFullWidth(ch) (((ch) - HALF_LO) + FULL_LO)
#define isFullWidth(ch) ((int)(ch) >= FULL_LO && (int)(ch) <= FULL_HI)
#define ToNormalWidth(ch) (wchar_t) (((int)(ch) - FULL_LO) + HALF_LO)
#define ToFullWidth(ch) (wchar_t) (((int)(ch) - HALF_LO) + FULL_LO)
/*
* Returns an ASCII code in [32..126]
@ -1695,7 +1695,7 @@ static wchar_t wide_attr_test_string[MAX_ATTRSTRING + 1];
static wchar_t
normal_wchar(int ch)
{
wchar_t result = ch;
wchar_t result = (wchar_t) ch;
if (isFullWidth(ch))
result = ToNormalWidth(ch);
return result;
@ -1708,7 +1708,7 @@ normal_wchar(int ch)
static wchar_t
target_wchar(int ch)
{
wchar_t result = ch;
wchar_t result = (wchar_t) ch;
if (use_fullwidth) {
if (!isFullWidth(ch))
result = ToFullWidth(ch);
@ -1752,7 +1752,7 @@ static void
wide_init_attr_string(void)
{
use_fullwidth = FALSE;
wide_attr_test_string[0] = default_attr_string();
wide_attr_test_string[0] = (wchar_t) default_attr_string();
wide_adjust_attr_string(0);
}
@ -2651,7 +2651,7 @@ color_edit(void)
(i == current ? '>' : ' '),
(i < (int) SIZEOF(the_color_names)
? the_color_names[i] : numeric));
(void) attrset((attr_t) COLOR_PAIR(i));
(void) attrset(AttrArg(COLOR_PAIR(i), 0));
addstr(" ");
(void) attrset(A_NORMAL);
@ -3609,7 +3609,7 @@ show_paged_widechars(int base,
MvPrintw(0, 20, "Display of Character Codes %#x to %#x", first, last);
attroff(A_BOLD);
for (code = first; (int) code <= last; code++) {
for (code = (wchar_t) first; (int) code <= last; code++) {
int row = (2 + ((int) code - first) / per_line);
int col = 5 * ((int) code % per_line);
int count;
@ -3642,7 +3642,7 @@ show_upper_widechars(int first, int repeat, int space, attr_t attr, NCURSES_PAIR
MvPrintw(0, 20, "Display of Character Codes %d to %d", first, last);
attroff(A_BOLD);
for (code = first; (int) code <= last; code++) {
for (code = (wchar_t) first; (int) code <= last; code++) {
int row = 2 + ((code - first) % 16);
int col = ((code - first) / 16) * COLS / 2;
wchar_t codes[10];
@ -6407,11 +6407,11 @@ overlap_test_1_attr(WINDOW *win, int flavor, int col)
break;
case 2:
init_pair(cpair, COLOR_BLUE, COLOR_WHITE);
(void) wattrset(win, (int) ((chtype) COLOR_PAIR(cpair) | A_NORMAL));
(void) wattrset(win, AttrArg(COLOR_PAIR(cpair), A_NORMAL));
break;
case 3:
init_pair(cpair, COLOR_WHITE, COLOR_BLUE);
(void) wattrset(win, (int) ((chtype) COLOR_PAIR(cpair) | A_BOLD));
(void) wattrset(win, AttrArg(COLOR_PAIR(cpair), A_BOLD));
break;
}
}

View File

@ -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.40 2013/04/27 19:46:53 tom Exp $
* $Id: newdemo.c,v 1.41 2014/08/02 23:10:56 tom Exp $
*/
#include <test.priv.h>
@ -84,7 +84,7 @@ set_colors(WINDOW *win, int pair, int foreground, int background)
if (pair > COLOR_PAIRS)
pair = COLOR_PAIRS;
init_pair((short) pair, (short) foreground, (short) background);
(void) wattrset(win, (int) COLOR_PAIR(pair));
(void) wattrset(win, AttrArg(COLOR_PAIR(pair), 0));
}
}
@ -96,7 +96,7 @@ use_colors(WINDOW *win, int pair, chtype attrs)
pair = COLOR_PAIRS;
attrs |= (chtype) COLOR_PAIR(pair);
}
(void) wattrset(win, (int) attrs);
(void) wattrset(win, AttrArg(attrs, 0));
return attrs;
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. *
* Copyright (c) 1998-2012,2014 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: rain.c,v 1.40 2012/01/21 23:54:47 tom Exp $
* $Id: rain.c,v 1.41 2014/08/02 17:24:07 tom Exp $
*/
#include <test.priv.h>
@ -102,10 +102,7 @@ next_j(int j)
--j;
if (has_colors()) {
int z = (int) (3 * ranf());
chtype color = (chtype) COLOR_PAIR(z);
if (z)
color |= A_BOLD;
(void) attrset(color);
(void) attrset(AttrArg(COLOR_PAIR(z), (z ? A_BOLD : A_NORMAL)));
}
return j;
}

View File

@ -1,4 +1,4 @@
/* $Id: tclock.c,v 1.33 2013/09/28 21:52:34 tom Exp $ */
/* $Id: tclock.c,v 1.34 2014/08/02 16:37:03 tom Exp $ */
#include <test.priv.h>
@ -69,7 +69,7 @@ dline(int pair, int from_x, int from_y, int x2, int y2, int ch)
int d;
if (has_colors())
(void) attrset((attr_t) COLOR_PAIR(pair));
(void) attrset(AttrArg(COLOR_PAIR(pair), 0));
dx = x2 - from_x;
dy = y2 - from_y;
@ -216,12 +216,12 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
attroff(A_REVERSE);
if (has_colors())
(void) attrset((attr_t) COLOR_PAIR(1));
(void) attrset(AttrArg(COLOR_PAIR(1), 0));
dline(1, cx, cy, cx + sdx, cy - sdy, 'O');
if (has_colors())
(void) attrset((attr_t) COLOR_PAIR(0));
(void) attrset(AttrArg(COLOR_PAIR(0), 0));
text = ctime(&tim);
MvPrintw(2, 0, "%.*s", (int) (strlen(text) - 1), text);

View File

@ -29,7 +29,7 @@
/****************************************************************************
* Author: Thomas E. Dickey 1996-on *
****************************************************************************/
/* $Id: test.priv.h,v 1.125 2014/07/19 23:06:27 tom Exp $ */
/* $Id: test.priv.h,v 1.128 2014/08/02 23:40:53 tom Exp $ */
#ifndef __TEST_PRIV_H
#define __TEST_PRIV_H 1
@ -847,6 +847,15 @@ extern char *tgoto(char *, int, int); /* available, but not prototyped */
#define MvVLine (void) mvvline
#define MvWVLine (void) mvwvline
/*
* The macro likely uses unsigned values, while X/Open prototype uses int.
*/
#if defined(wattrset) || defined(PDCURSES)
#define AttrArg(p,a) (attr_t) ((attr_t)(p) | (attr_t)(a))
#else
#define AttrArg(p,a) (int) ((attr_t)(p) | (attr_t)(a))
#endif
/*
* Workaround for defective implementation of gcc attribute warn_unused_result
*/

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2010-2011,2012 Free Software Foundation, Inc. *
* Copyright (c) 2010-2012,2014 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: test_add_wchstr.c,v 1.20 2012/12/16 00:12:04 tom Exp $
* $Id: test_add_wchstr.c,v 1.21 2014/08/02 17:24:55 tom Exp $
*
* Demonstrate the waddwchstr() and wadd_wch functions.
* Thomas Dickey - 2009/9/12
@ -103,7 +103,7 @@ static size_t temp_length;
&& (temp = unctrl((chtype) have[0])) != 0 \
&& strlen(temp) > 1) { \
while (*temp != '\0') { \
have[0] = *temp++; \
have[0] = (wchar_t) *temp++; \
setcchar(&temp_buffer[n++], have, A_NORMAL, 0, NULL); \
} \
} else { \
@ -210,7 +210,7 @@ ColOf(wchar_t *buffer, int length, int margin)
result += 2;
break;
default:
result += wcwidth(ch);
result += wcwidth((wchar_t) ch);
if (ch < 32)
++result;
break;
@ -468,7 +468,7 @@ test_add_wchstr(int level)
}
break;
default:
buffer[length++] = ch;
buffer[length++] = (wchar_t) ch;
buffer[length] = '\0';
/* put the string in, one character at a time */

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2009-2010,2012 Free Software Foundation, Inc. *
* Copyright (c) 2009-2012,2014 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: test_addwstr.c,v 1.11 2012/12/16 00:11:18 tom Exp $
* $Id: test_addwstr.c,v 1.12 2014/08/02 17:24:55 tom Exp $
*
* Demonstrate the waddwstr() and wadd_wch functions.
* Thomas Dickey - 2009/9/12
@ -137,7 +137,7 @@ ColOf(wchar_t *buffer, int length, int margin)
result += 2;
break;
default:
result += wcwidth(ch);
result += wcwidth((wchar_t) ch);
if (ch < 32)
++result;
break;
@ -398,7 +398,7 @@ test_inserts(int level)
ch = '\b';
/* FALLTHRU */
default:
buffer[length++] = ch;
buffer[length++] = (wchar_t) ch;
buffer[length] = '\0';
/* put the string in, one character at a time */

View File

@ -29,7 +29,7 @@
* This is an example written by Alexander V. Lukyanov <lav@yars.free.net>,
* to demonstrate an inconsistency between ncurses and SVr4 curses.
*
* $Id: testaddch.c,v 1.10 2014/07/27 00:24:49 tom Exp $
* $Id: testaddch.c,v 1.12 2014/08/02 23:11:20 tom Exp $
*/
#include <test.priv.h>
@ -66,7 +66,7 @@ main(
attr = (chtype) ((i & 4) ? COLOR_PAIR(4) : 0);
bkgdset(back);
(void) attrset(set);
(void) attrset(AttrArg(set, 0));
attr_addstr("Test string with spaces -> <-\n", attr);
}
@ -77,7 +77,7 @@ main(
attr = (chtype) ((i & 4) ? (chtype) COLOR_PAIR(4) : 0);
bkgdset(back);
(void) attrset(set);
(void) attrset(AttrArg(set, 0));
attr_addstr("Test string with spaces -> <-\n", attr);
}