diff options
author | jlovell <jlovell@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2007-04-02 15:56:16 +0000 |
---|---|---|
committer | jlovell <jlovell@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2007-04-02 15:56:16 +0000 |
commit | c0e1af835b65e53b4506f37f235c7cdc820dffa8 (patch) | |
tree | 02074fc1df79e914b7a6777ab1e6e9e6da1e79ad /backend/usb-unix.c | |
parent | f42414bf8a43f4c1b464bf1de9d357edba4fd439 (diff) | |
download | cups-c0e1af835b65e53b4506f37f235c7cdc820dffa8.tar.gz |
Load cups into easysw/current.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@303 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'backend/usb-unix.c')
-rw-r--r-- | backend/usb-unix.c | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/backend/usb-unix.c b/backend/usb-unix.c index 5efa30ff9..0f58098bb 100644 --- a/backend/usb-unix.c +++ b/backend/usb-unix.c @@ -1,5 +1,5 @@ /* - * "$Id: usb-unix.c 6293 2007-02-20 13:40:55Z mike $" + * "$Id: usb-unix.c 6422 2007-03-30 20:49:37Z mike $" * * USB port backend for the Common UNIX Printing System (CUPS). * @@ -103,8 +103,8 @@ print_device(const char *uri, /* I - Device URI */ * available printer in the class. */ - fputs("INFO: Unable to open USB device, queuing on next printer in class...\n", - stderr); + fputs(_("INFO: Unable to contact printer, queuing on next " + "printer in class...\n"), stderr); /* * Sleep 5 seconds to keep the job from requeuing too rapidly... @@ -117,19 +117,20 @@ print_device(const char *uri, /* I - Device URI */ if (errno == EBUSY) { - fputs("INFO: USB port busy; will retry in 30 seconds...\n", stderr); - sleep(30); + fputs(_("INFO: Printer busy; will retry in 10 seconds...\n"), stderr); + sleep(10); } else if (errno == ENXIO || errno == EIO || errno == ENOENT || errno == ENODEV) { - fputs("INFO: Printer not connected; will retry in 30 seconds...\n", stderr); + fputs(_("INFO: Printer not connected; will retry in 30 seconds...\n"), + stderr); sleep(30); } else { - fprintf(stderr, "ERROR: Unable to open USB device \"%s\": %s\n", - uri, strerror(errno)); + fprintf(stderr, _("ERROR: Unable to open device file \"%s\": %s\n"), + resource, strerror(errno)); return (CUPS_BACKEND_FAILED); } } @@ -169,8 +170,13 @@ print_device(const char *uri, /* I - Device URI */ tbytes = backendRunLoop(print_fd, device_fd, use_bc, side_cb); if (print_fd != 0 && tbytes >= 0) - fprintf(stderr, "INFO: Sent print file, " CUPS_LLFMT " bytes...\n", - CUPS_LLCAST tbytes); + fprintf(stderr, +#ifdef HAVE_LONG_LONG + _("INFO: Sent print file, %lld bytes...\n"), +#else + _("INFO: Sent print file, %ld bytes...\n"), +#endif /* HAVE_LONG_LONG */ + CUPS_LLCAST tbytes); } /* @@ -382,7 +388,8 @@ open_device(const char *uri, /* I - Device URI */ * Yes, return this file descriptor... */ - fprintf(stderr, "DEBUG: Printer using device file \"%s\"...\n", device); + fprintf(stderr, "DEBUG: Printer using device file \"%s\"...\n", + device); return (fd); } @@ -402,7 +409,7 @@ open_device(const char *uri, /* I - Device URI */ if (busy) { - fputs("INFO: USB printer is busy; will retry in 5 seconds...\n", + fputs(_("INFO: Printer busy; will retry in 5 seconds...\n"), stderr); sleep(5); } @@ -495,7 +502,7 @@ open_device(const char *uri, /* I - Device URI */ if (busy) { - fputs("INFO: USB printer is busy; will retry in 5 seconds...\n", + fputs(_("INFO: Printer is busy; will retry in 5 seconds...\n"), stderr); sleep(5); } @@ -548,7 +555,7 @@ side_cb(int print_fd, /* I - Print file */ if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0)) { - fputs("WARNING: Failed to read side-channel request!\n", stderr); + fputs(_("WARNING: Failed to read side-channel request!\n"), stderr); return; } @@ -595,5 +602,5 @@ side_cb(int print_fd, /* I - Print file */ /* - * End of "$Id: usb-unix.c 6293 2007-02-20 13:40:55Z mike $". + * End of "$Id: usb-unix.c 6422 2007-03-30 20:49:37Z mike $". */ |