/*
- * "$Id: usb-unix.c 6649 2007-07-11 21:46:42Z mike $"
+ * "$Id: usb-unix.c 6911 2007-09-04 20:35:08Z mike $"
*
* USB port backend for the Common UNIX Printing System (CUPS).
*
print_device(const char *uri, /* I - Device URI */
const char *hostname, /* I - Hostname/manufacturer */
const char *resource, /* I - Resource/modelname */
- const char *options, /* I - Device options/serial number */
+ char *options, /* I - Device options/serial number */
int print_fd, /* I - File descriptor to print */
int copies, /* I - Copies to print */
int argc, /* I - Number of command-line arguments (6 or 7) */
* 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...
if (errno == EBUSY)
{
- fputs(_("INFO: Printer busy; will retry in 10 seconds...\n"), stderr);
+ _cupsLangPuts(stderr,
+ _("INFO: Printer busy; will retry in 10 seconds...\n"));
sleep(10);
}
else if (errno == ENXIO || errno == EIO || errno == ENOENT ||
errno == ENODEV)
{
- fputs(_("INFO: Printer not connected; will retry in 30 seconds...\n"),
- stderr);
+ _cupsLangPuts(stderr,
+ _("INFO: Printer not connected; will retry in 30 "
+ "seconds...\n"));
sleep(30);
}
else
{
- 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);
}
}
tbytes = backendRunLoop(print_fd, device_fd, use_bc, side_cb);
if (print_fd != 0 && tbytes >= 0)
- fprintf(stderr,
+ _cupsLangPrintf(stderr,
#ifdef HAVE_LONG_LONG
- _("INFO: Sent print file, %lld bytes...\n"),
+ _("INFO: Sent print file, %lld bytes...\n"),
#else
- _("INFO: Sent print file, %ld bytes...\n"),
+ _("INFO: Sent print file, %ld bytes...\n"),
#endif /* HAVE_LONG_LONG */
- CUPS_LLCAST tbytes);
+ CUPS_LLCAST tbytes);
}
/*
if (busy)
{
- fputs(_("INFO: Printer busy; will retry in 5 seconds...\n"),
- stderr);
+ _cupsLangPuts(stderr,
+ _("INFO: Printer busy; will retry in 5 seconds...\n"));
sleep(5);
}
}
if (busy)
{
- fputs(_("INFO: Printer is busy; will retry in 5 seconds...\n"),
- stderr);
+ _cupsLangPuts(stderr,
+ _("INFO: Printer is busy; will retry in 5 seconds...\n"));
sleep(5);
}
}
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
{
- fputs(_("WARNING: Failed to read side-channel request!\n"), stderr);
+ _cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
return;
}
/*
- * End of "$Id: usb-unix.c 6649 2007-07-11 21:46:42Z mike $".
+ * End of "$Id: usb-unix.c 6911 2007-09-04 20:35:08Z mike $".
*/