+ struct ascii_driver_ext *x = this->ext;
+ struct outp_text t;
+ char *text;
+
+ if (x->chart_type == NULL)
+ return;
+
+ /* Initialize chart. */
+ chart_init_separate (ch, x->chart_type, x->chart_file_name, ++x->chart_cnt);
+ if (ch->file_name == NULL)
+ return;
+
+ /* Mention chart in output.
+ First advance current position. */
+ if (!this->page_open)
+ outp_open_page (this);
+ else
+ {
+ this->cp_y++;
+ if (this->cp_y >= this->length)
+ {
+ outp_close_page (this);
+ outp_open_page (this);
+ }
+ }
+
+ /* Then write the text. */
+ text = xasprintf ("See %s for a chart.", ch->file_name);
+ t.font = OUTP_FIXED;
+ t.justification = OUTP_LEFT;
+ t.string = ss_cstr (text);
+ t.h = this->width;
+ t.v = 1;
+ t.x = 0;
+ t.y = this->cp_y;
+ ascii_text_draw (this, &t);
+ this->cp_y++;
+
+ free (text);
+}
+
+static void
+ascii_chart_finalise (struct outp_driver *this, struct chart *ch)
+{
+ struct ascii_driver_ext *x = this->ext;
+ if (x->chart_type != NULL)
+ chart_finalise_separate (ch);