struct ctl_struct
{
- struct ctl_class *class; /* Class of control structure. */
+ const struct ctl_class *class; /* Class of control structure. */
struct ctl_struct *down; /* Points toward the bottom of ctl_stack. */
void *private; /* Private data. */
};
}
void
-ctl_stack_push (struct ctl_class *class, void *private)
+ctl_stack_push (const struct ctl_class *class, void *private)
{
struct ctl_struct *ctl;
}
void *
-ctl_stack_top (struct ctl_class *class)
+ctl_stack_top (const struct ctl_class *class)
{
struct ctl_struct *top = ctl_stack;
if (top != NULL && top->class == class)
}
void *
-ctl_stack_search (struct ctl_class *class)
+ctl_stack_search (const struct ctl_class *class)
{
struct ctl_struct *ctl;
};
void ctl_stack_clear (void);
-void ctl_stack_push (struct ctl_class *, void *private);
-void *ctl_stack_top (struct ctl_class *);
-void *ctl_stack_search (struct ctl_class *);
+void ctl_stack_push (const struct ctl_class *, void *private);
+void *ctl_stack_top (const struct ctl_class *);
+void *ctl_stack_search (const struct ctl_class *);
void ctl_stack_pop (void *);
bool ctl_stack_is_empty (void);
int past_END_IF_index; /* Transformation just past last clause. */
};
-static struct ctl_class do_if_class;
+static const struct ctl_class do_if_class;
static int parse_clause (struct do_if_trns *);
static void add_clause (struct do_if_trns *,
}
/* DO IF control structure class definition. */
-static struct ctl_class do_if_class =
+static const struct ctl_class do_if_class =
{
"DO IF",
"END IF",
int past_END_LOOP_index; /* Just past END LOOP transformation. */
};
-static struct ctl_class loop_class;
+static const struct ctl_class loop_class;
static trns_finalize_func loop_trns_finalize;
static trns_proc_func loop_trns_proc, end_loop_trns_proc, break_trns_proc;
}
/* LOOP control structure class definition. */
-static struct ctl_class loop_class =
+static const struct ctl_class loop_class =
{
"LOOP",
"END LOOP",
};
/* Name of each content type. */
-static const char *content_names[PROX + 1] =
+static const char *const content_names[PROX + 1] =
{
"N", "N", "N_MATRIX", "MEAN", "STDDEV", "COUNT", "MSE",
"DFE", "MAT", "COV", "CORR", "PROX",
size_t nv1, nv2;
};
-struct cor_set *cor_list, *cor_last;
+static struct cor_set *cor_list, *cor_last;
-struct file_handle *matrix_file;
+static struct file_handle *matrix_file;
static void free_correlations_state (void);
static int internal_cmd_correlations (void);
static int ns_cols, ns_rows;
/* Crosstabulation. */
-static struct crosstab *x;
+static const struct crosstab *x;
/* Number of variables from the crosstabulation to consider. This is
either x->nvar, if pivoting is on, or 2, if pivoting is off. */
};
/* Table of statistics, indexed by dsc_*. */
-static struct frq_info st_name[frq_n_stats + 1] =
+static const struct frq_info st_name[frq_n_stats + 1] =
{
{FRQ_ST_MEAN, N_("Mean")},
{FRQ_ST_SEMEAN, N_("S.E. Mean")},
/* The number of distinct values of the independent variable, when all
missing values are disregarded */
-static int ostensible_number_of_groups=-1;
+static int ostensible_number_of_groups = -1;
/* Function to use for testing for missing values */
{FMT_F, 8, 4} /* savage */
};
-static const char *function_name[n_RANK_FUNCS] = {
+static const char * const function_name[n_RANK_FUNCS] = {
"RANK",
"NORMAL",
"PERCENT",
"SAVAGE"
};
-static rank_function_t rank_func[n_RANK_FUNCS] = {
+static const rank_function_t rank_func[n_RANK_FUNCS] = {
rank_rank,
rank_normal,
rank_percent,
output_file_arg
};
-static struct outp_option option_tab[] =
+static const struct outp_option option_tab[] =
{
{"headers", boolean_arg, 0},
{"paginate", boolean_arg, 1},
}
-struct outp_class ascii_class =
+const struct outp_class ascii_class =
{
"ascii",
0,
};
/* All the options that the HTML driver supports. */
-static struct outp_option option_tab[] =
+static const struct outp_option option_tab[] =
{
{"output-file", string_arg, 0},
{"chart-files", string_arg, 1},
/* HTML driver class. */
-struct outp_class html_class =
+const struct outp_class html_class =
{
"html",
1,
size_t chart_cnt;
};
-extern struct outp_class html_class;
+extern const struct outp_class html_class;
struct outp_driver;
void html_put_cell_contents (struct outp_driver *this,
}
\f
/* Driver. */
-static struct outp_driver *d=0;
+static struct outp_driver *d = 0;
/* Table. */
-static struct som_entity *t=0;
+static struct som_entity *t = 0;
/* Flags. */
static unsigned flags;
/* Entity (Table or Chart) . */
struct som_entity
{
- struct som_table_class *class; /* Table class. */
+ const struct som_table_class *class; /* Table class. */
enum som_type type; /* Table or Chart */
void *ext; /* Owned by */
};
/* A list of driver classes. */
struct outp_driver_class_list
{
- struct outp_class *class;
+ const struct outp_class *class;
struct outp_driver_class_list *next;
};
-struct outp_driver_class_list *outp_class_list;
-struct outp_driver *outp_driver_list;
+static struct outp_driver_class_list *outp_class_list;
+static struct outp_driver *outp_driver_list;
char *outp_title;
char *outp_subtitle;
/* Add a class to the class list. */
static void
-add_class (struct outp_class *class)
+add_class (const struct outp_class *class)
{
struct outp_driver_class_list *new_list = xmalloc (sizeof *new_list);
{
extern struct outp_class ascii_class;
extern struct outp_class postscript_class;
- extern struct outp_class html_class;
char def[] = "default";
code and stores subcategory in *SUBCAT on success. Returns -1
on failure. */
int
-outp_match_keyword (const char *s, struct outp_option *tab, int *subcat)
+outp_match_keyword (const char *s, const struct outp_option *tab, int *subcat)
{
for (; tab->keyword != NULL; tab++)
if (!strcmp (s, tab->keyword))
struct outp_driver
{
struct outp_driver *next, *prev; /* List of drivers. */
- struct outp_class *class; /* Driver class. */
+ const struct outp_class *class; /* Driver class. */
char *name; /* Name of this driver. */
bool page_open; /* 1=page is open, 0=page is closed. */
int device; /* Zero or more of OUTP_DEV_*. */
int subcat; /* Subcategory. */
};
-/* List of configured output drivers. */
-extern struct outp_driver *outp_driver_list;
/* Title, subtitle. */
extern char *outp_title;
bool (*) (struct outp_driver *, const char *key,
const struct string *value),
struct outp_driver *);
-int outp_match_keyword (const char *, struct outp_option *, int *);
+int outp_match_keyword (const char *, const struct outp_option *, int *);
int outp_evaluate_dimension (char *, char **);
bool outp_get_paper_size (char *, int *h, int *v);
};
/* All the options that the PostScript driver supports. */
-static struct outp_option option_tab[] =
+static const struct outp_option option_tab[] =
{
{"output-file", output_file_arg,0},
{"paper-size", paper_size_arg, 0},
}
/* PostScript driver class. */
-struct outp_class postscript_class =
+const struct outp_class postscript_class =
{
"postscript",
0,
#include "gettext.h"
#define _(msgid) gettext (msgid)
\f
-struct som_table_class tab_table_class;
+const struct som_table_class tab_table_class;
static char *command_name;
/* Returns the font to use for a cell with the given OPTIONS. */
y = render_rows (y, c0, c1, (t->nr - t->b) * 2, t->nr * 2 + 1);
}
-struct som_table_class tab_table_class =
+const struct som_table_class tab_table_class =
{
tabi_table,
tabi_driver,