Files that are opened with fn_open() must be closed with fn_close(), but
ascii_destroy() wasn't doing that. This made a particular difference for
interactive output where fn_close() calls pclose() instead of fclose().
if (a->y > 0)
ascii_close_page (a);
+ if (a->file != NULL)
+ fn_close (a->file_name, a->file);
free (a->title);
free (a->subtitle);
free (a->file_name);
for (i = 0; i < LNS_COUNT; i++)
free (a->box[i]);
free (a->init);
- if (a->file != NULL)
- fclose (a->file);
for (i = 0; i < a->allocated_lines; i++)
free (a->lines[i].chars);
free (a->lines);