-/* Sets cell (C,R) in TABLE, with options OPT, to have a value taken
- from V, displayed with print format spec from variable VAR. When
- in REPORT missing-value mode, missing values have an M appended. */
-static void
-table_value_missing (struct crosstabs_proc *proc,
- struct tab_table *table, int c, int r, unsigned char opt,
- const union value *v, const struct variable *var)
-{
- const char *label = var_lookup_value_label (var, v);
- if (label != NULL)
- tab_text (table, c, r, TAB_LEFT, label);
- else
- {
- const struct fmt_spec *print = var_get_print_format (var);
- if (proc->exclude == MV_NEVER && var_is_value_missing (var, v, MV_USER))
- {
- char *s = data_out (v, dict_get_encoding (proc->dict), print);
- tab_text_format (table, c, r, opt, "%sM", s + strspn (s, " "));
- free (s);
- }
- else
- tab_value (table, c, r, opt, v, var, print);
- }
-}
-
-/* Draws a line across TABLE at the current row to indicate the most
- major dimension variable with index FIRST_DIFFERENCE out of N_VARS
- that changed, and puts the values that changed into the table. TB
- and PT must be the corresponding table_entry and crosstab,
- respectively. */
-static void
-display_dimensions (struct crosstabs_proc *proc, struct pivot_table *pt,
- struct tab_table *table, int first_difference)
-{
- tab_hline (table, TAL_1, pt->n_consts + pt->n_vars - first_difference - 1, tab_nc (table) - 1, 0);
-
- for (; first_difference >= 2; first_difference--)
- table_value_missing (proc, table, pt->n_consts + pt->n_vars - first_difference - 1, 0,
- TAB_RIGHT, &pt->entries[0]->values[first_difference],
- pt->vars[first_difference]);
-}
-
-/* Put VALUE into cell (C,R) of TABLE, suffixed with character
- SUFFIX if nonzero. If MARK_MISSING is true the entry is
- additionally suffixed with a letter `M'. */