static struct pair *pairs=0;
-static int parse_value (struct lexer *lexer, union value * v, int type) ;
+static int parse_value (struct lexer *lexer, union value * v, enum var_type);
/* Structures and Functions for the Statistics Summary Box */
struct ssbox;
struct hsh_table *hash;
struct variable *v;
- hash = hsh_create (n_pairs, compare_var_names, hash_var_name, 0, 0);
+ hash = hsh_create (n_pairs, compare_vars_by_name, hash_var_by_name,
+ 0, 0);
for (i=0; i < n_pairs; ++i)
{
/* Parses the current token (numeric or string, depending on type)
value v and returns success. */
static int
-parse_value (struct lexer *lexer, union value * v, int type )
+parse_value (struct lexer *lexer, union value * v, enum var_type type)
{
- if (type == NUMERIC)
+ if (type == VAR_NUMERIC)
{
if (!lex_force_num (lexer))
return 0;
{
int i;
- char *val_lab0=0;
- char *val_lab1=0;
+ const char *val_lab0;
+ const char *val_lab1;
double indep_value[2];
char prefix[2][3]={"",""};
if ( var_is_numeric (indep_var) )
{
- val_lab0 = val_labs_find( indep_var->val_labs,gp.v.g_value[0]);
- val_lab1 = val_labs_find( indep_var->val_labs,gp.v.g_value[1]);
+ val_lab0 = var_lookup_value_label (indep_var, &gp.v.g_value[0]);
+ val_lab1 = var_lookup_value_label (indep_var, &gp.v.g_value[1]);
}
else
{
if (! casefilter_variable_missing (filter, c, v) )
{
struct group_statistics *gs;
- const union value *val = case_data (c, v->fv);
+ const union value *val = case_data (c, v);
gs = &group_proc_get (cmd->v_variables[i])->ugs;
gs->n += weight;
{
struct group_statistics *gs;
struct variable *v = cmd->v_variables[i];
- const union value *val = case_data (c, v->fv);
+ const union value *val = case_data (c, v);
gs= &group_proc_get (cmd->v_variables[i])->ugs;
struct variable *v0 = pairs[i].v[0];
struct variable *v1 = pairs[i].v[1];
- const union value *val0 = case_data (c, v0->fv);
- const union value *val1 = case_data (c, v1->fv);
+ const union value *val0 = case_data (c, v0);
+ const union value *val1 = case_data (c, v1);
if ( ! casefilter_variable_missing (filter, c, v0) &&
! casefilter_variable_missing (filter, c, v1) )
if ( casefilter_variable_missing (filter, c, indep_var))
return 0;
- gv = case_data (c, indep_var->fv);
+ gv = case_data (c, indep_var);
for(i=0; i< cmd->n_variables ; ++i)
{
struct variable *var = cmd->v_variables[i];
- const union value *val = case_data (c, var->fv);
+ const union value *val = case_data (c, var);
struct hsh_table *grp_hash = group_proc_get (var)->group_hash;
struct group_statistics *gs;