]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix compile errors.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Sat, 20 Nov 2010 01:03:46 +0000 (01:03 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Sat, 20 Nov 2010 01:03:46 +0000 (01:03 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@9382 7a7537e8-13f0-0310-91df-b6672ffda945

20 files changed:
backend/socket.c
backend/usb-darwin.c
backend/usb-libusb.c
backend/usb-unix.c
backend/usb.c
configure.in
cups/langprintf.c
cups/language-private.h
driver/rastertoescpx.c
driver/rastertopclx.c
filter/bannertops.c
filter/pstext.c
filter/pstops.c
filter/rastertoepson.c
filter/rastertohp.c
filter/rastertolabel.c
filter/textcommon.c
filter/texttops.c
scheduler/cupsfilter.c
systemv/lpadmin.c

index 1fa8e12b4c12fd39cd3818909b6a9226480afd0f..2ddaed427fde155f19c3d9b5b4760b212cbac404 100644 (file)
@@ -153,8 +153,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
 
     if ((print_fd = open(argv[6], O_RDONLY)) < 0)
     {
-      _cupsLangPrintError(stderr, "ERROR",
-                         _("Unable to open print file"));
+      _cupsLangPrintError("ERROR", _("Unable to open print file"));
       return (CUPS_BACKEND_FAILED);
     }
 
@@ -265,12 +264,12 @@ main(int  argc,                           /* I - Number of command-line arguments (6 or 7) */
   if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
   {
     _cupsLangPrintFilter(stderr, "ERROR",
-                         _("Unable to locate printer \"%s\".\n"), hostname);
+                         _("Unable to locate printer \"%s\"."), hostname);
     return (CUPS_BACKEND_STOP);
   }
 
   fprintf(stderr, "DEBUG: Connecting to %s:%d\n", hostname, port);
-  _cupsLangPrintFilter(stderr, "INFO", _("Connecting to printer.\n"));
+  _cupsLangPrintFilter(stderr, "INFO", _("Connecting to printer."));
 
   for (delay = 5;;)
   {
@@ -290,7 +289,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
 
         _cupsLangPrintFilter(stderr, "INFO",
                             _("Unable to contact printer, queuing on next "
-                              "printer in class.\n"));
+                              "printer in class."));
 
        /*
         * Sleep 5 seconds to keep the job from requeuing too rapidly...
@@ -309,7 +308,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
         if (contimeout && (time(NULL) - start_time) > contimeout)
        {
          _cupsLangPrintFilter(stderr, "ERROR",
-                              _("The printer is not responding.\n"));
+                              _("The printer is not responding."));
          return (CUPS_BACKEND_FAILED);
        }
 
@@ -318,20 +317,20 @@ main(int  argc,                           /* I - Number of command-line arguments (6 or 7) */
          case EHOSTDOWN :
              _cupsLangPrintFilter(stderr, "WARNING",
                                   _("Network printer \"%s\" may not exist or "
-                                    "is unavailable at this time.\n"),
+                                    "is unavailable at this time."),
                                   hostname);
              break;
 
          case EHOSTUNREACH :
              _cupsLangPrintFilter(stderr, "WARNING",
                                   _("Network printer \"%s\" is unreachable at "
-                                    "this time.\n"), hostname);
+                                    "this time."), hostname);
              break;
 
          case ECONNREFUSED :
          default :
              _cupsLangPrintFilter(stderr, "WARNING",
-                                  _("Network printer \"%s\" is busy.\n"),
+                                  _("Network printer \"%s\" is busy."),
                                   hostname);
              break;
         }
@@ -344,7 +343,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
       else
       {
        _cupsLangPrintFilter(stderr, "ERROR",
-                            _("Network printer \"%s\" is not responding.\n"),
+                            _("Network printer \"%s\" is not responding."),
                             hostname);
        sleep(30);
       }
@@ -354,7 +353,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
   }
 
   fputs("STATE: -connecting-to-device\n", stderr);
-  _cupsLangPrintFilter(stderr, "INFO", _("Connected to printer.\n"));
+  _cupsLangPrintFilter(stderr, "INFO", _("Connected to printer."));
 
 #ifdef AF_INET6
   if (addr->addr.addr.sa_family == AF_INET6)
@@ -400,7 +399,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
                             backendNetworkSideCB);
 
     if (print_fd != 0 && tbytes >= 0)
-      _cupsLangPrintFilter(stderr, "INFO", _("Print file sent.\n"));
+      _cupsLangPrintFilter(stderr, "INFO", _("Print file sent."));
   }
 
 #ifdef __APPLE__
@@ -420,7 +419,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
     * Shutdown the socket and wait for the other end to finish...
     */
 
-    _cupsLangPrintFilter(stderr, "INFO", _("Waiting for printer to finish.\n"));
+    _cupsLangPrintFilter(stderr, "INFO", _("Waiting for printer to finish."));
 
     shutdown(device_fd, 1);
 
@@ -452,7 +451,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
     close(print_fd);
 
   if (tbytes >= 0)
-    _cupsLangPrintFilter(stderr, "INFO", _("Ready to print.\n"));
+    _cupsLangPrintFilter(stderr, "INFO", _("Ready to print."));
 
   return (tbytes < 0 ? CUPS_BACKEND_FAILED : CUPS_BACKEND_OK);
 }
