summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES-1.4.txt45
-rw-r--r--CHANGES.txt8
-rw-r--r--README.txt4
-rw-r--r--backend/dnssd.c14
-rw-r--r--backend/easysw-firewire-design.txt71
-rw-r--r--backend/easysw-firewire-linux.txt35
-rw-r--r--backend/ipp.c627
-rw-r--r--backend/lpd.c57
-rw-r--r--backend/socket.c21
-rw-r--r--backend/usb-libusb.c6
-rw-r--r--cgi-bin/admin.c32
-rw-r--r--cgi-bin/classes.c20
-rw-r--r--cgi-bin/html.c34
-rw-r--r--cgi-bin/printers.c20
-rw-r--r--config-scripts/cups-common.m441
-rw-r--r--config-scripts/cups-ssl.m412
-rw-r--r--config.h.in3
-rw-r--r--cups/adminutil.c4
-rw-r--r--cups/conflicts.c14
-rw-r--r--cups/custom.c13
-rw-r--r--cups/http-private.h4
-rw-r--r--cups/http.c19
-rw-r--r--cups/http.h4
-rw-r--r--cups/mark.c201
-rw-r--r--cups/ppd.c33
-rw-r--r--cups/ppd.h3
-rw-r--r--cups/pwg-ppd.c74
-rw-r--r--cups/request.c17
-rw-r--r--cups/testi18n.c4
-rw-r--r--doc/Makefile6
-rw-r--r--doc/cups.css2
-rw-r--r--doc/de/index.html.in2
-rw-r--r--doc/es/index.html.in2
-rw-r--r--doc/eu/index.html.in2
-rw-r--r--doc/help/api-array.html57
-rw-r--r--doc/help/api-cgi.html93
-rw-r--r--doc/help/api-cups.html145
-rw-r--r--doc/help/api-driver.html69
-rw-r--r--doc/help/api-filedir.html71
-rw-r--r--doc/help/api-filter.html47
-rw-r--r--doc/help/api-httpipp.html265
-rw-r--r--doc/help/api-mime.html47
-rw-r--r--doc/help/api-overview.html13
-rw-r--r--doc/help/api-ppd.html107
-rw-r--r--doc/help/api-ppdc.html47
-rw-r--r--doc/help/api-raster.html33
-rw-r--r--doc/help/postscript-driver.html11
-rw-r--r--doc/help/ppd-compiler.html27
-rw-r--r--doc/help/raster-driver.html9
-rw-r--r--doc/help/ref-cupsd-conf.html.in18
-rw-r--r--doc/help/spec-ppd.html93
-rw-r--r--doc/help/spec-raster.html250
-rw-r--r--doc/id/index.html.in2
-rw-r--r--doc/images/raster-organization.pngbin0 -> 20974 bytes
-rw-r--r--doc/images/raster-organization.svg189
-rw-r--r--doc/images/sample-image.pngbin0 -> 3541 bytes
-rw-r--r--doc/index.html.in2
-rw-r--r--doc/it/index.html.in2
-rw-r--r--doc/ja/index.html.in2
-rw-r--r--doc/pl/index.html.in2
-rw-r--r--doc/ru/index.html.in2
-rw-r--r--man/cups-driverd.man.in31
-rw-r--r--man/cupsctl.man10
-rw-r--r--man/lpadmin.man10
-rw-r--r--ppdc/Makefile4
-rw-r--r--ppdc/sample.drv4
-rw-r--r--scheduler/Dependencies1
-rw-r--r--scheduler/Makefile17
-rw-r--r--scheduler/client.c34
-rw-r--r--scheduler/conf.c14
-rw-r--r--scheduler/cups-exec.c90
-rw-r--r--scheduler/cups-polld.c2
-rw-r--r--scheduler/cupsd.h3
-rw-r--r--scheduler/dirsvc.c130
-rw-r--r--scheduler/env.c95
-rw-r--r--scheduler/ipp.c15
-rw-r--r--scheduler/job.c110
-rw-r--r--scheduler/printers.c147
-rw-r--r--scheduler/process.c76
-rw-r--r--scheduler/subscriptions.c4
-rw-r--r--systemv/cupsctl.c9
-rw-r--r--systemv/lpadmin.c4
-rw-r--r--templates/add-rss-subscription.tmpl2
-rw-r--r--templates/choose-uri.tmpl2
-rw-r--r--templates/class.tmpl1
-rw-r--r--templates/de/add-rss-subscription.tmpl2
-rw-r--r--templates/de/choose-uri.tmpl2
-rw-r--r--templates/de/class.tmpl1
-rw-r--r--templates/de/option-pickone.tmpl4
-rw-r--r--templates/de/trailer.tmpl2
-rw-r--r--templates/es/add-rss-subscription.tmpl2
-rw-r--r--templates/es/choose-uri.tmpl2
-rw-r--r--templates/es/class.tmpl1
-rw-r--r--templates/es/option-pickone.tmpl4
-rw-r--r--templates/es/trailer.tmpl2
-rw-r--r--templates/eu/add-rss-subscription.tmpl2
-rw-r--r--templates/eu/choose-uri.tmpl2
-rw-r--r--templates/eu/class.tmpl1
-rw-r--r--templates/eu/option-pickone.tmpl4
-rw-r--r--templates/eu/trailer.tmpl2
-rw-r--r--templates/id/add-rss-subscription.tmpl2
-rw-r--r--templates/id/choose-uri.tmpl2
-rw-r--r--templates/id/class.tmpl1
-rw-r--r--templates/id/option-pickone.tmpl4
-rw-r--r--templates/id/trailer.tmpl2
-rw-r--r--templates/it/add-rss-subscription.tmpl2
-rw-r--r--templates/it/choose-uri.tmpl2
-rw-r--r--templates/it/class.tmpl1
-rw-r--r--templates/it/option-pickone.tmpl4
-rw-r--r--templates/it/trailer.tmpl2
-rw-r--r--templates/ja/add-rss-subscription.tmpl2
-rw-r--r--templates/ja/choose-uri.tmpl2
-rw-r--r--templates/ja/class.tmpl1
-rw-r--r--templates/ja/option-pickone.tmpl4
-rw-r--r--templates/ja/trailer.tmpl2
-rw-r--r--templates/jobs.tmpl2
-rw-r--r--templates/option-pickone.tmpl4
-rw-r--r--templates/pl/add-rss-subscription.tmpl2
-rw-r--r--templates/pl/choose-uri.tmpl2
-rw-r--r--templates/pl/class.tmpl1
-rw-r--r--templates/pl/option-pickone.tmpl4
-rw-r--r--templates/pl/trailer.tmpl2
-rw-r--r--templates/ru/add-rss-subscription.tmpl2
-rw-r--r--templates/ru/choose-uri.tmpl2
-rw-r--r--templates/ru/class.tmpl1
-rw-r--r--templates/ru/option-pickone.tmpl4
-rw-r--r--templates/ru/trailer.tmpl2
-rw-r--r--templates/trailer.tmpl2
-rw-r--r--test/ippserver.c55
-rw-r--r--test/ipptool.c3
-rwxr-xr-xtest/run-stp-tests.sh87
131 files changed, 2385 insertions, 1728 deletions
diff --git a/CHANGES-1.4.txt b/CHANGES-1.4.txt
index 97ccb0631..cb42517ca 100644
--- a/CHANGES-1.4.txt
+++ b/CHANGES-1.4.txt
@@ -3,6 +3,50 @@ CHANGES-1.4.txt
CHANGES IN CUPS V1.4.7
+ - Documentation changes (STR #3710, STR #3720, STR #3745, STR #3750,
+ STR #3757, STR #3758)
+ - Web interface fixes (STR #3412, STR #3345, STR #3455, STR #3707,
+ STR #3755, STR #3769)
+ - Configure script fixes (STR #3659, STR #3691)
+ - Compilation fixes (STR #3718, STR #3771, STR #3774)
+ - The scheduler did not retry fax jobs properly.
+ - The scheduler now recognizes an empty cupsCommands PPD keyword as
+ meaning that CUPS commands are not supported for a printer (STR #3773)
+ - Fixed a crash bug in the scheduler when the application/octet-stream
+ MIME type was not defined (STR #3690)
+ - Polled printers were advertised more slowly than necessary (STR #3574)
+ - cupsResolveConflicts() did not handle resolving multiple UIConstraints
+ issues (STR #3705)
+ - The SetEnv and PassEnv directives had no effect (STR #3664)
+ - The libusb-based USB backend printed slowly to the LaserJet 1300 and
+ other printers (STR #3405)
+ - "lp" and "lpr" failed to print with Kerberos enabled (STR #3768)
+ - The cupsctl program now displays an error if you try to directly set
+ the Port or Listen directives (STR #3749)
+ - PPD files with "*JobPatchFile: bla" no longer fail to load in relaxed
+ conformance mode (STR #3747)
+ - The scheduler generated a bad notify-text string for printer state
+ change notifications (STR #3739)
+ - The scheduler incorrectly updated printers.conf when it really needed
+ to update classes.conf or remote.cache (STR #3726)
+ - Hardwired remote printers with options did not work (STR #3717)
+ - Accessing the CUPS web interface using a CNAME-based hostname would
+ sometimes fail due to redirection to the actual hostname (STR #3701)
+ - Subscription events had a misspelled attribute (STR #3693)
+ - "make check" failed if LC_MESSAGES was set (STR #3765)
+ - Fixed the configure script to always look for the pkg-config script
+ (STR #3761)
+ - The scheduler now only looks up interface hostnames if HostNameLookups
+ are enabled (STR #3737)
+ - Fixed a compilation problem on DragonFly BSD (STR #3738)
+ - The default PageLogFormat value had the username and job ID swapped
+ from CUPS 1.3.x (STR #3727)
+ - The scheduler could crash if a browsed printer times out while a job
+ is printing (STR #3754)
+ - The scheduler incorrectly mapped custom page sizes to standard sizes
+ (STR #3764)
+ - cupsfilter and pstops did not map IPP attributes to PPD options due to
+ a change in cupsMarkOptions (STR #3756)
- The scheduler did not always show the most recent status message from
the print filters (STR #3731)
- The PostScript filter did not apply the mirror and number-up options
@@ -13,6 +57,7 @@ CHANGES IN CUPS V1.4.7
CHANGES IN CUPS V1.4.6
+ - Fixed a "make check" issue on Solaris (STR #3729)
- Regression: The pstops filter did not support landscape printing of
PostScript files (STR #3722)
- The scheduler killed retried (fax) jobs after restarting them
diff --git a/CHANGES.txt b/CHANGES.txt
index 66066105b..b3ba2f351 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,8 +1,14 @@
-CHANGES.txt - 2010-12-01
+CHANGES.txt - 2011-01-10
------------------------
CHANGES IN CUPS V1.5b1
+ - The cupstestppd program now shows an error for files missing a
+ CloseGroup keyword (STR #3668)
+ - Name resolution errors no longer cause queues to stop (STR #3719,
+ STR #3753)
+ - Added a new cups-exec helper program that applies security profiles
+ to filters, port monitors, backends, CGI programs, and mini-daemons.
- The web interface can now be disabled using the WebInterface directive
in cupsd.conf (STR #2625)
- The scheduler now provides privacy controls for jobs and subscriptions
diff --git a/README.txt b/README.txt
index d0a8957b5..8bfcbd4dc 100644
--- a/README.txt
+++ b/README.txt
@@ -1,4 +1,4 @@
-README - CUPS v1.5svn - 2010-04-07
+README - CUPS v1.5svn - 2011-01-03
----------------------------------
Looking for compile instructions? Read the file "INSTALL.txt"
@@ -150,7 +150,7 @@ PRINTING FILES
LEGAL STUFF
- CUPS is Copyright 2007-2010 by Apple Inc. CUPS and the CUPS logo are
+ CUPS is Copyright 2007-2011 by Apple Inc. CUPS and the CUPS logo are
trademarks of Apple Inc.
The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
diff --git a/backend/dnssd.c b/backend/dnssd.c
index 57ecc6cb9..3e527c6a6 100644
--- a/backend/dnssd.c
+++ b/backend/dnssd.c
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
- * DNS-SD discovery backend for the Common UNIX Printing System (CUPS).
+ * DNS-SD discovery backend for CUPS.
*
- * Copyright 2008-2009 by Apple Inc.
+ * Copyright 2008-2011 by Apple Inc.
*
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
@@ -492,8 +492,14 @@ exec_backend(char **argv) /* I - Command-line arguments */
job_canceled = -1;
- if ((resolved_uri = cupsBackendDeviceURI(argv)) == NULL)
- exit(CUPS_BACKEND_FAILED);
+ while ((resolved_uri = cupsBackendDeviceURI(argv)) == NULL)
+ {
+ _cupsLangPrintFilter(stderr, "INFO", _("Unable to locate printer."));
+ sleep(10);
+
+ if (getenv("CLASS") != NULL)
+ exit(CUPS_BACKEND_FAILED);
+ }
/*
* Extract the scheme from the URI...
diff --git a/backend/easysw-firewire-design.txt b/backend/easysw-firewire-design.txt
index 194c487ed..e69de29bb 100644
--- a/backend/easysw-firewire-design.txt
+++ b/backend/easysw-firewire-design.txt
@@ -1,71 +0,0 @@
-Preliminary Design for CUPS Firewire Printer Backend - 03/19/2002
------------------------------------------------------------------
-
-OVERVIEW
-
- Easy Software Products will develop an IEEE-1394, a.k.a.
- Firewire, printing interface for its Common UNIX Printing
- System ("CUPS") for initial use under the Linux operating
- system. A follow-on implementation for MacOS X is
- anticipated as well.
-
- The operating system interfaces for IEEE-1394 ports vary
- widely; the CUPS printing interface will abstract the OS
- layer to a simpler interface geared towards discovering,
- opening, reading from, writing to, and closing IEEE-1394
- printers.
-
- The initial development of the CUPS backend will be targeted
- at the EPSON Stylus Pro 10000 large format printer, which
- requires the bandwidth provided by Firewire in order to
- print at full speed. This printer supports printing via
- Serial Bus Protocol 2 (SBP-2) using the SCSI and PWG command
- sets. The CUPS backend will implement the PWG command set on
- LUN 0 only.
-
-
-OS ABSTRACTION LAYER
-
- The OS abstraction layer will be a thin client library that
- implements the following functions:
-
- ieee1394_list
- ieee1394_open
- ieee1394_close
- ieee1394_read
- ieee1394_write
- ieee1394_error
-
- The "ieee1394_list" function will list all of the available
- printer devices on the bus. The device information will
- consist of the device URI (ieee1394:/something) used to
- access the device and the make and model information, if
- available, for the device ("EPSON Stylus Printer").
-
- The "ieee1394_open" and "ieee1394_close" functions will open
- and close a connection to the printer, respectively.
-
- The "ieee1394_read" and "ieee1394_write" functions will read
- and write data to and from the printer, respectively. The
- read function will be non-blocking, returning data only if
- there is data coming back from the printer.
-
- The "ieee1394_error" function will return a string
- describing the last error or NULL if no error occurred.
-
- The library will be responsible for creating any background
- threads that are needed to monitor the connection to the
- printer.
-
-
-CUPS BACKEND
-
- The CUPS backend will use the OS abstraction layer to list
- and access the Firewire printers. The "main" function will
- read and write printer data, while the "list_devices"
- function will be called as necessary to identify the
- available devices.
-
- The CUPS 1.1 backend will record any status information in
- the error log file, while the 1.2 backend will supply it to
- the printer driver process.
diff --git a/backend/easysw-firewire-linux.txt b/backend/easysw-firewire-linux.txt
index a8e461189..e69de29bb 100644
--- a/backend/easysw-firewire-linux.txt
+++ b/backend/easysw-firewire-linux.txt
@@ -1,35 +0,0 @@
-Easy Software Products
-44141 Airport View Drive
-Suite 204
-Hollywood, Maryland 20636
-+1.301.373.9600
-March 8, 2002
-
-
-Subject: EPSON Firewire Printer Driver for Linux
-
-Currently, no Firewire printer support exists for Linux. Since
-the latest EPSON printer products depend on the Firewire
-interface to print at full speed, a solution is needed to
-support customers using Linux as their server platform.
-
-The Linux Firewire subsystem provides a user-mode driver
-interface that allows driver programs to access Firewire
-devices. Easy Software Products will utilize this interface to
-develop a "backend" program for the Common UNIX Printing System
-that will allow users to print to EPSON printers using the
-Firewire interface.
-
-After examining the Linux interface, we estimate that it will
-require approximately 30 hours of development time to write,
-test, and document the Firewire backend, for a total cost of
-$3,000. The new backend will become a standard part of the CUPS
-software distribution and will be included with at least the
-following Linux distributions:
-
- - Caldera Linux
- - Mandrake Linux
- - Red Hat Linux
- - SuSE Linux
-
-ESP will provide EPSON with binaries for Red Hat Linux 7.2.
diff --git a/backend/ipp.c b/backend/ipp.c
index d88fdeba8..b09cc729a 100644
--- a/backend/ipp.c
+++ b/backend/ipp.c
@@ -3,7 +3,7 @@
*
* IPP backend for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -21,6 +21,7 @@
* check_printer_state() - Check the printer state.
* compress_files() - Compress print files...
* monitor_printer() - Monitor the printer state...
+ * new_request() - Create a new print creation or validation request.
* password_cb() - Disable the password prompt for
* cupsDoFileRequest().
* report_attr() - Report an IPP attribute value.
@@ -109,6 +110,12 @@ static ipp_pstate_t check_printer_state(http_t *http, const char *uri,
static void compress_files(int num_files, char **files);
#endif /* HAVE_LIBZ */
static void *monitor_printer(_cups_monitor_t *monitor);
+static ipp_t *new_request(ipp_op_t op, int version, const char *uri,
+ const char *user, const char *title,
+ int num_options, cups_option_t *options,
+ const char *compression, int copies,
+ const char *format, _pwg_t *pwg,
+ ipp_attribute_t *media_col_sup);
static const char *password_cb(const char *);
static void report_attr(ipp_attribute_t *attr);
static int report_printer_state(ipp_t *ipp, int job_id);
@@ -158,8 +165,8 @@ main(int argc, /* I - Number of command-line args */
time_t start_time; /* Time of first connect */
int contimeout; /* Connection timeout */
int delay; /* Delay for retries... */
- int compression, /* Do compression of the job data? */
- waitjob, /* Wait for job complete? */
+ const char *compression; /* Compression mode */
+ int waitjob, /* Wait for job complete? */
waitprinter; /* Wait for printer ready? */
_cups_monitor_t monitor; /* Monitoring data */
ipp_attribute_t *job_id_attr; /* job-id attribute */
@@ -170,12 +177,15 @@ main(int argc, /* I - Number of command-line args */
ipp_attribute_t *cups_version; /* cups-version */
ipp_attribute_t *format_sup; /* document-format-supported */
ipp_attribute_t *media_col_sup; /* media-col-supported */
+ ipp_attribute_t *operations_sup; /* operations-supported */
ipp_attribute_t *printer_state; /* printer-state attribute */
ipp_attribute_t *printer_accepting; /* printer-is-accepting-jobs */
+ int validate_job; /* Does printer support Validate-Job? */
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 */
+ *final_content_type, /* FINAL_CONTENT_TYPE environment var */
+ *document_format; /* document-format value */
int fd; /* File descriptor */
off_t bytes; /* Bytes copied */
char buffer[16384]; /* Copy buffer */
@@ -183,6 +193,8 @@ main(int argc, /* I - Number of command-line args */
struct sigaction action; /* Actions for POSIX signals */
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
int version; /* IPP version */
+ ppd_file_t *ppd; /* PPD file */
+ _pwg_t *pwg; /* PWG<->PPD mapping data */
/*
@@ -257,8 +269,14 @@ main(int argc, /* I - Number of command-line args */
* Extract the hostname and printer name from the URI...
*/
- if ((device_uri = cupsBackendDeviceURI(argv)) == NULL)
- return (CUPS_BACKEND_FAILED);
+ while ((device_uri = cupsBackendDeviceURI(argv)) == NULL)
+ {
+ _cupsLangPrintFilter(stderr, "INFO", _("Unable to locate printer."));
+ sleep(10);
+
+ if (getenv("CLASS") != NULL)
+ return (CUPS_BACKEND_FAILED);
+ }
httpSeparateURI(HTTP_URI_CODING_ALL, device_uri, scheme, sizeof(scheme),
username, sizeof(username), hostname, sizeof(hostname), &port,
@@ -276,7 +294,7 @@ main(int argc, /* I - Number of command-line args */
* See if there are any options...
*/
- compression = 0;
+ compression = NULL;
version = 20;
waitjob = 1;
waitprinter = 1;
@@ -393,10 +411,9 @@ main(int argc, /* I - Number of command-line args */
#ifdef HAVE_LIBZ
else if (!strcasecmp(name, "compression"))
{
- compression = !strcasecmp(value, "true") ||
- !strcasecmp(value, "yes") ||
- !strcasecmp(value, "on") ||
- !strcasecmp(value, "gzip");
+ if (!strcasecmp(value, "true") || !strcasecmp(value, "yes") ||
+ !strcasecmp(value, "on") || !strcasecmp(value, "gzip"))
+ compression = "gzip";
}
#endif /* HAVE_LIBZ */
else if (!strcasecmp(name, "contimeout"))
@@ -432,8 +449,7 @@ main(int argc, /* I - Number of command-line args */
num_files = 0;
send_options = !strcasecmp(final_content_type, "application/pdf") ||
!strcasecmp(final_content_type, "application/vnd.cups-pdf") ||
- !strcasecmp(final_content_type, "image/jpeg") ||
- !strcasecmp(final_content_type, "image/png");
+ !strncasecmp(final_content_type, "image/", 6);
fputs("DEBUG: Sending stdin for job...\n", stderr);
}
@@ -500,7 +516,8 @@ main(int argc, /* I - Number of command-line args */
fprintf(stderr, "DEBUG: Connecting to %s:%d\n", hostname, port);
_cupsLangPrintFilter(stderr, "INFO", _("Connecting to printer."));
- if ((http = httpConnectEncrypt(hostname, port, cupsEncryption())) == NULL)
+ if ((http = httpConnectEncrypt(hostname, port,
+ cupsEncryption())) == NULL)
{
#if 0 /* These need to go in here someplace when we see HTTP_PKI_ERROR or IPP_PKI_ERROR */
fputs("STATE: +cups-certificate-error\n", stderr);
@@ -637,11 +654,13 @@ main(int argc, /* I - Number of command-line args */
* copies...
*/
- copies_sup = NULL;
- cups_version = NULL;
- format_sup = NULL;
- media_col_sup = NULL;
- supported = NULL;
+ copies_sup = NULL;
+ cups_version = NULL;
+ format_sup = NULL;
+ media_col_sup = NULL;
+ supported = NULL;
+ operations_sup = NULL;
+ validate_job = 0;
do
{
@@ -812,6 +831,34 @@ main(int argc, /* I - Number of command-line args */
media_col_sup->values[i].string.text);
}
+ if ((operations_sup = ippFindAttribute(supported, "operations-supported",
+ IPP_TAG_ENUM)) != NULL)
+ {
+ for (i = 0; i < operations_sup->num_values; i ++)
+ if (operations_sup->values[i].integer == IPP_VALIDATE_JOB)
+ {
+ validate_job = 1;
+ break;
+ }
+
+ if (!validate_job)
+ {
+ _cupsLangPrintFilter(stderr, "WARNING",
+ _("This printer does not conform to the IPP "
+ "standard and may not work."));
+ fputs("DEBUG: operations-supported does not list Validate-Job.\n",
+ stderr);
+ }
+ }
+ else
+ {
+ _cupsLangPrintFilter(stderr, "WARNING",
+ _("This printer does not conform to the IPP "
+ "standard and may not work."));
+ fputs("DEBUG: operations-supported not returned in "
+ "Get-Printer-Attributes request.\n", stderr);
+ }
+
report_printer_state(supported, 0);
}
while (ipp_status > IPP_OK_CONFLICT);
@@ -875,6 +922,44 @@ main(int argc, /* I - Number of command-line args */
copies_remaining = copies;
/*
+ * Prepare remaining printing options...
+ */
+
+ options = NULL;
+ pwg = NULL;
+
+ if (send_options)
+ {
+ num_options = cupsParseOptions(argv[5], 0, &options);
+
+ if (!cups_version && media_col_sup)
+ {
+ /*
+ * Load the PPD file and generate PWG attribute mapping information...
+ */
+
+ ppd = ppdOpenFile(getenv("PPD"));
+ pwg = _pwgCreateWithPPD(ppd);
+
+ ppdClose(ppd);
+ }
+ }
+ else
+ num_options = 0;
+
+ document_format = NULL;
+
+ if (format_sup != NULL)
+ {
+ for (i = 0; i < format_sup->num_values; i ++)
+ if (!strcasecmp(final_content_type, format_sup->values[i].string.text))
+ {
+ document_format = final_content_type;
+ break;
+ }
+ }
+
+ /*
* Start monitoring the printer in the background...
*/
@@ -892,252 +977,89 @@ main(int argc, /* I - Number of command-line args */
_cupsThreadCreate((_cups_thread_func_t)monitor_printer, &monitor);
/*
- * Then issue the print-job request...
+ * Validate access to the printer...
*/
- job_id = 0;
-
- while (copies_remaining > 0)
+ while (!job_canceled)
{
- /*
- * Check for side-channel requests...
- */
-
- backendCheckSideChannel(snmp_fd, http->hostaddr);
-
- /*
- * Build the IPP request...
- */
-
- if (job_canceled)
- break;
-
- if (num_files > 1)
- request = ippNewRequest(IPP_CREATE_JOB);
- else
- request = ippNewRequest(IPP_PRINT_JOB);
-
- request->request.op.version[0] = version / 10;
- request->request.op.version[1] = version % 10;
-
- fprintf(stderr, "DEBUG: %s IPP/%d.%d\n",
- ippOpString(request->request.op.operation_id),
- request->request.op.version[0],
- request->request.op.version[1]);
-
- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
- NULL, uri);
- fprintf(stderr, "DEBUG: printer-uri=\"%s\"\n", uri);
-
- if (argv[2][0])
- {
- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
- "requesting-user-name", NULL, argv[2]);
- fprintf(stderr, "DEBUG: requesting-user-name=\"%s\"\n", argv[2]);
- }
-
- if (argv[3][0])
- {
- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL,
- argv[3]);
- fprintf(stderr, "DEBUG: job-name=\"%s\"\n", argv[3]);
- }
-
-#ifdef HAVE_LIBZ
- if (compression)
- ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
- "compression", NULL, "gzip");
-#endif /* HAVE_LIBZ */
+ request = new_request(IPP_VALIDATE_JOB, version, uri, argv[2], argv[3],
+ num_options, options, compression,
+ copies_sup ? copies : 1, document_format, pwg,
+ media_col_sup);
- /*
- * Handle options on the command-line...
- */
+ ippDelete(cupsDoRequest(http, request, resource));
- options = NULL;
- num_options = cupsParseOptions(argv[5], 0, &options);
+ ipp_status = cupsLastError();
- if (format_sup != NULL)
+ if (ipp_status > IPP_OK_CONFLICT)
{
- for (i = 0; i < format_sup->num_values; i ++)
- if (!strcasecmp(final_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);
- }
+ if (job_canceled)
+ break;
- if (send_options)
- {
- if (cups_version || !media_col_sup)
+ if (ipp_status == IPP_SERVICE_UNAVAILABLE ||
+ ipp_status == IPP_PRINTER_BUSY)
{
- /*
- * When talking to another CUPS server, send all options...
- */
-
- cupsEncodeOptions(request, num_options, options);
+ _cupsLangPrintFilter(stderr, "INFO",
+ _("Printer busy; will retry in 10 seconds."));
+ sleep(10);
}
else
{
/*
- * Otherwise send standard IPP attributes...
+ * Update auth-info-required as needed...
*/
- char cachefile[1024];/* Printer PWG cache file */
- const char *cups_cachedir; /* Location of cache file */
- _pwg_t *pwg; /* PWG mapping data */
- const char *keyword; /* PWG keyword */
- _pwg_size_t *size; /* PWG media size */
+ _cupsLangPrintFilter(stderr, "ERROR", "%s", cupsLastErrorString());
-
- if ((cups_cachedir = getenv("CUPS_CACHEDIR")) == NULL)
- cups_cachedir = CUPS_CACHEDIR;
-
- snprintf(cachefile, sizeof(cachefile), "%s/%s.pwg", cups_cachedir,
- getenv("PRINTER"));
-
- if ((keyword = cupsGetOption("PageSize", num_options, options)) == NULL)
- keyword = cupsGetOption("media", num_options, options);
-
- pwg = _pwgCreateWithFile(cachefile);
- size = _pwgGetSize(pwg, keyword);
-
- if (media_col_sup && size)
+ if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN)
{
- ipp_t *media_col, /* media-col value */
- *media_size; /* media-size value */
- const char *media_source, /* media-source value */
- *media_type; /* media-type value */
-
- media_size = ippNew();
- ippAddInteger(media_size, IPP_TAG_ZERO, IPP_TAG_INTEGER,
- "x-dimension", size->width);
- ippAddInteger(media_size, IPP_TAG_ZERO, IPP_TAG_INTEGER,
- "y-dimension", size->length);
-
- media_col = ippNew();
- ippAddCollection(media_col, IPP_TAG_ZERO, "media-size", media_size);
-
- media_source = _pwgGetSource(pwg, cupsGetOption("InputSlot",
- num_options,
- options));
- media_type = _pwgGetType(pwg, cupsGetOption("MediaType",
- num_options, options));
-
- for (i = 0; i < media_col_sup->num_values; i ++)
- {
- if (!strcmp(media_col_sup->values[i].string.text,
- "media-left-margin"))
- ippAddInteger(media_col, IPP_TAG_ZERO, IPP_TAG_INTEGER,
- "media-left-margin", size->left);
- else if (!strcmp(media_col_sup->values[i].string.text,
- "media-bottom-margin"))
- ippAddInteger(media_col, IPP_TAG_ZERO, IPP_TAG_INTEGER,
- "media-bottom-margin", size->left);
- else if (!strcmp(media_col_sup->values[i].string.text,
- "media-right-margin"))
- ippAddInteger(media_col, IPP_TAG_ZERO, IPP_TAG_INTEGER,
- "media-right-margin", size->left);
- else if (!strcmp(media_col_sup->values[i].string.text,
- "media-top-margin"))
- ippAddInteger(media_col, IPP_TAG_ZERO, IPP_TAG_INTEGER,
- "media-top-margin", size->left);
- else if (!strcmp(media_col_sup->values[i].string.text,
- "media-source") && media_source)
- ippAddString(media_col, IPP_TAG_ZERO, IPP_TAG_KEYWORD,
- "media-source", NULL, media_source);
- else if (!strcmp(media_col_sup->values[i].string.text,
- "media-type") && media_type)
- ippAddString(media_col, IPP_TAG_ZERO, IPP_TAG_KEYWORD,
- "media-type", NULL, media_type);
- }
-
- ippAddCollection(request, IPP_TAG_JOB, "media-col", media_col);
- }
- else if (size)
- ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "media",
- NULL, size->map.pwg);
- else if (keyword)
- {
- _pwg_media_t *found; /* PWG media */
-
+ fprintf(stderr, "DEBUG: WWW-Authenticate=\"%s\"\n",
+ httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE));
- if ((found = _pwgMediaForPPD(keyword)) != NULL)
- keyword = found->pwg;
- else if ((found = _pwgMediaForLegacy(keyword)) != NULL)
- keyword = found->pwg;
+ /*
+ * Normal authentication goes through the password callback, which sets
+ * auth_info_required to "username,password". Kerberos goes directly
+ * through GSSAPI, so look for Negotiate in the WWW-Authenticate header
+ * here and set auth_info_required as needed...
+ */
- ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "media",
- NULL, keyword);
- }
+ if (!strncmp(httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE),
+ "Negotiate", 9))
+ auth_info_required = "negotiate";
+ }
- if ((keyword = cupsGetOption("output-bin", num_options,
- options)) == NULL)
- keyword = _pwgGetBin(pwg, cupsGetOption("OutputBin", num_options,
- options));
+ goto cleanup;
+ }
+ }
+ else
+ break;
+ }
- if (keyword)
- ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "output-bin",
- NULL, keyword);
+ /*
+ * Then issue the print-job request...
+ */
- if ((keyword = cupsGetOption("output-mode", num_options,
- options)) != NULL)
- ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "output-mode",
- NULL, keyword);
- else if ((keyword = cupsGetOption("ColorModel", num_options,
- options)) != NULL)
- {
- if (!strcasecmp(keyword, "Gray"))
- ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "output-mode",
- NULL, "monochrome");
- else if (!strcasecmp(keyword, "Color"))
- ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "output-mode",
- NULL, "color");
- }
+ job_id = 0;
- if ((keyword = cupsGetOption("print-quality", num_options,
- options)) != NULL)
- ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_ENUM, "print-quality",
- atoi(keyword));
- else if ((keyword = cupsGetOption("cupsPrintQuality", num_options,
- options)) != NULL)
- {
- if (!strcasecmp(keyword, "draft"))
- ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_ENUM, "print-quality",
- IPP_QUALITY_DRAFT);
- else if (!strcasecmp(keyword, "normal"))
- ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_ENUM, "print-quality",
- IPP_QUALITY_NORMAL);
- else if (!strcasecmp(keyword, "high"))
- ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_ENUM, "print-quality",
- IPP_QUALITY_HIGH);
- }
+ while (!job_canceled && copies_remaining > 0)
+ {
+ /*
+ * Check for side-channel requests...
+ */
- if ((keyword = cupsGetOption("sides", num_options, options)) != NULL)
- ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides",
- NULL, keyword);
- else if ((keyword = cupsGetOption("Duplex", num_options,
- options)) != NULL)
- {
- if (!strcasecmp(keyword, "None"))
- ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides",
- NULL, "one-sided");
- else if (!strcasecmp(keyword, "DuplexNoTumble"))
- ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides",
- NULL, "two-sided-long-edge");
- if (!strcasecmp(keyword, "DuplexTumble"))
- ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides",
- NULL, "two-sided-short-edge");
- }
+ backendCheckSideChannel(snmp_fd, http->hostaddr);
- _pwgDestroy(pwg);
- }
+ /*
+ * Build the IPP job creation request...
+ */
- if (copies_sup && copies > 1)
- ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_INTEGER, "copies", copies);
- }
+ if (job_canceled)
+ break;
- cupsFreeOptions(num_options, options);
+ request = new_request(num_files > 1 ? IPP_CREATE_JOB : IPP_PRINT_JOB,
+ version, uri, argv[2], argv[3], num_options, options,
+ compression, copies_sup ? copies : 1, document_format,
+ pwg, media_col_sup);
/*
* Do the request...
@@ -1490,6 +1412,11 @@ main(int argc, /* I - Number of command-line args */
* Free memory...
*/
+ cleanup:
+
+ cupsFreeOptions(num_options, options);
+ _pwgDestroy(pwg);
+
httpClose(http);
ippDelete(supported);
@@ -1814,6 +1741,230 @@ monitor_printer(
/*
+ * 'new_request()' - Create a new print creation or validation request.
+ */
+
+static ipp_t * /* O - Request data */
+new_request(
+ ipp_op_t op, /* I - IPP operation code */
+ int version, /* I - IPP version number */
+ const char *uri, /* I - printer-uri value */
+ const char *user, /* I - requesting-user-name value */
+ const char *title, /* I - job-name value */
+ int num_options, /* I - Number of options to send */
+ cups_option_t *options, /* I - Options to send */
+ const char *compression, /* I - compression value or NULL */
+ int copies, /* I - copies value or 0 */
+ const char *format, /* I - documet-format value or NULL */
+ _pwg_t *pwg, /* I - PWG<->PPD mapping data */
+ ipp_attribute_t *media_col_sup) /* I - media-col-supported values */
+{
+ int i; /* Looping var */
+ ipp_t *request; /* Request data */
+ const char *keyword; /* PWG keyword */
+ _pwg_size_t *size; /* PWG media size */
+ ipp_t *media_col, /* media-col value */
+ *media_size; /* media-size value */
+ const char *media_source, /* media-source value */
+ *media_type; /* media-type value */
+
+
+ /*
+ * Create the IPP request...
+ */
+
+ request = ippNewRequest(op);
+ request->request.op.version[0] = version / 10;
+ request->request.op.version[1] = version % 10;
+
+ fprintf(stderr, "DEBUG: %s IPP/%d.%d\n",
+ ippOpString(request->request.op.operation_id),
+ request->request.op.version[0],
+ request->request.op.version[1]);
+
+ /*
+ * Add standard attributes...
+ */
+
+ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
+ NULL, uri);
+ fprintf(stderr, "DEBUG: printer-uri=\"%s\"\n", uri);
+
+ if (user && *user)
+ {
+ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
+ "requesting-user-name", NULL, user);
+ fprintf(stderr, "DEBUG: requesting-user-name=\"%s\"\n", user);
+ }
+
+ if (title && *title)
+ {
+ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "job-name", NULL,
+ title);
+ fprintf(stderr, "DEBUG: job-name=\"%s\"\n", title);
+ }
+
+ if (format)
+ {
+ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
+ "document-format", NULL, format);
+ fprintf(stderr, "DEBUG: document-format=\"%s\"\n", format);
+ }
+
+#ifdef HAVE_LIBZ
+ if (compression)
+ {
+ ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
+ "compression", NULL, compression);
+ fprintf(stderr, "DEBUG: compression=\"%s\"\n", compression);
+ }
+#endif /* HAVE_LIBZ */
+
+ /*
+ * Handle options on the command-line...
+ */
+
+ if (num_options > 0)
+ {
+ if (pwg)
+ {
+ /*
+ * Send standard IPP attributes...
+ */
+
+ if ((keyword = cupsGetOption("PageSize", num_options, options)) == NULL)
+ keyword = cupsGetOption("media", num_options, options);
+
+ if ((size = _pwgGetSize(pwg, keyword)) != NULL)
+ {
+ /*
+ * Add a media-col value...
+ */
+
+ media_size = ippNew();
+ ippAddInteger(media_size, IPP_TAG_ZERO, IPP_TAG_INTEGER,
+ "x-dimension", size->width);
+ ippAddInteger(media_size, IPP_TAG_ZERO, IPP_TAG_INTEGER,
+ "y-dimension", size->length);
+
+ media_col = ippNew();
+ ippAddCollection(media_col, IPP_TAG_ZERO, "media-size", media_size);
+
+ media_source = _pwgGetSource(pwg, cupsGetOption("InputSlot",
+ num_options,
+ options));
+ media_type = _pwgGetType(pwg, cupsGetOption("MediaType",
+ num_options, options));
+
+ for (i = 0; i < media_col_sup->num_values; i ++)
+ {
+ if (!strcmp(media_col_sup->values[i].string.text,
+ "media-left-margin"))
+ ippAddInteger(media_col, IPP_TAG_ZERO, IPP_TAG_INTEGER,
+ "media-left-margin", size->left);
+ else if (!strcmp(media_col_sup->values[i].string.text,
+ "media-bottom-margin"))
+ ippAddInteger(media_col, IPP_TAG_ZERO, IPP_TAG_INTEGER,
+ "media-bottom-margin", size->left);
+ else if (!strcmp(media_col_sup->values[i].string.text,
+ "media-right-margin"))
+ ippAddInteger(media_col, IPP_TAG_ZERO, IPP_TAG_INTEGER,
+ "media-right-margin", size->left);
+ else if (!strcmp(media_col_sup->values[i].string.text,
+ "media-top-margin"))
+ ippAddInteger(media_col, IPP_TAG_ZERO, IPP_TAG_INTEGER,
+ "media-top-margin", size->left);
+ else if (!strcmp(media_col_sup->values[i].string.text,
+ "media-source") && media_source)
+ ippAddString(media_col, IPP_TAG_ZERO, IPP_TAG_KEYWORD,
+ "media-source", NULL, media_source);
+ else if (!strcmp(media_col_sup->values[i].string.text,
+ "media-type") && media_type)
+ ippAddString(media_col, IPP_TAG_ZERO, IPP_TAG_KEYWORD,
+ "media-type", NULL, media_type);
+ }
+
+ ippAddCollection(request, IPP_TAG_JOB, "media-col", media_col);
+ }
+
+ if ((keyword = cupsGetOption("output-bin", num_options,
+ options)) == NULL)
+ keyword = _pwgGetBin(pwg, cupsGetOption("OutputBin", num_options,
+ options));
+
+ if (keyword)
+ ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "output-bin",
+ NULL, keyword);
+
+ if ((keyword = cupsGetOption("output-mode", num_options,
+ options)) != NULL)
+ ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "output-mode",
+ NULL, keyword);
+ else if ((keyword = cupsGetOption("ColorModel", num_options,
+ options)) != NULL)
+ {
+ if (!strcasecmp(keyword, "Gray"))
+ ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "output-mode",
+ NULL, "monochrome");
+ else
+ ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "output-mode",
+ NULL, "color");
+ }
+
+ if ((keyword = cupsGetOption("print-quality", num_options,
+ options)) != NULL)
+ ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_ENUM, "print-quality",
+ atoi(keyword));
+ else if ((keyword = cupsGetOption("cupsPrintQuality", num_options,
+ options)) != NULL)
+ {
+ if (!strcasecmp(keyword, "draft"))
+ ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_ENUM, "print-quality",
+ IPP_QUALITY_DRAFT);
+ else if (!strcasecmp(keyword, "normal"))
+ ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_ENUM, "print-quality",
+ IPP_QUALITY_NORMAL);
+ else if (!strcasecmp(keyword, "high"))
+ ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_ENUM, "print-quality",
+ IPP_QUALITY_HIGH);
+ }
+
+ if ((keyword = cupsGetOption("sides", num_options, options)) != NULL)
+ ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides",
+ NULL, keyword);
+ else if (pwg->sides_option &&
+ (keyword = cupsGetOption(pwg->sides_option, num_options,
+ options)) != NULL)
+ {
+ if (!strcasecmp(keyword, pwg->sides_1sided))
+ ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides",
+ NULL, "one-sided");
+ else if (!strcasecmp(keyword, pwg->sides_2sided_long))
+ ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides",
+ NULL, "two-sided-long-edge");
+ if (!strcasecmp(keyword, pwg->sides_2sided_short))
+ ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides",
+ NULL, "two-sided-short-edge");
+ }
+ }
+ else
+ {
+ /*
+ * When talking to another CUPS server, send all options...
+ */
+
+ cupsEncodeOptions(request, num_options, options);
+ }
+
+ if (copies > 1)
+ ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_INTEGER, "copies", copies);
+ }
+
+ return (request);
+}
+
+
+/*
* 'password_cb()' - Disable the password prompt for cupsDoFileRequest().
*/
diff --git a/backend/lpd.c b/backend/lpd.c
index ccc88bace..914ffc2cf 100644
--- a/backend/lpd.c
+++ b/backend/lpd.c
@@ -3,7 +3,7 @@
*
* Line Printer Daemon backend for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -191,8 +191,14 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Extract the hostname and printer name from the URI...
*/
- if ((device_uri = cupsBackendDeviceURI(argv)) == NULL)
- return (CUPS_BACKEND_FAILED);
+ while ((device_uri = cupsBackendDeviceURI(argv)) == NULL)
+ {
+ _cupsLangPrintFilter(stderr, "INFO", _("Unable to locate printer."));
+ sleep(10);
+
+ if (getenv("CLASS") != NULL)
+ return (CUPS_BACKEND_FAILED);
+ }
httpSeparateURI(HTTP_URI_CODING_ALL, device_uri, scheme, sizeof(scheme),
username, sizeof(username), hostname, sizeof(hostname), &port,
@@ -225,36 +231,15 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
#ifdef __APPLE__
/*
- * We want to pass utf-8 characters, not re-map them (3071945)
+ * We want to pass UTF-8 characters by default, not re-map them (3071945)
*/
sanitize_title = 0;
-
+#else
/*
- * Get the default timeout from a system preference...
+ * Otherwise we want to re-map UTF-8 to "safe" characters by default...
*/
- {
- CFPropertyListRef pvalue; /* Preference value */
- SInt32 toval; /* Timeout value */
-
-
- pvalue = CFPreferencesCopyValue(CFSTR("timeout"),
- CFSTR("com.apple.print.backends"),
- kCFPreferencesAnyUser,
- kCFPreferencesCurrentHost);
- if (pvalue)
- {
- if (CFGetTypeID(pvalue) == CFNumberGetTypeID())
- {
- CFNumberGetValue(pvalue, kCFNumberSInt32Type, &toval);
- contimeout = (int)toval;
- }
-
- CFRelease(pvalue);
- }
- }
-#else
sanitize_title = 1;
#endif /* __APPLE__ */
@@ -432,11 +417,14 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
fputs("STATE: +connecting-to-device\n", stderr);
fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname);
- if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, "1")) == NULL)
+ while ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, "1")) == NULL)
{
- _cupsLangPrintFilter(stderr, "ERROR",
+ _cupsLangPrintFilter(stderr, "INFO",
_("Unable to locate printer \"%s\"."), hostname);
- return (CUPS_BACKEND_STOP);
+ sleep(10);
+
+ if (getenv("CLASS") != NULL)
+ exit(CUPS_BACKEND_FAILED);
}
snmp_fd = _cupsSNMPOpen(addrlist->addr.addr.sa_family);
@@ -687,11 +675,14 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
fputs("STATE: +connecting-to-device\n", stderr);
fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname);
- if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
+ while ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
{
- _cupsLangPrintFilter(stderr, "ERROR", _("Unable to locate printer \"%s\"."),
+ _cupsLangPrintFilter(stderr, "INFO", _("Unable to locate printer \"%s\"."),
hostname);
- return (CUPS_BACKEND_STOP);
+ sleep(10);
+
+ if (getenv("CLASS") != NULL)
+ exit(CUPS_BACKEND_FAILED);
}
/*
diff --git a/backend/socket.c b/backend/socket.c
index ae9e03f69..6f64fb0c0 100644
--- a/backend/socket.c
+++ b/backend/socket.c
@@ -3,7 +3,7 @@
*
* AppSocket backend for the Common UNIX Printing System (CUPS).
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -164,8 +164,14 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
* Extract the hostname and port number from the URI...
*/
- if ((device_uri = cupsBackendDeviceURI(argv)) == NULL)
- return (CUPS_BACKEND_FAILED);
+ while ((device_uri = cupsBackendDeviceURI(argv)) == NULL)
+ {
+ _cupsLangPrintFilter(stderr, "INFO", _("Unable to locate printer."));
+ sleep(10);
+
+ if (getenv("CLASS") != NULL)
+ return (CUPS_BACKEND_FAILED);
+ }
httpSeparateURI(HTTP_URI_CODING_ALL, device_uri, scheme, sizeof(scheme),
username, sizeof(username), hostname, sizeof(hostname), &port,
@@ -261,11 +267,14 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
fputs("STATE: +connecting-to-device\n", stderr);
fprintf(stderr, "DEBUG: Looking up \"%s\"...\n", hostname);
- if ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
+ while ((addrlist = httpAddrGetList(hostname, AF_UNSPEC, portname)) == NULL)
{
- _cupsLangPrintFilter(stderr, "ERROR",
+ _cupsLangPrintFilter(stderr, "INFO",
_("Unable to locate printer \"%s\"."), hostname);
- return (CUPS_BACKEND_STOP);
+ sleep(10);
+
+ if (getenv("CLASS") != NULL)
+ return (CUPS_BACKEND_STOP);
}
fprintf(stderr, "DEBUG: Connecting to %s:%d\n", hostname, port);
diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c
index 71d2a3a54..2c2d73e56 100644
--- a/backend/usb-libusb.c
+++ b/backend/usb-libusb.c
@@ -3,7 +3,7 @@
*
* Libusb interface code for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
*
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
@@ -101,7 +101,7 @@ print_device(const char *uri, /* I - Device URI */
usb_printer_t *printer; /* Printer */
ssize_t bytes, /* Bytes read/written */
tbytes; /* Total bytes written */
- char buffer[8192]; /* Print data buffer */
+ char buffer[512]; /* Print data buffer */
struct sigaction action; /* Actions for POSIX signals */
struct pollfd pfds[2]; /* Poll descriptors */
@@ -748,7 +748,7 @@ side_cb(usb_printer_t *printer, /* I - Printer */
{
ssize_t bytes, /* Bytes read/written */
tbytes; /* Total bytes written */
- char buffer[8192]; /* Print data buffer */
+ char buffer[512]; /* Print data buffer */
struct pollfd pfd; /* Poll descriptor */
cups_sc_command_t command; /* Request command */
cups_sc_status_t status; /* Request/response status */
diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c
index a5250dc10..f8cbba1ea 100644
--- a/cgi-bin/admin.c
+++ b/cgi-bin/admin.c
@@ -1,9 +1,9 @@
/*
* "$Id: admin.c 8029 2008-10-08 21:07:45Z mike $"
*
- * Administration CGI for the Common UNIX Printing System (CUPS).
+ * Administration CGI for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -145,7 +145,30 @@ main(int argc, /* I - Number of command-line arguments */
fprintf(stderr, "DEBUG: op=\"%s\"...\n", op);
- if (!strcmp(op, "set-allowed-users"))
+ if (!*op)
+ {
+ const char *printer = getenv("PRINTER_NAME"),
+ /* Printer or class name */
+ *server_port = getenv("SERVER_PORT");
+ /* Port number string */
+ int port = atoi(server_port ? server_port : "0");
+ /* Port number */
+ char uri[1024]; /* URL */
+
+ if (printer)
+ httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri),
+ getenv("HTTPS") ? "https" : "http", NULL,
+ getenv("SERVER_NAME"), port, "/%s/%s",
+ cgiGetVariable("IS_CLASS") ? "classes" : "printers",
+ printer);
+ else
+ httpAssembleURI(HTTP_URI_CODING_ALL, uri, sizeof(uri),
+ getenv("HTTPS") ? "https" : "http", NULL,
+ getenv("SERVER_NAME"), port, "/admin");
+
+ printf("Location: %s\n\n", uri);
+ }
+ else if (!strcmp(op, "set-allowed-users"))
do_set_allowed_users(http);
else if (!strcmp(op, "set-as-default"))
do_set_default(http);
@@ -1040,7 +1063,8 @@ do_am_printer(http_t *http, /* I - HTTP connection */
}
}
}
- else if (strchr(var, '/') == NULL)
+ else if (!strchr(var, '/') ||
+ (!strncmp(var, "lpd://", 6) && !strchr(var + 6, '/')))
{
if ((attr = ippFindAttribute(oldinfo, "device-uri", IPP_TAG_URI)) != NULL)
{
diff --git a/cgi-bin/classes.c b/cgi-bin/classes.c
index 7fa7eb80e..d0f4b0a20 100644
--- a/cgi-bin/classes.c
+++ b/cgi-bin/classes.c
@@ -1,9 +1,9 @@
/*
* "$Id: classes.c 7940 2008-09-16 00:45:16Z mike $"
*
- * Class status CGI for the Common UNIX Printing System (CUPS).
+ * Class status CGI for CUPS.
*
- * Copyright 2007-2008 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -147,7 +147,21 @@ main(int argc, /* I - Number of command-line arguments */
}
else if (pclass)
{
- if (!strcmp(op, "start-class"))
+ if (!*op)
+ {
+ const char *server_port = getenv("SERVER_PORT");
+ /* Port number string */
+ int port = atoi(server_port ? server_port : "0");
+ /* Port number */
+ char uri[1024]; /* URL */
+
+ httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri),
+ getenv("HTTPS") ? "https" : "http", NULL,
+ getenv("SERVER_NAME"), port, "/classes/%s", pclass);
+
+ printf("Location: %s\n\n", uri);
+ }
+ else if (!strcmp(op, "start-class"))
do_class_op(http, pclass, IPP_RESUME_PRINTER, cgiText(_("Resume Class")));
else if (!strcmp(op, "stop-class"))
do_class_op(http, pclass, IPP_PAUSE_PRINTER, cgiText(_("Pause Class")));
diff --git a/cgi-bin/html.c b/cgi-bin/html.c
index 5d0a39fdd..ea2b3f705 100644
--- a/cgi-bin/html.c
+++ b/cgi-bin/html.c
@@ -1,9 +1,9 @@
/*
* "$Id: html.c 6649 2007-07-11 21:46:42Z mike $"
*
- * HTML support functions for the Common UNIX Printing System (CUPS).
+ * HTML support functions for CUPS.
*
- * Copyright 2007-2009 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -208,31 +208,13 @@ cgiStartMultipart(void)
int /* O - 1 if multi-part supported, 0 otherwise */
cgiSupportsMultipart(void)
{
- const char *user_agent; /* User-Agent string */
- static int supports_multipart = -1;/* Cached value */
-
-
- if (supports_multipart < 0)
- {
- /*
- * CUPS STR #3049: Apparently some browsers don't support multi-part
- * documents, which makes them useless for many web sites. Rather than
- * abandoning those users, we'll offer a degraded single-part mode...
- *
- * Currently we know that anything based on Gecko, MSIE, and Safari all
- * work. We'll add more as they are reported/tested.
- */
-
- if ((user_agent = getenv("HTTP_USER_AGENT")) != NULL &&
- (strstr(user_agent, " Gecko/") != NULL ||
- strstr(user_agent, " MSIE ") != NULL ||
- strstr(user_agent, " Safari/") != NULL))
- supports_multipart = 1;
- else
- supports_multipart = 0;
- }
+ /*
+ * Too many bug reports for browsers that don't support it, and too much pain
+ * to whitelist known-good browsers, so for now we just punt on multi-part
+ * support... :(
+ */
- return (supports_multipart);
+ return (0);
}
diff --git a/cgi-bin/printers.c b/cgi-bin/printers.c
index f57a4251e..8b613f3b7 100644
--- a/cgi-bin/printers.c
+++ b/cgi-bin/printers.c
@@ -1,9 +1,9 @@
/*
* "$Id: printers.c 7940 2008-09-16 00:45:16Z mike $"
*
- * Printer status CGI for the Common UNIX Printing System (CUPS).
+ * Printer status CGI for CUPS.
*
- * Copyright 2007-2008 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -148,7 +148,21 @@ main(int argc, /* I - Number of command-line arguments */
}
else if (printer)
{
- if (!strcmp(op, "start-printer"))
+ if (!*op)
+ {
+ const char *server_port = getenv("SERVER_PORT");
+ /* Port number string */
+ int port = atoi(server_port ? server_port : "0");
+ /* Port number */
+ char uri[1024]; /* URL */
+
+ httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri),
+ getenv("HTTPS") ? "https" : "http", NULL,
+ getenv("SERVER_NAME"), port, "/printers/%s", printer);
+
+ printf("Location: %s\n\n", uri);
+ }
+ else if (!strcmp(op, "start-printer"))
do_printer_op(http, printer, IPP_RESUME_PRINTER,
cgiText(_("Resume Printer")));
else if (!strcmp(op, "stop-printer"))
diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4
index 1c2f4d25b..72bc505fe 100644
--- a/config-scripts/cups-common.m4
+++ b/config-scripts/cups-common.m4
@@ -3,7 +3,7 @@ dnl "$Id: cups-common.m4 8781 2009-08-28 17:34:54Z mike $"
dnl
dnl Common configuration stuff for CUPS.
dnl
-dnl Copyright 2007-2010 by Apple Inc.
+dnl Copyright 2007-2011 by Apple Inc.
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
@@ -88,6 +88,9 @@ fi
AC_SUBST(INSTALLSTATIC)
+dnl Check for pkg-config, which is used for some other tests later on...
+AC_PATH_PROG(PKGCONFIG, pkg-config)
+
dnl Check for libraries...
AC_SEARCH_LIBS(crypt, crypt)
AC_SEARCH_LIBS(getspent, sec gen)
@@ -216,7 +219,7 @@ else
fi
if test $check_libusb = yes; then
- AC_CHECK_LIB(usb, usb_init,[
+ AC_CHECK_LIB(usb, usb_get_string_simple,[
AC_CHECK_HEADER(usb.h,
AC_DEFINE(HAVE_USB_H)
LIBUSB="-lusb")])
@@ -277,24 +280,22 @@ AC_ARG_WITH(dbusdir, [ --with-dbusdir set DBUS configuration directory
DBUS_NOTIFIER=""
DBUS_NOTIFIERLIBS=""
-if test "x$enable_dbus" != xno; then
- AC_PATH_PROG(PKGCONFIG, pkg-config)
- if test "x$PKGCONFIG" != x; then
- AC_MSG_CHECKING(for DBUS)
- if $PKGCONFIG --exists dbus-1; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_DBUS)
- CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
- SERVERLIBS="$SERVERLIBS `$PKGCONFIG --libs dbus-1`"
- DBUS_NOTIFIER="dbus"
- DBUS_NOTIFIERLIBS="`$PKGCONFIG --libs dbus-1`"
- AC_CHECK_LIB(dbus-1,
- dbus_message_iter_init_append,
- AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND),,
- `$PKGCONFIG --libs dbus-1`)
- else
- AC_MSG_RESULT(no)
- fi
+if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x; then
+ AC_MSG_CHECKING(for DBUS)
+ if $PKGCONFIG --exists dbus-1; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_DBUS)
+ CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
+ SERVERLIBS="$SERVERLIBS `$PKGCONFIG --libs dbus-1`"
+ DBUS_NOTIFIER="dbus"
+ DBUS_NOTIFIERLIBS="`$PKGCONFIG --libs dbus-1`"
+ SAVELIBS="$LIBS"
+ LIBS="$LIBS $DBUS_NOTIFIERLIBS"
+ AC_CHECK_FUNC(dbus_message_iter_init_append,
+ AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND))
+ LIBS="$SAVELIBS"
+ else
+ AC_MSG_RESULT(no)
fi
fi
diff --git a/config-scripts/cups-ssl.m4 b/config-scripts/cups-ssl.m4
index 86faf5f9d..2bb6b62b2 100644
--- a/config-scripts/cups-ssl.m4
+++ b/config-scripts/cups-ssl.m4
@@ -3,7 +3,7 @@ dnl "$Id: cups-ssl.m4 7241 2008-01-22 22:34:52Z mike $"
dnl
dnl OpenSSL/GNUTLS stuff for CUPS.
dnl
-dnl Copyright 2007-2010 by Apple Inc.
+dnl Copyright 2007-2011 by Apple Inc.
dnl Copyright 1997-2007 by Easy Software Products, all rights reserved.
dnl
dnl These coded instructions, statements, and computer programs are the
@@ -30,7 +30,7 @@ have_ssl=0
if test x$enable_ssl != xno; then
dnl Look for CDSA...
- if test $have_ssl = 0 -a "x${enable_cdsassl}" != "xno"; then
+ if test $have_ssl = 0 -a "x$enable_cdsassl" != "xno"; then
if test $uname = Darwin; then
AC_CHECK_HEADER(Security/SecureTransport.h, [
have_ssl=1
@@ -40,6 +40,8 @@ if test x$enable_ssl != xno; then
dnl Check for the various security headers...
AC_CHECK_HEADER(Security/SecCertificate.h,
AC_DEFINE(HAVE_SECCERTIFICATE_H))
+ AC_CHECK_HEADER(Security/SecItem.h,
+ AC_DEFINE(HAVE_SECITEM_H))
AC_CHECK_HEADER(Security/SecItemPriv.h,
AC_DEFINE(HAVE_SECITEMPRIV_H))
AC_CHECK_HEADER(Security/SecPolicy.h,
@@ -74,7 +76,7 @@ if test x$enable_ssl != xno; then
fi
dnl Then look for GNU TLS...
- if test $have_ssl = 0 -a "x${enable_gnutls}" != "xno" -a "x$PKGCONFIG" != x; then
+ if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; then
AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config)
AC_PATH_PROG(LIBGCRYPTCONFIG,libgcrypt-config)
if $PKGCONFIG --exists gnutls; then
@@ -111,7 +113,7 @@ if test x$enable_ssl != xno; then
fi
dnl Check for the OpenSSL library last...
- if test $have_ssl = 0 -a "x${enable_openssl}" != "xno"; then
+ if test $have_ssl = 0 -a "x$enable_openssl" != "xno"; then
AC_CHECK_HEADER(openssl/ssl.h,
dnl Save the current libraries so the crypto stuff isn't always
dnl included...
@@ -148,6 +150,8 @@ fi
if test $have_ssl = 1; then
AC_MSG_RESULT([ Using SSLLIBS="$SSLLIBS"])
AC_MSG_RESULT([ Using SSLFLAGS="$SSLFLAGS"])
+elif test x$enable_cdsa = xyes -o x$enable_gnutls = xyes -o x$enable_openssl = xyes; then
+ AC_MSG_ERROR([Unable to enable SSL support.])
fi
AC_SUBST(SSLFLAGS)
diff --git a/config.h.in b/config.h.in
index 1e0c22d2f..42a2b0f32 100644
--- a/config.h.in
+++ b/config.h.in
@@ -3,7 +3,7 @@
*
* Configuration file for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -297,6 +297,7 @@
#undef HAVE_AUTHORIZATION_H
#undef HAVE_SECCERTIFICATE_H
+#undef HAVE_SECITEM_H
#undef HAVE_SECITEMPRIV_H
#undef HAVE_SECPOLICY_H
#undef HAVE_SECPOLICYPRIV_H
diff --git a/cups/adminutil.c b/cups/adminutil.c
index 872a90e56..8ceb55086 100644
--- a/cups/adminutil.c
+++ b/cups/adminutil.c
@@ -3,7 +3,7 @@
*
* Administration utility API definitions for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 2001-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -2034,6 +2034,8 @@ cupsAdminSetServerSettings(
for (i = num_settings, setting = settings; i > 0; i --, setting ++)
if (setting->name[0] != '_' &&
+ strcasecmp(setting->name, "Listen") &&
+ strcasecmp(setting->name, "Port") &&
!cupsGetOption(setting->name, cupsd_num_settings, cupsd_settings))
{
/*
diff --git a/cups/conflicts.c b/cups/conflicts.c
index 95c7b28ac..0ccc3b624 100644
--- a/cups/conflicts.c
+++ b/cups/conflicts.c
@@ -3,7 +3,7 @@
*
* Option marking routines for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -482,13 +482,13 @@ cupsResolveConflicts(
}
}
}
+ }
- if (!changed)
- {
- DEBUG_puts("1ppdResolveConflicts: Unable to automatically resolve "
- "constraint!");
- goto error;
- }
+ if (!changed)
+ {
+ DEBUG_puts("1ppdResolveConflicts: Unable to automatically resolve "
+ "constraint!");
+ goto error;
}
cupsArrayClear(pass);
diff --git a/cups/custom.c b/cups/custom.c
index 9826ad241..d4b959256 100644
--- a/cups/custom.c
+++ b/cups/custom.c
@@ -3,7 +3,7 @@
*
* PPD custom option routines for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -69,14 +69,19 @@ ppd_cparam_t * /* O - Custom parameter or NULL */
ppdFindCustomParam(ppd_coption_t *opt, /* I - Custom option */
const char *name) /* I - Parameter name */
{
- ppd_cparam_t key; /* Custom parameter search key */
+ ppd_cparam_t *param; /* Current custom parameter */
if (!opt)
return (NULL);
- strlcpy(key.name, name, sizeof(key.name));
- return ((ppd_cparam_t *)cupsArrayFind(opt->params, &key));
+ for (param = (ppd_cparam_t *)cupsArrayFirst(opt->params);
+ param;
+ param = (ppd_cparam_t *)cupsArrayNext(opt->params))
+ if (!strcasecmp(param->name, name))
+ break;
+
+ return (param);
}
diff --git a/cups/http-private.h b/cups/http-private.h
index 51b612987..932259ddc 100644
--- a/cups/http-private.h
+++ b/cups/http-private.h
@@ -120,7 +120,9 @@ extern ssize_t _httpWriteGNUTLS(gnutls_transport_ptr ptr, const void *data,
# include <CoreFoundation/CoreFoundation.h>
# include <Security/Security.h>
# include <Security/SecureTransport.h>
-# include <Security/SecItem.h>
+# ifdef HAVE_SECITEM_H
+# include <Security/SecItem.h>
+# endif /* HAVE_SECITEM_H */
# ifdef HAVE_SECBASEPRIV_H
# include <Security/SecBasePriv.h>
# elif defined(HAVE_CSSMERRORSTRING) /* Declare prototype for function in that header... */
diff --git a/cups/http.c b/cups/http.c
index dc117224c..834f61c4c 100644
--- a/cups/http.c
+++ b/cups/http.c
@@ -3,7 +3,7 @@
*
* HTTP routines for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* This file contains Kerberos support code, copyright 2006 by
@@ -159,7 +159,9 @@ static int http_write_chunk(http_t *http, const char *buffer,
int length);
#ifdef HAVE_SSL
static int http_read_ssl(http_t *http, char *buf, int len);
+# ifdef HAVE_CDSASSL
static int http_set_credentials(http_t *http);
+# endif /* HAVE_CDSASSL */
static int http_setup_ssl(http_t *http);
static void http_shutdown_ssl(http_t *http);
static int http_upgrade(http_t *http);
@@ -3594,6 +3596,7 @@ http_send(http_t *http, /* I - Connection to server */
#ifdef HAVE_SSL
+# ifdef HAVE_CDSASSL
/*
* 'http_set_credentials()' - Set the SSL/TLS credentials.
*/
@@ -3602,22 +3605,13 @@ static int /* O - Status of connection */
http_set_credentials(http_t *http) /* I - Connection to server */
{
_cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals */
-# ifdef HAVE_CDSASSL
OSStatus error = 0; /* Error code */
http_tls_credentials_t credentials = NULL;
/* TLS credentials */
-# endif /* HAVE_CDSASSL */
DEBUG_printf(("7http_set_credentials(%p)", http));
-# ifdef HAVE_LIBSSL
- return (-1);
-
-# elif defined(HAVE_GNUTLS)
- return (-1);
-
-# elif defined(HAVE_CDSASSL)
/*
* Prefer connection specific credentials...
*/
@@ -3692,11 +3686,8 @@ http_set_credentials(http_t *http) /* I - Connection to server */
DEBUG_puts("4http_set_credentials: No credentials to set.");
return (error);
-
-# elif defined(HAVE_SSPISSL)
- return (-1);
-# endif /* HAVE_LIBSSL */
}
+# endif /* HAVE_CDSASSL */
/*
diff --git a/cups/http.h b/cups/http.h
index bd6e4571d..6ac8e110e 100644
--- a/cups/http.h
+++ b/cups/http.h
@@ -3,7 +3,7 @@
*
* Hyper-Text Transport Protocol definitions for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -88,7 +88,7 @@ extern "C" {
#if defined(AF_INET6) && !defined(s6_addr32)
# if defined(__sun)
# define s6_addr32 _S6_un._S6_u32
-# elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
+# elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)|| defined(__DragonFly__)
# define s6_addr32 __u6_addr.__u6_addr32
# elif defined(__osf__)
# define s6_addr32 s6_un.sa6_laddr
diff --git a/cups/mark.c b/cups/mark.c
index 21d41d176..4dbd7555c 100644
--- a/cups/mark.c
+++ b/cups/mark.c
@@ -77,10 +77,15 @@ cupsMarkOptions(
s[255]; /* Temporary string */
const char *val, /* Pointer into value */
*media, /* media option */
+ *output_bin, /* output-bin option */
+ *output_mode, /* output-mode option */
*page_size, /* PageSize option */
- *ppd_keyword; /* PPD keyword */
+ *ppd_keyword, /* PPD keyword */
+ *print_quality, /* print-quality option */
+ *sides; /* sides option */
cups_option_t *optptr; /* Current option */
ppd_attr_t *attr; /* PPD attribute */
+ _pwg_t *pwg; /* PWG mapping data */
/*
@@ -93,29 +98,39 @@ cupsMarkOptions(
ppd_debug_marked(ppd, "Before...");
/*
- * Do special handling for media and PageSize...
+ * Do special handling for finishings, media, output-bin, output-mode,
+ * print-color-mode, print-quality, and PageSize...
*/
- media = cupsGetOption("media", num_options, options);
- page_size = cupsGetOption("PageSize", num_options, options);
+ media = cupsGetOption("media", num_options, options);
+ output_bin = cupsGetOption("output-bin", num_options, options);
+ output_mode = cupsGetOption("output-mode", num_options, options);
+ page_size = cupsGetOption("PageSize", num_options, options);
+ print_quality = cupsGetOption("print-quality", num_options, options);
+ sides = cupsGetOption("sides", num_options, options);
- if (media)
+ if ((media || output_bin || output_mode || print_quality || sides) &&
+ !ppd->pwg)
{
/*
* Load PWG mapping data as needed...
*/
- if (!ppd->pwg)
- ppd->pwg = _pwgCreateWithPPD(ppd);
+ ppd->pwg = _pwgCreateWithPPD(ppd);
+ }
+
+ pwg = (_pwg_t *)ppd->pwg;
+ if (media)
+ {
/*
- * Loop through the option string, separating it at commas and
- * marking each individual option as long as the corresponding
- * PPD option (PageSize, InputSlot, etc.) is not also set.
+ * Loop through the option string, separating it at commas and marking each
+ * individual option as long as the corresponding PPD option (PageSize,
+ * InputSlot, etc.) is not also set.
*
- * For PageSize, we also check for an empty option value since
- * some versions of MacOS X use it to specify auto-selection
- * of the media based solely on the size.
+ * For PageSize, we also check for an empty option value since some versions
+ * of MacOS X use it to specify auto-selection of the media based solely on
+ * the size.
*/
for (val = media; *val;)
@@ -139,21 +154,114 @@ cupsMarkOptions(
{
if (!strncasecmp(s, "Custom.", 7) || ppdPageSize(ppd, s))
ppd_mark_option(ppd, "PageSize", s);
- else if ((ppd_keyword = _pwgGetPageSize((_pwg_t *)ppd->pwg, NULL, s,
- NULL)) != NULL)
+ else if ((ppd_keyword = _pwgGetPageSize(pwg, NULL, s, NULL)) != NULL)
ppd_mark_option(ppd, "PageSize", ppd_keyword);
}
- if (!cupsGetOption("InputSlot", num_options, options) &&
- (ppd_keyword = _pwgGetInputSlot((_pwg_t *)ppd->pwg, NULL, s)) != NULL)
- ppd_mark_option(ppd, "InputSlot", ppd_keyword);
+ if (pwg && pwg->source_option &&
+ !cupsGetOption(pwg->source_option, num_options, options) &&
+ (ppd_keyword = _pwgGetInputSlot(pwg, NULL, s)) != NULL)
+ ppd_mark_option(ppd, pwg->source_option, ppd_keyword);
if (!cupsGetOption("MediaType", num_options, options) &&
- (ppd_keyword = _pwgGetMediaType((_pwg_t *)ppd->pwg, NULL, s)) != NULL)
+ (ppd_keyword = _pwgGetMediaType(pwg, NULL, s)) != NULL)
ppd_mark_option(ppd, "MediaType", ppd_keyword);
}
}
+ if (pwg)
+ {
+ if (!cupsGetOption("com.apple.print.DocumentTicket.PMSpoolFormat",
+ num_options, options) &&
+ !cupsGetOption("APPrinterPreset", num_options, options) &&
+ (output_mode || print_quality))
+ {
+ /*
+ * Map output-mode and print-quality to a preset...
+ */
+
+ _pwg_output_mode_t pwg_om; /* output-mode index */
+ _pwg_print_quality_t pwg_pq; /* print-quality index */
+ cups_option_t *preset;/* Current preset option */
+
+ if (output_mode && !strcmp(output_mode, "monochrome"))
+ pwg_om = _PWG_OUTPUT_MODE_MONOCHROME;
+ else
+ pwg_om = _PWG_OUTPUT_MODE_COLOR;
+
+ if (print_quality)
+ {
+ pwg_pq = atoi(print_quality) - IPP_QUALITY_DRAFT;
+ if (pwg_pq < _PWG_PRINT_QUALITY_DRAFT)
+ pwg_pq = _PWG_PRINT_QUALITY_DRAFT;
+ else if (pwg_pq > _PWG_PRINT_QUALITY_HIGH)
+ pwg_pq = _PWG_PRINT_QUALITY_HIGH;
+ }
+ else
+ pwg_pq = _PWG_PRINT_QUALITY_NORMAL;
+
+ if (pwg->num_presets[pwg_om][pwg_pq] == 0)
+ {
+ /*
+ * Try to find a preset that works so that we maximize the chances of us
+ * getting a good print using IPP attributes.
+ */
+
+ if (pwg->num_presets[pwg_om][_PWG_PRINT_QUALITY_NORMAL] > 0)
+ pwg_pq = _PWG_PRINT_QUALITY_NORMAL;
+ else if (pwg->num_presets[_PWG_OUTPUT_MODE_COLOR][pwg_pq] > 0)
+ pwg_om = _PWG_OUTPUT_MODE_COLOR;
+ else
+ {
+ pwg_pq = _PWG_PRINT_QUALITY_NORMAL;
+ pwg_om = _PWG_OUTPUT_MODE_COLOR;
+ }
+ }
+
+ if (pwg->num_presets[pwg_om][pwg_pq] > 0)
+ {
+ /*
+ * Copy the preset options as long as the corresponding names are not
+ * already defined in the IPP request...
+ */
+
+ for (i = pwg->num_presets[pwg_om][pwg_pq],
+ preset = pwg->presets[pwg_om][pwg_pq];
+ i > 0;
+ i --, preset ++)
+ {
+ if (!cupsGetOption(preset->name, num_options, options))
+ ppd_mark_option(ppd, preset->name, preset->value);
+ }
+ }
+ }
+
+ if (output_bin && !cupsGetOption("OutputBin", num_options, options) &&
+ (ppd_keyword = _pwgGetOutputBin(pwg, output_bin)) != NULL)
+ {
+ /*
+ * Map output-bin to OutputBin...
+ */
+
+ ppd_mark_option(ppd, "OutputBin", ppd_keyword);
+ }
+
+ if (sides && pwg->sides_option &&
+ !cupsGetOption(pwg->sides_option, num_options, options))
+ {
+ /*
+ * Map sides to duplex option...
+ */
+
+ if (!strcmp(sides, "one-sided"))
+ ppd_mark_option(ppd, pwg->sides_option, pwg->sides_1sided);
+ else if (!strcmp(sides, "two-sided-long-edge"))
+ ppd_mark_option(ppd, pwg->sides_option, pwg->sides_2sided_long);
+ else if (!strcmp(sides, "two-sided-short-edge"))
+ ppd_mark_option(ppd, pwg->sides_option, pwg->sides_2sided_short);
+ }
+ }
+
/*
* Mark other options...
*/
@@ -162,6 +270,7 @@ cupsMarkOptions(
if (!strcasecmp(optptr->name, "media") ||
!strcasecmp(optptr->name, "output-bin") ||
!strcasecmp(optptr->name, "output-mode") ||
+ !strcasecmp(optptr->name, "print-quality") ||
!strcasecmp(optptr->name, "sides"))
continue;
else if (!strcasecmp(optptr->name, "resolution") ||
@@ -227,60 +336,6 @@ cupsMarkOptions(
ppd_mark_choices(ppd, attr->value);
}
}
- else if (!strcasecmp(optptr->name, "print-quality"))
- {
- ppd_option_t *output_mode = ppdFindOption(ppd, "OutputMode");
- /* OutputMode option */
-
- if (!strcmp(optptr->value, "3"))
- {
- /*
- * Draft quality...
- */
-
- if (ppdFindChoice(output_mode, "Draft"))
- ppd_mark_option(ppd, "OutputMode", "Draft");
- else if (ppdFindChoice(output_mode, "Fast"))
- ppd_mark_option(ppd, "OutputMode", "Fast");
-
- if ((attr = ppdFindAttr(ppd, "APPrinterPreset",
- "DraftGray_with_Paper_Auto-Detect")) != NULL)
- ppd_mark_choices(ppd, attr->value);
- }
- else if (!strcmp(optptr->value, "4"))
- {
- /*
- * Normal quality...
- */
-
- if (ppdFindChoice(output_mode, "Normal"))
- ppd_mark_option(ppd, "OutputMode", "Normal");
- else if (ppdFindChoice(output_mode, "Good"))
- ppd_mark_option(ppd, "OutputMode", "Good");
-
- if ((attr = ppdFindAttr(ppd, "APPrinterPreset",
- "Color_with_Paper_Auto-Detect")) != NULL)
- ppd_mark_choices(ppd, attr->value);
- else if ((attr = ppdFindAttr(ppd, "APPrinterPreset",
- "Gray_with_Paper_Auto-Detect")) != NULL)
- ppd_mark_choices(ppd, attr->value);
- }
- else if (!strcmp(optptr->value, "5"))
- {
- /*
- * High/best/photo quality...
- */
-
- if (ppdFindChoice(output_mode, "Best"))
- ppd_mark_option(ppd, "OutputMode", "Best");
- else if (ppdFindChoice(output_mode, "High"))
- ppd_mark_option(ppd, "OutputMode", "High");
-
- if ((attr = ppdFindAttr(ppd, "APPrinterPreset",
- "Photo_on_Photo_Paper")) != NULL)
- ppd_mark_choices(ppd, attr->value);
- }
- }
else if (!strcasecmp(optptr->name, "APPrinterPreset"))
{
/*
diff --git a/cups/ppd.c b/cups/ppd.c
index bfcb2ff1c..f1d236251 100644
--- a/cups/ppd.c
+++ b/cups/ppd.c
@@ -3,7 +3,7 @@
*
* PPD file routines for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -41,7 +41,6 @@
* ppd_compare_attrs() - Compare two attributes.
* ppd_compare_choices() - Compare two choices...
* ppd_compare_coptions() - Compare two custom options.
- * ppd_compare_cparams() - Compare two custom parameters.
* ppd_compare_options() - Compare two options.
* ppd_decode() - Decode a string value...
* ppd_free_group() - Free a single UI group.
@@ -109,7 +108,6 @@ static int ppd_compare_attrs(ppd_attr_t *a, ppd_attr_t *b);
static int ppd_compare_choices(ppd_choice_t *a, ppd_choice_t *b);
static int ppd_compare_coptions(ppd_coption_t *a,
ppd_coption_t *b);
-static int ppd_compare_cparams(ppd_cparam_t *a, ppd_cparam_t *b);
static int ppd_compare_options(ppd_option_t *a, ppd_option_t *b);
static int ppd_decode(char *string);
static void ppd_free_group(ppd_group_t *group);
@@ -359,7 +357,8 @@ ppdErrorString(ppd_status_t status) /* I - PPD status */
_("Illegal whitespace character"),
_("Bad custom parameter"),
_("Missing option keyword"),
- _("Bad value string")
+ _("Bad value string"),
+ _("Missing CloseGroup")
};
@@ -1206,7 +1205,7 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
}
}
- if (!name[0])
+ if (!name[0] && cg->ppd_conform == PPD_CONFORM_STRICT)
{
/*
* Found "*JobPatchFile: string"...
@@ -1936,6 +1935,16 @@ ppdOpen2(cups_file_t *fp) /* I - File to read from */
_cupsStrFree(string);
}
+ /*
+ * Check for a missing CloseGroup...
+ */
+
+ if (group && cg->ppd_conform == PPD_CONFORM_STRICT)
+ {
+ cg->ppd_status = PPD_MISSING_CLOSE_GROUP;
+ goto error;
+ }
+
ppd_free(line.buffer);
/*
@@ -2310,18 +2319,6 @@ ppd_compare_coptions(ppd_coption_t *a, /* I - First option */
/*
- * 'ppd_compare_cparams()' - Compare two custom parameters.
- */
-
-static int /* O - Result of comparison */
-ppd_compare_cparams(ppd_cparam_t *a, /* I - First parameter */
- ppd_cparam_t *b) /* I - Second parameter */
-{
- return (strcasecmp(a->name, b->name));
-}
-
-
-/*
* 'ppd_compare_options()' - Compare two options.
*/
@@ -2476,7 +2473,7 @@ ppd_get_coption(ppd_file_t *ppd, /* I - PPD file */
strlcpy(copt->keyword, name, sizeof(copt->keyword));
- copt->params = cupsArrayNew((cups_array_func_t)ppd_compare_cparams, NULL);
+ copt->params = cupsArrayNew((cups_array_func_t)NULL, NULL);
cupsArrayAdd(ppd->coptions, copt);
diff --git a/cups/ppd.h b/cups/ppd.h
index 42c08df33..1b00ae455 100644
--- a/cups/ppd.h
+++ b/cups/ppd.h
@@ -3,7 +3,7 @@
*
* PostScript Printer Description definitions for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -118,6 +118,7 @@ typedef enum ppd_status_e /**** Status Codes @since CUPS 1.1.19/Mac OS X 10.3@
PPD_BAD_CUSTOM_PARAM, /* Bad custom parameter */
PPD_MISSING_OPTION_KEYWORD, /* Missing option keyword */
PPD_BAD_VALUE, /* Bad value string */
+ PPD_MISSING_CLOSE_GROUP, /* Missing CloseGroup */
PPD_MAX_STATUS /* @private@ */
} ppd_status_t;
diff --git a/cups/pwg-ppd.c b/cups/pwg-ppd.c
index 1bfd26d9e..777ee07db 100644
--- a/cups/pwg-ppd.c
+++ b/cups/pwg-ppd.c
@@ -1015,55 +1015,59 @@ _pwgGetPageSize(_pwg_t *pwg, /* I - PWG mapping data */
closest = NULL;
dclosest = 999999999;
- for (i = pwg->num_sizes, size = pwg->sizes; i > 0; i --, size ++)
+ if (!ppd_name || strncasecmp(ppd_name, "Custom.", 7) ||
+ strncasecmp(ppd_name, "custom_", 7))
{
- /*
- * Adobe uses a size matching algorithm with an epsilon of 5 points, which
- * is just about 176/2540ths...
- */
-
- dwidth = size->width - jobsize.width;
- dlength = size->length - jobsize.length;
-
- if (dwidth <= -176 || dwidth >= 176 || dlength <= -176 || dlength >= 176)
- continue;
-
- if (margins_set)
+ for (i = pwg->num_sizes, size = pwg->sizes; i > 0; i --, size ++)
{
/*
- * Use a tighter epsilon of 1 point (35/2540ths) for margins...
+ * Adobe uses a size matching algorithm with an epsilon of 5 points, which
+ * is just about 176/2540ths...
*/
- dleft = size->left - jobsize.left;
- dright = size->right - jobsize.right;
- dtop = size->top - jobsize.top;
- dbottom = size->bottom - jobsize.bottom;
+ dwidth = size->width - jobsize.width;
+ dlength = size->length - jobsize.length;
+
+ if (dwidth <= -176 || dwidth >= 176 || dlength <= -176 || dlength >= 176)
+ continue;
- if (dleft <= -35 || dleft >= 35 || dright <= -35 || dright >= 35 ||
- dtop <= -35 || dtop >= 35 || dbottom <= -35 || dbottom >= 35)
+ if (margins_set)
{
- dleft = dleft < 0 ? -dleft : dleft;
- dright = dright < 0 ? -dright : dright;
- dbottom = dbottom < 0 ? -dbottom : dbottom;
- dtop = dtop < 0 ? -dtop : dtop;
- dmin = dleft + dright + dbottom + dtop;
+ /*
+ * Use a tighter epsilon of 1 point (35/2540ths) for margins...
+ */
- if (dmin < dclosest)
+ dleft = size->left - jobsize.left;
+ dright = size->right - jobsize.right;
+ dtop = size->top - jobsize.top;
+ dbottom = size->bottom - jobsize.bottom;
+
+ if (dleft <= -35 || dleft >= 35 || dright <= -35 || dright >= 35 ||
+ dtop <= -35 || dtop >= 35 || dbottom <= -35 || dbottom >= 35)
{
- dclosest = dmin;
- closest = size;
- }
+ dleft = dleft < 0 ? -dleft : dleft;
+ dright = dright < 0 ? -dright : dright;
+ dbottom = dbottom < 0 ? -dbottom : dbottom;
+ dtop = dtop < 0 ? -dtop : dtop;
+ dmin = dleft + dright + dbottom + dtop;
- continue;
+ if (dmin < dclosest)
+ {
+ dclosest = dmin;
+ closest = size;
+ }
+
+ continue;
+ }
}
- }
- if (exact)
- *exact = 1;
+ if (exact)
+ *exact = 1;
- DEBUG_printf(("1_pwgGetPageSize: Returning \"%s\"", size->map.ppd));
+ DEBUG_printf(("1_pwgGetPageSize: Returning \"%s\"", size->map.ppd));
- return (size->map.ppd);
+ return (size->map.ppd);
+ }
}
if (closest)
diff --git a/cups/request.c b/cups/request.c
index df2c0137c..31b316cb3 100644
--- a/cups/request.c
+++ b/cups/request.c
@@ -638,10 +638,23 @@ cupsSendRequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP
*/
httpClearFields(http);
- httpSetLength(http, length);
+ httpSetExpect(http, expect);
httpSetField(http, HTTP_FIELD_CONTENT_TYPE, "application/ipp");
+ httpSetLength(http, length);
+
+#ifdef HAVE_GSSAPI
+ if (http->authstring && !strncmp(http->authstring, "Negotiate", 9))
+ {
+ /*
+ * Do not use cached Kerberos credentials since they will look like a
+ * "replay" attack...
+ */
+
+ cupsDoAuthentication(http, "POST", resource);
+ }
+ else
+#endif /* HAVE_GSSAPI */
httpSetField(http, HTTP_FIELD_AUTHORIZATION, http->authstring);
- httpSetExpect(http, expect);
DEBUG_printf(("2cupsSendRequest: authstring=\"%s\"", http->authstring));
diff --git a/cups/testi18n.c b/cups/testi18n.c
index fa5491970..3188c78f9 100644
--- a/cups/testi18n.c
+++ b/cups/testi18n.c
@@ -3,7 +3,7 @@
*
* Internationalization test for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -423,6 +423,7 @@ main(int argc, /* I - Argument Count */
puts("PASS");
}
+#ifndef __linux
fputs("cupsCharsetToUTF8(CUPS_EUC_JP): ", stdout);
strcpy(legsrc, legdest);
@@ -444,6 +445,7 @@ main(int argc, /* I - Argument Count */
}
else
puts("PASS");
+#endif /* !__linux */
/*
* Test UTF-8 to/from legacy charset (Windows 950)...
diff --git a/doc/Makefile b/doc/Makefile
index 4978deff0..0e4688474 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,9 +1,9 @@
#
# "$Id: Makefile 7941 2008-09-16 00:46:13Z mike $"
#
-# Documentation makefile for the Common UNIX Printing System (CUPS).
+# Documentation makefile for CUPS.
#
-# Copyright 2007-2009 by Apple Inc.
+# Copyright 2007-2011 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products.
#
# These coded instructions, statements, and computer programs are the
@@ -40,6 +40,8 @@ HELPIMAGES = \
images/cups-postscript-chain.png \
images/cups-raster-chain.png \
images/raster.png \
+ images/raster-organization.png \
+ images/sample-image.png \
images/smiley.jpg
HELPFILES = \
help/accounting.html \
diff --git a/doc/cups.css b/doc/cups.css
index 4d76d6332..815c193c3 100644
--- a/doc/cups.css
+++ b/doc/cups.css
@@ -117,7 +117,9 @@ TD.unsel {
TD.sel A, TD.sel A:hover, TD.unsel A:link:hover, TD.unsel A:visited:hover,
TD.unsel A:active, TD.unsel A, TD.unsel A:visited {
color: #666666;
+ display: block;
font-weight: normal;
+ padding: 8px;
text-decoration: none;
}
diff --git a/doc/de/index.html.in b/doc/de/index.html.in
index 6ca957e32..a73d77179 100644
--- a/doc/de/index.html.in
+++ b/doc/de/index.html.in
@@ -101,7 +101,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<TR><TD>&nbsp;</TD></TR>
<TR><TD CLASS="trailer">CUPS und das CUPS Logo sind
eingetragene Warenzeichen der <A HREF="http://www.apple.com">Apple Inc.</A>
-CUPS ist urheberrechtlich gesch&uuml;tzt 2007-2010 von Apple Inc, alle Rechte vorbehalten.</TD></TR>
+CUPS ist urheberrechtlich gesch&uuml;tzt 2007-2011 von Apple Inc, alle Rechte vorbehalten.</TD></TR>
</TABLE>
</BODY>
</HTML>
diff --git a/doc/es/index.html.in b/doc/es/index.html.in
index da71c5442..5afb0d0c0 100644
--- a/doc/es/index.html.in
+++ b/doc/es/index.html.in
@@ -101,7 +101,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<TR><TD>&nbsp;</TD></TR>
<TR><TD CLASS="trailer">CUPS y el logo de CUPS son
marcas registradas de <A HREF="http://www.apple.com">Apple Inc.</A> Los derechos
-de copia de CUPS 2007-2010 son de Apple Inc. Todos los derechos reservados.</TD></TR>
+de copia de CUPS 2007-2011 son de Apple Inc. Todos los derechos reservados.</TD></TR>
</TABLE>
</BODY>
</HTML>
diff --git a/doc/eu/index.html.in b/doc/eu/index.html.in
index 0408c3884..42780f9af 100644
--- a/doc/eu/index.html.in
+++ b/doc/eu/index.html.in
@@ -100,7 +100,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
</TD></TR>
<TR><TD>&nbsp;</TD></TR>
<TR><TD CLASS="trailer">CUPS eta CUPSen logotipoa <A HREF="http://www.apple.com">Apple Inc.</A>en marka erregistratuaj dira.
-CUPSen copyright-a 2007-2010 Apple Inc. Eskubide guztiak gordeta.</TD></TR>
+CUPSen copyright-a 2007-2011 Apple Inc. Eskubide guztiak gordeta.</TD></TR>
</TABLE>
</BODY>
</HTML>
diff --git a/doc/help/api-array.html b/doc/help/api-array.html
index 2b47b3e13..6c57c13e4 100644
--- a/doc/help/api-array.html
+++ b/doc/help/api-array.html
@@ -2,9 +2,10 @@
<html>
<!-- SECTION: Programming -->
<head>
-<title>Array API</title>
-<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+ <title>Array API </title>
+ <meta name="keywords" content="Programming">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -375,34 +376,33 @@ div.contents ul.subcontents li {
</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
-<ul class="subcontents">
<li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
-<li><a href="#MANAGING_ARRAYS">Managing Arrays</a></li>
-<li><a href="#FINDING_AND_ENUMERATING">Finding and Enumerating Elements</a></li>
+ <li><a href="#MANAGING_ARRAYS">Managing Arrays</a></li>
+ <li><a href="#FINDING_AND_ENUMERATING">Finding and Enumerating Elements</a></li>
</ul></li>
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
-<li><a href="#cupsArrayAdd" title="Add an element to the array.">cupsArrayAdd</a></li>
-<li><a href="#cupsArrayClear" title="Clear the array.">cupsArrayClear</a></li>
-<li><a href="#cupsArrayCount" title="Get the number of elements in the array.">cupsArrayCount</a></li>
-<li><a href="#cupsArrayCurrent" title="Return the current element in the array.">cupsArrayCurrent</a></li>
-<li><a href="#cupsArrayDelete" title="Free all memory used by the array.">cupsArrayDelete</a></li>
-<li><a href="#cupsArrayDup" title="Duplicate the array.">cupsArrayDup</a></li>
-<li><a href="#cupsArrayFind" title="Find an element in the array.">cupsArrayFind</a></li>
-<li><a href="#cupsArrayFirst" title="Get the first element in the array.">cupsArrayFirst</a></li>
-<li><a href="#cupsArrayGetIndex" title="Get the index of the current element.">cupsArrayGetIndex</a></li>
-<li><a href="#cupsArrayGetInsert" title="Get the index of the last inserted element.">cupsArrayGetInsert</a></li>
-<li><a href="#cupsArrayIndex" title="Get the N-th element in the array.">cupsArrayIndex</a></li>
-<li><a href="#cupsArrayInsert" title="Insert an element in the array.">cupsArrayInsert</a></li>
-<li><a href="#cupsArrayLast" title="Get the last element in the array.">cupsArrayLast</a></li>
-<li><a href="#cupsArrayNew" title="Create a new array.">cupsArrayNew</a></li>
-<li><a href="#cupsArrayNew2" title="Create a new array with hash.">cupsArrayNew2</a></li>
-<li><a href="#cupsArrayNew3" title="Create a new array with hash and/or free function.">cupsArrayNew3</a></li>
-<li><a href="#cupsArrayNext" title="Get the next element in the array.">cupsArrayNext</a></li>
-<li><a href="#cupsArrayPrev" title="Get the previous element in the array.">cupsArrayPrev</a></li>
-<li><a href="#cupsArrayRemove" title="Remove an element from the array.">cupsArrayRemove</a></li>
-<li><a href="#cupsArrayRestore" title="Reset the current element to the last cupsArraySave.">cupsArrayRestore</a></li>
-<li><a href="#cupsArraySave" title="Mark the current element for a later cupsArrayRestore.">cupsArraySave</a></li>
-<li><a href="#cupsArrayUserData" title="Return the user data for an array.">cupsArrayUserData</a></li>
+ <li><a href="#cupsArrayAdd" title="Add an element to the array.">cupsArrayAdd</a></li>
+ <li><a href="#cupsArrayClear" title="Clear the array.">cupsArrayClear</a></li>
+ <li><a href="#cupsArrayCount" title="Get the number of elements in the array.">cupsArrayCount</a></li>
+ <li><a href="#cupsArrayCurrent" title="Return the current element in the array.">cupsArrayCurrent</a></li>
+ <li><a href="#cupsArrayDelete" title="Free all memory used by the array.">cupsArrayDelete</a></li>
+ <li><a href="#cupsArrayDup" title="Duplicate the array.">cupsArrayDup</a></li>
+ <li><a href="#cupsArrayFind" title="Find an element in the array.">cupsArrayFind</a></li>
+ <li><a href="#cupsArrayFirst" title="Get the first element in the array.">cupsArrayFirst</a></li>
+ <li><a href="#cupsArrayGetIndex" title="Get the index of the current element.">cupsArrayGetIndex</a></li>
+ <li><a href="#cupsArrayGetInsert" title="Get the index of the last inserted element.">cupsArrayGetInsert</a></li>
+ <li><a href="#cupsArrayIndex" title="Get the N-th element in the array.">cupsArrayIndex</a></li>
+ <li><a href="#cupsArrayInsert" title="Insert an element in the array.">cupsArrayInsert</a></li>
+ <li><a href="#cupsArrayLast" title="Get the last element in the array.">cupsArrayLast</a></li>
+ <li><a href="#cupsArrayNew" title="Create a new array.">cupsArrayNew</a></li>
+ <li><a href="#cupsArrayNew2" title="Create a new array with hash.">cupsArrayNew2</a></li>
+ <li><a href="#cupsArrayNew3" title="Create a new array with hash and/or free function.">cupsArrayNew3</a></li>
+ <li><a href="#cupsArrayNext" title="Get the next element in the array.">cupsArrayNext</a></li>
+ <li><a href="#cupsArrayPrev" title="Get the previous element in the array.">cupsArrayPrev</a></li>
+ <li><a href="#cupsArrayRemove" title="Remove an element from the array.">cupsArrayRemove</a></li>
+ <li><a href="#cupsArrayRestore" title="Reset the current element to the last cupsArraySave.">cupsArrayRestore</a></li>
+ <li><a href="#cupsArraySave" title="Mark the current element for a later cupsArrayRestore.">cupsArraySave</a></li>
+ <li><a href="#cupsArrayUserData" title="Return the user data for an array.">cupsArrayUserData</a></li>
</ul></li>
<li><a href="#TYPES">Data Types</a><ul class="code">
<li><a href="#cups_acopy_func_t" title="Array element copy function">cups_acopy_func_t</a></li>
@@ -411,6 +411,7 @@ div.contents ul.subcontents li {
<li><a href="#cups_array_func_t" title="Array comparison function">cups_array_func_t</a></li>
<li><a href="#cups_array_t" title="CUPS array type">cups_array_t</a></li>
</ul></li>
+</ul>
<!--
"$Id$"
diff --git a/doc/help/api-cgi.html b/doc/help/api-cgi.html
index a1b75197f..9d83b0023 100644
--- a/doc/help/api-cgi.html
+++ b/doc/help/api-cgi.html
@@ -2,9 +2,10 @@
<html>
<!-- SECTION: Programming -->
<head>
-<title>CGI API</title>
-<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+ <title>CGI API </title>
+ <meta name="keywords" content="Programming">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -375,53 +376,52 @@ div.contents ul.subcontents li {
</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
-<ul class="subcontents">
<li><a href="#OVERVIEW">Overview</a></li>
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
-<li><a href="#cgiCheckVariables" title="Check for the presence of &quot;required&quot; variables.">cgiCheckVariables</a></li>
-<li><a href="#cgiClearVariables" title="Clear all form variables.">cgiClearVariables</a></li>
-<li><a href="#cgiCompileSearch" title="Compile a search string.">cgiCompileSearch</a></li>
-<li><a href="#cgiCopyTemplateFile" title="Copy a template file and replace all the
+ <li><a href="#cgiCheckVariables" title="Check for the presence of &quot;required&quot; variables.">cgiCheckVariables</a></li>
+ <li><a href="#cgiClearVariables" title="Clear all form variables.">cgiClearVariables</a></li>
+ <li><a href="#cgiCompileSearch" title="Compile a search string.">cgiCompileSearch</a></li>
+ <li><a href="#cgiCopyTemplateFile" title="Copy a template file and replace all the
'{variable}' strings with the variable value.">cgiCopyTemplateFile</a></li>
-<li><a href="#cgiCopyTemplateLang" title="Copy a template file using a language...">cgiCopyTemplateLang</a></li>
-<li><a href="#cgiDoSearch" title="Do a search of some text.">cgiDoSearch</a></li>
-<li><a href="#cgiEndHTML" title="End a HTML page.">cgiEndHTML</a></li>
-<li><a href="#cgiEndMultipart" title="End the delivery of a multipart web page.">cgiEndMultipart</a></li>
-<li><a href="#cgiFormEncode" title="Encode a string as a form variable.">cgiFormEncode</a></li>
-<li><a href="#cgiFreeSearch" title="Free a compiled search context.">cgiFreeSearch</a></li>
-<li><a href="#cgiGetArray" title="Get an element from a form array.">cgiGetArray</a></li>
-<li><a href="#cgiGetAttributes" title="Get the list of attributes that are needed
+ <li><a href="#cgiCopyTemplateLang" title="Copy a template file using a language...">cgiCopyTemplateLang</a></li>
+ <li><a href="#cgiDoSearch" title="Do a search of some text.">cgiDoSearch</a></li>
+ <li><a href="#cgiEndHTML" title="End a HTML page.">cgiEndHTML</a></li>
+ <li><a href="#cgiEndMultipart" title="End the delivery of a multipart web page.">cgiEndMultipart</a></li>
+ <li><a href="#cgiFormEncode" title="Encode a string as a form variable.">cgiFormEncode</a></li>
+ <li><a href="#cgiFreeSearch" title="Free a compiled search context.">cgiFreeSearch</a></li>
+ <li><a href="#cgiGetArray" title="Get an element from a form array.">cgiGetArray</a></li>
+ <li><a href="#cgiGetAttributes" title="Get the list of attributes that are needed
by the template file.">cgiGetAttributes</a></li>
-<li><a href="#cgiGetCookie" title="Get a cookie value.">cgiGetCookie</a></li>
-<li><a href="#cgiGetFile" title="Get the file (if any) that was submitted in the form.">cgiGetFile</a></li>
-<li><a href="#cgiGetIPPObjects" title="Get the objects in an IPP response.">cgiGetIPPObjects</a></li>
-<li><a href="#cgiGetSize" title="Get the size of a form array value.">cgiGetSize</a></li>
-<li><a href="#cgiGetTemplateDir" title="Get the templates directory...">cgiGetTemplateDir</a></li>
-<li><a href="#cgiGetVariable" title="Get a CGI variable from the database.">cgiGetVariable</a></li>
-<li><a href="#cgiInitialize" title="Initialize the CGI variable &quot;database&quot;.">cgiInitialize</a></li>
-<li><a href="#cgiIsPOST" title="Determine whether this page was POSTed.">cgiIsPOST</a></li>
-<li><a href="#cgiMoveJobs" title="Move one or more jobs.">cgiMoveJobs</a></li>
-<li><a href="#cgiPrintCommand" title="Print a CUPS command job.">cgiPrintCommand</a></li>
-<li><a href="#cgiPrintTestPage" title="Print a test page.">cgiPrintTestPage</a></li>
-<li><a href="#cgiRewriteURL" title="Rewrite a printer URI into a web browser URL...">cgiRewriteURL</a></li>
-<li><a href="#cgiSetArray" title="Set array element N to the specified string.">cgiSetArray</a></li>
-<li><a href="#cgiSetCookie" title="Set a cookie value.">cgiSetCookie</a></li>
-<li><a href="#cgiSetIPPObjectVars" title="Set CGI variables from an IPP object.">cgiSetIPPObjectVars</a></li>
-<li><a href="#cgiSetIPPVars" title="Set CGI variables from an IPP response.">cgiSetIPPVars</a></li>
-<li><a href="#cgiSetServerVersion" title="Set the server name and CUPS version...">cgiSetServerVersion</a></li>
-<li><a href="#cgiSetSize" title="Set the array size.">cgiSetSize</a></li>
-<li><a href="#cgiSetVariable" title="Set a CGI variable in the database.">cgiSetVariable</a></li>
-<li><a href="#cgiShowIPPError" title="Show the last IPP error message.">cgiShowIPPError</a></li>
-<li><a href="#cgiShowJobs" title="Show print jobs.">cgiShowJobs</a></li>
-<li><a href="#cgiStartHTML" title="Start a HTML page.">cgiStartHTML</a></li>
-<li><a href="#cgiStartMultipart" title="Start a multipart delivery of a web page.">cgiStartMultipart</a></li>
-<li><a href="#cgiSupportsMultipart" title="Does the browser support multi-part documents?">cgiSupportsMultipart</a></li>
-<li><a href="#cgiText" title="Return localized text.">cgiText</a></li>
-<li><a href="#helpDeleteIndex" title="Delete an index, freeing all memory used.">helpDeleteIndex</a></li>
-<li><a href="#helpFindNode" title="Find a node in an index.">helpFindNode</a></li>
-<li><a href="#helpLoadIndex" title="Load a help index from disk.">helpLoadIndex</a></li>
-<li><a href="#helpSaveIndex" title="Save a help index to disk.">helpSaveIndex</a></li>
-<li><a href="#helpSearchIndex" title="Search an index.">helpSearchIndex</a></li>
+ <li><a href="#cgiGetCookie" title="Get a cookie value.">cgiGetCookie</a></li>
+ <li><a href="#cgiGetFile" title="Get the file (if any) that was submitted in the form.">cgiGetFile</a></li>
+ <li><a href="#cgiGetIPPObjects" title="Get the objects in an IPP response.">cgiGetIPPObjects</a></li>
+ <li><a href="#cgiGetSize" title="Get the size of a form array value.">cgiGetSize</a></li>
+ <li><a href="#cgiGetTemplateDir" title="Get the templates directory...">cgiGetTemplateDir</a></li>
+ <li><a href="#cgiGetVariable" title="Get a CGI variable from the database.">cgiGetVariable</a></li>
+ <li><a href="#cgiInitialize" title="Initialize the CGI variable &quot;database&quot;.">cgiInitialize</a></li>
+ <li><a href="#cgiIsPOST" title="Determine whether this page was POSTed.">cgiIsPOST</a></li>
+ <li><a href="#cgiMoveJobs" title="Move one or more jobs.">cgiMoveJobs</a></li>
+ <li><a href="#cgiPrintCommand" title="Print a CUPS command job.">cgiPrintCommand</a></li>
+ <li><a href="#cgiPrintTestPage" title="Print a test page.">cgiPrintTestPage</a></li>
+ <li><a href="#cgiRewriteURL" title="Rewrite a printer URI into a web browser URL...">cgiRewriteURL</a></li>
+ <li><a href="#cgiSetArray" title="Set array element N to the specified string.">cgiSetArray</a></li>
+ <li><a href="#cgiSetCookie" title="Set a cookie value.">cgiSetCookie</a></li>
+ <li><a href="#cgiSetIPPObjectVars" title="Set CGI variables from an IPP object.">cgiSetIPPObjectVars</a></li>
+ <li><a href="#cgiSetIPPVars" title="Set CGI variables from an IPP response.">cgiSetIPPVars</a></li>
+ <li><a href="#cgiSetServerVersion" title="Set the server name and CUPS version...">cgiSetServerVersion</a></li>
+ <li><a href="#cgiSetSize" title="Set the array size.">cgiSetSize</a></li>
+ <li><a href="#cgiSetVariable" title="Set a CGI variable in the database.">cgiSetVariable</a></li>
+ <li><a href="#cgiShowIPPError" title="Show the last IPP error message.">cgiShowIPPError</a></li>
+ <li><a href="#cgiShowJobs" title="Show print jobs.">cgiShowJobs</a></li>
+ <li><a href="#cgiStartHTML" title="Start a HTML page.">cgiStartHTML</a></li>
+ <li><a href="#cgiStartMultipart" title="Start a multipart delivery of a web page.">cgiStartMultipart</a></li>
+ <li><a href="#cgiSupportsMultipart" title="Does the browser support multi-part documents?">cgiSupportsMultipart</a></li>
+ <li><a href="#cgiText" title="Return localized text.">cgiText</a></li>
+ <li><a href="#helpDeleteIndex" title="Delete an index, freeing all memory used.">helpDeleteIndex</a></li>
+ <li><a href="#helpFindNode" title="Find a node in an index.">helpFindNode</a></li>
+ <li><a href="#helpLoadIndex" title="Load a help index from disk.">helpLoadIndex</a></li>
+ <li><a href="#helpSaveIndex" title="Save a help index to disk.">helpSaveIndex</a></li>
+ <li><a href="#helpSearchIndex" title="Search an index.">helpSearchIndex</a></li>
</ul></li>
<li><a href="#TYPES">Data Types</a><ul class="code">
<li><a href="#cgi_file_t" title="Uploaded file data">cgi_file_t</a></li>
@@ -435,6 +435,7 @@ by the template file.">cgiGetAttributes</a></li>
<li><a href="#help_node_s" title="Help node structure...">help_node_s</a></li>
<li><a href="#help_word_s" title="Help word structure...">help_word_s</a></li>
</ul></li>
+</ul>
<!--
"$Id$"
diff --git a/doc/help/api-cups.html b/doc/help/api-cups.html
index 796248bba..d4cf5a777 100644
--- a/doc/help/api-cups.html
+++ b/doc/help/api-cups.html
@@ -2,9 +2,10 @@
<html>
<!-- SECTION: Programming -->
<head>
-<title>CUPS API</title>
-<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+ <title>CUPS API </title>
+ <meta name="keywords" content="Programming">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -381,85 +382,84 @@ div.contents ul.subcontents li {
</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
-<ul class="subcontents">
<li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
-<li><a href="#CLIENTS_AND_SERVERS">Clients and Servers</a></li>
-<li><a href="#PRINTERS_AND_CLASSES">Printers and Classes</a></li>
-<li><a href="#OPTIONS">Options</a></li>
-<li><a href="#PRINT_JOBS">Print Jobs</a></li>
-<li><a href="#ERROR_HANDLING">Error Handling</a></li>
-<li><a href="#PASSWORDS_AND_AUTHENTICATION">Passwords and Authentication</a></li>
+ <li><a href="#CLIENTS_AND_SERVERS">Clients and Servers</a></li>
+ <li><a href="#PRINTERS_AND_CLASSES">Printers and Classes</a></li>
+ <li><a href="#OPTIONS">Options</a></li>
+ <li><a href="#PRINT_JOBS">Print Jobs</a></li>
+ <li><a href="#ERROR_HANDLING">Error Handling</a></li>
+ <li><a href="#PASSWORDS_AND_AUTHENTICATION">Passwords and Authentication</a></li>
</ul></li>
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
-<li><a href="#cupsAddDest" title="Add a destination to the list of destinations.">cupsAddDest</a></li>
-<li><a href="#cupsAddOption" title="Add an option to an option array.">cupsAddOption</a></li>
-<li><a href="#cupsAdminCreateWindowsPPD" title="Create the Windows PPD file for a printer.">cupsAdminCreateWindowsPPD</a></li>
-<li><a href="#cupsAdminExportSamba" title="Export a printer to Samba.">cupsAdminExportSamba</a></li>
-<li><a href="#cupsAdminGetServerSettings" title="Get settings from the server.">cupsAdminGetServerSettings</a></li>
-<li><a href="#cupsAdminSetServerSettings" title="Set settings on the server.">cupsAdminSetServerSettings</a></li>
-<li><a href="#cupsCancelJob" title="Cancel a print job on the default server.">cupsCancelJob</a></li>
-<li><a href="#cupsCancelJob2" title="Cancel or purge a print job.">cupsCancelJob2</a></li>
-<li><a href="#cupsCreateJob" title="Create an empty job for streaming.">cupsCreateJob</a></li>
-<li><a href="#cupsEncryption" title="Get the current encryption settings.">cupsEncryption</a></li>
-<li><a href="#cupsFinishDocument" title="Finish sending a document.">cupsFinishDocument</a></li>
-<li><a href="#cupsFreeDests" title="Free the memory used by the list of destinations.">cupsFreeDests</a></li>
-<li><a href="#cupsFreeJobs" title="Free memory used by job data.">cupsFreeJobs</a></li>
-<li><a href="#cupsFreeOptions" title="Free all memory used by options.">cupsFreeOptions</a></li>
-<li><a href="#cupsGetClasses" title="Get a list of printer classes from the default server.">cupsGetClasses</a></li>
-<li><a href="#cupsGetDefault" title="Get the default printer or class for the default server.">cupsGetDefault</a></li>
-<li><a href="#cupsGetDefault2" title="Get the default printer or class for the specified server.">cupsGetDefault2</a></li>
-<li><a href="#cupsGetDest" title="Get the named destination from the list.">cupsGetDest</a></li>
-<li><a href="#cupsGetDests" title="Get the list of destinations from the default server.">cupsGetDests</a></li>
-<li><a href="#cupsGetDests2" title="Get the list of destinations from the specified server.">cupsGetDests2</a></li>
-<li><a href="#cupsGetJobs" title="Get the jobs from the default server.">cupsGetJobs</a></li>
-<li><a href="#cupsGetJobs2" title="Get the jobs from the specified server.">cupsGetJobs2</a></li>
-<li><a href="#cupsGetNamedDest" title="Get options for the named destination.">cupsGetNamedDest</a></li>
-<li><a href="#cupsGetOption" title="Get an option value.">cupsGetOption</a></li>
-<li><a href="#cupsGetPPD" title="Get the PPD file for a printer on the default server.">cupsGetPPD</a></li>
-<li><a href="#cupsGetPPD2" title="Get the PPD file for a printer from the specified server.">cupsGetPPD2</a></li>
-<li><a href="#cupsGetPPD3" title="Get the PPD file for a printer on the specified
+ <li><a href="#cupsAddDest" title="Add a destination to the list of destinations.">cupsAddDest</a></li>
+ <li><a href="#cupsAddOption" title="Add an option to an option array.">cupsAddOption</a></li>
+ <li><a href="#cupsAdminCreateWindowsPPD" title="Create the Windows PPD file for a printer.">cupsAdminCreateWindowsPPD</a></li>
+ <li><a href="#cupsAdminExportSamba" title="Export a printer to Samba.">cupsAdminExportSamba</a></li>
+ <li><a href="#cupsAdminGetServerSettings" title="Get settings from the server.">cupsAdminGetServerSettings</a></li>
+ <li><a href="#cupsAdminSetServerSettings" title="Set settings on the server.">cupsAdminSetServerSettings</a></li>
+ <li><a href="#cupsCancelJob" title="Cancel a print job on the default server.">cupsCancelJob</a></li>
+ <li><a href="#cupsCancelJob2" title="Cancel or purge a print job.">cupsCancelJob2</a></li>
+ <li><a href="#cupsCreateJob" title="Create an empty job for streaming.">cupsCreateJob</a></li>
+ <li><a href="#cupsEncryption" title="Get the current encryption settings.">cupsEncryption</a></li>
+ <li><a href="#cupsFinishDocument" title="Finish sending a document.">cupsFinishDocument</a></li>
+ <li><a href="#cupsFreeDests" title="Free the memory used by the list of destinations.">cupsFreeDests</a></li>
+ <li><a href="#cupsFreeJobs" title="Free memory used by job data.">cupsFreeJobs</a></li>
+ <li><a href="#cupsFreeOptions" title="Free all memory used by options.">cupsFreeOptions</a></li>
+ <li><a href="#cupsGetClasses" title="Get a list of printer classes from the default server.">cupsGetClasses</a></li>
+ <li><a href="#cupsGetDefault" title="Get the default printer or class for the default server.">cupsGetDefault</a></li>
+ <li><a href="#cupsGetDefault2" title="Get the default printer or class for the specified server.">cupsGetDefault2</a></li>
+ <li><a href="#cupsGetDest" title="Get the named destination from the list.">cupsGetDest</a></li>
+ <li><a href="#cupsGetDests" title="Get the list of destinations from the default server.">cupsGetDests</a></li>
+ <li><a href="#cupsGetDests2" title="Get the list of destinations from the specified server.">cupsGetDests2</a></li>
+ <li><a href="#cupsGetJobs" title="Get the jobs from the default server.">cupsGetJobs</a></li>
+ <li><a href="#cupsGetJobs2" title="Get the jobs from the specified server.">cupsGetJobs2</a></li>
+ <li><a href="#cupsGetNamedDest" title="Get options for the named destination.">cupsGetNamedDest</a></li>
+ <li><a href="#cupsGetOption" title="Get an option value.">cupsGetOption</a></li>
+ <li><a href="#cupsGetPPD" title="Get the PPD file for a printer on the default server.">cupsGetPPD</a></li>
+ <li><a href="#cupsGetPPD2" title="Get the PPD file for a printer from the specified server.">cupsGetPPD2</a></li>
+ <li><a href="#cupsGetPPD3" title="Get the PPD file for a printer on the specified
server if it has changed.">cupsGetPPD3</a></li>
-<li><a href="#cupsGetPassword" title="Get a password from the user.">cupsGetPassword</a></li>
-<li><a href="#cupsGetPassword2" title="Get a password from the user using the advanced
+ <li><a href="#cupsGetPassword" title="Get a password from the user.">cupsGetPassword</a></li>
+ <li><a href="#cupsGetPassword2" title="Get a password from the user using the advanced
password callback.">cupsGetPassword2</a></li>
-<li><a href="#cupsGetPrinters" title="Get a list of printers from the default server.">cupsGetPrinters</a></li>
-<li><a href="#cupsGetServerPPD" title="Get an available PPD file from the server.">cupsGetServerPPD</a></li>
-<li><a href="#cupsLangDefault" title="Return the default language.">cupsLangDefault</a></li>
-<li><a href="#cupsLangEncoding" title="Return the character encoding (us-ascii, etc.)
+ <li><a href="#cupsGetPrinters" title="Get a list of printers from the default server.">cupsGetPrinters</a></li>
+ <li><a href="#cupsGetServerPPD" title="Get an available PPD file from the server.">cupsGetServerPPD</a></li>
+ <li><a href="#cupsLangDefault" title="Return the default language.">cupsLangDefault</a></li>
+ <li><a href="#cupsLangEncoding" title="Return the character encoding (us-ascii, etc.)
for the given language.">cupsLangEncoding</a></li>
-<li><a href="#cupsLangFlush" title="Flush all language data out of the cache.">cupsLangFlush</a></li>
-<li><a href="#cupsLangFree" title="Free language data.">cupsLangFree</a></li>
-<li><a href="#cupsLangGet" title="Get a language.">cupsLangGet</a></li>
-<li><a href="#cupsNotifySubject" title="Return the subject for the given notification message.">cupsNotifySubject</a></li>
-<li><a href="#cupsNotifyText" title="Return the text for the given notification message.">cupsNotifyText</a></li>
-<li><a href="#cupsParseOptions" title="Parse options from a command-line argument.">cupsParseOptions</a></li>
-<li><a href="#cupsPrintFile" title="Print a file to a printer or class on the default server.">cupsPrintFile</a></li>
-<li><a href="#cupsPrintFile2" title="Print a file to a printer or class on the specified
+ <li><a href="#cupsLangFlush" title="Flush all language data out of the cache.">cupsLangFlush</a></li>
+ <li><a href="#cupsLangFree" title="Free language data.">cupsLangFree</a></li>
+ <li><a href="#cupsLangGet" title="Get a language.">cupsLangGet</a></li>
+ <li><a href="#cupsNotifySubject" title="Return the subject for the given notification message.">cupsNotifySubject</a></li>
+ <li><a href="#cupsNotifyText" title="Return the text for the given notification message.">cupsNotifyText</a></li>
+ <li><a href="#cupsParseOptions" title="Parse options from a command-line argument.">cupsParseOptions</a></li>
+ <li><a href="#cupsPrintFile" title="Print a file to a printer or class on the default server.">cupsPrintFile</a></li>
+ <li><a href="#cupsPrintFile2" title="Print a file to a printer or class on the specified
server.">cupsPrintFile2</a></li>
-<li><a href="#cupsPrintFiles" title="Print one or more files to a printer or class on the
+ <li><a href="#cupsPrintFiles" title="Print one or more files to a printer or class on the
default server.">cupsPrintFiles</a></li>
-<li><a href="#cupsPrintFiles2" title="Print one or more files to a printer or class on the
+ <li><a href="#cupsPrintFiles2" title="Print one or more files to a printer or class on the
specified server.">cupsPrintFiles2</a></li>
-<li><a href="#cupsRemoveDest" title="Remove a destination from the destination list.">cupsRemoveDest</a></li>
-<li><a href="#cupsRemoveOption" title="Remove an option from an option array.">cupsRemoveOption</a></li>
-<li><a href="#cupsServer" title="Return the hostname/address of the current server.">cupsServer</a></li>
-<li><a href="#cupsSetClientCertCB" title="Set the client certificate callback.">cupsSetClientCertCB</a></li>
-<li><a href="#cupsSetCredentials" title="Set the default credentials to be used for SSL/TLS
+ <li><a href="#cupsRemoveDest" title="Remove a destination from the destination list.">cupsRemoveDest</a></li>
+ <li><a href="#cupsRemoveOption" title="Remove an option from an option array.">cupsRemoveOption</a></li>
+ <li><a href="#cupsServer" title="Return the hostname/address of the current server.">cupsServer</a></li>
+ <li><a href="#cupsSetClientCertCB" title="Set the client certificate callback.">cupsSetClientCertCB</a></li>
+ <li><a href="#cupsSetCredentials" title="Set the default credentials to be used for SSL/TLS
connections.">cupsSetCredentials</a></li>
-<li><a href="#cupsSetDefaultDest" title="Set the default destination.">cupsSetDefaultDest</a></li>
-<li><a href="#cupsSetDests" title="Save the list of destinations for the default server.">cupsSetDests</a></li>
-<li><a href="#cupsSetDests2" title="Save the list of destinations for the specified server.">cupsSetDests2</a></li>
-<li><a href="#cupsSetEncryption" title="Set the encryption preference.">cupsSetEncryption</a></li>
-<li><a href="#cupsSetPasswordCB" title="Set the password callback for CUPS.">cupsSetPasswordCB</a></li>
-<li><a href="#cupsSetPasswordCB2" title="Set the advanced password callback for CUPS.">cupsSetPasswordCB2</a></li>
-<li><a href="#cupsSetServer" title="Set the default server name and port.">cupsSetServer</a></li>
-<li><a href="#cupsSetServerCertCB" title="Set the server certificate callback.">cupsSetServerCertCB</a></li>
-<li><a href="#cupsSetUser" title="Set the default user name.">cupsSetUser</a></li>
-<li><a href="#cupsStartDocument" title="Add a document to a job created with cupsCreateJob().">cupsStartDocument</a></li>
-<li><a href="#cupsTempFd" title="Creates a temporary file.">cupsTempFd</a></li>
-<li><a href="#cupsTempFile" title="Generates a temporary filename.">cupsTempFile</a></li>
-<li><a href="#cupsTempFile2" title="Creates a temporary CUPS file.">cupsTempFile2</a></li>
-<li><a href="#cupsUser" title="Return the current user's name.">cupsUser</a></li>
+ <li><a href="#cupsSetDefaultDest" title="Set the default destination.">cupsSetDefaultDest</a></li>
+ <li><a href="#cupsSetDests" title="Save the list of destinations for the default server.">cupsSetDests</a></li>
+ <li><a href="#cupsSetDests2" title="Save the list of destinations for the specified server.">cupsSetDests2</a></li>
+ <li><a href="#cupsSetEncryption" title="Set the encryption preference.">cupsSetEncryption</a></li>
+ <li><a href="#cupsSetPasswordCB" title="Set the password callback for CUPS.">cupsSetPasswordCB</a></li>
+ <li><a href="#cupsSetPasswordCB2" title="Set the advanced password callback for CUPS.">cupsSetPasswordCB2</a></li>
+ <li><a href="#cupsSetServer" title="Set the default server name and port.">cupsSetServer</a></li>
+ <li><a href="#cupsSetServerCertCB" title="Set the server certificate callback.">cupsSetServerCertCB</a></li>
+ <li><a href="#cupsSetUser" title="Set the default user name.">cupsSetUser</a></li>
+ <li><a href="#cupsStartDocument" title="Add a document to a job created with cupsCreateJob().">cupsStartDocument</a></li>
+ <li><a href="#cupsTempFd" title="Creates a temporary file.">cupsTempFd</a></li>
+ <li><a href="#cupsTempFile" title="Generates a temporary filename.">cupsTempFile</a></li>
+ <li><a href="#cupsTempFile2" title="Creates a temporary CUPS file.">cupsTempFile2</a></li>
+ <li><a href="#cupsUser" title="Return the current user's name.">cupsUser</a></li>
</ul></li>
<li><a href="#TYPES">Data Types</a><ul class="code">
<li><a href="#cups_client_cert_cb_t" title="Client credentials callback ">cups_client_cert_cb_t</a></li>
@@ -480,6 +480,7 @@ connections.">cupsSetCredentials</a></li>
<li><a href="#ENUMERATIONS">Constants</a><ul class="code">
<li><a href="#cups_ptype_e" title="Printer type/capability bit constants">cups_ptype_e</a></li>
</ul></li>
+</ul>
<!--
"$Id$"
diff --git a/doc/help/api-driver.html b/doc/help/api-driver.html
index 2f456ea0c..d0e4a55ed 100644
--- a/doc/help/api-driver.html
+++ b/doc/help/api-driver.html
@@ -2,9 +2,10 @@
<html>
<!-- SECTION: Programming -->
<head>
-<title>Printer Driver API</title>
-<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+ <title>Printer Driver API </title>
+ <meta name="keywords" content="Programming">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -375,40 +376,39 @@ div.contents ul.subcontents li {
</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
-<ul class="subcontents">
<li><a href="#OVERVIEW">Overview</a></li>
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
-<li><a href="#cupsCMYKDelete" title="Delete a color separation.">cupsCMYKDelete</a></li>
-<li><a href="#cupsCMYKDoBlack" title="Do a black separation...">cupsCMYKDoBlack</a></li>
-<li><a href="#cupsCMYKDoCMYK" title="Do a CMYK separation...">cupsCMYKDoCMYK</a></li>
-<li><a href="#cupsCMYKDoGray" title="Do a grayscale separation...">cupsCMYKDoGray</a></li>
-<li><a href="#cupsCMYKDoRGB" title="Do an sRGB separation...">cupsCMYKDoRGB</a></li>
-<li><a href="#cupsCMYKLoad" title="Load a CMYK color profile from PPD attributes.">cupsCMYKLoad</a></li>
-<li><a href="#cupsCMYKNew" title="Create a new CMYK color separation.">cupsCMYKNew</a></li>
-<li><a href="#cupsCMYKSetBlack" title="Set the transition range for CMY to black.">cupsCMYKSetBlack</a></li>
-<li><a href="#cupsCMYKSetCurve" title="Set a color transform curve using points.">cupsCMYKSetCurve</a></li>
-<li><a href="#cupsCMYKSetGamma" title="Set a color transform curve using gamma and density.">cupsCMYKSetGamma</a></li>
-<li><a href="#cupsCMYKSetInkLimit" title="Set the limit on the amount of ink.">cupsCMYKSetInkLimit</a></li>
-<li><a href="#cupsCMYKSetLtDk" title="Set light/dark ink transforms.">cupsCMYKSetLtDk</a></li>
-<li><a href="#cupsCheckBytes" title="Check to see if all bytes are zero.">cupsCheckBytes</a></li>
-<li><a href="#cupsCheckValue" title="Check to see if all bytes match the given value.">cupsCheckValue</a></li>
-<li><a href="#cupsDitherDelete" title="Free a dithering buffer.">cupsDitherDelete</a></li>
-<li><a href="#cupsDitherLine" title="Dither a line of pixels...">cupsDitherLine</a></li>
-<li><a href="#cupsDitherNew" title="Create an error-diffusion dithering buffer.">cupsDitherNew</a></li>
-<li><a href="#cupsFindAttr" title="Find a PPD attribute based on the colormodel,
+ <li><a href="#cupsCMYKDelete" title="Delete a color separation.">cupsCMYKDelete</a></li>
+ <li><a href="#cupsCMYKDoBlack" title="Do a black separation...">cupsCMYKDoBlack</a></li>
+ <li><a href="#cupsCMYKDoCMYK" title="Do a CMYK separation...">cupsCMYKDoCMYK</a></li>
+ <li><a href="#cupsCMYKDoGray" title="Do a grayscale separation...">cupsCMYKDoGray</a></li>
+ <li><a href="#cupsCMYKDoRGB" title="Do an sRGB separation...">cupsCMYKDoRGB</a></li>
+ <li><a href="#cupsCMYKLoad" title="Load a CMYK color profile from PPD attributes.">cupsCMYKLoad</a></li>
+ <li><a href="#cupsCMYKNew" title="Create a new CMYK color separation.">cupsCMYKNew</a></li>
+ <li><a href="#cupsCMYKSetBlack" title="Set the transition range for CMY to black.">cupsCMYKSetBlack</a></li>
+ <li><a href="#cupsCMYKSetCurve" title="Set a color transform curve using points.">cupsCMYKSetCurve</a></li>
+ <li><a href="#cupsCMYKSetGamma" title="Set a color transform curve using gamma and density.">cupsCMYKSetGamma</a></li>
+ <li><a href="#cupsCMYKSetInkLimit" title="Set the limit on the amount of ink.">cupsCMYKSetInkLimit</a></li>
+ <li><a href="#cupsCMYKSetLtDk" title="Set light/dark ink transforms.">cupsCMYKSetLtDk</a></li>
+ <li><a href="#cupsCheckBytes" title="Check to see if all bytes are zero.">cupsCheckBytes</a></li>
+ <li><a href="#cupsCheckValue" title="Check to see if all bytes match the given value.">cupsCheckValue</a></li>
+ <li><a href="#cupsDitherDelete" title="Free a dithering buffer.">cupsDitherDelete</a></li>
+ <li><a href="#cupsDitherLine" title="Dither a line of pixels...">cupsDitherLine</a></li>
+ <li><a href="#cupsDitherNew" title="Create an error-diffusion dithering buffer.">cupsDitherNew</a></li>
+ <li><a href="#cupsFindAttr" title="Find a PPD attribute based on the colormodel,
media, and resolution.">cupsFindAttr</a></li>
-<li><a href="#cupsLutDelete" title="Free the memory used by a lookup table.">cupsLutDelete</a></li>
-<li><a href="#cupsLutLoad" title="Load a LUT from a PPD file.">cupsLutLoad</a></li>
-<li><a href="#cupsLutNew" title="Make a lookup table from a list of pixel values.">cupsLutNew</a></li>
-<li><a href="#cupsPackHorizontal" title="Pack pixels horizontally...">cupsPackHorizontal</a></li>
-<li><a href="#cupsPackHorizontal2" title="Pack 2-bit pixels horizontally...">cupsPackHorizontal2</a></li>
-<li><a href="#cupsPackHorizontalBit" title="Pack pixels horizontally by bit...">cupsPackHorizontalBit</a></li>
-<li><a href="#cupsPackVertical" title="Pack pixels vertically...">cupsPackVertical</a></li>
-<li><a href="#cupsRGBDelete" title="Delete a color separation.">cupsRGBDelete</a></li>
-<li><a href="#cupsRGBDoGray" title="Do a grayscale separation...">cupsRGBDoGray</a></li>
-<li><a href="#cupsRGBDoRGB" title="Do a RGB separation...">cupsRGBDoRGB</a></li>
-<li><a href="#cupsRGBLoad" title="Load a RGB color profile from a PPD file.">cupsRGBLoad</a></li>
-<li><a href="#cupsRGBNew" title="Create a new RGB color separation.">cupsRGBNew</a></li>
+ <li><a href="#cupsLutDelete" title="Free the memory used by a lookup table.">cupsLutDelete</a></li>
+ <li><a href="#cupsLutLoad" title="Load a LUT from a PPD file.">cupsLutLoad</a></li>
+ <li><a href="#cupsLutNew" title="Make a lookup table from a list of pixel values.">cupsLutNew</a></li>
+ <li><a href="#cupsPackHorizontal" title="Pack pixels horizontally...">cupsPackHorizontal</a></li>
+ <li><a href="#cupsPackHorizontal2" title="Pack 2-bit pixels horizontally...">cupsPackHorizontal2</a></li>
+ <li><a href="#cupsPackHorizontalBit" title="Pack pixels horizontally by bit...">cupsPackHorizontalBit</a></li>
+ <li><a href="#cupsPackVertical" title="Pack pixels vertically...">cupsPackVertical</a></li>
+ <li><a href="#cupsRGBDelete" title="Delete a color separation.">cupsRGBDelete</a></li>
+ <li><a href="#cupsRGBDoGray" title="Do a grayscale separation...">cupsRGBDoGray</a></li>
+ <li><a href="#cupsRGBDoRGB" title="Do a RGB separation...">cupsRGBDoRGB</a></li>
+ <li><a href="#cupsRGBLoad" title="Load a RGB color profile from a PPD file.">cupsRGBLoad</a></li>
+ <li><a href="#cupsRGBNew" title="Create a new RGB color separation.">cupsRGBNew</a></li>
</ul></li>
<li><a href="#TYPES">Data Types</a><ul class="code">
<li><a href="#cups_cmyk_t" title="Simple CMYK lookup table">cups_cmyk_t</a></li>
@@ -428,6 +428,7 @@ media, and resolution.">cupsFindAttr</a></li>
<li><a href="#cups_scmy_lut[256]" title="sRGB gamma lookup table (inverted)">cups_scmy_lut[256]</a></li>
<li><a href="#cups_srgb_lut[256]" title="sRGB gamma lookup table">cups_srgb_lut[256]</a></li>
</ul></li>
+</ul>
<!--
"$Id$"
diff --git a/doc/help/api-filedir.html b/doc/help/api-filedir.html
index d79857834..a4cde044e 100644
--- a/doc/help/api-filedir.html
+++ b/doc/help/api-filedir.html
@@ -2,9 +2,10 @@
<html>
<!-- SECTION: Programming -->
<head>
-<title>File and Directory APIs</title>
-<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+ <title>File and Directory APIs </title>
+ <meta name="keywords" content="Programming">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -377,42 +378,41 @@ div.contents ul.subcontents li {
</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
-<ul class="subcontents">
<li><a href="#OVERVIEW">Overview</a></li>
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
-<li><a href="#cupsDirClose" title="Close a directory.">cupsDirClose</a></li>
-<li><a href="#cupsDirOpen" title="Open a directory.">cupsDirOpen</a></li>
-<li><a href="#cupsDirRead" title="Read the next directory entry.">cupsDirRead</a></li>
-<li><a href="#cupsDirRewind" title="Rewind to the start of the directory.">cupsDirRewind</a></li>
-<li><a href="#cupsFileClose" title="Close a CUPS file.">cupsFileClose</a></li>
-<li><a href="#cupsFileCompression" title="Return whether a file is compressed.">cupsFileCompression</a></li>
-<li><a href="#cupsFileEOF" title="Return the end-of-file status.">cupsFileEOF</a></li>
-<li><a href="#cupsFileFind" title="Find a file using the specified path.">cupsFileFind</a></li>
-<li><a href="#cupsFileFlush" title="Flush pending output.">cupsFileFlush</a></li>
-<li><a href="#cupsFileGetChar" title="Get a single character from a file.">cupsFileGetChar</a></li>
-<li><a href="#cupsFileGetConf" title="Get a line from a configuration file...">cupsFileGetConf</a></li>
-<li><a href="#cupsFileGetLine" title="Get a CR and/or LF-terminated line that may
+ <li><a href="#cupsDirClose" title="Close a directory.">cupsDirClose</a></li>
+ <li><a href="#cupsDirOpen" title="Open a directory.">cupsDirOpen</a></li>
+ <li><a href="#cupsDirRead" title="Read the next directory entry.">cupsDirRead</a></li>
+ <li><a href="#cupsDirRewind" title="Rewind to the start of the directory.">cupsDirRewind</a></li>
+ <li><a href="#cupsFileClose" title="Close a CUPS file.">cupsFileClose</a></li>
+ <li><a href="#cupsFileCompression" title="Return whether a file is compressed.">cupsFileCompression</a></li>
+ <li><a href="#cupsFileEOF" title="Return the end-of-file status.">cupsFileEOF</a></li>
+ <li><a href="#cupsFileFind" title="Find a file using the specified path.">cupsFileFind</a></li>
+ <li><a href="#cupsFileFlush" title="Flush pending output.">cupsFileFlush</a></li>
+ <li><a href="#cupsFileGetChar" title="Get a single character from a file.">cupsFileGetChar</a></li>
+ <li><a href="#cupsFileGetConf" title="Get a line from a configuration file...">cupsFileGetConf</a></li>
+ <li><a href="#cupsFileGetLine" title="Get a CR and/or LF-terminated line that may
contain binary data.">cupsFileGetLine</a></li>
-<li><a href="#cupsFileGets" title="Get a CR and/or LF-terminated line.">cupsFileGets</a></li>
-<li><a href="#cupsFileLock" title="Temporarily lock access to a file.">cupsFileLock</a></li>
-<li><a href="#cupsFileNumber" title="Return the file descriptor associated with a CUPS file.">cupsFileNumber</a></li>
-<li><a href="#cupsFileOpen" title="Open a CUPS file.">cupsFileOpen</a></li>
-<li><a href="#cupsFileOpenFd" title="Open a CUPS file using a file descriptor.">cupsFileOpenFd</a></li>
-<li><a href="#cupsFilePeekChar" title="Peek at the next character from a file.">cupsFilePeekChar</a></li>
-<li><a href="#cupsFilePrintf" title="Write a formatted string.">cupsFilePrintf</a></li>
-<li><a href="#cupsFilePutChar" title="Write a character.">cupsFilePutChar</a></li>
-<li><a href="#cupsFilePutConf" title="Write a configuration line.">cupsFilePutConf</a></li>
-<li><a href="#cupsFilePuts" title="Write a string.">cupsFilePuts</a></li>
-<li><a href="#cupsFileRead" title="Read from a file.">cupsFileRead</a></li>
-<li><a href="#cupsFileRewind" title="Set the current file position to the beginning of the
+ <li><a href="#cupsFileGets" title="Get a CR and/or LF-terminated line.">cupsFileGets</a></li>
+ <li><a href="#cupsFileLock" title="Temporarily lock access to a file.">cupsFileLock</a></li>
+ <li><a href="#cupsFileNumber" title="Return the file descriptor associated with a CUPS file.">cupsFileNumber</a></li>
+ <li><a href="#cupsFileOpen" title="Open a CUPS file.">cupsFileOpen</a></li>
+ <li><a href="#cupsFileOpenFd" title="Open a CUPS file using a file descriptor.">cupsFileOpenFd</a></li>
+ <li><a href="#cupsFilePeekChar" title="Peek at the next character from a file.">cupsFilePeekChar</a></li>
+ <li><a href="#cupsFilePrintf" title="Write a formatted string.">cupsFilePrintf</a></li>
+ <li><a href="#cupsFilePutChar" title="Write a character.">cupsFilePutChar</a></li>
+ <li><a href="#cupsFilePutConf" title="Write a configuration line.">cupsFilePutConf</a></li>
+ <li><a href="#cupsFilePuts" title="Write a string.">cupsFilePuts</a></li>
+ <li><a href="#cupsFileRead" title="Read from a file.">cupsFileRead</a></li>
+ <li><a href="#cupsFileRewind" title="Set the current file position to the beginning of the
file.">cupsFileRewind</a></li>
-<li><a href="#cupsFileSeek" title="Seek in a file.">cupsFileSeek</a></li>
-<li><a href="#cupsFileStderr" title="Return a CUPS file associated with stderr.">cupsFileStderr</a></li>
-<li><a href="#cupsFileStdin" title="Return a CUPS file associated with stdin.">cupsFileStdin</a></li>
-<li><a href="#cupsFileStdout" title="Return a CUPS file associated with stdout.">cupsFileStdout</a></li>
-<li><a href="#cupsFileTell" title="Return the current file position.">cupsFileTell</a></li>
-<li><a href="#cupsFileUnlock" title="Unlock access to a file.">cupsFileUnlock</a></li>
-<li><a href="#cupsFileWrite" title="Write to a file.">cupsFileWrite</a></li>
+ <li><a href="#cupsFileSeek" title="Seek in a file.">cupsFileSeek</a></li>
+ <li><a href="#cupsFileStderr" title="Return a CUPS file associated with stderr.">cupsFileStderr</a></li>
+ <li><a href="#cupsFileStdin" title="Return a CUPS file associated with stdin.">cupsFileStdin</a></li>
+ <li><a href="#cupsFileStdout" title="Return a CUPS file associated with stdout.">cupsFileStdout</a></li>
+ <li><a href="#cupsFileTell" title="Return the current file position.">cupsFileTell</a></li>
+ <li><a href="#cupsFileUnlock" title="Unlock access to a file.">cupsFileUnlock</a></li>
+ <li><a href="#cupsFileWrite" title="Write to a file.">cupsFileWrite</a></li>
</ul></li>
<li><a href="#TYPES">Data Types</a><ul class="code">
<li><a href="#cups_dentry_t" title="Directory entry type">cups_dentry_t</a></li>
@@ -422,6 +422,7 @@ file.">cupsFileRewind</a></li>
<li><a href="#STRUCTURES">Structures</a><ul class="code">
<li><a href="#cups_dentry_s" title="Directory entry type">cups_dentry_s</a></li>
</ul></li>
+</ul>
<!--
"$Id$"
diff --git a/doc/help/api-filter.html b/doc/help/api-filter.html
index 48ed8dcb4..b01c41738 100644
--- a/doc/help/api-filter.html
+++ b/doc/help/api-filter.html
@@ -2,9 +2,10 @@
<html>
<!-- SECTION: Programming -->
<head>
-<title>Filter and Backend Programming</title>
-<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+ <title>Filter and Backend Programming </title>
+ <meta name="keywords" content="Programming">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -383,29 +384,28 @@ div.contents ul.subcontents li {
</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
-<ul class="subcontents">
<li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
-<li><a href="#SECURITY">Security Considerations</a></li>
-<li><a href="#PERMISSIONS">File Permissions</a></li>
-<li><a href="#TEMPFILES">Temporary Files</a></li>
-<li><a href="#COPIES">Copy Generation</a></li>
-<li><a href="#EXITCODES">Exit Codes</a></li>
-<li><a href="#ENVIRONMENT">Environment Variables</a></li>
-<li><a href="#MESSAGES">Communicating with the Scheduler</a></li>
-<li><a href="#COMMUNICATING_BACKEND">Communicating with the Backend</a></li>
-<li><a href="#COMMUNICATING_FILTER">Communicating with Filters</a></li>
-<li><a href="#SNMP">Doing SNMP Queries with Network Printers</a></li>
+ <li><a href="#SECURITY">Security Considerations</a></li>
+ <li><a href="#PERMISSIONS">File Permissions</a></li>
+ <li><a href="#TEMPFILES">Temporary Files</a></li>
+ <li><a href="#COPIES">Copy Generation</a></li>
+ <li><a href="#EXITCODES">Exit Codes</a></li>
+ <li><a href="#ENVIRONMENT">Environment Variables</a></li>
+ <li><a href="#MESSAGES">Communicating with the Scheduler</a></li>
+ <li><a href="#COMMUNICATING_BACKEND">Communicating with the Backend</a></li>
+ <li><a href="#COMMUNICATING_FILTER">Communicating with Filters</a></li>
+ <li><a href="#SNMP">Doing SNMP Queries with Network Printers</a></li>
</ul></li>
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
-<li><a href="#cupsBackChannelRead" title="Read data from the backchannel.">cupsBackChannelRead</a></li>
-<li><a href="#cupsBackChannelWrite" title="Write data to the backchannel.">cupsBackChannelWrite</a></li>
-<li><a href="#cupsBackendDeviceURI" title="Get the device URI for a backend.">cupsBackendDeviceURI</a></li>
-<li><a href="#cupsBackendReport" title="Write a device line from a backend.">cupsBackendReport</a></li>
-<li><a href="#cupsSideChannelDoRequest" title="Send a side-channel command to a backend and wait for a response.">cupsSideChannelDoRequest</a></li>
-<li><a href="#cupsSideChannelRead" title="Read a side-channel message.">cupsSideChannelRead</a></li>
-<li><a href="#cupsSideChannelSNMPGet" title="Query a SNMP OID's value.">cupsSideChannelSNMPGet</a></li>
-<li><a href="#cupsSideChannelSNMPWalk" title="Query multiple SNMP OID values.">cupsSideChannelSNMPWalk</a></li>
-<li><a href="#cupsSideChannelWrite" title="Write a side-channel message.">cupsSideChannelWrite</a></li>
+ <li><a href="#cupsBackChannelRead" title="Read data from the backchannel.">cupsBackChannelRead</a></li>
+ <li><a href="#cupsBackChannelWrite" title="Write data to the backchannel.">cupsBackChannelWrite</a></li>
+ <li><a href="#cupsBackendDeviceURI" title="Get the device URI for a backend.">cupsBackendDeviceURI</a></li>
+ <li><a href="#cupsBackendReport" title="Write a device line from a backend.">cupsBackendReport</a></li>
+ <li><a href="#cupsSideChannelDoRequest" title="Send a side-channel command to a backend and wait for a response.">cupsSideChannelDoRequest</a></li>
+ <li><a href="#cupsSideChannelRead" title="Read a side-channel message.">cupsSideChannelRead</a></li>
+ <li><a href="#cupsSideChannelSNMPGet" title="Query a SNMP OID's value.">cupsSideChannelSNMPGet</a></li>
+ <li><a href="#cupsSideChannelSNMPWalk" title="Query multiple SNMP OID values.">cupsSideChannelSNMPWalk</a></li>
+ <li><a href="#cupsSideChannelWrite" title="Write a side-channel message.">cupsSideChannelWrite</a></li>
</ul></li>
<li><a href="#TYPES">Data Types</a><ul class="code">
<li><a href="#cups_backend_t" title="Backend exit codes">cups_backend_t</a></li>
@@ -422,6 +422,7 @@ div.contents ul.subcontents li {
<li><a href="#cups_sc_state_e" title="Printer state bits">cups_sc_state_e</a></li>
<li><a href="#cups_sc_status_e" title="Response status codes">cups_sc_status_e</a></li>
</ul></li>
+</ul>
<!--
"$Id$"
diff --git a/doc/help/api-httpipp.html b/doc/help/api-httpipp.html
index 98878ddab..40737993e 100644
--- a/doc/help/api-httpipp.html
+++ b/doc/help/api-httpipp.html
@@ -2,9 +2,10 @@
<html>
<!-- SECTION: Programming -->
<head>
-<title>HTTP and IPP APIs</title>
-<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+ <title>HTTP and IPP APIs </title>
+ <meta name="keywords" content="Programming">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -378,152 +379,151 @@ div.contents ul.subcontents li {
</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
-<ul class="subcontents">
<li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
-<li><a href="#CREATING_URI_STRINGS">Creating URI Strings</a></li>
-<li><a href="#SENDING_REQUESTS_WITH_FILES">Sending Requests with Files</a></li>
-<li><a href="#ASYNCHRONOUS_REQUEST_PROCESSING">Asynchronous Request Processing</a></li>
+ <li><a href="#CREATING_URI_STRINGS">Creating URI Strings</a></li>
+ <li><a href="#SENDING_REQUESTS_WITH_FILES">Sending Requests with Files</a></li>
+ <li><a href="#ASYNCHRONOUS_REQUEST_PROCESSING">Asynchronous Request Processing</a></li>
</ul></li>
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
-<li><a href="#cupsDoAuthentication" title="Authenticate a request.">cupsDoAuthentication</a></li>
-<li><a href="#cupsDoFileRequest" title="Do an IPP request with a file.">cupsDoFileRequest</a></li>
-<li><a href="#cupsDoIORequest" title="Do an IPP request with file descriptors.">cupsDoIORequest</a></li>
-<li><a href="#cupsDoRequest" title="Do an IPP request.">cupsDoRequest</a></li>
-<li><a href="#cupsEncodeOptions" title="Encode printer options into IPP attributes.">cupsEncodeOptions</a></li>
-<li><a href="#cupsEncodeOptions2" title="Encode printer options into IPP attributes for a group.">cupsEncodeOptions2</a></li>
-<li><a href="#cupsGetDevices" title="Get available printer devices.">cupsGetDevices</a></li>
-<li><a href="#cupsGetFd" title="Get a file from the server.">cupsGetFd</a></li>
-<li><a href="#cupsGetFile" title="Get a file from the server.">cupsGetFile</a></li>
-<li><a href="#cupsGetResponse" title="Get a response to an IPP request.">cupsGetResponse</a></li>
-<li><a href="#cupsLastError" title="Return the last IPP status code.">cupsLastError</a></li>
-<li><a href="#cupsLastErrorString" title="Return the last IPP status-message.">cupsLastErrorString</a></li>
-<li><a href="#cupsPutFd" title="Put a file on the server.">cupsPutFd</a></li>
-<li><a href="#cupsPutFile" title="Put a file on the server.">cupsPutFile</a></li>
-<li><a href="#cupsReadResponseData" title="Read additional data after the IPP response.">cupsReadResponseData</a></li>
-<li><a href="#cupsSendRequest" title="Send an IPP request.">cupsSendRequest</a></li>
-<li><a href="#cupsWriteRequestData" title="Write additional data after an IPP request.">cupsWriteRequestData</a></li>
-<li><a href="#httpAddCredential" title="Allocates and adds a single credential to an array.">httpAddCredential</a></li>
-<li><a href="#httpAddrAny" title="Check for the &quot;any&quot; address.">httpAddrAny</a></li>
-<li><a href="#httpAddrEqual" title="Compare two addresses.">httpAddrEqual</a></li>
-<li><a href="#httpAddrLength" title="Return the length of the address in bytes.">httpAddrLength</a></li>
-<li><a href="#httpAddrLocalhost" title="Check for the local loopback address.">httpAddrLocalhost</a></li>
-<li><a href="#httpAddrLookup" title="Lookup the hostname associated with the address.">httpAddrLookup</a></li>
-<li><a href="#httpAddrString" title="Convert an address to a numeric string.">httpAddrString</a></li>
-<li><a href="#httpAssembleURI" title="Assemble a uniform resource identifier from its
+ <li><a href="#cupsDoAuthentication" title="Authenticate a request.">cupsDoAuthentication</a></li>
+ <li><a href="#cupsDoFileRequest" title="Do an IPP request with a file.">cupsDoFileRequest</a></li>
+ <li><a href="#cupsDoIORequest" title="Do an IPP request with file descriptors.">cupsDoIORequest</a></li>
+ <li><a href="#cupsDoRequest" title="Do an IPP request.">cupsDoRequest</a></li>
+ <li><a href="#cupsEncodeOptions" title="Encode printer options into IPP attributes.">cupsEncodeOptions</a></li>
+ <li><a href="#cupsEncodeOptions2" title="Encode printer options into IPP attributes for a group.">cupsEncodeOptions2</a></li>
+ <li><a href="#cupsGetDevices" title="Get available printer devices.">cupsGetDevices</a></li>
+ <li><a href="#cupsGetFd" title="Get a file from the server.">cupsGetFd</a></li>
+ <li><a href="#cupsGetFile" title="Get a file from the server.">cupsGetFile</a></li>
+ <li><a href="#cupsGetResponse" title="Get a response to an IPP request.">cupsGetResponse</a></li>
+ <li><a href="#cupsLastError" title="Return the last IPP status code.">cupsLastError</a></li>
+ <li><a href="#cupsLastErrorString" title="Return the last IPP status-message.">cupsLastErrorString</a></li>
+ <li><a href="#cupsPutFd" title="Put a file on the server.">cupsPutFd</a></li>
+ <li><a href="#cupsPutFile" title="Put a file on the server.">cupsPutFile</a></li>
+ <li><a href="#cupsReadResponseData" title="Read additional data after the IPP response.">cupsReadResponseData</a></li>
+ <li><a href="#cupsSendRequest" title="Send an IPP request.">cupsSendRequest</a></li>
+ <li><a href="#cupsWriteRequestData" title="Write additional data after an IPP request.">cupsWriteRequestData</a></li>
+ <li><a href="#httpAddCredential" title="Allocates and adds a single credential to an array.">httpAddCredential</a></li>
+ <li><a href="#httpAddrAny" title="Check for the &quot;any&quot; address.">httpAddrAny</a></li>
+ <li><a href="#httpAddrEqual" title="Compare two addresses.">httpAddrEqual</a></li>
+ <li><a href="#httpAddrLength" title="Return the length of the address in bytes.">httpAddrLength</a></li>
+ <li><a href="#httpAddrLocalhost" title="Check for the local loopback address.">httpAddrLocalhost</a></li>
+ <li><a href="#httpAddrLookup" title="Lookup the hostname associated with the address.">httpAddrLookup</a></li>
+ <li><a href="#httpAddrString" title="Convert an address to a numeric string.">httpAddrString</a></li>
+ <li><a href="#httpAssembleURI" title="Assemble a uniform resource identifier from its
components.">httpAssembleURI</a></li>
-<li><a href="#httpAssembleURIf" title="Assemble a uniform resource identifier from its
+ <li><a href="#httpAssembleURIf" title="Assemble a uniform resource identifier from its
components with a formatted resource.">httpAssembleURIf</a></li>
-<li><a href="#httpBlocking" title="Set blocking/non-blocking behavior on a connection.">httpBlocking</a></li>
-<li><a href="#httpCheck" title="Check to see if there is a pending response from the server.">httpCheck</a></li>
-<li><a href="#httpClearCookie" title="Clear the cookie value(s).">httpClearCookie</a></li>
-<li><a href="#httpClearFields" title="Clear HTTP request fields.">httpClearFields</a></li>
-<li><a href="#httpClose" title="Close an HTTP connection.">httpClose</a></li>
-<li><a href="#httpConnect" title="Connect to a HTTP server.">httpConnect</a></li>
-<li><a href="#httpConnectEncrypt" title="Connect to a HTTP server using encryption.">httpConnectEncrypt</a></li>
-<li><a href="#httpCopyCredentials" title="Copy the credentials associated with an encrypted
+ <li><a href="#httpBlocking" title="Set blocking/non-blocking behavior on a connection.">httpBlocking</a></li>
+ <li><a href="#httpCheck" title="Check to see if there is a pending response from the server.">httpCheck</a></li>
+ <li><a href="#httpClearCookie" title="Clear the cookie value(s).">httpClearCookie</a></li>
+ <li><a href="#httpClearFields" title="Clear HTTP request fields.">httpClearFields</a></li>
+ <li><a href="#httpClose" title="Close an HTTP connection.">httpClose</a></li>
+ <li><a href="#httpConnect" title="Connect to a HTTP server.">httpConnect</a></li>
+ <li><a href="#httpConnectEncrypt" title="Connect to a HTTP server using encryption.">httpConnectEncrypt</a></li>
+ <li><a href="#httpCopyCredentials" title="Copy the credentials associated with an encrypted
connection.">httpCopyCredentials</a></li>
-<li><a href="#httpDecode64" title="Base64-decode a string.">httpDecode64</a></li>
-<li><a href="#httpDecode64_2" title="Base64-decode a string.">httpDecode64_2</a></li>
-<li><a href="#httpDelete" title="Send a DELETE request to the server.">httpDelete</a></li>
-<li><a href="#httpEncode64" title="Base64-encode a string.">httpEncode64</a></li>
-<li><a href="#httpEncode64_2" title="Base64-encode a string.">httpEncode64_2</a></li>
-<li><a href="#httpEncryption" title="Set the required encryption on the link.">httpEncryption</a></li>
-<li><a href="#httpError" title="Get the last error on a connection.">httpError</a></li>
-<li><a href="#httpFlush" title="Flush data from a HTTP connection.">httpFlush</a></li>
-<li><a href="#httpFlushWrite" title="Flush data in write buffer.">httpFlushWrite</a></li>
-<li><a href="#httpFreeCredentials" title="Free an array of credentials.">httpFreeCredentials</a></li>
-<li><a href="#httpGet" title="Send a GET request to the server.">httpGet</a></li>
-<li><a href="#httpGetAuthString" title="Get the current authorization string.">httpGetAuthString</a></li>
-<li><a href="#httpGetBlocking" title="Get the blocking/non-block state of a connection.">httpGetBlocking</a></li>
-<li><a href="#httpGetCookie" title="Get any cookie data from the response.">httpGetCookie</a></li>
-<li><a href="#httpGetDateString" title="Get a formatted date/time string from a time value.">httpGetDateString</a></li>
-<li><a href="#httpGetDateString2" title="Get a formatted date/time string from a time value.">httpGetDateString2</a></li>
-<li><a href="#httpGetDateTime" title="Get a time value from a formatted date/time string.">httpGetDateTime</a></li>
-<li><a href="#httpGetFd" title="Get the file descriptor associated with a connection.">httpGetFd</a></li>
-<li><a href="#httpGetField" title="Get a field value from a request/response.">httpGetField</a></li>
-<li><a href="#httpGetHostByName" title="Lookup a hostname or IPv4 address, and return
+ <li><a href="#httpDecode64" title="Base64-decode a string.">httpDecode64</a></li>
+ <li><a href="#httpDecode64_2" title="Base64-decode a string.">httpDecode64_2</a></li>
+ <li><a href="#httpDelete" title="Send a DELETE request to the server.">httpDelete</a></li>
+ <li><a href="#httpEncode64" title="Base64-encode a string.">httpEncode64</a></li>
+ <li><a href="#httpEncode64_2" title="Base64-encode a string.">httpEncode64_2</a></li>
+ <li><a href="#httpEncryption" title="Set the required encryption on the link.">httpEncryption</a></li>
+ <li><a href="#httpError" title="Get the last error on a connection.">httpError</a></li>
+ <li><a href="#httpFlush" title="Flush data from a HTTP connection.">httpFlush</a></li>
+ <li><a href="#httpFlushWrite" title="Flush data in write buffer.">httpFlushWrite</a></li>
+ <li><a href="#httpFreeCredentials" title="Free an array of credentials.">httpFreeCredentials</a></li>
+ <li><a href="#httpGet" title="Send a GET request to the server.">httpGet</a></li>
+ <li><a href="#httpGetAuthString" title="Get the current authorization string.">httpGetAuthString</a></li>
+ <li><a href="#httpGetBlocking" title="Get the blocking/non-block state of a connection.">httpGetBlocking</a></li>
+ <li><a href="#httpGetCookie" title="Get any cookie data from the response.">httpGetCookie</a></li>
+ <li><a href="#httpGetDateString" title="Get a formatted date/time string from a time value.">httpGetDateString</a></li>
+ <li><a href="#httpGetDateString2" title="Get a formatted date/time string from a time value.">httpGetDateString2</a></li>
+ <li><a href="#httpGetDateTime" title="Get a time value from a formatted date/time string.">httpGetDateTime</a></li>
+ <li><a href="#httpGetFd" title="Get the file descriptor associated with a connection.">httpGetFd</a></li>
+ <li><a href="#httpGetField" title="Get a field value from a request/response.">httpGetField</a></li>
+ <li><a href="#httpGetHostByName" title="Lookup a hostname or IPv4 address, and return
address records for the specified name.">httpGetHostByName</a></li>
-<li><a href="#httpGetHostname" title="Get the FQDN for the connection or local system.">httpGetHostname</a></li>
-<li><a href="#httpGetLength" title="Get the amount of data remaining from the
+ <li><a href="#httpGetHostname" title="Get the FQDN for the connection or local system.">httpGetHostname</a></li>
+ <li><a href="#httpGetLength" title="Get the amount of data remaining from the
content-length or transfer-encoding fields.">httpGetLength</a></li>
-<li><a href="#httpGetLength2" title="Get the amount of data remaining from the
+ <li><a href="#httpGetLength2" title="Get the amount of data remaining from the
content-length or transfer-encoding fields.">httpGetLength2</a></li>
-<li><a href="#httpGetStatus" title="Get the status of the last HTTP request.">httpGetStatus</a></li>
-<li><a href="#httpGetSubField" title="Get a sub-field value.">httpGetSubField</a></li>
-<li><a href="#httpGetSubField2" title="Get a sub-field value.">httpGetSubField2</a></li>
-<li><a href="#httpGets" title="Get a line of text from a HTTP connection.">httpGets</a></li>
-<li><a href="#httpHead" title="Send a HEAD request to the server.">httpHead</a></li>
-<li><a href="#httpInitialize" title="Initialize the HTTP interface library and set the
+ <li><a href="#httpGetStatus" title="Get the status of the last HTTP request.">httpGetStatus</a></li>
+ <li><a href="#httpGetSubField" title="Get a sub-field value.">httpGetSubField</a></li>
+ <li><a href="#httpGetSubField2" title="Get a sub-field value.">httpGetSubField2</a></li>
+ <li><a href="#httpGets" title="Get a line of text from a HTTP connection.">httpGets</a></li>
+ <li><a href="#httpHead" title="Send a HEAD request to the server.">httpHead</a></li>
+ <li><a href="#httpInitialize" title="Initialize the HTTP interface library and set the
default HTTP proxy (if any).">httpInitialize</a></li>
-<li><a href="#httpMD5" title="Compute the MD5 sum of the username:group:password.">httpMD5</a></li>
-<li><a href="#httpMD5Final" title="Combine the MD5 sum of the username, group, and password
+ <li><a href="#httpMD5" title="Compute the MD5 sum of the username:group:password.">httpMD5</a></li>
+ <li><a href="#httpMD5Final" title="Combine the MD5 sum of the username, group, and password
with the server-supplied nonce value, method, and
request-uri.">httpMD5Final</a></li>
-<li><a href="#httpMD5String" title="Convert an MD5 sum to a character string.">httpMD5String</a></li>
-<li><a href="#httpOptions" title="Send an OPTIONS request to the server.">httpOptions</a></li>
-<li><a href="#httpPost" title="Send a POST request to the server.">httpPost</a></li>
-<li><a href="#httpPut" title="Send a PUT request to the server.">httpPut</a></li>
-<li><a href="#httpRead" title="Read data from a HTTP connection.">httpRead</a></li>
-<li><a href="#httpRead2" title="Read data from a HTTP connection.">httpRead2</a></li>
-<li><a href="#httpReconnect" title="Reconnect to a HTTP server.">httpReconnect</a></li>
-<li><a href="#httpSeparate" title="Separate a Universal Resource Identifier into its
+ <li><a href="#httpMD5String" title="Convert an MD5 sum to a character string.">httpMD5String</a></li>
+ <li><a href="#httpOptions" title="Send an OPTIONS request to the server.">httpOptions</a></li>
+ <li><a href="#httpPost" title="Send a POST request to the server.">httpPost</a></li>
+ <li><a href="#httpPut" title="Send a PUT request to the server.">httpPut</a></li>
+ <li><a href="#httpRead" title="Read data from a HTTP connection.">httpRead</a></li>
+ <li><a href="#httpRead2" title="Read data from a HTTP connection.">httpRead2</a></li>
+ <li><a href="#httpReconnect" title="Reconnect to a HTTP server.">httpReconnect</a></li>
+ <li><a href="#httpSeparate" title="Separate a Universal Resource Identifier into its
components.">httpSeparate</a></li>
-<li><a href="#httpSeparate2" title="Separate a Universal Resource Identifier into its
+ <li><a href="#httpSeparate2" title="Separate a Universal Resource Identifier into its
components.">httpSeparate2</a></li>
-<li><a href="#httpSeparateURI" title="Separate a Universal Resource Identifier into its
+ <li><a href="#httpSeparateURI" title="Separate a Universal Resource Identifier into its
components.">httpSeparateURI</a></li>
-<li><a href="#httpSetAuthString" title="Set the current authorization string.">httpSetAuthString</a></li>
-<li><a href="#httpSetCookie" title="Set the cookie value(s).">httpSetCookie</a></li>
-<li><a href="#httpSetCredentials" title="Set the credentials associated with an encrypted
+ <li><a href="#httpSetAuthString" title="Set the current authorization string.">httpSetAuthString</a></li>
+ <li><a href="#httpSetCookie" title="Set the cookie value(s).">httpSetCookie</a></li>
+ <li><a href="#httpSetCredentials" title="Set the credentials associated with an encrypted
connection.">httpSetCredentials</a></li>
-<li><a href="#httpSetExpect" title="Set the Expect: header in a request.">httpSetExpect</a></li>
-<li><a href="#httpSetField" title="Set the value of an HTTP header.">httpSetField</a></li>
-<li><a href="#httpSetLength" title="Set the content-length and content-encoding.">httpSetLength</a></li>
-<li><a href="#httpStatus" title="Return a short string describing a HTTP status code.">httpStatus</a></li>
-<li><a href="#httpTrace" title="Send an TRACE request to the server.">httpTrace</a></li>
-<li><a href="#httpUpdate" title="Update the current HTTP state for incoming data.">httpUpdate</a></li>
-<li><a href="#httpWait" title="Wait for data available on a connection.">httpWait</a></li>
-<li><a href="#httpWrite" title="Write data to a HTTP connection.">httpWrite</a></li>
-<li><a href="#httpWrite2" title="Write data to a HTTP connection.">httpWrite2</a></li>
-<li><a href="#ippAddBoolean" title="Add a boolean attribute to an IPP message.">ippAddBoolean</a></li>
-<li><a href="#ippAddBooleans" title="Add an array of boolean values.">ippAddBooleans</a></li>
-<li><a href="#ippAddCollection" title="Add a collection value.">ippAddCollection</a></li>
-<li><a href="#ippAddCollections" title="Add an array of collection values.">ippAddCollections</a></li>
-<li><a href="#ippAddDate" title="Add a date attribute to an IPP message.">ippAddDate</a></li>
-<li><a href="#ippAddInteger" title="Add a integer attribute to an IPP message.">ippAddInteger</a></li>
-<li><a href="#ippAddIntegers" title="Add an array of integer values.">ippAddIntegers</a></li>
-<li><a href="#ippAddOctetString" title="Add an octetString value to an IPP message.">ippAddOctetString</a></li>
-<li><a href="#ippAddRange" title="Add a range of values to an IPP message.">ippAddRange</a></li>
-<li><a href="#ippAddRanges" title="Add ranges of values to an IPP message.">ippAddRanges</a></li>
-<li><a href="#ippAddResolution" title="Add a resolution value to an IPP message.">ippAddResolution</a></li>
-<li><a href="#ippAddResolutions" title="Add resolution values to an IPP message.">ippAddResolutions</a></li>
-<li><a href="#ippAddSeparator" title="Add a group separator to an IPP message.">ippAddSeparator</a></li>
-<li><a href="#ippAddString" title="Add a language-encoded string to an IPP message.">ippAddString</a></li>
-<li><a href="#ippAddStrings" title="Add language-encoded strings to an IPP message.">ippAddStrings</a></li>
-<li><a href="#ippDateToTime" title="Convert from RFC 1903 Date/Time format to UNIX time
+ <li><a href="#httpSetExpect" title="Set the Expect: header in a request.">httpSetExpect</a></li>
+ <li><a href="#httpSetField" title="Set the value of an HTTP header.">httpSetField</a></li>
+ <li><a href="#httpSetLength" title="Set the content-length and content-encoding.">httpSetLength</a></li>
+ <li><a href="#httpStatus" title="Return a short string describing a HTTP status code.">httpStatus</a></li>
+ <li><a href="#httpTrace" title="Send an TRACE request to the server.">httpTrace</a></li>
+ <li><a href="#httpUpdate" title="Update the current HTTP state for incoming data.">httpUpdate</a></li>
+ <li><a href="#httpWait" title="Wait for data available on a connection.">httpWait</a></li>
+ <li><a href="#httpWrite" title="Write data to a HTTP connection.">httpWrite</a></li>
+ <li><a href="#httpWrite2" title="Write data to a HTTP connection.">httpWrite2</a></li>
+ <li><a href="#ippAddBoolean" title="Add a boolean attribute to an IPP message.">ippAddBoolean</a></li>
+ <li><a href="#ippAddBooleans" title="Add an array of boolean values.">ippAddBooleans</a></li>
+ <li><a href="#ippAddCollection" title="Add a collection value.">ippAddCollection</a></li>
+ <li><a href="#ippAddCollections" title="Add an array of collection values.">ippAddCollections</a></li>
+ <li><a href="#ippAddDate" title="Add a date attribute to an IPP message.">ippAddDate</a></li>
+ <li><a href="#ippAddInteger" title="Add a integer attribute to an IPP message.">ippAddInteger</a></li>
+ <li><a href="#ippAddIntegers" title="Add an array of integer values.">ippAddIntegers</a></li>
+ <li><a href="#ippAddOctetString" title="Add an octetString value to an IPP message.">ippAddOctetString</a></li>
+ <li><a href="#ippAddRange" title="Add a range of values to an IPP message.">ippAddRange</a></li>
+ <li><a href="#ippAddRanges" title="Add ranges of values to an IPP message.">ippAddRanges</a></li>
+ <li><a href="#ippAddResolution" title="Add a resolution value to an IPP message.">ippAddResolution</a></li>
+ <li><a href="#ippAddResolutions" title="Add resolution values to an IPP message.">ippAddResolutions</a></li>
+ <li><a href="#ippAddSeparator" title="Add a group separator to an IPP message.">ippAddSeparator</a></li>
+ <li><a href="#ippAddString" title="Add a language-encoded string to an IPP message.">ippAddString</a></li>
+ <li><a href="#ippAddStrings" title="Add language-encoded strings to an IPP message.">ippAddStrings</a></li>
+ <li><a href="#ippDateToTime" title="Convert from RFC 1903 Date/Time format to UNIX time
in seconds.">ippDateToTime</a></li>
-<li><a href="#ippDelete" title="Delete an IPP message.">ippDelete</a></li>
-<li><a href="#ippDeleteAttribute" title="Delete a single attribute in an IPP message.">ippDeleteAttribute</a></li>
-<li><a href="#ippErrorString" title="Return a name for the given status code.">ippErrorString</a></li>
-<li><a href="#ippErrorValue" title="Return a status code for the given name.">ippErrorValue</a></li>
-<li><a href="#ippFindAttribute" title="Find a named attribute in a request...">ippFindAttribute</a></li>
-<li><a href="#ippFindNextAttribute" title="Find the next named attribute in a request...">ippFindNextAttribute</a></li>
-<li><a href="#ippLength" title="Compute the length of an IPP message.">ippLength</a></li>
-<li><a href="#ippNew" title="Allocate a new IPP message.">ippNew</a></li>
-<li><a href="#ippNewRequest" title="Allocate a new IPP request message.">ippNewRequest</a></li>
-<li><a href="#ippOpString" title="Return a name for the given operation id.">ippOpString</a></li>
-<li><a href="#ippOpValue" title="Return an operation id for the given name.">ippOpValue</a></li>
-<li><a href="#ippPort" title="Return the default IPP port number.">ippPort</a></li>
-<li><a href="#ippRead" title="Read data for an IPP message from a HTTP connection.">ippRead</a></li>
-<li><a href="#ippReadFile" title="Read data for an IPP message from a file.">ippReadFile</a></li>
-<li><a href="#ippReadIO" title="Read data for an IPP message.">ippReadIO</a></li>
-<li><a href="#ippSetPort" title="Set the default port number.">ippSetPort</a></li>
-<li><a href="#ippTagString" title="Return the tag name corresponding to a tag value.">ippTagString</a></li>
-<li><a href="#ippTagValue" title="Return the tag value corresponding to a tag name.">ippTagValue</a></li>
-<li><a href="#ippTimeToDate" title="Convert from UNIX time to RFC 1903 format.">ippTimeToDate</a></li>
-<li><a href="#ippWrite" title="Write data for an IPP message to a HTTP connection.">ippWrite</a></li>
-<li><a href="#ippWriteFile" title="Write data for an IPP message to a file.">ippWriteFile</a></li>
-<li><a href="#ippWriteIO" title="Write data for an IPP message.">ippWriteIO</a></li>
+ <li><a href="#ippDelete" title="Delete an IPP message.">ippDelete</a></li>
+ <li><a href="#ippDeleteAttribute" title="Delete a single attribute in an IPP message.">ippDeleteAttribute</a></li>
+ <li><a href="#ippErrorString" title="Return a name for the given status code.">ippErrorString</a></li>
+ <li><a href="#ippErrorValue" title="Return a status code for the given name.">ippErrorValue</a></li>
+ <li><a href="#ippFindAttribute" title="Find a named attribute in a request...">ippFindAttribute</a></li>
+ <li><a href="#ippFindNextAttribute" title="Find the next named attribute in a request...">ippFindNextAttribute</a></li>
+ <li><a href="#ippLength" title="Compute the length of an IPP message.">ippLength</a></li>
+ <li><a href="#ippNew" title="Allocate a new IPP message.">ippNew</a></li>
+ <li><a href="#ippNewRequest" title="Allocate a new IPP request message.">ippNewRequest</a></li>
+ <li><a href="#ippOpString" title="Return a name for the given operation id.">ippOpString</a></li>
+ <li><a href="#ippOpValue" title="Return an operation id for the given name.">ippOpValue</a></li>
+ <li><a href="#ippPort" title="Return the default IPP port number.">ippPort</a></li>
+ <li><a href="#ippRead" title="Read data for an IPP message from a HTTP connection.">ippRead</a></li>
+ <li><a href="#ippReadFile" title="Read data for an IPP message from a file.">ippReadFile</a></li>
+ <li><a href="#ippReadIO" title="Read data for an IPP message.">ippReadIO</a></li>
+ <li><a href="#ippSetPort" title="Set the default port number.">ippSetPort</a></li>
+ <li><a href="#ippTagString" title="Return the tag name corresponding to a tag value.">ippTagString</a></li>
+ <li><a href="#ippTagValue" title="Return the tag value corresponding to a tag name.">ippTagValue</a></li>
+ <li><a href="#ippTimeToDate" title="Convert from UNIX time to RFC 1903 format.">ippTimeToDate</a></li>
+ <li><a href="#ippWrite" title="Write data for an IPP message to a HTTP connection.">ippWrite</a></li>
+ <li><a href="#ippWriteFile" title="Write data for an IPP message to a file.">ippWriteFile</a></li>
+ <li><a href="#ippWriteIO" title="Write data for an IPP message.">ippWriteIO</a></li>
</ul></li>
<li><a href="#TYPES">Data Types</a><ul class="code">
<li><a href="#http_addr_t" title="Socket address union, which
@@ -599,6 +599,7 @@ are server-oriented...">http_state_e</a></li>
<li><a href="#ipp_status_e" title="IPP status codes">ipp_status_e</a></li>
<li><a href="#ipp_tag_e" title="Format tags for attributes">ipp_tag_e</a></li>
</ul></li>
+</ul>
<!--
"$Id$"
diff --git a/doc/help/api-mime.html b/doc/help/api-mime.html
index e904ddbd5..58cbf1a26 100644
--- a/doc/help/api-mime.html
+++ b/doc/help/api-mime.html
@@ -2,9 +2,10 @@
<html>
<!-- SECTION: Programming -->
<head>
-<title>MIME API</title>
-<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+ <title>MIME API </title>
+ <meta name="keywords" content="Programming">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -375,28 +376,27 @@ div.contents ul.subcontents li {
</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
-<ul class="subcontents">
<li><a href="#OVERVIEW">Overview</a></li>
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
-<li><a href="#mimeAddFilter" title="Add a filter to the current MIME database.">mimeAddFilter</a></li>
-<li><a href="#mimeAddType" title="Add a MIME type to a database.">mimeAddType</a></li>
-<li><a href="#mimeAddTypeRule" title="Add a detection rule for a file type.">mimeAddTypeRule</a></li>
-<li><a href="#mimeDelete" title="Delete (free) a MIME database.">mimeDelete</a></li>
-<li><a href="#mimeDeleteFilter" title="Delete a filter from the MIME database.">mimeDeleteFilter</a></li>
-<li><a href="#mimeDeleteType" title="Delete a type from the MIME database.">mimeDeleteType</a></li>
-<li><a href="#mimeFileType" title="Determine the type of a file.">mimeFileType</a></li>
-<li><a href="#mimeFilter" title="Find the fastest way to convert from one type to another.">mimeFilter</a></li>
-<li><a href="#mimeFilterLookup" title="Lookup a filter...">mimeFilterLookup</a></li>
-<li><a href="#mimeFirstFilter" title="Get the first filter in the MIME database.">mimeFirstFilter</a></li>
-<li><a href="#mimeFirstType" title="Get the first type in the MIME database.">mimeFirstType</a></li>
-<li><a href="#mimeLoad" title="Create a new MIME database from disk.">mimeLoad</a></li>
-<li><a href="#mimeLoadFilters" title="Load filter definitions from disk.">mimeLoadFilters</a></li>
-<li><a href="#mimeLoadTypes" title="Load type definitions from disk.">mimeLoadTypes</a></li>
-<li><a href="#mimeNextFilter" title="Get the next filter in the MIME database.">mimeNextFilter</a></li>
-<li><a href="#mimeNextType" title="Get the next type in the MIME database.">mimeNextType</a></li>
-<li><a href="#mimeNumFilters" title="MIME database">mimeNumFilters</a></li>
-<li><a href="#mimeNumTypes" title="MIME database">mimeNumTypes</a></li>
-<li><a href="#mimeType" title="Lookup a file type.">mimeType</a></li>
+ <li><a href="#mimeAddFilter" title="Add a filter to the current MIME database.">mimeAddFilter</a></li>
+ <li><a href="#mimeAddType" title="Add a MIME type to a database.">mimeAddType</a></li>
+ <li><a href="#mimeAddTypeRule" title="Add a detection rule for a file type.">mimeAddTypeRule</a></li>
+ <li><a href="#mimeDelete" title="Delete (free) a MIME database.">mimeDelete</a></li>
+ <li><a href="#mimeDeleteFilter" title="Delete a filter from the MIME database.">mimeDeleteFilter</a></li>
+ <li><a href="#mimeDeleteType" title="Delete a type from the MIME database.">mimeDeleteType</a></li>
+ <li><a href="#mimeFileType" title="Determine the type of a file.">mimeFileType</a></li>
+ <li><a href="#mimeFilter" title="Find the fastest way to convert from one type to another.">mimeFilter</a></li>
+ <li><a href="#mimeFilterLookup" title="Lookup a filter...">mimeFilterLookup</a></li>
+ <li><a href="#mimeFirstFilter" title="Get the first filter in the MIME database.">mimeFirstFilter</a></li>
+ <li><a href="#mimeFirstType" title="Get the first type in the MIME database.">mimeFirstType</a></li>
+ <li><a href="#mimeLoad" title="Create a new MIME database from disk.">mimeLoad</a></li>
+ <li><a href="#mimeLoadFilters" title="Load filter definitions from disk.">mimeLoadFilters</a></li>
+ <li><a href="#mimeLoadTypes" title="Load type definitions from disk.">mimeLoadTypes</a></li>
+ <li><a href="#mimeNextFilter" title="Get the next filter in the MIME database.">mimeNextFilter</a></li>
+ <li><a href="#mimeNextType" title="Get the next type in the MIME database.">mimeNextType</a></li>
+ <li><a href="#mimeNumFilters" title="MIME database">mimeNumFilters</a></li>
+ <li><a href="#mimeNumTypes" title="MIME database">mimeNumTypes</a></li>
+ <li><a href="#mimeType" title="Lookup a file type.">mimeType</a></li>
</ul></li>
<li><a href="#TYPES">Data Types</a><ul class="code">
<li><a href="#mime_filter_t" title="MIME Conversion Filter Data">mime_filter_t</a></li>
@@ -405,6 +405,7 @@ div.contents ul.subcontents li {
<li><a href="#mime_t" title="MIME Database">mime_t</a></li>
<li><a href="#mime_type_t" title="MIME Type Data">mime_type_t</a></li>
</ul></li>
+</ul>
<!--
"$Id$"
diff --git a/doc/help/api-overview.html b/doc/help/api-overview.html
index bdd3f612b..c3c9a03e1 100644
--- a/doc/help/api-overview.html
+++ b/doc/help/api-overview.html
@@ -2,9 +2,10 @@
<html>
<!-- SECTION: Programming -->
<head>
-<title>Introduction to CUPS Programming</title>
-<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+ <title>Introduction to CUPS Programming </title>
+ <meta name="keywords" content="Programming">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -395,13 +396,13 @@ div.contents ul.subcontents li {
</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
-<ul class="subcontents">
<li><a href="#OVERVIEW">Overview</a></li>
<li><a href="#COMPILING">Compiling Programs</a><ul class="subcontents">
-<li><a href="#XCODE">Compiling with Xcode</a></li>
-<li><a href="#COMMANDLINE">Compiling with GCC</a></li>
+ <li><a href="#XCODE">Compiling with Xcode</a></li>
+ <li><a href="#COMMANDLINE">Compiling with GCC</a></li>
</ul></li>
<li><a href="#WHERETOGO">Where to Go Next</a></li>
+</ul>
<!--
"$Id$"
diff --git a/doc/help/api-ppd.html b/doc/help/api-ppd.html
index c6d6077ca..69c2a71a2 100644
--- a/doc/help/api-ppd.html
+++ b/doc/help/api-ppd.html
@@ -2,9 +2,10 @@
<html>
<!-- SECTION: Programming -->
<head>
-<title>PPD API</title>
-<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+ <title>PPD API </title>
+ <meta name="keywords" content="Programming">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -377,65 +378,64 @@ div.contents ul.subcontents li {
</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
-<ul class="subcontents">
<li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
-<li><a href="#LOADING">Loading a PPD File</a></li>
-<li><a href="#OPTIONS_AND_GROUPS">Options and Groups</a></li>
-<li><a href="#CONSTRAINTS">Constraints</a></li>
-<li><a href="#PAGE_SIZES">Page Sizes</a></li>
-<li><a href="#ATTRIBUTES">Attributes</a></li>
+ <li><a href="#LOADING">Loading a PPD File</a></li>
+ <li><a href="#OPTIONS_AND_GROUPS">Options and Groups</a></li>
+ <li><a href="#CONSTRAINTS">Constraints</a></li>
+ <li><a href="#PAGE_SIZES">Page Sizes</a></li>
+ <li><a href="#ATTRIBUTES">Attributes</a></li>
</ul></li>
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
-<li><a href="#cupsGetConflicts" title="Get a list of conflicting options in a marked PPD.">cupsGetConflicts</a></li>
-<li><a href="#cupsMarkOptions" title="Mark command-line options in a PPD file.">cupsMarkOptions</a></li>
-<li><a href="#cupsResolveConflicts" title="Resolve conflicts in a marked PPD.">cupsResolveConflicts</a></li>
-<li><a href="#ppdClose" title="Free all memory used by the PPD file.">ppdClose</a></li>
-<li><a href="#ppdCollect" title="Collect all marked options that reside in the specified
+ <li><a href="#cupsGetConflicts" title="Get a list of conflicting options in a marked PPD.">cupsGetConflicts</a></li>
+ <li><a href="#cupsMarkOptions" title="Mark command-line options in a PPD file.">cupsMarkOptions</a></li>
+ <li><a href="#cupsResolveConflicts" title="Resolve conflicts in a marked PPD.">cupsResolveConflicts</a></li>
+ <li><a href="#ppdClose" title="Free all memory used by the PPD file.">ppdClose</a></li>
+ <li><a href="#ppdCollect" title="Collect all marked options that reside in the specified
section.">ppdCollect</a></li>
-<li><a href="#ppdCollect2" title="Collect all marked options that reside in the
+ <li><a href="#ppdCollect2" title="Collect all marked options that reside in the
specified section and minimum order.">ppdCollect2</a></li>
-<li><a href="#ppdConflicts" title="Check to see if there are any conflicts among the
+ <li><a href="#ppdConflicts" title="Check to see if there are any conflicts among the
marked option choices.">ppdConflicts</a></li>
-<li><a href="#ppdEmit" title="Emit code for marked options to a file.">ppdEmit</a></li>
-<li><a href="#ppdEmitAfterOrder" title="Emit a subset of the code for marked options to a file.">ppdEmitAfterOrder</a></li>
-<li><a href="#ppdEmitFd" title="Emit code for marked options to a file.">ppdEmitFd</a></li>
-<li><a href="#ppdEmitJCL" title="Emit code for JCL options to a file.">ppdEmitJCL</a></li>
-<li><a href="#ppdEmitJCLEnd" title="Emit JCLEnd code to a file.">ppdEmitJCLEnd</a></li>
-<li><a href="#ppdEmitString" title="Get a string containing the code for marked options.">ppdEmitString</a></li>
-<li><a href="#ppdErrorString" title="Returns the text assocated with a status.">ppdErrorString</a></li>
-<li><a href="#ppdFindAttr" title="Find the first matching attribute.">ppdFindAttr</a></li>
-<li><a href="#ppdFindChoice" title="Return a pointer to an option choice.">ppdFindChoice</a></li>
-<li><a href="#ppdFindCustomOption" title="Find a custom option.">ppdFindCustomOption</a></li>
-<li><a href="#ppdFindCustomParam" title="Find a parameter for a custom option.">ppdFindCustomParam</a></li>
-<li><a href="#ppdFindMarkedChoice" title="Return the marked choice for the specified option.">ppdFindMarkedChoice</a></li>
-<li><a href="#ppdFindNextAttr" title="Find the next matching attribute.">ppdFindNextAttr</a></li>
-<li><a href="#ppdFindOption" title="Return a pointer to the specified option.">ppdFindOption</a></li>
-<li><a href="#ppdFirstCustomParam" title="Return the first parameter for a custom option.">ppdFirstCustomParam</a></li>
-<li><a href="#ppdFirstOption" title="Return the first option in the PPD file.">ppdFirstOption</a></li>
-<li><a href="#ppdInstallableConflict" title="Test whether an option choice conflicts with
+ <li><a href="#ppdEmit" title="Emit code for marked options to a file.">ppdEmit</a></li>
+ <li><a href="#ppdEmitAfterOrder" title="Emit a subset of the code for marked options to a file.">ppdEmitAfterOrder</a></li>
+ <li><a href="#ppdEmitFd" title="Emit code for marked options to a file.">ppdEmitFd</a></li>
+ <li><a href="#ppdEmitJCL" title="Emit code for JCL options to a file.">ppdEmitJCL</a></li>
+ <li><a href="#ppdEmitJCLEnd" title="Emit JCLEnd code to a file.">ppdEmitJCLEnd</a></li>
+ <li><a href="#ppdEmitString" title="Get a string containing the code for marked options.">ppdEmitString</a></li>
+ <li><a href="#ppdErrorString" title="Returns the text assocated with a status.">ppdErrorString</a></li>
+ <li><a href="#ppdFindAttr" title="Find the first matching attribute.">ppdFindAttr</a></li>
+ <li><a href="#ppdFindChoice" title="Return a pointer to an option choice.">ppdFindChoice</a></li>
+ <li><a href="#ppdFindCustomOption" title="Find a custom option.">ppdFindCustomOption</a></li>
+ <li><a href="#ppdFindCustomParam" title="Find a parameter for a custom option.">ppdFindCustomParam</a></li>
+ <li><a href="#ppdFindMarkedChoice" title="Return the marked choice for the specified option.">ppdFindMarkedChoice</a></li>
+ <li><a href="#ppdFindNextAttr" title="Find the next matching attribute.">ppdFindNextAttr</a></li>
+ <li><a href="#ppdFindOption" title="Return a pointer to the specified option.">ppdFindOption</a></li>
+ <li><a href="#ppdFirstCustomParam" title="Return the first parameter for a custom option.">ppdFirstCustomParam</a></li>
+ <li><a href="#ppdFirstOption" title="Return the first option in the PPD file.">ppdFirstOption</a></li>
+ <li><a href="#ppdInstallableConflict" title="Test whether an option choice conflicts with
an installable option.">ppdInstallableConflict</a></li>
-<li><a href="#ppdIsMarked" title="Check to see if an option is marked.">ppdIsMarked</a></li>
-<li><a href="#ppdLastError" title="Return the status from the last ppdOpen*().">ppdLastError</a></li>
-<li><a href="#ppdLocalize" title="Localize the PPD file to the current locale.">ppdLocalize</a></li>
-<li><a href="#ppdLocalizeAttr" title="Localize an attribute.">ppdLocalizeAttr</a></li>
-<li><a href="#ppdLocalizeIPPReason" title="Get the localized version of a cupsIPPReason
+ <li><a href="#ppdIsMarked" title="Check to see if an option is marked.">ppdIsMarked</a></li>
+ <li><a href="#ppdLastError" title="Return the status from the last ppdOpen*().">ppdLastError</a></li>
+ <li><a href="#ppdLocalize" title="Localize the PPD file to the current locale.">ppdLocalize</a></li>
+ <li><a href="#ppdLocalizeAttr" title="Localize an attribute.">ppdLocalizeAttr</a></li>
+ <li><a href="#ppdLocalizeIPPReason" title="Get the localized version of a cupsIPPReason
attribute.">ppdLocalizeIPPReason</a></li>
-<li><a href="#ppdLocalizeMarkerName" title="Get the localized version of a marker-names
+ <li><a href="#ppdLocalizeMarkerName" title="Get the localized version of a marker-names
attribute value.">ppdLocalizeMarkerName</a></li>
-<li><a href="#ppdMarkDefaults" title="Mark all default options in the PPD file.">ppdMarkDefaults</a></li>
-<li><a href="#ppdMarkOption" title="Mark an option in a PPD file and return the number of
+ <li><a href="#ppdMarkDefaults" title="Mark all default options in the PPD file.">ppdMarkDefaults</a></li>
+ <li><a href="#ppdMarkOption" title="Mark an option in a PPD file and return the number of
conflicts.">ppdMarkOption</a></li>
-<li><a href="#ppdNextCustomParam" title="Return the next parameter for a custom option.">ppdNextCustomParam</a></li>
-<li><a href="#ppdNextOption" title="Return the next option in the PPD file.">ppdNextOption</a></li>
-<li><a href="#ppdOpen" title="Read a PPD file into memory.">ppdOpen</a></li>
-<li><a href="#ppdOpen2" title="Read a PPD file into memory.">ppdOpen2</a></li>
-<li><a href="#ppdOpenFd" title="Read a PPD file into memory.">ppdOpenFd</a></li>
-<li><a href="#ppdOpenFile" title="Read a PPD file into memory.">ppdOpenFile</a></li>
-<li><a href="#ppdPageLength" title="Get the page length for the given size.">ppdPageLength</a></li>
-<li><a href="#ppdPageSize" title="Get the page size record for the given size.">ppdPageSize</a></li>
-<li><a href="#ppdPageSizeLimits" title="Return the custom page size limits.">ppdPageSizeLimits</a></li>
-<li><a href="#ppdPageWidth" title="Get the page width for the given size.">ppdPageWidth</a></li>
-<li><a href="#ppdSetConformance" title="Set the conformance level for PPD files.">ppdSetConformance</a></li>
+ <li><a href="#ppdNextCustomParam" title="Return the next parameter for a custom option.">ppdNextCustomParam</a></li>
+ <li><a href="#ppdNextOption" title="Return the next option in the PPD file.">ppdNextOption</a></li>
+ <li><a href="#ppdOpen" title="Read a PPD file into memory.">ppdOpen</a></li>
+ <li><a href="#ppdOpen2" title="Read a PPD file into memory.">ppdOpen2</a></li>
+ <li><a href="#ppdOpenFd" title="Read a PPD file into memory.">ppdOpenFd</a></li>
+ <li><a href="#ppdOpenFile" title="Read a PPD file into memory.">ppdOpenFile</a></li>
+ <li><a href="#ppdPageLength" title="Get the page length for the given size.">ppdPageLength</a></li>
+ <li><a href="#ppdPageSize" title="Get the page size record for the given size.">ppdPageSize</a></li>
+ <li><a href="#ppdPageSizeLimits" title="Return the custom page size limits.">ppdPageSizeLimits</a></li>
+ <li><a href="#ppdPageWidth" title="Get the page width for the given size.">ppdPageWidth</a></li>
+ <li><a href="#ppdSetConformance" title="Set the conformance level for PPD files.">ppdSetConformance</a></li>
</ul></li>
<li><a href="#TYPES">Data Types</a><ul class="code">
<li><a href="#ppd_attr_t" title="PPD Attribute Structure ">ppd_attr_t</a></li>
@@ -483,6 +483,7 @@ conflicts.">ppdMarkOption</a></li>
<li><a href="#ppd_status_e" title="Status Codes ">ppd_status_e</a></li>
<li><a href="#ppd_ui_e" title="UI Types">ppd_ui_e</a></li>
</ul></li>
+</ul>
<!--
"$Id$"
@@ -2176,6 +2177,8 @@ typedef enum <a href="#ppd_ui_e">ppd_ui_e</a> ppd_ui_t;
<dd class="description">Line longer than 255 chars</dd>
<dt>PPD_MISSING_ASTERISK </dt>
<dd class="description">Missing asterisk in column 0</dd>
+<dt>PPD_MISSING_CLOSE_GROUP </dt>
+<dd class="description">Missing CloseGroup</dd>
<dt>PPD_MISSING_OPTION_KEYWORD </dt>
<dd class="description">Missing option keyword</dd>
<dt>PPD_MISSING_PPDADOBE4 </dt>
diff --git a/doc/help/api-ppdc.html b/doc/help/api-ppdc.html
index e02f71d05..458778139 100644
--- a/doc/help/api-ppdc.html
+++ b/doc/help/api-ppdc.html
@@ -2,9 +2,10 @@
<html>
<!-- SECTION: Programming -->
<head>
-<title>PPD Compiler API</title>
-<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+ <title>PPD Compiler API </title>
+ <meta name="keywords" content="Programming">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -375,28 +376,27 @@ div.contents ul.subcontents li {
</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
-<ul class="subcontents">
<li><a href="#OVERVIEW">Overview</a></li>
<li><a href="#CLASSES">Classes</a><ul class="code">
-<li><a href="#ppdcArray" title="// Shared Array">ppdcArray</a></li>
-<li><a href="#ppdcAttr" title="// Attribute">ppdcAttr</a></li>
-<li><a href="#ppdcCatalog" title="// Translation catalog">ppdcCatalog</a></li>
-<li><a href="#ppdcChoice" title="// Option Choice">ppdcChoice</a></li>
-<li><a href="#ppdcConstraint" title="// Constraint">ppdcConstraint</a></li>
-<li><a href="#ppdcDriver" title="// Printer Driver Data">ppdcDriver</a></li>
-<li><a href="#ppdcFile" title="// File">ppdcFile</a></li>
-<li><a href="#ppdcFilter" title="// Filter Program">ppdcFilter</a></li>
-<li><a href="#ppdcFont" title="// Shared Font">ppdcFont</a></li>
-<li><a href="#ppdcGroup" title="// Group of Options">ppdcGroup</a></li>
-<li><a href="#ppdcInteger" title="// Shared integer">ppdcInteger</a></li>
-<li><a href="#ppdcMediaSize" title="// Media Size">ppdcMediaSize</a></li>
-<li><a href="#ppdcMessage" title="// Translation message">ppdcMessage</a></li>
-<li><a href="#ppdcOption" title="// Option">ppdcOption</a></li>
-<li><a href="#ppdcProfile" title="// Color Profile">ppdcProfile</a></li>
-<li><a href="#ppdcShared" title="// Shared Data Value">ppdcShared</a></li>
-<li><a href="#ppdcSource" title="// Source File">ppdcSource</a></li>
-<li><a href="#ppdcString" title="// Shared String">ppdcString</a></li>
-<li><a href="#ppdcVariable" title="// Variable Definition">ppdcVariable</a></li>
+ <li><a href="#ppdcArray" title="// Shared Array">ppdcArray</a></li>
+ <li><a href="#ppdcAttr" title="// Attribute">ppdcAttr</a></li>
+ <li><a href="#ppdcCatalog" title="// Translation catalog">ppdcCatalog</a></li>
+ <li><a href="#ppdcChoice" title="// Option Choice">ppdcChoice</a></li>
+ <li><a href="#ppdcConstraint" title="// Constraint">ppdcConstraint</a></li>
+ <li><a href="#ppdcDriver" title="// Printer Driver Data">ppdcDriver</a></li>
+ <li><a href="#ppdcFile" title="// File">ppdcFile</a></li>
+ <li><a href="#ppdcFilter" title="// Filter Program">ppdcFilter</a></li>
+ <li><a href="#ppdcFont" title="// Shared Font">ppdcFont</a></li>
+ <li><a href="#ppdcGroup" title="// Group of Options">ppdcGroup</a></li>
+ <li><a href="#ppdcInteger" title="// Shared integer">ppdcInteger</a></li>
+ <li><a href="#ppdcMediaSize" title="// Media Size">ppdcMediaSize</a></li>
+ <li><a href="#ppdcMessage" title="// Translation message">ppdcMessage</a></li>
+ <li><a href="#ppdcOption" title="// Option">ppdcOption</a></li>
+ <li><a href="#ppdcProfile" title="// Color Profile">ppdcProfile</a></li>
+ <li><a href="#ppdcShared" title="// Shared Data Value">ppdcShared</a></li>
+ <li><a href="#ppdcSource" title="// Source File">ppdcSource</a></li>
+ <li><a href="#ppdcString" title="// Shared String">ppdcString</a></li>
+ <li><a href="#ppdcVariable" title="// Variable Definition">ppdcVariable</a></li>
</ul></li>
<li><a href="#TYPES">Data Types</a><ul class="code">
<li><a href="#ppdc_cs_t" title="">ppdc_cs_t</a></li>
@@ -412,6 +412,7 @@ div.contents ul.subcontents li {
<li><a href="#ppdcOptSection" title="// Option section">ppdcOptSection</a></li>
<li><a href="#ppdcOptType" title="// Option type">ppdcOptType</a></li>
</ul></li>
+</ul>
<!--
"$Id$"
diff --git a/doc/help/api-raster.html b/doc/help/api-raster.html
index ce43c7a6c..5e8eff47e 100644
--- a/doc/help/api-raster.html
+++ b/doc/help/api-raster.html
@@ -2,9 +2,10 @@
<html>
<!-- SECTION: Programming -->
<head>
-<title>Raster API</title>
-<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.7">
+ <title>Raster API </title>
+ <meta name="keywords" content="Programming">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -378,27 +379,26 @@ div.contents ul.subcontents li {
</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
-<ul class="subcontents">
<li><a href="#OVERVIEW">Overview</a></li>
<li><a href="#TASKS">Functions by Task</a><ul class="subcontents">
-<li><a href="#OPENCLOSE">Opening and Closing Raster Streams</a></li>
-<li><a href="#READING">Reading Raster Streams</a></li>
-<li><a href="#WRITING">Writing Raster Streams</a></li>
+ <li><a href="#OPENCLOSE">Opening and Closing Raster Streams</a></li>
+ <li><a href="#READING">Reading Raster Streams</a></li>
+ <li><a href="#WRITING">Writing Raster Streams</a></li>
</ul></li>
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
-<li><a href="#cupsRasterClose" title="Close a raster stream.">cupsRasterClose</a></li>
-<li><a href="#cupsRasterInterpretPPD" title="Interpret PPD commands to create a page header.">cupsRasterInterpretPPD</a></li>
-<li><a href="#cupsRasterOpen" title="Open a raster stream.">cupsRasterOpen</a></li>
-<li><a href="#cupsRasterReadHeader" title="Read a raster page header and store it in a
+ <li><a href="#cupsRasterClose" title="Close a raster stream.">cupsRasterClose</a></li>
+ <li><a href="#cupsRasterInterpretPPD" title="Interpret PPD commands to create a page header.">cupsRasterInterpretPPD</a></li>
+ <li><a href="#cupsRasterOpen" title="Open a raster stream.">cupsRasterOpen</a></li>
+ <li><a href="#cupsRasterReadHeader" title="Read a raster page header and store it in a
version 1 page header structure.">cupsRasterReadHeader</a></li>
-<li><a href="#cupsRasterReadHeader2" title="Read a raster page header and store it in a
+ <li><a href="#cupsRasterReadHeader2" title="Read a raster page header and store it in a
version 2 page header structure.">cupsRasterReadHeader2</a></li>
-<li><a href="#cupsRasterReadPixels" title="Read raster pixels.">cupsRasterReadPixels</a></li>
-<li><a href="#cupsRasterWriteHeader" title="Write a raster page header from a version 1 page
+ <li><a href="#cupsRasterReadPixels" title="Read raster pixels.">cupsRasterReadPixels</a></li>
+ <li><a href="#cupsRasterWriteHeader" title="Write a raster page header from a version 1 page
header structure.">cupsRasterWriteHeader</a></li>
-<li><a href="#cupsRasterWriteHeader2" title="Write a raster page header from a version 2
+ <li><a href="#cupsRasterWriteHeader2" title="Write a raster page header from a version 2
page header structure.">cupsRasterWriteHeader2</a></li>
-<li><a href="#cupsRasterWritePixels" title="Write raster pixels.">cupsRasterWritePixels</a></li>
+ <li><a href="#cupsRasterWritePixels" title="Write raster pixels.">cupsRasterWritePixels</a></li>
</ul></li>
<li><a href="#TYPES">Data Types</a><ul class="code">
<li><a href="#cups_adv_t" title="AdvanceMedia attribute values">cups_adv_t</a></li>
@@ -430,6 +430,7 @@ page header structure.">cupsRasterWriteHeader2</a></li>
<li><a href="#cups_order_e" title="cupsColorOrder attribute values">cups_order_e</a></li>
<li><a href="#cups_orient_e" title="Orientation attribute values">cups_orient_e</a></li>
</ul></li>
+</ul>
<!--
"$Id$"
diff --git a/doc/help/postscript-driver.html b/doc/help/postscript-driver.html
index 78056c9c4..bef1a18af 100644
--- a/doc/help/postscript-driver.html
+++ b/doc/help/postscript-driver.html
@@ -2,9 +2,10 @@
<html>
<!-- SECTION: Programming -->
<head>
-<title>Developing PostScript Printer Drivers</title>
-<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.7">
+ <title>Developing PostScript Printer Drivers </title>
+ <meta name="keywords" content="Programming">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -373,14 +374,14 @@ div.contents ul.subcontents li {
</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
-<ul class="subcontents">
<li><a href="#BASICS">Printer Driver Basics</a></li>
<li><a href="#CREATING">Creating New PPD Files</a><ul class="subcontents">
-<li><a href="#IMPORT">Importing Existing PPD Files</a></li>
+ <li><a href="#IMPORT">Importing Existing PPD Files</a></li>
</ul></li>
<li><a href="#FILTERS">Using Custom Filters</a></li>
<li><a href="#COLOR">Implementing Color Management</a></li>
<li><a href="#MACOSX">Adding Mac OS X Features</a></li>
+</ul>
<h2 class='title'><a name='BASICS'>Printer Driver Basics</a></h2>
<p>A CUPS PostScript printer driver consists of a PostScript Printer Description (PPD) file that describes the features and capabilities of the device, zero or more <em>filter</em> programs that prepare print data for the device, and zero or more support files for color management, online help, and so forth. The PPD file includes references to all of the filters and support files used by the driver.</p>
diff --git a/doc/help/ppd-compiler.html b/doc/help/ppd-compiler.html
index c4a14f029..67fdfbc0e 100644
--- a/doc/help/ppd-compiler.html
+++ b/doc/help/ppd-compiler.html
@@ -2,9 +2,10 @@
<html>
<!-- SECTION: Programming -->
<head>
-<title>Introduction to the PPD Compiler</title>
-<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.7">
+ <title>Introduction to the PPD Compiler </title>
+ <meta name="keywords" content="Programming">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -375,21 +376,21 @@ that describe the features and capabilities of one or more printers.</P>
</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
-<ul class="subcontents">
<li><a href="#BASICS">The Basics</a></li>
<li><a href="#DRV">Driver Information Files</a><ul class="subcontents">
-<li><a href="#SIMPLE">A Simple Example</a></li>
-<li><a href="#GROUPING">Grouping and Inheritance</a></li>
-<li><a href="#COLOR">Color Support</a></li>
-<li><a href="#OPTIONS">Defining Custom Options and Option Groups</a></li>
-<li><a href="#DEFINE">Defining Constants</a></li>
-<li><a href="#CONDITIONAL">Conditional Statements</a></li>
-<li><a href="#CONSTRAINTS">Defining Constraints</a></li>
+ <li><a href="#SIMPLE">A Simple Example</a></li>
+ <li><a href="#GROUPING">Grouping and Inheritance</a></li>
+ <li><a href="#COLOR">Color Support</a></li>
+ <li><a href="#OPTIONS">Defining Custom Options and Option Groups</a></li>
+ <li><a href="#DEFINE">Defining Constants</a></li>
+ <li><a href="#CONDITIONAL">Conditional Statements</a></li>
+ <li><a href="#CONSTRAINTS">Defining Constraints</a></li>
</ul></li>
<li><a href="#LOCALIZATION">Localization</a><ul class="subcontents">
-<li><a href="#PPDPO">The ppdpo Utility</a></li>
-<li><a href="#PPDC_CATALOG">Using Message Catalogs with the PPD Compiler</a></li>
+ <li><a href="#PPDPO">The ppdpo Utility</a></li>
+ <li><a href="#PPDC_CATALOG">Using Message Catalogs with the PPD Compiler</a></li>
</ul></li>
+</ul>
<h2 class='title'><a name='BASICS'>The Basics</a></h2>
<P>The PPD compiler, <a href='man-ppdc.html'><code>ppdc(1)</code></a>, is a
diff --git a/doc/help/raster-driver.html b/doc/help/raster-driver.html
index a7e7a62c5..5264c1453 100644
--- a/doc/help/raster-driver.html
+++ b/doc/help/raster-driver.html
@@ -2,9 +2,10 @@
<html>
<!-- SECTION: Programming -->
<head>
-<title>Developing Raster Printer Drivers</title>
-<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.7">
+ <title>Developing Raster Printer Drivers </title>
+ <meta name="keywords" content="Programming">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -373,12 +374,12 @@ div.contents ul.subcontents li {
</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
-<ul class="subcontents">
<li><a href="#BASICS">Printer Driver Basics</a></li>
<li><a href="#CREATING">Creating New PPD Files</a></li>
<li><a href="#FILTERS">Using Filters</a></li>
<li><a href="#COLOR">Implementing Color Management</a></li>
<li><a href="#MACOSX">Adding Mac OS X Features</a></li>
+</ul>
<h2 class='title'><a name='BASICS'>Printer Driver Basics</a></h2>
<p>A CUPS raster printer driver consists of a PostScript Printer Description (PPD) file that describes the features and capabilities of the device, one or more <em>filter</em> programs that prepare print data for the device, and zero or more support files for color management, online help, and so forth. The PPD file includes references to all of the filters and support files used by the driver.</p>
diff --git a/doc/help/ref-cupsd-conf.html.in b/doc/help/ref-cupsd-conf.html.in
index 9114c489c..3b931bcc3 100644
--- a/doc/help/ref-cupsd-conf.html.in
+++ b/doc/help/ref-cupsd-conf.html.in
@@ -715,11 +715,12 @@ can also be used to relay printer information from polled servers
with the line:</P>
<PRE CLASS="command">
-BrowseRelay 127.0.0.1 @LOCAL
+BrowseRelay 127.0.0.1 192.0.2.255
</PRE>
<P>This effectively provides access to printers on a WAN for all
-clients on the LAN(s).</P>
+clients on the LAN. Use multiple <CODE>BrowseRelay</CODE> lines to
+relay information to multiple subnets.</P>
<H2 CLASS="title"><A NAME="BrowseRemoteOptions">BrowseRemoteOptions</A></H2>
@@ -1009,6 +1010,7 @@ size.</P>
<PRE CLASS="command">
DefaultPolicy default
+DefaultPolicy authenticated
DefaultPolicy foo
</PRE>
@@ -1016,7 +1018,9 @@ DefaultPolicy foo
<P>The <CODE>DefaultPolicy</CODE> directive specifies the default
policy to use for IPP operation. The default is
-<CODE>default</CODE>.</P>
+<CODE>default</CODE>. CUPS also includes a policy called
+<CODE>authenticated</CODE> that requires a username and password for printing
+and other job operations.</P>
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="DefaultShared">DefaultShared</A></H2>
@@ -1065,7 +1069,7 @@ printers are shared (published) by default. The default is
<P>The <CODE>Deny</CODE> directive specifies a hostname, IP
address, or network that is denied access to the server.
<CODE>Deny</CODE> directives are cummulative, so multiple
-<CODE>Deny</CODE> directives can be used to allow access for
+<CODE>Deny</CODE> directives can be used to deny access for
multiple hosts or networks.</P>
<P>Host and domain name matching require that you enable the <A
@@ -2372,8 +2376,8 @@ information to the system log instead of a plain file.</P>
<H3>Examples</H3>
<PRE CLASS="command">
-PageLogFormat %p %j %u %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}
-PageLogFormat PAGE %p %j %u %P %C %{job-billing} %{job-originating-host-name}
+PageLogFormat %p %u %j %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}
+PageLogFormat PAGE %p %u %j %P %C %{job-billing} %{job-originating-host-name}
</PRE>
<H3>Description</H3>
@@ -2406,7 +2410,7 @@ recognized:</P>
</UL>
-<P>The default is "%p %j %u %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}".</P>
+<P>The default is "%p %u %j %T %P %C %{job-billing} %{job-originating-host-name} %{job-name} %{media} %{sides}".</P>
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.2/Mac OS X 10.5</SPAN><A NAME="PassEnv">PassEnv</A></H2>
diff --git a/doc/help/spec-ppd.html b/doc/help/spec-ppd.html
index e7da98a8a..02645d316 100644
--- a/doc/help/spec-ppd.html
+++ b/doc/help/spec-ppd.html
@@ -2,9 +2,10 @@
<html>
<!-- SECTION: Specifications -->
<head>
-<title>CUPS PPD Extensions</title>
-<meta name="keywords" content="Specifications">
-<meta name="creator" content="Mini-XML v2.7">
+ <title>CUPS PPD Extensions </title>
+ <meta name="keywords" content="Specifications">
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -373,66 +374,66 @@ div.contents ul.subcontents li {
</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
-<ul class="subcontents">
<li><a href="#SYNTAX">PPD File Syntax</a></li>
<li><a href="#AUTOCONFIG">Auto-Configuration</a><ul class="subcontents">
-<li><a href="#APAutoSetupTool">APAutoSetupTool</a></li>
-<li><a href="#QUERYKEYWORD">?MainKeyword</a></li>
-<li><a href="#OID">OIDMainKeyword</a></li>
+ <li><a href="#APAutoSetupTool">APAutoSetupTool</a></li>
+ <li><a href="#QUERYKEYWORD">?MainKeyword</a></li>
+ <li><a href="#OID">OIDMainKeyword</a></li>
</ul></li>
<li><a href="#PROFILES">Color Profiles</a><ul class="subcontents">
-<li><a href="#cupsColorProfile">cupsColorProfile</a></li>
-<li><a href="#cupsICCProfile">cupsICCProfile</a></li>
-<li><a href="#APCustom">Custom Color Matching Support</a></li>
+ <li><a href="#cupsColorProfile">cupsColorProfile</a></li>
+ <li><a href="#cupsICCProfile">cupsICCProfile</a></li>
+ <li><a href="#APCustom">Custom Color Matching Support</a></li>
</ul></li>
<li><a href="#CONSTRAINTS">Constraints</a><ul class="subcontents">
-<li><a href="#cupsUIConstraints">cupsUIConstraints</a></li>
-<li><a href="#cupsUIResolver">cupsUIResolver</a></li>
+ <li><a href="#cupsUIConstraints">cupsUIConstraints</a></li>
+ <li><a href="#cupsUIResolver">cupsUIResolver</a></li>
</ul></li>
<li><a href="#I18N">Globalized PPD Support</a></li>
<li><a href="#OPTIONS">CUPS 1.3/Mac OS X 10.6Custom Options</a></li>
<li><a href="#RASTERPS">Writing PostScript Option Commands for Raster Drivers</a></li>
<li><a href="#MEDIA">Media Keywords</a><ul class="subcontents">
-<li><a href="#cupsMediaQualifier2">cupsMediaQualifier2</a></li>
-<li><a href="#cupsMediaQualifier3">cupsMediaQualifier3</a></li>
-<li><a href="#cupsMinSize">cupsMinSize</a></li>
-<li><a href="#cupsMaxSize">cupsMaxSize</a></li>
+ <li><a href="#cupsMediaQualifier2">cupsMediaQualifier2</a></li>
+ <li><a href="#cupsMediaQualifier3">cupsMediaQualifier3</a></li>
+ <li><a href="#cupsMinSize">cupsMinSize</a></li>
+ <li><a href="#cupsMaxSize">cupsMaxSize</a></li>
</ul></li>
<li><a href="#ATTRIBUTES">General Attributes</a><ul class="subcontents">
-<li><a href="#cupsBackSide">cupsBackSide</a></li>
-<li><a href="#cupsCommands">cupsCommands</a></li>
-<li><a href="#cupsEvenDuplex">cupsEvenDuplex</a></li>
-<li><a href="#cupsFax">cupsFax</a></li>
-<li><a href="#cupsFilter">cupsFilter</a></li>
-<li><a href="#cupsFlipDuplex">cupsFlipDuplex</a></li>
-<li><a href="#cupsIPPFinishings">cupsIPPFinishings</a></li>
-<li><a href="#cupsIPPReason">cupsIPPReason</a></li>
-<li><a href="#cupsLanguages">cupsLanguages</a></li>
-<li><a href="#cupsManualCopies">cupsManualCopies</a></li>
-<li><a href="#cupsMarkerName">cupsMarkerName</a></li>
-<li><a href="#cupsMarkerNotice">cupsMarkerNotice</a></li>
-<li><a href="#cupsModelNumber">cupsModelNumber</a></li>
-<li><a href="#cupsPJLCharset">cupsPJLCharset</a></li>
-<li><a href="#cupsPJLDisplay">cupsPJLDisplay</a></li>
-<li><a href="#cupsPortMonitor">cupsPortMonitor</a></li>
-<li><a href="#cupsPreFilter">cupsPreFilter</a></li>
-<li><a href="#cupsPrintQuality">cupsPrintQuality</a></li>
-<li><a href="#cupsSNMPSupplies">cupsSNMPSupplies</a></li>
-<li><a href="#cupsVersion">cupsVersion</a></li>
+ <li><a href="#cupsBackSide">cupsBackSide</a></li>
+ <li><a href="#cupsCommands">cupsCommands</a></li>
+ <li><a href="#cupsEvenDuplex">cupsEvenDuplex</a></li>
+ <li><a href="#cupsFax">cupsFax</a></li>
+ <li><a href="#cupsFilter">cupsFilter</a></li>
+ <li><a href="#cupsFlipDuplex">cupsFlipDuplex</a></li>
+ <li><a href="#cupsIPPFinishings">cupsIPPFinishings</a></li>
+ <li><a href="#cupsIPPReason">cupsIPPReason</a></li>
+ <li><a href="#cupsLanguages">cupsLanguages</a></li>
+ <li><a href="#cupsManualCopies">cupsManualCopies</a></li>
+ <li><a href="#cupsMarkerName">cupsMarkerName</a></li>
+ <li><a href="#cupsMarkerNotice">cupsMarkerNotice</a></li>
+ <li><a href="#cupsModelNumber">cupsModelNumber</a></li>
+ <li><a href="#cupsPJLCharset">cupsPJLCharset</a></li>
+ <li><a href="#cupsPJLDisplay">cupsPJLDisplay</a></li>
+ <li><a href="#cupsPortMonitor">cupsPortMonitor</a></li>
+ <li><a href="#cupsPreFilter">cupsPreFilter</a></li>
+ <li><a href="#cupsPrintQuality">cupsPrintQuality</a></li>
+ <li><a href="#cupsSNMPSupplies">cupsSNMPSupplies</a></li>
+ <li><a href="#cupsVersion">cupsVersion</a></li>
</ul></li>
<li><a href="#MACOSX">Mac OS X Attributes</a><ul class="subcontents">
-<li><a href="#APDialogExtension">APDialogExtension</a></li>
-<li><a href="#APDuplexRequiresFlippedMargin">APDuplexRequiresFlippedMargin</a></li>
-<li><a href="#APHelpBook">APHelpBook</a></li>
-<li><a href="#APICADriver">APICADriver</a></li>
-<li><a href="#APPrinterIconPath">APPrinterIconPath</a></li>
-<li><a href="#APPrinterLowInkTool">APPrinterLowInkTool</a></li>
-<li><a href="#APPrinterPreset">APPrinterPreset</a></li>
-<li><a href="#APPrinterUtilityPath">APPrinterUtilityPath</a></li>
-<li><a href="#APScannerOnly">APScannerOnly</a></li>
-<li><a href="#APScanAppBundleID">APScanAppBundleID</a></li>
+ <li><a href="#APDialogExtension">APDialogExtension</a></li>
+ <li><a href="#APDuplexRequiresFlippedMargin">APDuplexRequiresFlippedMargin</a></li>
+ <li><a href="#APHelpBook">APHelpBook</a></li>
+ <li><a href="#APICADriver">APICADriver</a></li>
+ <li><a href="#APPrinterIconPath">APPrinterIconPath</a></li>
+ <li><a href="#APPrinterLowInkTool">APPrinterLowInkTool</a></li>
+ <li><a href="#APPrinterPreset">APPrinterPreset</a></li>
+ <li><a href="#APPrinterUtilityPath">APPrinterUtilityPath</a></li>
+ <li><a href="#APScannerOnly">APScannerOnly</a></li>
+ <li><a href="#APScanAppBundleID">APScanAppBundleID</a></li>
</ul></li>
<li><a href="#HISTORY">Change History</a></li>
+</ul>
<h2 class='title'><a name='SYNTAX'>PPD File Syntax</a></h2>
<p>The PPD format is text-based and uses lines of up to 255 characters terminated by a carriage return, linefeed, or combination of carriage return and line feed. The following ABNF definition [<a href="http://tools.ietf.org/html/rfc5234" target="_blank">RFC5234</a>] defines the general format of lines in a PPD file:</p>
diff --git a/doc/help/spec-raster.html b/doc/help/spec-raster.html
index de5b7b50e..7d285e80f 100644
--- a/doc/help/spec-raster.html
+++ b/doc/help/spec-raster.html
@@ -9,37 +9,35 @@
<H1 CLASS="title">CUPS Raster Format</H1>
-<P>CUPS raster files are device-dependent raster image files that
-contain a PostScript page device dictionary and device-dependent
-raster imagery for each page in the document. These files are
-used to transfer raster data from the PostScript and image file
-RIPs to device-dependent filters that convert the raster data to
-a printable format.</P>
+<P>CUPS Raster files are device-dependent raster image files that contain a PostScript page device dictionary and device-dependent raster imagery for each page in the document. These files are used to transfer raster data from the PostScript and image file RIPs to device-dependent filters that convert the raster data to a printable format.</P>
-<P>CUPS 1.0 and 1.1 used a version 1 raster format. CUPS 1.2
-introduced version 2 (compressed) and version 3 (uncompressed)
-formats that are a superset of the version 1 format. Applications
-using the CUPS Imaging API (the cupsRaster* functions) can read
-all formats without code changes.</P>
+<P>CUPS 1.0 and 1.1 used version 1 of the raster format. CUPS 1.2 and later use version 2 (compressed) and version 3 (uncompressed) that are a superset of the version 1 raster format. All three versions of CUPS Raster are streamable formats, and applications using the CUPS Imaging API (the cupsRaster* functions) can read all formats without code changes.</P>
-<P>The registered MIME media type for CUPS raster files is
-<CODE>application/vnd.cups-raster</CODE>.</P>
+<P>The registered MIME media type for CUPS Raster files is <CODE>application/vnd.cups-raster</CODE>.</P>
+
+
+<H2 CLASS="title"><A NAME="ORGANIZATION">Organization of a CUPS Raster File</A></H2>
+
+<P><A HREF="FILEFORMAT">Figure 1, "Raster Organization"</A>, shows the general organization of all CUPS Raster files. Each file begins with a 32-bit synchronization word followed by zero or more pages. Each page consists of a header (the PostScript page device dictionary and raster-specific values) followed by the bitmap image for the page.</P>
+
+<DIV CLASS="figure"><TABLE SUMMARY="Raster Organization">
+<CAPTION><A NAME="FILEFORMAT">Figure 1: Raster Organization</A></CAPTION>
+<TR><TD><IMG SRC="../images/raster-organization.png" WIDTH="446" HEIGHT="1056" ALT="Raster Organization"></TD></TR>
+</TABLE></DIV>
+
+<P>Each page bitmap is stored as described by the <CODE>cupsBitsPerColor</CODE>, <CODE>cupsBytesPerLine</CODE>, <CODE>cupsColorOrder</CODE>, <CODE>cupsColorSpace</CODE>, <CODE>cupsHeight</CODE>, and <CODE>cupsWidth</CODE> values in the page header. Pixels for the front side of a sheet are always stored left-to-right, top-to-bottom. When doing duplex printing, pixels for the back side of a sheet may be stored differently depending on the value of the <CODE>cupsBackSide</CODE> keyword ("Normal", "ManualTumble", "Rotated", or "Flipped") in the PPD file and the <CODE>Tumble</CODE> value ("true" or "false") in the page header. <A HREF="#PAGEBITMAPS">Figure 2, "Page Bitmaps"</A>, shows the pixel order for each combination.</P>
+
+<DIV CLASS="figure"><TABLE SUMMARY="Page Bitmaps">
+<CAPTION><A NAME="PAGEBITMAPS">Figure 2: Page Bitmaps</A></CAPTION>
+<TR><TD><IMG SRC="../images/raster.png" WIDTH="624" HEIGHT="448" ALT="Page Bitmaps"></TD></TR>
+</TABLE></DIV>
<H2 CLASS="title"><A NAME="V1">Version 1 Raster File Format</A></H2>
-<P>A version 1 raster file begins with a 32-bit synchronization
-word: 0x52615374 ("RaSt") for big-endian architectures and
-0x74536152 ("tSaR") for little-endian architectures. The writer
-of the raster file will use the native word order, and the reader
-is responsible for detecting a reversed word order file and
-swapping bytes as needed. The CUPS Imaging API raster functions
-perform this function automatically.</P>
+<P>A version 1 raster file begins with a 32-bit synchronization word: 0x52615374 ("RaSt") for big-endian architectures or 0x74536152 ("tSaR") for little-endian architectures. The writer of the raster file will use the native word order, and the reader is responsible for detecting a reversed word order file and swapping bytes as needed. The CUPS Imaging API raster functions perform this function automatically.</P>
-<P>Following the synchronization word are a series of raster
-pages. Each page starts with a page device dictionary header and
-is followed immediately by the (uncompressed, raw) raster data
-for that page.</P>
+<P>Following the synchronization word are a series of raster pages. Each page starts with a page device dictionary header and is followed immediately by the (uncompressed/raw) raster data for that page.</P>
<DIV CLASS="table"><TABLE SUMMARY="CUPS Version 1 Raster Page Device Dictionary">
<CAPTION><A NAME="TABLE1">Table 1: CUPS Version 1 Raster Page Device Dictionary</A></CAPTION>
@@ -177,7 +175,7 @@ for that page.</P>
<TD>328-331</TD>
<TD>Unsigned Integer</TD>
<TD>MediaWeight</TD>
- <TD>Media weight in grams per meter squared</TD>
+ <TD>Media weight in grams per meter squared, 0 = printer default</TD>
</TR>
<TR>
<TD>332-335</TD>
@@ -197,7 +195,7 @@ for that page.</P>
<TD>340-343</TD>
<TD>Unsigned Integer</TD>
<TD>NumCopies</TD>
- <TD>1 to 2<SUP>32</SUP> - 1</TD>
+ <TD>0 to 2<SUP>32</SUP> - 1, 0 = printer default</TD>
</TR>
<TR>
<TD>344-347</TD>
@@ -292,9 +290,9 @@ for that page.</P>
<TD>400-403</TD>
<TD>Unsigned Integer</TD>
<TD>cupsColorSpace</TD>
- <TD>0 = white (sRGB)<BR>
- 1 = RGB (sRGB)<BR>
- 2 = RGBA (sRGB)<BR>
+ <TD>0 = gray (device, typically sRGB-based)<BR>
+ 1 = RGB (device, typically sRGB)<BR>
+ 2 = RGBA (device, typically sRGB)<BR>
3 = black<BR>
4 = CMY<BR>
5 = YMC<BR>
@@ -310,6 +308,9 @@ for that page.</P>
15 = CIE XYZ<BR>
16 = CIE Lab<BR>
17 = RGBW (sRGB)<BR>
+ 18 = sGray (gray using sRGB gamma/white point)<BR>
+ 19 = sRGB<BR>
+ 20 = AdobeRGB<BR>
32 = ICC1 (CIE Lab with hint for 1 color)<BR>
33 = ICC2 (CIE Lab with hint for 2 colors)<BR>
34 = ICC3 (CIE Lab with hint for 3 colors)<BR>
@@ -325,6 +326,21 @@ for that page.</P>
44 = ICCD (CIE Lab with hint for 13 colors)<BR>
45 = ICCE (CIE Lab with hint for 14 colors)<BR>
46 = ICCF (CIE Lab with hint for 15 colors)<BR>
+ 48 = Device1 (DeviceN for 1 color)<BR>
+ 48 = Device2 (DeviceN for 2 colors)<BR>
+ 48 = Device3 (DeviceN for 3 colors)<BR>
+ 48 = Device4 (DeviceN for 4 colors)<BR>
+ 48 = Device5 (DeviceN for 5 colors)<BR>
+ 48 = Device6 (DeviceN for 6 colors)<BR>
+ 48 = Device7 (DeviceN for 7 colors)<BR>
+ 48 = Device8 (DeviceN for 8 colors)<BR>
+ 48 = Device9 (DeviceN for 9 colors)<BR>
+ 48 = DeviceA (DeviceN for 10 colors)<BR>
+ 48 = DeviceB (DeviceN for 11 colors)<BR>
+ 48 = DeviceC (DeviceN for 12 colors)<BR>
+ 48 = DeviceD (DeviceN for 13 colors)<BR>
+ 48 = DeviceE (DeviceN for 14 colors)<BR>
+ 48 = DeviceF (DeviceN for 15 colors)
</TD>
</TR>
<TR>
@@ -357,18 +373,9 @@ for that page.</P>
<H2 CLASS="title"><A NAME="V2">Version 2 Raster File Format</A></H2>
-<P>A version 2 raster file begins with a 32-bit synchronization
-word: 0x52615332 ("RaS2") for big-endian architectures and
-0x32536152 ("2SaR") for little-endian architectures. The writer
-of the raster file will use the native word order, and the reader
-is responsible for detecting a reversed word order file and
-swapping bytes as needed. The CUPS Imaging API raster functions
-perform this function automatically.</P>
+<P>A version 2 raster file begins with a 32-bit synchronization word: 0x52615332 ("RaS2") for big-endian architectures or 0x32536152 ("2SaR") for little-endian architectures. The writer of the raster file will use the native word order, and the reader is responsible for detecting a reversed word order file and swapping bytes as needed. The CUPS Imaging API raster functions perform this function automatically.</P>
-<P>Following the synchronization word are a series of raster
-pages. Each page starts with a version 2 page device dictionary
-header and is followed immediately by the compressed raster data
-for that page.</P>
+<P>Following the synchronization word are a series of raster pages. Each page starts with a version 2 page device dictionary header and is followed immediately by the compressed raster data for that page.</P>
<DIV CLASS="table"><TABLE SUMMARY="CUPS Version 2 Raster Page Device Dictionary">
<CAPTION><A NAME="TABLE2">Table 2: CUPS Version 2 Raster Page Device Dictionary</A></CAPTION>
@@ -408,9 +415,7 @@ for that page.</P>
<TD>436-451</TD>
<TD>IEEE Single Precision (4)</TD>
<TD>cupsImagingBBox</TD>
- <TD>Four floating point numbers giving the left, bottom,
- right, and top positions of the page bounding box in
- points</TD>
+ <TD>Four floating point numbers giving the left, bottom, right, and top positions of the page bounding box in points</TD>
</TR>
<TR>
<TD>452-515</TD>
@@ -453,10 +458,7 @@ for that page.</P>
<H3><A NAME="COMPRESSION">Compressed Raster Data Format</A></H3>
-<P>The version 2 raster data is compressed using a modified TIFF
-packbits algorithm. Lines are grouped into an integral number of
-color values based upon the <CODE>cupsColorOrder</CODE>
-setting:</P>
+<P>The version 2 raster data is compressed using a PackBits-like algorithm. Lines are grouped into an integral number of color values based upon the <CODE>cupsColorOrder</CODE> setting:</P>
<DIV CLASS="table"><TABLE SUMMARY="Color Value Sizes">
<CAPTION><A NAME="TABLE3">Table 3: Color Value Sizes</A></CAPTION>
@@ -478,53 +480,56 @@ setting:</P>
</TR>
</TABLE></DIV>
-<P>Each line of raster data begins with a repetition count from 1
-to 256 that is encoded using a single byte of "count - 1".</P>
+<P>Each line of raster data begins with a repetition count from 1 to 256 that is encoded using a single byte of "count - 1".</P>
+
+<P>After the repetition count, whole color values for that line are run-length encoded using a PackBits-like run-length encoding algorithm: 1 to 128 repeated colors are encoded using an initial byte of "count - 1" followed by the color value byte(s) while 2 to 128 non-repeating colors are encoded using an initial byte of "257 - count" followed by the color value bytes.</P>
+
+<P>For example, the 8x8 24-bit sRGB image shown in <a href="#SAMPLEIMAGE">Figure 3, "Sample Image"</a>, would be encoded as the following 89 octets:</p>
+
+<PRE CLASS="example">
+%x00 %x00.FF.FF.FF %x02.FF.FF.00 %x03.FF.FF.FF
+%x00 %xFE.FF.FF.00.00.00.FF.FF.FF.00 %x02.FF.FF.FF %x00.00.FF.00 %x00.FF.FF.FF
+%x00 %x01.FF.FF.00 %x02.FF.FF.FF %x02.00.FF.00
+%x00 %x02.FF.FF.00 %x02.FF.FF.FF %x00.00.FF.00 %x00.FF.FF.FF
+%x00 %x00.FF.FF.FF %x02.FF.FF.00 %x03.FF.FF.FF
+%x00 %x07.FF.FF.FF
+%x01 %x07.FF.00.00
+</PRE>
+
+<P>The first line (%x00) contains 1 white pixel (%x00.FF.FF.FF), 3 yellow pixels (%x02.FF.FF.00), and 4 white pixels (%x03.FF.FF.FF).</P>
+
+<P>The second line (%x00) contains a sequence of yellow + blue + yellow pixels (%xFE.FF.FF.00.00.00.FF.FF.FF.00), 3 white pixels (%x02.FF.FF.FF), 1 green pixel (%x00.00.FF.00), and 1 white pixel (%x00.FF.FF.FF).</P>
-<P>After the repetition count, whole color values for that line
-are run-length encoded using the TIFF packbits algorithm. 1 to
-128 repeated colors are encoded using an initial byte of "count -
-1" followed by the color value byte(s). 2 to 128 non-repeating
-colors are encoded using an initial byte of "257 - count"
-followed by the color value bytes.</P>
+<P>The third line (%x00) contains 2 yellow pixels (%x01.FF.FF.00), 3 white pixels (%x02.FF.FF.FF), and 3 green pixels (%x02.00.FF.00)</P>
+
+<P>The fourth line (%x00) contains 3 yellow pixels (%x02.FF.FF.00), 3 white pixels (%x02.FF.FF.FF), 1 green pixel (%x00.00.FF.00), and 1 white pixel (%x00.FF.FF.FF).</P>
+
+<P>The fifth line (%x00) contains 1 white pixel (%x00.FF.FF.FF), 3 yellow pixels (%x02.FF.FF.00), and 4 white pixels (%x03.FF.FF.FF).</P>
+
+<P>The sixth line (%x00) contains 8 white pixels (%x07.FF.FF.FF).</P>
+
+<P>The seventh and eighth lines (%x01) contain 8 red pixels (%x07.FF.00.00).</P>
+
+<DIV CLASS="figure"><TABLE SUMMARY="Sample Image">
+<CAPTION><A NAME="SAMPLEIMAGE">Figure 3: Sample Image</A></CAPTION>
+<TR><TD><IMG SRC="../images/sample-image.png" WIDTH="257" HEIGHT="257" ALT="Sample Image"></TD></TR>
+</TABLE></DIV>
<H2 CLASS="title"><A NAME="V3">Version 3 Raster File Format</A></H2>
-<P>A version 3 raster file begins with a 32-bit synchronization
-word: 0x52615333 ("RaS3") for big-endian architectures and
-0x33536152 ("3SaR") for little-endian architectures. The writer
-of the raster file will use the native word order, and the reader
-is responsible for detecting a reversed word order file and
-swapping bytes as needed. The CUPS Imaging API raster functions
-perform this function automatically.</P>
+<P>A version 3 raster file begins with a 32-bit synchronization word: 0x52615333 ("RaS3") for big-endian architectures and 0x33536152 ("3SaR") for little-endian architectures. The writer of the raster file will use the native word order, and the reader is responsible for detecting a reversed word order file and swapping bytes as needed. The CUPS Imaging API raster functions perform this function automatically.</P>
-<P>Following the synchronization word are a series of raster
-pages. Each page starts with a version 2 page device dictionary
-header and is followed immediately by the uncompressed raster data
-for that page.</P>
+<P>Following the synchronization word are a series of raster pages. Each page starts with a version 2 page device dictionary header and is followed immediately by the uncompressed/raw raster data for that page.</P>
<H2 CLASS="title"><A NAME="ENCODING">Pixel Value Coding</A></H2>
-<P>The following sections describe the encoding and decoding of
-the color values in a CUPS raster file. In general, colors are
-packed into the minimum number of bytes, with special
-consideration provided for efficiency of encoding and access.
-Multi-byte values are stored in the native byte order and
-automatically swapped as needed when reading them using the CUPS
-imaging API.</P>
+<P>The following sections describe the encoding and decoding of the color values in a CUPS Raster file. In general, colors are packed into the minimum number of bytes, with special consideration provided for efficiency of encoding and access. Multi-byte values are stored in the native byte order and automatically swapped as needed when reading them using the CUPS imaging API.</P>
<H3>CUPS_ORDER_CHUNKED</H3>
-<P>The chunked order provides the pixel value packed in a single
-place. Pixel values with 8 or more bits per color are stored as
-an array of colors in order, e.g. for
-<CODE>CUPS_CSPACE_RGB</CODE> you will see 8/16-bits of red, then
-blue, then green, then red, green, blue, etc. Pixel values with
-less than 8 bits per color are packed together as shown in Table
-4. <I>Multi-byte pixel values are stored in the native word
-order, just as for 16-bit color values.</I></P>
+<P>The chunked order provides the pixel value packed in a single place. Pixel values with 8 or more bits per color are stored as an array of colors in order, e.g. for <CODE>CUPS_CSPACE_RGB</CODE> you will see 8/16-bits of red, then blue, then green, then red, green, blue, etc. Pixel values with less than 8 bits per color are packed together as shown in Table 4. <I>Multi-byte pixel values are stored in the native word order, just as for 16-bit color values.</I></P>
<DIV CLASS="table"><TABLE SUMMARY="Chunked Color Values">
<CAPTION><A NAME="TABLE4">Table 4: Chunked Color Values</A></CAPTION>
@@ -566,56 +571,27 @@ order, just as for 16-bit color values.</I></P>
<H3>CUPS_ORDER_BANDED</H3>
-<P>The banded order provides each color as a separate line of
-data. Each color plane for a line is written in sequence, e.g.
-for the <CODE>CUPS_CSPACE_CMYK</CODE> colorspace you would see
-all of the cyan pixels for a line followed by the magenta,
-yellow, and black pixels for that line. This is repeated for all
-of the lines on the page. Color values are packed starting with
-the most-significant bit (MSB) first.</P>
+<P>The banded order provides each color as a separate line of data. Each color plane for a line is written in sequence, e.g. for the <CODE>CUPS_CSPACE_CMYK</CODE> color space you would see all of the cyan pixels for a line followed by the magenta, yellow, and black pixels for that line. This is repeated for all of the lines on the page. Color values are packed starting with the most-significant bit (MSB) first.</P>
<H3>CUPS_ORDER_PLANAR</H3>
-<P>The planar order provides each color as a separate page of
-data using a shared page header. Each color plane for a page is
-written in sequence, e.g. for the <CODE>CUPS_CSPACE_CMYK</CODE>
-colorspace you would see all of the cyan pixels for a page
-followed by the magenta, yellow, and black pixels for that page.
-Color values are packed starting with the most-significant bit
-(MSB) first. Each line starts on an 8-bit boundary.</P>
+<P>The planar order provides each color as a separate page of data using a shared page header. Each color plane for a page is written in sequence, e.g. for the <CODE>CUPS_CSPACE_CMYK</CODE> color space you would see all of the cyan pixels for a page followed by the magenta, yellow, and black pixels for that page. Color values are packed starting with the most-significant bit (MSB) first. Each line starts on an 8-bit boundary.</P>
-<H3>CUPS_CSPACE_W, CUPS_CSPACE_RGB, CUPS_CSPACE_RGBA, and
-CUPS_CSPACE_RGBW</H3>
+<H3>CUPS_CSPACE_RGBW</H3>
-<P>These colorspaces use the sRGB colorspace definition and
-whitepoint.</P>
+<P>This color space provides a dedicated black text channel and uses the sRGB color space definition and whitepoint for the RGB color channels. The white channel is 0 for text (or "true") black, otherwise it must contain the maximum color value: 1 for 1-bit, 3 for 2-bit, 15 for 4-bit, 255 for 8-bit, or 65535 for 16-bit.</P>
<H3>CUPS_CSPACE_KCMYcm</H3>
-<P>When <CODE>cupsBitsPerColor</CODE> is 1, 6 color planes are
-provided - black, cyan, magenta, yellow, light cyan, and light
-magenta. When <CODE>cupsBitsPerColor</CODE> is greater than 1, 4
-color planes are provided using the <CODE>CUPS_CSPACE_KCMY</CODE>
-colorspace instead.</P>
+<P>When <CODE>cupsBitsPerColor</CODE> is 1, 6 color planes are provided - black, cyan, magenta, yellow, light cyan, and light magenta. When <CODE>cupsBitsPerColor</CODE> is greater than 1, 4 color planes are provided using the <CODE>CUPS_CSPACE_KCMY</CODE> color space instead.</P>
-<P>When <CODE>cupsColorOrder</CODE> is
-<CODE>CUPS_ORDER_CHUNKED</CODE>, bit 5 corresponds to black and
-bit 0 corresponds to light magenta. For
-<CODE>CUPS_ORDER_BANDED</CODE> and
-<CODE>CUPS_ORDER_PLANAR</CODE>, each color plane is encoded
-separately.</P>
+<P>When <CODE>cupsColorOrder</CODE> is <CODE>CUPS_ORDER_CHUNKED</CODE>, bit 5 corresponds to black and bit 0 corresponds to light magenta. For <CODE>CUPS_ORDER_BANDED</CODE> and <CODE>CUPS_ORDER_PLANAR</CODE>, each color plane is encoded separately.</P>
<H3>CUPS_CSPACE_CIELab and CUPS_CSPACE_ICCn</H3>
-<P>These colorspaces map a CIE Lab color value with a D65
-whitepoint to either a 8- or 16-bit per color chunked
-(<CODE>CUPS_ORDER_CHUNKED</CODE>) format; the banded
-(<CODE>CUPS_ORDER_BANDED</CODE>) and planar
-(<CODE>CUPS_ORDER_PLANAR</CODE>) color orders are not
-supported.</P>
+<P>These color spaces map a CIE Lab color value with a D65 whitepoint to either a 8- or 16-bit per color chunked (<CODE>CUPS_ORDER_CHUNKED</CODE>) format; the banded (<CODE>CUPS_ORDER_BANDED</CODE>) and planar (<CODE>CUPS_ORDER_PLANAR</CODE>) color orders are not supported.</P>
-<P>The values are encoded and decoded using the following
-formulas:</P>
+<P>The values are encoded and decoded using the following formulas:</P>
<UL>
@@ -647,15 +623,9 @@ formulas:</P>
<H3>CUPS_CSPACE_CIEXYZ</H3>
-<P>These colorspaces map a CIE XYZ color value with a D65
-whitepoint to either a 8- or 16-bit per color chunked
-(<CODE>CUPS_ORDER_CHUNKED</CODE>) format; the banded
-(<CODE>CUPS_ORDER_BANDED</CODE>) and planar
-(<CODE>CUPS_ORDER_PLANAR</CODE>) color orders are not
-supported.</P>
+<P>These color spaces map a CIE XYZ color value with a D65 whitepoint to either a 8- or 16-bit per color chunked (<CODE>CUPS_ORDER_CHUNKED</CODE>) format; the banded (<CODE>CUPS_ORDER_BANDED</CODE>) and planar (<CODE>CUPS_ORDER_PLANAR</CODE>) color orders are not supported.</P>
-<P>The values are encoded and decoded using the following
-formulas:</P>
+<P>The values are encoded and decoded using the following formulas:</P>
<UL>
@@ -685,14 +655,21 @@ formulas:</P>
</UL>
-<P>The scaling factor for XYZ values is 1/1.1, or 231.8181 for
-8-bit values and 59577.2727 for 16-bit values. This allows for a
-slight overflow of XYZ values when converting from RGB, improving
-accuracy.</P>
+<P>The scaling factor for XYZ values is 1/1.1, or 231.8181 for 8-bit values and 59577.2727 for 16-bit values. This allows for a slight overflow of XYZ values when converting from RGB, improving accuracy.</P>
<H2 CLASS="title"><A NAME="HISTORY">Change History</A></H2>
+<H3>Changes in CUPS 1.4.7</H3>
+
+<ul>
+
+ <li>Greatly improved the detail and now include an example of the bitmap compression.</li>
+ <li>Added all missing cupsColorSpace values and a separate description of CUPS_CSPACE_RGBW.</li>
+
+</ul>
+
+
<H3>Changes in CUPS 1.2.2</H3>
<ul>
@@ -719,20 +696,15 @@ accuracy.</P>
<li>Bumped raster version to 2</li>
- <li>Added RGBW colorspace</li>
+ <li>Added RGBW color space</li>
<li>Added 16 bit per color support</li>
- <li>Added cupsNumColors, cupsBorderlessScalingFactor,
- cupsPageSize, cupsImagingBBox, cupsInteger, cupsReal,
- cupsString, cupsMarkerType, cupsRenderingIntent, and
- cupsPageSizeName attributes to the page device
- dictionary</li>
+ <li>Added cupsNumColors, cupsBorderlessScalingFactor, cupsPageSize, cupsImagingBBox, cupsInteger, cupsReal, cupsString, cupsMarkerType, cupsRenderingIntent, and cupsPageSizeName attributes to the page device dictionary</li>
<li>Added raster data compression</li>
- <li>Added data type column to device dictionary
- documentation.</li>
+ <li>Added data type column to device dictionary documentation.</li>
</ul>
@@ -740,7 +712,7 @@ accuracy.</P>
<ul>
- <li>Added ICC and CIE colorspaces.</li>
+ <li>Added ICC and CIE color spaces.</li>
</ul>
diff --git a/doc/id/index.html.in b/doc/id/index.html.in
index 764e7b70f..93b4621e7 100644
--- a/doc/id/index.html.in
+++ b/doc/id/index.html.in
@@ -100,7 +100,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
</TD></TR>
<TR><TD>&nbsp;</TD></TR>
<TR><TD CLASS="trailer">CUPS dan logo CUPS logo adalah merek dagang dari
-<A HREF="http://www.apple.com">Apple Inc.</A> Hak cipta CUPS pada 2007-2010 Apple
+<A HREF="http://www.apple.com">Apple Inc.</A> Hak cipta CUPS pada 2007-2011 Apple
Inc. Semua hak terpelihara.</TD></TR>
</TABLE>
</BODY>
diff --git a/doc/images/raster-organization.png b/doc/images/raster-organization.png
new file mode 100644
index 000000000..c390f4144
--- /dev/null
+++ b/doc/images/raster-organization.png
Binary files differ
diff --git a/doc/images/raster-organization.svg b/doc/images/raster-organization.svg
new file mode 100644
index 000000000..442032f2e
--- /dev/null
+++ b/doc/images/raster-organization.svg
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.0 r9654"
+ sodipodi:docname="raster-organization.svg"
+ inkscape:export-filename="/Users/mike/c/cups-trunk/doc/images/raster-organization.png"
+ inkscape:export-xdpi="100.04211"
+ inkscape:export-ydpi="100.04211">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.80227655"
+ inkscape:cx="414.35236"
+ inkscape:cy="794.80623"
+ inkscape:document-units="px"
+ inkscape:current-layer="g4208"
+ showgrid="true"
+ inkscape:window-width="1089"
+ inkscape:window-height="815"
+ inkscape:window-x="308"
+ inkscape:window-y="0"
+ inkscape:window-maximized="0">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3979" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:0.98624134px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="rect2985"
+ width="359.01376"
+ height="39.01376"
+ x="180.49312"
+ y="52.855301" />
+ <flowRoot
+ xml:space="preserve"
+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
+ id="flowRoot4112"
+ transform="translate(70.681641,5.4232931)"><flowRegion
+ id="flowRegion4114"><use
+ x="0"
+ y="0"
+ xlink:href="#rect2985"
+ id="use4116"
+ width="744.09448"
+ height="1052.3622" /></flowRegion><flowPara
+ id="flowPara4118">Synchronization Word</flowPara></flowRoot> <g
+ id="g4196">
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:1.71552336px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="rect3981"
+ width="358.28448"
+ height="118.28448"
+ x="180.85776"
+ y="133.21994" />
+ <rect
+ y="253.5766"
+ x="181.21442"
+ height="237.57117"
+ width="357.57117"
+ id="rect3983"
+ style="fill:none;stroke:#000000;stroke-width:2.42882872px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <flowRoot
+ xml:space="preserve"
+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
+ id="flowRoot4120"
+ transform="translate(106.53711,125.42329)"><flowRegion
+ id="flowRegion4122"><use
+ x="0"
+ y="0"
+ xlink:href="#rect2985"
+ id="use4124"
+ width="744.09448"
+ height="1052.3622" /></flowRegion><flowPara
+ id="flowPara4126">Page Header 1</flowPara></flowRoot> <flowRoot
+ transform="translate(106.53711,295.42329)"
+ id="flowRoot4128"
+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
+ xml:space="preserve"><flowRegion
+ id="flowRegion4130"><use
+ height="1052.3622"
+ width="744.09448"
+ id="use4132"
+ xlink:href="#rect2985"
+ y="0"
+ x="0" /></flowRegion><flowPara
+ id="flowPara4134">Page Bitmap 1</flowPara></flowRoot> </g>
+ <g
+ id="g4208"
+ transform="translate(4.1127203e-6,510)">
+ <rect
+ y="133.21994"
+ x="180.85776"
+ height="118.28448"
+ width="358.28448"
+ id="rect4210"
+ style="fill:none;stroke:#000000;stroke-width:1.71552336px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <rect
+ style="fill:none;stroke:#000000;stroke-width:2.42882872px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="rect4212"
+ width="357.57117"
+ height="237.57117"
+ x="181.21442"
+ y="253.5766" />
+ <flowRoot
+ transform="translate(106.53711,125.42329)"
+ id="flowRoot4214"
+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
+ xml:space="preserve"><flowRegion
+ id="flowRegion4216"><use
+ height="1052.3622"
+ width="744.09448"
+ id="use4218"
+ xlink:href="#rect2985"
+ y="0"
+ x="0" /></flowRegion><flowPara
+ id="flowPara4220">Page Header N</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans;-inkscape-font-specification:Sans"
+ id="flowRoot4222"
+ transform="translate(106.53711,295.42329)"><flowRegion
+ id="flowRegion4224"><use
+ x="0"
+ y="0"
+ xlink:href="#rect2985"
+ id="use4226"
+ width="744.09448"
+ height="1052.3622" /></flowRegion><flowPara
+ id="flowPara4228">Page Bitmap N</flowPara></flowRoot> <path
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1,2;stroke-dashoffset:0"
+ d="m 180,92.362183 0,39.999997"
+ id="path4230"
+ inkscape:connector-curvature="0"
+ transform="translate(-4.1127203e-6,-510)" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4232"
+ d="m 540,-417.63782 0,40"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1, 2;stroke-dashoffset:0" />
+ <path
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1,2;stroke-dashoffset:0"
+ d="m 180,492.36218 0,60 -20,10 40,10 -20,10 0,60"
+ id="path4236"
+ inkscape:connector-curvature="0"
+ transform="translate(-4.1127203e-6,-510)"
+ sodipodi:nodetypes="cccccc" />
+ <path
+ sodipodi:nodetypes="cccccc"
+ inkscape:connector-curvature="0"
+ id="path4238"
+ d="m 540,-17.637817 0,60 -20,10 40,10 -20,10 0,59.999997"
+ style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1, 2;stroke-dashoffset:0" />
+ </g>
+ </g>
+</svg>
diff --git a/doc/images/sample-image.png b/doc/images/sample-image.png
new file mode 100644
index 000000000..f78760e07
--- /dev/null
+++ b/doc/images/sample-image.png
Binary files differ
diff --git a/doc/index.html.in b/doc/index.html.in
index 05e5eb0f5..26f8de13b 100644
--- a/doc/index.html.in
+++ b/doc/index.html.in
@@ -100,7 +100,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
</TD></TR>
<TR><TD>&nbsp;</TD></TR>
<TR><TD CLASS="trailer">CUPS and the CUPS logo are trademarks of
-<A HREF="http://www.apple.com">Apple Inc.</A> CUPS is copyright 2007-2010 Apple
+<A HREF="http://www.apple.com">Apple Inc.</A> CUPS is copyright 2007-2011 Apple
Inc. All rights reserved.</TD></TR>
</TABLE>
</BODY>
diff --git a/doc/it/index.html.in b/doc/it/index.html.in
index a15de9d99..f65954f03 100644
--- a/doc/it/index.html.in
+++ b/doc/it/index.html.in
@@ -100,7 +100,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
</TD></TR>
<TR><TD>&nbsp;</TD></TR>
<TR><TD CLASS="trailer">CUPS e il logo CUPS sono marchi di
-<A HREF="http://www.apple.com">Apple Inc.</A> CUPS è un copyright 2007-2010 di Apple
+<A HREF="http://www.apple.com">Apple Inc.</A> CUPS è un copyright 2007-2011 di Apple
Inc. Tutti i diritti sono riservati.</TD></TR>
</TABLE>
</BODY>
diff --git a/doc/ja/index.html.in b/doc/ja/index.html.in
index 8919749c5..4271c7adf 100644
--- a/doc/ja/index.html.in
+++ b/doc/ja/index.html.in
@@ -100,7 +100,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
</TD></TR>
<TR><TD>&nbsp;</TD></TR>
<TR><TD CLASS="trailer">CUPS and the CUPS logo are trademarks of
-<A HREF="http://www.apple.com">Apple Inc.</A> CUPS is copyright 2007-2010 Apple
+<A HREF="http://www.apple.com">Apple Inc.</A> CUPS is copyright 2007-2011 Apple
Inc. All rights reserved.</TD></TR>
</TABLE>
</BODY>
diff --git a/doc/pl/index.html.in b/doc/pl/index.html.in
index d0555887e..943cb9e96 100644
--- a/doc/pl/index.html.in
+++ b/doc/pl/index.html.in
@@ -101,7 +101,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
<TR><TD>&nbsp;</TD></TR>
<TR><TD CLASS="trailer">CUPS i logo CUPS
są znakami handlowymi <A HREF="http://www.apple.com">Apple Inc.</A> CUPS
-copyright 2007-2010 Apple Inc. Wszystkie prawa zastrzeżone.</TD></TR>
+copyright 2007-2011 Apple Inc. Wszystkie prawa zastrzeżone.</TD></TR>
</TABLE>
</BODY>
</HTML>
diff --git a/doc/ru/index.html.in b/doc/ru/index.html.in
index b0b6bbf9e..7b2b745a2 100644
--- a/doc/ru/index.html.in
+++ b/doc/ru/index.html.in
@@ -97,7 +97,7 @@ HEIGHT="128" ALT="CUPS"></A></TD>
</TD></TR>
<TR><TD>&nbsp;</TD></TR>
-<TR><TD CLASS="trailer">CUPS а также логотип CUPS являются зарегистрированными торговыми марками <A HREF="http://www.apple.com">Apple Inc.</A> Авторские права на CUPS принадлежат (2007-2010) компании Apple Inc. Все права защищены.</TD></TR>
+<TR><TD CLASS="trailer">CUPS а также логотип CUPS являются зарегистрированными торговыми марками <A HREF="http://www.apple.com">Apple Inc.</A> Авторские права на CUPS принадлежат (2007-2011) компании Apple Inc. Все права защищены.</TD></TR>
</TABLE>
</BODY>
</HTML>
diff --git a/man/cups-driverd.man.in b/man/cups-driverd.man.in
index 6e1e94007..636883615 100644
--- a/man/cups-driverd.man.in
+++ b/man/cups-driverd.man.in
@@ -1,9 +1,9 @@
.\"
.\" "$Id: cups-driverd.man.in 7662 2008-06-17 14:34:20Z mike $"
.\"
-.\" cups-driverd man page for the Common UNIX Printing System (CUPS).
+.\" cups-driverd man page for CUPS.
.\"
-.\" Copyright 2007-2009 by Apple Inc.
+.\" Copyright 2007-2011 by Apple Inc.
.\" Copyright 1997-2006 by Easy Software Products.
.\"
.\" These coded instructions, statements, and computer programs are the
@@ -12,7 +12,7 @@
.\" which should have been included with this file. If this file is
.\" file is missing or damaged, see the license at "http://www.cups.org/".
.\"
-.TH cups-driverd 8 "CUPS" "16 June 2008" "Apple Inc."
+.TH cups-driverd 8 "CUPS" "6 January 2011" "Apple Inc."
.SH NAME
cups-driverd \- cups driver daemon
.SH SYNOPSIS
@@ -49,7 +49,7 @@ and may be compressed using the \fIgzip(1)\fR program. Driver
programs must implement the command-line interface shown in the
next section.
.SS DRIVER PROGRAMS
-Driver programs provide an interface to dynamically-generated PPD
+Driver programs provide a interface to dynamically-generated PPD
files. The following arguments are currently defined:
.TP 5
drivername list
@@ -59,12 +59,20 @@ Lists the supported PPD files to stdout.
drivername cat ppdname
.br
Writes the named PPD file to stdout.
+.PP
+Driver programs MUST NOT query hardware or make other long-term operations that
+would delay the return of a driver list. See the NOTES section below for
+specific recommendations.
.SS LISTING FILES (drivername list)
When run with the single argument "list", the program must list
the available PPD files it can generate to stdout using the
following format:
.nf
+ "drivername:ppdname" language "make" "make and model"
"drivername:ppdname" language "make" "make and model" "1284 device id"
+ "drivername:ppdname" language "make" "make and model" "1284 device id" "(PPD product)"
+ "drivername:ppdname" language "make" "make and model" "1284 device id" "(PPD product)" "PostScript version"
+ "drivername:ppdname" language "make" "make and model" "1284 device id" "(PPD product)" "PostScript version" "type"
.fi
.LP
\fIDrivername\fR is the name of the driver program. \fIPpdname\fR
@@ -73,7 +81,11 @@ the locale associated with the default language of the PPD file,
typically "en". \fIMake\fR is the Manufacturer name from the PPD
file. \fIMake and model\fR is the NickName name from the PPD
file. \fI1284 device id\fR is the 1284DeviceId from the PPD file,
-if any.
+if any. \fI(PPD product)\fR is the Product string as it would appear in the PPD
+file or from a PostScript query. \fIPostScript version\fR is the PSVersion
+string as it would appear in the PPD file or from a PostScript query. \fIType\fR
+is "postscript" for PostScript printers, "pdf" for PDF printers, "raster" for
+raster printers, or "fax" for facsimile devices.
.SS WRITING FILES (drivername cat ppdname)
When the driver program is run with the "cat ppdname" arguments,
it must write the named PPD file to stdout, uncompressed. If the
@@ -94,12 +106,17 @@ Error messages
INFO: [drivername]
.br
Informational messages
+.SH NOTES
+Due to performance considerations, driver programs have been officially
+deprecated and should not be used for new development. Currently only the
+CUPS web interface and \fIlpinfo(8)\fR command will request lists from all
+driver programs.
.SH SEE ALSO
-cupsd(8), cupsd.conf(5), cupstestppd(1),
+cupsd(8), cupsd.conf(5), cupstestppd(1), lpinfo(8),
.br
http://localhost:631/help
.SH COPYRIGHT
-Copyright 2007-2009 by Apple Inc.
+Copyright 2007-2011 by Apple Inc.
.\"
.\" End of "$Id: cups-driverd.man.in 7662 2008-06-17 14:34:20Z mike $".
.\"
diff --git a/man/cupsctl.man b/man/cupsctl.man
index f0472644b..f5f5b5cc8 100644
--- a/man/cupsctl.man
+++ b/man/cupsctl.man
@@ -1,9 +1,9 @@
.\"
.\" "$Id: cupsctl.man 7600 2008-05-20 21:06:23Z mike $"
.\"
-.\" cupsctl man page for the Common UNIX Printing System (CUPS).
+.\" cupsctl man page for CUPS.
.\"
-.\" Copyright 2007-2009 by Apple Inc.
+.\" Copyright 2007-2011 by Apple Inc.
.\" Copyright 2007 by Easy Software Products.
.\"
.\" These coded instructions, statements, and computer programs are the
@@ -12,7 +12,7 @@
.\" which should have been included with this file. If this file is
.\" file is missing or damaged, see the license at "http://www.cups.org/".
.\"
-.TH cupsctl 8 "CUPS" "5 July 2007" "Apple Inc."
+.TH cupsctl 8 "CUPS" "10 January 2011" "Apple Inc."
.SH NAME
cupsctl \- configure cupsd.conf options
.SH SYNOPSIS
@@ -94,12 +94,14 @@ Enable printing using the file: pseudo-device:
.nf
cupsctl FileDevice=Yes
.fi
+.SH KNOWN ISSUES
+You cannot set the Listen or Port directives using \fIcupsctl\fR.
.SH SEE ALSO
\fIcupsd.conf(5)\fR, \fIcupsd(8)\fR,
.br
http://localhost:631/help
.SH COPYRIGHT
-Copyright 2007-2009 by Apple Inc.
+Copyright 2007-2011 by Apple Inc.
.\"
.\" End of "$Id: cupsctl.man 7600 2008-05-20 21:06:23Z mike $".
.\"
diff --git a/man/lpadmin.man b/man/lpadmin.man
index 694f0b817..675c8e082 100644
--- a/man/lpadmin.man
+++ b/man/lpadmin.man
@@ -1,9 +1,9 @@
.\"
.\" "$Id: lpadmin.man 7600 2008-05-20 21:06:23Z mike $"
.\"
-.\" lpadmin man page for the Common UNIX Printing System (CUPS).
+.\" lpadmin man page for CUPS.
.\"
-.\" Copyright 2007-2010 by Apple Inc.
+.\" Copyright 2007-2011 by Apple Inc.
.\" Copyright 1997-2006 by Easy Software Products.
.\"
.\" These coded instructions, statements, and computer programs are the
@@ -12,7 +12,7 @@
.\" which should have been included with this file. If this file is
.\" file is missing or damaged, see the license at "http://www.cups.org/".
.\"
-.TH lpadmin 8 "CUPS" "1 September 2010" "Apple Inc."
+.TH lpadmin 8 "CUPS" "7 January 2011" "Apple Inc."
.SH NAME
lpadmin \- configure cups printers and classes
.SH SYNOPSIS
@@ -132,7 +132,7 @@ classes.
-o printer-is-shared=true/false
.br
Sets the destination to shared/published or unshared/unpublished.
-Shared/published destinations are publically announced by the server
+Shared/published destinations are publicly announced by the server
on the LAN based on the browsing configuration in
\fBcupsd.conf\fR, while unshared/unpublished destinations are not
announced. The default value is "true".
@@ -202,7 +202,7 @@ System V or Solaris printing system configuration options.
.br
http://localhost:631/help
.SH COPYRIGHT
-Copyright 2007-2010 by Apple Inc.
+Copyright 2007-2011 by Apple Inc.
.\"
.\" End of "$Id: lpadmin.man 7600 2008-05-20 21:06:23Z mike $".
.\"
diff --git a/ppdc/Makefile b/ppdc/Makefile
index 9f9e19932..ea03fd581 100644
--- a/ppdc/Makefile
+++ b/ppdc/Makefile
@@ -3,7 +3,7 @@
#
# Makefile for the CUPS PPD Compiler.
#
-# Copyright 2007-2010 by Apple Inc.
+# Copyright 2007-2011 by Apple Inc.
# Copyright 2002-2006 by Easy Software Products.
#
# These coded instructions, statements, and computer programs are the
@@ -294,7 +294,7 @@ ppdi-static: ppdc-static ppdi.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC)
./ppdc-static -I ../data sample.drv
./ppdi-static -I ../data -o sample-import.drv ppd/*
./ppdc-static -I ../data -d ppd2 sample-import.drv
- if diff -qr ppd ppd2; then \
+ if diff -r ppd ppd2 >/dev/null; then \
echo PPD import OK; \
else \
echo PPD import FAILED; \
diff --git a/ppdc/sample.drv b/ppdc/sample.drv
index 29787997d..3a57bd211 100644
--- a/ppdc/sample.drv
+++ b/ppdc/sample.drv
@@ -364,7 +364,7 @@ Version "1.5"
Attribute NickName "" "Generic PostScript Printer"
PCFileName "generic.ppd"
Throughput 8
- ColorDevice No
+ ColorDevice Yes
Attribute PSVersion "" "(2016.0) 0"
Attribute LanguageLevel "" 2
@@ -387,7 +387,7 @@ Version "1.5"
Option "InputSlot/Media Source" PickOne AnySetup 10
*Choice "Default/Printer Default" ""
- Choice "Tray1/Tray 1" "<</ManualFeed false>>setpagedevice"
+ Choice "Upper/Cassette" "<</ManualFeed false>>setpagedevice"
Choice "Manual/Manual Feed" "<</ManualFeed true>>setpagedevice"
Duplex Yes
diff --git a/scheduler/Dependencies b/scheduler/Dependencies
index d1e099d39..97f567cde 100644
--- a/scheduler/Dependencies
+++ b/scheduler/Dependencies
@@ -292,6 +292,7 @@ cups-deviced.o: ../cups/cups.h ../cups/pwg-private.h ../cups/http-private.h
cups-deviced.o: ../cups/http.h ../cups/md5-private.h ../cups/ipp-private.h
cups-deviced.o: ../cups/ipp.h ../cups/language-private.h ../cups/transcode.h
cups-deviced.o: ../cups/thread-private.h ../cups/array.h ../cups/dir.h
+cups-exec.o: ../cups/string-private.h ../config.h
cups-lpd.o: ../cups/cups-private.h ../cups/cups.h ../cups/file.h
cups-lpd.o: ../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h
cups-lpd.o: ../cups/language.h ../cups/string-private.h ../config.h
diff --git a/scheduler/Makefile b/scheduler/Makefile
index 9ce54b320..75a849949 100644
--- a/scheduler/Makefile
+++ b/scheduler/Makefile
@@ -49,6 +49,7 @@ COBJS = \
$(LIBOBJS) \
cupsfilter.o \
cups-deviced.o \
+ cups-exec.o \
cups-lpd.o \
cups-polld.o \
testdirsvc.o \
@@ -73,17 +74,18 @@ UNITTARGETS = \
testspeed \
testsub
-DAEMONS = \
+PROGRAMS = \
cupsd \
cupsfilter \
cups-deviced \
cups-driverd \
+ cups-exec \
cups-lpd \
cups-polld
TARGETS = \
$(LIBTARGETS) \
- $(DAEMONS)
+ $(PROGRAMS)
#
@@ -222,6 +224,7 @@ install-exec:
$(INSTALL_DIR) -m 755 $(SERVERBIN)/daemon
$(INSTALL_BIN) cups-deviced $(SERVERBIN)/daemon
$(INSTALL_BIN) cups-driverd $(SERVERBIN)/daemon
+ $(INSTALL_BIN) cups-exec $(SERVERBIN)/daemon
$(INSTALL_BIN) cups-lpd $(SERVERBIN)/daemon
$(INSTALL_BIN) cups-polld $(SERVERBIN)/daemon
if test "x$(SYMROOT)" != "x"; then \
@@ -279,6 +282,7 @@ uninstall:
$(RM) $(SBINDIR)/cupsfilter
$(RM) $(SERVERBIN)/daemon/cups-deviced
$(RM) $(SERVERBIN)/daemon/cups-driverd
+ $(RM) $(SERVERBIN)/daemon/cups-exec
$(RM) $(SERVERBIN)/daemon/cups-lpd
$(RM) $(SERVERBIN)/daemon/cups-polld
$(RM) $(BUILDROOT)/System/Library/Printers/Libraries/convert
@@ -417,6 +421,15 @@ cups-driverd: cups-driverd.o util.o ../cups/$(LIBCUPS) ../ppdc/$(LIBCUPSPPDC)
#
+# Make the sandbox execution helper, "cups-exec".
+#
+
+cups-exec: cups-exec.o
+ echo Linking $@...
+ $(CC) $(LDFLAGS) -o cups-exec cups-exec.o $(LIBS)
+
+
+#
# Make the line printer daemon, "cups-lpd".
#
diff --git a/scheduler/client.c b/scheduler/client.c
index 1d0dcf12e..7239bdb83 100644
--- a/scheduler/client.c
+++ b/scheduler/client.c
@@ -3,7 +3,7 @@
*
* Client routines for the CUPS scheduler.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* This file contains Kerberos support code, copyright 2006 by
@@ -1368,8 +1368,7 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
break;
}
}
-
- if (!WebInterface)
+ else if (!WebInterface)
{
/*
* Web interface is disabled. Show an appropriate message...
@@ -1383,13 +1382,14 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
break;
}
- else if ((!strncmp(con->uri, "/admin", 6) &&
- strncmp(con->uri, "/admin/conf/", 12) &&
- strncmp(con->uri, "/admin/log/", 11)) ||
- !strncmp(con->uri, "/printers", 9) ||
- !strncmp(con->uri, "/classes", 8) ||
- !strncmp(con->uri, "/help", 5) ||
- !strncmp(con->uri, "/jobs", 5))
+
+ if ((!strncmp(con->uri, "/admin", 6) &&
+ strncmp(con->uri, "/admin/conf/", 12) &&
+ strncmp(con->uri, "/admin/log/", 11)) ||
+ !strncmp(con->uri, "/printers", 9) ||
+ !strncmp(con->uri, "/classes", 8) ||
+ !strncmp(con->uri, "/help", 5) ||
+ !strncmp(con->uri, "/jobs", 5))
{
/*
* Send CGI output...
@@ -4925,8 +4925,18 @@ pipe_command(cupsd_client_t *con, /* I - Client connection */
sprintf(server_port, "SERVER_PORT=%d", con->serverport);
- snprintf(server_name, sizeof(server_name), "SERVER_NAME=%s",
- con->servername);
+ if (con->http.fields[HTTP_FIELD_HOST][0])
+ {
+ char *nameptr; /* Pointer to ":port" */
+
+ snprintf(server_name, sizeof(server_name), "SERVER_NAME=%s",
+ con->http.fields[HTTP_FIELD_HOST]);
+ if ((nameptr = strrchr(server_name, ':')) != NULL && !strchr(nameptr, ']'))
+ *nameptr = '\0'; /* Strip trailing ":port" */
+ }
+ else
+ snprintf(server_name, sizeof(server_name), "SERVER_NAME=%s",
+ con->servername);
envc = cupsdLoadEnv(envp, (int)(sizeof(envp) / sizeof(envp[0])));
diff --git a/scheduler/conf.c b/scheduler/conf.c
index 1f629e5c4..7205d3d15 100644
--- a/scheduler/conf.c
+++ b/scheduler/conf.c
@@ -3,7 +3,7 @@
*
* Configuration routines for the CUPS scheduler.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -495,7 +495,7 @@ cupsdReadConfiguration(void)
cupsdSetString(&ErrorLog, CUPS_LOGDIR "/error_log");
cupsdSetString(&PageLog, CUPS_LOGDIR "/page_log");
cupsdSetString(&PageLogFormat,
- "%p %j %u %T %P %C %{job-billing} "
+ "%p %u %j %T %P %C %{job-billing} "
"%{job-originating-host-name} %{job-name} %{media} %{sides}");
cupsdSetString(&Printcap, CUPS_DEFAULT_PRINTCAP);
cupsdSetString(&PrintcapGUI, "/usr/bin/glpoptions");
@@ -691,6 +691,12 @@ cupsdReadConfiguration(void)
#endif /* HAVE_LAUNCHD */
/*
+ * Setup environment variables...
+ */
+
+ cupsdInitEnv();
+
+ /*
* Read the configuration file...
*/
@@ -1033,10 +1039,10 @@ cupsdReadConfiguration(void)
}
/*
- * Setup environment variables...
+ * Update environment variables...
*/
- cupsdInitEnv();
+ cupsdUpdateEnv();
/*
* Update default paper size setting as needed...
diff --git a/scheduler/cups-exec.c b/scheduler/cups-exec.c
new file mode 100644
index 000000000..22bdd87a6
--- /dev/null
+++ b/scheduler/cups-exec.c
@@ -0,0 +1,90 @@
+/*
+ * "$Id$"
+ *
+ * Sandbox helper for CUPS.
+ *
+ * Copyright 2007-2010 by Apple Inc.
+ *
+ * These coded instructions, statements, and computer programs are the
+ * property of Apple Inc. and are protected by Federal copyright
+ * law. Distribution and use rights are outlined in the file "LICENSE.txt"
+ * which should have been included with this file. If this file is
+ * file is missing or damaged, see the license at "http://www.cups.org/".
+ *
+ * Usage:
+ *
+ * cups-exec /path/to/profile /path/to/program argv0 argv1 ... argvN
+ *
+ * Contents:
+ *
+ * main() - Apply sandbox profile and execute program.
+ */
+
+/*
+ * Include necessary headers...
+ */
+
+#include <cups/string-private.h>
+#include <unistd.h>
+#ifdef HAVE_SANDBOX_H
+# define __APPLE_API_PRIVATE
+# include <sandbox.h>
+#endif /* HAVE_SANDBOX_H */
+
+
+/*
+ * 'main()' - Apply sandbox profile and execute program.
+ */
+
+int /* O - Exit status */
+main(int argc, /* I - Number of command-line args */
+ char *argv[]) /* I - Command-line arguments */
+{
+#ifdef HAVE_SANDBOX_H
+ char *sandbox_error = NULL; /* Sandbox error, if any */
+#endif /* HAVE_SANDBOX_H */
+
+
+ /*
+ * Check that we have enough arguments...
+ */
+
+ if (argc < 4)
+ {
+ puts("Usage: cups-exec /path/to/profile /path/to/program argv0 argv1 ... "
+ "argvN");
+ return (1);
+ }
+
+#ifdef HAVE_SANDBOX_H
+ /*
+ * Run in a separate security profile...
+ */
+
+ if (sandbox_init(argv[1], SANDBOX_NAMED_EXTERNAL, &sandbox_error))
+ {
+ fprintf(stderr, "DEBUG: sandbox_init failed: %s (%s)\n", sandbox_error,
+ strerror(errno));
+ sandbox_free_error(sandbox_error);
+ return (1);
+ }
+#endif /* HAVE_SANDBOX_H */
+
+ /*
+ * Execute the program...
+ */
+
+ execv(argv[2], argv + 3);
+
+ /*
+ * If we get here, execv() failed...
+ */
+
+ fprintf(stderr, "DEBUG: execv failed: %s\n", strerror(errno));
+ return (1);
+}
+
+
+/*
+ * End of "$Id$".
+ */
diff --git a/scheduler/cups-polld.c b/scheduler/cups-polld.c
index 12774e9b9..cc4cbbbf0 100644
--- a/scheduler/cups-polld.c
+++ b/scheduler/cups-polld.c
@@ -310,7 +310,7 @@ poll_server(http_t *http, /* I - HTTP connection */
fprintf(stderr, "DEBUG: %s Found %d printers.\n", prefix, max_count);
count = 0;
- max_count = max_count / interval + 1;
+ max_count = 2 * max_count / interval + 1;
/*
* Loop through the printers or classes returned in the list...
diff --git a/scheduler/cupsd.h b/scheduler/cupsd.h
index f1ba5cc7c..ea392be9c 100644
--- a/scheduler/cupsd.h
+++ b/scheduler/cupsd.h
@@ -3,7 +3,7 @@
*
* Main header file for the CUPS scheduler.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -202,6 +202,7 @@ extern void cupsdSetEnvf(const char *name, const char *value, ...)
__attribute__ ((__format__ (__printf__, 2, 3)))
#endif /* __GNUC__ */
;
+extern void cupsdUpdateEnv(void);
extern void *cupsdCreateProfile(int job_id);
extern void cupsdDestroyProfile(void *profile);
diff --git a/scheduler/dirsvc.c b/scheduler/dirsvc.c
index 300fa6976..293b0622e 100644
--- a/scheduler/dirsvc.c
+++ b/scheduler/dirsvc.c
@@ -2349,7 +2349,8 @@ dnssdBuildTxtRecord(
int for_lpd) /* I - 1 = LPD, 0 = IPP */
{
int i; /* Looping var */
- char adminurl_str[256], /* URL for the admin page */
+ char admin_hostname[256], /* .local hostname for admin page */
+ adminurl_str[256], /* URL for the admin page */
type_str[32], /* Type to string buffer */
state_str[32], /* State to string buffer */
rp_str[1024], /* Queue name string buffer */
@@ -2380,8 +2381,9 @@ dnssdBuildTxtRecord(
keyvalue[i ][0] = "ty";
keyvalue[i++][1] = p->make_model ? p->make_model : "Unknown";
+ snprintf(admin_hostname, sizeof(admin_hostname), "%s.local", DNSSDHostName);
httpAssembleURIf(HTTP_URI_CODING_ALL, adminurl_str, sizeof(adminurl_str),
- "http", NULL, DNSSDHostName, DNSSDPort, "/%s/%s",
+ "http", NULL, admin_hostname, DNSSDPort, "/%s/%s",
(p->type & CUPS_PRINTER_CLASS) ? "classes" : "printers",
p->name);
keyvalue[i ][0] = "adminurl";
@@ -2645,7 +2647,8 @@ dnssdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */
name[1024], /* Service name */
*nameptr; /* Pointer into name */
int ipp_len, /* IPP TXT record length */
- printer_len; /* LPD TXT record length */
+ printer_len, /* LPD TXT record length */
+ printer_port; /* LPD port number */
const char *regtype; /* Registration type */
@@ -2793,75 +2796,82 @@ dnssdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */
if (BrowseLocalProtocols & BROWSE_LPD)
{
- printer_len = 0; /* anti-compiler-warning-code */
- printer_txt = dnssdBuildTxtRecord(&printer_len, p, 1);
-
- if (p->printer_ref &&
- (printer_len != p->printer_len ||
- memcmp(printer_txt, p->printer_txt, printer_len)))
- {
- /*
- * Update the existing registration...
- */
-
- /* A TTL of 0 means use record's original value (Radar 3176248) */
- if ((se = DNSServiceUpdateRecord(p->printer_ref, NULL, 0, printer_len,
- printer_txt,
- 0)) == kDNSServiceErr_NoError)
- {
- if (p->printer_txt)
- free(p->printer_txt);
+ printer_len = 0; /* anti-compiler-warning-code */
+ printer_port = 515;
+ printer_txt = dnssdBuildTxtRecord(&printer_len, p, 1);
+ }
+ else
+ {
+ printer_len = 0;
+ printer_port = 0;
+ printer_txt = NULL;
+ }
- p->printer_txt = printer_txt;
- p->printer_len = printer_len;
- printer_txt = NULL;
- }
- else
- {
- /*
- * Failed to update record, lets close this reference and move on...
- */
+ if (p->printer_ref &&
+ (printer_len != p->printer_len ||
+ memcmp(printer_txt, p->printer_txt, printer_len)))
+ {
+ /*
+ * Update the existing registration...
+ */
- cupsdLogMessage(CUPSD_LOG_ERROR,
- "Unable to update LPD DNS-SD record for %s - %d",
- p->name, se);
+ /* A TTL of 0 means use record's original value (Radar 3176248) */
+ if ((se = DNSServiceUpdateRecord(p->printer_ref, NULL, 0, printer_len,
+ printer_txt,
+ 0)) == kDNSServiceErr_NoError)
+ {
+ if (p->printer_txt)
+ free(p->printer_txt);
- DNSServiceRefDeallocate(p->printer_ref);
- p->printer_ref = NULL;
- }
+ p->printer_txt = printer_txt;
+ p->printer_len = printer_len;
+ printer_txt = NULL;
}
-
- if (!p->printer_ref)
+ else
{
/*
- * Initial registration...
+ * Failed to update record, lets close this reference and move on...
*/
- cupsdLogMessage(CUPSD_LOG_DEBUG,
- "Registering DNS-SD printer %s with name \"%s\" and "
- "type \"_printer._tcp\"", p->name, name);
+ cupsdLogMessage(CUPSD_LOG_ERROR,
+ "Unable to update LPD DNS-SD record for %s - %d",
+ p->name, se);
- p->printer_ref = DNSSDRef;
- if ((se = DNSServiceRegister(&p->printer_ref,
- kDNSServiceFlagsShareConnection,
- 0, name, "_printer._tcp", NULL, NULL,
- htons(515), printer_len, printer_txt,
- dnssdRegisterCallback,
- p)) == kDNSServiceErr_NoError)
- {
- p->printer_txt = printer_txt;
- p->printer_len = printer_len;
- printer_txt = NULL;
- }
- else
- cupsdLogMessage(CUPSD_LOG_WARN,
- "DNS-SD LPD registration of \"%s\" failed: %d",
- p->name, se);
+ DNSServiceRefDeallocate(p->printer_ref);
+ p->printer_ref = NULL;
}
+ }
+
+ if (!p->printer_ref)
+ {
+ /*
+ * Initial registration...
+ */
- if (printer_txt)
- free(printer_txt);
+ cupsdLogMessage(CUPSD_LOG_DEBUG,
+ "Registering DNS-SD printer %s with name \"%s\" and "
+ "type \"_printer._tcp\"", p->name, name);
+
+ p->printer_ref = DNSSDRef;
+ if ((se = DNSServiceRegister(&p->printer_ref,
+ kDNSServiceFlagsShareConnection,
+ 0, name, "_printer._tcp", NULL, NULL,
+ htons(printer_port), printer_len, printer_txt,
+ dnssdRegisterCallback,
+ p)) == kDNSServiceErr_NoError)
+ {
+ p->printer_txt = printer_txt;
+ p->printer_len = printer_len;
+ printer_txt = NULL;
+ }
+ else
+ cupsdLogMessage(CUPSD_LOG_WARN,
+ "DNS-SD LPD registration of \"%s\" failed: %d",
+ p->name, se);
}
+
+ if (printer_txt)
+ free(printer_txt);
}
diff --git a/scheduler/env.c b/scheduler/env.c
index 9cf6ff26f..0b66b5e22 100644
--- a/scheduler/env.c
+++ b/scheduler/env.c
@@ -3,7 +3,7 @@
*
* Environment management routines for the CUPS scheduler.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -14,12 +14,14 @@
*
* Contents:
*
- * cupsdInitEnv() - Initialize the current environment with standard
- * variables.
- * cupsdLoadEnv() - Copy common environment variables into an array.
- * cupsdSetEnv() - Set a common environment variable.
- * cupsdSetEnvf() - Set a formatted common environment variable.
- * clear_env() - Clear common environment variables.
+ * cupsdInitEnv() - Initialize the current environment with standard
+ * variables.
+ * cupsdLoadEnv() - Copy common environment variables into an array.
+ * cupsdSetEnv() - Set a common environment variable.
+ * cupsdSetEnvf() - Set a formatted common environment variable.
+ * cupsdUpdateEnv() - Update the environment for the configured directories.
+ * clear_env() - Clear common environment variables.
+ * find_env() - Find a common environment variable.
*/
/*
@@ -42,6 +44,7 @@ static char *common_env[MAX_ENV]; /* Common env vars */
*/
static void clear_env(void);
+static int find_env(const char *name);
/*
@@ -68,34 +71,6 @@ cupsdInitEnv(void)
cupsdSetString(common_env, "<CFProcessPath>");
num_common_env = 1;
#endif /* __APPLE__ */
-
- /*
- * Set common variables...
- */
-
- cupsdSetEnv("CUPS_CACHEDIR", CacheDir);
- cupsdSetEnv("CUPS_DATADIR", DataDir);
- cupsdSetEnv("CUPS_DOCROOT", DocumentRoot);
- cupsdSetEnv("CUPS_FONTPATH", FontPath);
- cupsdSetEnv("CUPS_REQUESTROOT", RequestRoot);
- cupsdSetEnv("CUPS_SERVERBIN", ServerBin);
- cupsdSetEnv("CUPS_SERVERROOT", ServerRoot);
- cupsdSetEnv("CUPS_STATEDIR", StateDir);
- cupsdSetEnv("DYLD_LIBRARY_PATH", NULL);
- cupsdSetEnv("HOME", TempDir);
- cupsdSetEnv("LD_ASSUME_KERNEL", NULL);
- cupsdSetEnv("LD_LIBRARY_PATH", NULL);
- cupsdSetEnv("LD_PRELOAD", NULL);
- cupsdSetEnv("NLSPATH", NULL);
- cupsdSetEnvf("PATH", "%s/filter:" CUPS_BINDIR ":" CUPS_SBINDIR
- ":/bin:/usr/bin", ServerBin);
- cupsdSetEnv("SERVER_ADMIN", ServerAdmin);
- cupsdSetEnv("SHLIB_PATH", NULL);
- cupsdSetEnv("SOFTWARE", CUPS_MINIMAL);
- cupsdSetEnv("TMPDIR", TempDir);
- cupsdSetEnv("TZ", NULL);
- cupsdSetEnv("USER", "root");
- cupsdSetEnv("VG_ARGS", NULL);
}
@@ -142,8 +117,7 @@ void
cupsdSetEnv(const char *name, /* I - Name of variable */
const char *value) /* I - Value of variable */
{
- int i, /* Looping var */
- namelen; /* Length of name */
+ int i; /* Index into environent array */
/*
@@ -160,11 +134,7 @@ cupsdSetEnv(const char *name, /* I - Name of variable */
* See if this variable has already been defined...
*/
- for (i = 0, namelen = strlen(name); i < num_common_env; i ++)
- if (!strncmp(common_env[i], name, namelen) && common_env[i][namelen] == '=')
- break;
-
- if (i >= num_common_env)
+ if ((i = find_env(name)) < 0)
{
/*
* Check for room...
@@ -177,6 +147,7 @@ cupsdSetEnv(const char *name, /* I - Name of variable */
return;
}
+ i = num_common_env;
num_common_env ++;
}
@@ -220,6 +191,46 @@ cupsdSetEnvf(const char *name, /* I - Name of variable */
/*
+ * 'cupsdUpdateEnv()' - Update the environment for the configured directories.
+ */
+
+void
+cupsdUpdateEnv(void)
+{
+ /*
+ * Set common variables...
+ */
+
+#define set_if_undefined(name,value) if (find_env(name) < 0) cupsdSetEnv(name,value)
+
+ set_if_undefined("CUPS_CACHEDIR", CacheDir);
+ set_if_undefined("CUPS_DATADIR", DataDir);
+ set_if_undefined("CUPS_DOCROOT", DocumentRoot);
+ set_if_undefined("CUPS_FONTPATH", FontPath);
+ set_if_undefined("CUPS_REQUESTROOT", RequestRoot);
+ set_if_undefined("CUPS_SERVERBIN", ServerBin);
+ set_if_undefined("CUPS_SERVERROOT", ServerRoot);
+ set_if_undefined("CUPS_STATEDIR", StateDir);
+ set_if_undefined("DYLD_LIBRARY_PATH", NULL);
+ set_if_undefined("HOME", TempDir);
+ set_if_undefined("LD_ASSUME_KERNEL", NULL);
+ set_if_undefined("LD_LIBRARY_PATH", NULL);
+ set_if_undefined("LD_PRELOAD", NULL);
+ set_if_undefined("NLSPATH", NULL);
+ if (find_env("PATH") < 0)
+ cupsdSetEnvf("PATH", "%s/filter:" CUPS_BINDIR ":" CUPS_SBINDIR
+ ":/bin:/usr/bin", ServerBin);
+ set_if_undefined("SERVER_ADMIN", ServerAdmin);
+ set_if_undefined("SHLIB_PATH", NULL);
+ set_if_undefined("SOFTWARE", CUPS_MINIMAL);
+ set_if_undefined("TMPDIR", TempDir);
+ set_if_undefined("TZ", NULL);
+ set_if_undefined("USER", "root");
+ set_if_undefined("VG_ARGS", NULL);
+}
+
+
+/*
* 'clear_env()' - Clear common environment variables.
*/
diff --git a/scheduler/ipp.c b/scheduler/ipp.c
index 1122665bc..5200964c3 100644
--- a/scheduler/ipp.c
+++ b/scheduler/ipp.c
@@ -3,7 +3,7 @@
*
* IPP routines for the CUPS scheduler.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* This file contains Kerberos support code, copyright 2006 by
@@ -3849,7 +3849,7 @@ apple_register_profiles(
(const void **)deviceDictKeys,
(const void **)deviceDictVals,
sizeof(deviceDictKeys) /
- sizeof(deviceDictVals),
+ sizeof(deviceDictKeys[0]),
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks);
deviceUUID = ColorSyncCreateUUIDFromUInt32(device_id);
@@ -5495,7 +5495,11 @@ copy_banner(cupsd_client_t *con, /* I - Client connection */
case IPP_TAG_ENUM :
if (!strncmp(s, "time-at-", 8))
{
- struct timeval tv = { attr->values[i].integer, 0 };
+ struct timeval tv; /* Time value */
+
+ tv.tv_sec = attr->values[i].integer;
+ tv.tv_usec = 0;
+
cupsFilePuts(out, cupsdGetDateTime(&tv, CUPSD_TIME_STANDARD));
}
else
@@ -10689,8 +10693,9 @@ send_document(cupsd_client_t *con, /* I - Client connection */
if (!filetype)
filetype = mimeType(MimeDatabase, super, type);
- cupsdLogJob(job, CUPSD_LOG_DEBUG, "Request file type is %s/%s.",
- filetype->super, filetype->type);
+ if (filetype)
+ cupsdLogJob(job, CUPSD_LOG_DEBUG, "Request file type is %s/%s.",
+ filetype->super, filetype->type);
}
else
filetype = mimeType(MimeDatabase, super, type);
diff --git a/scheduler/job.c b/scheduler/job.c
index 94fc08844..3d7eba1b3 100644
--- a/scheduler/job.c
+++ b/scheduler/job.c
@@ -3,7 +3,7 @@
*
* Job management routines for the CUPS scheduler.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -56,8 +56,6 @@
* load_next_job_id() - Load the NextJobId value from the job.cache
* file.
* load_request_root() - Load jobs from the RequestRoot directory.
- * set_hold_until() - Set the hold time and update job-hold-until
- * attribute.
* set_time() - Set one of the "time-at-xyz" attributes.
* start_job() - Start a print job.
* stop_job() - Stop a print job.
@@ -177,7 +175,6 @@ static size_t ipp_length(ipp_t *ipp);
static void load_job_cache(const char *filename);
static void load_next_job_id(const char *filename);
static void load_request_root(void);
-static void set_hold_until(cupsd_job_t *job, time_t holdtime);
static void set_time(cupsd_job_t *job, const char *name);
static void start_job(cupsd_job_t *job, cupsd_printer_t *printer);
static void stop_job(cupsd_job_t *job, cupsd_jobaction_t action);
@@ -2883,13 +2880,13 @@ finalize_job(cupsd_job_t *job, /* I - Job */
* Try again in N seconds...
*/
- set_hold_until(job, time(NULL) + JobRetryInterval);
-
snprintf(buffer, sizeof(buffer),
"Job held for %d seconds since it could not be sent.",
JobRetryInterval);
- job_state = IPP_JOB_HELD;
- message = buffer;
+
+ job->hold_until = time(NULL) + JobRetryInterval;
+ job_state = IPP_JOB_HELD;
+ message = buffer;
}
}
}
@@ -3062,6 +3059,7 @@ get_options(cupsd_job_t *job, /* I - Job */
!ippFindAttribute(job->attrs,
"com.apple.print.DocumentTicket.PMSpoolFormat",
IPP_TAG_ZERO) &&
+ !ippFindAttribute(job->attrs, "APPrinterPreset", IPP_TAG_ZERO) &&
(ippFindAttribute(job->attrs, "output-mode", IPP_TAG_ZERO) ||
ippFindAttribute(job->attrs, "print-quality", IPP_TAG_ZERO)))
{
@@ -3123,25 +3121,6 @@ get_options(cupsd_job_t *job, /* I - Job */
if (pwg)
{
- if (pwg->sides_option &&
- !ippFindAttribute(job->attrs, pwg->sides_option, IPP_TAG_ZERO) &&
- (attr = ippFindAttribute(job->attrs, "sides", IPP_TAG_KEYWORD)) != NULL)
- {
- /*
- * Add a duplex option...
- */
-
- if (!strcmp(attr->values[0].string.text, "one-sided"))
- num_pwgppds = cupsAddOption(pwg->sides_option, pwg->sides_1sided,
- num_pwgppds, &pwgppds);
- else if (!strcmp(attr->values[0].string.text, "two-sided-long-edge"))
- num_pwgppds = cupsAddOption(pwg->sides_option, pwg->sides_2sided_long,
- num_pwgppds, &pwgppds);
- else if (!strcmp(attr->values[0].string.text, "two-sided-short-edge"))
- num_pwgppds = cupsAddOption(pwg->sides_option, pwg->sides_2sided_short,
- num_pwgppds, &pwgppds);
- }
-
if (!ippFindAttribute(job->attrs, "InputSlot", IPP_TAG_ZERO) &&
!ippFindAttribute(job->attrs, "HPPaperSource", IPP_TAG_ZERO))
{
@@ -3173,7 +3152,32 @@ get_options(cupsd_job_t *job, /* I - Job */
(attr->value_tag == IPP_TAG_KEYWORD ||
attr->value_tag == IPP_TAG_NAME) &&
(ppd = _pwgGetOutputBin(pwg, attr->values[0].string.text)) != NULL)
+ {
+ /*
+ * Map output-bin to OutputBin option...
+ */
+
num_pwgppds = cupsAddOption("OutputBin", ppd, num_pwgppds, &pwgppds);
+ }
+
+ if (pwg->sides_option &&
+ !ippFindAttribute(job->attrs, pwg->sides_option, IPP_TAG_ZERO) &&
+ (attr = ippFindAttribute(job->attrs, "sides", IPP_TAG_KEYWORD)) != NULL)
+ {
+ /*
+ * Map sides to duplex option...
+ */
+
+ if (!strcmp(attr->values[0].string.text, "one-sided"))
+ num_pwgppds = cupsAddOption(pwg->sides_option, pwg->sides_1sided,
+ num_pwgppds, &pwgppds);
+ else if (!strcmp(attr->values[0].string.text, "two-sided-long-edge"))
+ num_pwgppds = cupsAddOption(pwg->sides_option, pwg->sides_2sided_long,
+ num_pwgppds, &pwgppds);
+ else if (!strcmp(attr->values[0].string.text, "two-sided-short-edge"))
+ num_pwgppds = cupsAddOption(pwg->sides_option, pwg->sides_2sided_short,
+ num_pwgppds, &pwgppds);
+ }
}
/*
@@ -3886,58 +3890,6 @@ load_request_root(void)
/*
- * 'set_hold_until()' - Set the hold time and update job-hold-until attribute.
- */
-
-static void
-set_hold_until(cupsd_job_t *job, /* I - Job to update */
- time_t holdtime) /* I - Hold until time */
-{
- ipp_attribute_t *attr; /* job-hold-until attribute */
- struct tm *holddate; /* Hold date */
- char holdstr[64]; /* Hold time */
-
-
- /*
- * Set the hold_until value and hold the job...
- */
-
- cupsdLogMessage(CUPSD_LOG_DEBUG, "set_hold_until: hold_until = %d",
- (int)holdtime);
-
- job->state->values[0].integer = IPP_JOB_HELD;
- job->state_value = IPP_JOB_HELD;
- job->hold_until = holdtime;
-
- /*
- * Update the job-hold-until attribute with a string representing GMT
- * time (HH:MM:SS)...
- */
-
- holddate = gmtime(&holdtime);
- snprintf(holdstr, sizeof(holdstr), "%d:%d:%d", holddate->tm_hour,
- holddate->tm_min, holddate->tm_sec);
-
- if ((attr = ippFindAttribute(job->attrs, "job-hold-until",
- IPP_TAG_KEYWORD)) == NULL)
- attr = ippFindAttribute(job->attrs, "job-hold-until", IPP_TAG_NAME);
-
- /*
- * Either add the attribute or update the value of the existing one
- */
-
- if (attr == NULL)
- ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_KEYWORD, "job-hold-until",
- NULL, holdstr);
- else
- cupsdSetString(&attr->values[0].string.text, holdstr);
-
- job->dirty = 1;
- cupsdMarkDirty(CUPSD_DIRTY_JOBS);
-}
-
-
-/*
* 'set_time()' - Set one of the "time-at-xyz" attributes.
*/
diff --git a/scheduler/printers.c b/scheduler/printers.c
index 8d2de325a..6a6614a91 100644
--- a/scheduler/printers.c
+++ b/scheduler/printers.c
@@ -3,7 +3,7 @@
*
* Printer routines for the CUPS scheduler.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -47,6 +47,8 @@
* compare_printers() - Compare two printers.
* delete_printer_filters() - Delete all MIME filters for a printer.
* delete_string_array() - Delete an array of CUPS strings.
+ * dirty_printer() - Mark config and state files dirty for the
+ * specified printer.
* load_ppd() - Load a cached PPD file, updating the cache as
* needed.
* new_media_col() - Create a media-col collection value.
@@ -69,11 +71,10 @@
#ifdef HAVE_SYS_MOUNT_H
# include <sys/mount.h>
#endif /* HAVE_SYS_MOUNT_H */
-#ifdef HAVE_SYS_STATFS_H
-# include <sys/statfs.h>
-#endif /* HAVE_SYS_STATFS_H */
#ifdef HAVE_SYS_STATVFS_H
# include <sys/statvfs.h>
+#elif defined(HAVE_SYS_STATFS_H)
+# include <sys/statfs.h>
#endif /* HAVE_SYS_STATVFS_H */
#ifdef HAVE_SYS_VFS_H
# include <sys/vfs.h>
@@ -92,6 +93,7 @@ static void add_string_array(cups_array_t **a, const char *s);
static int compare_printers(void *first, void *second, void *data);
static void delete_printer_filters(cupsd_printer_t *p);
static void delete_string_array(cups_array_t **a);
+static void dirty_printer(cupsd_printer_t *p);
static void load_ppd(cupsd_printer_t *p);
static ipp_t *new_media_col(_pwg_size_t *size, const char *source,
const char *type);
@@ -255,13 +257,13 @@ cupsdCreateCommonData(void)
*notifier; /* Current notifier */
cupsd_policy_t *p; /* Current policy */
int k_supported; /* Maximum file size supported */
-#ifdef HAVE_STATFS
- struct statfs spoolinfo; /* FS info for spool directory */
- double spoolsize; /* FS size */
-#elif defined(HAVE_STATVFS)
+#ifdef HAVE_STATVFS
struct statvfs spoolinfo; /* FS info for spool directory */
double spoolsize; /* FS size */
-#endif /* HAVE_STATFS */
+#elif defined(HAVE_STATFS)
+ struct statfs spoolinfo; /* FS info for spool directory */
+ double spoolsize; /* FS size */
+#endif /* HAVE_STATVFS */
static const int nups[] = /* number-up-supported values */
{ 1, 2, 4, 6, 9, 16 };
static const int orients[4] =/* orientation-requested-supported values */
@@ -467,19 +469,19 @@ cupsdCreateCommonData(void)
* or the filesystem is larger than 2TiB, always report INT_MAX.
*/
-#ifdef HAVE_STATFS
- if (statfs(RequestRoot, &spoolinfo))
+#ifdef HAVE_STATVFS
+ if (statvfs(RequestRoot, &spoolinfo))
k_supported = INT_MAX;
- else if ((spoolsize = (double)spoolinfo.f_bsize * spoolinfo.f_blocks / 1024) >
+ else if ((spoolsize = (double)spoolinfo.f_frsize * spoolinfo.f_blocks / 1024) >
INT_MAX)
k_supported = INT_MAX;
else
k_supported = (int)spoolsize;
-#elif defined(HAVE_STATVFS)
- if (statvfs(RequestRoot, &spoolinfo))
+#elif defined(HAVE_STATFS)
+ if (statfs(RequestRoot, &spoolinfo))
k_supported = INT_MAX;
- else if ((spoolsize = (double)spoolinfo.f_frsize * spoolinfo.f_blocks / 1024) >
+ else if ((spoolsize = (double)spoolinfo.f_bsize * spoolinfo.f_blocks / 1024) >
INT_MAX)
k_supported = INT_MAX;
else
@@ -487,7 +489,7 @@ cupsdCreateCommonData(void)
#else
k_supported = INT_MAX;
-#endif /* HAVE_STATFS */
+#endif /* HAVE_STATVFS */
/*
* This list of attributes is sorted to improve performance when the
@@ -770,6 +772,8 @@ cupsdDeletePrinter(
cupsdSetPrinterState(p, IPP_PRINTER_STOPPED, update);
+ p->state = IPP_PRINTER_STOPPED; /* Force for browsed printers */
+
if (p->job)
cupsdSetJobState(p->job, IPP_JOB_PENDING, CUPSD_JOB_FORCE,
update ? "Job stopped due to printer being deleted." :
@@ -2365,8 +2369,24 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
* Tell the client this is a remote printer of some type...
*/
- ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_URI,
- "printer-uri-supported", NULL, p->uri);
+ if (strchr(p->uri, '?'))
+ {
+ /*
+ * Strip trailing "?options" from URI...
+ */
+
+ char *ptr; /* Pointer into URI */
+
+ strlcpy(resource, p->uri, sizeof(resource));
+ if ((ptr = strchr(resource, '?')) != NULL)
+ *ptr = '\0';
+
+ ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_URI,
+ "printer-uri-supported", NULL, resource);
+ }
+ else
+ ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_URI,
+ "printer-uri-supported", NULL, p->uri);
ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_URI, "printer-more-info",
NULL, p->uri);
@@ -2728,10 +2748,7 @@ cupsdSetPrinterReasons(
p->num_reasons = 0;
changed = 1;
- cupsdMarkDirty(CUPSD_DIRTY_PRINTERS);
-
- if (PrintcapFormat == PRINTCAP_PLIST)
- cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP);
+ dirty_printer(p);
}
if (!strcmp(s, "none"))
@@ -2784,12 +2801,7 @@ cupsdSetPrinterReasons(
cupsdSetPrinterState(p, IPP_PRINTER_IDLE, 1);
if (strcmp(reason, "connecting-to-device"))
- {
- cupsdMarkDirty(CUPSD_DIRTY_PRINTERS);
-
- if (PrintcapFormat == PRINTCAP_PLIST)
- cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP);
- }
+ dirty_printer(p);
break;
}
}
@@ -2821,12 +2833,7 @@ cupsdSetPrinterReasons(
cupsdSetPrinterState(p, IPP_PRINTER_STOPPED, 1);
if (strcmp(reason, "connecting-to-device"))
- {
- cupsdMarkDirty(CUPSD_DIRTY_PRINTERS);
-
- if (PrintcapFormat == PRINTCAP_PLIST)
- cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP);
- }
+ dirty_printer(p);
}
}
}
@@ -2865,9 +2872,6 @@ cupsdSetPrinterState(
* Set the new state...
*/
- if (PrintcapFormat == PRINTCAP_PLIST)
- cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP);
-
old_state = p->state;
p->state = s;
@@ -2877,7 +2881,7 @@ cupsdSetPrinterState(
CUPSD_EVENT_PRINTER_STATE, p, NULL,
"%s \"%s\" state changed to %s.",
(p->type & CUPS_PRINTER_CLASS) ? "Class" : "Printer",
- p->name, printer_states[p->state]);
+ p->name, printer_states[p->state - IPP_PRINTER_IDLE]);
/*
* Let the browse code know this needs to be updated...
@@ -2928,12 +2932,7 @@ cupsdSetPrinterState(
if (update &&
(old_state == IPP_PRINTER_STOPPED) != (s == IPP_PRINTER_STOPPED))
- {
- if (p->type & CUPS_PRINTER_CLASS)
- cupsdMarkDirty(CUPSD_DIRTY_CLASSES);
- else
- cupsdMarkDirty(CUPSD_DIRTY_PRINTERS);
- }
+ dirty_printer(p);
}
@@ -3954,6 +3953,26 @@ delete_string_array(cups_array_t **a) /* I - Array */
/*
+ * 'dirty_printer()' - Mark config and state files dirty for the specified
+ * printer.
+ */
+
+static void
+dirty_printer(cupsd_printer_t *p) /* I - Printer */
+{
+ if (p->type & CUPS_PRINTER_DISCOVERED)
+ cupsdMarkDirty(CUPSD_DIRTY_REMOTE);
+ else if (p->type & CUPS_PRINTER_CLASS)
+ cupsdMarkDirty(CUPSD_DIRTY_CLASSES);
+ else
+ cupsdMarkDirty(CUPSD_DIRTY_PRINTERS);
+
+ if (PrintcapFormat == PRINTCAP_PLIST)
+ cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP);
+}
+
+
+/*
* 'load_ppd()' - Load a cached PPD file, updating the cache as needed.
*/
@@ -4741,7 +4760,18 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
p->type |= CUPS_PRINTER_COMMANDS;
}
- if (ppd->num_filters == 0)
+ if ((ppd_attr = ppdFindAttr(ppd, "cupsCommands", NULL)) != NULL &&
+ ppd_attr->value &&
+ (!ppd_attr->value[0] || !strcasecmp(ppd_attr->value, "none")))
+ {
+ /*
+ * Printer does not support CUPS command files (or any commands as far as
+ * CUPS is concerned...
+ */
+
+ p->type &= ~CUPS_PRINTER_COMMANDS;
+ }
+ else if (ppd->num_filters == 0)
{
/*
* If there are no filters, add PostScript printing filters.
@@ -4786,8 +4816,7 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
int count; /* Number of commands */
- if ((ppd_attr = ppdFindAttr(ppd, "cupsCommands", NULL)) != NULL &&
- ppd_attr->value && ppd_attr->value[0])
+ if (ppd_attr && ppd_attr->value && ppd_attr->value[0])
{
for (count = 0, start = ppd_attr->value; *start; count ++)
{
@@ -4807,7 +4836,8 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
if (count > 0)
{
/*
- * Make a copy of the commands string and count how many ...
+ * Make a copy of the commands string and count how many commands there
+ * are...
*/
attr = ippAddStrings(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
@@ -5110,8 +5140,25 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
* remote printer...
*/
- ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_URI,
- "printer-uri-supported", NULL, p->device_uri);
+ if (strchr(p->device_uri, '?'))
+ {
+ /*
+ * Strip trailing "?options" from URI...
+ */
+
+ char resource[HTTP_MAX_URI], /* New URI */
+ *ptr; /* Pointer into URI */
+
+ strlcpy(resource, p->device_uri, sizeof(resource));
+ if ((ptr = strchr(resource, '?')) != NULL)
+ *ptr = '\0';
+
+ ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_URI,
+ "printer-uri-supported", NULL, resource);
+ }
+ else
+ ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_URI,
+ "printer-uri-supported", NULL, p->device_uri);
/*
* Then set the make-and-model accordingly...
diff --git a/scheduler/process.c b/scheduler/process.c
index 153ba2746..850217406 100644
--- a/scheduler/process.c
+++ b/scheduler/process.c
@@ -32,10 +32,6 @@
#ifdef __APPLE__
# include <libgen.h>
#endif /* __APPLE__ */
-#ifdef HAVE_SANDBOX_H
-# define __APPLE_API_PRIVATE
-# include <sandbox.h>
-#endif /* HAVE_SANDBOX_H */
/*
@@ -83,7 +79,7 @@ cupsdCreateProfile(int job_id) /* I - Job ID or 0 for none */
temp[1024]; /* Quoted TempDir */
- if (!UseProfiles || RunUser)
+ if (!UseProfiles)
{
/*
* Only use sandbox profiles as root...
@@ -104,6 +100,9 @@ cupsdCreateProfile(int job_id) /* I - Job ID or 0 for none */
return (NULL);
}
+ fchown(cupsFileNumber(fp), RunUser, Group);
+ fchmod(cupsFileNumber(fp), 0640);
+
cupsd_requote(cache, CacheDir, sizeof(cache));
cupsd_requote(request, RequestRoot, sizeof(request));
cupsd_requote(root, ServerRoot, sizeof(root));
@@ -118,10 +117,15 @@ cupsdCreateProfile(int job_id) /* I - Job ID or 0 for none */
" (regex"
" #\"^%s$\"" /* RequestRoot */
" #\"^%s/\"" /* RequestRoot/... */
- " #\"^/Users$\""
- " #\"^/Users/\""
"))\n",
request, request);
+ if (!RunUser)
+ cupsFilePuts(fp,
+ "(deny file-write* file-read-data file-read-metadata\n"
+ " (regex"
+ " #\"^/Users$\""
+ " #\"^/Users/\""
+ "))\n");
cupsFilePrintf(fp,
"(deny file-write*\n"
" (regex"
@@ -290,6 +294,9 @@ cupsdStartProcess(
cupsd_job_t *job, /* I - Job associated with process */
int *pid) /* O - Process ID */
{
+ int i; /* Looping var */
+ char *real_argv[103], /* Real command-line arguments */
+ cups_exec[1024]; /* Path to "cups-exec" program */
int user; /* Command UID */
struct stat commandinfo; /* Command file information */
cupsd_proc_t *proc; /* New process record */
@@ -303,6 +310,10 @@ cupsdStartProcess(
#endif /* __APPLE__ */
+ /*
+ * Figure out the UID for the child process...
+ */
+
if (RunUser)
user = RunUser;
else if (root)
@@ -310,6 +321,10 @@ cupsdStartProcess(
else
user = User;
+ /*
+ * Check the permissions of the command we are running...
+ */
+
if (stat(command, &commandinfo))
{
*pid = 0;
@@ -412,6 +427,29 @@ cupsdStartProcess(
#endif /* __APPLE__ */
/*
+ * Use helper program when we have a sandbox profile...
+ */
+
+ if (profile)
+ {
+ snprintf(cups_exec, sizeof(cups_exec), "%s/daemon/cups-exec", ServerBin);
+
+ real_argv[0] = cups_exec;
+ real_argv[1] = profile;
+ real_argv[2] = (char *)command;
+
+ for (i = 0;
+ i < (int)(sizeof(real_argv) / sizeof(real_argv[0]) - 4) && argv[i];
+ i ++)
+ real_argv[i + 3] = argv[i];
+
+ real_argv[i + 3] = NULL;
+
+ argv = real_argv;
+ command = cups_exec;
+ }
+
+ /*
* Block signals before forking...
*/
@@ -483,24 +521,6 @@ cupsdStartProcess(
if (!root)
nice(FilterNice);
-#ifdef HAVE_SANDBOX_H
- /*
- * Run in a separate security profile...
- */
-
- if (profile)
- {
- char *error = NULL; /* Sandbox error, if any */
-
- if (sandbox_init((char *)profile, SANDBOX_NAMED_EXTERNAL, &error))
- {
- fprintf(stderr, "ERROR: sandbox_init failed: %s (%s)\n", error,
- strerror(errno));
- sandbox_free_error(error);
- }
- }
-#endif /* HAVE_SANDBOX_H */
-
/*
* Change user to something "safe"...
*/
@@ -565,8 +585,8 @@ cupsdStartProcess(
cupsdReleaseSignals();
/*
- * Execute the command; if for some reason this doesn't work,
- * return the error code...
+ * Execute the command; if for some reason this doesn't work, log an error
+ * exit with a non-zero value...
*/
if (envp)
@@ -576,7 +596,7 @@ cupsdStartProcess(
perror(command);
- exit(errno);
+ exit(1);
}
else if (*pid < 0)
{
diff --git a/scheduler/subscriptions.c b/scheduler/subscriptions.c
index 92dffe642..c30762eb4 100644
--- a/scheduler/subscriptions.c
+++ b/scheduler/subscriptions.c
@@ -3,7 +3,7 @@
*
* Subscription routines for the CUPS scheduler.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -156,7 +156,7 @@ cupsdAddEvent(
"notify-charset", NULL, "utf-8");
ippAddString(temp->attrs, IPP_TAG_EVENT_NOTIFICATION, IPP_TAG_LANGUAGE,
- "notify-natural-langugage", NULL, "en-US");
+ "notify-natural-language", NULL, "en-US");
ippAddInteger(temp->attrs, IPP_TAG_EVENT_NOTIFICATION, IPP_TAG_INTEGER,
"notify-subscription-id", sub->id);
diff --git a/systemv/cupsctl.c b/systemv/cupsctl.c
index 7dc3cf3ff..03b4bc05b 100644
--- a/systemv/cupsctl.c
+++ b/systemv/cupsctl.c
@@ -3,7 +3,7 @@
*
* Scheduler control program for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 2006-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -141,6 +141,13 @@ main(int argc, /* I - Number of command-line args */
usage(argv[i]);
}
+ if (cupsGetOption("Listen", num_settings, settings) ||
+ cupsGetOption("Port", num_settings, settings))
+ {
+ _cupsLangPuts(stderr, _("cupsctl: Cannot set Listen or Port directly.\n"));
+ return (1);
+ }
+
/*
* Connect to the server using the defaults...
*/
diff --git a/systemv/lpadmin.c b/systemv/lpadmin.c
index 38a87bb70..b2337167c 100644
--- a/systemv/lpadmin.c
+++ b/systemv/lpadmin.c
@@ -3,7 +3,7 @@
*
* "lpadmin" command for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -1230,7 +1230,7 @@ set_printer_options(
ppdMarkDefaults(ppd);
cupsMarkOptions(ppd, num_options, options);
- if ((out = cupsTempFile2(tempfile, sizeof(tempfile))) < 0)
+ if ((out = cupsTempFile2(tempfile, sizeof(tempfile))) == NULL)
{
_cupsLangPrintError(NULL, _("lpadmin: Unable to create temporary file"));
ippDelete(request);
diff --git a/templates/add-rss-subscription.tmpl b/templates/add-rss-subscription.tmpl
index e0727835b..17e3fa0d3 100644
--- a/templates/add-rss-subscription.tmpl
+++ b/templates/add-rss-subscription.tmpl
@@ -33,7 +33,7 @@
</TR>
<TR>
<TH CLASS="label">Maximum Events in Feed:</TH>
-<TD COLSPAN="5"><INPUT TYPE="TEXT" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
+<TD COLSPAN="5"><INPUT TYPE="NUMBER" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
</TR>
<TR>
<TD></TD>
diff --git a/templates/choose-uri.tmpl b/templates/choose-uri.tmpl
index e62ea1e13..45d84de19 100644
--- a/templates/choose-uri.tmpl
+++ b/templates/choose-uri.tmpl
@@ -11,7 +11,7 @@
<TABLE>
<TR>
<TH CLASS="label">Connection:</TH>
-<TD><INPUT TYPE="TEXT" SIZE="60" MAXLENGTH="1023" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
+<TD><INPUT TYPE="URL" SIZE="60" MAXLENGTH="1023" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
</TR>
<TR>
<TD></TD>
diff --git a/templates/class.tmpl b/templates/class.tmpl
index 9987062d2..477e0e8ed 100644
--- a/templates/class.tmpl
+++ b/templates/class.tmpl
@@ -20,6 +20,7 @@
<FORM METHOD="POST" ACTION="{admin_uri}" NAME="administration">
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">
+<INPUT TYPE="HIDDEN" NAME="IS_CLASS" VALUE="1">
<SELECT NAME="OP" ONCHANGE="document.administration.submit();">
<OPTION VALUE="">Administration</OPTION>
<OPTION VALUE="modify-class">Modify Class</OPTION>
diff --git a/templates/de/add-rss-subscription.tmpl b/templates/de/add-rss-subscription.tmpl
index 86b08b2f6..6b92facb2 100644
--- a/templates/de/add-rss-subscription.tmpl
+++ b/templates/de/add-rss-subscription.tmpl
@@ -33,7 +33,7 @@
</TR>
<TR>
<TH CLASS="label">Maximale Ereignisse in Durchf&uuml;hrung:</TH>
-<TD COLSPAN="5"><INPUT TYPE="TEXT" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
+<TD COLSPAN="5"><INPUT TYPE="NUMBER" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
</TR>
<TR>
<TD></TD>
diff --git a/templates/de/choose-uri.tmpl b/templates/de/choose-uri.tmpl
index 073b0d824..0633fd6cd 100644
--- a/templates/de/choose-uri.tmpl
+++ b/templates/de/choose-uri.tmpl
@@ -11,7 +11,7 @@
<TABLE>
<TR>
<TH CLASS="label">Verbindung:</TH>
-<TD><INPUT TYPE="TEXT" SIZE="60" MAXLENGTH="1024" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
+<TD><INPUT TYPE="URL" SIZE="60" MAXLENGTH="1024" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
</TR>
<TR>
<TD></TD>
diff --git a/templates/de/class.tmpl b/templates/de/class.tmpl
index a64a2daef..61a89dc7e 100644
--- a/templates/de/class.tmpl
+++ b/templates/de/class.tmpl
@@ -20,6 +20,7 @@
<FORM METHOD="POST" ACTION="{admin_uri}" NAME="administration">
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">
+<INPUT TYPE="HIDDEN" NAME="IS_CLASS" VALUE="1">
<SELECT NAME="OP" ONCHANGE="document.administration.submit();">
<OPTION VALUE="">Administration</OPTION>
<OPTION VALUE="modify-class">Klasse &auml;ndern</OPTION>
diff --git a/templates/de/option-pickone.tmpl b/templates/de/option-pickone.tmpl
index c88fe0599..111397ce9 100644
--- a/templates/de/option-pickone.tmpl
+++ b/templates/de/option-pickone.tmpl
@@ -5,14 +5,14 @@
</SELECT>
{iscustom=1?<TABLE NAME="paramtable" id="{keyword}-params">{[params]
<TR><TH CLASS="sublabel">{paramtext}:</TH>
-<TD>{params=Units?<SELECT NAME="{keyword}.{params}">
+<TD>{params=Units?<SELECT NAME="{keyword-1}.{params}">
<OPTION VALUE="pt"{paramvalue=pt? SELECTED:}>Punkte</OPTION>
<OPTION VALUE="mm"{paramvalue=mm? SELECTED:}>Millimeter</OPTION>
<OPTION VALUE="cm"{paramvalue=cm? SELECTED:}>Zentimeter</OPTION>
<OPTION VALUE="in"{paramvalue=in? SELECTED:}>Zoll</OPTION>
<OPTION VALUE="ft"{paramvalue=ft? SELECTED:}>Fu&szlig;</OPTION>
<OPTION VALUE="m"{paramvalue=m? SELECTED:}>Meter</OPTION>
-</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword}.{params}" VALUE="{paramvalue}">}</TD></TR>
+</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword-1}.{params}" VALUE="{paramvalue}">}</TD></TR>
}</TABLE>
</TD>:}
</TR>
diff --git a/templates/de/trailer.tmpl b/templates/de/trailer.tmpl
index 40f01c324..74f62ad7e 100644
--- a/templates/de/trailer.tmpl
+++ b/templates/de/trailer.tmpl
@@ -2,7 +2,7 @@
<TR><TD>&nbsp;</TD></TR>
<TR><TD CLASS="trailer">CUPS und das CUPS Logo sind
eingetragene Warenzeichen der <A HREF="http://www.apple.com">Apple Inc.</A> CUPS
-ist urheberrechtlich gesch&uuml;tzt 2007-2010 von Apple Inc, alle Rechte vorbehalten.</TD></TR>
+ist urheberrechtlich gesch&uuml;tzt 2007-2011 von Apple Inc, alle Rechte vorbehalten.</TD></TR>
</TABLE>
</BODY>
</HTML>
diff --git a/templates/es/add-rss-subscription.tmpl b/templates/es/add-rss-subscription.tmpl
index 8fb7f3da0..d17c86eef 100644
--- a/templates/es/add-rss-subscription.tmpl
+++ b/templates/es/add-rss-subscription.tmpl
@@ -33,7 +33,7 @@
</TR>
<TR>
<TH CLASS="label">N&uacute;mero m&aacute;ximo de eventos del canal:</TH>
-<TD COLSPAN="5"><INPUT TYPE="TEXT" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
+<TD COLSPAN="5"><INPUT TYPE="NUMBER" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
</TR>
<TR>
<TD></TD>
diff --git a/templates/es/choose-uri.tmpl b/templates/es/choose-uri.tmpl
index c02577395..46ea17b13 100644
--- a/templates/es/choose-uri.tmpl
+++ b/templates/es/choose-uri.tmpl
@@ -11,7 +11,7 @@
<TABLE>
<TR>
<TH CLASS="label">Conexi&oacute;n:</TH>
-<TD><INPUT TYPE="TEXT" SIZE="60" MAXLENGTH="1023" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
+<TD><INPUT TYPE="URL" SIZE="60" MAXLENGTH="1023" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
</TR>
<TR>
<TD></TD>
diff --git a/templates/es/class.tmpl b/templates/es/class.tmpl
index f3704380b..5eea4f195 100644
--- a/templates/es/class.tmpl
+++ b/templates/es/class.tmpl
@@ -20,6 +20,7 @@
<FORM METHOD="POST" ACTION="{admin_uri}" NAME="administration">
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">
+<INPUT TYPE="HIDDEN" NAME="IS_CLASS" VALUE="1">
<SELECT NAME="OP" ONCHANGE="document.administration.submit();">
<OPTION VALUE="">Administraci&oacute;n</OPTION>
<OPTION VALUE="modify-class">Modificar clase</OPTION>
diff --git a/templates/es/option-pickone.tmpl b/templates/es/option-pickone.tmpl
index 8690af054..40fd124c4 100644
--- a/templates/es/option-pickone.tmpl
+++ b/templates/es/option-pickone.tmpl
@@ -5,14 +5,14 @@
</SELECT>
{iscustom=1?<TABLE NAME="paramtable" id="{keyword}-params">{[params]
<TR><TH CLASS="sublabel">{paramtext}:</TH>
-<TD>{params=Units?<SELECT NAME="{keyword}.{params}">
+<TD>{params=Units?<SELECT NAME="{keyword-1}.{params}">
<OPTION VALUE="pt"{paramvalue=pt? SELECTED:}>Puntos</OPTION>
<OPTION VALUE="mm"{paramvalue=mm? SELECTED:}>Mil&iacute;metros</OPTION>
<OPTION VALUE="cm"{paramvalue=cm? SELECTED:}>Cent&iacute;metros</OPTION>
<OPTION VALUE="in"{paramvalue=in? SELECTED:}>Pulgadas</OPTION>
<OPTION VALUE="ft"{paramvalue=ft? SELECTED:}>Pies</OPTION>
<OPTION VALUE="m"{paramvalue=m? SELECTED:}>Metros</OPTION>
-</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword}.{params}" VALUE="{paramvalue}">}</TD></TR>
+</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword-1}.{params}" VALUE="{paramvalue}">}</TD></TR>
}</TABLE>
</TD>:}
</TR>
diff --git a/templates/es/trailer.tmpl b/templates/es/trailer.tmpl
index 59f806800..3bd550b06 100644
--- a/templates/es/trailer.tmpl
+++ b/templates/es/trailer.tmpl
@@ -2,7 +2,7 @@
<TR><TD>&nbsp;</TD></TR>
<TR><TD CLASS="trailer">CUPS y el logo de CUPS son marcas registradas de
<A HREF="http://www.apple.com">Apple, Inc.</A> Los derechos de copia de CUPS
-2007-2010 son de Apple Inc. Todos los derechos reservados.</TD></TR>
+2007-2011 son de Apple Inc. Todos los derechos reservados.</TD></TR>
</TABLE>
</BODY>
</HTML>
diff --git a/templates/eu/add-rss-subscription.tmpl b/templates/eu/add-rss-subscription.tmpl
index b81b5b22f..86025a2dc 100644
--- a/templates/eu/add-rss-subscription.tmpl
+++ b/templates/eu/add-rss-subscription.tmpl
@@ -33,7 +33,7 @@
</TR>
<TR>
<TH CLASS="label">Gehienezko gertaerak iturrian:</TH>
-<TD COLSPAN="5"><INPUT TYPE="TEXT" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
+<TD COLSPAN="5"><INPUT TYPE="NUMBER" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
</TR>
<TR>
<TD></TD>
diff --git a/templates/eu/choose-uri.tmpl b/templates/eu/choose-uri.tmpl
index 2c7d0f270..4b1fd677b 100644
--- a/templates/eu/choose-uri.tmpl
+++ b/templates/eu/choose-uri.tmpl
@@ -11,7 +11,7 @@
<TABLE>
<TR>
<TH CLASS="label">Konexioa:</TH>
-<TD><INPUT TYPE="TEXT" SIZE="60" MAXLENGTH="1023" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
+<TD><INPUT TYPE="URL" SIZE="60" MAXLENGTH="1023" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
</TR>
<TR>
<TD></TD>
diff --git a/templates/eu/class.tmpl b/templates/eu/class.tmpl
index 17e8c2694..b3c68ca84 100644
--- a/templates/eu/class.tmpl
+++ b/templates/eu/class.tmpl
@@ -20,6 +20,7 @@
<FORM METHOD="POST" ACTION="{admin_uri}" NAME="administration">
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">
+<INPUT TYPE="HIDDEN" NAME="IS_CLASS" VALUE="1">
<SELECT NAME="OP" ONCHANGE="document.administration.submit();">
<OPTION VALUE="">Administrazioa</OPTION>
<OPTION VALUE="modify-class">Aldatu klasea</OPTION>
diff --git a/templates/eu/option-pickone.tmpl b/templates/eu/option-pickone.tmpl
index bec16df29..70866dfb5 100644
--- a/templates/eu/option-pickone.tmpl
+++ b/templates/eu/option-pickone.tmpl
@@ -5,14 +5,14 @@
</SELECT>
{iscustom=1?<TABLE NAME="paramtable" id="{keyword}-params">{[params]
<TR><TH CLASS="sublabel">{paramtext}:</TH>
-<TD>{params=Units?<SELECT NAME="{keyword}.{params}">
+<TD>{params=Units?<SELECT NAME="{keyword-1}.{params}">
<OPTION VALUE="pt"{paramvalue=pt? SELECTED:}>Puntuak</OPTION>
<OPTION VALUE="mm"{paramvalue=mm? SELECTED:}>Milimetroak</OPTION>
<OPTION VALUE="cm"{paramvalue=cm? SELECTED:}>Zentimetroak</OPTION>
<OPTION VALUE="in"{paramvalue=in? SELECTED:}>Hatzak</OPTION>
<OPTION VALUE="ft"{paramvalue=ft? SELECTED:}>Oinak</OPTION>
<OPTION VALUE="m"{paramvalue=m? SELECTED:}>Metroak</OPTION>
-</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword}.{params}" VALUE="{paramvalue}">}</TD></TR>
+</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword-1}.{params}" VALUE="{paramvalue}">}</TD></TR>
}</TABLE>
</TD>:}
</TR>
diff --git a/templates/eu/trailer.tmpl b/templates/eu/trailer.tmpl
index 2f4f3c8c5..92df00523 100644
--- a/templates/eu/trailer.tmpl
+++ b/templates/eu/trailer.tmpl
@@ -1,7 +1,7 @@
</TD></TR>
<TR><TD>&nbsp;</TD></TR>
<TR><TD CLASS="trailer">CUPS eta CUPSen logotipoa <A HREF="http://www.apple.com">Apple Inc.</A>en
-marka errejistratuak dira. CUPSen copyright-a: 2007-2010 Apple
+marka errejistratuak dira. CUPSen copyright-a: 2007-2011 Apple
Inc. eskubide guztiak gordeta.</TD></TR>
</TABLE>
</BODY>
diff --git a/templates/id/add-rss-subscription.tmpl b/templates/id/add-rss-subscription.tmpl
index 3d5ae7d70..bf8f9644b 100644
--- a/templates/id/add-rss-subscription.tmpl
+++ b/templates/id/add-rss-subscription.tmpl
@@ -33,7 +33,7 @@
</TR>
<TR>
<TH CLASS="label">Maksimal Kejadian dalam Berita:</TH>
-<TD COLSPAN="5"><INPUT TYPE="TEXT" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
+<TD COLSPAN="5"><INPUT TYPE="NUMBER" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
</TR>
<TR>
<TD></TD>
diff --git a/templates/id/choose-uri.tmpl b/templates/id/choose-uri.tmpl
index 61dfdfe62..4391b9114 100644
--- a/templates/id/choose-uri.tmpl
+++ b/templates/id/choose-uri.tmpl
@@ -11,7 +11,7 @@
<TABLE>
<TR>
<TH CLASS="label">Koneksi:</TH>
-<TD><INPUT TYPE="TEXT" SIZE="60" MAXLENGTH="1023" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
+<TD><INPUT TYPE="URL" SIZE="60" MAXLENGTH="1023" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
</TR>
<TR>
<TD></TD>
diff --git a/templates/id/class.tmpl b/templates/id/class.tmpl
index 6cb78c99a..af2178736 100644
--- a/templates/id/class.tmpl
+++ b/templates/id/class.tmpl
@@ -20,6 +20,7 @@
<FORM METHOD="POST" ACTION="{admin_uri}" NAME="administration">
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">
+<INPUT TYPE="HIDDEN" NAME="IS_CLASS" VALUE="1">
<SELECT NAME="OP" ONCHANGE="document.administration.submit();">
<OPTION VALUE="">Administrasi</OPTION>
<OPTION VALUE="modify-class">Ubah Kelas</OPTION>
diff --git a/templates/id/option-pickone.tmpl b/templates/id/option-pickone.tmpl
index 33fca8ab6..8ee71b316 100644
--- a/templates/id/option-pickone.tmpl
+++ b/templates/id/option-pickone.tmpl
@@ -5,14 +5,14 @@
</SELECT>
{iscustom=1?<TABLE NAME="paramtable" id="{keyword}-params">{[params]
<TR><TH CLASS="sublabel">{paramtext}:</TH>
-<TD>{params=Units?<SELECT NAME="{keyword}.{params}">
+<TD>{params=Units?<SELECT NAME="{keyword-1}.{params}">
<OPTION VALUE="pt"{paramvalue=pt? SELECTED:}>Poin</OPTION>
<OPTION VALUE="mm"{paramvalue=mm? SELECTED:}>Milimeter</OPTION>
<OPTION VALUE="cm"{paramvalue=cm? SELECTED:}>Sentimeter</OPTION>
<OPTION VALUE="in"{paramvalue=in? SELECTED:}>Inci</OPTION>
<OPTION VALUE="ft"{paramvalue=ft? SELECTED:}>Kaki</OPTION>
<OPTION VALUE="m"{paramvalue=m? SELECTED:}>Meter</OPTION>
-</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword}.{params}" VALUE="{paramvalue}">}</TD></TR>
+</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword-1}.{params}" VALUE="{paramvalue}">}</TD></TR>
}</TABLE>
</TD>:}
</TR>
diff --git a/templates/id/trailer.tmpl b/templates/id/trailer.tmpl
index b729e56a1..eb53dddb9 100644
--- a/templates/id/trailer.tmpl
+++ b/templates/id/trailer.tmpl
@@ -1,7 +1,7 @@
</TD></TR>
<TR><TD>&nbsp;</TD></TR>
<TR><TD CLASS="trailer">CUPS dan logo CUPS adalah merek dagang dari
-<A HREF="http://www.apple.com">Apple Inc.</A> Hak Cipta CUPS adalah 2007-2010 Apple
+<A HREF="http://www.apple.com">Apple Inc.</A> Hak Cipta CUPS adalah 2007-2011 Apple
Inc. Semua hak terpelihara.</TD></TR>
</TABLE>
</BODY>
diff --git a/templates/it/add-rss-subscription.tmpl b/templates/it/add-rss-subscription.tmpl
index ba33c14fd..c85e45f0f 100644
--- a/templates/it/add-rss-subscription.tmpl
+++ b/templates/it/add-rss-subscription.tmpl
@@ -33,7 +33,7 @@
</TR>
<TR>
<TH CLASS="label">N. massimo di eventi nella fonte:</TH>
-<TD COLSPAN="5"><INPUT TYPE="TEXT" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
+<TD COLSPAN="5"><INPUT TYPE="NUMBER" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
</TR>
<TR>
<TD></TD>
diff --git a/templates/it/choose-uri.tmpl b/templates/it/choose-uri.tmpl
index 8a4b68584..81b153a0a 100644
--- a/templates/it/choose-uri.tmpl
+++ b/templates/it/choose-uri.tmpl
@@ -11,7 +11,7 @@
<TABLE>
<TR>
<TH CLASS="label">Connection:</TH>
-<TD><INPUT TYPE="TEXT" SIZE="60" MAXLENGTH="1023" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
+<TD><INPUT TYPE="URL" SIZE="60" MAXLENGTH="1023" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
</TR>
<TR>
<TD></TD>
diff --git a/templates/it/class.tmpl b/templates/it/class.tmpl
index 06a768acf..0089c9346 100644
--- a/templates/it/class.tmpl
+++ b/templates/it/class.tmpl
@@ -20,6 +20,7 @@
<FORM METHOD="POST" ACTION="{admin_uri}" NAME="administration">
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">
+<INPUT TYPE="HIDDEN" NAME="IS_CLASS" VALUE="1">
<SELECT NAME="OP" ONCHANGE="document.administration.submit();">
<OPTION VALUE="">Amministrazione</OPTION>
<OPTION VALUE="modify-class">Modifica classe</OPTION>
diff --git a/templates/it/option-pickone.tmpl b/templates/it/option-pickone.tmpl
index 528ef7c89..c21fc71ba 100644
--- a/templates/it/option-pickone.tmpl
+++ b/templates/it/option-pickone.tmpl
@@ -5,14 +5,14 @@
</SELECT>
{iscustom=1?<TABLE NAME="paramtable" id="{keyword}-params">{[params]
<TR><TH CLASS="sublabel">{paramtext}:</TH>
-<TD>{params=Units?<SELECT NAME="{keyword}.{params}">
+<TD>{params=Units?<SELECT NAME="{keyword-1}.{params}">
<OPTION VALUE="pt"{paramvalue=pt? SELECTED:}>Punti</OPTION>
<OPTION VALUE="mm"{paramvalue=mm? SELECTED:}>Millimetri</OPTION>
<OPTION VALUE="cm"{paramvalue=cm? SELECTED:}>Centimetri</OPTION>
<OPTION VALUE="in"{paramvalue=in? SELECTED:}>Pollici</OPTION>
<OPTION VALUE="ft"{paramvalue=ft? SELECTED:}>Piedi</OPTION>
<OPTION VALUE="m"{paramvalue=m? SELECTED:}>Metri</OPTION>
-</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword}.{params}" VALUE="{paramvalue}">}</TD></TR>
+</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword-1}.{params}" VALUE="{paramvalue}">}</TD></TR>
}</TABLE>
</TD>:}
</TR>
diff --git a/templates/it/trailer.tmpl b/templates/it/trailer.tmpl
index 788a8967f..303b5b86b 100644
--- a/templates/it/trailer.tmpl
+++ b/templates/it/trailer.tmpl
@@ -1,7 +1,7 @@
</TD></TR>
<TR><TD>&nbsp;</TD></TR>
<TR><TD CLASS="trailer">CUPS e il logo CUPS sono marchi di
-<A HREF="http://www.apple.com">Apple Inc.</A> CUPS è un copyright 2007-2010 Apple
+<A HREF="http://www.apple.com">Apple Inc.</A> CUPS è un copyright 2007-2011 Apple
Inc. Tutti i diritti sono riservati.</TD></TR>
</TABLE>
</BODY>
diff --git a/templates/ja/add-rss-subscription.tmpl b/templates/ja/add-rss-subscription.tmpl
index 70203c1f9..c5afeb068 100644
--- a/templates/ja/add-rss-subscription.tmpl
+++ b/templates/ja/add-rss-subscription.tmpl
@@ -33,7 +33,7 @@
</TR>
<TR>
<TH CLASS="label">フィード内の最大イベント数:</TH>
-<TD COLSPAN="5"><INPUT TYPE="TEXT" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
+<TD COLSPAN="5"><INPUT TYPE="NUMBER" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
</TR>
<TR>
<TD></TD>
diff --git a/templates/ja/choose-uri.tmpl b/templates/ja/choose-uri.tmpl
index bc8c0bc03..48978edf6 100644
--- a/templates/ja/choose-uri.tmpl
+++ b/templates/ja/choose-uri.tmpl
@@ -11,7 +11,7 @@
<TABLE>
<TR>
<TH CLASS="label">接続:</TH>
-<TD><INPUT TYPE="TEXT" SIZE="60" MAXLENGTH="1024" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
+<TD><INPUT TYPE="URL" SIZE="60" MAXLENGTH="1024" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
</TR>
<TR>
<TD></TD>
diff --git a/templates/ja/class.tmpl b/templates/ja/class.tmpl
index 2ee45eea1..c28407642 100644
--- a/templates/ja/class.tmpl
+++ b/templates/ja/class.tmpl
@@ -20,6 +20,7 @@
<FORM METHOD="POST" ACTION="{admin_uri}" NAME="administration">
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">
+<INPUT TYPE="HIDDEN" NAME="IS_CLASS" VALUE="1">
<SELECT NAME="OP" ONCHANGE="document.administration.submit();">
<OPTION VALUE="">管理</OPTION>
<OPTION VALUE="modify-class">クラスの変更</OPTION>
diff --git a/templates/ja/option-pickone.tmpl b/templates/ja/option-pickone.tmpl
index 58b267a9c..514e2abc2 100644
--- a/templates/ja/option-pickone.tmpl
+++ b/templates/ja/option-pickone.tmpl
@@ -5,14 +5,14 @@
</SELECT>
{iscustom=1?<TABLE NAME="paramtable" id="{keyword}-params">{[params]
<TR><TH CLASS="sublabel">{paramtext}:</TH>
-<TD>{params=Units?<SELECT NAME="{keyword}.{params}">
+<TD>{params=Units?<SELECT NAME="{keyword-1}.{params}">
<OPTION VALUE="pt"{paramvalue=pt? SELECTED:}>ポイント</OPTION>
<OPTION VALUE="mm"{paramvalue=mm? SELECTED:}>ミリメートル</OPTION>
<OPTION VALUE="cm"{paramvalue=cm? SELECTED:}>センチメートル</OPTION>
<OPTION VALUE="in"{paramvalue=in? SELECTED:}>インチ</OPTION>
<OPTION VALUE="ft"{paramvalue=ft? SELECTED:}>フィート</OPTION>
<OPTION VALUE="m"{paramvalue=m? SELECTED:}>メートル</OPTION>
-</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword}.{params}" VALUE="{paramvalue}">}</TD></TR>
+</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword-1}.{params}" VALUE="{paramvalue}">}</TD></TR>
}</TABLE>
</TD>:}
</TR>
diff --git a/templates/ja/trailer.tmpl b/templates/ja/trailer.tmpl
index 62709b534..100d9f7ad 100644
--- a/templates/ja/trailer.tmpl
+++ b/templates/ja/trailer.tmpl
@@ -1,7 +1,7 @@
</TD></TR>
<TR><TD>&nbsp;</TD></TR>
<TR><TD CLASS="trailer">CUPS and the CUPS logo are trademarks of
-<A HREF="http://www.apple.com">Apple Inc.</A> CUPS is copyright 2007-2010 Apple
+<A HREF="http://www.apple.com">Apple Inc.</A> CUPS is copyright 2007-2011 Apple
Inc. All rights reserved.</TD></TR>
</TABLE>
</BODY>
diff --git a/templates/jobs.tmpl b/templates/jobs.tmpl
index 9c56b3f94..625059f62 100644
--- a/templates/jobs.tmpl
+++ b/templates/jobs.tmpl
@@ -8,7 +8,7 @@
<TR VALIGN="TOP">
<TD><A HREF="{job_printer_uri}">{job_printer_name}</A>-{job_id}&nbsp;</TD>
<TD>{?job_name=?Unknown:{job_name}}&nbsp;</TD>
-<TD>{job_originating_user_name}&nbsp;</TD>
+<TD>{?job_originating_user_name=?Withheld:{job_originating_user_name}}&nbsp;</TD>
<TD>{job_k_octets}k&nbsp;</TD>
<TD>{job_media_sheets_completed=0?Unknown:{?job_media_sheets_completed}}&nbsp;</TD>
<TD>{job_state=3?pending since<BR>{time_at_creation}:{job_state=4?held since<BR>{time_at_creation}:
diff --git a/templates/option-pickone.tmpl b/templates/option-pickone.tmpl
index 5030c4637..890ef4e7d 100644
--- a/templates/option-pickone.tmpl
+++ b/templates/option-pickone.tmpl
@@ -5,14 +5,14 @@
</SELECT>
{iscustom=1?<TABLE NAME="paramtable" id="{keyword}-params">{[params]
<TR><TH CLASS="sublabel">{paramtext}:</TH>
-<TD>{params=Units?<SELECT NAME="{keyword}.{params}">
+<TD>{params=Units?<SELECT NAME="{keyword-1}.{params}">
<OPTION VALUE="pt"{paramvalue=pt? SELECTED:}>Points</OPTION>
<OPTION VALUE="mm"{paramvalue=mm? SELECTED:}>Millimeters</OPTION>
<OPTION VALUE="cm"{paramvalue=cm? SELECTED:}>Centimeters</OPTION>
<OPTION VALUE="in"{paramvalue=in? SELECTED:}>Inches</OPTION>
<OPTION VALUE="ft"{paramvalue=ft? SELECTED:}>Feet</OPTION>
<OPTION VALUE="m"{paramvalue=m? SELECTED:}>Meters</OPTION>
-</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword}.{params}" VALUE="{paramvalue}">}</TD></TR>
+</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword-1}.{params}" VALUE="{paramvalue}">}</TD></TR>
}</TABLE>
</TD>:}
</TR>
diff --git a/templates/pl/add-rss-subscription.tmpl b/templates/pl/add-rss-subscription.tmpl
index bff170705..f11ba610a 100644
--- a/templates/pl/add-rss-subscription.tmpl
+++ b/templates/pl/add-rss-subscription.tmpl
@@ -33,7 +33,7 @@
</TR>
<TR>
<TH CLASS="label">Maksymalna liczba zdarzeń w kanale:</TH>
-<TD COLSPAN="5"><INPUT TYPE="TEXT" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
+<TD COLSPAN="5"><INPUT TYPE="NUMBER" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
</TR>
<TR>
<TD></TD>
diff --git a/templates/pl/choose-uri.tmpl b/templates/pl/choose-uri.tmpl
index 8d06e103a..88201b925 100644
--- a/templates/pl/choose-uri.tmpl
+++ b/templates/pl/choose-uri.tmpl
@@ -11,7 +11,7 @@
<TABLE>
<TR>
<TH CLASS="label">Połączenie:</TH>
-<TD><INPUT TYPE="TEXT" SIZE="60" MAXLENGTH="1024" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
+<TD><INPUT TYPE="URL" SIZE="60" MAXLENGTH="1024" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
</TR>
<TR>
<TD></TD>
diff --git a/templates/pl/class.tmpl b/templates/pl/class.tmpl
index 6d83981d0..5c015ac5c 100644
--- a/templates/pl/class.tmpl
+++ b/templates/pl/class.tmpl
@@ -20,6 +20,7 @@
<FORM METHOD="POST" ACTION="{admin_uri}" NAME="administration">
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">
+<INPUT TYPE="HIDDEN" NAME="IS_CLASS" VALUE="1">
<SELECT NAME="OP" ONCHANGE="document.administration.submit();">
<OPTION VALUE="">Administracja</OPTION>
<OPTION VALUE="modify-class">Zmodyfikuj klasę</OPTION>
diff --git a/templates/pl/option-pickone.tmpl b/templates/pl/option-pickone.tmpl
index db40015ea..598fe1007 100644
--- a/templates/pl/option-pickone.tmpl
+++ b/templates/pl/option-pickone.tmpl
@@ -5,14 +5,14 @@
</SELECT>
{iscustom=1?<TABLE NAME="paramtable" id="{keyword}-params">{[params]
<TR><TH CLASS="sublabel">{paramtext}:</TH>
-<TD>{params=Units?<SELECT NAME="{keyword}.{params}">
+<TD>{params=Units?<SELECT NAME="{keyword-1}.{params}">
<OPTION VALUE="pt"{paramvalue=pt? SELECTED:}>Punkty</OPTION>
<OPTION VALUE="mm"{paramvalue=mm? SELECTED:}>Milimetry</OPTION>
<OPTION VALUE="cm"{paramvalue=cm? SELECTED:}>Centymetry</OPTION>
<OPTION VALUE="in"{paramvalue=in? SELECTED:}>Cale</OPTION>
<OPTION VALUE="ft"{paramvalue=ft? SELECTED:}>Stopy</OPTION>
<OPTION VALUE="m"{paramvalue=m? SELECTED:}>Metry</OPTION>
-</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword}.{params}" VALUE="{paramvalue}">}</TD></TR>
+</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword-1}.{params}" VALUE="{paramvalue}">}</TD></TR>
}</TABLE>
</TD>:}
</TR>
diff --git a/templates/pl/trailer.tmpl b/templates/pl/trailer.tmpl
index 60c72c7dd..5f2602b23 100644
--- a/templates/pl/trailer.tmpl
+++ b/templates/pl/trailer.tmpl
@@ -2,7 +2,7 @@
<TR><TD>&nbsp;</TD></TR>
<TR><TD CLASS="trailer">CUPS i logo CUPS
są znakami handlowymi <A HREF="http://www.apple.com">Apple Inc.</A> CUPS
-copyright 2007-2010 Apple Inc. Wszystkie prawa zastrzeżone.</TD></TR>
+copyright 2007-2011 Apple Inc. Wszystkie prawa zastrzeżone.</TD></TR>
</TABLE>
</BODY>
</HTML>
diff --git a/templates/ru/add-rss-subscription.tmpl b/templates/ru/add-rss-subscription.tmpl
index 4c9925fb7..6ff4ff2cd 100644
--- a/templates/ru/add-rss-subscription.tmpl
+++ b/templates/ru/add-rss-subscription.tmpl
@@ -33,7 +33,7 @@
</TR>
<TR>
<TH CLASS="label">Количество событий в ленте:</TH>
-<TD COLSPAN="5"><INPUT TYPE="TEXT" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
+<TD COLSPAN="5"><INPUT TYPE="NUMBER" NAME="MAX_EVENTS" SIZE="4" MAXLENGTH="4" VALUE="{MAX_EVENTS?{MAX_EVENTS}:20}"></TD>
</TR>
<TR>
<TD></TD>
diff --git a/templates/ru/choose-uri.tmpl b/templates/ru/choose-uri.tmpl
index 812f2db88..17e5e94f6 100644
--- a/templates/ru/choose-uri.tmpl
+++ b/templates/ru/choose-uri.tmpl
@@ -11,7 +11,7 @@
<TABLE>
<TR>
<TH CLASS="label">Подключение:</TH>
-<TD><INPUT TYPE="TEXT" SIZE="60" MAXLENGTH="1024" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
+<TD><INPUT TYPE="URL" SIZE="60" MAXLENGTH="1024" NAME="DEVICE_URI" VALUE="{current_device_uri?{current_device_uri}:{device_uri}}"></TD>
</TR>
<TR>
<TD></TD>
diff --git a/templates/ru/class.tmpl b/templates/ru/class.tmpl
index d486b43e2..70dd90a79 100644
--- a/templates/ru/class.tmpl
+++ b/templates/ru/class.tmpl
@@ -20,6 +20,7 @@
<FORM METHOD="POST" ACTION="{admin_uri}" NAME="Администрирование">
<INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}">
<INPUT TYPE="HIDDEN" NAME="printer_name" VALUE="{printer_name}">
+<INPUT TYPE="HIDDEN" NAME="IS_CLASS" VALUE="1">
<SELECT NAME="OP" ONCHANGE="document.administration.submit();">
<OPTION VALUE="">Администрирование</OPTION>
<OPTION VALUE="modify-class">Изменить группу</OPTION>
diff --git a/templates/ru/option-pickone.tmpl b/templates/ru/option-pickone.tmpl
index f2dbb5eb7..49a9929ae 100644
--- a/templates/ru/option-pickone.tmpl
+++ b/templates/ru/option-pickone.tmpl
@@ -5,14 +5,14 @@
</SELECT>
{iscustom=1?<TABLE NAME="paramtable" id="{keyword}-params">{[params]
<TR><TH CLASS="sublabel">{paramtext}:</TH>
-<TD>{params=Units?<SELECT NAME="{keyword}.{params}">
+<TD>{params=Units?<SELECT NAME="{keyword-1}.{params}">
<OPTION VALUE="pt"{paramvalue=pt? SELECTED:}>Пункты</OPTION>
<OPTION VALUE="mm"{paramvalue=mm? SELECTED:}>Миллиметры</OPTION>
<OPTION VALUE="cm"{paramvalue=cm? SELECTED:}>Сантиметры</OPTION>
<OPTION VALUE="in"{paramvalue=in? SELECTED:}>Дюймы</OPTION>
<OPTION VALUE="ft"{paramvalue=ft? SELECTED:}>Футы</OPTION>
<OPTION VALUE="m"{paramvalue=m? SELECTED:}>Метры</OPTION>
-</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword}.{params}" VALUE="{paramvalue}">}</TD></TR>
+</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword-1}.{params}" VALUE="{paramvalue}">}</TD></TR>
}</TABLE>
</TD>:}
</TR>
diff --git a/templates/ru/trailer.tmpl b/templates/ru/trailer.tmpl
index 52cde3503..fa4ad012d 100644
--- a/templates/ru/trailer.tmpl
+++ b/templates/ru/trailer.tmpl
@@ -1,6 +1,6 @@
</TD></TR>
<TR><TD>&nbsp;</TD></TR>
-<TR><TD CLASS="trailer">CUPS а также логотип CUPS являются зарегистрированными торговыми марками <A HREF="http://www.apple.com">Apple Inc.</A> Авторские права на CUPS принадлежат (2007-2010) компании Apple Inc. Все права защищены.</TD></TR>
+<TR><TD CLASS="trailer">CUPS а также логотип CUPS являются зарегистрированными торговыми марками <A HREF="http://www.apple.com">Apple Inc.</A> Авторские права на CUPS принадлежат (2007-2011) компании Apple Inc. Все права защищены.</TD></TR>
</TABLE>
</BODY>
</HTML>
diff --git a/templates/trailer.tmpl b/templates/trailer.tmpl
index 62709b534..100d9f7ad 100644
--- a/templates/trailer.tmpl
+++ b/templates/trailer.tmpl
@@ -1,7 +1,7 @@
</TD></TR>
<TR><TD>&nbsp;</TD></TR>
<TR><TD CLASS="trailer">CUPS and the CUPS logo are trademarks of
-<A HREF="http://www.apple.com">Apple Inc.</A> CUPS is copyright 2007-2010 Apple
+<A HREF="http://www.apple.com">Apple Inc.</A> CUPS is copyright 2007-2011 Apple
Inc. All rights reserved.</TD></TR>
</TABLE>
</BODY>
diff --git a/test/ippserver.c b/test/ippserver.c
index fe0117550..d4133f607 100644
--- a/test/ippserver.c
+++ b/test/ippserver.c
@@ -70,7 +70,9 @@
*/
#include <cups/cups-private.h>
-#include <dns_sd.h>
+#ifdef HAVE_DNSSD
+# include <dns_sd.h>
+#endif /* HAVE_DNSSD */
#include <sys/stat.h>
#include <poll.h>
#ifdef HAVE_SYS_MOUNT_H
@@ -183,13 +185,15 @@ typedef struct _ipp_printer_s /**** Printer data ****/
{
int ipv4, /* IPv4 listener */
ipv6; /* IPv6 listener */
+#ifdef HAVE_DNSSD
DNSServiceRef common_ref, /* Shared service connection */
ipp_ref, /* Bonjour IPP service */
http_ref, /* Bonjour HTTP service */
printer_ref; /* Bonjour LPD service */
TXTRecordRef ipp_txt; /* Bonjour IPP TXT record */
+ char *dnssd_name; /* printer-dnssd-name */
+#endif /* HAVE_DNSSD */
char *name, /* printer-name */
- *dnssd_name, /* printer-dnssd-name */
*icon, /* Icon filename */
*directory, /* Spool directory */
*hostname, /* Hostname */
@@ -259,13 +263,16 @@ static _ipp_printer_t *create_printer(const char *servername,
const char *icon,
const char *docformats, int ppm,
int ppm_color, int duplex, int port,
+#ifdef HAVE_DNSSD
const char *regtype,
+#endif /* HAVE_DNSSD */
const char *directory);
static cups_array_t *create_requested_array(_ipp_client_t *client);
static void debug_attributes(const char *title, ipp_t *ipp);
static void delete_client(_ipp_client_t *client);
static void delete_job(_ipp_job_t *job);
static void delete_printer(_ipp_printer_t *printer);
+#ifdef HAVE_DNSSD
static void dnssd_callback(DNSServiceRef sdRef,
DNSServiceFlags flags,
DNSServiceErrorType errorCode,
@@ -273,6 +280,7 @@ static void dnssd_callback(DNSServiceRef sdRef,
const char *regtype,
const char *domain,
_ipp_printer_t *printer);
+#endif /* HAVE_DNSSD */
static _ipp_job_t *find_job(_ipp_client_t *client);
static void html_escape(_ipp_client_t *client, const char *s,
size_t slen);
@@ -298,11 +306,13 @@ static void *process_client(_ipp_client_t *client);
static int process_http(_ipp_client_t *client);
static int process_ipp(_ipp_client_t *client);
static void *process_job(_ipp_job_t *job);
+#ifdef HAVE_DNSSD
static int register_printer(_ipp_printer_t *printer,
const char *location, const char *make,
const char *model, const char *formats,
const char *adminurl, int color,
int duplex, const char *regtype);
+#endif /* HAVE_DNSSD */
static int respond_http(_ipp_client_t *client, http_status_t code,
const char *type, size_t length);
static void respond_ipp(_ipp_client_t *client, ipp_status_t status,
@@ -340,9 +350,11 @@ main(int argc, /* I - Number of command-line args */
*make = "Test", /* Manufacturer */
*model = "Printer", /* Model */
*icon = "printer.png", /* Icon file */
- *formats = "application/pdf,image/jpeg",
+ *formats = "application/pdf,image/jpeg";
/* Supported formats */
- *regtype = "_ipp._tcp"; /* Bonjour service type */
+#ifdef HAVE_DNSSD
+ const char *regtype = "_ipp._tcp"; /* Bonjour service type */
+#endif /* HAVE_DNSSD */
int port = 8631, /* Port number (0 = auto) TODO: FIX */
duplex = 0, /* Duplex mode */
ppm = 10, /* Pages per minute for mono */
@@ -429,12 +441,14 @@ main(int argc, /* I - Number of command-line args */
port = atoi(argv[i]);
break;
+#ifdef HAVE_DNSSD
case 'r' : /* -r regtype */
i ++;
if (i >= argc)
usage(1);
regtype = argv[i];
break;
+#endif /* HAVE_DNSSD */
case 's' : /* -s speed[,color-speed] */
i ++;
@@ -491,7 +505,10 @@ main(int argc, /* I - Number of command-line args */
*/
if ((printer = create_printer(servername, name, location, make, model, icon,
- formats, ppm, ppm_color, duplex, port, regtype,
+ formats, ppm, ppm_color, duplex, port,
+#ifdef HAVE_DNSSD
+ regtype,
+#endif /* HAVE_DNSSD */
directory)) == NULL)
return (1);
@@ -1146,7 +1163,9 @@ create_printer(const char *servername, /* I - Server hostname (NULL for default)
int ppm_color, /* I - Pages per minute in color (0 for gray) */
int duplex, /* I - 1 = duplex, 0 = simplex */
int port, /* I - Port for listeners or 0 for auto */
+#ifdef HAVE_DNSSD
const char *regtype, /* I - Bonjour service type */
+#endif /* HAVE_DNSSD */
const char *directory) /* I - Spool directory */
{
int i, j; /* Looping vars */
@@ -1277,7 +1296,9 @@ create_printer(const char *servername, /* I - Server hostname (NULL for default)
printer->ipv4 = -1;
printer->ipv6 = -1;
printer->name = _cupsStrAlloc(name);
+#ifdef HAVE_DNSSD */
printer->dnssd_name = _cupsStrRetain(printer->name);
+#endif /* HAVE_DNSSD */
printer->directory = _cupsStrAlloc(directory);
printer->hostname = _cupsStrAlloc(servername ? servername :
httpGetHostname(NULL, hostname,
@@ -1726,6 +1747,7 @@ create_printer(const char *servername, /* I - Server hostname (NULL for default)
debug_attributes("Printer", printer->attrs);
+#ifdef HAVE_DNSSD
/*
* Register the printer with Bonjour...
*/
@@ -1733,6 +1755,7 @@ create_printer(const char *servername, /* I - Server hostname (NULL for default)
if (!register_printer(printer, location, make, model, docformats, adminurl,
ppm_color > 0, duplex, regtype))
goto bad_printer;
+#endif /* HAVE_DNSSD */
/*
* Return it!
@@ -2065,6 +2088,7 @@ delete_printer(_ipp_printer_t *printer) /* I - Printer */
if (printer->ipv6 >= 0)
close(printer->ipv6);
+#if HAVE_DNSSD
if (printer->printer_ref)
DNSServiceRefDeallocate(printer->printer_ref);
@@ -2079,10 +2103,12 @@ delete_printer(_ipp_printer_t *printer) /* I - Printer */
TXTRecordDeallocate(&(printer->ipp_txt));
- if (printer->name)
- _cupsStrFree(printer->name);
if (printer->dnssd_name)
_cupsStrFree(printer->dnssd_name);
+#endif /* HAVE_DNSSD */
+
+ if (printer->name)
+ _cupsStrFree(printer->name);
if (printer->icon)
_cupsStrFree(printer->icon);
if (printer->directory)
@@ -2099,6 +2125,7 @@ delete_printer(_ipp_printer_t *printer) /* I - Printer */
}
+#ifdef HAVE_DNSSD
/*
* 'dnssd_callback()' - Handle Bonjour registration events.
*/
@@ -2129,6 +2156,7 @@ dnssd_callback(
printer->dnssd_name = _cupsStrAlloc(name);
}
}
+#endif /* HAVE_DNSSD */
/*
@@ -3574,6 +3602,7 @@ process_job(_ipp_job_t *job) /* I - Job */
}
+#ifdef HAVE_DNSSD
/*
* 'register_printer()' - Register a printer object via Bonjour.
*/
@@ -3702,6 +3731,7 @@ register_printer(
return (1);
}
+#endif /* HAVE_DNSSD */
/*
@@ -3888,6 +3918,7 @@ respond_ipp(_ipp_client_t *client, /* I - Client */
static void
run_printer(_ipp_printer_t *printer) /* I - Printer */
{
+ int num_fds; /* Number of file descriptors */
struct pollfd polldata[3]; /* poll() data */
int timeout; /* Timeout for poll() */
_ipp_client_t *client; /* New client */
@@ -3903,8 +3934,12 @@ run_printer(_ipp_printer_t *printer) /* I - Printer */
polldata[1].fd = printer->ipv6;
polldata[1].events = POLLIN;
- polldata[2].fd = DNSServiceRefSockFD(printer->common_ref);
- polldata[2].events = POLLIN;
+ num_fds = 2;
+
+#ifdef HAVE_DNSSD
+ polldata[num_fds ].fd = DNSServiceRefSockFD(printer->common_ref);
+ polldata[num_fds ++].events = POLLIN;
+#endif /* HAVE_DNSSD */
/*
* Loop until we are killed or have a hard error...
@@ -3948,8 +3983,10 @@ run_printer(_ipp_printer_t *printer) /* I - Printer */
}
}
+#ifdef HAVE_DNSSD
if (polldata[2].revents & POLLIN)
DNSServiceProcessResult(printer->common_ref);
+#endif /* HAVE_DNSSD */
/*
* Clean out old jobs...
diff --git a/test/ipptool.c b/test/ipptool.c
index b3630ddd9..9c096cd9a 100644
--- a/test/ipptool.c
+++ b/test/ipptool.c
@@ -4630,7 +4630,8 @@ with_value(char *value, /* I - Value string */
switch (op)
{
case '=' :
- if (attr->values[i].range.upper == intvalue)
+ if (attr->values[i].range.lower == intvalue ||
+ attr->values[i].range.upper == intvalue)
return (1);
break;
case '<' :
diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh
index a1a3536e5..7179209a4 100755
--- a/test/run-stp-tests.sh
+++ b/test/run-stp-tests.sh
@@ -5,7 +5,7 @@
# Perform the complete set of IPP compliance tests specified in the
# CUPS Software Test Plan.
#
-# Copyright 2007-2010 by Apple Inc.
+# Copyright 2007-2011 by Apple Inc.
# Copyright 1997-2007 by Easy Software Products, all rights reserved.
#
# These coded instructions, statements, and computer programs are the
@@ -24,10 +24,20 @@ argcount=$#
make
#
+# Solaris has a non-POSIX grep in /bin...
+#
+
+if test -x /usr/xpg4/bin/grep; then
+ GREP=/usr/xpg4/bin/grep
+else
+ GREP=grep
+fi
+
+#
# Figure out the proper echo options...
#
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+if (echo "testing\c"; echo 1,2,3) | $GREP c >/dev/null; then
ac_n=-n
ac_c=
else
@@ -453,6 +463,9 @@ export HOME
LANG=C
export LANG
+LC_MESSAGES=C
+export LC_MESSAGES
+
#
# Start the server; run as foreground daemon in the background...
#
@@ -625,7 +638,7 @@ else
fi
# Pages printed on Test1 (within 1 page for timing-dependent cancel issues)
-count=`grep '^Test1 ' /tmp/cups-$user/log/page_log | awk 'BEGIN{count=0}{count=count+$7}END{print count}'`
+count=`$GREP '^Test1 ' /tmp/cups-$user/log/page_log | awk 'BEGIN{count=0}{count=count+$7}END{print count}'`
expected=`expr $pjobs \* 2 + 34`
expected2=`expr $expected + 2`
if test $count -lt $expected -a $count -gt $expected2; then
@@ -638,7 +651,7 @@ else
fi
# Paged printed on Test2
-count=`grep '^Test2 ' /tmp/cups-$user/log/page_log | awk 'BEGIN{count=0}{count=count+$7}END{print count}'`
+count=`$GREP '^Test2 ' /tmp/cups-$user/log/page_log | awk 'BEGIN{count=0}{count=count+$7}END{print count}'`
expected=`expr $pjobs \* 2 + 3`
if test $count != $expected; then
echo "FAIL: Printer 'Test2' produced $count page(s), expected $expected."
@@ -662,11 +675,11 @@ else
fi
# Did CUPS-Get-Default get logged?
-if grep -q CUPS-Get-Default /tmp/cups-$user/log/access_log; then
+if $GREP -q CUPS-Get-Default /tmp/cups-$user/log/access_log; then
echo "FAIL: CUPS-Get-Default logged with 'AccessLogLevel actions'"
echo "<P>FAIL: CUPS-Get-Default logged with 'AccessLogLevel actions'</P>" >>$strfile
echo "<PRE>" >>$strfile
- grep CUPS-Get-Default /tmp/cups-$user/log/access_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
+ $GREP CUPS-Get-Default /tmp/cups-$user/log/access_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo "</PRE>" >>$strfile
fail=`expr $fail + 1`
else
@@ -675,13 +688,13 @@ else
fi
# Emergency log messages
-count=`grep '^X ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^X ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
if test $count != 0; then
echo "FAIL: $count emergency messages, expected 0."
- grep '^X ' /tmp/cups-$user/log/error_log
+ $GREP '^X ' /tmp/cups-$user/log/error_log
echo "<P>FAIL: $count emergency messages, expected 0.</P>" >>$strfile
echo "<PRE>" >>$strfile
- grep '^X ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
+ $GREP '^X ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo "</PRE>" >>$strfile
fail=`expr $fail + 1`
else
@@ -690,13 +703,13 @@ else
fi
# Alert log messages
-count=`grep '^A ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^A ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
if test $count != 0; then
echo "FAIL: $count alert messages, expected 0."
- grep '^A ' /tmp/cups-$user/log/error_log
+ $GREP '^A ' /tmp/cups-$user/log/error_log
echo "<P>FAIL: $count alert messages, expected 0.</P>" >>$strfile
echo "<PRE>" >>$strfile
- grep '^A ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
+ $GREP '^A ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo "</PRE>" >>$strfile
fail=`expr $fail + 1`
else
@@ -705,13 +718,13 @@ else
fi
# Critical log messages
-count=`grep '^C ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^C ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
if test $count != 0; then
echo "FAIL: $count critical messages, expected 0."
- grep '^C ' /tmp/cups-$user/log/error_log
+ $GREP '^C ' /tmp/cups-$user/log/error_log
echo "<P>FAIL: $count critical messages, expected 0.</P>" >>$strfile
echo "<PRE>" >>$strfile
- grep '^C ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
+ $GREP '^C ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo "</PRE>" >>$strfile
fail=`expr $fail + 1`
else
@@ -720,13 +733,13 @@ else
fi
# Error log messages
-count=`grep '^E ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^E ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
if test $count != 18; then
echo "FAIL: $count error messages, expected 18."
- grep '^E ' /tmp/cups-$user/log/error_log
+ $GREP '^E ' /tmp/cups-$user/log/error_log
echo "<P>FAIL: $count error messages, expected 18.</P>" >>$strfile
echo "<PRE>" >>$strfile
- grep '^E ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
+ $GREP '^E ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo "</PRE>" >>$strfile
fail=`expr $fail + 1`
else
@@ -735,13 +748,13 @@ else
fi
# Warning log messages
-count=`grep '^W ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^W ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
if test $count != 9; then
echo "FAIL: $count warning messages, expected 9."
- grep '^W ' /tmp/cups-$user/log/error_log
+ $GREP '^W ' /tmp/cups-$user/log/error_log
echo "<P>FAIL: $count warning messages, expected 9.</P>" >>$strfile
echo "<PRE>" >>$strfile
- grep '^W ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
+ $GREP '^W ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo "</PRE>" >>$strfile
fail=`expr $fail + 1`
else
@@ -750,13 +763,13 @@ else
fi
# Notice log messages
-count=`grep '^N ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^N ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
if test $count != 0; then
echo "FAIL: $count notice messages, expected 0."
- grep '^N ' /tmp/cups-$user/log/error_log
+ $GREP '^N ' /tmp/cups-$user/log/error_log
echo "<P>FAIL: $count notice messages, expected 0.</P>" >>$strfile
echo "<PRE>" >>$strfile
- grep '^N ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
+ $GREP '^N ' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo "</PRE>" >>$strfile
fail=`expr $fail + 1`
else
@@ -765,7 +778,7 @@ else
fi
# Info log messages
-count=`grep '^I ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^I ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
if test $count = 0; then
echo "FAIL: $count info messages, expected more than 0."
echo "<P>FAIL: $count info messages, expected more than 0.</P>" >>$strfile
@@ -776,7 +789,7 @@ else
fi
# Debug log messages
-count=`grep '^D ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^D ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
if test $count = 0; then
echo "FAIL: $count debug messages, expected more than 0."
echo "<P>FAIL: $count debug messages, expected more than 0.</P>" >>$strfile
@@ -787,7 +800,7 @@ else
fi
# Debug2 log messages
-count=`grep '^d ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
+count=`$GREP '^d ' /tmp/cups-$user/log/error_log | wc -l | awk '{print $1}'`
if test $count = 0; then
echo "FAIL: $count debug2 messages, expected more than 0."
echo "<P>FAIL: $count debug2 messages, expected more than 0.</P>" >>$strfile
@@ -798,13 +811,17 @@ else
fi
# Page log file...
-if grep -iq 'testfile.pdf na_letter_8.5x11in' /tmp/cups-$user/log/page_log; then
- echo "PASS: page_log formatted correctly."
- echo "<P>PASS: page_log formatted correctly.</P>" >>$strfile
-else
- echo "FAIL: page_log formatted incorrectly."
- echo "<P>FAIL: page_log formatted incorrectly - no page size information.</P>" >>$strfile
- fail=`expr $fail + 1`
+if test `uname` = Darwin; then
+ # Currently just test for Mac OS X since others do not have UI to
+ # select a user-wide default media size...
+ if $GREP -iq 'testfile.pdf na_letter_8.5x11in' /tmp/cups-$user/log/page_log; then
+ echo "PASS: page_log formatted correctly."
+ echo "<P>PASS: page_log formatted correctly.</P>" >>$strfile
+ else
+ echo "FAIL: page_log formatted incorrectly."
+ echo "<P>FAIL: page_log formatted incorrectly - no page size information.</P>" >>$strfile
+ fail=`expr $fail + 1`
+ fi
fi
# Log files...
@@ -815,7 +832,7 @@ echo "</PRE>" >>$strfile
echo "<H2>error_log</H2>" >>$strfile
echo "<PRE>" >>$strfile
-grep -v '^d' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
+$GREP -v '^d' /tmp/cups-$user/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo "</PRE>" >>$strfile
echo "<H2>page_log</H2>" >>$strfile