{
{FRQ_ST_MEAN, N_("Mean")},
{FRQ_ST_SEMEAN, N_("S.E. Mean")},
{
{FRQ_ST_MEAN, N_("Mean")},
{FRQ_ST_SEMEAN, N_("S.E. Mean")},
-static void precalc (const struct ccase *, void *);
-static bool calc (const struct ccase *, void *);
-static void postcalc (void *);
+static void precalc (const struct ccase *, void *, const struct dataset *);
+static bool calc (const struct ccase *, void *, const struct dataset *);
+static bool postcalc (void *, const struct dataset *);
int pl;
subc_list_double *ptl_list = &cmd.dl_percentiles[i];
for ( pl = 0 ; pl < subc_list_double_count(ptl_list); ++pl)
int pl;
subc_list_double *ptl_list = &cmd.dl_percentiles[i];
for ( pl = 0 ; pl < subc_list_double_count(ptl_list); ++pl)
- ok = procedure_with_splits (current_dataset, precalc, calc, postcalc, NULL);
+ ok = procedure_with_splits (ds, precalc, calc, postcalc, NULL);
const union value *val = case_data (c, v->fv);
struct var_freqs *vf = get_var_freqs (v);
struct freq_tab *ft = &vf->tab;
const union value *val = case_data (c, v->fv);
struct var_freqs *vf = get_var_freqs (v);
struct freq_tab *ft = &vf->tab;
/* Finishes up with the variables after frequencies have been
calculated. Displays statistics, percentiles, ... */
/* Finishes up with the variables after frequencies have been
calculated. Displays statistics, percentiles, ... */
/* Parses the VARIABLES subcommand, adding to
{n_variables,v_variables}. */
static int
/* Parses the VARIABLES subcommand, adding to
{n_variables,v_variables}. */
static int
- lex_match ('=');
- if (token != T_ALL && (token != T_ID
- || dict_lookup_var (dataset_dict (current_dataset), tokid) == NULL))
+ lex_match (lexer, '=');
+ if (lex_token (lexer) != T_ALL && (lex_token (lexer) != T_ID
+ || dict_lookup_var (dataset_dict (ds), lex_tokid (lexer)) == NULL))
- if (!parse_variables (dataset_dict (current_dataset), &v_variables, &n_variables,
+ if (!parse_variables (lexer, dataset_dict (ds), &v_variables, &n_variables,
/* Parses the GROUPED subcommand, setting the n_grouped, grouped
fields of specified variables. */
static int
/* Parses the GROUPED subcommand, setting the n_grouped, grouped
fields of specified variables. */
static int
- lex_match ('=');
- if ((token == T_ID && dict_lookup_var (dataset_dict (current_dataset), tokid) != NULL)
- || token == T_ID)
+ lex_match (lexer, '=');
+ if ((lex_token (lexer) == T_ID && dict_lookup_var (dataset_dict (ds), lex_tokid (lexer)) != NULL)
+ || lex_token (lexer) == T_ID)
- if (!parse_variables (dataset_dict (current_dataset), &v, &n,
+ if (!parse_variables (lexer, dataset_dict (ds), &v, &n,
{
if (nl >= ml)
{
ml += 16;
dl = pool_nrealloc (int_pool, dl, ml, sizeof *dl);
}
{
if (nl >= ml)
{
ml += 16;
dl = pool_nrealloc (int_pool, dl, ml, sizeof *dl);
}
else
{
struct var_freqs *vf = get_var_freqs (v[i]);
if (vf->groups != NULL)
msg (SE, _("Variables %s specified multiple times on GROUPED "
else
{
struct var_freqs *vf = get_var_freqs (v[i]);
if (vf->groups != NULL)
msg (SE, _("Variables %s specified multiple times on GROUPED "
- if ((token != T_ID || dict_lookup_var (dataset_dict (current_dataset), tokid) != NULL)
- && token != T_ALL)
+ if ((lex_token (lexer) != T_ID || dict_lookup_var (dataset_dict (ds), lex_tokid (lexer)) != NULL)
+ && lex_token (lexer) != T_ALL)
{
percentiles = pool_nrealloc (int_pool, percentiles,
n_percentiles + 1, sizeof *percentiles);
{
percentiles = pool_nrealloc (int_pool, percentiles,
n_percentiles + 1, sizeof *percentiles);
struct var_freqs *vf = get_var_freqs (v);
return hsh_hash_bytes (value->v[0].s, vf->width);
struct var_freqs *vf = get_var_freqs (v);
return hsh_hash_bytes (value->v[0].s, vf->width);
struct var_freqs *vf = get_var_freqs (v);
return memcmp (a->v[0].s, b->v[0].s, vf->width);
struct var_freqs *vf = get_var_freqs (v);
return memcmp (a->v[0].s, b->v[0].s, vf->width);
- t->w[0] = min (tab_natural_width (t, d, 0), d->prop_em_width * 15);
+ t->w[0] = MIN (tab_natural_width (t, d, 0), d->prop_em_width * 15);
- t->w[i] = max (tab_natural_width (t, d, i), d->prop_em_width * 8);
+ t->w[i] = MAX (tab_natural_width (t, d, i), d->prop_em_width * 8);
tab_float (t, 2 + lab, r, TAB_NONE, 100.0, 5, 1);
tab_float (t, 3 + lab, r, TAB_NONE, 100.0, 5, 1);
tab_float (t, 2 + lab, r, TAB_NONE, 100.0, 5, 1);
tab_float (t, 3 + lab, r, TAB_NONE, 100.0, 5, 1);
- tab_title (t, "%s: %s", v->name, v->label ? v->label : "");
+ tab_title (t, "%s", var_to_string (v));
- int cum_w = max (outp_string_width (d, _("Cum"), OUTP_PROPORTIONAL),
- max (outp_string_width (d, _("Cum"), OUTP_PROPORTIONAL),
+ int cum_w = MAX (outp_string_width (d, _("Cum"), OUTP_PROPORTIONAL),
+ MAX (outp_string_width (d, _("Cum"), OUTP_PROPORTIONAL),
- t->w[i] = max (tab_natural_width (t, d, i), d->prop_em_width * 8);
+ t->w[i] = MAX (tab_natural_width (t, d, i), d->prop_em_width * 8);
cmd.spaces == FRQ_SINGLE ? -1 : TAL_GAP, TAL_1,
0, 0, 3, r - 1);
tab_hline (t, TAL_2, 0, 3, 2);
cmd.spaces == FRQ_SINGLE ? -1 : TAL_GAP, TAL_1,
0, 0, 3, r - 1);
tab_hline (t, TAL_2, 0, 3, 2);
- tab_title (t, "%s: %s", v->name, v->label ? v->label : "");
+ tab_title (t, "%s", var_to_string (v));
return;
ft = &get_var_freqs (v)->tab;
if (ft->n_valid == 0)
{
msg (SW, _("No valid data for variable %s; statistics not displayed."),
return;
ft = &get_var_freqs (v)->tab;
if (ft->n_valid == 0)
{
msg (SW, _("No valid data for variable %s; statistics not displayed."),
- {
- if (v->label)
- tab_title (t, "%s: %s", v->name, v->label);
- else
- tab_title (t, "%s", v->name);
- }
+ tab_title (t, "%s", var_to_string (v));
/* Find out the extremes of the x value */
for ( frq = hsh_first(fh, &hi); frq != 0; frq = hsh_next(fh, &hi) )
{
/* Find out the extremes of the x value */
for ( frq = hsh_first(fh, &hi); frq != 0; frq = hsh_next(fh, &hi) )
{