free (s);
}
else
- tab_value (table, c, r, opt, v, proc->dict, print);
+ tab_value (table, c, r, opt, v, var, print);
}
}
/* Variable attributes. */
int width;
- struct fmt_spec print;
};
struct frq_proc
vf->n_groups = 0;
vf->groups = NULL;
vf->width = var_get_width (var);
- vf->print = *var_get_print_format (var);
}
frq->n_vars = n_vars;
if (label != NULL)
tab_text (t, 0, r, TAB_LEFT, label);
- tab_value (t, 1, r, TAB_NONE, &f->value, ft->dict, &vf->print);
+ tab_value (t, 1, r, TAB_NONE, &f->value, vf->var, NULL);
tab_double (t, 2, r, TAB_NONE, f->count, wfmt);
tab_double (t, 3, r, TAB_NONE, percent, NULL);
tab_double (t, 4, r, TAB_NONE, valid_percent, NULL);
if (label != NULL)
tab_text (t, 0, r, TAB_LEFT, label);
- tab_value (t, 1, r, TAB_NONE, &f->value, ft->dict, &vf->print);
+ tab_value (t, 1, r, TAB_NONE, &f->value, vf->var, NULL);
tab_double (t, 2, r, TAB_NONE, f->count, wfmt);
tab_double (t, 3, r, TAB_NONE,
f->count / ft->total_cases * 100.0, NULL);
#include <stdlib.h>
#include "data/data-out.h"
-#include "data/dictionary.h"
#include "data/format.h"
#include "data/settings.h"
#include "data/value.h"
+#include "data/variable.h"
#include "libpspp/assertion.h"
#include "libpspp/compiler.h"
#include "libpspp/i18n.h"
from V, displayed with format spec F. */
void
tab_value (struct tab_table *table, int c, int r, unsigned char opt,
- const union value *v, const struct dictionary *dict,
+ const union value *v, const struct variable *var,
const struct fmt_spec *f)
{
char *contents;
}
#endif
- contents = data_out_pool (v, dict_get_encoding (dict), f, table->container);
+ contents = data_out_pool (v, var_get_encoding (var),
+ f != NULL ? f : var_get_print_format (var),
+ table->container);
table->cc[c + r * table->cf] = contents;
table->ct[c + r * table->cf] = opt;
struct dictionary;
union value;
void tab_value (struct tab_table *, int c, int r, unsigned char opt,
- const union value *, const struct dictionary *dict,
+ const union value *, const struct variable *,
const struct fmt_spec *);
void tab_fixed (struct tab_table *, int c, int r, unsigned char opt,