pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] pspp/src data/data-in.c data/data-out.c data/po...


From: John Darrington
Subject: [Pspp-cvs] pspp/src data/data-in.c data/data-out.c data/po...
Date: Mon, 24 Dec 2007 01:33:43 +0000

CVSROOT:        /sources/pspp
Module name:    pspp
Changes by:     John Darrington <jmd>   07/12/24 01:33:43

Modified files:
        src/data       : data-in.c data-out.c por-file-reader.c 
                         sys-file-reader.c sys-file-writer.c 
        src/ui/gui     : clipboard.c find-dialog.c psppire-hbuttonbox.c 
                         psppire-keypad.c psppire-vbuttonbox.c 

Log message:
        Constness patrol

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/data-in.c?cvsroot=pspp&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/data-out.c?cvsroot=pspp&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/por-file-reader.c?cvsroot=pspp&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/sys-file-reader.c?cvsroot=pspp&r1=1.54&r2=1.55
http://cvs.savannah.gnu.org/viewcvs/pspp/src/data/sys-file-writer.c?cvsroot=pspp&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/clipboard.c?cvsroot=pspp&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/find-dialog.c?cvsroot=pspp&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/psppire-hbuttonbox.c?cvsroot=pspp&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/psppire-keypad.c?cvsroot=pspp&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/pspp/src/ui/gui/psppire-vbuttonbox.c?cvsroot=pspp&r1=1.2&r2=1.3

Patches:
Index: data/data-in.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/data-in.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- data/data-in.c      9 Nov 2007 03:06:28 -0000       1.24
+++ data/data-in.c      24 Dec 2007 01:33:42 -0000      1.25
@@ -795,7 +795,7 @@
    exact matches (except for case) are allowed.
    Returns true if successful, false otherwise. */
 static bool
