projects
/
pspp-builds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cc6a060
)
Constness patrol
author
John Darrington
<john@darrington.wattle.id.au>
Mon, 24 Dec 2007 01:33:42 +0000
(
01:33
+0000)
committer
John Darrington
<john@darrington.wattle.id.au>
Mon, 24 Dec 2007 01:33:42 +0000
(
01:33
+0000)
src/data/data-in.c
patch
|
blob
|
history
src/data/data-out.c
patch
|
blob
|
history
src/data/por-file-reader.c
patch
|
blob
|
history
src/data/sys-file-reader.c
patch
|
blob
|
history
src/data/sys-file-writer.c
patch
|
blob
|
history
src/ui/gui/clipboard.c
patch
|
blob
|
history
src/ui/gui/find-dialog.c
patch
|
blob
|
history
src/ui/gui/psppire-hbuttonbox.c
patch
|
blob
|
history
src/ui/gui/psppire-keypad.c
patch
|
blob
|
history
src/ui/gui/psppire-vbuttonbox.c
patch
|
blob
|
history
diff --git
a/src/data/data-in.c
b/src/data/data-in.c
index b9907c2d7303069348a670320957ff099d10260a..d84b806a77003d364422716fe336d06ad5708831 100644
(file)
--- a/
src/data/data-in.c
+++ b/
src/data/data-in.c
@@
-795,7
+795,7
@@
parse_name_token (struct data_in *i)
exact matches (except for case) are allowed.
Returns true if successful, false otherwise. */
static bool
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;
{
int i;
@@
-824,14
+824,14
@@
parse_month (struct data_in *i, long *month)
}
else
{
}
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,
};
{
"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",
{
"i", "ii", "iii", "iv", "v", "vi",
"vii", "viii", "ix", "x", "xi", "xii",
@@
-1012,7
+1012,7
@@
parse_minute_second (struct data_in *i, double *time)
static bool
parse_weekday (struct data_in *i, long *weekday)
{
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,
{
"su", "mo", "tu", "we", "th", "fr", "sa",
NULL,
diff --git
a/src/data/data-out.c
b/src/data/data-out.c
index 26abc7cc112a9897f1ebf4b928a429000ed67b5a..6d7c9ced3dffdb853d616ad14c0758fa81bcfde8 100644
(file)
--- a/
src/data/data-out.c
+++ b/
src/data/data-out.c
@@
-366,7
+366,7
@@
output_date (const union value *input, const struct fmt_spec *format,
p += sprintf (p, "%02d", month);
else
{
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",
{
"JAN", "FEB", "MAR", "APR", "MAY", "JUN",
"JUL", "AUG", "SEP", "OCT", "NOV", "DEC",
@@
-462,7
+462,7
@@
static void
output_WKDAY (const union value *input, const struct fmt_spec *format,
char *output)
{
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",
{
"SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY",
"THURSDAY", "FRIDAY", "SATURDAY",
@@
-483,7
+483,7
@@
static void
output_MONTH (const union value *input, const struct fmt_spec *format,
char *output)
{
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",
{
"JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE",
"JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER",
diff --git
a/src/data/por-file-reader.c
b/src/data/por-file-reader.c
index 3f2cdd46ec20b914b0a1c9268761e5a962985dc9..52c0cc8edab5dca9a59b142d83cf9c3466489a3e 100644
(file)
--- a/
src/data/por-file-reader.c
+++ b/
src/data/por-file-reader.c
@@
-509,8
+509,9
@@
read_header (struct pfm_reader *r)
static void
read_version_data (struct pfm_reader *r, struct pfm_read_info *info)
{
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. */
int i;
/* Read file. */
diff --git
a/src/data/sys-file-reader.c
b/src/data/sys-file-reader.c
index 8b29e0a52aad9dbb7ed5c2b62795f9e2c4876cc8..d71027d586c1a94c3dea6c9792830d89282ec1e9 100644
(file)
--- a/
src/data/sys-file-reader.c
+++ b/
src/data/sys-file-reader.c
@@
-811,7
+811,7
@@
read_machine_integer_info (struct sfm_reader *r, size_t size, size_t count,
NOT_REACHED ();
if (integer_representation != expected_integer_format)
{
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]),
sys_warn (r, _("Integer format indicated by system file (%s) "
"differs from expected (%s)."),
gettext (endian[integer_representation == 1]),
diff --git
a/src/data/sys-file-writer.c
b/src/data/sys-file-writer.c
index c5392666ff9d441d33b139c688d1a77b638e42b8..6cbd75575ec851a4dc11ab28ff692944e2a86461 100644
(file)
--- a/
src/data/sys-file-writer.c
+++ b/
src/data/sys-file-writer.c
@@
-333,7
+333,7
@@
write_header (struct sfm_writer *w, const struct dictionary *d)
}
else
{
}
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",
{
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
diff --git
a/src/ui/gui/clipboard.c
b/src/ui/gui/clipboard.c
index 4d7ca63ed9729a6b3eab153c69b83de16bce1e72..21438619d2ba8610ee61644b5428b2390bd7ac09 100644
(file)
--- a/
src/ui/gui/clipboard.c
+++ b/
src/ui/gui/clipboard.c
@@
-33,7
+33,7
@@
/* A casereader and dictionary holding the data currently in the clip */
static struct casereader *clip_datasheet = NULL;
/* A casereader and dictionary holding the data currently in the clip */
static struct casereader *clip_datasheet = NULL;
-struct dictionary *clip_dict = NULL;
+st
atic st
ruct dictionary *clip_dict = NULL;
diff --git
a/src/ui/gui/find-dialog.c
b/src/ui/gui/find-dialog.c
index 432afa159ab2fb695ceec59ca8fbf975ba98f379..508c4ae76872964e7e59077256019769125a343c 100644
(file)
--- a/
src/ui/gui/find-dialog.c
+++ b/
src/ui/gui/find-dialog.c
@@
-375,7
+375,7
@@
enum iteration_type{
n_iterators
};
n_iterators
};
-static struct casenum_iterator ip[n_iterators] =
+static
const
struct casenum_iterator ip[n_iterators] =
{
{cp1, last, forward},
{cp1c, cm1, forward_wrap},
{
{cp1, last, forward},
{cp1c, cm1, forward_wrap},
@@
-386,7
+386,7
@@
static struct casenum_iterator ip[n_iterators] =
\f
/* A factory returning an iterator according to the dialog box's settings */
\f
/* 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
get_iteration_params (const struct find_dialog *fd)
{
gboolean wrap = gtk_toggle_button_get_active
@@
-742,7
+742,7
@@
find_value (const struct find_dialog *fd, casenumber current_row,
{
union value *val = value_create (width);
casenumber i;
{
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);
struct comparator *cmptr =
comparator_factory (var, target_string, flags);
diff --git
a/src/ui/gui/psppire-hbuttonbox.c
b/src/ui/gui/psppire-hbuttonbox.c
index ae5f30945e538f7a86b1ce92c33a3765df49f45f..3332a354b93126d178b840dd9e05519555514446 100644
(file)
--- a/
src/ui/gui/psppire-hbuttonbox.c
+++ b/
src/ui/gui/psppire-hbuttonbox.c
@@
-40,7
+40,7
@@
static void gtk_hbutton_box_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
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)
GType
psppire_hbutton_box_get_type (void)
diff --git
a/src/ui/gui/psppire-keypad.c
b/src/ui/gui/psppire-keypad.c
index 54e6d4314fd2f2ba324ae9cfd419ad1e6c5af38c..19b8cabf4ebee05b24ef8fe82041120da35d3e8a 100644
(file)
--- a/
src/ui/gui/psppire-keypad.c
+++ b/
src/ui/gui/psppire-keypad.c
@@
-31,7
+31,7
@@
enum {
static void psppire_keypad_class_init (PsppireKeypadClass *klass);
static void psppire_keypad_init (PsppireKeypad *kp);
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)
GType
psppire_keypad_get_type (void)
@@
-125,7
+125,7
@@
psppire_keypad_class_init (PsppireKeypadClass *klass)
The order of these must correspond
to the order of the button declarations
*/
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
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
".", "+", "-", "*", "**", "/", "=", "<>", "<", "<=",
">", ">=", "&", "|", "~", "()", NULL
diff --git
a/src/ui/gui/psppire-vbuttonbox.c
b/src/ui/gui/psppire-vbuttonbox.c
index 7cd17573c63fa07caf6f43701fcde18cfea9fd64..98c2898ce2b4709edacf8d738fff3757e9ae57d7 100644
(file)
--- a/
src/ui/gui/psppire-vbuttonbox.c
+++ b/
src/ui/gui/psppire-vbuttonbox.c
@@
-40,7
+40,7
@@
static void gtk_vbutton_box_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
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)
GType
psppire_vbutton_box_get_type (void)