index b6dfbd3e8431478c9af38e409ddc571182456ac5..a88d7fee50762f0aba7dac284f5e641ed8db292f 100644 (file)
@@ -374,7 +374,7 @@ print_device(const char *uri,               /* I - Device URI */
   {
     fprintf(stderr, "DEBUG: Fatal USB error.\n");
     _cupsLangPrintFilter(stderr, "ERROR",
-                         _("There was an unrecoverable USB error.\n"));
+                         _("There was an unrecoverable USB error."));
 
     if (!g.make)
       fputs("DEBUG: USB make string is NULL\n", stderr);
@@ -433,7 +433,7 @@ print_device(const char *uri,               /* I - Device URI */
 
       fputs("STATE: +apple-missing-usbclassdriver-error\n", stderr);
       _cupsLangPrintFilter(stderr, "ERROR",
-                          _("There was an unrecoverable USB error.\n"));
+                          _("There was an unrecoverable USB error."));
       fprintf(stderr, "DEBUG: Could not load %s\n", print_buffer);
 
       if (driverBundlePath)
@@ -452,7 +452,7 @@ print_device(const char *uri,               /* I - Device URI */
       if (countdown <= 0)
       {
        _cupsLangPrintFilter(stderr, "INFO",
-                            _("Waiting for printer to become available.\n"));
+                            _("Waiting for printer to become available."));
        fprintf(stderr, "DEBUG: USB printer status: 0x%08x\n", (int)status);
        countdown = SUBSEQUENT_LOG_INTERVAL;    /* subsequent log entries, every 15 seconds */
       }
@@ -500,7 +500,7 @@ print_device(const char *uri,               /* I - Device URI */
     {
       fprintf(stderr, "DEBUG: Fatal USB error.\n");
       _cupsLangPrintFilter(stderr, "ERROR",
-                          _("There was an unrecoverable USB error.\n"));
+                          _("There was an unrecoverable USB error."));
       fputs("DEBUG: Couldn't create side-channel thread\n", stderr);
       registry_close();
       return (CUPS_BACKEND_STOP);
@@ -521,7 +521,7 @@ print_device(const char *uri,               /* I - Device URI */
   {
     fprintf(stderr, "DEBUG: Fatal USB error.\n");
     _cupsLangPrintFilter(stderr, "ERROR",
-                         _("There was an unrecoverable USB error.\n"));
+                         _("There was an unrecoverable USB error."));
     fputs("DEBUG: Couldn't create read thread\n", stderr);
     registry_close();
     return (CUPS_BACKEND_STOP);
@@ -538,7 +538,7 @@ print_device(const char *uri,               /* I - Device URI */
 
   while (status == noErr && copies-- > 0)
   {
-    _cupsLangPrintFilter(stderr, "INFO", _("Sending data to printer.\n"));
+    _cupsLangPrintFilter(stderr, "INFO", _("Sending data to printer."));
 
     if (print_fd != STDIN_FILENO)
     {
@@ -608,7 +608,7 @@ print_device(const char *uri,               /* I - Device URI */
        else if (errno != EAGAIN && errno != EINTR)
        {
          _cupsLangPrintFilter(stderr, "ERROR",
-                              _("Unable to read print data.\n"));
+                              _("Unable to read print data."));
          perror("DEBUG: select");
          registry_close();
           return (CUPS_BACKEND_FAILED);
@@ -652,7 +652,7 @@ print_device(const char *uri,               /* I - Device URI */
          if (errno != EAGAIN && errno != EINTR)
          {
            _cupsLangPrintFilter(stderr, "ERROR",
-                                _("Unable to read print data.\n"));
+                                _("Unable to read print data."));
            perror("DEBUG: read");
            registry_close();
            return (CUPS_BACKEND_FAILED);
@@ -729,7 +729,7 @@ print_device(const char *uri,               /* I - Device URI */
          * Write error - bail if we don't see an error we can retry...
          */
          _cupsLangPrintFilter(stderr, "ERROR",
-                              _("Unable to send data to printer.\n"));
+                              _("Unable to send data to printer."));
          fprintf(stderr, "DEBUG: USB class driver WritePipe returned %x\n",
                  iostatus);
 
@@ -1286,7 +1286,7 @@ static Boolean find_device_cb(void *refcon,
   if (!keepLooking && g.status_timer != NULL)
   {
     fputs("STATE: -offline-report\n", stderr);
-    _cupsLangPrintFilter(stderr, "INFO", _("Printer is now online.\n"));
+    _cupsLangPrintFilter(stderr, "INFO", _("Printer is now online."));
     CFRunLoopRemoveTimer(CFRunLoopGetCurrent(), g.status_timer, kCFRunLoopDefaultMode);
     CFRelease(g.status_timer);
     g.status_timer = NULL;
@@ -1304,7 +1304,7 @@ static void status_timer_cb(CFRunLoopTimerRef timer,
                            void *info)
 {
   fputs("STATE: +offline-report\n", stderr);
-  _cupsLangPrintFilter(stderr, "INFO", _("Printer is offline.\n"));
+  _cupsLangPrintFilter(stderr, "INFO", _("Printer is offline."));
 
   if (getenv("CLASS") != NULL)
   {
@@ -1851,7 +1851,7 @@ static void parse_options(char *options,
        *wait_eof = false;
       else
        _cupsLangPrintFilter(stderr, "WARNING",
-                            _("Boolean expected for waiteof option \"%s\".\n"),
+                            _("Boolean expected for waiteof option \"%s\"."),
                             value);
     }
     else if (!strcasecmp(name, "serial"))
@@ -1990,7 +1990,7 @@ static void run_legacy_backend(int argc,
        perror("DEBUG: Unable to set binary preference to ppc");
 #  endif /* __x86_64__ */
        _cupsLangPrintFilter(stderr, "ERROR",
-                            _("Unable to use legacy USB class driver.\n"));
+                            _("Unable to use legacy USB class driver."));
        exit(CUPS_BACKEND_STOP);
       }
     }
@@ -2014,7 +2014,7 @@ static void run_legacy_backend(int argc,
       fprintf(stderr, "DEBUG: Unable to exec %s: %s\n", usbpath,
               strerror(err));
       _cupsLangPrintFilter(stderr, "ERROR",
-                           _("Unable to use legacy USB class driver.\n"));
+                           _("Unable to use legacy USB class driver."));
       exit(CUPS_BACKEND_STOP);
     }
 
index 1ed03a33b62c2ed0a337928e56cca51e9f993ea2..a8416e66691783e1a7f56e63421fcd471e8fa4a0 100644 (file)
@@ -115,7 +115,7 @@ print_device(const char *uri,               /* I - Device URI */
   while ((printer = find_device(print_cb, uri)) == NULL)
   {
     _cupsLangPrintFilter(stderr, "INFO",
-                        _("Waiting for printer to become available.\n"));
+                        _("Waiting for printer to become available."));
     sleep(5);
   }
 
@@ -176,7 +176,7 @@ print_device(const char *uri,               /* I - Device URI */
                                bytes, 3600000) < 0)
          {
            _cupsLangPrintFilter(stderr, "ERROR",
-                                _("Unable to send data to printer.\n"));
+                                _("Unable to send data to printer."));
            tbytes = -1;
            break;
          }
@@ -777,7 +777,7 @@ side_cb(usb_printer_t *printer,             /* I - Printer */
            {
              _cupsLangPrintFilter(stderr, "ERROR",
                                   _("ERROR: Unable to send data to "
-                                    "printer.\n"));
+                                    "printer."));
              tbytes = -1;
              break;
            }
index d7336fcc30955076e8976ecf45d93aab920e0112..f8068597b2c0d650b1eee221e4f2be4df6f5aa9e 100644 (file)
@@ -115,7 +115,7 @@ print_device(const char *uri,               /* I - Device URI */
 
         _cupsLangPrintFilter(stderr, "INFO",
                             _("Unable to contact printer, queuing on next "
-                              "printer in class.\n"));
+                              "printer in class."));
 
        /*
         * Sleep 5 seconds to keep the job from requeuing too rapidly...
@@ -129,7 +129,7 @@ print_device(const char *uri,               /* I - Device URI */
       if (errno == EBUSY)
       {
         _cupsLangPrintFilter(stderr, "INFO",
-                            _("Printer busy, will retry in 10 seconds.\n"));
+                            _("Printer busy, will retry in 10 seconds."));
        sleep(10);
       }
       else if (errno == ENXIO || errno == EIO || errno == ENOENT ||
@@ -137,7 +137,7 @@ print_device(const char *uri,               /* I - Device URI */
       {
         _cupsLangPrintFilter(stderr, "INFO",
                             _("Printer not connected, will retry in 30 "
-                              "seconds.\n"));
+                              "seconds."));
        sleep(30);
       }
       else
@@ -426,7 +426,7 @@ open_device(const char *uri,                /* I - Device URI */
 
       if (busy)
        _cupsLangPrintFilter(stderr, "INFO",
-                            _("Printer is busy, will retry in 5 seconds.\n"));
+                            _("Printer is busy, will retry in 5 seconds."));
 
       sleep(5);
     }
@@ -510,7 +510,7 @@ open_device(const char *uri,                /* I - Device URI */
       if (busy)
       {
        _cupsLangPrintFilter(stderr, "INFO",
-                            _("Printer is busy, will retry in 5 seconds.\n"));
+                            _("Printer is busy, will retry in 5 seconds."));
        sleep(5);
       }
     }
index e44b1de1ad3568875498baf2668e158238befc13..99392b5e69746131838f992e1005651b53394d43 100644 (file)
@@ -198,7 +198,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
   {
     _cupsLangPrintFilter(stderr, "ERROR",
                         _("No device URI found in argv[0] or in DEVICE_URI "
-                           "environment variable.\n"));
+                           "environment variable."));
     return (1);
   }
 
