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;
}
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",
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,
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",
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",
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",
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. */
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]),
}
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",
/* 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;
n_iterators
};
-static struct casenum_iterator ip[n_iterators] =
+static const struct casenum_iterator ip[n_iterators] =
{
{cp1, last, forward},
{cp1c, cm1, forward_wrap},
\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
{
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);
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)
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)
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
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)