cmd.sort = FRQ_AVALUE;
/* Do it! */
- procedure (precalc, calc, postcalc, NULL);
+ procedure_with_splits (precalc, calc, postcalc, NULL);
return CMD_SUCCESS;
}
return 0;
}
+/* Returns nonzero iff the value in struct freq F is non-missing
+ for variable V. */
static int
not_missing (const void *f_, void *v_)
{
return !is_missing (&f->v, v);
}
+/* Summarizes the frequency table data for variable V. */
static void
-postprocess_freq_tab (struct variable * v)
+postprocess_freq_tab (struct variable *v)
{
hsh_compare_func *compare;
struct freq_tab *ft;
}
}
+/* Frees the frequency table for variable V. */
static void
cleanup_freq_tab (struct variable *v)
{
assert (v->p.frq.tab.mode == FRQM_GENERAL);
free (v->p.frq.tab.valid);
+ hsh_destroy (v->p.frq.tab.data);
}
/* Parses the VARIABLES subcommand, adding to
frq_custom_variables (struct cmd_frequencies *cmd UNUSED)
{
int mode;
- int min, max;
+ int min = 0, max = 0;
int old_n_variables = n_variables;
int i;
return 0;
}
}
- else
- nl = 0;
+ else
+ {
+ nl = 0;
+ dl = NULL;
+ }
for (i = 0; i < n; i++)
{
const struct freq *a = a_;
const struct freq *b = b_;
- if (a->v.c > b->v.c)
+ if (a->c > b->c)
return 1;
- else if (a->v.c < b->v.c)
+ else if (a->c < b->c)
return -1;
if (a->v.f > b->v.f)
const struct freq *b = b_;
const struct variable *v = v_;
- if (a->v.c > b->v.c)
+ if (a->c > b->c)
return 1;
- else if (a->v.c < b->v.c)
+ else if (a->c < b->c)
return -1;
else
return memcmp (a->v.s, b->v.s, v->width);
const struct freq *a = a_;
const struct freq *b = b_;
- if (a->v.c > b->v.c)
+ if (a->c > b->c)
return -1;
- else if (a->v.c < b->v.c)
+ else if (a->c < b->c)
return 1;
if (a->v.f > b->v.f)
const struct freq *b = b_;
const struct variable *v = v_;
- if (a->v.c > b->v.c)
+ if (a->c > b->c)
return -1;
- else if (a->v.c < b->v.c)
+ else if (a->c < b->c)
return 1;
else
return memcmp (a->v.s, b->v.s, v->width);