@@ -234,7 +234,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
 
     if ((print_fd = open(argv[6], O_RDONLY)) < 0)
     {
-      _cupsLangPrintError(stderr, "ERROR", _("Unable to open print file"));
+      _cupsLangPrintError("ERROR", _("Unable to open print file"));
       return (CUPS_BACKEND_FAILED);
     }
 
index 8836bb6a170bce6d1be0859bcc75c548cb0d3c39..560f4f8e326e6a33a42e06e9e18da7dbcc5ee13d 100644 (file)
@@ -56,7 +56,7 @@ if test "x$LANGUAGES" != x; then
                        LANGFILES="$LANGFILES templates/$lang/header.tmpl"
                fi
        done
-elif test "x$CUPS_BUNDLEDIR" != ""
+elif test "x$CUPS_BUNDLEDIR" != ""; then
        INSTALL_LANGUAGES="install-langbundle"
        UNINSTALL_LANGUAGES="uninstall-langbundle"
 fi
index fc8a2c7afbd7d1b6c01a9c9c93859e8e98799b60..c6154f6fd52d10e625f132c45ba7ea6c17d6cb02 100644 (file)
@@ -36,7 +36,8 @@
  */
 
 void
-_cupsLangPrintError(const char *message)/* I - Message */
+_cupsLangPrintError(const char *prefix,        /* I - Non-localized message prefix */
+                    const char *message)/* I - Message */
 {
   int          bytes;                  /* Number of bytes formatted */
   int          last_errno;             /* Last error */
@@ -71,7 +72,7 @@ _cupsLangPrintError(const char *message)/* I - Message */
   * Format the message...
   */
 
-  snprintf(buffer, sizeof(buffer), "%s: %s\n",
+  snprintf(buffer, sizeof(buffer), "%s%s: %s\n", prefix ? prefix : "",
           _cupsLangString(cg->lang_default, message), strerror(last_errno));
 
  /*
@@ -122,7 +123,7 @@ _cupsLangPrintFilter(
   */
 
   va_start(ap, message);
-  snprintf(temp, sizeof(temp), "%s: %s", prefix,
+  snprintf(temp, sizeof(temp), "%s: %s\n", prefix,
           _cupsLangString(cg->lang_default, message));
   vsnprintf(buffer, sizeof(buffer), temp, ap);
   va_end(ap);
index fe499836c9b1bf44e9713aa26cb578733a999915..0c10ca54c7b439f9094d56370f2378c371fa6472 100644 (file)
@@ -58,7 +58,8 @@ extern const char     *_cupsAppleLanguage(const char *locale, char *language,
 #  endif /* __APPLE__ */
 extern void            _cupsCharmapFlush(void);
 extern const char      *_cupsEncodingName(cups_encoding_t encoding);
-extern void            _cupsLangPrintError(const char *message);
+extern void            _cupsLangPrintError(const char *prefix,
+                                           const char *message);
 extern int             _cupsLangPrintFilter(FILE *fp, const char *prefix,
                                             const char *message, ...)
 #  ifdef __GNUC__
index 996d7f0b4a6cef6e55d341e43a815a9a3056bdac..0bcc0a92c0318fd9157328cfc2d7bf2de1113fd7 100644 (file)
@@ -1772,7 +1772,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
   if (argc < 6 || argc > 7)
   {
     _cupsLangPrintFilter(stderr, "ERROR",
-                         _("%s job-id user title copies options [file]\n"),
+                         _("%s job-id user title copies options [file]"),
                         "rastertoescpx");
     return (1);
   }
@@ -1791,7 +1791,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
     int                        linenum;        /* Line number */
 
     _cupsLangPrintFilter(stderr, "ERROR",
-                         _("The PPD file could not be opened.\n"));
+                         _("The PPD file could not be opened."));
 
     status = ppdLastError(&linenum);
 
@@ -1811,7 +1811,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
   {
     if ((fd = open(argv[6], O_RDONLY)) == -1)
     {
-      _cupsLangPrintError(stderr, "ERROR", _("Unable to open raster file"));
+      _cupsLangPrintError("ERROR", _("Unable to open raster file"));
       return (1);
     }
   }
@@ -1863,7 +1863,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
     page ++;
 
     fprintf(stderr, "PAGE: %d 1\n", page);
-    _cupsLangPrintFilter(stderr, "INFO", _("Starting page %d.\n"), Page);
+    _cupsLangPrintFilter(stderr, "INFO", _("Starting page %d."), page);
 
     StartPage(ppd, &header);
 
@@ -1879,8 +1879,8 @@ main(int  argc,                           /* I - Number of command-line arguments */
       if ((y & 127) == 0)
       {
         _cupsLangPrintFilter(stderr, "INFO",
-                            _("Printing page %d, %d%% complete.\n"),
-                            Page, 100 * y / header.cupsHeight);
+                            _("Printing page %d, %d%% complete."),
+                            page, 100 * y / header.cupsHeight);
         fprintf(stderr, "ATTR: job-media-progress=%d\n",
                100 * y / header.cupsHeight);
       }
@@ -1896,7 +1896,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
     * Eject the page...
     */
 
-    _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d.\n"), Page);
+    _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d."), page);
 
     EndPage(ppd, &header);
 
@@ -1913,14 +1913,14 @@ main(int  argc,                         /* I - Number of command-line arguments */
   if (fd != 0)
     close(fd);
 
-  if (Page == 0)
+  if (page == 0)
   {
-    _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found.\n"));
+    _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found."));
     return (1);
   }
   else
   {
-    _cupsLangPrintFilter(stderr, "INFO", _("Ready to print.\n"));
+    _cupsLangPrintFilter(stderr, "INFO", _("Ready to print."));
     return (0);
   }
 }
index ef38adb9b6c9d56dfcc6e07b4d7176fd303b84d8..42f00822084c2d8e95330ef6ad7203ea1d71bf80 100644 (file)
@@ -1797,7 +1797,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
   if (argc < 6 || argc > 7)
   {
     _cupsLangPrintFilter(stderr, "ERROR",
-                         _("%s job-id user title copies options [file]\n"),
+                         _("%s job-id user title copies options [file]"),
                          "rastertopclx");
     return (1);
   }
@@ -1816,7 +1816,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
     int                        linenum;        /* Line number */
 
     _cupsLangPrintFilter(stderr, "ERROR",
-                         _("The PPD file could not be opened.\n"));
+                         _("The PPD file could not be opened."));
 
     status = ppdLastError(&linenum);
 
@@ -1836,7 +1836,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
   {
     if ((fd = open(argv[6], O_RDONLY)) == -1)
     {
-      _cupsLangPrintError(stderr, "ERROR", _("Unable to open raster file"));
+      _cupsLangPrintError("ERROR", _("Unable to open raster file"));
       return (1);
     }
   }
@@ -1884,7 +1884,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.\n"), Page);
+    _cupsLangPrintFilter(stderr, "INFO", _("Starting page %d."), Page);
 
     StartPage(ppd, &header, atoi(argv[1]), argv[2], argv[3],
               num_options, options);
@@ -1901,7 +1901,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
       if ((y & 127) == 0)
       {
         _cupsLangPrintFilter(stderr, "INFO",
-                            _("Printing page %d, %d%% complete.\n"),
+                            _("Printing page %d, %d%% complete."),
                             Page, 100 * y / header.cupsHeight);
         fprintf(stderr, "ATTR: job-media-progress=%d\n",
                100 * y / header.cupsHeight);
@@ -1921,7 +1921,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
     * Eject the page...
     */
 
-    _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d.\n"), Page);
+    _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d."), Page);
 
     EndPage(ppd, &header);
 
@@ -1940,12 +1940,12 @@ main(int  argc,                         /* I - Number of command-line arguments */
 
   if (Page == 0)
   {
-    _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found.\n"));
+    _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found."));
     return (1);
   }
   else
   {
-    _cupsLangPrintFilter(stderr, "INFO", _("Ready to print.\n"));
+    _cupsLangPrintFilter(stderr, "INFO", _("Ready to print."));
     return (0);
   }
 }
index 2901b9d2d4dfc50ca1904c20f1979d982a692cea..237ca3c7fdba29fa7c43baac2e00c643166d7681 100644 (file)
@@ -217,7 +217,7 @@ load_banner(const char *filename)   /* I - Filename or NULL for stdin */
     if (!*ptr)
     {
       _cupsLangPrintFilter(stderr, "ERROR",
-                           _("Missing value on line %d of banner file.\n"),
+                           _("Missing value on line %d of banner file."),
                           linenum);
       continue;
     }
index d369a327af44ee969baba09427444bdf16b3771b..7d11885ce2c7cc5a76a3cf3d602e3ec3ad689cfd 100644 (file)
@@ -271,7 +271,7 @@ psTextInitialize(void)
     */
 
     fclose(fp);
-    _cupsLangPrintFilter(stderr, "ERROR", _("Bad charset file \"%s\".\n"),
+    _cupsLangPrintFilter(stderr, "ERROR", _("Bad charset file \"%s\"."),
                          filename);
     exit(1);
   }
@@ -317,7 +317,7 @@ psTextInitialize(void)
       */
 
       _cupsLangPrintFilter(stderr, "ERROR",
-                           _("Bad font description line \"%s\".\n"), valptr);
+                           _("Bad font description line \"%s\"."), valptr);
       fclose(fp);
       exit(1);
     }
@@ -330,7 +330,7 @@ psTextInitialize(void)
       fonts->directions[fonts->num_fonts] = -1;
     else
     {
-      _cupsLangPrintFilter(stderr, "ERROR", _("Bad text direction \"%s\".\n"),
+      _cupsLangPrintFilter(stderr, "ERROR", _("Bad text direction \"%s\"."),
                            valptr);
       fclose(fp);
       exit(1);
@@ -355,7 +355,7 @@ psTextInitialize(void)
       */
 
       _cupsLangPrintFilter(stderr, "ERROR",
-                           _("Bad font description line \"%s\".\n"), valptr);
+                           _("Bad font description line \"%s\"."), valptr);
       fclose(fp);
       exit(1);
     }
@@ -368,7 +368,7 @@ psTextInitialize(void)
       fonts->widths[fonts->num_fonts] = 2;
     else 
     {
-      _cupsLangPrintFilter(stderr, "ERROR", _("Bad text width \"%s\".\n"),
+      _cupsLangPrintFilter(stderr, "ERROR", _("Bad text width \"%s\"."),
                            valptr);
       fclose(fp);
       exit(1);
@@ -431,7 +431,7 @@ psTextInitialize(void)
 
   if (cupsArrayCount(fonts->unique) == 0)
   {
-    _cupsLangPrintFilter(stderr, "ERROR", _("No fonts in charset file.\n"));
+    _cupsLangPrintFilter(stderr, "ERROR", _("No fonts in charset file."));
     exit(1);
   }
 
index c2377135724aa83858ceb29444ea4b04b5dd891e..1f4acbcf12a6d0f796ab3a6d7e25e2a3b41c3216 100644 (file)
@@ -296,7 +296,7 @@ main(int  argc,                             /* I - Number of command-line args */
 
     if ((fp = cupsFileOpen(argv[6], "r")) == NULL)
     {
-      _cupsLangPrintError(stderr, "ERROR", _("Unable to open print file"));
+      _cupsLangPrintError("ERROR", _("Unable to open print file"));
       return (1);
     }
   }
@@ -441,15 +441,13 @@ add_page(pstops_doc_t *doc,               /* I - Document information */
 
   if (!doc->pages)
   {
-    _cupsLangPrintError(stderr, "EMERG",
-                        _("Unable to allocate memory for pages array"));
+    _cupsLangPrintError("EMERG", _("Unable to allocate memory for pages array"));
     exit(1);
   }
 
   if ((pageinfo = calloc(1, sizeof(pstops_page_t))) == NULL)
   {
-    _cupsLangPrintError(stderr, "EMERG",
-                        _("Unable to allocate memory for page info"));
+    _cupsLangPrintError("EMERG", _("Unable to allocate memory for page info"));
     exit(1);
   }
 
@@ -561,7 +559,7 @@ copy_bytes(cups_file_t *fp,         /* I - File to read from */
 
   if (cupsFileSeek(fp, offset) < 0)
   {
-    _cupsLangPrintError(stderr, "ERROR", _("Unable to see in file"));
+    _cupsLangPrintError("ERROR", _("Unable to see in file"));
     return;
   }
 
@@ -2106,7 +2104,7 @@ doc_printf(pstops_doc_t *doc,             /* I - Document information */
   if (bytes > sizeof(buffer))
   {
     _cupsLangPrintFilter(stderr, "ERROR",
-                         _("Buffer overflow detected, aborting.\n"));
+                         _("Buffer overflow detected, aborting."));
     exit(1);
   }
 
@@ -2245,7 +2243,7 @@ include_feature(
 
   if ((option = ppdFindOption(ppd, name + 1)) == NULL)
   {
-    _cupsLangPrintFilter(stderr, "WARNING", _("Unknown option \"%s\".\n"),
+    _cupsLangPrintFilter(stderr, "WARNING", _("Unknown option \"%s\"."),
                          name + 1);
     return (num_options);
   }
@@ -2255,14 +2253,14 @@ include_feature(
   {
     _cupsLangPrintFilter(stderr, "WARNING",
                          _("Option \"%s\" cannot be included via "
-                          "%%%%IncludeFeature.\n"), name + 1);
+                          "%%%%IncludeFeature."), name + 1);
     return (num_options);
   }
 
   if (!ppdFindChoice(option, value))
   {
     _cupsLangPrintFilter(stderr, "WARNING",
-                        _("Unknown choice \"%s\" for option \"%s\".\n"),
+                        _("Unknown choice \"%s\" for option \"%s\"."),
                         value, name + 1);
     return (num_options);
   }
@@ -2454,7 +2452,7 @@ set_pstops_options(
     {
       _cupsLangPrintFilter(stderr, "ERROR",
                            _("Unsupported brightness value %s, using "
-                            "brightness=100.\n"), val);
+                            "brightness=100."), val);
       doc->brightness = 1.0f;
     }
     else
@@ -2535,7 +2533,7 @@ set_pstops_options(
     if (intval < 1 || intval > 10000)
     {
       _cupsLangPrintFilter(stderr, "ERROR",
-                           _("Unsupported gamma value %s, using gamma=1000.\n"),
+                           _("Unsupported gamma value %s, using gamma=1000."),
                           val);
       doc->gamma = 1.0f;
     }
@@ -2580,7 +2578,7 @@ set_pstops_options(
       default :
           _cupsLangPrintFilter(stderr, "ERROR",
                               _("Unsupported number-up value %d, using "
-                                "number-up=1.\n"), intval);
+                                "number-up=1."), intval);
           doc->number_up = 1;
          break;
     }
@@ -2614,7 +2612,7 @@ set_pstops_options(
     {
       _cupsLangPrintFilter(stderr, "ERROR",
                            _("Unsupported number-up-layout value %s, using "
-                            "number-up-layout=lrtb.\n"), val);
+                            "number-up-layout=lrtb."), val);
       doc->number_up_layout = PSTOPS_LAYOUT_LRTB;
     }
   }
@@ -2665,7 +2663,7 @@ set_pstops_options(
     {
       _cupsLangPrintFilter(stderr, "ERROR",
                            _("Unsupported page-border value %s, using "
-                            "page-border=none.\n"), val);
+                            "page-border=none."), val);
       doc->page_border = PSTOPS_BORDERNONE;
     }
   }
