return 0;
if(log) log(ld, FILTER_LOGLEVEL_DEBUG, "mupdftoraster: input file cannot be identified");
- exit(EXIT_FAILURE);
+ return -1;
}
static void
/* If doc type is not PDF exit */
- if(parse_doc_type(fp, log, ld))
- empty = 1;
+ empty = parse_doc_type(fp, log, ld);
+ if (empty == -1)
+ goto out;
/* Check status of color management in CUPS */
cm_calibrate = cmGetCupsColorCalibrateMode(data, options, num_options);
filter_out_format_t output_format;
- inras = cupsRasterOpen(inputfd, CUPS_RASTER_READ);
-
if (parameters)
{
output_format = *(filter_out_format_t *)parameters;
else
{
if (log) log(ld, FILTER_LOGLEVEL_ERROR,
- " rastertopwg: Output format not specified.");
- exit(1);
+ "rastertopwg: Output format not specified.");
+ return (1);
}
+ inras = cupsRasterOpen(inputfd, CUPS_RASTER_READ);
+
if (data->ppd == NULL && data->ppdfile)
data->ppd = ppdOpenFile(data->ppdfile);