#include "output.h"
/* Table. */
-int table_num = 1;
-int subtable_num;
+static int table_num = 1;
+static int subtable_num;
\f
/* Increments table_num so different procedures' output can be
distinguished. */
int hl, hr, ht, hb;
int nc, nr;
- /* Set up to render the table. */
t->class->flags (t, &flags);
if (!(flags & SOMF_NO_TITLE))
subtable_num++;
+ t->table_num = table_num;
+ t->subtable_num = subtable_num;
- /* Do some basic error checking. */
t->class->count (t, &nc, &nr);
t->class->headers (t, &hl, &hr, &ht, &hb);
if (hl + hr > nc || ht + hb > nr)
if (len > max_len)
max_len = len;
- t->class->title (r, index++, 0);
+ t->class->title (r, index++, 0, t->table_num, t->subtable_num);
t->class->render (r, 0, y0, nc, y1);
d->cp_x += tw + 2 * d->prop_em_width;
assert (d->cp_x == 0);
assert (tw < d->width && th + d->cp_y < d->length);
- t->class->title (r, 0, 0);
+ t->class->title (r, 0, 0, t->table_num, t->subtable_num);
t->class->render (r, hl, ht, nc - hr, nr - hb);
d->cp_y += th;
}
else
{
t->class->title (r, x_index ? x_index : y_index,
- x_index ? y_index : 0);
+ x_index ? y_index : 0,
+ t->table_num, t->subtable_num);
t->class->render (r, x0, y0, x1, y1);
d->cp_y += len;