index acc42435e96ac128b8ddcdfba7d0ecb995a97e64..c35c0ee95b5eeaad98c2d330b01ebc8de562011e 100644 (file)
@@ -995,7 +995,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
   {
     if ((fd = open(argv[6], O_RDONLY)) == -1)
     {
-      _cupsLangPrintError(stderr, "ERROR", _("Unable to open raster file"));
+      _cupsLangPrintError("ERROR", _("Unable to open raster file"));
       sleep(1);
       return (1);
     }
@@ -1035,7 +1035,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
     int                        linenum;        /* Line number */
 
     _cupsLangPrintFilter(stderr, "ERROR",
-                         _("The PPD file could not be opened.\n"));
+                         _("The PPD file could not be opened."));
 
     status = ppdLastError(&linenum);
 
@@ -1066,7 +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.\n"), Page);
+    _cupsLangPrintFilter(stderr, "INFO", _("Starting page %d."), page);
 
    /*
     * Start the page...
@@ -1090,8 +1090,8 @@ main(int  argc,                           /* I - Number of command-line arguments */
       if ((y & 127) == 0)
       {
         _cupsLangPrintFilter(stderr, "INFO",
-                            _("Printing page %d, %d%% complete.\n"),
-                            Page, 100 * y / header.cupsHeight);
+                            _("Printing page %d, %d%% complete."),
+                            page, 100 * y / header.cupsHeight);
         fprintf(stderr, "ATTR: job-media-progress=%d\n",
                100 * y / header.cupsHeight);
       }
