Comparar commits

..

1 Commits

Autor SHA1 Mensagem Data
msweet a74847a90d Import cups.org releases
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/tags/release-1.3rc2@4306 a1ca3aef-8c08-0410-bb20-df032aa958be
2013-05-10 18:56:23 +00:00
182 arquivos alterados com 32002 adições e 16104 exclusões
+1 -96
Ver Arquivo
@@ -1,101 +1,6 @@
CHANGES.txt - 2007-09-18
CHANGES.txt - 2007-07-30
------------------------
CHANGES IN CUPS V1.3.2
- The 1.3.1 release was incorrectly created from the
1.4.x source tree (STR #2519)
- Added support for 32/64-bit libraries on HP-UX
(STR #2520)
- The scheduler incorrectly used portrait as the default
orientation (STR #2513)
- The scheduler no longer writes the printcap file for
every remote printer update (STR #2512)
- Remote raw printing with multiple copies did not work
(STR #2518)
- Updated the configure script to require at least autoconf
2.60 (STR #2515)
- Some gzip'd PPD files were not read in their entirety
(STR #2510)
CHANGES IN CUPS V1.3.1
- Documentation updates.
- The USB backend on Mac OS X could hang if the driver and
printer did not match.
- Delegated Kerberos credentials were not working.
- "make distclean" incorrectly removed the edit-config.tmpl
files (STR #2508)
- Fix compile problem on HP-UX (STR #2501)
- The cupstestppd utility now tests for resolutions greater
than 99999 DPI to detect a missing "x" between the X and Y
resolutions.
- Fixed many problems in the various translations and added
a new "checkpo" utility to validate them.
- The cupstestppd utility now tests the custom page size code
for CUPS raster drivers.
- cupsLangDefault() did not attempt to return a language that
was supported by the calling application.
- If a remote printer stopped while a job was being sent, the
local queue would also get stopped and the job re-queued,
resulting in duplicate prints in some cases.
- A few Apple-specific job options needed to be omitted when
printing a banner page.
- The new peer credential support did not compile on FreeBSD
(STR #2495)
- Direct links to help files did not set the current section
so the table-of-contents was not shown.
- The configure script did not support --localedir=foo (STR #2488)
- The backends were not displaying their localized messages.
- CUPS-Authenticate-Job did not require Kerberos authentication
on queues protected by Kerberos.
- The Zebra ZPL driver did not work with Brady label printers
(STR #2487)
- Norwegian wasn't localized on Mac OS X.
- getnameinfo() returns an error on some systems when DNS is
not available, leading to numerous problems (STR #2486)
- The cupsfilter command did not work properly on Mac OS X.
- The scheduler makefile contained a typo (STR #2483)
- The TBCP and BCP port monitors did not handle the trailing
CTRL-D in some PostScript output properly.
- Fixed the localization instructions and German template for
the "Find New Printers" button (STR #2478)
- The web interface did not work with the Chinese localization
(STR #2477)
- The web interface home page did not work for languages that
were only partially localized (STR #2472)
- Updated the Spanish web interface localization (STR #2473)
- ppdLocalize() did not work for country-specific localizations.
CHANGES IN CUPS V1.3.0
- The scheduler did not handle out-of-file conditions
gracefully when accepting new connections, leading to
heavy CPU usage.
- The scheduler did not detect ServerBin misconfigurations
(STR #2470)
- "AuthType Default" did not work as expected when the
"DefaultAuthType foo" line appeared after it in the
cupsd.conf file.
- The on-line help did not describe many common printing
options (STR #1846)
- The IPP backend did not return the "auth required" status
when printing to a Kerberos-protected queue.
- The scheduler was not looking in the correct directories
for LSB PPD files (STR #2464)
- Changed references to ESP Ghostscript to GPL Ghostscript
(STR #2463)
- The PostScript filter did not cleanly terminate when
the job was canceled or stopped.
- Fixed generation of Kerberos credentials for remote
printing. Note that this requires a recent version of
MIT Kerberos with a working krb5_cc_new_unique()
function or Heimdal Kerberos.
- Added Portuguese and updated Italian message catalogs.
CHANGES IN CUPS V1.3rc2
- Added more range checking to the pdftops filter.
+2 -3
Ver Arquivo
@@ -1,4 +1,4 @@
CREDITS.txt - 2007-09-10
CREDITS.txt - 2007-02-05
------------------------
Few projects are completed by one person, and CUPS is no exception. We'd
@@ -19,7 +19,6 @@ like to thank the following individuals for their contributions:
Till Kamppeter - Bug fixes, beta testing, evangelism.
Kenshi Muto - Japanese localization, patches, and
testing.
Tomohiro Kato - Japanese localization.
Kiko - Bug fixes.
Sergey V. Kovalyov - ESP Print Pro and CUPS beta tester.
Marek Laane - Estonian translation.
@@ -37,7 +36,7 @@ like to thank the following individuals for their contributions:
Opher Shachar - Hebrew localization.
Stuart Stevens - HP JetDirect IPP information.
Andrea Suatoni - IRIX desktop integration and testing.
Teppo Turlianen - Finnish localization.
Tomohiro Kato - Japanese localization.
Tim Waugh - Lots of patches, testing, and Linux
integration.
Yugami - LDAP browsing support.
+7 -15
Ver Arquivo
@@ -1,15 +1,13 @@
INSTALL - CUPS v1.3.2 - 2007-09-18
----------------------------------
INSTALL - CUPS v1.3rc2 - 2007-07-30
-----------------------------------
This file describes how to compile and install CUPS from source
code. For more information on CUPS see the file called
"README.txt". A complete change log can be found in
"CHANGES.txt".
**** IF YOU HAVE A NON-POSTSCRIPT PRINTER AND ARE NOT ****
**** RUNNING MAC OS X, YOU WILL ALSO NEED TO INSTALL GPL ****
**** GHOSTSCRIPT WITH THE "cups" DRIVER AFTER YOU INSTALL ****
**** CUPS. ****
**** IF YOU HAVE A NON-POSTSCRIPT PRINTER, YOU WILL ALSO ****
**** NEED TO INSTALL ESP GHOSTSCRIPT AFTER YOU INSTALL CUPS ****
BEFORE YOU BEGIN
@@ -22,7 +20,7 @@ BEFORE YOU BEGIN
The makefiles used by the project should work with all
versions of make. We've tested them with GNU make as well as
the make programs shipped by Compaq, HP, SGI, and Sun.
BSD users should use GNU make (gmake).
FreeBSD users should use GNU make (gmake).
Besides these tools you'll want the JPEG, PNG, TIFF, and ZLIB
libraries for image support, the CDSA, GNU TLS, or OpenSSL
@@ -31,16 +29,10 @@ BEFORE YOU BEGIN
compile and run without these, however you'll miss out on
many of the features provided by CUPS.
Kerberos support requires a very recent version of the MIT
implementation with the krb5_cc_new_unique() function or the
Heimdal implementation, along with the corresponding GSSAPI
pieces.
Also, please note that CUPS no longer includes the
Ghostscript- based pstoraster filter. You *must* download
GPL Ghostscript separately from the CUPS web site if you want
to print PostScript files to non-PostScript printers on
operating systems other than Mac OS X.
ESP Ghostscript separately from the CUPS web site if you want
to print PostScript files to non-PostScript printers.
COMPILING FROM SUBVERSION
+2 -1
Ver Arquivo
@@ -63,8 +63,9 @@ distclean: clean
$(RM) man/cups-lpd.man man/cupsaddsmb.man man/cupsd.man
$(RM) man/cupsd.conf.man man/lpoptions.man
$(RM) packaging/cups.list
$(RM) templates/header.tmpl
$(RM) templates/edit-config.tmpl templates/header.tmpl
-$(RM) doc/*/index.html
-$(RM) templates/*/edit-config.tmpl
-$(RM) templates/*/header.tmpl
-$(RM) -r autom4te*.cache
+8 -7
Ver Arquivo
@@ -1,5 +1,5 @@
README - CUPS v1.3.2 - 2007-09-18
---------------------------------
README - CUPS v1.3rc2 - 2007-07-30
----------------------------------
Looking for compile instructions? Read the file "INSTALL.txt"
instead...
@@ -22,11 +22,12 @@ INTRODUCTION
to support real-world printing under UNIX.
CUPS includes an image file RIP that supports printing of
image files to non-PostScript printers. GPL Ghostscript now
includes the "cups" driver to support printing of PostScript
files within the CUPS driver framework. Sample drivers for
Dymo, EPSON, HP, OKIDATA, and Zebra printers are included that
use these filters.
image files to non-PostScript printers. A customized version
of GPL Ghostscript for CUPS called ESP Ghostscript is
available separately to support printing of PostScript files
within the CUPS driver framework. Sample drivers for Dymo,
EPSON, HP, OKIDATA, and Zebra printers are included that use
these filters.
CUPS is licensed under the GNU General Public License and GNU
Library General Public License versions 2.
+2 -2
Ver Arquivo
@@ -17,8 +17,8 @@
include ../Makedefs
RBACKENDS = ipp lpd
UBACKENDS = $(PAP) $(LEGACY_BACKENDS) serial snmp socket usb
RBACKENDS = lpd
UBACKENDS = ipp $(PAP) $(LEGACY_BACKENDS) serial snmp socket usb
TARGETS = betest test1284 libbackend.a $(RBACKENDS) $(UBACKENDS)
LIBOBJS = ieee1284.o runloop.o
OBJS = betest.o ipp.o lpd.o pap.o parallel.o scsi.o \
+133 -180
Ver Arquivo
@@ -51,7 +51,6 @@
*/
static char *password = NULL; /* Password for device URI */
static int password_tries = 0; /* Password tries */
#ifdef __APPLE__
static char pstmpname[1024] = ""; /* Temporary PostScript file name */
#endif /* __APPLE__ */
@@ -67,12 +66,12 @@ static void cancel_job(http_t *http, const char *uri, int id,
const char *resource, const char *user, int version);
static void check_printer_state(http_t *http, const char *uri,
const char *resource, const char *user,
int version, int job_id);
int version);
#ifdef HAVE_LIBZ
static void compress_files(int num_files, char **files);
#endif /* HAVE_LIBZ */
static const char *password_cb(const char *);
static int report_printer_state(ipp_t *ipp, int job_id);
static int report_printer_state(ipp_t *ipp);
#ifdef __APPLE__
static int run_pictwps_filter(char **argv, const char *filename);
@@ -102,9 +101,9 @@ main(int argc, /* I - Number of command-line args */
resource[1024], /* Resource info (printer name) */
addrname[256], /* Address name */
*optptr, /* Pointer to URI options */
*name, /* Name of option */
*value, /* Value of option */
sep; /* Separator character */
name[255], /* Name of option */
value[255], /* Value of option */
*ptr; /* Pointer into name or value */
int num_files; /* Number of files to print */
char **files, /* Files to print */
*filename; /* Pointer to single filename */
@@ -132,8 +131,7 @@ main(int argc, /* I - Number of command-line args */
ipp_attribute_t *printer_accepting; /* printer-is-accepting-jobs */
int copies, /* Number of copies for job */
copies_remaining; /* Number of copies remaining */
const char *content_type, /* CONTENT_TYPE environment variable */
*final_content_type; /* FINAL_CONTENT_TYPE environment var */
const char *content_type; /* CONTENT_TYPE environment variable */
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
struct sigaction action; /* Actions for POSIX signals */
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
@@ -200,9 +198,8 @@ main(int argc, /* I - Number of command-line args */
}
else if (argc < 6)
{
_cupsLangPrintf(stderr,
_("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
fprintf(stderr, _("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
return (CUPS_BACKEND_STOP);
}
@@ -210,16 +207,12 @@ main(int argc, /* I - Number of command-line args */
* Get the (final) content type...
*/
if ((content_type = getenv("CONTENT_TYPE")) == NULL)
content_type = "application/octet-stream";
if ((content_type = getenv("FINAL_CONTENT_TYPE")) == NULL)
if ((content_type = getenv("CONTENT_TYPE")) == NULL)
content_type = "application/octet-stream";
if ((final_content_type = getenv("FINAL_CONTENT_TYPE")) == NULL)
{
final_content_type = content_type;
if (!strncmp(final_content_type, "printer/", 8))
final_content_type = "application/vnd.cups-raw";
}
if (!strncmp(content_type, "printer/", 8))
content_type = "application/vnd.cups-raw";
/*
* Extract the hostname and printer name from the URI...
@@ -230,9 +223,8 @@ main(int argc, /* I - Number of command-line args */
hostname, sizeof(hostname), &port,
resource, sizeof(resource)) < HTTP_URI_OK)
{
_cupsLangPuts(stderr,
_("ERROR: Missing device URI on command-line and no "
"DEVICE_URI environment variable!\n"));
fputs(_("ERROR: Missing device URI on command-line and no "
"DEVICE_URI environment variable!\n"), stderr);
return (CUPS_BACKEND_STOP);
}
@@ -270,30 +262,29 @@ main(int argc, /* I - Number of command-line args */
* Get the name...
*/
name = optptr;
for (ptr = name; *optptr && *optptr != '=';)
if (ptr < (name + sizeof(name) - 1))
*ptr++ = *optptr++;
*ptr = '\0';
while (*optptr && *optptr != '=' && *optptr != '+' && *optptr != '&')
optptr ++;
if ((sep = *optptr) != '\0')
*optptr++ = '\0';
if (sep == '=')
if (*optptr == '=')
{
/*
* Get the value...
*/
value = optptr;
optptr ++;
while (*optptr && *optptr != '+' && *optptr != '&')
for (ptr = value; *optptr && *optptr != '+' && *optptr != '&';)
if (ptr < (value + sizeof(value) - 1))
*ptr++ = *optptr++;
*ptr = '\0';
if (*optptr == '+' || *optptr == '&')
optptr ++;
if (*optptr)
*optptr++ = '\0';
}
else
value = (char *)"";
value[0] = '\0';
/*
* Process the option...
@@ -335,7 +326,7 @@ main(int argc, /* I - Number of command-line args */
cupsSetEncryption(HTTP_ENCRYPT_IF_REQUESTED);
else
{
_cupsLangPrintf(stderr,
fprintf(stderr,
_("ERROR: Unknown encryption option value \"%s\"!\n"),
value);
}
@@ -348,7 +339,7 @@ main(int argc, /* I - Number of command-line args */
version = 1;
else
{
_cupsLangPrintf(stderr,
fprintf(stderr,
_("ERROR: Unknown version option value \"%s\"!\n"),
value);
}
@@ -377,9 +368,8 @@ main(int argc, /* I - Number of command-line args */
* Unknown option...
*/
_cupsLangPrintf(stderr,
_("ERROR: Unknown option \"%s\" with value \"%s\"!\n"),
name, value);
fprintf(stderr, _("ERROR: Unknown option \"%s\" with value \"%s\"!\n"),
name, value);
}
}
}
@@ -431,9 +421,10 @@ main(int argc, /* I - Number of command-line args */
* Point to the single file from stdin...
*/
filename = tmpfilename;
num_files = 1;
files = &filename;
filename = tmpfilename;
files = &filename;
num_files = 1;
send_options = 0;
}
else
@@ -442,9 +433,10 @@ main(int argc, /* I - Number of command-line args */
* Point to the files on the command-line...
*/
num_files = argc - 6;
files = argv + 6;
send_options = 1;
num_files = argc - 6;
files = argv + 6;
send_options = strncasecmp(content_type, "application/vnd.cups-", 21) != 0;
#ifdef HAVE_LIBZ
if (compression)
@@ -477,9 +469,7 @@ main(int argc, /* I - Number of command-line args */
* Try loading authentication information from the environment.
*/
const char *ptr = getenv("AUTH_USERNAME");
if (ptr)
if ((ptr = getenv("AUTH_USERNAME")) != NULL)
cupsSetUser(ptr);
password = getenv("AUTH_PASSWORD");
@@ -497,8 +487,8 @@ main(int argc, /* I - Number of command-line args */
do
{
_cupsLangPrintf(stderr, _("INFO: Connecting to %s on port %d...\n"),
hostname, port);
fprintf(stderr, _("INFO: Connecting to %s on port %d...\n"),
hostname, port);
if ((http = httpConnectEncrypt(hostname, port, cupsEncryption())) == NULL)
{
@@ -514,9 +504,8 @@ main(int argc, /* I - Number of command-line args */
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
fputs(_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"), stderr);
if (argc == 6 || strcmp(filename, argv[6]))
unlink(filename);
@@ -535,16 +524,16 @@ main(int argc, /* I - Number of command-line args */
{
if (contimeout && (time(NULL) - start_time) > contimeout)
{
_cupsLangPuts(stderr, _("ERROR: Printer not responding!\n"));
fputs(_("ERROR: Printer not responding!\n"), stderr);
return (CUPS_BACKEND_FAILED);
}
recoverable = 1;
_cupsLangPrintf(stderr,
_("WARNING: recoverable: Network host \'%s\' is busy; "
"will retry in %d seconds...\n"),
hostname, delay);
fprintf(stderr,
_("WARNING: recoverable: Network host \'%s\' is busy; will "
"retry in %d seconds...\n"),
hostname, delay);
sleep(delay);
@@ -553,8 +542,8 @@ main(int argc, /* I - Number of command-line args */
}
else if (h_errno)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to locate printer \'%s\'!\n"),
hostname);
fprintf(stderr, _("ERROR: Unable to locate printer \'%s\'!\n"),
hostname);
return (CUPS_BACKEND_STOP);
}
else
@@ -562,9 +551,8 @@ main(int argc, /* I - Number of command-line args */
recoverable = 1;
fprintf(stderr, "DEBUG: Connection error: %s\n", strerror(errno));
_cupsLangPuts(stderr,
_("ERROR: recoverable: Unable to connect to printer; will "
"retry in 30 seconds...\n"));
fputs(_("ERROR: recoverable: Unable to connect to printer; will "
"retry in 30 seconds...\n"), stderr);
sleep(30);
}
@@ -583,7 +571,7 @@ main(int argc, /* I - Number of command-line args */
}
fputs("STATE: -connecting-to-device\n", stderr);
_cupsLangPrintf(stderr, _("INFO: Connected to %s...\n"), hostname);
fprintf(stderr, _("INFO: Connected to %s...\n"), hostname);
#ifdef AF_INET6
if (http->hostaddr->addr.sa_family == AF_INET6)
@@ -649,18 +637,18 @@ main(int argc, /* I - Number of command-line args */
{
if (contimeout && (time(NULL) - start_time) > contimeout)
{
_cupsLangPuts(stderr, _("ERROR: Printer not responding!\n"));
fputs(_("ERROR: Printer not responding!\n"), stderr);
return (CUPS_BACKEND_FAILED);
}
recoverable = 1;
_cupsLangPrintf(stderr,
_("WARNING: recoverable: Network host \'%s\' is busy; "
"will retry in %d seconds...\n"),
hostname, delay);
fprintf(stderr,
_("WARNING: recoverable: Network host \'%s\' is busy; will "
"retry in %d seconds...\n"),
hostname, delay);
report_printer_state(supported, 0);
report_printer_state(supported);
sleep(delay);
@@ -674,15 +662,14 @@ main(int argc, /* I - Number of command-line args */
* Switch to IPP/1.0...
*/
_cupsLangPuts(stderr,
_("INFO: Printer does not support IPP/1.1, trying "
"IPP/1.0...\n"));
fputs(_("INFO: Printer does not support IPP/1.1, trying IPP/1.0...\n"),
stderr);
version = 0;
httpReconnect(http);
}
else if (ipp_status == IPP_NOT_FOUND)
{
_cupsLangPuts(stderr, _("ERROR: Destination printer does not exist!\n"));
fputs(_("ERROR: Destination printer does not exist!\n"), stderr);
if (supported)
ippDelete(supported);
@@ -691,9 +678,8 @@ main(int argc, /* I - Number of command-line args */
}
else
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to get printer status (%s)!\n"),
cupsLastErrorString());
fprintf(stderr, _("ERROR: Unable to get printer status (%s)!\n"),
cupsLastErrorString());
sleep(10);
}
@@ -726,7 +712,7 @@ main(int argc, /* I - Number of command-line args */
format_sup->values[i].string.text);
}
report_printer_state(supported, 0);
report_printer_state(supported);
}
while (ipp_status > IPP_OK_CONFLICT);
@@ -755,9 +741,8 @@ main(int argc, /* I - Number of command-line args */
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
fputs(_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"), stderr);
ippDelete(supported);
httpClose(http);
@@ -862,7 +847,8 @@ main(int argc, /* I - Number of command-line args */
num_options = cupsParseOptions(argv[5], 0, &options);
#ifdef __APPLE__
if (!strcasecmp(content_type, "application/pictwps") && num_files == 1)
if (content_type != NULL &&
!strcasecmp(content_type, "application/pictwps") && num_files == 1)
{
if (format_sup != NULL)
{
@@ -888,23 +874,23 @@ main(int argc, /* I - Number of command-line args */
* number of copies to 1...
*/
final_content_type = "application/postscript";
copies = 1;
copies_remaining = 1;
send_options = 0;
content_type = "application/postscript";
copies = 1;
copies_remaining = 1;
send_options = 0;
}
}
#endif /* __APPLE__ */
if (format_sup != NULL)
if (content_type != NULL && format_sup != NULL)
{
for (i = 0; i < format_sup->num_values; i ++)
if (!strcasecmp(final_content_type, format_sup->values[i].string.text))
if (!strcasecmp(content_type, format_sup->values[i].string.text))
break;
if (i < format_sup->num_values)
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
"document-format", NULL, final_content_type);
"document-format", NULL, content_type);
}
if (copies_sup && version > 0 && send_options)
@@ -957,8 +943,7 @@ main(int argc, /* I - Number of command-line args */
if (ipp_status == IPP_SERVICE_UNAVAILABLE ||
ipp_status == IPP_PRINTER_BUSY)
{
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 10 seconds...\n"));
fputs(_("INFO: Printer busy; will retry in 10 seconds...\n"), stderr);
sleep(10);
}
else if ((ipp_status == IPP_BAD_REQUEST ||
@@ -968,28 +953,25 @@ main(int argc, /* I - Number of command-line args */
* Switch to IPP/1.0...
*/
_cupsLangPuts(stderr,
_("INFO: Printer does not support IPP/1.1, trying "
"IPP/1.0...\n"));
fputs(_("INFO: Printer does not support IPP/1.1, trying IPP/1.0...\n"),
stderr);
version = 0;
httpReconnect(http);
}
else
_cupsLangPrintf(stderr, _("ERROR: Print file was not accepted (%s)!\n"),
cupsLastErrorString());
fprintf(stderr, _("ERROR: Print file was not accepted (%s)!\n"),
cupsLastErrorString());
}
else if ((job_id_attr = ippFindAttribute(response, "job-id",
IPP_TAG_INTEGER)) == NULL)
{
_cupsLangPuts(stderr,
_("NOTICE: Print file accepted - job ID unknown.\n"));
fputs(_("NOTICE: Print file accepted - job ID unknown.\n"), stderr);
job_id = 0;
}
else
{
job_id = job_id_attr->values[0].integer;
_cupsLangPrintf(stderr, _("NOTICE: Print file accepted - job ID %d.\n"),
job_id);
fprintf(stderr, _("NOTICE: Print file accepted - job ID %d.\n"), job_id);
}
ippDelete(response);
@@ -1027,9 +1009,8 @@ main(int argc, /* I - Number of command-line args */
{
ipp_status = cupsLastError();
_cupsLangPrintf(stderr,
_("ERROR: Unable to add file %d to job: %s\n"),
job_id, cupsLastErrorString());
fprintf(stderr, _("ERROR: Unable to add file %d to job: %s\n"),
job_id, cupsLastErrorString());
break;
}
}
@@ -1053,7 +1034,7 @@ main(int argc, /* I - Number of command-line args */
if (!job_id || !waitjob)
continue;
_cupsLangPuts(stderr, _("INFO: Waiting for job to complete...\n"));
fputs(_("INFO: Waiting for job to complete...\n"), stderr);
for (; !job_cancelled;)
{
@@ -1107,9 +1088,8 @@ main(int argc, /* I - Number of command-line args */
{
ippDelete(response);
_cupsLangPrintf(stderr,
_("ERROR: Unable to get job %d attributes (%s)!\n"),
job_id, cupsLastErrorString());
fprintf(stderr, _("ERROR: Unable to get job %d attributes (%s)!\n"),
job_id, cupsLastErrorString());
break;
}
}
@@ -1143,7 +1123,7 @@ main(int argc, /* I - Number of command-line args */
* Check the printer state and report it if necessary...
*/
check_printer_state(http, uri, resource, argv[2], version, job_id);
check_printer_state(http, uri, resource, argv[2], version);
/*
* Wait 10 seconds before polling again...
@@ -1164,7 +1144,7 @@ main(int argc, /* I - Number of command-line args */
* Check the printer state and report it if necessary...
*/
check_printer_state(http, uri, resource, argv[2], version, job_id);
check_printer_state(http, uri, resource, argv[2], version);
/*
* Free memory...
@@ -1198,20 +1178,7 @@ main(int argc, /* I - Number of command-line args */
* Return the queue status...
*/
if (ipp_status == IPP_NOT_AUTHORIZED)
{
/*
* Authorization failures here mean that we need Kerberos. Username +
* password authentication is handled in the password_cb function.
*/
fputs("ATTR: auth-info-required=negotiate\n", stderr);
return (CUPS_BACKEND_AUTH_REQUIRED);
}
else if (ipp_status > IPP_OK_CONFLICT)
return (CUPS_BACKEND_FAILED);
else
return (CUPS_BACKEND_OK);
return (ipp_status > IPP_OK_CONFLICT ? CUPS_BACKEND_FAILED : CUPS_BACKEND_OK);
}
@@ -1230,7 +1197,7 @@ cancel_job(http_t *http, /* I - HTTP connection */
ipp_t *request; /* Cancel-Job request */
_cupsLangPuts(stderr, _("INFO: Canceling print job...\n"));
fputs(_("INFO: Canceling print job...\n"), stderr);
request = ippNewRequest(IPP_CANCEL_JOB);
request->request.op.version[1] = version;
@@ -1250,8 +1217,8 @@ cancel_job(http_t *http, /* I - HTTP connection */
ippDelete(cupsDoRequest(http, request, resource));
if (cupsLastError() > IPP_OK_CONFLICT)
_cupsLangPrintf(stderr, _("ERROR: Unable to cancel job %d: %s\n"), id,
cupsLastErrorString());
fprintf(stderr, _("ERROR: Unable to cancel job %d: %s\n"), id,
cupsLastErrorString());
}
@@ -1265,8 +1232,7 @@ check_printer_state(
const char *uri, /* I - Printer URI */
const char *resource, /* I - Resource path */
const char *user, /* I - Username, if any */
int version, /* I - IPP version */
int job_id) /* I - Current job ID */
int version) /* I - IPP version */
{
ipp_t *request, /* IPP request */
*response; /* IPP response */
@@ -1301,7 +1267,7 @@ check_printer_state(
if ((response = cupsDoRequest(http, request, resource)) != NULL)
{
report_printer_state(response, job_id);
report_printer_state(response);
ippDelete(response);
}
}
@@ -1332,25 +1298,25 @@ compress_files(int num_files, /* I - Number of files */
{
if ((fd = cupsTempFd(filename, sizeof(filename))) < 0)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to create temporary compressed print "
"file: %s\n"), strerror(errno));
fprintf(stderr,
_("ERROR: Unable to create temporary compressed print file: "
"%s\n"),
strerror(errno));
exit(CUPS_BACKEND_FAILED);
}
if ((out = cupsFileOpenFd(fd, "w9")) == NULL)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open temporary compressed print "
"file: %s\n"), strerror(errno));
fprintf(stderr,
_("ERROR: Unable to open temporary compressed print file: %s\n"),
strerror(errno));
exit(CUPS_BACKEND_FAILED);
}
if ((in = cupsFileOpen(files[i], "r")) == NULL)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open print file \"%s\": %s\n"),
files[i], strerror(errno));
fprintf(stderr, _("ERROR: Unable to open print file \"%s\": %s\n"),
files[i], strerror(errno));
cupsFileClose(out);
exit(CUPS_BACKEND_FAILED);
}
@@ -1359,9 +1325,8 @@ compress_files(int num_files, /* I - Number of files */
while ((bytes = cupsFileRead(in, buffer, sizeof(buffer))) > 0)
if (cupsFileWrite(out, buffer, bytes) < bytes)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to write %d bytes to \"%s\": %s\n"),
(int)bytes, filename, strerror(errno));
fprintf(stderr, _("ERROR: Unable to write %d bytes to \"%s\": %s\n"),
(int)bytes, filename, strerror(errno));
cupsFileClose(in);
cupsFileClose(out);
exit(CUPS_BACKEND_FAILED);
@@ -1394,12 +1359,8 @@ password_cb(const char *prompt) /* I - Prompt (not used) */
{
(void)prompt;
if (password && password_tries < 3)
{
password_tries ++;
if (password)
return (password);
}
else
{
/*
@@ -1429,8 +1390,7 @@ password_cb(const char *prompt) /* I - Prompt (not used) */
*/
static int /* O - Number of reasons shown */
report_printer_state(ipp_t *ipp, /* I - IPP response */
int job_id) /* I - Current job ID */
report_printer_state(ipp_t *ipp) /* I - IPP response */
{
int i; /* Looping var */
int count; /* Count of reasons shown... */
@@ -1441,7 +1401,6 @@ report_printer_state(ipp_t *ipp, /* I - IPP response */
char unknown[1024]; /* Unknown message string */
const char *prefix; /* Prefix for STATE: line */
char state[1024]; /* State string */
cups_lang_t *language; /* Current localization */
if ((psm = ippFindAttribute(ipp, "printer-state-message",
@@ -1454,20 +1413,15 @@ report_printer_state(ipp_t *ipp, /* I - IPP response */
state[0] = '\0';
prefix = "STATE: ";
language = cupsLangDefault();
for (i = 0, count = 0; i < reasons->num_values; i ++)
{
reason = reasons->values[i].string.text;
if (job_id == 0 || strcmp(reason, "paused"))
{
strlcat(state, prefix, sizeof(state));
strlcat(state, reason, sizeof(state));
prefix = ",";
}
strlcat(state, prefix, sizeof(state));
strlcat(state, reason, sizeof(state));
prefix = ",";
message = "";
if (!strncmp(reason, "media-needed", 12))
@@ -1532,11 +1486,11 @@ report_printer_state(ipp_t *ipp, /* I - IPP response */
{
count ++;
if (strstr(reasons->values[i].string.text, "error"))
fprintf(stderr, "ERROR: %s\n", _cupsLangString(language, message));
fprintf(stderr, "ERROR: %s\n", message);
else if (strstr(reasons->values[i].string.text, "warning"))
fprintf(stderr, "WARNING: %s\n", _cupsLangString(language, message));
fprintf(stderr, "WARNING: %s\n", message);
else
fprintf(stderr, "INFO: %s\n", _cupsLangString(language, message));
fprintf(stderr, "INFO: %s\n", message);
}
}
@@ -1578,16 +1532,15 @@ run_pictwps_filter(char **argv, /* I - Command-line arguments */
printer = getenv("PRINTER");
if (!printer)
{
_cupsLangPuts(stderr,
_("ERROR: PRINTER environment variable not defined!\n"));
fputs(_("ERROR: PRINTER environment variable not defined!\n"), stderr);
return (-1);
}
if ((ppdfile = cupsGetPPD(printer)) == NULL)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to get PPD file for printer \"%s\" - "
"%s.\n"), printer, cupsLastErrorString());
fprintf(stderr,
_("ERROR: Unable to get PPD file for printer \"%s\" - %s.\n"),
printer, cupsLastErrorString());
}
else
{
@@ -1601,8 +1554,8 @@ run_pictwps_filter(char **argv, /* I - Command-line arguments */
if ((fd = cupsTempFd(pstmpname, sizeof(pstmpname))) < 0)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to create temporary file - %s.\n"),
strerror(errno));
fprintf(stderr, _("ERROR: Unable to create temporary file - %s.\n"),
strerror(errno));
if (ppdfile)
unlink(ppdfile);
return (-1);
@@ -1658,8 +1611,8 @@ run_pictwps_filter(char **argv, /* I - Command-line arguments */
execlp("pictwpstops", printer, argv[1], argv[2], argv[3], argv[4], argv[5],
filename, NULL);
_cupsLangPrintf(stderr, _("ERROR: Unable to exec pictwpstops: %s\n"),
strerror(errno));
fprintf(stderr, _("ERROR: Unable to exec pictwpstops: %s\n"),
strerror(errno));
return (errno);
}
@@ -1671,8 +1624,8 @@ run_pictwps_filter(char **argv, /* I - Command-line arguments */
* Error!
*/
_cupsLangPrintf(stderr, _("ERROR: Unable to fork pictwpstops: %s\n"),
strerror(errno));
fprintf(stderr, _("ERROR: Unable to fork pictwpstops: %s\n"),
strerror(errno));
unlink(filename);
if (ppdfile)
unlink(ppdfile);
@@ -1685,8 +1638,8 @@ run_pictwps_filter(char **argv, /* I - Command-line arguments */
if (wait(&status) < 0)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to wait for pictwpstops: %s\n"),
strerror(errno));
fprintf(stderr, _("ERROR: Unable to wait for pictwpstops: %s\n"),
strerror(errno));
close(fd);
unlink(filename);
if (ppdfile)
@@ -1702,11 +1655,11 @@ run_pictwps_filter(char **argv, /* I - Command-line arguments */
if (status)
{
if (status >= 256)
_cupsLangPrintf(stderr, _("ERROR: pictwpstops exited with status %d!\n"),
status / 256);
fprintf(stderr, _("ERROR: pictwpstops exited with status %d!\n"),
status / 256);
else
_cupsLangPrintf(stderr, _("ERROR: pictwpstops exited on signal %d!\n"),
status);
fprintf(stderr, _("ERROR: pictwpstops exited on signal %d!\n"),
status);
unlink(filename);
return (status);
+71 -81
Ver Arquivo
@@ -125,9 +125,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
username[255], /* Username info */
resource[1024], /* Resource info (printer name) */
*options, /* Pointer to options */
*name, /* Name of option */
*value, /* Value of option */
sep, /* Separator character */
name[255], /* Name of option */
value[255], /* Value of option */
*ptr, /* Pointer into name or value */
*filename, /* File to print */
title[256]; /* Title string */
int port; /* Port number */
@@ -186,9 +186,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
}
else if (argc < 6 || argc > 7)
{
_cupsLangPrintf(stderr,
_("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
fprintf(stderr, _("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
return (CUPS_BACKEND_FAILED);
}
@@ -277,30 +276,29 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Get the name...
*/
name = options;
for (ptr = name; *options && *options != '=';)
if (ptr < (name + sizeof(name) - 1))
*ptr++ = *options++;
*ptr = '\0';
while (*options && *options != '=' && *options != '+' && *options != '&')
options ++;
if ((sep = *options) != '\0')
*options++ = '\0';
if (sep == '=')
if (*options == '=')
{
/*
* Get the value...
*/
value = options;
options ++;
while (*options && *options != '+' && *options != '&')
for (ptr = value; *options && *options != '+' && *options != '&';)
if (ptr < (value + sizeof(value) - 1))
*ptr++ = *options++;
*ptr = '\0';
if (*options == '+' || *options == '&')
options ++;
if (*options)
*options++ = '\0';
}
else
value = (char *)"";
value[0] = '\0';
/*
* Process the option...
@@ -324,8 +322,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if (strchr("cdfglnoprtv", value[0]))
format = value[0];
else
_cupsLangPrintf(stderr, _("ERROR: Unknown format character \"%c\"\n"),
value[0]);
fprintf(stderr, _("ERROR: Unknown format character \"%c\"\n"),
value[0]);
}
else if (!strcasecmp(name, "mode") && value[0])
{
@@ -338,8 +336,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
else if (!strcasecmp(value, "stream"))
mode = MODE_STREAM;
else
_cupsLangPrintf(stderr, _("ERROR: Unknown print mode \"%s\"\n"),
value);
fprintf(stderr, _("ERROR: Unknown print mode \"%s\"\n"), value);
}
else if (!strcasecmp(name, "order") && value[0])
{
@@ -352,8 +349,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
else if (!strcasecmp(value, "data,control"))
order = ORDER_DATA_CONTROL;
else
_cupsLangPrintf(stderr, _("ERROR: Unknown file order \"%s\"\n"),
value);
fprintf(stderr, _("ERROR: Unknown file order \"%s\"\n"), value);
}
else if (!strcasecmp(name, "reserve"))
{
@@ -461,8 +457,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if (fd == -1)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to open print file %s: %s\n"),
filename, strerror(errno));
fprintf(stderr, _("ERROR: Unable to open print file %s: %s\n"),
filename, strerror(errno));
return (CUPS_BACKEND_FAILED);
}
}
@@ -480,8 +476,6 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* the remote end...
*/
char *ptr;
for (ptr = title; *ptr; ptr ++)
if (!isalnum(*ptr & 255) && !isspace(*ptr & 255))
*ptr = '_';
@@ -591,9 +585,9 @@ lpd_command(int fd, /* I - Socket connection to LPD host */
if (recv(fd, &status, 1, 0) < 1)
{
_cupsLangPrintf(stderr,
_("WARNING: Remote host did not respond with command "
"status byte after %d seconds!\n"), timeout);
fprintf(stderr,
_("WARNING: Remote host did not respond with command status "
"byte after %d seconds!\n"), timeout);
status = errno;
}
@@ -674,8 +668,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to locate printer \'%s\'!\n"),
hostname);
fprintf(stderr, _("ERROR: Unable to locate printer \'%s\'!\n"), hostname);
return (CUPS_BACKEND_STOP);
}
@@ -697,9 +690,9 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
*/
fputs("STATE: +connecting-to-device\n", stderr);
_cupsLangPrintf(stderr,
_("INFO: Attempting to connect to host %s for printer %s\n"),
hostname, printer);
fprintf(stderr,
_("INFO: Attempting to connect to host %s for printer %s\n"),
hostname, printer);
for (lport = reserve == RESERVE_RFC1179 ? 732 : 1024, addr = addrlist,
delay = 5;;
@@ -798,9 +791,8 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
fputs(_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"), stderr);
httpAddrFreeList(addrlist);
@@ -818,15 +810,16 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
{
if (contimeout && (time(NULL) - start_time) > contimeout)
{
_cupsLangPuts(stderr, _("ERROR: Printer not responding!\n"));
fputs(_("ERROR: Printer not responding!\n"), stderr);
return (CUPS_BACKEND_FAILED);
}
recoverable = 1;
_cupsLangPrintf(stderr,
_("WARNING: recoverable: Network host \'%s\' is busy; "
"will retry in %d seconds...\n"), hostname, delay);
fprintf(stderr,
_("WARNING: recoverable: Network host \'%s\' is busy; will "
"retry in %d seconds...\n"),
hostname, delay);
sleep(delay);
@@ -846,9 +839,8 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
recoverable = 1;
fprintf(stderr, "DEBUG: Connection error: %s\n", strerror(errno));
_cupsLangPuts(stderr,
_("ERROR: recoverable: Unable to connect to printer; "
"will retry in 30 seconds...\n"));
fputs(_("ERROR: recoverable: Unable to connect to printer; will "
"retry in 30 seconds...\n"), stderr);
sleep(30);
}
}
@@ -866,7 +858,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
}
fputs("STATE: -connecting-to-device\n", stderr);
_cupsLangPrintf(stderr, _("INFO: Connected to %s...\n"), hostname);
fprintf(stderr, _("INFO: Connected to %s...\n"), hostname);
#ifdef AF_INET6
if (addr->addr.addr.sa_family == AF_INET6)
@@ -972,8 +964,8 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
return (CUPS_BACKEND_FAILED);
}
_cupsLangPrintf(stderr, _("INFO: Sending control file (%u bytes)\n"),
(unsigned)strlen(control));
fprintf(stderr, _("INFO: Sending control file (%u bytes)\n"),
(unsigned)strlen(control));
if (lpd_write(fd, control, strlen(control) + 1) < (strlen(control) + 1))
{
@@ -986,9 +978,9 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
if (read(fd, &status, 1) < 1)
{
_cupsLangPrintf(stderr,
_("WARNING: Remote host did not respond with control "
"status byte after %d seconds!\n"), timeout);
fprintf(stderr,
_("WARNING: Remote host did not respond with control "
"status byte after %d seconds!\n"), timeout);
status = errno;
}
@@ -996,11 +988,11 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
}
if (status != 0)
_cupsLangPrintf(stderr,
_("ERROR: Remote host did not accept control file "
"(%d)\n"), status);
fprintf(stderr,
_("ERROR: Remote host did not accept control file (%d)\n"),
status);
else
_cupsLangPuts(stderr, _("INFO: Control file sent successfully\n"));
fputs(_("INFO: Control file sent successfully\n"), stderr);
}
else
status = 0;
@@ -1021,13 +1013,13 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
return (CUPS_BACKEND_FAILED);
}
_cupsLangPrintf(stderr,
fprintf(stderr,
#ifdef HAVE_LONG_LONG
_("INFO: Sending data file (%lld bytes)\n"),
_("INFO: Sending data file (%lld bytes)\n"),
#else
_("INFO: Sending data file (%ld bytes)\n"),
_("INFO: Sending data file (%ld bytes)\n"),
#endif /* HAVE_LONG_LONG */
CUPS_LLCAST filestats.st_size);
CUPS_LLCAST filestats.st_size);
tbytes = 0;
for (copy = 0; copy < manual_copies; copy ++)
@@ -1036,9 +1028,8 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
while ((nbytes = read(print_fd, buffer, sizeof(buffer))) > 0)
{
_cupsLangPrintf(stderr,
_("INFO: Spooling LPR job, %.0f%% complete...\n"),
100.0 * tbytes / filestats.st_size);
fprintf(stderr, _("INFO: Spooling LPR job, %.0f%% complete...\n"),
100.0 * tbytes / filestats.st_size);
if (lpd_write(fd, buffer, nbytes) < nbytes)
{
@@ -1072,9 +1063,9 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
if (recv(fd, &status, 1, 0) < 1)
{
_cupsLangPrintf(stderr,
_("WARNING: Remote host did not respond with data "
"status byte after %d seconds!\n"), timeout);
fprintf(stderr,
_("WARNING: Remote host did not respond with data "
"status byte after %d seconds!\n"), timeout);
status = 0;
}
@@ -1085,11 +1076,10 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
status = 0;
if (status != 0)
_cupsLangPrintf(stderr,
_("ERROR: Remote host did not accept data file (%d)\n"),
status);
fprintf(stderr, _("ERROR: Remote host did not accept data file (%d)\n"),
status);
else
_cupsLangPuts(stderr, _("INFO: Data file sent successfully\n"));
fputs(_("INFO: Data file sent successfully\n"), stderr);
}
if (status == 0 && order == ORDER_DATA_CONTROL)
@@ -1103,8 +1093,8 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
return (CUPS_BACKEND_FAILED);
}
_cupsLangPrintf(stderr, _("INFO: Sending control file (%lu bytes)\n"),
(unsigned long)strlen(control));
fprintf(stderr, _("INFO: Sending control file (%lu bytes)\n"),
(unsigned long)strlen(control));
if (lpd_write(fd, control, strlen(control) + 1) < (strlen(control) + 1))
{
@@ -1117,9 +1107,9 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
if (read(fd, &status, 1) < 1)
{
_cupsLangPrintf(stderr,
_("WARNING: Remote host did not respond with control "
"status byte after %d seconds!\n"), timeout);
fprintf(stderr,
_("WARNING: Remote host did not respond with control "
"status byte after %d seconds!\n"), timeout);
status = errno;
}
@@ -1127,11 +1117,11 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
}
if (status != 0)
_cupsLangPrintf(stderr,
_("ERROR: Remote host did not accept control file "
"(%d)\n"), status);
fprintf(stderr,
_("ERROR: Remote host did not accept control file (%d)\n"),
status);
else
_cupsLangPuts(stderr, _("INFO: Control file sent successfully\n"));
fputs(_("INFO: Control file sent successfully\n"), stderr);
}
/*
+52 -63
Ver Arquivo
@@ -242,9 +242,7 @@ int main (int argc, const char * argv[])
/* Try to open the print file... */
if ((fp = fopen(argv[6], "rb")) == NULL)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open print file \"%s\": %s\n"),
argv[6], strerror(errno));
fprintf(stderr, "ERROR: unable to open print file \"%s\": %s\n", argv[6], strerror(errno));
return (1);
}
@@ -1365,9 +1363,9 @@ static int parseUri(const char* argv0, char* name, char* type, char* zone)
*resourcePtr,
*typePtr,
*options, /* Pointer to options */
*optionName, /* Name of option */
*value, /* Value of option */
sep; /* Separator character */
optionName[255], /* Name of option */
value[255], /* Value of option */
*ptr; /* Pointer into name or value */
int port; /* Port number (not used) */
int statusInterval; /* */
@@ -1395,54 +1393,53 @@ static int parseUri(const char* argv0, char* name, char* type, char* zone)
while (*options != '\0')
{
/*
/*
* Get the name...
*/
for (ptr = optionName; *options && *options != '=' && *options != '+'; )
*ptr++ = *options++;
optionName = options;
*ptr = '\0';
value[0] = '\0';
while (*options && *options != '=' && *options != '+' && *options != '&')
options ++;
if ((sep = *options) != '\0')
*options++ = '\0';
if (sep == '=')
if (*options == '=')
{
/*
/*
* Get the value...
*/
*/
options ++;
for (ptr = value; *options && *options != '+';)
*ptr++ = *options++;
value = options;
while (*options && *options != '+' && *options != '&')
options ++;
if (*options)
*options++ = '\0';
*ptr = '\0';
if (*options == '+')
options ++;
}
else if (*options == '+')
{
options ++;
}
else
value = (char *)"";
/*
/*
* Process the option...
*/
if (!strcasecmp(optionName, "waiteof"))
if (strcasecmp(optionName, "waiteof") == 0)
{
/*
* Wait for the end of the print file?
/*
* Set the banner...
*/
if (!strcasecmp(value, "on") ||
!strcasecmp(value, "yes") ||
!strcasecmp(value, "true"))
if (strcasecmp(value, "on") == 0 ||
strcasecmp(value, "yes") == 0 ||
strcasecmp(value, "true") == 0)
{
gWaitEOF = true;
}
else if (!strcasecmp(value, "off") ||
!strcasecmp(value, "no") ||
!strcasecmp(value, "false"))
else if (strcasecmp(value, "off") == 0 ||
strcasecmp(value, "no") == 0 ||
strcasecmp(value, "false") == 0)
{
gWaitEOF = false;
}
@@ -1451,17 +1448,13 @@ static int parseUri(const char* argv0, char* name, char* type, char* zone)
fprintf(stderr, "WARNING: Boolean expected for waiteof option \"%s\"\n", value);
}
}
else if (!strcasecmp(optionName, "status"))
else if (strcasecmp(optionName, "status") == 0)
{
/*
* Set status reporting interval...
*/
statusInterval = atoi(value);
if (value[0] < '0' || value[0] > '9' || statusInterval < 0)
if (value[0] < '0' || value[0] > '9' ||
statusInterval < 0)
{
fprintf(stderr, "WARNING: number expected for status option \"%s\"\n",
value);
fprintf(stderr, "WARNING: number expected for status option \"%s\"\n", value);
}
else
{
@@ -1476,24 +1469,20 @@ static int parseUri(const char* argv0, char* name, char* type, char* zone)
if (*resourcePtr == '/')
resourcePtr++;
/* If the resource has a slash we assume the slash seperates the AppleTalk object
* name from the AppleTalk type. If the slash is not present we assume the AppleTalk
* type is LaserWriter.
*/
/* If the resource has a slash we assume the slash seperates the AppleTalk object
* name from the AppleTalk type. If the slash is not present we assume the AppleTalk
* type is LaserWriter.
*/
typePtr = strchr(resourcePtr, '/');
if (typePtr != NULL) {
*typePtr++ = '\0';
} else {
typePtr = "LaserWriter";
}
typePtr = strchr(resourcePtr, '/');
if (typePtr != NULL)
{
*typePtr++ = '\0';
}
else
{
typePtr = "LaserWriter";
}
removePercentEscapes(hostname, zone, NBP_NVE_STR_SIZE + 1);
removePercentEscapes(resourcePtr, name, NBP_NVE_STR_SIZE + 1);
removePercentEscapes(typePtr, type, NBP_NVE_STR_SIZE + 1);
removePercentEscapes(hostname, zone, NBP_NVE_STR_SIZE + 1);
removePercentEscapes(resourcePtr, name, NBP_NVE_STR_SIZE + 1);
removePercentEscapes(typePtr, type, NBP_NVE_STR_SIZE + 1);
return 0;
}
+14 -19
Ver Arquivo
@@ -122,9 +122,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
}
else if (argc < 6 || argc > 7)
{
_cupsLangPrintf(stderr,
_("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
fprintf(stderr, _("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
return (CUPS_BACKEND_FAILED);
}
@@ -214,9 +213,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
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...
@@ -229,22 +227,19 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if (errno == EBUSY)
{
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 30 seconds...\n"));
fputs(_("INFO: Printer busy; will retry in 30 seconds...\n"), stderr);
sleep(30);
}
else if (errno == ENXIO || errno == EIO || errno == ENOENT)
{
_cupsLangPuts(stderr,
_("INFO: Printer not connected; will retry in 30 "
"seconds...\n"));
fputs(_("INFO: Printer not connected; will retry in 30 seconds...\n"),
stderr);
sleep(30);
}
else
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
fprintf(stderr, _("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
return (CUPS_BACKEND_FAILED);
}
}
@@ -284,13 +279,13 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
tbytes = backendRunLoop(print_fd, device_fd, use_bc, side_cb);
if (print_fd != 0 && tbytes >= 0)
_cupsLangPrintf(stderr,
fprintf(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);
}
/*
@@ -618,7 +613,7 @@ side_cb(int print_fd, /* I - Print file */
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
{
_cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
fputs(_("WARNING: Failed to read side-channel request!\n"), stderr);
return;
}
+6 -6
Ver Arquivo
@@ -118,8 +118,8 @@ backendDrainOutput(int print_fd, /* I - Print file descriptor */
if (errno != ENOSPC && errno != ENXIO && errno != EAGAIN &&
errno != EINTR && errno != ENOTTY)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to write print data: %s\n"),
strerror(errno));
fprintf(stderr, _("ERROR: Unable to write print data: %s\n"),
strerror(errno));
return (-1);
}
}
@@ -230,7 +230,7 @@ backendRunLoop(
if (errno == ENXIO && offline != 1)
{
fputs("STATE: +offline-error\n", stderr);
_cupsLangPuts(stderr, _("INFO: Printer is currently off-line.\n"));
fputs(_("INFO: Printer is currently off-line.\n"), stderr);
offline = 1;
}
else if (errno == EINTR && total_bytes == 0)
@@ -321,7 +321,7 @@ backendRunLoop(
if (paperout != 1)
{
fputs("STATE: +media-empty-error\n", stderr);
_cupsLangPuts(stderr, _("ERROR: Out of paper!\n"));
fputs(_("ERROR: Out of paper!\n"), stderr);
paperout = 1;
}
}
@@ -330,7 +330,7 @@ backendRunLoop(
if (offline != 1)
{
fputs("STATE: +offline-error\n", stderr);
_cupsLangPuts(stderr, _("INFO: Printer is currently off-line.\n"));
fputs(_("INFO: Printer is currently off-line.\n"), stderr);
offline = 1;
}
}
@@ -352,7 +352,7 @@ backendRunLoop(
if (offline)
{
fputs("STATE: -offline-error\n", stderr);
_cupsLangPuts(stderr, _("INFO: Printer is now on-line.\n"));
fputs(_("INFO: Printer is now on-line.\n"), stderr);
offline = 0;
}
+11 -15
Ver Arquivo
@@ -96,8 +96,7 @@ print_device(const char *resource, /* I - SCSI device */
if (strncmp(resource, "/dev/scsi/", 10) != 0)
{
_cupsLangPrintf(stderr, _("ERROR: Bad SCSI device file \"%s\"!\n"),
resource);
fprintf(stderr, _("ERROR: Bad SCSI device file \"%s\"!\n"), resource);
return (CUPS_BACKEND_STOP);
}
@@ -120,9 +119,8 @@ print_device(const char *resource, /* I - SCSI device */
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
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...
@@ -135,15 +133,13 @@ print_device(const char *resource, /* I - SCSI device */
if (errno != EAGAIN && errno != EBUSY)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
fprintf(stderr, _("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
return (CUPS_BACKEND_FAILED);
}
else
{
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 30 seconds...\n"));
fputs(_("INFO: Printer busy; will retry in 30 seconds...\n"), stderr);
sleep(30);
}
}
@@ -205,9 +201,9 @@ print_device(const char *resource, /* I - SCSI device */
if (ioctl(scsi_fd, DS_ENTER, &scsi_req) < 0 ||
scsi_req.ds_status != 0)
{
_cupsLangPrintf(stderr,
_("WARNING: SCSI command timed out (%d); "
"retrying...\n"), scsi_req.ds_status);
fprintf(stderr,
_("WARNING: SCSI command timed out (%d); retrying...\n"),
scsi_req.ds_status);
sleep(try + 1);
}
else
@@ -215,8 +211,8 @@ print_device(const char *resource, /* I - SCSI device */
if (try >= 10)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to send print data (%d)\n"),
scsi_req.ds_status);
fprintf(stderr, _("ERROR: Unable to send print data (%d)\n"),
scsi_req.ds_status);
close(scsi_fd);
return (CUPS_BACKEND_FAILED);
}
+9 -12
Ver Arquivo
@@ -110,8 +110,7 @@ print_device(const char *resource, /* I - SCSI device */
if (strncmp(resource, "/dev/sg", 7) != 0)
{
_cupsLangPrintf(stderr, _("ERROR: Bad SCSI device file \"%s\"!\n"),
resource);
fprintf(stderr, _("ERROR: Bad SCSI device file \"%s\"!\n"), resource);
return (CUPS_BACKEND_STOP);
}
@@ -149,15 +148,13 @@ print_device(const char *resource, /* I - SCSI device */
if (errno != EAGAIN && errno != EBUSY)
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
fprintf(stderr, _("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
return (CUPS_BACKEND_FAILED);
}
else
{
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 30 seconds...\n"));
fputs(_("INFO: Printer busy; will retry in 30 seconds...\n"), stderr);
sleep(30);
}
}
@@ -223,9 +220,9 @@ print_device(const char *resource, /* I - SCSI device */
if (ioctl(scsi_fd, SG_IO, &scsi_req) < 0 ||
scsi_req.status != 0)
{
_cupsLangPrintf(stderr,
_("WARNING: SCSI command timed out (%d); "
"retrying...\n"), scsi_req.status);
fprintf(stderr,
_("WARNING: SCSI command timed out (%d); retrying...\n"),
scsi_req.status);
sleep(try + 1);
}
else
@@ -233,8 +230,8 @@ print_device(const char *resource, /* I - SCSI device */
if (try >= 10)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to send print data (%d)\n"),
scsi_req.status);
fprintf(stderr, _("ERROR: Unable to send print data (%d)\n"),
scsi_req.status);
close(scsi_fd);
return (CUPS_BACKEND_FAILED);
}
+2 -3
Ver Arquivo
@@ -153,9 +153,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
}
else if (argc < 6 || argc > 7)
{
_cupsLangPrintf(stderr,
_("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
fprintf(stderr, _("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
return (CUPS_BACKEND_FAILED);
}
+26 -32
Ver Arquivo
@@ -104,9 +104,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
username[255], /* Username info (not used) */
resource[1024], /* Resource info (device and options) */
*options, /* Pointer to options */
*name, /* Name of option */
*value, /* Value of option */
sep; /* Option separator */
name[255], /* Name of option */
value[255], /* Value of option */
*ptr; /* Pointer into name or value */
int port; /* Port number (not used) */
int copies; /* Number of copies to print */
int print_fd, /* Print file */
@@ -161,9 +161,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
}
else if (argc < 6 || argc > 7)
{
_cupsLangPrintf(stderr,
_("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
fprintf(stderr, _("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
return (CUPS_BACKEND_FAILED);
}
@@ -235,9 +234,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
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...
@@ -250,15 +248,13 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if (errno == EBUSY)
{
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 30 seconds...\n"));
fputs(_("INFO: Printer busy; will retry in 30 seconds...\n"), stderr);
sleep(30);
}
else
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
fprintf(stderr, _("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
return (CUPS_BACKEND_FAILED);
}
}
@@ -289,30 +285,29 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Get the name...
*/
name = options;
for (ptr = name; *options && *options != '=';)
if (ptr < (name + sizeof(name) - 1))
*ptr++ = *options++;
*ptr = '\0';
while (*options && *options != '=' && *options != '+' && *options != '&')
options ++;
if ((sep = *options) != '\0')
*options++ = '\0';
if (sep == '=')
if (*options == '=')
{
/*
* Get the value...
*/
value = options;
options ++;
while (*options && *options != '+' && *options != '&')
for (ptr = value; *options && *options != '+' && *options != '&';)
if (ptr < (value + sizeof(value) - 1))
*ptr++ = *options++;
*ptr = '\0';
if (*options == '+' || *options == '&')
options ++;
if (*options)
*options++ = '\0';
}
else
value = (char *)"";
value[0] = '\0';
/*
* Process the option...
@@ -375,8 +370,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
break;
# endif /* B230400 */
default :
_cupsLangPrintf(stderr, _("WARNING: Unsupported baud rate %s!\n"),
value);
fprintf(stderr, _("WARNING: Unsupported baud rate %s!\n"),
value);
break;
}
#endif /* B19200 == 19200 */
@@ -1252,8 +1247,7 @@ side_cb(int print_fd, /* I - Print file */
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
{
_cupsLangPuts(stderr,
_("WARNING: Failed to read side-channel request!\n"));
fputs(_("WARNING: Failed to read side-channel request!\n"), stderr);
return;
}
+41 -57
Ver Arquivo
@@ -68,9 +68,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
username[255], /* Username info (not used) */
resource[1024], /* Resource info (not used) */
*options, /* Pointer to options */
*name, /* Name of option */
*value, /* Value of option */
sep; /* Option separator */
name[255], /* Name of option */
value[255], /* Value of option */
*ptr; /* Pointer into name or value */
int print_fd; /* Print file */
int copies; /* Number of copies to print */
time_t start_time; /* Time of first connect */
@@ -83,7 +83,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
int device_fd; /* AppSocket */
int error; /* Error code (if any) */
http_addrlist_t *addrlist, /* Address list */
*addr; /* Connected address */
*addr; /* Connected address */
char addrname[256]; /* Address name */
ssize_t tbytes; /* Total number of bytes written */
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
@@ -122,9 +122,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
}
else if (argc < 6 || argc > 7)
{
_cupsLangPrintf(stderr,
_("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
fprintf(stderr, _("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
return (CUPS_BACKEND_FAILED);
}
@@ -191,30 +190,29 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Get the name...
*/
name = options;
for (ptr = name; *options && *options != '=';)
if (ptr < (name + sizeof(name) - 1))
*ptr++ = *options++;
*ptr = '\0';
while (*options && *options != '=' && *options != '+' && *options != '&')
options ++;
if ((sep = *options) != '\0')
*options++ = '\0';
if (sep == '=')
if (*options == '=')
{
/*
* Get the value...
*/
value = options;
options ++;
while (*options && *options != '+' && *options != '&')
for (ptr = value; *options && *options != '+' && *options != '&';)
if (ptr < (value + sizeof(value) - 1))
*ptr++ = *options++;
*ptr = '\0';
if (*options == '+' || *options == '&')
options ++;
if (*options)
*options++ = '\0';
}
else
value = (char *)"";
value[0] = '\0';
/*
* Process the option...
@@ -252,14 +250,12 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to locate printer \'%s\'!\n"),
hostname);
fprintf(stderr, _("ERROR: Unable to locate printer \'%s\'!\n"), hostname);
return (CUPS_BACKEND_STOP);
}
_cupsLangPrintf(stderr,
_("INFO: Attempting to connect to host %s on port %d\n"),
hostname, port);
fprintf(stderr, _("INFO: Attempting to connect to host %s on port %d\n"),
hostname, port);
fputs("STATE: +connecting-to-device\n", stderr);
@@ -279,9 +275,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
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...
@@ -297,16 +292,16 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
{
if (contimeout && (time(NULL) - start_time) > contimeout)
{
_cupsLangPuts(stderr, _("ERROR: Printer not responding!\n"));
fputs(_("ERROR: Printer not responding!\n"), stderr);
return (CUPS_BACKEND_FAILED);
}
recoverable = 1;
_cupsLangPrintf(stderr,
_("WARNING: recoverable: Network host \'%s\' is busy; "
"will retry in %d seconds...\n"),
hostname, delay);
fprintf(stderr,
_("WARNING: recoverable: Network host \'%s\' is busy; will "
"retry in %d seconds...\n"),
hostname, delay);
sleep(delay);
@@ -317,11 +312,9 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
{
recoverable = 1;
_cupsLangPrintf(stderr, "DEBUG: Connection error: %s\n",
strerror(errno));
_cupsLangPuts(stderr,
_("ERROR: recoverable: Unable to connect to printer; "
"will retry in 30 seconds...\n"));
fprintf(stderr, "DEBUG: Connection error: %s\n", strerror(errno));
fputs(_("ERROR: recoverable: Unable to connect to printer; will "
"retry in 30 seconds...\n"), stderr);
sleep(30);
}
}
@@ -342,7 +335,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
}
fputs("STATE: -connecting-to-device\n", stderr);
_cupsLangPrintf(stderr, _("INFO: Connected to %s...\n"), hostname);
fprintf(stderr, _("INFO: Connected to %s...\n"), hostname);
#ifdef AF_INET6
if (addr->addr.addr.sa_family == AF_INET6)
@@ -375,13 +368,13 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
tbytes = backendRunLoop(print_fd, device_fd, 1, side_cb);
if (print_fd != 0 && tbytes >= 0)
_cupsLangPrintf(stderr,
fprintf(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);
}
/*
@@ -396,8 +389,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Shutdown the socket and wait for the other end to finish...
*/
_cupsLangPuts(stderr,
_("INFO: Print file sent, waiting for printer to finish...\n"));
fputs(_("INFO: Print file sent, waiting for printer to finish...\n"),
stderr);
shutdown(device_fd, 1);
@@ -420,7 +413,7 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
close(print_fd);
if (tbytes >= 0)
_cupsLangPuts(stderr, _("INFO: Ready to print.\n"));
fputs(_("INFO: Ready to print.\n"), stderr);
return (tbytes < 0 ? CUPS_BACKEND_FAILED : CUPS_BACKEND_OK);
}
@@ -439,14 +432,13 @@ side_cb(int print_fd, /* I - Print file */
cups_sc_status_t status; /* Request/response status */
char data[2048]; /* Request/response data */
int datalen; /* Request/response data size */
const char *device_id; /* 1284DEVICEID env var */
datalen = sizeof(data);
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
{
_cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
fputs(_("WARNING: Failed to read side-channel request!\n"), stderr);
return;
}
@@ -470,14 +462,6 @@ side_cb(int print_fd, /* I - Print file */
datalen = 1;
break;
case CUPS_SC_CMD_GET_DEVICE_ID :
if ((device_id = getenv("1284DEVICEID")) != NULL)
{
strlcpy(data, device_id, sizeof(data));
datalen = (int)strlen(data);
break;
}
default :
status = CUPS_SC_STATUS_NOT_IMPLEMENTED;
datalen = 0;
+82 -118
Ver Arquivo
@@ -1,7 +1,7 @@
/*
* "$Id$"
*
* Copyright 2005-2007 Apple Inc. All rights reserved.
* Copyright © 2005-2007 Apple Inc. All rights reserved.
*
* IMPORTANT: This Apple software is supplied to you by Apple Computer,
* Inc. ("Apple") in consideration of your agreement to the following
@@ -267,7 +267,7 @@ static void copy_devicestring(io_service_t usbInterface, CFStringRef *deviceID,
static void device_added(void *userdata, io_iterator_t iterator);
static void get_device_id(cups_sc_status_t *status, char *data, int *datalen);
static void iterate_printers(iterator_callback_t callBack, void *userdata);
static void parse_options(char *options, char *serial, int serial_size, UInt32 *location, Boolean *wait_eof);
static void parse_options(const char *options, char *serial, UInt32 *location, Boolean *wait_eof);
static void release_deviceinfo(CFStringRef *make, CFStringRef *model, CFStringRef *serial);
static void setup_cfLanguage(void);
static void soft_reset();
@@ -304,7 +304,7 @@ int /* O - Exit status */
print_device(const char *uri, /* I - Device URI */
const char *hostname, /* I - Hostname/manufacturer */
const char *resource, /* I - Resource/modelname */
char *options, /* I - Device options/serial number */
const 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) */
@@ -313,8 +313,7 @@ print_device(const char *uri, /* I - Device URI */
char serial[1024]; /* Serial number buffer */
OSStatus status; /* Function results */
pthread_t read_thread_id, /* Read thread */
sidechannel_thread_id;/* Side-channel thread */
int sidechannel_started = 0;/* Was the side-channel thread started? */
sidechannel_thread_id;/* Side channel thread */
char print_buffer[8192], /* Print data buffer */
*print_ptr; /* Pointer into print data buffer */
UInt32 location; /* Unique location in bus topology */
@@ -328,10 +327,9 @@ print_device(const char *uri, /* I - Device URI */
stimeout; /* Timeout for select() */
struct timespec cond_timeout; /* pthread condition timeout */
setup_cfLanguage();
parse_options(options, serial, sizeof(serial), &location, &g.wait_eof);
parse_options(options, serial, &location, &g.wait_eof);
if (resource[0] == '/')
resource++;
@@ -389,7 +387,7 @@ print_device(const char *uri, /* I - Device URI */
strlcpy(print_buffer, "USB class driver", sizeof(print_buffer));
fputs("STATE: +apple-missing-usbclassdriver-error\n", stderr);
_cupsLangPrintf(stderr, _("FATAL: Could not load %s\n"), print_buffer);
fprintf(stderr, _("FATAL: Could not load %s\n"), print_buffer);
if (driverBundlePath)
CFRelease(driverBundlePath);
@@ -406,8 +404,7 @@ print_device(const char *uri, /* I - Device URI */
countdown -= PRINTER_POLLING_INTERVAL;
if (countdown <= 0)
{
_cupsLangPrintf(stderr, _("INFO: Printer busy (status:0x%08x)\n"),
(int)status);
fprintf(stderr, _("INFO: Printer busy (status:0x%08x)\n"), (int)status);
countdown = SUBSEQUENT_LOG_INTERVAL; /* subsequent log entries, every 15 seconds */
}
}
@@ -459,11 +456,9 @@ print_device(const char *uri, /* I - Device URI */
if (pthread_create(&sidechannel_thread_id, NULL, sidechannel_thread, NULL))
{
_cupsLangPuts(stderr, _("WARNING: Couldn't create side channel\n"));
fputs(_("WARNING: Couldn't create side channel\n"), stderr);
return CUPS_BACKEND_STOP;
}
sidechannel_started = 1;
}
/*
@@ -478,7 +473,7 @@ print_device(const char *uri, /* I - Device URI */
if (pthread_create(&read_thread_id, NULL, read_thread, NULL))
{
_cupsLangPuts(stderr, _("WARNING: Couldn't create read channel\n"));
fputs(_("WARNING: Couldn't create read channel\n"), stderr);
return CUPS_BACKEND_STOP;
}
@@ -493,7 +488,7 @@ print_device(const char *uri, /* I - Device URI */
while (status == noErr && copies-- > 0)
{
_cupsLangPuts(stderr, _("INFO: Sending data\n"));
fputs(_("INFO: Sending data\n"), stderr);
if (print_fd != STDIN_FILENO)
{
@@ -561,7 +556,7 @@ print_device(const char *uri, /* I - Device URI */
}
else if (errno != EAGAIN)
{
_cupsLangPrintf(stderr, _("ERROR: select() returned %d\n"), (int)errno);
fprintf(stderr, _("ERROR: select() returned %d\n"), (int)errno);
return CUPS_BACKEND_STOP;
}
}
@@ -637,8 +632,7 @@ print_device(const char *uri, /* I - Device URI */
*/
OSStatus err = (*g.classdriver)->Abort(g.classdriver);
_cupsLangPrintf(stderr, _("ERROR: %ld: (canceled:%ld)\n"),
(long)status, (long)err);
fprintf(stderr, _("ERROR: %ld: (canceled:%ld)\n"), (long)status, (long)err);
status = CUPS_BACKEND_STOP;
break;
}
@@ -662,42 +656,27 @@ print_device(const char *uri, /* I - Device URI */
* Wait for the side channel thread to exit...
*/
if (sidechannel_started)
close(CUPS_SC_FD);
pthread_mutex_lock(&g.readwrite_lock_mutex);
g.readwrite_lock = 0;
pthread_cond_signal(&g.readwrite_lock_cond);
pthread_mutex_unlock(&g.readwrite_lock_mutex);
g.sidechannel_thread_stop = 1;
pthread_mutex_lock(&g.sidechannel_thread_mutex);
if (!g.sidechannel_thread_done)
{
close(CUPS_SC_FD);
pthread_mutex_lock(&g.readwrite_lock_mutex);
g.readwrite_lock = 0;
pthread_cond_signal(&g.readwrite_lock_cond);
pthread_mutex_unlock(&g.readwrite_lock_mutex);
g.sidechannel_thread_stop = 1;
pthread_mutex_lock(&g.sidechannel_thread_mutex);
if (!g.sidechannel_thread_done)
{
/*
* Wait for the side-channel thread to exit...
*/
cond_timeout.tv_sec = time(NULL) + WAIT_SIDE_DELAY;
cond_timeout.tv_nsec = 0;
if (pthread_cond_timedwait(&g.sidechannel_thread_cond,
&g.sidechannel_thread_mutex,
&cond_timeout) != 0)
{
/*
* Force the side-channel thread to exit...
*/
pthread_kill(sidechannel_thread_id, SIGTERM);
}
}
pthread_mutex_unlock(&g.sidechannel_thread_mutex);
pthread_join(sidechannel_thread_id, NULL);
pthread_cond_destroy(&g.sidechannel_thread_cond);
pthread_mutex_destroy(&g.sidechannel_thread_mutex);
cond_timeout.tv_sec = time(NULL) + WAIT_SIDE_DELAY;
cond_timeout.tv_nsec = 0;
pthread_cond_timedwait(&g.sidechannel_thread_cond,
&g.sidechannel_thread_mutex, &cond_timeout);
}
pthread_mutex_unlock(&g.sidechannel_thread_mutex);
pthread_join(sidechannel_thread_id, NULL);
pthread_cond_destroy(&g.sidechannel_thread_cond);
pthread_mutex_destroy(&g.sidechannel_thread_mutex);
pthread_cond_destroy(&g.readwrite_lock_cond);
pthread_mutex_destroy(&g.readwrite_lock_mutex);
@@ -710,7 +689,9 @@ print_device(const char *uri, /* I - Device URI */
/*
* Give the read thread WAIT_EOF_DELAY seconds to complete all the data. If
* we are not signaled in that time then force the thread to exit.
* we are not signaled in that time then force the thread to exit by setting
* the waiteof to be false. Plese note that this relies on us using the timeout
* class driver.
*/
pthread_mutex_lock(&g.read_thread_mutex);
@@ -722,13 +703,7 @@ print_device(const char *uri, /* I - Device URI */
if (pthread_cond_timedwait(&g.read_thread_cond, &g.read_thread_mutex,
&cond_timeout) != 0)
{
/*
* Force the read thread to exit...
*/
pthread_kill(read_thread_id, SIGTERM);
}
g.wait_eof = false;
}
pthread_mutex_unlock(&g.read_thread_mutex);
@@ -852,16 +827,8 @@ sidechannel_thread(void *reference)
switch (command)
{
case CUPS_SC_CMD_SOFT_RESET: /* Do a soft reset */
if ((*g.classdriver)->SoftReset != NULL)
{
soft_reset();
cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, NULL, 0, 1.0);
}
else
{
cupsSideChannelWrite(command, CUPS_SC_STATUS_NOT_IMPLEMENTED,
NULL, 0, 1.0);
}
soft_reset();
cupsSideChannelWrite(command, CUPS_SC_STATUS_OK, NULL, 0, 1.0);
break;
case CUPS_SC_CMD_DRAIN_OUTPUT: /* Drain all pending output */
@@ -1124,7 +1091,7 @@ static Boolean find_device_cb(void *refcon,
if (!keepLooking && g.status_timer != NULL)
{
fputs("STATE: -offline-error\n", stderr);
_cupsLangPuts(stderr, _("INFO: Printer is now on-line.\n"));
fputs(_("INFO: Printer is now on-line.\n"), stderr);
CFRunLoopRemoveTimer(CFRunLoopGetCurrent(), g.status_timer, kCFRunLoopDefaultMode);
CFRelease(g.status_timer);
g.status_timer = NULL;
@@ -1142,7 +1109,7 @@ static void status_timer_cb(CFRunLoopTimerRef timer,
void *info)
{
fputs("STATE: +offline-error\n", stderr);
_cupsLangPuts(stderr, _("INFO: Printer is currently off-line.\n"));
fputs(_("INFO: Printer is currently off-line.\n"), stderr);
}
@@ -1574,19 +1541,18 @@ CFStringRef cfstr_create_trim(const char *cstr)
#pragma mark -
/*
* 'parse_options()' - Parse URI options.
* 'parse_options()' - Parse uri options.
*/
static void parse_options(char *options,
static void parse_options(const char *options,
char *serial,
int serial_size,
UInt32 *location,
Boolean *wait_eof)
{
char sep, /* Separator character */
*name, /* Name of option */
*value; /* Value of option */
char *serialnumber; /* ?serial=<serial> or ?location=<location> */
char optionName[255], /* Name of option */
value[255], /* Value of option */
*ptr; /* Pointer into name or value */
if (serial)
*serial = '\0';
@@ -1596,61 +1562,59 @@ static void parse_options(char *options,
if (!options)
return;
while (*options)
serialnumber = NULL;
while (*options != '\0')
{
/*
* Get the name...
*/
/* Get the name... */
for (ptr = optionName; *options && *options != '=' && *options != '+';)
*ptr++ = *options++;
name = options;
*ptr = '\0';
value[0] = '\0';
while (*options && *options != '=' && *options != '+' && *options != '&')
if (*options == '=')
{
/* Get the value... */
options ++;
if ((sep = *options) != '\0')
*options++ = '\0';
for (ptr = value; *options && *options != '+';)
*ptr++ = *options++;
if (sep == '=')
{
/*
* Get the value...
*/
*ptr = '\0';
value = options;
while (*options && *options != '+' && *options != '&')
if (*options == '+')
options ++;
if (*options)
*options++ = '\0';
}
else
value = (char *)"";
else if (*options == '+')
options ++;
/*
* Process the option...
*/
if (!strcasecmp(name, "waiteof"))
/*
* Process the option...
*/
if (strcasecmp(optionName, "waiteof") == 0)
{
if (!strcasecmp(value, "on") ||
!strcasecmp(value, "yes") ||
!strcasecmp(value, "true"))
if (strcasecmp(value, "on") == 0 ||
strcasecmp(value, "yes") == 0 ||
strcasecmp(value, "true") == 0)
*wait_eof = true;
else if (!strcasecmp(value, "off") ||
!strcasecmp(value, "no") ||
!strcasecmp(value, "false"))
else if (strcasecmp(value, "off") == 0 ||
strcasecmp(value, "no") == 0 ||
strcasecmp(value, "false") == 0)
*wait_eof = false;
else
_cupsLangPrintf(stderr,
_("WARNING: Boolean expected for waiteof option "
"\"%s\"\n"), value);
fprintf(stderr, _("WARNING: Boolean expected for waiteof option \"%s\"\n"), value);
}
else if (!strcasecmp(name, "serial"))
strlcpy(serial, value, serial_size);
else if (!strcasecmp(name, "location") && location)
else if (strcasecmp(optionName, "serial") == 0)
{
strcpy(serial, value);
serialnumber = serial;
}
else if (strcasecmp(optionName, "location") == 0 && location)
*location = strtol(value, NULL, 16);
}
return;
}
@@ -1924,7 +1888,7 @@ static void parse_pserror(char *sockBuffer,
/*
* 'soft_reset()' - Send a soft reset to the device.
* 'soft_reset'
*/
static void soft_reset()
+17 -21
Ver Arquivo
@@ -48,7 +48,7 @@ int /* O - Exit status */
print_device(const char *uri, /* I - Device URI */
const char *hostname, /* I - Hostname/manufacturer */
const char *resource, /* I - Resource/modelname */
char *options, /* I - Device options/serial number */
const 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) */
@@ -105,9 +105,8 @@ print_device(const char *uri, /* I - Device URI */
* available printer in the class.
*/
_cupsLangPuts(stderr,
_("INFO: Unable to contact printer, queuing on next "
"printer in class...\n"));
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...
@@ -120,23 +119,20 @@ print_device(const char *uri, /* I - Device URI */
if (errno == EBUSY)
{
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 10 seconds...\n"));
fputs(_("INFO: Printer busy; will retry in 10 seconds...\n"), stderr);
sleep(10);
}
else if (errno == ENXIO || errno == EIO || errno == ENOENT ||
errno == ENODEV)
{
_cupsLangPuts(stderr,
_("INFO: Printer not connected; will retry in 30 "
"seconds...\n"));
fputs(_("INFO: Printer not connected; will retry in 30 seconds...\n"),
stderr);
sleep(30);
}
else
{
_cupsLangPrintf(stderr,
_("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
fprintf(stderr, _("ERROR: Unable to open device file \"%s\": %s\n"),
resource, strerror(errno));
return (CUPS_BACKEND_FAILED);
}
}
@@ -176,13 +172,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)
_cupsLangPrintf(stderr,
fprintf(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);
}
/*
@@ -415,8 +411,8 @@ open_device(const char *uri, /* I - Device URI */
if (busy)
{
_cupsLangPuts(stderr,
_("INFO: Printer busy; will retry in 5 seconds...\n"));
fputs(_("INFO: Printer busy; will retry in 5 seconds...\n"),
stderr);
sleep(5);
}
}
@@ -508,8 +504,8 @@ open_device(const char *uri, /* I - Device URI */
if (busy)
{
_cupsLangPuts(stderr,
_("INFO: Printer is busy; will retry in 5 seconds...\n"));
fputs(_("INFO: Printer is busy; will retry in 5 seconds...\n"),
stderr);
sleep(5);
}
}
@@ -566,7 +562,7 @@ side_cb(int print_fd, /* I - Print file */
if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
{
_cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
fputs(_("WARNING: Failed to read side-channel request!\n"), stderr);
return;
}
+8 -10
Ver Arquivo
@@ -54,7 +54,7 @@
void list_devices(void);
int print_device(const char *uri, const char *hostname,
const char *resource, char *options,
const char *resource, const char *options,
int print_fd, int copies, int argc, char *argv[]);
@@ -99,7 +99,7 @@ int /* O - Exit status */
print_device(const char *uri, /* I - Device URI */
const char *hostname, /* I - Hostname/manufacturer */
const char *resource, /* I - Resource/modelname */
char *options, /* I - Device options/serial number */
const 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) */
@@ -184,9 +184,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
}
else if (argc < 6 || argc > 7)
{
_cupsLangPrintf(stderr,
_("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
fprintf(stderr, _("Usage: %s job-id user title copies options [file]\n"),
argv[0]);
return (CUPS_BACKEND_FAILED);
}
@@ -201,9 +200,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
hostname, sizeof(hostname), &port,
resource, sizeof(resource)) < HTTP_URI_OK)
{
_cupsLangPuts(stderr,
_("ERROR: No device URI found in argv[0] or in DEVICE_URI "
"environment variable!\n"));
fputs(_("ERROR: No device URI found in argv[0] or in DEVICE_URI "
"environment variable!\n"), stderr);
return (1);
}
@@ -239,8 +237,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
if ((print_fd = open(argv[6], O_RDONLY)) < 0)
{
_cupsLangPrintf(stderr, _("ERROR: Unable to open print file %s - %s\n"),
argv[6], strerror(errno));
fprintf(stderr, _("ERROR: Unable to open print file %s - %s\n"),
argv[6], strerror(errno));
return (CUPS_BACKEND_FAILED);
}
-1
Ver Arquivo
@@ -151,7 +151,6 @@ main(int argc, /* I - Number of command-line arguments */
cgiSetVariable("HELPFILE", helpfile);
cgiSetVariable("HELPTITLE", n->text);
cgiSetVariable("TOPIC", n->section);
/*
* Send a standard page header...
+19 -19
Ver Arquivo
@@ -85,9 +85,9 @@ cgiCopyTemplateFile(FILE *out, /* I - Output file */
void
cgiCopyTemplateLang(const char *tmpl) /* I - Base filename */
{
int i; /* Looping var */
char filename[1024], /* Filename */
locale[16], /* Locale name */
*locptr; /* Pointer into locale name */
locale[16]; /* Locale name */
const char *directory, /* Directory for templates */
*lang; /* Language */
FILE *in; /* Input file */
@@ -100,19 +100,22 @@ cgiCopyTemplateLang(const char *tmpl) /* I - Base filename */
* Convert the language to a locale name...
*/
locale[0] = '\0';
if ((lang = getenv("LANG")) != NULL)
{
locale[0] = '/';
strlcpy(locale + 1, lang, sizeof(locale) - 1);
for (i = 0; lang[i] && i < 15; i ++)
if (isalnum(lang[i] & 255) || lang[i] == '_')
locale[i] = tolower(lang[i]);
else if (lang[i] == '-')
locale[i] = '_';
else
break;
if ((locptr = strchr(locale, '.')) != NULL)
*locptr = '\0'; /* Strip charset */
locale[i] = '\0';
}
else
locale[0] = '\0';
fprintf(stderr, "DEBUG: lang=\"%s\", locale=\"%s\"...\n",
lang ? lang : "(null)", locale);
fprintf(stderr, "DEBUG2: locale=\"%s\"...\n", locale);
/*
* See if we have a template file for this language...
@@ -120,17 +123,14 @@ cgiCopyTemplateLang(const char *tmpl) /* I - Base filename */
directory = cgiGetTemplateDir();
snprintf(filename, sizeof(filename), "%s%s/%s", directory, locale, tmpl);
if ((in = fopen(filename, "r")) == NULL)
snprintf(filename, sizeof(filename), "%s/%s/%s", directory, locale, tmpl);
if (access(filename, 0))
{
locale[3] = '\0';
locale[2] = '\0';
snprintf(filename, sizeof(filename), "%s%s/%s", directory, locale, tmpl);
if ((in = fopen(filename, "r")) == NULL)
{
snprintf(filename, sizeof(filename), "%s/%s/%s", directory, locale, tmpl);
if (access(filename, 0))
snprintf(filename, sizeof(filename), "%s/%s", directory, tmpl);
in = fopen(filename, "r");
}
}
fprintf(stderr, "DEBUG2: Template file is \"%s\"...\n", filename);
@@ -139,7 +139,7 @@ cgiCopyTemplateLang(const char *tmpl) /* I - Base filename */
* Open the template file...
*/
if (!in)
if ((in = fopen(filename, "r")) == NULL)
{
fprintf(stderr, "ERROR: Unable to open template file \"%s\" - %s\n",
filename, strerror(errno));
+2 -2
Ver Arquivo
@@ -95,8 +95,8 @@ image/x-xpixmap application/vnd.cups-raster 100 imagetoraster
#image/x-xwindowdump application/vnd.cups-raster 100 imagetoraster
image/x-sun-raster application/vnd.cups-raster 100 imagetoraster
# pstoraster is part of GPL Ghostscript...
application/vnd.cups-postscript application/vnd.cups-raster 100 pstoraster
# pstoraster is now part of ESP Ghostscript...
#application/vnd.cups-postscript application/vnd.cups-raster 100 pstoraster
########################################################################
#
+5 -6
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-common.m4 6965 2007-09-17 21:34:07Z mike $"
dnl "$Id: cups-common.m4 6749 2007-07-31 00:00:21Z mike $"
dnl
dnl Common configuration stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -13,14 +13,14 @@ dnl which should have been included with this file. If this file is
dnl file is missing or damaged, see the license at "http://www.cups.org/".
dnl
dnl We need at least autoconf 2.60...
AC_PREREQ(2.60)
dnl We need at least autoconf 2.50...
AC_PREREQ(2.50)
dnl Set the name of the config header file...
AC_CONFIG_HEADER(config.h)
dnl Versio number information...
CUPS_VERSION="1.3.2"
CUPS_VERSION="1.3rc2"
CUPS_REVISION=""
#if test -z "$CUPS_REVISION" -a -d .svn; then
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
@@ -123,7 +123,6 @@ AC_CHECK_HEADER(strings.h,AC_DEFINE(HAVE_STRINGS_H))
AC_CHECK_HEADER(bstring.h,AC_DEFINE(HAVE_BSTRING_H))
AC_CHECK_HEADER(usersec.h,AC_DEFINE(HAVE_USERSEC_H))
AC_CHECK_HEADER(sys/ioctl.h,AC_DEFINE(HAVE_SYS_IOCTL_H))
AC_CHECK_HEADER(sys/param.h,AC_DEFINE(HAVE_SYS_PARAM_H))
AC_CHECK_HEADER(sys/ucred.h,AC_DEFINE(HAVE_SYS_UCRED_H))
AC_CHECK_HEADER(scsi/sg.h,AC_DEFINE(HAVE_SCSI_SG_H))
@@ -287,5 +286,5 @@ AC_SUBST(DEFAULT_IPP_PORT)
AC_DEFINE_UNQUOTED(CUPS_DEFAULT_IPP_PORT,$DEFAULT_IPP_PORT)
dnl
dnl End of "$Id: cups-common.m4 6965 2007-09-17 21:34:07Z mike $".
dnl End of "$Id: cups-common.m4 6749 2007-07-31 00:00:21Z mike $".
dnl
+2 -36
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-compiler.m4 6976 2007-09-18 20:39:31Z mike $"
dnl "$Id: cups-compiler.m4 6698 2007-07-20 14:15:44Z mike $"
dnl
dnl Compiler stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -301,40 +301,6 @@ else
if test $PICFLAG = 1; then
OPTIM="+z $OPTIM"
fi
if test "x$enable_32bit" = xyes; then
# Build 32-bit libraries, 64-bit base...
if test -z "$with_arch32flags"; then
ARCH32FLAGS="+DD32"
else
ARCH32FLAGS="$with_arch32flags"
fi
if test -z "$with_archflags"; then
if test -z "$with_arch64flags"; then
ARCHFLAGS="+DD64"
else
ARCHFLAGS="$with_arch64flags"
fi
fi
fi
if test "x$enable_64bit" = xyes; then
# Build 64-bit libraries, 32-bit base...
if test -z "$with_arch64flags"; then
ARCH64FLAGS="+DD64"
else
ARCH64FLAGS="$with_arch64flags"
fi
if test -z "$with_archflags"; then
if test -z "$with_arch32flags"; then
ARCHFLAGS="+DD32"
else
ARCHFLAGS="$with_arch32flags"
fi
fi
fi
;;
IRIX)
if test -z "$OPTIM"; then
@@ -498,5 +464,5 @@ case $uname in
esac
dnl
dnl End of "$Id: cups-compiler.m4 6976 2007-09-18 20:39:31Z mike $".
dnl End of "$Id: cups-compiler.m4 6698 2007-07-20 14:15:44Z mike $".
dnl
+2 -4
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-defaults.m4 6754 2007-08-01 19:00:07Z mike $"
dnl "$Id: cups-defaults.m4 6740 2007-07-26 23:07:46Z mike $"
dnl
dnl Default cupsd configuration settings for the Common UNIX Printing System
dnl (CUPS).
@@ -165,7 +165,6 @@ AC_ARG_WITH(cups_user, [ --with-cups-user set default user for CUPS],
else
CUPS_USER="_lp";
fi
AC_MSG_RESULT($CUPS_USER)
elif test -f /etc/passwd; then
CUPS_USER=""
for user in lp lpd guest daemon nobody; do
@@ -194,7 +193,6 @@ AC_ARG_WITH(cups_group, [ --with-cups-group set default group for CUPS],
else
CUPS_GROUP="_lp";
fi
AC_MSG_RESULT($CUPS_GROUP)
elif test -f /etc/group; then
GROUP_LIST="_lp lp nobody"
CUPS_GROUP=""
@@ -338,5 +336,5 @@ AC_SUBST(CUPS_SNMP_ADDRESS)
AC_SUBST(CUPS_SNMP_COMMUNITY)
dnl
dnl End of "$Id: cups-defaults.m4 6754 2007-08-01 19:00:07Z mike $".
dnl End of "$Id: cups-defaults.m4 6740 2007-07-26 23:07:46Z mike $".
dnl
+27 -38
Ver Arquivo
@@ -1,5 +1,5 @@
dnl
dnl "$Id: cups-directories.m4 6976 2007-09-18 20:39:31Z mike $"
dnl "$Id: cups-directories.m4 6649 2007-07-11 21:46:42Z mike $"
dnl
dnl Directory stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -99,23 +99,17 @@ if test "$sysconfdir" = "\${prefix}/etc"; then
fi
fi
dnl Fix "libdir" variable...
dnl Fix "libdir" variable for IRIX 6.x...
if test "$libdir" = "\${exec_prefix}/lib"; then
case "$uname" in
IRIX*)
libdir="$exec_prefix/lib32"
;;
Linux*)
if test -d /usr/lib64; then
libdir="$exec_prefix/lib64"
fi
;;
HP-UX*)
if test -d /usr/lib/hpux32; then
libdir="$exec_prefix/lib/hpux32"
fi
;;
esac
if test "$uname" = "IRIX"; then
libdir="$exec_prefix/lib32"
else
if test "$uname" = Linux -a -d /usr/lib64; then
libdir="$exec_prefix/lib64"
else
libdir="$exec_prefix/lib"
fi
fi
fi
dnl Setup init.d locations...
@@ -152,8 +146,8 @@ if test x$rcdir = x; then
HP-UX*)
INITDIR="/sbin"
RCLEVELS="2"
RCSTART="380"
RCSTOP="620"
RCSTART="620"
RCSTOP="380"
;;
IRIX*)
@@ -297,26 +291,21 @@ fi
AC_SUBST(CUPS_FONTPATH)
AC_DEFINE_UNQUOTED(CUPS_FONTPATH, "$CUPS_FONTPATH")
# Locale data (initial assignment allows us not to require autoconf 2.60)
localedir="${localedir:=}"
if test "$localedir" = "\${datarootdir}/locale" -o "$localedir" = ""; then
case "$uname" in
Linux | GNU | *BSD* | Darwin*)
CUPS_LOCALEDIR="$datadir/locale"
;;
# Locale data
case "$uname" in
Linux | GNU | *BSD* | Darwin*)
CUPS_LOCALEDIR="$datadir/locale"
;;
OSF1* | AIX*)
CUPS_LOCALEDIR="$exec_prefix/lib/nls/msg"
;;
OSF1* | AIX*)
CUPS_LOCALEDIR="$exec_prefix/lib/nls/msg"
;;
*)
# This is the standard System V location...
CUPS_LOCALEDIR="$exec_prefix/lib/locale"
;;
esac
else
CUPS_LOCALEDIR="$localedir"
fi
*)
# This is the standard System V location...
CUPS_LOCALEDIR="$exec_prefix/lib/locale"
;;
esac
AC_DEFINE_UNQUOTED(CUPS_LOCALEDIR, "$CUPS_LOCALEDIR")
AC_SUBST(CUPS_LOCALEDIR)
@@ -367,5 +356,5 @@ AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$localstatedir/run/cups")
AC_SUBST(CUPS_STATEDIR)
dnl
dnl End of "$Id: cups-directories.m4 6976 2007-09-18 20:39:31Z mike $".
dnl End of "$Id: cups-directories.m4 6649 2007-07-11 21:46:42Z mike $".
dnl
+1 -1
Ver Arquivo
@@ -60,7 +60,7 @@ if test x$enable_gssapi != xno; then
AC_CHECK_FUNC(gsskrb5_register_acceptor_identity,
AC_DEFINE(HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY))
AC_CHECK_FUNC(krb5_cc_new_unique, AC_DEFINE(HAVE_KRB5_CC_NEW_UNIQUE))
AC_CHECK_FUNC(krb5_cc_resolve, AC_DEFINE(HAVE_KRB5_CC_RESOLVE))
AC_MSG_CHECKING(for GSS_C_NT_HOSTBASED_SERVICE)
if test $ac_cv_header_gssapi_gssapi_h = yes; then
+1 -8
Ver Arquivo
@@ -495,7 +495,7 @@
#undef HAVE_GSSAPI_GSSAPI_KRB5_H
#undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY
#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
#undef HAVE_KRB5_CC_NEW_UNIQUE
#undef HAVE_KRB5_CC_RESOLVE
#undef HAVE_KRB5_H
#undef HAVE_HEIMDAL
@@ -523,13 +523,6 @@
#undef HAVE_DLFCN_H
/*
* Do we have <sys/param.h>?
*/
#undef HAVE_SYS_PARAM_H
/*
* Do we have <sys/ucred.h>?
*/
+1 -3
Ver Arquivo
@@ -293,7 +293,7 @@ cupsDoAuthentication(http_t *http, /* I - HTTP connection to server */
{
# ifdef DEBUG
DEBUG_gss_printf(major_status, minor_status,
"Unable to initialize security context");
"Unable to initialise security context");
# endif /* DEBUG */
return (-1);
}
@@ -425,8 +425,6 @@ cups_get_gss_creds(
snprintf(buf, sizeof(buf), "%s@%s", service_name, fqdn);
DEBUG_printf(("cups_get_gss_creds: Looking up %s...\n", buf));
token.value = buf;
token.length = strlen(buf);
server_name = GSS_C_NO_NAME;
+2 -2
Ver Arquivo
@@ -59,10 +59,10 @@ extern "C" {
* Constants...
*/
# define CUPS_VERSION 1.0302
# define CUPS_VERSION 1.0300
# define CUPS_VERSION_MAJOR 1
# define CUPS_VERSION_MINOR 3
# define CUPS_VERSION_PATCH 2
# define CUPS_VERSION_PATCH 0
# define CUPS_DATE_ANY -1
+3 -13
Ver Arquivo
@@ -1207,7 +1207,7 @@ cupsFileRead(cups_file_t *fp, /* I - CUPS file */
if (fp->ptr >= fp->end)
if (cups_fill(fp) <= 0)
{
DEBUG_printf((" cups_fill() returned -1, total=%d\n", (int)total));
DEBUG_printf((" cups_fill() returned -1, total=%d\n", total));
if (total > 0)
return ((ssize_t)total);
@@ -1235,7 +1235,7 @@ cupsFileRead(cups_file_t *fp, /* I - CUPS file */
* Return the total number of bytes read...
*/
DEBUG_printf((" total=%d\n", (int)total));
DEBUG_printf((" total=%d\n", total));
return ((ssize_t)total);
}
@@ -1703,7 +1703,6 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
{
ssize_t bytes; /* Number of bytes read */
#ifdef HAVE_LIBZ
int status; /* Decompression status */
const unsigned char *ptr, /* Pointer into buffer */
*end; /* End of buffer */
#endif /* HAVE_LIBZ */
@@ -1922,13 +1921,7 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
fp->stream.next_out = (Bytef *)fp->buf;
fp->stream.avail_out = sizeof(fp->buf);
status = inflate(&(fp->stream), Z_NO_FLUSH);
if (fp->stream.next_out > (Bytef *)fp->buf)
fp->crc = crc32(fp->crc, (Bytef *)fp->buf,
fp->stream.next_out - (Bytef *)fp->buf);
if (status == Z_STREAM_END)
if (inflate(&(fp->stream), Z_NO_FLUSH) == Z_STREAM_END)
{
/*
* Read the CRC and length...
@@ -1957,9 +1950,6 @@ cups_fill(cups_file_t *fp) /* I - CUPS file */
* Bad CRC, mark end-of-file...
*/
DEBUG_printf(("cups_fill: tcrc=%08x, fp->crc=%08x\n",
(unsigned int)tcrc, (unsigned int)fp->crc));
fp->eof = 1;
return (-1);
+11 -10
Ver Arquivo
@@ -197,17 +197,18 @@ httpAddrLookup(
#endif /* AF_LOCAL */
#ifdef HAVE_GETNAMEINFO
{
/*
* STR #2486: httpAddrLookup() fails when getnameinfo() returns EAI_AGAIN
*
* FWIW, I think this is really a bug in the implementation of
* getnameinfo(), but falling back on httpAddrString() is easy to
* do...
*/
if (getnameinfo(&addr->addr, httpAddrLength(addr), name, namelen,
NULL, 0, 0))
return (httpAddrString(addr, name, namelen));
NULL, 0, 0))
{
/*
* If we get an error back, then the address type is not supported
* and we should zero out the buffer...
*/
name[0] = '\0';
return (NULL);
}
}
#else
{
-3
Ver Arquivo
@@ -62,9 +62,6 @@
# ifndef HAVE_GSS_C_NT_HOSTBASED_SERVICE
# define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
# endif /* !HAVE_GSS_C_NT_HOSTBASED_SERVICE */
# ifdef HAVE_KRB5_H
# include <krb5.h>
# endif /* HAVE_KRB5_H */
# endif /* HAVE_GSSAPI */
# ifdef HAVE_AUTHORIZATION_H
+45 -62
Ver Arquivo
@@ -985,12 +985,11 @@ typedef struct
static const _apple_name_locale_t apple_name_locale[] =
{
{ "en" , "en_US" },
{ "nb" , "no" },
{ "no" , "nb" },
{ "zh-Hans" , "zh_CN" },
{ "zh-Hant" , "zh_TW" }
};
/*
* 'appleLangDefault()' - Get the default locale string.
*/
@@ -999,8 +998,6 @@ static const char * /* O - Locale string */
appleLangDefault(void)
{
int i; /* Looping var */
CFBundleRef bundle; /* Main bundle (if any) */
CFArrayRef bundleList; /* List of localizations in bundle */
CFPropertyListRef localizationList;
/* List of localization data */
CFStringRef languageName; /* Current name */
@@ -1017,77 +1014,63 @@ appleLangDefault(void)
if (!cg->language[0])
{
if ((lang = getenv("LANG")))
{
strlcpy(cg->language, lang, sizeof(cg->language));
return (cg->language);
}
else if ((bundle = CFBundleGetMainBundle()) != NULL &&
(bundleList = CFBundleCopyBundleLocalizations(bundle)) != NULL)
{
localizationList =
CFBundleCopyPreferredLocalizationsFromArray(bundleList);
CFRelease(bundleList);
}
else
localizationList =
CFPreferencesCopyAppValue(CFSTR("AppleLanguages"),
kCFPreferencesCurrentApplication);
if (localizationList)
{
if (CFGetTypeID(localizationList) == CFArrayGetTypeID() &&
CFArrayGetCount(localizationList) > 0)
localizationList =
CFPreferencesCopyAppValue(CFSTR("AppleLanguages"),
kCFPreferencesCurrentApplication);
if (localizationList != NULL)
{
languageName = CFArrayGetValueAtIndex(localizationList, 0);
if (languageName &&
CFGetTypeID(languageName) == CFStringGetTypeID())
if (CFGetTypeID(localizationList) == CFArrayGetTypeID() &&
CFArrayGetCount(localizationList) > 0)
{
localeName = CFLocaleCreateCanonicalLocaleIdentifierFromString(
kCFAllocatorDefault, languageName);
languageName = CFArrayGetValueAtIndex(localizationList, 0);
if (localeName)
{
CFStringGetCString(localeName, cg->language, sizeof(cg->language),
kCFStringEncodingASCII);
CFRelease(localeName);
if (languageName != NULL &&
CFGetTypeID(languageName) == CFStringGetTypeID())
{
localeName = CFLocaleCreateCanonicalLocaleIdentifierFromString(
kCFAllocatorDefault, languageName);
DEBUG_printf(("appleLangDefault: cg->language=\"%s\"\n",
cg->language));
/*
* Map new language identifiers to locales...
*/
for (i = 0;
i < sizeof(apple_name_locale) / sizeof(apple_name_locale[0]);
i++)
if (localeName != NULL)
{
if (!strcmp(cg->language, apple_name_locale[i].name))
CFStringGetCString(localeName, cg->language, sizeof(cg->language),
kCFStringEncodingASCII);
CFRelease(localeName);
/*
* Map new language identifiers to locales...
*/
for (i = 0;
i < sizeof(apple_name_locale) / sizeof(apple_name_locale[0]);
i++)
{
DEBUG_printf(("appleLangDefault: mapping \"%s\" to \"%s\"...\n",
cg->language, apple_name_locale[i].locale));
strlcpy(cg->language, apple_name_locale[i].locale,
sizeof(cg->language));
break;
if (!strcmp(cg->language, apple_name_locale[i].name))
{
strlcpy(cg->language, apple_name_locale[i].locale,
sizeof(cg->language));
break;
}
}
/*
* Convert language subtag into region subtag...
*/
if (cg->language[2] == '-')
cg->language[2] = '_';
if (strchr(cg->language, '.') == NULL)
strlcat(cg->language, ".UTF-8", sizeof(cg->language));
}
/*
* Convert language subtag into region subtag...
*/
if (cg->language[2] == '-')
cg->language[2] = '_';
if (!strchr(cg->language, '.'))
strlcat(cg->language, ".UTF-8", sizeof(cg->language));
}
}
}
}
CFRelease(localizationList);
CFRelease(localizationList);
}
}
/*
+25 -43
Ver Arquivo
@@ -44,8 +44,7 @@
* Local functions...
*/
static void ppd_ll_CC(char *ll_CC, int ll_CC_size,
char *ll, int ll_size);
static void ppd_ll_CC(char *ll_CC, char *ll);
static ppd_attr_t *ppd_localized_attr(ppd_file_t *ppd,
const char *keyword,
const char *spec, const char *ll_CC,
@@ -91,7 +90,7 @@ ppdLocalize(ppd_file_t *ppd) /* I - PPD file */
* Get the default language...
*/
ppd_ll_CC(ll_CC, sizeof(ll_CC), ll, sizeof(ll));
ppd_ll_CC(ll_CC, ll);
/*
* Now lookup all of the groups, options, choices, etc.
@@ -241,7 +240,7 @@ ppdLocalizeIPPReason(
* Get the default language...
*/
ppd_ll_CC(ll_CC, sizeof(ll_CC), ll, sizeof(ll));
ppd_ll_CC(ll_CC, ll);
/*
* Find the localized attribute...
@@ -392,9 +391,8 @@ ppdLocalizeIPPReason(
static void
ppd_ll_CC(char *ll_CC, /* O - Country-specific locale name */
int ll_CC_size, /* I - Size of country-specific name */
char *ll, /* O - Generic locale name */
int ll_size) /* I - Size of generic name */
char *ll) /* O - Generic locale name */
{
cups_lang_t *lang; /* Current language */
@@ -405,8 +403,8 @@ ppd_ll_CC(char *ll_CC, /* O - Country-specific locale name */
if ((lang = cupsLangDefault()) == NULL)
{
strlcpy(ll_CC, "en_US", ll_CC_size);
strlcpy(ll, "en", ll_size);
strcpy(ll_CC, "en_US");
strcpy(ll, "en");
return;
}
@@ -414,10 +412,8 @@ ppd_ll_CC(char *ll_CC, /* O - Country-specific locale name */
* Copy the locale name...
*/
strlcpy(ll_CC, lang->language, ll_CC_size);
strlcpy(ll, lang->language, ll_size);
DEBUG_printf(("ll_CC=\"%s\", ll=\"%s\"\n", ll_CC, ll));
strlcpy(ll_CC, lang->language, sizeof(ll_CC));
strlcpy(ll, lang->language, sizeof(ll));
if (strlen(ll_CC) == 2)
{
@@ -427,16 +423,16 @@ ppd_ll_CC(char *ll_CC, /* O - Country-specific locale name */
*/
if (!strcmp(ll_CC, "cs"))
strlcpy(ll_CC, "cs_CZ", ll_CC_size);
strcpy(ll_CC, "cs_CZ");
else if (!strcmp(ll_CC, "en"))
strlcpy(ll_CC, "en_US", ll_CC_size);
strcpy(ll_CC, "en_US");
else if (!strcmp(ll_CC, "ja"))
strlcpy(ll_CC, "ja_JP", ll_CC_size);
strcpy(ll_CC, "ja_JP");
else if (!strcmp(ll_CC, "sv"))
strlcpy(ll_CC, "sv_SE", ll_CC_size);
else if (!strcmp(ll_CC, "zh")) /* Simplified Chinese */
strlcpy(ll_CC, "zh_CN", ll_CC_size);
else if (ll_CC_size >= 6)
strcpy(ll_CC, "sv_SE");
else if (!strcmp(ll_CC, "zh"))
strcpy(ll_CC, "zh_CN"); /* Simplified Chinese */
else
{
ll_CC[2] = '_';
ll_CC[3] = toupper(ll_CC[0] & 255);
@@ -479,31 +475,17 @@ ppd_localized_attr(ppd_file_t *ppd, /* I - PPD file */
snprintf(lkeyword, sizeof(lkeyword), "%s.%s", ll, keyword);
attr = ppdFindAttr(ppd, lkeyword, spec);
if (!attr)
if (!attr && !strcmp(ll, "ja"))
{
if (!strcmp(ll, "ja"))
{
/*
* Due to a bug in the CUPS DDK 1.1.0 ppdmerge program, Japanese
* PPD files were incorrectly assigned "jp" as the locale name
* instead of "ja". Support both the old (incorrect) and new
* locale names for Japanese...
*/
/*
* Due to a bug in the CUPS DDK 1.1.0 ppdmerge program, Japanese
* PPD files were incorrectly assigned "jp" as the locale name
* instead of "ja". Support both the old (incorrect) and new
* locale names for Japanese...
*/
snprintf(lkeyword, sizeof(lkeyword), "jp.%s", keyword);
attr = ppdFindAttr(ppd, lkeyword, spec);
}
else if (!strcmp(ll, "no"))
{
/*
* Norway has two languages, "Bokmal" (the primary one)
* and "Nynorsk" (new Norwegian); we map "no" to "nb" here as
* recommended by the locale folks...
*/
snprintf(lkeyword, sizeof(lkeyword), "nb.%s", keyword);
attr = ppdFindAttr(ppd, lkeyword, spec);
}
snprintf(lkeyword, sizeof(lkeyword), "jp.%s", keyword);
attr = ppdFindAttr(ppd, lkeyword, spec);
}
}
-12
Ver Arquivo
@@ -149,18 +149,6 @@ http://foo/fr/bar.html
help:anchor='foo'%20bookID=Vendor%20Help
/help/fr/foo/bar.html"
*End
*zh_TW.cupsIPPReason foo/Number 1 Foo Reason: "text:Number%201
text:Foo%20Reason
http://foo/zh_TW/bar.html
help:anchor='foo'%20bookID=Vendor%20Help
/help/zh_TW/foo/bar.html"
*End
*zh.cupsIPPReason foo/Number 2 Foo Reason: "text:Number%202
text:Foo%20Reason
http://foo/zh/bar.html
help:anchor='foo'%20bookID=Vendor%20Help
/help/zh/foo/bar.html"
*End
*DefaultFont: Courier
*Font AvantGarde-Book: Standard "(001.006S)" Standard ROM
+5 -42
Ver Arquivo
@@ -16,8 +16,7 @@
*
* Contents:
*
* main() - Main entry.
* read_write_tests() - Perform read/write tests.
* main() - Main entry.
*/
/*
@@ -150,8 +149,6 @@ read_write_tests(int compression) /* I - Use compression? */
unsigned char readbuf[8192], /* Read buffer */
writebuf[8192]; /* Write buffer */
int byte; /* Byte from file */
static const char *partial_line = "partial line";
/* Partial line */
/*
@@ -256,25 +253,11 @@ read_write_tests(int compression) /* I - Use compression? */
fputs("cupsFileWrite(): ", stdout);
for (i = 0; i < 10000; i ++)
for (i = 0; i < 100; i ++)
if (cupsFileWrite(fp, (char *)writebuf, sizeof(writebuf)) < 0)
break;
if (i >= 10000)
puts("PASS");
else
{
printf("FAIL (%s)\n", strerror(errno));
status ++;
}
/*
* cupsFilePuts() with partial line...
*/
fputs("cupsFilePuts(\"partial line\"): ", stdout);
if (cupsFilePuts(fp, partial_line) > 0)
if (i >= 100)
puts("PASS");
else
{
@@ -422,13 +405,13 @@ read_write_tests(int compression) /* I - Use compression? */
fputs("cupsFileRead(): ", stdout);
for (i = 0; i < 10000; i ++)
for (i = 0; i < 100; i ++)
if ((byte = cupsFileRead(fp, (char *)readbuf, sizeof(readbuf))) < 0)
break;
else if (memcmp(readbuf, writebuf, sizeof(readbuf)))
break;
if (i >= 10000)
if (i >= 100)
puts("PASS");
else if (byte > 0)
{
@@ -447,26 +430,6 @@ read_write_tests(int compression) /* I - Use compression? */
status ++;
}
/*
* cupsFileGetChar() with partial line...
*/
fputs("cupsFileGetChar(partial line): ", stdout);
for (i = 0; i < strlen(partial_line); i ++)
if ((byte = cupsFileGetChar(fp)) < 0)
break;
else if (byte != partial_line[i])
break;
if (!partial_line[i])
puts("PASS");
else
{
printf("FAIL (got '%c', expected '%c')\n", byte, partial_line[i]);
status ++;
}
/*
* cupsFileClose()
*/
-12
Ver Arquivo
@@ -224,18 +224,6 @@ main(int argc, /* I - Number of command-line arguments */
printf("FAIL (\"%s\" instead of \"La Long Foo Reason\")\n", buffer);
}
putenv("LANG=zh_TW");
fputs("ppdLocalizeIPPReason(zh_TW text): ", stdout);
if (ppdLocalizeIPPReason(ppd, "foo", NULL, buffer, sizeof(buffer)) &&
!strcmp(buffer, "Number 1 Foo Reason"))
puts("PASS");
else
{
status ++;
printf("FAIL (\"%s\" instead of \"Number 1 Foo Reason\")\n", buffer);
}
ppdClose(ppd);
}
else
-2
Ver Arquivo
@@ -92,8 +92,6 @@ WEBIMAGES = \
images/printer-idle.gif \
images/printer-processing.gif \
images/printer-stopped.gif \
images/raster.png \
images/raster.svg \
images/smiley.jpg \
images/tab-left.gif \
images/tab-right.gif \
+3 -2
Ver Arquivo
@@ -110,13 +110,14 @@ SPAN.info {
white-space: nowrap;
}
H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
H2 SPAN.info, H3 SPAN.info {
float: right;
font-size: 100%;
}
H2.title, H3.title {
border-bottom: solid 2pt #000000;
page-break-before: always;
}
DT {
@@ -133,7 +134,7 @@ DL.category DT {
}
P.summary {
margin-left: 36pt;
margin-left: 54pt;
font-family: monospace;
}
+3 -4
Ver Arquivo
@@ -173,7 +173,7 @@ SPAN.info {
white-space: nowrap;
}
H2 SPAN.info, H3 SPAN.info, H4 SPAN.info {
H2 SPAN.info, H3 SPAN.info {
float: right;
font-size: 100%;
}
@@ -196,10 +196,9 @@ DIV.sidebar {
background: #ddddaa;
border: solid 2px #cccc99;
float: right;
min-width: 25%;
margin-left: 10pt;
max-width: 33%;
padding: 5pt;
width: 25%;
/* These are not implemented by all browsers, but that's OK */
border-radius: 10pt;
-moz-border-radius: 10pt;
@@ -255,7 +254,7 @@ DL.category DT {
}
P.summary {
margin-left: 36pt;
margin-left: 54pt;
font-family: monospace;
}
Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 716 B

Depois

Largura:  |  Altura:  |  Tamanho: 623 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 561 B

Depois

Largura:  |  Altura:  |  Tamanho: 527 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 724 B

Depois

Largura:  |  Altura:  |  Tamanho: 617 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 948 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 892 B

Depois

Largura:  |  Altura:  |  Tamanho: 706 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 897 B

Depois

Largura:  |  Altura:  |  Tamanho: 769 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 646 B

Depois

Largura:  |  Altura:  |  Tamanho: 560 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 881 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 871 B

Depois

Largura:  |  Altura:  |  Tamanho: 777 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 1.0 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 882 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 396 B

Depois

Largura:  |  Altura:  |  Tamanho: 359 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 498 B

Depois

Largura:  |  Altura:  |  Tamanho: 461 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 543 B

Depois

Largura:  |  Altura:  |  Tamanho: 483 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 627 B

Depois

Largura:  |  Altura:  |  Tamanho: 562 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 910 B

Depois

Largura:  |  Altura:  |  Tamanho: 788 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 928 B

Depois

Largura:  |  Altura:  |  Tamanho: 838 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 977 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 424 B

Depois

Largura:  |  Altura:  |  Tamanho: 393 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 603 B

Depois

Largura:  |  Altura:  |  Tamanho: 567 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 807 B

Depois

Largura:  |  Altura:  |  Tamanho: 636 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 744 B

Depois

Largura:  |  Altura:  |  Tamanho: 658 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 914 B

Depois

Largura:  |  Altura:  |  Tamanho: 718 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 788 B

Depois

Largura:  |  Altura:  |  Tamanho: 672 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 618 B

Depois

Largura:  |  Altura:  |  Tamanho: 579 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 797 B

Depois

Largura:  |  Altura:  |  Tamanho: 659 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 669 B

Depois

Largura:  |  Altura:  |  Tamanho: 551 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 918 B

Depois

Largura:  |  Altura:  |  Tamanho: 744 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 930 B

Depois

Largura:  |  Altura:  |  Tamanho: 856 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 858 B

Depois

Largura:  |  Altura:  |  Tamanho: 783 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 722 B

Depois

Largura:  |  Altura:  |  Tamanho: 625 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 781 B

Depois

Largura:  |  Altura:  |  Tamanho: 642 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 640 B

Depois

Largura:  |  Altura:  |  Tamanho: 550 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 738 B

Depois

Largura:  |  Altura:  |  Tamanho: 615 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 737 B

Depois

Largura:  |  Altura:  |  Tamanho: 601 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 416 B

Depois

Largura:  |  Altura:  |  Tamanho: 389 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 888 B

Depois

Largura:  |  Altura:  |  Tamanho: 822 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 977 B

Depois

Largura:  |  Altura:  |  Tamanho: 794 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 925 B

Depois

Largura:  |  Altura:  |  Tamanho: 809 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 910 B

Depois

Largura:  |  Altura:  |  Tamanho: 726 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 904 B

Depois

Largura:  |  Altura:  |  Tamanho: 747 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 1.0 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 853 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 732 B

Depois

Largura:  |  Altura:  |  Tamanho: 622 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 663 B

Depois

Largura:  |  Altura:  |  Tamanho: 562 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 851 B

Depois

Largura:  |  Altura:  |  Tamanho: 721 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 884 B

Depois

Largura:  |  Altura:  |  Tamanho: 736 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 551 B

Depois

Largura:  |  Altura:  |  Tamanho: 491 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 635 B

Depois

Largura:  |  Altura:  |  Tamanho: 586 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 562 B

Depois

Largura:  |  Altura:  |  Tamanho: 526 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 674 B

Depois

Largura:  |  Altura:  |  Tamanho: 619 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 817 B

Depois

Largura:  |  Altura:  |  Tamanho: 698 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 1.4 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 1.1 KiB

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 1.1 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 940 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 1.1 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 900 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 1.2 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 949 B

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 843 B

Depois

Largura:  |  Altura:  |  Tamanho: 706 B

-55
Ver Arquivo
@@ -1,55 +0,0 @@
button-accept-jobs.gif green Aceptar trabajos
button-add-class.gif standard Añadir clase
button-add-printer.gif standard Añadir impresora
button-add-rss-subscription.gif standard Añadir subscripción RSS
button-add-this-printer.gif standard Añadir esta impresora
button-cancel-all-jobs.gif black Cancelar todos los trabajos
button-cancel-job.gif black Cancelar trabajo
button-cancel-subscription.gif standard Cancelar subscripción
button-change-settings.gif standard Cambiar especificaciones
button-clean-print-heads.gif standard Limpiar cabezales de impresión
button-clear.gif standard Borrar
button-continue.gif standard Siguiente
button-delete-class.gif black Borrar clase
button-delete-printer.gif black Borrar impresora
button-edit-configuration-file.gif standard Editar archivo configuración
button-export-samba.gif standard Exportar impresoras a Samba
button-find-new-printers.gif standard Encontrar nuevas impresoras
button-help.gif standard Ayuda
button-hold-job.gif red Retener trabajo
button-manage-classes.gif standard Administrar clases
button-manage-jobs.gif standard Administrar trabajos
button-manage-printers.gif standard Administrar impresoras
button-manage-server.gif standard Administrar servidor
button-modify-class.gif standard Modificar clase
button-modify-printer.gif standard Modificar impresora
button-move-job.gif standard Mover trabajo
button-move-jobs.gif standard Mover todos los trabajos
button-print-self-test-page.gif standard Imprimir página de auto prueba
button-print-test-page.gif standard Imprimir página de prueba
button-publish-printer.gif standard Publicar impresora
button-reject-jobs.gif red Rechazar trabajos
button-release-job.gif green Liberar trabajo
button-restart-job.gif standard Reimprimir trabajo
button-save-changes.gif standard Guardar cambios
button-search.gif standard Buscar
button-set-allowed-users.gif standard Cambiar usuarios permitidos
button-set-as-default.gif standard Poner como predeterminada
button-set-printer-options.gif standard Cambiar opciones impresora
button-show-active.gif standard Mostrar trabajos activos
button-show-all.gif standard Mostrar todos los trabajos
button-show-completed.gif standard Mostrar trabajos completados
button-show-next.gif standard Mostrar siguiente
button-show-previous.gif standard Mostrar anterior
button-sort-ascending.gif standard @UP Orden ascendente @UP
button-sort-descending.gif standard @DOWN Orden descendente @DOWN
button-start-class.gif green Iniciar clase
button-start-printer.gif green Iniciar impresora
button-stop-class.gif red Detener clase
button-stop-printer.gif red Detener impresora
button-unpublish-printer.gif standard No publicar impresora
button-use-default-config.gif standard Usar archivo de configuración predeterminado
button-view-access-log.gif standard Ver archivo de registro de accesos
button-view-error-log.gif standard Ver archivo de registro de errores
button-view-page-log.gif standard Ver archivo de registro de páginas
button-view-printable-version.gif standard Ver versión imprimible
+2 -2
Ver Arquivo
@@ -62,7 +62,7 @@ BORDER="0" ALT=""></A>
<P>Estas p&aacute;ginas web permiten monitorizar sus impresoras y trabajos
as&iacute; como realizar tareas de administraci&oacute;n del sistema.
Haga clic en cualquiera de las pesta&ntilde;as de la parte superior o en los
Haga click en cualquiera de las pesta&ntilde;as de la parte superior o en los
botones de la parte inferior para realizar la tarea correspondiente.</P>
<P>
@@ -88,7 +88,7 @@ STYLE="padding-right: 10px;" ALT="Ordenador feliz e impresora">
CUPS proporciona una capa de impresi&oacute;n portable
para sistemas operativos basados en
UNIX<SUP>&reg;</SUP>. Est&aacute; desarrollado y mantenido
por <A HREF="http://www.apple.com">Apple Inc.</A> para favorecer una soluci&oacute;n de impresi&oacute;n
por <A HREF="http://www.apple.com">Apple Inc.</a> para favorecer una soluci&oacute;n de impresi&oacute;n
estandar. CUPS es el sistema de impresi&oacute;n estandar usado en
MacOS<SUP>&reg;</SUP> X y la mayor&iacute;a de distribuciones
Linux<SUP>&reg;</SUP>.</P>
+2 -12
Ver Arquivo
@@ -11,15 +11,6 @@ to a remote authenticated queue. This document describes how to configure
CUPS to use Kerberos authentication and provides helpful links to the MIT
help pages for configuring Kerberos on your systems and network.</P>
<BLOCKQUOTE><B>Note:</B>
<P>In order to use Kerberos-authenticated shared printers, you <EM>must</EM> be
running a version of MIT Kerberos with the <TT>krb5_cc_new_unique()</TT>
function or Heimdal Kerberos. Otherwise, only local Kerberos authentication
is supported.</P>
</BLOCKQUOTE>
<H2 CLASS="title"><A NAME="KRB5">Configuring Kerberos on Your System</A></H2>
@@ -135,9 +126,8 @@ lines to the policies you want to protect with authentication, for example:</P>
<H2 CLASS="title"><A NAME="IMPLEMENT">Implementation Information</A></H2>
<P>CUPS implements Kerberos over HTTP using GSS API and the service name
"ipp". Delegation of credentials, which is needed when printing to a
remote/shared printer with Kerberos authentication, is currently only supported
when using a single KDC on your network.</P>
"ipp". Delegation of credentials (needed for remote printers with
authentication) is only supported when using a single KDC on your network.</P>
<P>After getting a user's Kerberos credentials, CUPS strips the "@KDC"
portion of the username so that it can check the group membership locally,
+20 -307
Ver Arquivo
@@ -137,16 +137,16 @@ queue.</P>
printing more than one copy of a file:</P>
<PRE CLASS="command">
lp -n <EM>num-copies</EM> filename
lpr -#<EM>num-copies</EM> filename
lp -n <I>num-copies</I> filename
lpr -#<I>num-copies</I> filename
</PRE>
<P>Copies are normally <EM>not</EM> collated for you. Use the
<CODE>-o Collate=True</CODE> option to get collated copies:</P>
<PRE CLASS="command">
lp -n <EM>num-copies</EM> -o Collate=True filename
lpr -#<EM>num-copies</EM> -o Collate=True filename
lp -n <I>num-copies</I> -o Collate=True filename
lpr -#<I>num-copies</I> -o Collate=True filename
</PRE>
@@ -156,11 +156,11 @@ lpr -#<EM>num-copies</EM> -o Collate=True filename
HREF="man-lprm.html">lprm(1)</A> commands cancel a print job:</P>
<PRE CLASS="command">
cancel <EM>job-id</EM>
lprm <EM>job-id</EM>
cancel <I>job-id</I>
lprm <I>job-id</I>
</PRE>
<P>The <EM>job-id</EM> is the number that was reported to you by
<P>The <I>job-id</I> is the number that was reported to you by
the <B>lp</B> command. You can also get the job ID using the <A
HREF="man-lpq.html">lpq(1)</A> or <A
HREF="man-lpstat.html">lpstat</A> commands:</P>
@@ -177,10 +177,10 @@ lpstat
job to a new printer or class:</P>
<PRE CLASS="command">
lpmove <EM>job-id</EM> <i>destination</i>
lpmove <I>job-id</I> <i>destination</i>
</PRE>
<P>The <EM>job-id</EM> is the number that was reported to you by
<P>The <I>job-id</I> is the number that was reported to you by
the <B>lp</B> or <B>lpstat</B> commands. <i>Destination</i> is the
name of a printer or class that you want to actually print the job.
@@ -256,10 +256,10 @@ lpoptions -p printer -l
<P>When <CODE>Custom</CODE> is listed for the <CODE>PageSize</CODE> option, you can specify custom media sizes using one of the following forms:</P>
<PRE CLASS="command">
lp -o media=Custom.<EM>WIDTH</EM>x<EM>LENGTH</EM> filename
lp -o media=Custom.<EM>WIDTH</EM>x<EM>LENGTH</EM>in filename
lp -o media=Custom.<EM>WIDTH</EM>x<EM>LENGTH</EM>cm filename
lp -o media=Custom.<EM>WIDTH</EM>x<EM>LENGTH</EM>mm filename
lp -o media=Custom.<I>WIDTH</I>x<I>LENGTH</I> filename
lp -o media=Custom.<I>WIDTH</I>x<I>LENGTH</I>in filename
lp -o media=Custom.<I>WIDTH</I>x<I>LENGTH</I>cm filename
lp -o media=Custom.<I>WIDTH</I>x<I>LENGTH</I>mm filename
</PRE>
<P>where "WIDTH" and "LENGTH" are the width and length of the media in points, inches, centimeters, or millimeters, respectively.</P>
@@ -294,7 +294,6 @@ page depending on the value of N:</P>
</UL>
<H3><A NAME="SIDES">Printing On Both Sides of the Paper</A></H3>
<P>The <CODE>-o sides=two-sided-short-edge</CODE> and <CODE>-o
@@ -318,7 +317,6 @@ lp -o sides=one-sided filename
lpr -o sides=one-sided filename
</PRE>
<H3><A NAME="JOBSHEETS">Selecting the Banner Page(s)</A></H3>
<P>The <CODE>-o jobsheets=start,end</CODE> option sets the banner
@@ -362,60 +360,6 @@ configuration; CUPS includes the following banner files:</P>
</UL>
<H3><A NAME="JOBHOLDUNTIL">Holding Jobs for Later Printing</A></H3>
<P>The <CODE>-o job-hold-until=when</CODE> option tells CUPS to
delay printing until the "when" time, which can be one of the
following:</P>
<UL>
<LI><CODE>-o job-hold-until=indefinite</CODE>; print only
after released by the user or an administrator</LI>
<LI><CODE>-o job-hold-until=day-time</CODE>; print from
6am to 6pm local time</LI>
<LI><CODE>-o job-hold-until=night</CODE>; print from
6pm to 6am local time</LI>
<LI><CODE>-o job-hold-until=second-shift</CODE>; print from
4pm to 12am local time</LI>
<LI><CODE>-o job-hold-until=third-shift</CODE>; print from
12am to 8am local time</LI>
<LI><CODE>-o job-hold-until=weekend</CODE>; print on Saturday
or Sunday</LI>
<LI><CODE>-o job-hold-until=HH:MM</CODE>; print at the specified
UTC time</LI>
</UL>
<H3><A NAME="RELEASEJOB">Releasing Held Jobs</A></H3>
<P>Aside from the web interface, you can use the <B>lp</B> command
to release a held job:</P>
<PRE CLASS="command">
lp -i <em>job-id</em> -H resume
</PRE>
<P>where "job-id" is the job ID reported by the <B>lpstat</B>
command.</P>
<H3><A NAME="JOBPRIORITY">Setting the Job Priority</A></H3>
<P>The <CODE>-o job-priority=NNN</CODE> option tells CUPS to
assign a priority to your job from 1 (lowest) to 100 (highest),
which influences where the job appears in the print queue. Higher
priority jobs are printed before lower priority jobs, however
submitting a new job with a high priority will not interrupt an
</P>
<H3><A NAME="OUTPUTORDER">Specifying the Output Order</A></H3>
<P>The <CODE>-o outputorder=normal</CODE> and <CODE>-o outputorder=reverse</CODE> options specify the order of the pages. Normal order prints page 1 first, page 2 second, and so forth. Reverse order prints page 1 last.</P>
@@ -503,48 +447,9 @@ lpr -o fitplot filename
<P>The default is to use the size specified in the file.</P>
<BLOCKQUOTE><B>Note:</B>
<P>This feature depends upon an accurate size in
<BLOCKQUOTE>Note: This feature depends upon an accurate size in
the print file. If no size is given in the file, the page may be
scaled incorrectly!
</BLOCKQUOTE>
<H3><A NAME="OUTPUTORDER">Printing in Reverse Order</A></H3>
<P>The <CODE>-o outputorder=reverse</CODE> option will print the
pages in reverse order:</P>
<PRE CLASS="command">
lp -o outputorder=reverse filename
lpr -o outputorder=reverse filename
</PRE>
<P>Similarly, the <CODE>-o outputorder=normal</CODE> option will
print starting with page 1:</P>
<PRE CLASS="command">
lp -o outputorder=normal filename
lpr -o outputorder=normal filename
</PRE>
<P>The default is <CODE>-o outputorder=normal</CODE> for
printers that print face down and <CODE>-o outputorder=reverse</CODE>
for printers that print face up.
<H3><A NAME="MIRROR">Printing Mirrored Pages</A></H3>
<P>The <CODE>-o mirror</CODE> option flips each page along the
vertical access to produce a mirrored image:</P>
<PRE CLASS="command">
lp -o mirror filename
lpr -o mirror filename
</PRE>
<P>This is typically used when printing on T-shirt transfer
media or sometimes on transparencies.</P>
scaled incorrectly!</BLOCKQUOTE>
<H3><A NAME="RAW">Raw or Unfiltered Output</A></H3>
@@ -618,11 +523,11 @@ page-right=value</CODE>, <CODE>-o page-top=value</CODE>, and
margins:</P>
<PRE CLASS="command">
lp -o page-left=<EM>value</EM> filename
lp -o page-right=<EM>value</EM> filename
lp -o page-top=<EM>value</EM> filename
lp -o page-bottom=<EM>value</EM> filename
lpr -o page-left=<EM>value</EM> -o page-right=<EM>value</EM> -o page-top=<EM>value</EM> -o page-bottom=<EM>value</EM> filename
lp -o page-left=<I>value</I> filename
lp -o page-right=<I>value</I> filename
lp -o page-top=<I>value</I> filename
lp -o page-bottom=<I>value</I> filename
lpr -o page-left=<I>value</I> -o page-right=<I>value</I> -o page-top=<I>value</I> -o page-bottom=<I>value</I> filename
</PRE>
<P>The <CODE>value</CODE> argument is the margin in points; each
@@ -640,197 +545,5 @@ lp -o prettyprint filename
lpr -o prettyprint filename
</PRE>
<H3><A NAME="WRAP">Turning Off Text Wrapping</A><H3>
<P>The <CODE>-o nowrap</CODE> option disables wrapping of long lines:</P>
<PRE CLASS="command">
lp -o nowrap filename
lpr -o nowrap filename
</PRE>
<H2 CLASS="title"><SPAN CLASS="info">Not Supported on Mac OS X</SPAN><A NAME="IMAGEOPTIONS">Image Options</A></H2>
<P>CUPS supports several options that are only used when printing
image files. These options have absolutely no effect on PostScript, PDF,
HP-GL/2, or text files.</P>
<H3><A NAME="position">Positioning Images</A></H3>
<P>The <CODE>-o position=name</CODE> option specifies the position of the
image on the page:
<UL>
<LI><CODE>center</CODE> - Center the image on the page (default)
<LI><CODE>top</CODE> - Print the image centered at the top of the page
<LI><CODE>left</CODE> - Print the image centered on the left of page
<LI><CODE>right</CODE> - Print the image centered on the right of the page
<LI><CODE>top-left</CODE> - Print the image at the top left corner of
the page
<LI><CODE>top-right</CODE> - Print the image at the top right corner of
the page
<LI><CODE>bottom</CODE> - Print the image centered at the bottom of
the page
<LI><CODE>bottom-left</CODE> - Print the image at the bottom left
corner of the page
<LI><CODE>bottom-right</CODE> - Print the image at the bottom right
corner of the page
</UL>
<H3><A NAME="scaling">Scaling Images</A></H3>
<P>The <CODE>-o scaling=percent</CODE>, <CODE>-o
ppi=value</CODE>, and <CODE>-o natural-scaling=percent</CODE>
options change the size of a printed image:
<PRE CLASS="command">
lp -o scaling=<EM>percent</EM> filename
lp -o ppi=<EM>value</EM> filename
lpr -o natural-scaling=<EM>percent</EM> filename
</PRE>
<P>The <CODE>scaling=percent</CODE> value is a number from 1 to 800
specifying the size in relation to the page (<EM>not</EM> the image.) A
scaling of 100 percent will fill the page as completely as the image
aspect ratio allows. A scaling of 200 percent will print on up to 4
pages.
<P>The <CODE>ppi=value</CODE> value is a number from 1 to 1200 specifying the
resolution of the image in pixels per inch. An image that is 3000x2400
pixels will print 10x8 inches at 300 pixels per inch, for example. If
the specified resolution makes the image larger than the page, multiple
pages will be printed to satisfy the request.
<P>The <CODE>natural-scaling=percent</CODE> value is a number
from 1 to 800 specifying the size in relation to the natural
image size. A scaling of 100 percent will print the image at its
natural size, while a scaling of 50 percent will print the image
at half its natural size. If the specified scaling makes the
image larger than the page, multiple pages will be printed to
satisfy the request.
<H3><A NAME="hue">Adjusting Image Hue (Tint)</A></H3>
<P>The <CODE>-o hue=value</CODE> option will adjust the hue of the
printed image, much like the tint control on your television:
<PRE CLASS="command">
lp -o hue=<EM>value</EM> filename
lpr -o hue=<EM>value</EM> filename
</PRE>
<P>The <CODE>value</CODE> argument is a number from -360 to 360 and represents
the color hue rotation. The following table summarizes the change you'll see
with different colors:</P>
<DIV CLASS="table"><TABLE SUMMARY="Hue Values">
<TR>
<TH>Original</TH>
<TH>hue=-45</TH>
<TH>hue=45</TH>
</TR>
<TR>
<TD>Red</TD>
<TD>Purple</TD>
<TD>Yellow-orange</TD>
</TR>
<TR>
<TD>Green</TD>
<TD>Yellow-green</TD>
<TD>Blue-green</TD>
</TR>
<TR>
<TD>Yellow</TD>
<TD>Orange</TD>
<TD>Green-yellow</TD>
</TR>
<TR>
<TD>Blue</TD>
<TD>Sky-blue</TD>
<TD>Purple</TD>
</TR>
<TR>
<TD>Magenta</TD>
<TD>Indigo</TD>
<TD>Crimson</TD>
</TR>
<TR>
<TD>Cyan</TD>
<TD>Blue-green</TD>
<TD>Light-navy-blue</TD>
</TR>
</TABLE></DIV>
<P>The default hue adjustment is 0.
<H3><A NAME="saturation">Adjusting Image Saturation (Color)</A></H3>
<P>The <CODE>-o saturation=percent</CODE> option adjusts the saturation
of the colors in an image, much like the color control on your television:</P>
<PRE CLASS="command">
lp -o saturation=<EM>percent</EM> filename
lpr -o saturation=<EM>percent</EM> filename
</PRE>
<P>The <CODE>percent</CODE> argument specifies the color saturation
from 0 to 200. A color saturation of 0 produces a black-and-white
print, while a value of 200 will make the colors extremely intense.</P>
<P>The default saturation is 100.</P>
<H2 CLASS="title"><A NAME="HPGL2OPTIONS">HP-GL/2 Options</A></H2>
<P>CUPS supports several options that are only used when printing
HP-GL/2 files. These options have absolutely no effect on PostScript, PDF,
image, or text files.</P>
<H3><A NAME="blackplot">Printing in Black</A></H3>
<P>The <CODE>-o blackplot</CODE> option specifies that all pens should
plot in black:</P>
<PRE CLASS="command">
lp -o blackplot filename
lpr -o blackplot filename
</PRE>
<P>The default is to use the colors defined in the plot file or the
standard pen colors defined in the HP-GL/2 reference manual from
Hewlett Packard.
<H3><A NAME="penwidth">Setting the Default Pen Width</A></H3>
<P>The <CODE>-o penwidth=value</CODE> option specifies the default pen
width for HP-GL/2 files:</P>
<PRE CLASS="command">
lp -o penwidth=<EM>value</EM> filename
lpr -o penwidth=<EM>value</EM> filename
</PRE>
<P>The pen width <CODE>value</CODE> specifies the pen width in micrometers.
The default value of 1000 produces lines that are 1 millimeter in width.
Specifying a pen width of 0 produces lines that are exactly 1 pixel wide.</P>
<BLOCKQUOTE><B>Note:</B>
<P>This option is ignored when the pen widths are set in the plot
file.
</BLOCKQUOTE>
</BODY>
</HTML>

Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais