diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2010-11-30 03:16:24 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2010-11-30 03:16:24 +0000 |
commit | 0837b7e828b9fc312fcf8f5741d2ba9683742672 (patch) | |
tree | 1209ad6c3a50b6fc8c2e7fdc4ce05445f17f1d86 /filter/rastertohp.c | |
parent | 1106b00e75e37e7f25a28ee95da560de55520018 (diff) | |
download | cups-0837b7e828b9fc312fcf8f5741d2ba9683742672.tar.gz |
Merge changes from CUPS 1.5svn-r9385.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@2873 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'filter/rastertohp.c')
-rw-r--r-- | filter/rastertohp.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/filter/rastertohp.c b/filter/rastertohp.c index e39194f62..c714fd774 100644 --- a/filter/rastertohp.c +++ b/filter/rastertohp.c @@ -707,9 +707,9 @@ main(int argc, /* I - Number of command-line arguments */ * and return. */ - _cupsLangPrintf(stderr, - _("Usage: %s job-id user title copies options [file]\n"), - "rastertohp"); + _cupsLangPrintFilter(stderr, "ERROR", + _("%s job-id user title copies options [file]"), + "rastertohp"); return (1); } @@ -721,8 +721,7 @@ main(int argc, /* I - Number of command-line arguments */ { 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); } @@ -761,7 +760,8 @@ main(int argc, /* I - Number of command-line arguments */ 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); @@ -790,6 +790,7 @@ main(int argc, /* I - Number of command-line arguments */ Page ++; fprintf(stderr, "PAGE: %d %d\n", Page, header.NumCopies); + _cupsLangPrintFilter(stderr, "INFO", _("Starting page %d."), Page); /* * Start the page... @@ -811,8 +812,13 @@ main(int argc, /* I - Number of command-line arguments */ break; if ((y & 127) == 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... @@ -836,6 +842,8 @@ main(int argc, /* I - Number of command-line arguments */ * Eject the page... */ + _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d."), Page); + EndPage(); if (Canceled) @@ -865,12 +873,12 @@ main(int argc, /* I - Number of command-line arguments */ 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); } } |