@@ -1114,7 +1114,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
     * Eject the page...
     */
 
-    _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d.\n"), Page);
+    _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d."), page);
 
     EndPage(&header);
 
@@ -1142,14 +1142,14 @@ main(int  argc,                         /* I - Number of command-line arguments */
   * If no pages were printed, send an error message...
   */
 
-  if (Page == 0)
+  if (page == 0)
   {
-    _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found.\n"));
+    _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found."));
     return (1);
   }
   else
   {
-    _cupsLangPrintFilter(stderr, "INFO", _("Ready to print.\n"));
+    _cupsLangPrintFilter(stderr, "INFO", _("Ready to print."));
     return (0);
   }
 }
index 97a736a2ff4a3a52fd3b1b14bc7cb2bf72dbc075..1a6123d9f57ed3eb375f87564ddbf2e0a7ee82de 100644 (file)
@@ -708,7 +708,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
     */
 
     _cupsLangPrintFilter(stderr, "ERROR",
-                         _("%s job-id user title copies options [file]\n"),
+                         _("%s job-id user title copies options [file]"),
                         "rastertohp");
     return (1);
   }
@@ -721,7 +721,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
   {
     if ((fd = open(argv[6], O_RDONLY)) == -1)
     {
-      _cupsLangPrintError(stderr, "ERROR", _("Unable to open raster file"));
+      _cupsLangPrintError("ERROR", _("Unable to open raster file"));
       sleep(1);
       return (1);
     }
@@ -761,7 +761,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
     int                        linenum;        /* Line number */
 
     _cupsLangPrintFilter(stderr, "ERROR",
-                         _("The PPD file could not be opened.\n"));
+                         _("The PPD file could not be opened."));
 
     status = ppdLastError(&linenum);
 
