* and return.
*/
- _cupsLangPrintf(stderr,
- _("Usage: %s job-id user title copies options [file]\n"),
- "rastertolabel");
+ _cupsLangPrintFilter(stderr, "ERROR",
+ _("%s job-id user title copies options [file]"),
+ "rastertolabel");
return (1);
}
{
if ((fd = open(argv[6], O_RDONLY)) == -1)
{
- _cupsLangPrintf(stderr, _("ERROR: Unable to open raster file - %s\n"),
- strerror(errno));
+ _cupsLangPrintError("ERROR", _("Unable to open raster file"));
sleep(1);
return (1);
}
ppd_status_t status; /* PPD error */
int linenum; /* Line number */
- _cupsLangPrintf(stderr, _("ERROR: The PPD file could not be opened.\n"));
+ _cupsLangPrintFilter(stderr, "ERROR",
+ _("The PPD file could not be opened."));
status = ppdLastError(&linenum);
Page ++;
fprintf(stderr, "PAGE: %d 1\n", Page);
+ _cupsLangPrintFilter(stderr, "INFO", _("Starting page %d."), Page);
/*
* Start the page...
break;
if ((y & 15) == 0)
- _cupsLangPrintf(stderr, _("INFO: Printing page %d, %d%% complete...\n"),
- Page, 100 * y / header.cupsHeight);
+ {
+ _cupsLangPrintFilter(stderr, "INFO",
+ _("Printing page %d, %d%% complete."),
+ Page, 100 * y / header.cupsHeight);
+ fprintf(stderr, "ATTR: job-media-progress=%d\n",
+ 100 * y / header.cupsHeight);
+ }
/*
* Read a line of graphics...
* Eject the page...
*/
+ _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d."), Page);
+
EndPage(ppd, &header);
if (Canceled)
if (Page == 0)
{
- _cupsLangPuts(stderr, _("ERROR: No pages were found.\n"));
+ _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found."));
return (1);
}
else
{
- _cupsLangPuts(stderr, _("INFO: Ready to print.\n"));
+ _cupsLangPrintFilter(stderr, "INFO", _("Ready to print."));
return (0);
}