*/
#include "driver.h"
+#include <cups/i18n.h>
+#include <cups/string.h>
#include "pcl-common.h"
#include <signal.h>
+#include <errno.h>
/*
if (argc < 6 || argc > 7)
{
- fputs("ERROR: rastertopclx job-id user title copies options [file]\n", stderr);
+ _cupsLangPrintf(stderr,
+ _("ERROR: %s job-id user title copies options [file]\n"),
+ "rastertopclx");
return (1);
}
if (!ppd)
{
- fputs("ERROR: Unable to open PPD file!\n", stderr);
+ _cupsLangPuts(stderr, _("ERROR: Unable to open PPD file!\n"));
return (1);
}
{
if ((fd = open(argv[6], O_RDONLY)) == -1)
{
- perror("ERROR: Unable to open raster file - ");
+ _cupsLangPrintf(stderr, _("ERROR: Unable to open raster file - %s\n"),
+ strerror(errno));
return (1);
}
}
Page ++;
fprintf(stderr, "PAGE: %d %d\n", Page, header.NumCopies);
- fprintf(stderr, "INFO: Starting page %d...\n", Page);
+ _cupsLangPrintf(stderr, _("INFO: Starting page %d...\n"), Page);
StartPage(ppd, &header, atoi(argv[1]), argv[2], argv[3],
num_options, options);
break;
if ((y & 127) == 0)
- fprintf(stderr, "INFO: Printing page %d, %d%% complete...\n", Page,
- 100 * y / header.cupsHeight);
+ _cupsLangPrintf(stderr, _("INFO: Printing page %d, %d%% complete...\n"),
+ Page, 100 * y / header.cupsHeight);
/*
* Read and write a line of graphics or whitespace...
* Eject the page...
*/
- fprintf(stderr, "INFO: Finished page %d...\n", Page);
+ _cupsLangPrintf(stderr, _("INFO: Finished page %d...\n"), Page);
EndPage(ppd, &header);
if (Page == 0)
{
- fputs("ERROR: No pages found!\n", stderr);
+ _cupsLangPuts(stderr, _("ERROR: No pages found!\n"));
return (1);
}
else
{
- fputs("INFO: Ready to print.\n", stderr);
+ _cupsLangPuts(stderr, _("INFO: Ready to print.\n"));
return (0);
}
}