From: Thomas E. Dickey Date: Sun, 13 Jul 2008 00:35:08 +0000 (+0000) Subject: ncurses 5.6 - patch 20080712 X-Git-Tag: v5.7~18 X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff_plain;h=01cec7497c02ab7ca6f0791cc2c7dfbdb2ba9272 ncurses 5.6 - patch 20080712 + compiler-warning fixes for Solaris. --- diff --git a/NEWS b/NEWS index a7599457..3ff7ec94 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.1253 2008/07/05 20:47:37 tom Exp $ +-- $Id: NEWS,v 1.1254 2008/07/12 21:23:18 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,9 @@ 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. +20080712 + + compiler-warning fixes for Solaris. + 20080705 + use NCURSES_MOUSE_MASK() in definition of BUTTON_RELEASE(), etc., to make those work properly with the "--enable-ext-mouse" configuration diff --git a/dist.mk b/dist.mk index aa52bc5f..c6f17089 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.649 2008/07/05 17:52:18 tom Exp $ +# $Id: dist.mk,v 1.650 2008/07/12 17:40:03 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 = 20080705 +NCURSES_PATCH = 20080712 # 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_driver.c b/form/frm_driver.c index 0c091257..52081130 100644 --- a/form/frm_driver.c +++ b/form/frm_driver.c @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_driver.c,v 1.86 2008/01/19 20:11:03 tom Exp $") +MODULE_ID("$Id: frm_driver.c,v 1.87 2008/07/12 21:24:07 tom Exp $") /*---------------------------------------------------------------------------- This is the core module of the form library. It contains the majority @@ -4176,7 +4176,7 @@ form_driver(FORM *form, int c) NULL /* Choice Request is generic */ }; size_t nMethods = (sizeof(Generic_Methods) / sizeof(Generic_Methods[0])); - size_t method = ((BI->keycode & ID_Mask) >> ID_Shft) & 0xffff; + size_t method = (BI->keycode >> ID_Shft) & 0xffff; /* see ID_Mask */ if ((method >= nMethods) || !(BI->cmd)) res = E_SYSTEM_ERROR; diff --git a/ncurses/base/MKkeyname.awk b/ncurses/base/MKkeyname.awk index 5711fb85..b35ba2a9 100644 --- a/ncurses/base/MKkeyname.awk +++ b/ncurses/base/MKkeyname.awk @@ -1,4 +1,4 @@ -# $Id: MKkeyname.awk,v 1.39 2008/05/31 19:54:58 tom Exp $ +# $Id: MKkeyname.awk,v 1.40 2008/07/12 18:40:00 tom Exp $ ############################################################################## # Copyright (c) 1999-2007,2008 Free Software Foundation, Inc. # # # @@ -124,7 +124,7 @@ END { print "" print " _nc_tracing = 0; /* prevent recursion via keybound() */" print " for (j = 0; (bound = keybound(c, j)) != 0; ++j) {" - print " for(k = STRCOUNT; k < NUM_STRINGS(tp); k++) {" + print " for(k = STRCOUNT; k < (int) NUM_STRINGS(tp); k++) {" print " if (tp->Strings[k] != 0 && !strcmp(bound, tp->Strings[k])) {" print " result = ExtStrname(tp, k, strnames);" print " break;" diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh index 09857834..60e9503b 100755 --- a/ncurses/base/MKlib_gen.sh +++ b/ncurses/base/MKlib_gen.sh @@ -2,7 +2,7 @@ # # MKlib_gen.sh -- generate sources from curses.h macro definitions # -# ($Id: MKlib_gen.sh,v 1.30 2008/01/05 23:21:10 tom Exp $) +# ($Id: MKlib_gen.sh,v 1.31 2008/07/12 19:19:54 tom Exp $) # ############################################################################## # Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. # @@ -423,4 +423,5 @@ $preprocessor $TMP 2>/dev/null \ -e 's/^.*T_CALLED.*returnCode( \([a-z].*) \));/ return \1;/' \ -e 's/^.*T_CALLED.*returnCode( \((wmove.*) \));/ return \1;/' \ -e 's/gen_//' \ + -e '/#ident/d' \ | sed -f $ED4 diff --git a/ncurses/tinfo/lib_setup.c b/ncurses/tinfo/lib_setup.c index 20c14e0f..dddf808f 100644 --- a/ncurses/tinfo/lib_setup.c +++ b/ncurses/tinfo/lib_setup.c @@ -53,7 +53,7 @@ #include /* lines, columns, cur_term */ -MODULE_ID("$Id: lib_setup.c,v 1.109 2008/06/28 15:31:42 tom Exp $") +MODULE_ID("$Id: lib_setup.c,v 1.110 2008/07/12 18:40:23 tom Exp $") /**************************************************************************** * @@ -389,7 +389,7 @@ grab_entry(const char *const tn, TERMTYPE *const tp) static void do_prototype(TERMINAL * termp) { - int i; + unsigned i; char CC; char proto; char *tmp; diff --git a/ncurses/tinfo/read_entry.c b/ncurses/tinfo/read_entry.c index 6a050ee7..532e5a35 100644 --- a/ncurses/tinfo/read_entry.c +++ b/ncurses/tinfo/read_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 * @@ -42,7 +42,7 @@ #include #include -MODULE_ID("$Id: read_entry.c,v 1.100 2007/11/17 23:56:50 tom Exp $") +MODULE_ID("$Id: read_entry.c,v 1.101 2008/07/12 20:23:13 tom Exp $") #define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts)) @@ -73,7 +73,7 @@ convert_strings(char *buf, char **Strings, int count, int size, char *table) Strings[i] = ABSENT_STRING; } else if (IS_NEG2(buf + 2 * i)) { Strings[i] = CANCELLED_STRING; - } else if (LOW_MSB(buf + 2 * i) > size) { + } else if ((int) LOW_MSB(buf + 2 * i) > size) { Strings[i] = ABSENT_STRING; } else { Strings[i] = (LOW_MSB(buf + 2 * i) + table); diff --git a/progs/MKtermsort.sh b/progs/MKtermsort.sh index 18b90ac2..2247f14e 100755 --- a/progs/MKtermsort.sh +++ b/progs/MKtermsort.sh @@ -1,10 +1,10 @@ #!/bin/sh -# $Id: MKtermsort.sh,v 1.9 2003/01/11 22:23:50 tom Exp $ +# $Id: MKtermsort.sh,v 1.10 2008/07/12 20:22:54 tom Exp $ # # MKtermsort.sh -- generate indirection vectors for the various sort methods # ############################################################################## -# Copyright (c) 1998-2002,2003 Free Software Foundation, Inc. # +# Copyright (c) 1998-2003,2008 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -56,7 +56,7 @@ echo " *"; echo " * Note: this file is generated using MKtermsort.sh, do not edit by hand."; echo " */"; -echo "static const int bool_terminfo_sort[] = {"; +echo "static const PredIdx bool_terminfo_sort[] = {"; $AWK <$DATA ' BEGIN {i = 0;} /^#/ {next;} @@ -65,7 +65,7 @@ $3 == "bool" {printf("%s\t%d\n", $2, i++);} echo "};"; echo ""; -echo "static const int num_terminfo_sort[] = {"; +echo "static const PredIdx num_terminfo_sort[] = {"; $AWK <$DATA ' BEGIN {i = 0;} /^#/ {next;} @@ -74,7 +74,7 @@ $3 == "num" {printf("%s\t%d\n", $2, i++);} echo "};"; echo ""; -echo "static const int str_terminfo_sort[] = {"; +echo "static const PredIdx str_terminfo_sort[] = {"; $AWK <$DATA ' BEGIN {i = 0;} /^#/ {next;} @@ -83,7 +83,7 @@ $3 == "str" {printf("%s\t%d\n", $2, i++);} echo "};"; echo ""; -echo "static const int bool_variable_sort[] = {"; +echo "static const PredIdx bool_variable_sort[] = {"; $AWK <$DATA ' BEGIN {i = 0;} /^#/ {next;} @@ -92,7 +92,7 @@ $3 == "bool" {printf("%s\t%d\n", $1, i++);} echo "};"; echo ""; -echo "static const int num_variable_sort[] = {"; +echo "static const PredIdx num_variable_sort[] = {"; $AWK <$DATA ' BEGIN {i = 0;} /^#/ {next;} @@ -101,7 +101,7 @@ $3 == "num" {printf("%s\t%d\n", $1, i++);} echo "};"; echo ""; -echo "static const int str_variable_sort[] = {"; +echo "static const PredIdx str_variable_sort[] = {"; $AWK <$DATA ' BEGIN {i = 0;} /^#/ {next;} @@ -110,7 +110,7 @@ $3 == "str" {printf("%s\t%d\n", $1, i++);} echo "};"; echo ""; -echo "static const int bool_termcap_sort[] = {"; +echo "static const PredIdx bool_termcap_sort[] = {"; $AWK <$DATA ' BEGIN {i = 0;} /^#/ {next;} @@ -119,7 +119,7 @@ $3 == "bool" {printf("%s\t%d\n", $4, i++);} echo "};"; echo ""; -echo "static const int num_termcap_sort[] = {"; +echo "static const PredIdx num_termcap_sort[] = {"; $AWK <$DATA ' BEGIN {i = 0;} /^#/ {next;} @@ -128,7 +128,7 @@ $3 == "num" {printf("%s\t%d\n", $4, i++);} echo "};"; echo ""; -echo "static const int str_termcap_sort[] = {"; +echo "static const PredIdx str_termcap_sort[] = {"; $AWK <$DATA ' BEGIN {i = 0;} /^#/ {next;} diff --git a/progs/dump_entry.c b/progs/dump_entry.c index eeee5dbb..83231f3a 100644 --- a/progs/dump_entry.c +++ b/progs/dump_entry.c @@ -39,7 +39,7 @@ #include "termsort.c" /* this C file is generated */ #include /* so is this */ -MODULE_ID("$Id: dump_entry.c,v 1.82 2008/04/19 22:27:04 tom Exp $") +MODULE_ID("$Id: dump_entry.c,v 1.83 2008/07/12 21:06:33 tom Exp $") #define INDENT 8 #define DISCARD(string) string = ABSENT_STRING @@ -293,9 +293,9 @@ static void set_obsolete_termcaps(TERMTYPE *tp); * If we configure with a different Caps file, the offsets into the arrays * will change. So we use an address expression. */ -#define BOOL_IDX(name) (&(name) - &(CUR Booleans[0])) -#define NUM_IDX(name) (&(name) - &(CUR Numbers[0])) -#define STR_IDX(name) (&(name) - &(CUR Strings[0])) +#define BOOL_IDX(name) (PredType) (&(name) - &(CUR Booleans[0])) +#define NUM_IDX(name) (PredType) (&(name) - &(CUR Numbers[0])) +#define STR_IDX(name) (PredType) (&(name) - &(CUR Strings[0])) static bool version_filter(PredType type, PredIdx idx) @@ -877,7 +877,7 @@ fmt_entry(TERMTYPE *tterm, static bool kill_string(TERMTYPE *tterm, char *cap) { - int n; + unsigned n; for (n = 0; n < NUM_STRINGS(tterm); ++n) { if (cap == tterm->Strings[n]) { tterm->Strings[n] = ABSENT_STRING; @@ -1053,7 +1053,7 @@ dump_entry(TERMTYPE *tterm, * Extended names are most likely function-key definitions. Drop * those first. */ - int n; + unsigned n; for (n = STRCOUNT; n < NUM_STRINGS(tterm); n++) { const char *name = ExtStrname(tterm, n, strnames); diff --git a/progs/dump_entry.h b/progs/dump_entry.h index f802ecb7..b99a37a7 100644 --- a/progs/dump_entry.h +++ b/progs/dump_entry.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2002,2004 Free Software Foundation, Inc. * + * Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -34,7 +34,7 @@ /* - * $Id: dump_entry.h,v 1.29 2006/08/19 21:11:14 tom Exp $ + * $Id: dump_entry.h,v 1.30 2008/07/12 20:23:03 tom Exp $ * * Dump control definitions and variables */ @@ -63,7 +63,7 @@ #define CMP_USE 3 /* comparison on use capabilities */ typedef unsigned PredType; -typedef int PredIdx; +typedef unsigned PredIdx; typedef int (*PredFunc)(PredType, PredIdx); extern NCURSES_CONST char *nametrans(const char *);