-parse_variables (struct dictionary *d, struct variable ***var, int *cnt,
- int opts)
+parse_variables (const struct dictionary *d, struct variable ***var,
+ int *cnt, int opts)
Conversely, if parse_variables() returns non-zero, then *nv is
nonzero and *v is non-NULL. */
int
Conversely, if parse_variables() returns non-zero, then *nv is
nonzero and *v is non-NULL. */
int
- size_t (*get_cnt) (struct var_set *);
- struct variable *(*get_var) (struct var_set *, size_t idx);
- struct variable *(*lookup_var) (struct var_set *, const char *);
+ size_t (*get_cnt) (const struct var_set *);
+ struct variable *(*get_var) (const struct var_set *, size_t idx);
+ struct variable *(*lookup_var) (const struct var_set *, const char *);
/* Returns the variable in VS named NAME, or a null pointer if VS
contains no variable with that name. */
struct variable *
/* Returns the variable in VS named NAME, or a null pointer if VS
contains no variable with that name. */
struct variable *
/* Returns the variable in VS named NAME, or a null pointer if VS
contains no variable with that name. */
static struct variable *
/* Returns the variable in VS named NAME, or a null pointer if VS
contains no variable with that name. */
static struct variable *
{
struct var_set *vs = xmalloc (sizeof *vs);
vs->get_cnt = dict_var_set_get_cnt;
vs->get_var = dict_var_set_get_var;
vs->lookup_var = dict_var_set_lookup_var;
vs->destroy = dict_var_set_destroy;
{
struct var_set *vs = xmalloc (sizeof *vs);
vs->get_cnt = dict_var_set_get_cnt;
vs->get_var = dict_var_set_get_var;
vs->lookup_var = dict_var_set_lookup_var;
vs->destroy = dict_var_set_destroy;
size_t var_cnt; /* Number of elements in var. */
struct hsh_table *name_tab; /* Hash from variable names to variables. */
};
/* Returns the number of variables in VS. */
static size_t
size_t var_cnt; /* Number of elements in var. */
struct hsh_table *name_tab; /* Hash from variable names to variables. */
};
/* Returns the number of variables in VS. */
static size_t
}
/* Returns the variable in VS named NAME, or a null pointer if VS
contains no variable with that name. */
static struct variable *
}
/* Returns the variable in VS named NAME, or a null pointer if VS
contains no variable with that name. */
static struct variable *
compare_variables, hash_variable, NULL,
NULL);
for (i = 0; i < var_cnt; i++)
compare_variables, hash_variable, NULL,
NULL);
for (i = 0; i < var_cnt; i++)