summaryrefslogtreecommitdiff
path: root/filter/rastertolabel.c
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2009-02-17 19:24:29 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2009-02-17 19:24:29 +0000
commitf0ab5bff8ab3f7b00619675b806b1f01294a3f6a (patch)
tree2c9d51f5a4af79a28e10dc990e323efaddb5c555 /filter/rastertolabel.c
parentbf3816c7edd01247b850a12e52856819190b66fd (diff)
downloadcups-f0ab5bff8ab3f7b00619675b806b1f01294a3f6a.tar.gz
Merge changes from CUPS 1.4svn-r8362.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1228 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'filter/rastertolabel.c')
-rw-r--r--filter/rastertolabel.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/filter/rastertolabel.c b/filter/rastertolabel.c
index bb5be8d2b..0a2bec1cd 100644
--- a/filter/rastertolabel.c
+++ b/filter/rastertolabel.c
@@ -38,6 +38,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
+#include <errno.h>
/*
@@ -1130,8 +1131,9 @@ main(int argc, /* I - Number of command-line arguments */
* and return.
*/
- 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]\n"),
+ "rastertolabel");
return (1);
}
@@ -1143,7 +1145,8 @@ main(int argc, /* I - Number of command-line arguments */
{
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));
sleep(1);
return (1);
}
@@ -1229,8 +1232,8 @@ main(int argc, /* I - Number of command-line arguments */
break;
if ((y & 15) == 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 a line of graphics...
@@ -1276,9 +1279,15 @@ main(int argc, /* I - Number of command-line arguments */
*/
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);
+ }
return (Page == 0);
}