if (argc < 6 || argc > 7)
{
- fprintf(stderr, _("Usage: %s job-id user title copies options [file]\n"),
- argv[0]);
+ _cupsLangPrintf(stderr,
+ _("Usage: %s job-id user title copies options file"),
+ argv[0]);
return (1);
}
if (pipe(mypipes))
{
- perror("ERROR: Unable to create pipes for imagetops | pstoraster");
+ _cupsLangPrintError("ERROR", _("Unable to create pipes for filters"));
return (errno);
}
execlp("pstoraster", argv[0], argv[1], argv[2], argv[3], argv[4], argv[5],
NULL);
- perror("ERROR: Unable to exec pstoraster");
return (errno);
}
else if (pid < 0)
* Error!
*/
- perror("ERROR: Unable to fork pstoraster");
+ _cupsLangPrintError("ERROR", _("Unable to fork filter"));
return (errno);
}
close(mypipes[1]);
/*
- * Run imagetops to get the classification or page labelling that was
+ * Run imagetops to get the classification or page labeling that was
* requested...
*/
execlp("imagetops", argv[0], argv[1], argv[2], argv[3], argv[4], argv[5],
argv[6], NULL);
- perror("ERROR: Unable to exec imagetops");
return (errno);
}
if ((fd = cupsTempFd(filename, sizeof(filename))) < 0)
{
- perror("ERROR: Unable to copy image file");
+ _cupsLangPrintError("ERROR", _("Unable to copy print file"));
return (1);
}
- fprintf(stderr, "DEBUG: imagetoraster - copying to temp print file \"%s\"\n",
+ fprintf(stderr,
+ "DEBUG: imagetoraster - copying to temp print file \"%s\".\n",
filename);
while ((bytes = fread(buffer, 1, sizeof(buffer), stdin)) > 0)
if (cupsRasterInterpretPPD(&header, ppd, num_options, options, raster_cb))
{
- _cupsLangPuts(stderr, _("ERROR: The page setup information was not valid.\n"));
+ _cupsLangPrintFilter(stderr, "ERROR",
+ _("The page setup information was not valid."));
fprintf(stderr, "DEBUG: %s\n", cupsRasterErrorString());
return (1);
}
case CUPS_CSPACE_DEVICED :
case CUPS_CSPACE_DEVICEE :
case CUPS_CSPACE_DEVICEF :
- fprintf(stderr, "ERROR: Colorspace %d not supported.\n",
+ fprintf(stderr, "DEBUG: Colorspace %d not supported.\n",
header.cupsColorSpace);
exit(1);
break;
* Open the input image to print...
*/
- _cupsLangPuts(stderr, _("INFO: Loading image file...\n"));
+ _cupsLangPrintFilter(stderr, "INFO", _("Loading print file."));
if (header.cupsColorSpace == CUPS_CSPACE_CIEXYZ ||
header.cupsColorSpace == CUPS_CSPACE_CIELab ||
if (img == NULL)
{
- _cupsLangPuts(stderr, _("ERROR: The image file to print could not be opened.\n"));
+ _cupsLangPrintFilter(stderr, "ERROR",
+ _("The print file could not be opened."));
ppdClose(ppd);
return (1);
}
for (xpage = 0; xpage < xpages; xpage ++)
for (ypage = 0; ypage < ypages; ypage ++, page ++)
{
- fprintf(stderr, _("INFO: Formatting page %d...\n"), page);
+ _cupsLangPrintFilter(stderr, "INFO", _("Formatting page %d."), page);
if (Orientation & 1)
{
if (cupsRasterWritePixels(ras, row, header.cupsBytesPerLine) <
header.cupsBytesPerLine)
{
- _cupsLangPuts(stderr,
- _("ERROR: The raster data could not be written "
- "to the driver.\n"));
+ _cupsLangPrintFilter(stderr, "ERROR",
+ _("Unable to send raster data to the "
+ "driver."));
cupsImageClose(img);
exit(1);
}
if (cupsRasterWritePixels(ras, row, header.cupsBytesPerLine) <
header.cupsBytesPerLine)
{
- _cupsLangPuts(stderr,
- _("ERROR: The raster data could not be written to "
- "the driver.\n"));
+ _cupsLangPrintFilter(stderr, "ERROR",
+ _("Unable to send raster data to the "
+ "driver."));
cupsImageClose(img);
exit(1);
}
if (cupsRasterWritePixels(ras, row, header.cupsBytesPerLine) <
header.cupsBytesPerLine)
{
- _cupsLangPuts(stderr,
- _("ERROR: The raster data could not be written "
- "to the driver.\n"));
+ _cupsLangPrintFilter(stderr, "ERROR",
+ _("Unable to send raster data to the "
+ "driver."));
cupsImageClose(img);
exit(1);
}