-match_name (struct substring token, const char **names, long *output)
+match_name (struct substring token, const char *const *names, long *output)
 {
   int i;
 
@@ -824,14 +824,14 @@
     }
   else
     {
-      static const char *english_names[] =
+      static const char *const english_names[] =
         {
           "jan", "feb", "mar", "apr", "may", "jun",
           "jul", "aug", "sep", "oct", "nov", "dec",
           NULL,
         };
 
-      static const char *roman_names[] =
+      static const char *const roman_names[] =
         {
           "i", "ii", "iii", "iv", "v", "vi",
           "vii", "viii", "ix", "x", "xi", "xii",
@@ -1012,7 +1012,7 @@
 static bool
 parse_weekday (struct data_in *i, long *weekday)
 {
-  static const char *weekday_names[] =
+  static const char *const weekday_names[] =
     {
       "su", "mo", "tu", "we", "th", "fr", "sa",
       NULL,

Index: data/data-out.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/data-out.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- data/data-out.c     11 Nov 2007 05:51:41 -0000      1.21
+++ data/data-out.c     24 Dec 2007 01:33:43 -0000      1.22
@@ -366,7 +366,7 @@
             p += sprintf (p, "%02d", month);
           else
             {
-              static const char *months[12] =
+              static const char *const months[12] =
                 {
                   "JAN", "FEB", "MAR", "APR", "MAY", "JUN",
                   "JUL", "AUG", "SEP", "OCT", "NOV", "DEC",
@@ -462,7 +462,7 @@
 output_WKDAY (const union value *input, const struct fmt_spec *format,
               char *output)
 {
-  static const char *weekdays[7] =
+  static const char *const weekdays[7] =
     {
       "SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY",
       "THURSDAY", "FRIDAY", "SATURDAY",
@@ -483,7 +483,7 @@
 output_MONTH (const union value *input, const struct fmt_spec *format,
               char *output)
 {
-  static const char *months[12] =
+  static const char *const months[12] =
     {
       "JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE",
       "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER",

Index: data/por-file-reader.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/por-file-reader.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- data/por-file-reader.c      21 Dec 2007 23:49:36 -0000      1.29
+++ data/por-file-reader.c      24 Dec 2007 01:33:43 -0000      1.30
@@ -509,8 +509,9 @@
 static void
 read_version_data (struct pfm_reader *r, struct pfm_read_info *info)
 {
-  static char empty_string[] = "";
-  char *date, *time, *product, *author, *subproduct;
+  static const char empty_string[] = "";
+  char *date, *time;
+  const char *product, *author, *subproduct;
   int i;
 
   /* Read file. */

Index: data/sys-file-reader.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/sys-file-reader.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- data/sys-file-reader.c      21 Dec 2007 23:49:36 -0000      1.54
+++ data/sys-file-reader.c      24 Dec 2007 01:33:43 -0000      1.55
@@ -811,7 +811,7 @@
     NOT_REACHED ();
   if (integer_representation != expected_integer_format)
     {
-      static const char *endian[] = {N_("little-endian"), N_("big-endian")};
+      static const char *const endian[] = {N_("little-endian"), 
N_("big-endian")};
       sys_warn (r, _("Integer format indicated by system file (%s) "
                      "differs from expected (%s)."),
                 gettext (endian[integer_representation == 1]),

Index: data/sys-file-writer.c
===================================================================
RCS file: /sources/pspp/pspp/src/data/sys-file-writer.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- data/sys-file-writer.c      21 Dec 2007 23:49:36 -0000      1.39
+++ data/sys-file-writer.c      24 Dec 2007 01:33:43 -0000      1.40
@@ -333,7 +333,7 @@
     }
   else
     {
-      static const char *month_name[12] =
+      static const char *const month_name[12] =
         {
           "Jan", "Feb", "Mar", "Apr", "May", "Jun",
           "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",

Index: ui/gui/clipboard.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/clipboard.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- ui/gui/clipboard.c  12 Oct 2007 04:59:30 -0000      1.4
+++ ui/gui/clipboard.c  24 Dec 2007 01:33:43 -0000      1.5
@@ -33,7 +33,7 @@
 
 /* A casereader and dictionary holding the data currently in the clip */
 static struct casereader *clip_datasheet = NULL;
-struct dictionary *clip_dict = NULL;
+static struct dictionary *clip_dict = NULL;
 
 
 

Index: ui/gui/find-dialog.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/find-dialog.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- ui/gui/find-dialog.c        9 Nov 2007 03:06:29 -0000       1.4
+++ ui/gui/find-dialog.c        24 Dec 2007 01:33:43 -0000      1.5
@@ -375,7 +375,7 @@
   n_iterators
 };
 
-static struct casenum_iterator ip[n_iterators] =
+static const struct casenum_iterator ip[n_iterators] =
   {
     {cp1, last, forward},
     {cp1c, cm1, forward_wrap},
@@ -386,7 +386,7 @@
 
 
 /* A factory returning an iterator according to the dialog box's settings */
-static struct casenum_iterator *
+static const struct casenum_iterator *
 get_iteration_params (const struct find_dialog *fd)
 {
   gboolean wrap = gtk_toggle_button_get_active
@@ -742,7 +742,7 @@
   {
     union value *val = value_create (width);
     casenumber i;
-    struct casenum_iterator *ip = get_iteration_params (fd);
+    const struct casenum_iterator *ip = get_iteration_params (fd);
     struct comparator *cmptr =
       comparator_factory (var, target_string, flags);
 

Index: ui/gui/psppire-hbuttonbox.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire-hbuttonbox.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- ui/gui/psppire-hbuttonbox.c 7 Jul 2007 06:14:29 -0000       1.2
+++ ui/gui/psppire-hbuttonbox.c 24 Dec 2007 01:33:43 -0000      1.3
@@ -40,7 +40,7 @@
                                           GtkAllocation  *allocation);
 
 
-static GtkButtonBoxStyle default_layout_style = GTK_BUTTONBOX_EDGE;
+static const GtkButtonBoxStyle default_layout_style = GTK_BUTTONBOX_EDGE;
 
 GType
 psppire_hbutton_box_get_type (void)

Index: ui/gui/psppire-keypad.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire-keypad.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- ui/gui/psppire-keypad.c     4 Oct 2007 02:41:54 -0000       1.4
+++ ui/gui/psppire-keypad.c     24 Dec 2007 01:33:43 -0000      1.5
@@ -31,7 +31,7 @@
 static void psppire_keypad_class_init          (PsppireKeypadClass *klass);
 static void psppire_keypad_init                (PsppireKeypad      *kp);
 
-static guint keypad_signals[n_SIGNALS] = { 0 };
+static guint keypad_signals [n_SIGNALS] = { 0 };
 
 GType
 psppire_keypad_get_type (void)
@@ -125,7 +125,7 @@
    The order of these must correspond
    to the order of the button declarations
 */
-static const char *keypad_insert_text[] = {
+static const char * const keypad_insert_text[] = {
   "0",  "1",  "2", "3", "4", "5", "6", "7", "8", "9",
   ".", "+", "-", "*", "**", "/", "=", "<>", "<", "<=",
   ">", ">=", "&", "|", "~", "()", NULL

Index: ui/gui/psppire-vbuttonbox.c
===================================================================
RCS file: /sources/pspp/pspp/src/ui/gui/psppire-vbuttonbox.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- ui/gui/psppire-vbuttonbox.c 7 Jul 2007 06:14:29 -0000       1.2
+++ ui/gui/psppire-vbuttonbox.c 24 Dec 2007 01:33:43 -0000      1.3
@@ -40,7 +40,7 @@
                                           GtkAllocation  *allocation);
 
 
-static GtkButtonBoxStyle default_layout_style = GTK_BUTTONBOX_EDGE;
+static const GtkButtonBoxStyle default_layout_style = GTK_BUTTONBOX_EDGE;
 
 GType
 psppire_vbutton_box_get_type (void)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]