void at_splines_write(at_output_write_func outputWriter, FILE * const writeto, at_output_opts_type * const optsArg, at_spline_list_array_type * const splinesP, at_msg_func msgFunc, void * const msgData) { at_output_opts_type * optsP; bool newOpts; int llx, lly, urx, ury; llx = 0; lly = 0; urx = splinesP->width; ury = splinesP->height; if (optsArg == NULL) { newOpts = true; optsP = at_output_opts_new(); } else { newOpts = false; optsP = optsArg; } (*outputWriter)(writeto, "DUMMYFILENAME", llx, lly, urx, ury, optsP, *splinesP, msgFunc, msgData); if (newOpts) at_output_opts_free(optsP); }
void at_splines_write (at_spline_writer * writer, FILE * writeto, gchar* file_name, at_output_opts_type * opts, at_splines_type * splines, at_msg_func msg_func, gpointer msg_data) { gboolean new_opts = FALSE; int llx, lly, urx, ury; llx = 0; lly = 0; urx = splines->width; ury = splines->height; if (!file_name) file_name = ""; if (opts == NULL) { new_opts = TRUE; opts = at_output_opts_new(); } setlocale( LC_NUMERIC, "C" ); (*writer->func) (writeto, file_name, llx, lly, urx, ury, opts, *splines, msg_func, msg_data, writer->data); if (new_opts) at_output_opts_free(opts); }