]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.6 - patch 20080712
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 13 Jul 2008 00:35:08 +0000 (00:35 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 13 Jul 2008 00:35:08 +0000 (00:35 +0000)
+ compiler-warning fixes for Solaris.

NEWS
dist.mk
form/frm_driver.c
ncurses/base/MKkeyname.awk
ncurses/base/MKlib_gen.sh
ncurses/tinfo/lib_setup.c
ncurses/tinfo/read_entry.c
progs/MKtermsort.sh
progs/dump_entry.c
progs/dump_entry.h

diff --git a/NEWS b/NEWS
index a75994570873388adac6ab6e7e77982af44d916a..3ff7ec94b5c2c759f14e5483cd037eaaf3efd82d 100644 (file)
--- 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 aa52bc5f5f0ee38ab0962912f0075eef138b18e6..c6f170897bf62b2d81db1d7415d117333c9cba35 100644 (file)
--- 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)
index 0c0912576dbb9d089c3142cf602bbf0fd44ed933..5208113010ccdf8c39b9e287dea6e9f9d780c806 100644 (file)
@@ -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;
index 5711fb85dd442515e5c64d3412be44f84db4b024..b35ba2a9802726fa836fdf21d9c978b1f1f52285 100644 (file)
@@ -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;"
index 09857834e7e06d90bbf95511ff864c2d91790941..60e9503b121101cf67ccae6a8d79d3de2217fe69 100755 (executable)
@@ -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
index 20c14e0fcf7febbc7add1935183548444b031af7..dddf808fd07236a05169fb13096ff5749547beae 100644 (file)
@@ -53,7 +53,7 @@
 
 #include <term.h>              /* 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;
index 6a050ee78e666179ba1cf50917bd56bcce565160..532e5a35ac94d9a891a0c633a619ee72bd800f75 100644 (file)
@@ -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 <tic.h>
 #include <term_entry.h>
 
-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);
index 18b90ac265d87a371b6996ec2a3f193840b61ffc..2247f14ef2e872adfb277016ba6ccaa8aa056001 100755 (executable)
@@ -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;}
index eeee5dbb6a04d64dc8a6672fa1f78595bd83f55c..83231f3a7e1e7ab0f65520b225d5e463ec133f63 100644 (file)
@@ -39,7 +39,7 @@
 #include "termsort.c"          /* this C file is generated */
 #include <parametrized.h>      /* 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);
 
index f802ecb783f717d26798e7181e046e5514cd0ac9..b99a37a74f25a1b11cd501991921838bc02a00f9 100644 (file)
@@ -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 *);