@@ -814,7 +814,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
       if ((y & 127) == 0)
       {
         _cupsLangPrintFilter(stderr, "INFO",
-                            _("Printing page %d, %d%% complete.\n"),
+                            _("Printing page %d, %d%% complete."),
                             Page, 100 * y / header.cupsHeight);
         fprintf(stderr, "ATTR: job-media-progress=%d\n",
                100 * y / header.cupsHeight);
@@ -842,7 +842,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
     * Eject the page...
     */
 
-    _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d.\n"), Page);
+    _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d."), Page);
 
     EndPage();
 
@@ -873,12 +873,12 @@ main(int  argc,                           /* I - Number of command-line arguments */
 
   if (Page == 0)
   {
-    _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found.\n"));
+    _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found."));
     return (1);
   }
   else
   {
-    _cupsLangPrintFilter(stderr, "INFO", _("Ready to print.\n"));
+    _cupsLangPrintFilter(stderr, "INFO", _("Ready to print."));
     return (0);
   }
 }
index 5ea5ccee0220947e6cc99f9d8f2748ca0d303cd2..10cde07ad3b82f7e73b53d14cf2feae098dedab6 100644 (file)
@@ -1144,7 +1144,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
   {
     if ((fd = open(argv[6], O_RDONLY)) == -1)
     {
-      _cupsLangPrintError(stderr, "ERROR", _("Unable to open raster file"));
+      _cupsLangPrintError("ERROR", _("Unable to open raster file"));
       sleep(1);
       return (1);
     }
@@ -1186,7 +1186,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
     int                        linenum;        /* Line number */
 
     _cupsLangPrintFilter(stderr, "ERROR",
-                         _("The PPD file could not be opened.\n"));
+                         _("The PPD file could not be opened."));
 
     status = ppdLastError(&linenum);
 
@@ -1222,7 +1222,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
     Page ++;
 
     fprintf(stderr, "PAGE: %d 1\n", Page);
-    _cupsLangPrintFilter(stderr, "INFO", _("Starting page %d.\n"), Page);
+    _cupsLangPrintFilter(stderr, "INFO", _("Starting page %d."), Page);
 
    /*
     * Start the page...
@@ -1246,7 +1246,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
       if ((y & 15) == 0)
       {
         _cupsLangPrintFilter(stderr, "INFO",
-                            _("Printing page %d, %d%% complete.\n"),
+                            _("Printing page %d, %d%% complete."),
                             Page, 100 * y / header.cupsHeight);
         fprintf(stderr, "ATTR: job-media-progress=%d\n",
                100 * y / header.cupsHeight);
@@ -1270,7 +1270,7 @@ main(int  argc,                           /* I - Number of command-line arguments */
     * Eject the page...
     */
 
-    _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d.\n"), Page);
+    _cupsLangPrintFilter(stderr, "INFO", _("Finished page %d."), Page);
 
     EndPage(ppd, &header);
 
@@ -1299,12 +1299,12 @@ main(int  argc,                         /* I - Number of command-line arguments */
 
   if (Page == 0)
   {
-    _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found.\n"));
+    _cupsLangPrintFilter(stderr, "ERROR", _("No pages were found."));
     return (1);
   }
   else
   {
-    _cupsLangPrintFilter(stderr, "INFO", _("Ready to print.\n"));
+    _cupsLangPrintFilter(stderr, "INFO", _("Ready to print."));
     return (0);
   }
 
index 0c620938d968b971b42d3b65a9e794f176178de9..f4ab36db26b45030753ed5b800b332f24f91aafc 100644 (file)
@@ -610,7 +610,7 @@ TextMain(const char *name,  /* I - Name of filter */
 
     if (PageColumns < 1)
     {
-      _cupsLangPrintFilter(stderr, "ERROR", _("Bad columns value %d.\n"),
+      _cupsLangPrintFilter(stderr, "ERROR", _("Bad columns value %d."),
                            PageColumns);
       return (1);
     }
@@ -622,7 +622,7 @@ TextMain(const char *name,  /* I - Name of filter */
 
     if (CharsPerInch <= 0.0)
     {
-      _cupsLangPrintFilter(stderr, "ERROR", _("Bad cpi value %f.\n"),
+      _cupsLangPrintFilter(stderr, "ERROR", _("Bad cpi value %f."),
                            CharsPerInch);
       return (1);
     }
@@ -634,7 +634,7 @@ TextMain(const char *name,  /* I - Name of filter */
 
     if (LinesPerInch <= 0.0)
     {
-      _cupsLangPrintFilter(stderr, "ERROR", _("Bad lpi value %f.\n"),
+      _cupsLangPrintFilter(stderr, "ERROR", _("Bad lpi value %f."),
                            LinesPerInch);
       return (1);
     }
index 970964e418c1fc8fceb1a414cdde0f0deba801e4..069d1b39967693958ddbf4924c0aa210b4ba88dd 100644 (file)
@@ -177,7 +177,7 @@ WriteProlog(const char *title,              /* I - Title of job */
       SizeLines <= 0 || SizeLines > 32767)
   {
     _cupsLangPrintFilter(stderr, "ERROR",
-                         _("Unable to print %dx%d text page.\n"),
+                         _("Unable to print %dx%d text page."),
                          SizeColumns, SizeLines);
     exit(1);
   }
@@ -185,7 +185,7 @@ WriteProlog(const char *title,              /* I - Title of job */
   if ((Page = calloc(sizeof(lchar_t *), SizeLines)) == NULL)
   {
     _cupsLangPrintFilter(stderr, "ERROR",
-                         _("Unable to print %dx%d text page.\n"),
+                         _("Unable to print %dx%d text page."),
                          SizeColumns, SizeLines);
     exit(1);
   }
@@ -193,7 +193,7 @@ WriteProlog(const char *title,              /* I - Title of job */
   if ((Page[0] = calloc(sizeof(lchar_t), SizeColumns * SizeLines)) == NULL)
   {
     _cupsLangPrintFilter(stderr, "ERROR",
-                         _("Unable to print %dx%d text page.\n"),
+                         _("Unable to print %dx%d text page."),
                          SizeColumns, SizeLines);
     exit(1);
   }
@@ -213,7 +213,7 @@ WriteProlog(const char *title,              /* I - Title of job */
   if (ColumnWidth <= 0)
   {
     _cupsLangPrintFilter(stderr, "ERROR",
-                         _("Unable to print %d text columns.\n"), PageColumns);
+                         _("Unable to print %d text columns."), PageColumns);
     exit(1);
   }
 
index 1440828c016cbaae10d8061da57323395ac26eda..46f7f2e42ec5334ddc0c754742ba5e2b62f443c1 100644 (file)
@@ -1157,7 +1157,7 @@ get_job_file(const char *job)             /* I - Job ID */
 
   if ((tempfd = cupsTempFd(TempFile, sizeof(TempFile))) == -1)
   {
-    _cupsLangPrintError(_("ERROR: Unable to create temporary file"));
+    _cupsLangPrintError("ERROR", _("Unable to create temporary file"));
     httpClose(http);
     exit(1);
   }
index 8a95d2415f424dcc15ec030e1af516f4e2201b03..a445f269a00a2c2eaa71953fadac82f12bddaeb8 100644 (file)
@@ -1235,7 +1235,7 @@ set_printer_options(
 
     if ((out = cupsTempFile2(tempfile, sizeof(tempfile))) < 0)
     {
-      _cupsLangPrintError(_("ERROR: Unable to create temporary file"));
+      _cupsLangPrintError(NULL, _("lpadmin: Unable to create temporary file"));
       ippDelete(request);
       if (ppdfile != file)
         unlink(ppdfile);