return c;
}
-static void gvdevice_flush(GVJ_t * job)
+int gvflush (GVJ_t * job)
{
if (job->output_file
&& ! job->external_context
&& ! job->gvc->write_fn) {
- fflush(job->output_file);
+ return fflush(job->output_file);
}
+ else
+ return 0;
}
static void gvdevice_close(GVJ_t * job)
if (gvde && gvde->format)
gvde->format(job);
- gvdevice_flush(job);
+ gvflush (job);
}
void gvdevice_finalize(GVJ_t * job)
if (! finalized_p) {
/* if the device has no finalization then it uses file output */
- gvdevice_flush(job);
+ gvflush (job);
gvdevice_close(job);
}
}
extern int gvferror (FILE *stream);
extern int gvputc(GVJ_t * job, int c);
extern int gvputs(GVJ_t * job, const char *s);
+ extern int gvflush (GVJ_t * job);
extern void gvprintf(GVJ_t * job, const char *format, ...);
extern void gvprintdouble(GVJ_t * job, double num);
extern void gvprintpointf(GVJ_t * job, pointf p);