-/* Sets the widths of all the columns and heights of all the rows in
- table T for driver D. */
-static void
-crosstabs_dim (struct tab_rendering *r, void *aux_)
-{
- const struct tab_table *t = r->table;
- struct outp_driver *d = r->driver;
- struct crosstabs_dim_aux *aux = aux_;
- int i;
-
- /* Width of a numerical column. */
- int c = outp_string_width (d, "0.000000", OUTP_PROPORTIONAL);
- if (aux->exclude == MV_NEVER)
- c += outp_string_width (d, "M", OUTP_PROPORTIONAL);
-
- /* Set width for header columns. */
- if (t->l != 0)
- {
- size_t i;
- int w;
-
- w = d->width - c * (t->nc - t->l);
- for (i = 0; i <= t->nc; i++)
- w -= r->wrv[i];
- w /= t->l;
-
- if (w < d->prop_em_width * 8)
- w = d->prop_em_width * 8;
-
- if (w > d->prop_em_width * 15)
- w = d->prop_em_width * 15;
-
- for (i = 0; i < t->l; i++)
- r->w[i] = w;
- }
-
- for (i = t->l; i < t->nc; i++)
- r->w[i] = c;
-
- for (i = 0; i < t->nr; i++)
- r->h[i] = tab_natural_height (r, i);
-}
-
-static void
-crosstabs_dim_free (void *aux_)
-{
- struct crosstabs_dim_aux *aux = aux_;
- free (aux);
-}
-