]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - filter/rastertoepson.c
Merge changes from CUPS 1.5svn-r9385.
[thirdparty/cups.git] / filter / rastertoepson.c
index f93b9bb33650e3b371d5244c5adfc1b7c564f782..7da6a689975c2ee7d928a5f87113ab0f73911ade 100644 (file)
@@ -981,9 +981,9 @@ main(int  argc,                             /* I - Number of command-line arguments */
     * and return.
     */
 
-    _cupsLangPrintf(stderr,
-                    _("Usage: %s job-id user title copies options [file]\n"),
-                    "rastertoepson");
+    _cupsLangPrintFilter(stderr, "ERROR",
+                         _("%s job-id user title copies options [file]"),
+                         "rastertoepson");
     return (1);
   }
 
@@ -995,8 +995,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);
     }
@@ -1035,7 +1034,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);
 
@@ -1066,6 +1066,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...
@@ -1087,8 +1088,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...
@@ -1108,6 +1114,8 @@ main(int  argc,                           /* I - Number of command-line arguments */
     * Eject the page...
     */
 
+    _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d."), page);
+
     EndPage(&header);
 
     if (Canceled)
@@ -1136,12 +1144,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);
   }
 }