]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - backend/scsi-irix.c
Merge changes from CUPS 1.5svn-r8950.
[thirdparty/cups.git] / backend / scsi-irix.c
index 3b3e43b0d19fbf2663503a1a10d78f6ca6c9a188..f4a60101c0e406782855d725aa875f660b4e03d5 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: scsi-irix.c 6649 2007-07-11 21:46:42Z mike $"
+ * "$Id: scsi-irix.c 6834 2007-08-22 18:29:25Z mike $"
  *
  *   IRIX SCSI printer support for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 2007 by Apple Inc.
+ *   Copyright 2007-2009 by Apple Inc.
  *   Copyright 2003-2005 by Easy Software Products, all rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or
@@ -66,7 +66,8 @@
 void
 list_devices(void)
 {
-  puts("direct scsi \"Unknown\" \"SCSI Printer\"");
+  printf("direct scsi \"Unknown\" \"%s\"\n",
+         _cupsLangString(cupsLangDefault(), _("SCSI Printer")));
 }
 
 
@@ -96,7 +97,8 @@ print_device(const char *resource,    /* I - SCSI device */
 
   if (strncmp(resource, "/dev/scsi/", 10) != 0)
   {
-    fprintf(stderr, _("ERROR: Bad SCSI device file \"%s\"!\n"), resource);
+    _cupsLangPrintf(stderr, _("ERROR: Bad SCSI device file \"%s\"\n"),
+                    resource);
     return (CUPS_BACKEND_STOP);
   }
 
@@ -119,8 +121,9 @@ print_device(const char *resource,  /* I - SCSI device */
        * available printer in the class.
        */
 
-        fputs(_("INFO: Unable to contact printer, queuing on next "
-               "printer in class...\n"), stderr);
+        _cupsLangPuts(stderr,
+                     _("INFO: Unable to contact printer, queuing on next "
+                       "printer in class...\n"));
 
        /*
         * Sleep 5 seconds to keep the job from requeuing too rapidly...
@@ -133,13 +136,15 @@ print_device(const char *resource,        /* I - SCSI device */
 
       if (errno != EAGAIN && errno != EBUSY)
       {
-       fprintf(stderr, _("ERROR: Unable to open device file \"%s\": %s\n"),
-               resource, strerror(errno));
+       _cupsLangPrintf(stderr,
+                       _("ERROR: Unable to open device file \"%s\": %s\n"),
+                       resource, strerror(errno));
        return (CUPS_BACKEND_FAILED);
       }
       else
       {
-        fputs(_("INFO: Printer busy; will retry in 30 seconds...\n"), stderr);
+        _cupsLangPuts(stderr,
+                     _("INFO: Printer busy; will retry in 30 seconds...\n"));
         sleep(30);
       }
     }
@@ -201,9 +206,9 @@ print_device(const char *resource,  /* I - SCSI device */
        if (ioctl(scsi_fd, DS_ENTER, &scsi_req) < 0 ||
             scsi_req.ds_status != 0)
         {
-         fprintf(stderr,
-                 _("WARNING: SCSI command timed out (%d); retrying...\n"),
-                 scsi_req.ds_status);
+         _cupsLangPrintf(stderr,
+                         _("WARNING: SCSI command timed out (%d); "
+                           "retrying...\n"), scsi_req.ds_status);
           sleep(try + 1);
        }
        else
@@ -211,8 +216,8 @@ print_device(const char *resource,  /* I - SCSI device */
 
       if (try >= 10)
       {
-       fprintf(stderr, _("ERROR: Unable to send print data (%d)\n"),
-               scsi_req.ds_status);
+       _cupsLangPrintf(stderr, _("ERROR: Unable to send print data (%d)\n"),
+                       scsi_req.ds_status);
         close(scsi_fd);
        return (CUPS_BACKEND_FAILED);
       }
@@ -232,5 +237,5 @@ print_device(const char *resource,  /* I - SCSI device */
 
 
 /*
- * End of "$Id: scsi-irix.c 6649 2007-07-11 21:46:42Z mike $".
+ * End of "$Id: scsi-irix.c 6834 2007-08-22 18:29:25Z mike $".
  */