int bb[TABLE_N_AXES][2],
int clip[TABLE_N_AXES][2]);
+static void
+reallocate_lines (struct ascii_driver *a)
+{
+ if (a->length > a->allocated_lines)
+ {
+ int i;
+ a->lines = xnrealloc (a->lines, a->length, sizeof *a->lines);
+ for (i = a->allocated_lines; i < a->length; i++)
+ {
+ struct ascii_line *line = &a->lines[i];
+ ds_init_empty (&line->s);
+ line->width = 0;
+ }
+ a->allocated_lines = a->length;
+ }
+}
+
+
static struct ascii_driver *
ascii_driver_cast (struct output_driver *driver)
{
return false;
}
+ reallocate_lines (a);
+
return true;
}
a->page_number++;
- if (a->length > a->allocated_lines)
- {
- a->lines = xnrealloc (a->lines, a->length, sizeof *a->lines);
- for (i = a->allocated_lines; i < a->length; i++)
- {
- struct ascii_line *line = &a->lines[i];
- ds_init_empty (&line->s);
- line->width = 0;
- }
- a->allocated_lines = a->length;
- }
+ reallocate_lines (a);
for (i = 0; i < a->length; i++)
{