From 7c4bc0fa99a1be37a14aa19a5943a549570954c4 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 6 Jul 2008 00:36:01 +0000 Subject: [PATCH 1/1] ncurses 5.6 - patch 20080705 + use NCURSES_MOUSE_MASK() in definition of BUTTON_RELEASE(), etc., to make those work properly with the "--enable-ext-mouse" configuration (cf: 20050205). + improve documentation of build-cc options in INSTALL. + work-around a bug in gcc 4.2.4 on AIX, which does not pass the -static/-dynamic flags properly to linker, causing test/bs to not link. --- INSTALL | 14 +++++++- NEWS | 11 ++++++- aclocal.m4 | 16 +++++++--- configure | 64 +++++++++++++++++++++---------------- dist.mk | 4 +-- form/frm_req_name.c | 6 ++-- include/curses.tail | 14 ++++---- menu/m_driver.c | 6 ++-- ncurses/tinfo/write_entry.c | 6 ++-- ncurses/trace/visbuf.c | 6 ++-- ncurses/widechar/charable.c | 6 ++-- test/bs.c | 6 ++-- test/demo_panels.c | 3 +- test/ncurses.c | 6 ++-- test/test_opaque.c | 5 +-- 15 files changed, 104 insertions(+), 69 deletions(-) diff --git a/INSTALL b/INSTALL index de5a7318..ace4e4c8 100644 --- a/INSTALL +++ b/INSTALL @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: INSTALL,v 1.126 2008/06/21 22:31:04 tom Exp $ +-- $Id: INSTALL,v 1.127 2008/07/05 20:17:23 tom Exp $ --------------------------------------------------------------------- How to install Ncurses/Terminfo on your system --------------------------------------------------------------------- @@ -625,20 +625,32 @@ SUMMARY OF CONFIGURE OPTIONS: to do this if the target compiler has unusual flags which confuse the host compiler. + You can also set the environment variable $BUILD_CFLAGS rather than + use this option. + --with-build-cppflags=XXX If cross-compiling, specify the host C preprocessor-flags. You might need to do this if the target compiler has unusual flags which confuse the host compiler. + You can also set the environment variable $BUILD_CPPFLAGS rather than + use this option. + --with-build-ldflags=XXX If cross-compiling, specify the host linker-flags. You might need to do this if the target linker has unusual flags which confuse the host compiler. + You can also set the environment variable $BUILD_LDFLAGS rather than + use this option. + --with-build-libs=XXX If cross-compiling, the host libraries. You might need to do this if the target environment requires unusual libraries. + You can also set the environment variable $BUILD_LIBS rather than + use this option. + --with-caps=XXX Specify an alternate terminfo capabilities file, which makes the configure script look for "include/Caps.XXX". A few systems, e.g., diff --git a/NEWS b/NEWS index 71714e34..a7599457 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.1252 2008/06/28 23:37:53 tom Exp $ +-- $Id: NEWS,v 1.1253 2008/07/05 20:47:37 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,15 @@ See the AUTHORS file for the corresponding full names. Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20080705 + + use NCURSES_MOUSE_MASK() in definition of BUTTON_RELEASE(), etc., to + make those work properly with the "--enable-ext-mouse" configuration + (cf: 20050205). + + improve documentation of build-cc options in INSTALL. + + work-around a bug in gcc 4.2.4 on AIX, which does not pass the + -static/-dynamic flags properly to linker, causing test/bs to + not link. + 20080628 + correct some ifdef's needed for the broken-linker configuration. + make debugging library's $BAUDRATE feature work for termcap diff --git a/aclocal.m4 b/aclocal.m4 index e58d0c82..484ace39 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -28,7 +28,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.448 2008/06/14 19:12:45 tom Exp $ +dnl $Id: aclocal.m4,v 1.449 2008/07/05 18:19:39 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -1949,7 +1949,7 @@ ifdef([AC_FUNC_FSEEKO],[ ]) ]) dnl --------------------------------------------------------------------------- -dnl CF_LDFLAGS_STATIC version: 2 updated: 2007/04/28 15:25:27 +dnl CF_LDFLAGS_STATIC version: 3 updated: 2008/07/05 13:56:40 dnl ----------------- dnl Check for compiler/linker flags used to temporarily force usage of static dnl libraries. This depends on the compiler and platform. Use this to help @@ -1958,8 +1958,16 @@ dnl the list of linker options and libraries. AC_DEFUN([CF_LDFLAGS_STATIC],[ if test "$GCC" = yes ; then - LDFLAGS_STATIC=-static - LDFLAGS_SHARED=-dynamic + case $cf_cv_system_name in #( + aix[[45]]*) #( gcc 4.2.4 linkage on AIX is broken + LDFLAGS_STATIC= + LDFLAGS_SHARED= + ;; + *) #( normally, except when broken + LDFLAGS_STATIC=-static + LDFLAGS_SHARED=-dynamic + ;; + esac else case $cf_cv_system_name in #( aix[[45]]*) #( from ld manpage diff --git a/configure b/configure index 0eddd39c..53ff2125 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.434 . +# From configure.in Revision: 1.435 . # Guess values for system-dependent variables and create Makefiles. # Generated by Autoconf 2.52.20080325. # @@ -15833,8 +15833,16 @@ case $DFT_LWR_MODEL in normal|debug|profile) if test "$GCC" = yes ; then - LDFLAGS_STATIC=-static - LDFLAGS_SHARED=-dynamic + case $cf_cv_system_name in #( + aix[45]*) #( gcc 4.2.4 linkage on AIX is broken + LDFLAGS_STATIC= + LDFLAGS_SHARED= + ;; + *) #( normally, except when broken + LDFLAGS_STATIC=-static + LDFLAGS_SHARED=-dynamic + ;; + esac else case $cf_cv_system_name in #( aix[45]*) #( from ld manpage @@ -15865,12 +15873,12 @@ fi ;; esac -echo "$as_me:15868: checking where we will install curses.h" >&5 +echo "$as_me:15876: 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:15873: result: $includedir" >&5 +echo "$as_me:15881: result: $includedir" >&5 echo "${ECHO_T}$includedir" >&6 ### Resolve a conflict between normal and wide-curses by forcing applications @@ -15878,7 +15886,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:15881: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5 + { echo "$as_me:15889: 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 @@ -15894,7 +15902,7 @@ EOF ### Construct the list of subdirectories for which we'll customize makefiles ### with the appropriate compile-rules. -echo "$as_me:15897: checking for src modules" >&5 +echo "$as_me:15905: checking for src modules" >&5 echo $ECHO_N "checking for src modules... $ECHO_C" >&6 # dependencies and linker-arguments for test-programs @@ -15957,7 +15965,7 @@ EOF fi fi done -echo "$as_me:15960: result: $cf_cv_src_modules" >&5 +echo "$as_me:15968: result: $cf_cv_src_modules" >&5 echo "${ECHO_T}$cf_cv_src_modules" >&6 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS" @@ -16106,18 +16114,18 @@ fi ### If we're building with rpath, try to link non-standard libs that way too. if test "$DFT_LWR_MODEL" = "shared"; then -echo "$as_me:16109: checking for updated LDFLAGS" >&5 +echo "$as_me:16117: checking for updated LDFLAGS" >&5 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6 if test -n "$LDFLAGS" ; then -echo "$as_me:16112: result: maybe" >&5 +echo "$as_me:16120: result: maybe" >&5 echo "${ECHO_T}maybe" >&6 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6 -echo "${as_me-configure}:16116: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5 +echo "${as_me-configure}:16124: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6 -echo "${as_me-configure}:16120: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5 +echo "${as_me-configure}:16128: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5 case "$EXTRA_LDFLAGS" in #(vi -Wl,-rpath,*) #(vi @@ -16139,7 +16147,7 @@ if test -n "$cf_rpath_hack" ; then do test -n "$verbose" && echo " Filtering $cf_rpath_src" 1>&6 -echo "${as_me-configure}:16142: testing Filtering $cf_rpath_src ..." 1>&5 +echo "${as_me-configure}:16150: testing Filtering $cf_rpath_src ..." 1>&5 case $cf_rpath_src in #(vi -L*) #(vi @@ -16150,7 +16158,7 @@ echo "${as_me-configure}:16142: testing Filtering $cf_rpath_src ..." 1>&5 fi test -n "$verbose" && echo " ...Filter $cf_rpath_tmp" 1>&6 -echo "${as_me-configure}:16153: testing ...Filter $cf_rpath_tmp ..." 1>&5 +echo "${as_me-configure}:16161: testing ...Filter $cf_rpath_tmp ..." 1>&5 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS" ;; @@ -16162,15 +16170,15 @@ echo "${as_me-configure}:16153: testing ...Filter $cf_rpath_tmp ..." 1>&5 LDFLAGS=$cf_rpath_dst test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6 -echo "${as_me-configure}:16165: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5 +echo "${as_me-configure}:16173: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6 -echo "${as_me-configure}:16169: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5 +echo "${as_me-configure}:16177: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5 fi else -echo "$as_me:16173: result: no" >&5 +echo "$as_me:16181: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -16280,7 +16288,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:16283: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:16291: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL @@ -16456,7 +16464,7 @@ cat >>$CONFIG_STATUS <<\EOF echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:16459: error: ambiguous option: $1 + { { echo "$as_me:16467: 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;} @@ -16475,7 +16483,7 @@ Try \`$0 --help' for more information." >&2;} ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:16478: error: unrecognized option: $1 + -*) { { echo "$as_me:16486: 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;} @@ -16571,7 +16579,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:16574: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:16582: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -16953,7 +16961,7 @@ done; } esac if test x"$ac_file" != x-; then - { echo "$as_me:16956: creating $ac_file" >&5 + { echo "$as_me:16964: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi @@ -16971,7 +16979,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:16974: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:16982: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -16984,7 +16992,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:16987: error: cannot find input file: $f" >&5 + { { echo "$as_me:16995: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -17050,7 +17058,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:17053: creating $ac_file" >&5 + test x"$ac_file" != x- && { echo "$as_me:17061: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the @@ -17061,7 +17069,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:17064: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:17072: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -17074,7 +17082,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:17077: error: cannot find input file: $f" >&5 + { { echo "$as_me:17085: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -17132,7 +17140,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:17135: $ac_file is unchanged" >&5 + { echo "$as_me:17143: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ diff --git a/dist.mk b/dist.mk index e28c4f10..aa52bc5f 100644 --- a/dist.mk +++ b/dist.mk @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.648 2008/06/28 11:37:48 tom Exp $ +# $Id: dist.mk,v 1.649 2008/07/05 17:52:18 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -37,7 +37,7 @@ SHELL = /bin/sh # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 5 NCURSES_MINOR = 6 -NCURSES_PATCH = 20080628 +NCURSES_PATCH = 20080705 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/form/frm_req_name.c b/form/frm_req_name.c index e4d5c335..7ac9abe6 100644 --- a/form/frm_req_name.c +++ b/form/frm_req_name.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -37,7 +37,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_req_name.c,v 1.15 2005/04/16 16:59:27 tom Exp $") +MODULE_ID("$Id: frm_req_name.c,v 1.16 2008/07/05 23:22:08 tom Exp $") static const char *request_names[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1] = { @@ -154,7 +154,7 @@ form_request_by_name(const char *str) strncpy(buf, str, sizeof(buf)); while ((i < sizeof(buf)) && (buf[i] != '\0')) { - buf[i] = toupper(buf[i]); + buf[i] = toupper(UChar(buf[i])); i++; } diff --git a/include/curses.tail b/include/curses.tail index dd38ed4e..aef7c378 100644 --- a/include/curses.tail +++ b/include/curses.tail @@ -1,4 +1,4 @@ -/* $Id: curses.tail,v 1.15 2007/03/10 17:51:24 tom Exp $ */ +/* $Id: curses.tail,v 1.16 2008/07/05 20:20:38 tom Exp $ */ /* * vile:cmode: * This file is part of ncurses, designed to be appended after curses.h.in @@ -79,12 +79,12 @@ #define ALL_MOUSE_EVENTS (REPORT_MOUSE_POSITION - 1) /* macros to extract single event-bits from masks */ -#define BUTTON_RELEASE(e, x) ((e) & (001 << (6 * ((x) - 1)))) -#define BUTTON_PRESS(e, x) ((e) & (002 << (6 * ((x) - 1)))) -#define BUTTON_CLICK(e, x) ((e) & (004 << (6 * ((x) - 1)))) -#define BUTTON_DOUBLE_CLICK(e, x) ((e) & (010 << (6 * ((x) - 1)))) -#define BUTTON_TRIPLE_CLICK(e, x) ((e) & (020 << (6 * ((x) - 1)))) -#define BUTTON_RESERVED_EVENT(e, x) ((e) & (040 << (6 * ((x) - 1)))) +#define BUTTON_RELEASE(e, x) ((e) & NCURSES_MOUSE_MASK(x, 001)) +#define BUTTON_PRESS(e, x) ((e) & NCURSES_MOUSE_MASK(x, 002)) +#define BUTTON_CLICK(e, x) ((e) & NCURSES_MOUSE_MASK(x, 004)) +#define BUTTON_DOUBLE_CLICK(e, x) ((e) & NCURSES_MOUSE_MASK(x, 010)) +#define BUTTON_TRIPLE_CLICK(e, x) ((e) & NCURSES_MOUSE_MASK(x, 020)) +#define BUTTON_RESERVED_EVENT(e, x) ((e) & NCURSES_MOUSE_MASK(x, 040)) typedef struct { diff --git a/menu/m_driver.c b/menu/m_driver.c index d29c6024..27f9fbad 100644 --- a/menu/m_driver.c +++ b/menu/m_driver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -37,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_driver.c,v 1.25 2005/11/26 20:46:59 tom Exp $") +MODULE_ID("$Id: m_driver.c,v 1.26 2008/07/05 20:54:33 tom Exp $") /* Macros */ @@ -74,7 +74,7 @@ Is_Sub_String( { while (*string && *part) { - if (toupper(*string++) != toupper(*part)) + if (toupper(UChar(*string++)) != toupper(UChar(*part))) break; part++; } diff --git a/ncurses/tinfo/write_entry.c b/ncurses/tinfo/write_entry.c index 05027e00..12172dee 100644 --- a/ncurses/tinfo/write_entry.c +++ b/ncurses/tinfo/write_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -54,7 +54,7 @@ #define TRACE_OUT(p) /*nothing */ #endif -MODULE_ID("$Id: write_entry.c,v 1.70 2007/11/17 23:38:28 tom Exp $") +MODULE_ID("$Id: write_entry.c,v 1.71 2008/07/05 20:06:25 tom Exp $") static int total_written; @@ -502,7 +502,7 @@ compute_offsets(char **Strings, unsigned strmax, short *offsets) offsets[i] = nextfree; nextfree += strlen(Strings[i]) + 1; TRACE_OUT(("put Strings[%d]=%s(%d)", (int) i, - _nc_visbuf(Strings[i]), nextfree)); + _nc_visbuf(Strings[i]), (int) nextfree)); } } return nextfree; diff --git a/ncurses/trace/visbuf.c b/ncurses/trace/visbuf.c index 74081efe..ed3d5bb4 100644 --- a/ncurses/trace/visbuf.c +++ b/ncurses/trace/visbuf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2001-2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 2001-2007,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -42,7 +42,7 @@ #include #include -MODULE_ID("$Id: visbuf.c,v 1.26 2007/06/09 17:21:53 tom Exp $") +MODULE_ID("$Id: visbuf.c,v 1.27 2008/07/05 23:19:59 tom Exp $") #define NormalLen(len) (unsigned) ((len + 1) * 4) #define WideLen(len) (unsigned) ((len + 1) * 4 * MB_CUR_MAX) @@ -183,7 +183,7 @@ _nc_viswbuf2n(int bufnum, const wchar_t *buf, int len) char temp[CCHARW_MAX + 80]; int j = wctomb(temp, c), k; if (j <= 0) { - sprintf(temp, "\\u%08X", (wint_t) c); + sprintf(temp, "\\u%08X", (unsigned) c); j = strlen(temp); } for (k = 0; k < j; ++k) { diff --git a/ncurses/widechar/charable.c b/ncurses/widechar/charable.c index cf724078..91ceb32f 100644 --- a/ncurses/widechar/charable.c +++ b/ncurses/widechar/charable.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2003-2004,2005 Free Software Foundation, Inc. * + * Copyright (c) 2003-2005,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -32,13 +32,13 @@ #include -MODULE_ID("$Id: charable.c,v 1.4 2005/04/16 18:08:56 tom Exp $") +MODULE_ID("$Id: charable.c,v 1.5 2008/07/05 20:51:41 tom Exp $") NCURSES_EXPORT(bool) _nc_is_charable(wchar_t ch) { bool result; #if HAVE_WCTOB - result = (wctob((wint_t) ch) == ch); + result = (wctob((wint_t) ch) == (int) ch); #else result = (_nc_to_char(ch) >= 0); #endif diff --git a/test/bs.c b/test/bs.c index 4330f902..4d32c706 100644 --- a/test/bs.c +++ b/test/bs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -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.45 2007/04/07 17:13:11 tom Exp $ + * $Id: bs.c,v 1.46 2008/07/05 20:56:25 tom Exp $ */ #include @@ -222,7 +222,7 @@ intro(void) if ((tmpname = getlogin()) != 0) { (void) strcpy(name, tmpname); - name[0] = toupper(name[0]); + name[0] = toupper(UChar(name[0])); } else (void) strcpy(name, dftname); diff --git a/test/demo_panels.c b/test/demo_panels.c index 2adc690e..396d76c6 100755 --- a/test/demo_panels.c +++ b/test/demo_panels.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_panels.c,v 1.30 2008/04/12 21:59:49 tom Exp $ + * $Id: demo_panels.c,v 1.31 2008/07/05 23:13:47 tom Exp $ * * Demonstrate a variety of functions from the panel library. */ @@ -244,6 +244,7 @@ my_remove_panel(PANEL ** pans, int which) } } +#undef MIN #define MIN(a,b) ((a) < (b) ? (a) : (b)) #define ABS(a) ((a) < 0 ? -(a) : (a)) diff --git a/test/ncurses.c b/test/ncurses.c index 14e3c82e..b55031fe 100644 --- a/test/ncurses.c +++ b/test/ncurses.c @@ -40,7 +40,7 @@ AUTHOR Author: Eric S. Raymond 1993 Thomas E. Dickey (beginning revision 1.27 in 1996). -$Id: ncurses.c,v 1.313 2008/04/12 22:04:42 tom Exp $ +$Id: ncurses.c,v 1.315 2008/07/05 23:26:35 tom Exp $ ***************************************************************************/ @@ -1048,7 +1048,7 @@ wget_wch_test(unsigned level, WINDOW *win, int delay) kill(getpid(), SIGTSTP); #endif } else { - wprintw(win, "Key pressed: %04o ", c); + wprintw(win, "Key pressed: %04o ", (int) c); #ifdef NCURSES_MOUSE_VERSION if (c == KEY_MOUSE) { MEVENT event; @@ -3160,7 +3160,7 @@ show_upper_widechars(int first, int repeat, int space, attr_t attr, short pair) mvprintw(0, 20, "Display of Character Codes %d to %d", first, last); attroff(A_BOLD); - for (code = first; code <= last; code++) { + for (code = first; (int) code <= last; code++) { int row = 2 + ((code - first) % 16); int col = ((code - first) / 16) * COLS / 2; wchar_t codes[10]; diff --git a/test/test_opaque.c b/test/test_opaque.c index 3e5fafa8..f1ab78cf 100644 --- a/test/test_opaque.c +++ b/test/test_opaque.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: test_opaque.c,v 1.6 2008/04/05 18:03:57 tom Exp $ + * $Id: test_opaque.c,v 1.7 2008/07/05 23:18:40 tom Exp $ * * Author: Thomas E Dickey * @@ -406,7 +406,6 @@ test_set_tabsize(void) int y0, x0; int y, x; int save_tabsize = TABSIZE; - bool done = FALSE; (void) cbreak(); /* take input chars one at a time, no wait for \n */ (void) noecho(); /* don't echo input */ @@ -418,12 +417,10 @@ test_set_tabsize(void) for (x = 0; x < COLS;) { addch('\t'); if (addch('*') == ERR) { - done = TRUE; break; } getyx(stdscr, y0, x0); if (y0 != y || x0 == x) { - done = TRUE; break; } } -- 2.44.0