summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2012-10-25 20:55:15 +0200
committerDidier Raboud <odyx@debian.org>2012-10-25 20:55:15 +0200
commitf827e757bcd2a279f2efc553003120a17ae07f54 (patch)
treede7e649fd08bc70789a0e8603a5d3e004d0d3ce6
parent3110980a1c47466ca52fdf23835a9774786311d6 (diff)
downloadcups-f827e757bcd2a279f2efc553003120a17ae07f54.tar.gz
Imported Upstream version 1.4.7upstream/1.4.7
-rw-r--r--CHANGES.txt86
-rw-r--r--INSTALL.txt2
-rw-r--r--README.txt2
-rw-r--r--backend/snmp-supplies.c127
-rw-r--r--backend/socket.c10
-rw-r--r--backend/usb-libusb.c14
-rw-r--r--cgi-bin/admin.c41
-rw-r--r--cgi-bin/classes.c24
-rw-r--r--cgi-bin/html.c38
-rw-r--r--cgi-bin/printers.c24
-rw-r--r--config-scripts/cups-common.m447
-rw-r--r--config-scripts/cups-compiler.m423
-rw-r--r--config-scripts/cups-ssl.m416
-rw-r--r--config.h.in7
-rwxr-xr-xconfigure340
-rw-r--r--cups/adminutil.c8
-rw-r--r--cups/api-array.shtml6
-rw-r--r--cups/api-cups.shtml8
-rw-r--r--cups/api-filedir.shtml6
-rw-r--r--cups/api-filter.shtml4
-rw-r--r--cups/api-httpipp.shtml6
-rw-r--r--cups/api-overview.shtml5
-rw-r--r--cups/api-ppd.shtml6
-rw-r--r--cups/conflicts.c20
-rw-r--r--cups/cups.h8
-rw-r--r--cups/custom.c19
-rw-r--r--cups/globals.c7
-rw-r--r--cups/http-addr.c60
-rw-r--r--cups/http-addrlist.c10
-rw-r--r--cups/http-private.h9
-rw-r--r--cups/http.c269
-rw-r--r--cups/http.h11
-rw-r--r--cups/mark.c205
-rw-r--r--cups/ppd.c22
-rw-r--r--cups/pwg-ppd.c97
-rw-r--r--cups/request.c66
-rw-r--r--cups/testppd.c42
-rw-r--r--cups/transcode.c19
-rw-r--r--doc/Makefile8
-rw-r--r--doc/cups.css2
-rw-r--r--doc/de/index.html.in2
-rwxr-xr-xdoc/es/index.html.in2
-rw-r--r--doc/eu/index.html.in4
-rw-r--r--doc/help/accounting.html6
-rw-r--r--doc/help/api-array.html10
-rw-r--r--doc/help/api-cgi.html6
-rw-r--r--doc/help/api-cups.html12
-rw-r--r--doc/help/api-driver.html6
-rw-r--r--doc/help/api-filedir.html10
-rw-r--r--doc/help/api-filter.html8
-rw-r--r--doc/help/api-httpipp.html10
-rw-r--r--doc/help/api-mime.html6
-rw-r--r--doc/help/api-overview.html11
-rw-r--r--doc/help/api-ppd.html10
-rw-r--r--doc/help/api-ppdc.html6
-rw-r--r--doc/help/api-raster.html22
-rw-r--r--doc/help/kerberos.html2
-rw-r--r--doc/help/network.html4
-rw-r--r--doc/help/options.html6
-rw-r--r--doc/help/postscript-driver.html2
-rw-r--r--doc/help/ppd-compiler.html2
-rw-r--r--doc/help/raster-driver.html2
-rw-r--r--doc/help/ref-cupsd-conf.html.in68
-rw-r--r--doc/help/ref-mailto-conf.html10
-rw-r--r--doc/help/ref-ppdcfile.html9
-rw-r--r--doc/help/ref-snmp-conf.html2
-rw-r--r--doc/help/security.html4
-rw-r--r--doc/help/spec-banner.html6
-rw-r--r--doc/help/spec-browsing.html12
-rw-r--r--doc/help/spec-cmp.html28
-rw-r--r--doc/help/spec-command.html7
-rw-r--r--doc/help/spec-ipp.html6
-rw-r--r--doc/help/spec-postscript.html8
-rw-r--r--doc/help/spec-raster.html256
-rw-r--r--doc/help/spec-stp.html2
-rw-r--r--doc/help/translation.html8
-rw-r--r--doc/help/whatsnew.html2
-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.svg378
-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--filter/api-raster.shtml4
-rw-r--r--filter/commandtops.c17
-rw-r--r--filter/gziptoany.c28
-rw-r--r--filter/image-gif.c50
-rw-r--r--filter/image-zoom.c12
-rw-r--r--filter/libcupsimage2.def13
-rw-r--r--filter/pstops.c14
-rw-r--r--filter/raster.c268
-rw-r--r--filter/testraster.c154
-rw-r--r--man/cups-driverd.man.in35
-rw-r--r--man/cupsctl.man14
-rw-r--r--man/lp.man21
-rw-r--r--man/lpadmin.man14
-rw-r--r--notifier/dbus.c6
-rw-r--r--packaging/cups.spec4
-rw-r--r--ppdc/sample.drv27
-rw-r--r--scheduler/client.c44
-rw-r--r--scheduler/conf.c18
-rw-r--r--scheduler/cups-driverd.cxx798
-rw-r--r--scheduler/cups-polld.c6
-rw-r--r--scheduler/cupsd.h9
-rw-r--r--scheduler/dirsvc.c7
-rw-r--r--scheduler/env.c120
-rw-r--r--scheduler/filter.c5
-rw-r--r--scheduler/ipp.c97
-rw-r--r--scheduler/job.c130
-rw-r--r--scheduler/network.c10
-rw-r--r--scheduler/printers.c170
-rw-r--r--scheduler/subscriptions.c10
-rw-r--r--systemv/cupsctl.c11
-rw-r--r--systemv/lpadmin.c8
-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
-rwxr-xr-xtemplates/es/add-rss-subscription.tmpl2
-rwxr-xr-xtemplates/es/choose-uri.tmpl2
-rwxr-xr-xtemplates/es/class.tmpl1
-rwxr-xr-xtemplates/es/option-pickone.tmpl4
-rwxr-xr-xtemplates/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/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
-rwxr-xr-xtest/run-stp-tests.sh7
-rw-r--r--vc2005/cups.sln22
-rw-r--r--vc2005/cupstestppd.vcproj173
-rw-r--r--vc2005/libcups2.vcproj172
-rw-r--r--vc2005/libcupsimage2.vcproj395
-rw-r--r--vcnet/config.h10
-rw-r--r--vcnet/cups.sln22
-rw-r--r--vcnet/cupstestppd.vcproj171
-rw-r--r--vcnet/libcups2.vcproj8
-rw-r--r--vcnet/libcupsimage2.vcproj388
172 files changed, 4263 insertions, 2019 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 919b905b..92301c45 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,90 @@
-CHANGES.txt - 2011-01-06
+CHANGES.txt - 2011-06-20
------------------------
+CHANGES IN CUPS V1.4.7
+
+ - Documentation changes (STR #3710, STR #3720, STR #3745, STR #3750,
+ STR #3757, STR #3758, STR #3782, STR #3826, STR #3829, STR #3837)
+ - Web interface fixes (STR #3412, STR #3345, STR #3455, STR #3707,
+ STR #3755, STR #3769, STR #3783)
+ - Configure script fixes (STR #3659, STR #3691)
+ - Compilation fixes (STR #3718, STR #3771, STR #3774)
+ - The imageto* filters could crash with bad GIF files (STR #3867)
+ - The scheduler might leave old job data files in the spool directory
+ (STR #3795)
+ - CUPS did not work with locales using the ASCII character set
+ (STR #3832)
+ - httpAddrString() did not return a URI-style IPv6 numeric address
+ (STR #3814)
+ - Fixed an issue when reading compressed CUPS raster streams (STR #3812)
+ - Fixed an issue with PostScript printer auto-configuration (STR #3443)
+ - Fixed some compatibility issues with the libusb-based USB backend
+ (STR #3799)
+ - The network backends no longer try to collect SNMP supply and status
+ information for raw queues (STR #3809)
+ - The DBUS notifier did not report job state changes (STR #3805)
+ - The scheduler did not always report that the "normal" print-quality
+ value was supported (STR #3803)
+ - The gziptoany filter did not report the correct error if it was unable
+ to write the uncompressed document to the next filter or backend in
+ the chain (STR #3797)
+ - The Epson and Oki 9-pin drivers had a bad resolution option
+ (STR #3798)
+ - The scheduler did not always register the correct default ICC profile
+ on Mac OS X.
+ - The scheduler did not use the job owner when authorizing access for
+ the CUPS-Get-Document operation, preventing non-admins from accessing
+ their own jobs.
+ - CUPS did not work with some printers that incorrectly implemented the
+ HTTP/1.1 standard (STR #3778, STR #3791)
+ - 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 web interface no longer tries to use multi-part delivery when
+ adding printers (STR #3455)
+ - 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
+ properly, leading to offset and clipped output (STR #3732)
+ - The network backends always reported "low toner" or "out of toner"
+ states, even for inkjet printers (STR #3733)
+
+
CHANGES IN CUPS V1.4.6
- Fixed a "make check" issue on Solaris (STR #3729)
diff --git a/INSTALL.txt b/INSTALL.txt
index 2e8dab82..fbec65e9 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -1,4 +1,4 @@
-INSTALL - CUPS v1.4.6 - 2011-01-06
+INSTALL - CUPS v1.4.7 - 2011-01-06
----------------------------------
This file describes how to compile and install CUPS from source code. For more
diff --git a/README.txt b/README.txt
index 03aa3d1b..ab9ebdcc 100644
--- a/README.txt
+++ b/README.txt
@@ -1,4 +1,4 @@
-README - CUPS v1.4.6 - 2011-01-06
+README - CUPS v1.4.7 - 2011-01-06
---------------------------------
Looking for compile instructions? Read the file "INSTALL.txt"
diff --git a/backend/snmp-supplies.c b/backend/snmp-supplies.c
index 180817be..f7d79353 100644
--- a/backend/snmp-supplies.c
+++ b/backend/snmp-supplies.c
@@ -1,9 +1,9 @@
/*
- * "$Id: snmp-supplies.c 8896 2009-11-20 01:27:57Z mike $"
+ * "$Id: snmp-supplies.c 9592 2011-03-10 03:50:59Z mike $"
*
- * SNMP supplies functions for the Common UNIX Printing System (CUPS).
+ * SNMP supplies functions 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
@@ -36,6 +36,17 @@
#define CUPS_MAX_SUPPLIES 32 /* Maximum number of supplies for a printer */
#define CUPS_SUPPLY_TIMEOUT 2.0 /* Timeout for SNMP lookups */
+#define CUPS_DEVELOPER_LOW 1
+#define CUPS_DEVELOPER_EMPTY 2
+#define CUPS_MARKER_SUPPLY_LOW 4
+#define CUPS_MARKER_SUPPLY_EMPTY 8
+#define CUPS_MARKER_WASTE_ALMOST_FULL 16
+#define CUPS_MARKER_WASTE_FULL 32
+#define CUPS_OPC_NEAR_EOL 64
+#define CUPS_OPC_LIFE_OVER 128
+#define CUPS_TONER_LOW 256
+#define CUPS_TONER_EMPTY 512
+
/*
* Local structures...
@@ -70,6 +81,8 @@ static int num_supplies = 0;
/* Number of supplies found */
static backend_supplies_t supplies[CUPS_MAX_SUPPLIES];
/* Supply information */
+static int supply_state = -1;
+ /* Supply state info */
static const int hrDeviceDescr[] =
{ CUPS_OID_hrDeviceDescr, 1, -1 };
@@ -140,8 +153,8 @@ static const backend_state_t const printer_states[] =
{
{ CUPS_TC_lowPaper, "media-low-report" },
{ CUPS_TC_noPaper | CUPS_TC_inputTrayEmpty, "media-empty-warning" },
- { CUPS_TC_lowToner, "toner-low-report" },
- { CUPS_TC_noToner, "toner-empty-warning" },
+ /* { CUPS_TC_lowToner, "toner-low-report" }, */ /* now use prtMarkerSupplies */
+ /* { CUPS_TC_noToner, "toner-empty-warning" }, */ /* now use prtMarkerSupplies */
{ CUPS_TC_doorOpen, "door-open-report" },
{ CUPS_TC_jammed, "media-jam-warning" },
/* { CUPS_TC_offline, "offline-report" }, */ /* unreliable */
@@ -153,6 +166,20 @@ static const backend_state_t const printer_states[] =
{ CUPS_TC_outputFull, "output-area-full-warning" }
};
+static const backend_state_t const supply_states[] =
+ {
+ { CUPS_DEVELOPER_LOW, "developer-low-report" },
+ { CUPS_DEVELOPER_EMPTY, "developer-empty-warning" },
+ { CUPS_MARKER_SUPPLY_LOW, "marker-supply-low-report" },
+ { CUPS_MARKER_SUPPLY_EMPTY, "marker-supply-empty-warning" },
+ { CUPS_MARKER_WASTE_ALMOST_FULL, "marker-waste-almost-full-report" },
+ { CUPS_MARKER_WASTE_FULL, "marker-waste-full-warning" },
+ { CUPS_OPC_NEAR_EOL, "opc-near-eol-report" },
+ { CUPS_OPC_LIFE_OVER, "opc-life-over-warning" },
+ { CUPS_TONER_LOW, "toner-low-report" },
+ { CUPS_TONER_EMPTY, "toner-empty-warning" }
+ };
+
/*
* Local functions...
@@ -191,13 +218,14 @@ backendSNMPSupplies(
if (num_supplies > 0)
{
int i, /* Looping var */
+ percent, /* Percent full */
new_state, /* New state value */
- change_state; /* State change */
+ change_state, /* State change */
+ new_supply_state = 0; /* Supply state */
char value[CUPS_MAX_SUPPLIES * 4],
/* marker-levels value string */
*ptr; /* Pointer into value string */
cups_snmp_t packet; /* SNMP response packet */
-
/*
* Generate the marker-levels value string...
@@ -205,17 +233,85 @@ backendSNMPSupplies(
for (i = 0, ptr = value; i < num_supplies; i ++, ptr += strlen(ptr))
{
+ percent = 100 * supplies[i].level / supplies[i].max_capacity;
+
+ if (percent <= 10)
+ {
+ switch (supplies[i].type)
+ {
+ case CUPS_TC_toner :
+ case CUPS_TC_tonerCartridge :
+ if (percent <= 1)
+ new_supply_state |= CUPS_TONER_EMPTY;
+ else
+ new_supply_state |= CUPS_TONER_LOW;
+ break;
+ case CUPS_TC_wasteToner :
+ case CUPS_TC_wasteInk :
+ if (percent <= 1)
+ new_supply_state |= CUPS_MARKER_WASTE_FULL;
+ else
+ new_supply_state |= CUPS_MARKER_WASTE_ALMOST_FULL;
+ break;
+ case CUPS_TC_ink :
+ case CUPS_TC_inkCartridge :
+ case CUPS_TC_inkRibbon :
+ case CUPS_TC_solidWax :
+ case CUPS_TC_ribbonWax :
+ if (percent <= 1)
+ new_supply_state |= CUPS_MARKER_SUPPLY_EMPTY;
+ else
+ new_supply_state |= CUPS_MARKER_SUPPLY_LOW;
+ break;
+ case CUPS_TC_developer :
+ if (percent <= 1)
+ new_supply_state |= CUPS_DEVELOPER_EMPTY;
+ else
+ new_supply_state |= CUPS_DEVELOPER_LOW;
+ break;
+ case CUPS_TC_coronaWire :
+ case CUPS_TC_fuser :
+ case CUPS_TC_opc :
+ case CUPS_TC_transferUnit :
+ if (percent <= 1)
+ new_supply_state |= CUPS_OPC_LIFE_OVER;
+ else
+ new_supply_state |= CUPS_OPC_NEAR_EOL;
+ break;
+ }
+ }
+
if (i)
*ptr++ = ',';
if (supplies[i].max_capacity > 0)
- sprintf(ptr, "%d", 100 * supplies[i].level / supplies[i].max_capacity);
+ sprintf(ptr, "%d", percent);
else
strcpy(ptr, "-1");
}
fprintf(stderr, "ATTR: marker-levels=%s\n", value);
+ if (supply_state < 0)
+ change_state = 0xffff;
+ else
+ change_state = supply_state ^ new_supply_state;
+
+ fprintf(stderr, "DEBUG: new_supply_state=%x, change_state=%x\n",
+ new_supply_state, change_state);
+
+ for (i = 0;
+ i < (int)(sizeof(supply_states) / sizeof(supply_states[0]));
+ i ++)
+ if (change_state & supply_states[i].bit)
+ {
+ fprintf(stderr, "STATE: %c%s\n",
+ (new_supply_state & supply_states[i].bit) ? '+' : '-',
+ supply_states[i].keyword);
+ }
+
+ supply_state = new_supply_state;
+
/*
* Get the current printer status bits...
*/
@@ -242,13 +338,18 @@ backendSNMPSupplies(
else
change_state = current_state ^ new_state;
+ fprintf(stderr, "DEBUG: new_state=%x, change_state=%x\n", new_state,
+ change_state);
+
for (i = 0;
i < (int)(sizeof(printer_states) / sizeof(printer_states[0]));
i ++)
if (change_state & printer_states[i].bit)
+ {
fprintf(stderr, "STATE: %c%s\n",
- (new_state & printer_states[i].bit) ? '+' : '-',
+ (new_state & printer_states[i].bit) ? '+' : '-',
printer_states[i].keyword);
+ }
current_state = new_state;
@@ -373,9 +474,9 @@ backend_init_supplies(
* See if we should be getting supply levels via SNMP...
*/
- if ((ppd = ppdOpenFile(getenv("PPD"))) != NULL &&
- (ppdattr = ppdFindAttr(ppd, "cupsSNMPSupplies", NULL)) != NULL &&
- ppdattr->value && strcasecmp(ppdattr->value, "true"))
+ if ((ppd = ppdOpenFile(getenv("PPD"))) == NULL ||
+ ((ppdattr = ppdFindAttr(ppd, "cupsSNMPSupplies", NULL)) != NULL &&
+ ppdattr->value && strcasecmp(ppdattr->value, "true")))
{
ppdClose(ppd);
return;
@@ -885,5 +986,5 @@ utf16_to_utf8(
/*
- * End of "$Id: snmp-supplies.c 8896 2009-11-20 01:27:57Z mike $".
+ * End of "$Id: snmp-supplies.c 9592 2011-03-10 03:50:59Z mike $".
*/
diff --git a/backend/socket.c b/backend/socket.c
index a56458e8..b7fec786 100644
--- a/backend/socket.c
+++ b/backend/socket.c
@@ -1,5 +1,5 @@
/*
- * "$Id: socket.c 9061 2010-03-30 22:07:33Z mike $"
+ * "$Id: socket.c 9454 2011-01-10 08:02:55Z mike $"
*
* AppSocket backend for the Common UNIX Printing System (CUPS).
*
@@ -72,9 +72,11 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */
sep; /* Option separator */
int print_fd; /* Print file */
int copies; /* Number of copies to print */
- time_t start_time, /* Time of first connect */
- current_time, /* Current time */
+ time_t start_time; /* Time of first connect */
+#ifdef __APPLE__
+ time_t current_time, /* Current time */
wait_time; /* Time to wait before shutting down socket */
+#endif /* __APPLE__ */
int recoverable; /* Recoverable error shown? */
int contimeout; /* Connection timeout */
int waiteof; /* Wait for end-of-file? */
@@ -507,5 +509,5 @@ wait_bc(int device_fd, /* I - Socket */
/*
- * End of "$Id: socket.c 9061 2010-03-30 22:07:33Z mike $".
+ * End of "$Id: socket.c 9454 2011-01-10 08:02:55Z mike $".
*/
diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c
index 2690845e..c3f0534e 100644
--- a/backend/usb-libusb.c
+++ b/backend/usb-libusb.c
@@ -1,9 +1,9 @@
/*
- * "$Id: usb-libusb.c 9258 2010-08-13 01:34:04Z mike $"
+ * "$Id: usb-libusb.c 9582 2011-03-04 19:28:38Z mike $"
*
* 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
@@ -100,7 +100,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 */
@@ -411,7 +411,7 @@ get_device_id(usb_printer_t *printer, /* I - Printer */
if (usb_control_msg(printer->handle,
USB_TYPE_CLASS | USB_ENDPOINT_IN | USB_RECIP_INTERFACE,
- 0, printer->conf, printer->iface,
+ 0, printer->conf, (printer->iface << 8) | printer->altset,
buffer, bufsize, 5000) < 0)
{
*buffer = '\0';
@@ -675,6 +675,7 @@ open_device(usb_printer_t *printer, /* I - Printer */
goto error;
}
+#if 0 /* STR #3801: Claiming interface 0 causes problems with some printers */
if (number != 0)
while (usb_claim_interface(printer->handle, 0) < 0)
{
@@ -685,6 +686,7 @@ open_device(usb_printer_t *printer, /* I - Printer */
goto error;
}
+#endif /* 0 */
/*
* Set alternate setting...
@@ -748,7 +750,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 */
@@ -828,6 +830,6 @@ side_cb(usb_printer_t *printer, /* I - Printer */
/*
- * End of "$Id: usb-libusb.c 9258 2010-08-13 01:34:04Z mike $".
+ * End of "$Id: usb-libusb.c 9582 2011-03-04 19:28:38Z mike $".
*/
diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c
index ff8885d7..71c11883 100644
--- a/cgi-bin/admin.c
+++ b/cgi-bin/admin.c
@@ -1,9 +1,9 @@
/*
- * "$Id: admin.c 9181 2010-06-22 21:42:44Z mike $"
+ * "$Id: admin.c 9582 2011-03-04 19:28:38Z 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);
@@ -1003,7 +1026,7 @@ do_am_printer(http_t *http, /* I - HTTP connection */
fputs("DEBUG: Getting list of devices...\n", stderr);
current_device = 0;
- if (cupsGetDevices(http, 30, CUPS_INCLUDE_ALL, CUPS_EXCLUDE_NONE,
+ if (cupsGetDevices(http, 5, CUPS_INCLUDE_ALL, CUPS_EXCLUDE_NONE,
(cups_device_cb_t)choose_device_cb,
(void *)title) == IPP_OK)
{
@@ -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)
{
@@ -2583,7 +2607,8 @@ do_list_printers(http_t *http) /* I - HTTP connection */
if (isalnum(*ptr & 255) || *ptr == '_' || *ptr == '-' ||
*ptr == '.')
*option_ptr++ = *ptr;
- else if ((*ptr == ' ' || *ptr == '/') && option_ptr[-1] != '_')
+ else if ((*ptr == ' ' || *ptr == '/') && option_ptr > option &&
+ option_ptr[-1] != '_')
*option_ptr++ = '_';
else if (*ptr == '?' || *ptr == '(')
break;
@@ -4295,5 +4320,5 @@ get_points(double number, /* I - Original number */
/*
- * End of "$Id: admin.c 9181 2010-06-22 21:42:44Z mike $".
+ * End of "$Id: admin.c 9582 2011-03-04 19:28:38Z mike $".
*/
diff --git a/cgi-bin/classes.c b/cgi-bin/classes.c
index 47d77914..7030f842 100644
--- a/cgi-bin/classes.c
+++ b/cgi-bin/classes.c
@@ -1,9 +1,9 @@
/*
- * "$Id: classes.c 8859 2009-11-09 23:01:17Z mike $"
+ * "$Id: classes.c 9470 2011-01-11 07:05:58Z 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")));
@@ -540,5 +554,5 @@ show_class(http_t *http, /* I - Connection to server */
/*
- * End of "$Id: classes.c 8859 2009-11-09 23:01:17Z mike $".
+ * End of "$Id: classes.c 9470 2011-01-11 07:05:58Z mike $".
*/
diff --git a/cgi-bin/html.c b/cgi-bin/html.c
index 90b69b21..ccad27c0 100644
--- a/cgi-bin/html.c
+++ b/cgi-bin/html.c
@@ -1,9 +1,9 @@
/*
- * "$Id: html.c 8278 2009-01-22 20:35:12Z mike $"
+ * "$Id: html.c 9473 2011-01-11 16:28:51Z 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);
}
@@ -253,5 +235,5 @@ cgi_null_passwd(const char *prompt) /* I - Prompt string (unused) */
/*
- * End of "$Id: html.c 8278 2009-01-22 20:35:12Z mike $".
+ * End of "$Id: html.c 9473 2011-01-11 16:28:51Z mike $".
*/
diff --git a/cgi-bin/printers.c b/cgi-bin/printers.c
index dbaf84a8..e220fe08 100644
--- a/cgi-bin/printers.c
+++ b/cgi-bin/printers.c
@@ -1,9 +1,9 @@
/*
- * "$Id: printers.c 8859 2009-11-09 23:01:17Z mike $"
+ * "$Id: printers.c 9470 2011-01-11 07:05:58Z 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"))
@@ -560,5 +574,5 @@ show_printer(http_t *http, /* I - Connection to server */
/*
- * End of "$Id: printers.c 8859 2009-11-09 23:01:17Z mike $".
+ * End of "$Id: printers.c 9470 2011-01-11 07:05:58Z mike $".
*/
diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4
index f846746f..f43b8968 100644
--- a/config-scripts/cups-common.m4
+++ b/config-scripts/cups-common.m4
@@ -1,9 +1,9 @@
dnl
-dnl "$Id: cups-common.m4 9377 2010-11-17 19:59:14Z mike $"
+dnl "$Id: cups-common.m4 9482 2011-01-14 18:57:44Z 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
@@ -20,7 +20,7 @@ dnl Set the name of the config header file...
AC_CONFIG_HEADER(config.h)
dnl Version number information...
-CUPS_VERSION=1.4.6
+CUPS_VERSION=1.4.7
CUPS_REVISION=
#if test -z "$CUPS_REVISION" -a -d .svn; then
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
@@ -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)
@@ -207,7 +210,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")])
@@ -268,24 +271,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"
- CUPSDLIBS="$CUPSDLIBS `$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"
+ CUPSDLIBS="$CUPSDLIBS `$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
@@ -370,5 +371,5 @@ AC_SUBST(FONTS)
AC_SUBST(LEGACY_BACKENDS)
dnl
-dnl End of "$Id: cups-common.m4 9377 2010-11-17 19:59:14Z mike $".
+dnl End of "$Id: cups-common.m4 9482 2011-01-14 18:57:44Z mike $".
dnl
diff --git a/config-scripts/cups-compiler.m4 b/config-scripts/cups-compiler.m4
index bc579849..1c880d2e 100644
--- a/config-scripts/cups-compiler.m4
+++ b/config-scripts/cups-compiler.m4
@@ -1,5 +1,5 @@
dnl
-dnl "$Id: cups-compiler.m4 8655 2009-05-17 00:13:47Z mike $"
+dnl "$Id: cups-compiler.m4 9822 2011-06-10 22:59:36Z mike $"
dnl
dnl Compiler stuff for the Common UNIX Printing System (CUPS).
dnl
@@ -146,15 +146,22 @@ if test -n "$GCC"; then
AC_MSG_RESULT(no))
CFLAGS="$OLDCFLAGS"
- # The -pie option is available with some versions of GCC and adds
+ # The -fPIE option is available with some versions of GCC and adds
# randomization of addresses, which avoids another class of exploits
# that depend on a fixed address for common functions.
- AC_MSG_CHECKING(if GCC supports -pie)
+ AC_MSG_CHECKING(if GCC supports -fPIE)
OLDCFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -pie -fPIE"
+ CFLAGS="$CFLAGS -fPIE"
AC_TRY_COMPILE(,,
- PIEFLAGS="-pie -fPIE"
- AC_MSG_RESULT(yes),
+ [case "$CC" in
+ *clang)
+ PIEFLAGS="-fPIE -Wl,-pie"
+ ;;
+ *)
+ PIEFLAGS="-fPIE -pie"
+ ;;
+ esac
+ AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no))
CFLAGS="$OLDCFLAGS"
@@ -175,7 +182,7 @@ if test -n "$GCC"; then
# checking, basically wrapping all string functions
# with buffer-limited ones. Not strictly needed for
# CUPS since we already use buffer-limited calls, but
- # this will catch any additions that are broken.
+ # this will catch any additions that are broken.
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
if test x$enable_pie = xyes; then
@@ -563,5 +570,5 @@ case $uname in
esac
dnl
-dnl End of "$Id: cups-compiler.m4 8655 2009-05-17 00:13:47Z mike $".
+dnl End of "$Id: cups-compiler.m4 9822 2011-06-10 22:59:36Z mike $".
dnl
diff --git a/config-scripts/cups-ssl.m4 b/config-scripts/cups-ssl.m4
index efa9e80c..c689f9df 100644
--- a/config-scripts/cups-ssl.m4
+++ b/config-scripts/cups-ssl.m4
@@ -1,9 +1,9 @@
dnl
-dnl "$Id: cups-ssl.m4 9203 2010-07-14 23:58:04Z mike $"
+dnl "$Id: cups-ssl.m4 9470 2011-01-11 07:05:58Z 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
@@ -38,6 +38,8 @@ if test x$enable_ssl != xno; then
AC_DEFINE(HAVE_CDSASSL)
dnl Check for the various security headers...
+ 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,
@@ -70,7 +72,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
@@ -107,7 +109,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...
@@ -144,6 +146,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)
@@ -154,5 +158,5 @@ AC_SUBST(EXPORT_SSLLIBS)
dnl
-dnl End of "$Id: cups-ssl.m4 9203 2010-07-14 23:58:04Z mike $".
+dnl End of "$Id: cups-ssl.m4 9470 2011-01-11 07:05:58Z mike $".
dnl
diff --git a/config.h.in b/config.h.in
index 0526db1d..2c9a5178 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,9 +1,9 @@
/*
- * "$Id: config.h.in 9259 2010-08-13 04:11:46Z mike $"
+ * "$Id: config.h.in 9452 2011-01-10 07:39:37Z mike $"
*
* 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
@@ -289,6 +289,7 @@
*/
#undef HAVE_AUTHORIZATION_H
+#undef HAVE_SECITEM_H
#undef HAVE_SECITEMPRIV_H
#undef HAVE_SECPOLICY_H
#undef HAVE_SECPOLICYPRIV_H
@@ -669,5 +670,5 @@
#endif /* !_CUPS_CONFIG_H_ */
/*
- * End of "$Id: config.h.in 9259 2010-08-13 04:11:46Z mike $".
+ * End of "$Id: config.h.in 9452 2011-01-10 07:39:37Z mike $".
*/
diff --git a/configure b/configure
index 9fae25c8..8aefa951 100755
--- a/configure
+++ b/configure
@@ -680,6 +680,7 @@ XDGOPEN
CUPS_HTMLVIEW
INSTALL
INSTALLSTATIC
+PKGCONFIG
LIBMALLOC
LIBPAPER
GREP
@@ -689,7 +690,6 @@ LIBWRAP
ARFLAGS
BACKLIBS
CUPSDLIBS
-PKGCONFIG
DBUSDIR
DBUS_NOTIFIER
DBUS_NOTIFIERLIBS
@@ -1989,7 +1989,7 @@ esac
ac_config_headers="$ac_config_headers config.h"
-CUPS_VERSION=1.4.6
+CUPS_VERSION=1.4.7
CUPS_REVISION=
#if test -z "$CUPS_REVISION" -a -d .svn; then
# CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`"
@@ -4110,6 +4110,47 @@ fi
+# Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_PKGCONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $PKGCONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKGCONFIG=$ac_cv_path_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+ { echo "$as_me:$LINENO: result: $PKGCONFIG" >&5
+echo "${ECHO_T}$PKGCONFIG" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+
{ echo "$as_me:$LINENO: checking for library containing crypt" >&5
echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6; }
@@ -8088,9 +8129,9 @@ else
fi
if test $check_libusb = yes; then
- { echo "$as_me:$LINENO: checking for usb_init in -lusb" >&5
-echo $ECHO_N "checking for usb_init in -lusb... $ECHO_C" >&6; }
-if test "${ac_cv_lib_usb_usb_init+set}" = set; then
+ { echo "$as_me:$LINENO: checking for usb_get_string_simple in -lusb" >&5
+echo $ECHO_N "checking for usb_get_string_simple in -lusb... $ECHO_C" >&6; }
+if test "${ac_cv_lib_usb_usb_get_string_simple+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -8108,11 +8149,11 @@ cat >>conftest.$ac_ext <<_ACEOF
#ifdef __cplusplus
extern "C"
#endif
-char usb_init ();
+char usb_get_string_simple ();
int
main ()
{
-return usb_init ();
+return usb_get_string_simple ();
;
return 0;
}
@@ -8135,21 +8176,21 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
- ac_cv_lib_usb_usb_init=yes
+ ac_cv_lib_usb_usb_get_string_simple=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_usb_usb_init=no
+ ac_cv_lib_usb_usb_get_string_simple=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_usb_usb_init" >&5
-echo "${ECHO_T}$ac_cv_lib_usb_usb_init" >&6; }
-if test $ac_cv_lib_usb_usb_init = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_usb_usb_get_string_simple" >&5
+echo "${ECHO_T}$ac_cv_lib_usb_usb_get_string_simple" >&6; }
+if test $ac_cv_lib_usb_usb_get_string_simple = yes; then
if test "${ac_cv_header_usb_h+set}" = set; then
{ echo "$as_me:$LINENO: checking for usb.h" >&5
@@ -8635,74 +8676,49 @@ fi
DBUS_NOTIFIER=""
DBUS_NOTIFIERLIBS=""
-if test "x$enable_dbus" != xno; then
- # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
-if test "${ac_cv_path_PKGCONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $PKGCONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-fi
-PKGCONFIG=$ac_cv_path_PKGCONFIG
-if test -n "$PKGCONFIG"; then
- { echo "$as_me:$LINENO: result: $PKGCONFIG" >&5
-echo "${ECHO_T}$PKGCONFIG" >&6; }
-else
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-
-
- if test "x$PKGCONFIG" != x; then
- { echo "$as_me:$LINENO: checking for DBUS" >&5
+if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x; then
+ { echo "$as_me:$LINENO: checking for DBUS" >&5
echo $ECHO_N "checking for DBUS... $ECHO_C" >&6; }
- if $PKGCONFIG --exists dbus-1; then
- { echo "$as_me:$LINENO: result: yes" >&5
+ if $PKGCONFIG --exists dbus-1; then
+ { echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
- cat >>confdefs.h <<\_ACEOF
+ cat >>confdefs.h <<\_ACEOF
#define HAVE_DBUS 1
_ACEOF
- CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
- CUPSDLIBS="$CUPSDLIBS `$PKGCONFIG --libs dbus-1`"
- DBUS_NOTIFIER="dbus"
- DBUS_NOTIFIERLIBS="`$PKGCONFIG --libs dbus-1`"
- { echo "$as_me:$LINENO: checking for dbus_message_iter_init_append in -ldbus-1" >&5
-echo $ECHO_N "checking for dbus_message_iter_init_append in -ldbus-1... $ECHO_C" >&6; }
-if test "${ac_cv_lib_dbus_1_dbus_message_iter_init_append+set}" = set; then
+ CFLAGS="$CFLAGS `$PKGCONFIG --cflags dbus-1` -DDBUS_API_SUBJECT_TO_CHANGE"
+ CUPSDLIBS="$CUPSDLIBS `$PKGCONFIG --libs dbus-1`"
+ DBUS_NOTIFIER="dbus"
+ DBUS_NOTIFIERLIBS="`$PKGCONFIG --libs dbus-1`"
+ SAVELIBS="$LIBS"
+ LIBS="$LIBS $DBUS_NOTIFIERLIBS"
+ { echo "$as_me:$LINENO: checking for dbus_message_iter_init_append" >&5
+echo $ECHO_N "checking for dbus_message_iter_init_append... $ECHO_C" >&6; }
+if test "${ac_cv_func_dbus_message_iter_init_append+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldbus-1 `$PKGCONFIG --libs dbus-1` $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define dbus_message_iter_init_append to an innocuous variant, in case <limits.h> declares dbus_message_iter_init_append.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define dbus_message_iter_init_append innocuous_dbus_message_iter_init_append
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char dbus_message_iter_init_append (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dbus_message_iter_init_append
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
@@ -8711,6 +8727,13 @@ cat >>conftest.$ac_ext <<_ACEOF
extern "C"
#endif
char dbus_message_iter_init_append ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_dbus_message_iter_init_append || defined __stub___dbus_message_iter_init_append
+choke me
+#endif
+
int
main ()
{
@@ -8737,31 +8760,30 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
- ac_cv_lib_dbus_1_dbus_message_iter_init_append=yes
+ ac_cv_func_dbus_message_iter_init_append=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_dbus_1_dbus_message_iter_init_append=no
+ ac_cv_func_dbus_message_iter_init_append=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_dbus_1_dbus_message_iter_init_append" >&5
-echo "${ECHO_T}$ac_cv_lib_dbus_1_dbus_message_iter_init_append" >&6; }
-if test $ac_cv_lib_dbus_1_dbus_message_iter_init_append = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_func_dbus_message_iter_init_append" >&5
+echo "${ECHO_T}$ac_cv_func_dbus_message_iter_init_append" >&6; }
+if test $ac_cv_func_dbus_message_iter_init_append = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_DBUS_MESSAGE_ITER_INIT_APPEND 1
_ACEOF
fi
- else
- { echo "$as_me:$LINENO: result: no" >&5
+ LIBS="$SAVELIBS"
+ else
+ { echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
- fi
fi
fi
@@ -11921,13 +11943,13 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
CFLAGS="$OLDCFLAGS"
- # The -pie option is available with some versions of GCC and adds
+ # The -fPIE option is available with some versions of GCC and adds
# randomization of addresses, which avoids another class of exploits
# that depend on a fixed address for common functions.
- { echo "$as_me:$LINENO: checking if GCC supports -pie" >&5
-echo $ECHO_N "checking if GCC supports -pie... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: checking if GCC supports -fPIE" >&5
+echo $ECHO_N "checking if GCC supports -fPIE... $ECHO_C" >&6; }
OLDCFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -pie -fPIE"
+ CFLAGS="$CFLAGS -fPIE"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -11960,7 +11982,14 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- PIEFLAGS="-pie -fPIE"
+ case "$CC" in
+ *clang)
+ PIEFLAGS="-fPIE -Wl,-pie"
+ ;;
+ *)
+ PIEFLAGS="-fPIE -pie"
+ ;;
+ esac
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
else
@@ -17527,7 +17556,7 @@ SSLLIBS=""
have_ssl=0
if test x$enable_ssl != xno; then
- 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
if test "${ac_cv_header_Security_SecureTransport_h+set}" = set; then
{ echo "$as_me:$LINENO: checking for Security/SecureTransport.h" >&5
@@ -17666,7 +17695,140 @@ _ACEOF
_ACEOF
- if test "${ac_cv_header_Security_SecItemPriv_h+set}" = set; then
+ if test "${ac_cv_header_Security_SecItem_h+set}" = set; then
+ { echo "$as_me:$LINENO: checking for Security/SecItem.h" >&5
+echo $ECHO_N "checking for Security/SecItem.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_Security_SecItem_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_Security_SecItem_h" >&5
+echo "${ECHO_T}$ac_cv_header_Security_SecItem_h" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking Security/SecItem.h usability" >&5
+echo $ECHO_N "checking Security/SecItem.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <Security/SecItem.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking Security/SecItem.h presence" >&5
+echo $ECHO_N "checking Security/SecItem.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <Security/SecItem.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: Security/SecItem.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: Security/SecItem.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: Security/SecItem.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: Security/SecItem.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: Security/SecItem.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: Security/SecItem.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: Security/SecItem.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: Security/SecItem.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: Security/SecItem.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: Security/SecItem.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: Security/SecItem.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: Security/SecItem.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: Security/SecItem.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: Security/SecItem.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: Security/SecItem.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: Security/SecItem.h: in the future, the compiler will take precedence" >&2;}
+
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for Security/SecItem.h" >&5
+echo $ECHO_N "checking for Security/SecItem.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_Security_SecItem_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_Security_SecItem_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_Security_SecItem_h" >&5
+echo "${ECHO_T}$ac_cv_header_Security_SecItem_h" >&6; }
+
+fi
+if test $ac_cv_header_Security_SecItem_h = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SECITEM_H 1
+_ACEOF
+
+fi
+
+
+ if test "${ac_cv_header_Security_SecItemPriv_h+set}" = set; then
{ echo "$as_me:$LINENO: checking for Security/SecItemPriv.h" >&5
echo $ECHO_N "checking for Security/SecItemPriv.h... $ECHO_C" >&6; }
if test "${ac_cv_header_Security_SecItemPriv_h+set}" = set; then
@@ -18365,7 +18527,7 @@ fi
fi
fi
- 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
# Extract the first word of "libgnutls-config", so it can be a program name with args.
set dummy libgnutls-config; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -18493,7 +18655,7 @@ _ACEOF
fi
fi
- if test $have_ssl = 0 -a "x${enable_openssl}" != "xno"; then
+ if test $have_ssl = 0 -a "x$enable_openssl" != "xno"; then
if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
{ echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6; }
@@ -18721,6 +18883,10 @@ if test $have_ssl = 1; then
echo "${ECHO_T} Using SSLLIBS=\"$SSLLIBS\"" >&6; }
{ echo "$as_me:$LINENO: result: Using SSLFLAGS=\"$SSLFLAGS\"" >&5
echo "${ECHO_T} Using SSLFLAGS=\"$SSLFLAGS\"" >&6; }
+elif test x$enable_cdsa = xyes -o x$enable_gnutls = xyes -o x$enable_openssl = xyes; then
+ { { echo "$as_me:$LINENO: error: Unable to enable SSL support." >&5
+echo "$as_me: error: Unable to enable SSL support." >&2;}
+ { (exit 1); exit 1; }; }
fi
@@ -22619,6 +22785,7 @@ XDGOPEN!$XDGOPEN$ac_delim
CUPS_HTMLVIEW!$CUPS_HTMLVIEW$ac_delim
INSTALL!$INSTALL$ac_delim
INSTALLSTATIC!$INSTALLSTATIC$ac_delim
+PKGCONFIG!$PKGCONFIG$ac_delim
LIBMALLOC!$LIBMALLOC$ac_delim
LIBPAPER!$LIBPAPER$ac_delim
GREP!$GREP$ac_delim
@@ -22628,7 +22795,6 @@ LIBWRAP!$LIBWRAP$ac_delim
ARFLAGS!$ARFLAGS$ac_delim
BACKLIBS!$BACKLIBS$ac_delim
CUPSDLIBS!$CUPSDLIBS$ac_delim
-PKGCONFIG!$PKGCONFIG$ac_delim
DBUSDIR!$DBUSDIR$ac_delim
DBUS_NOTIFIER!$DBUS_NOTIFIER$ac_delim
DBUS_NOTIFIERLIBS!$DBUS_NOTIFIERLIBS$ac_delim
diff --git a/cups/adminutil.c b/cups/adminutil.c
index c6ea2dae..6bf2f6e8 100644
--- a/cups/adminutil.c
+++ b/cups/adminutil.c
@@ -1,10 +1,10 @@
/*
- * "$Id: adminutil.c 9376 2010-11-17 19:58:22Z mike $"
+ * "$Id: adminutil.c 9445 2011-01-08 00:03:51Z mike $"
*
* Administration utility API definitions for the Common UNIX Printing
* System (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
@@ -2037,6 +2037,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))
{
/*
@@ -2455,5 +2457,5 @@ write_option(cups_file_t *dstfp, /* I - PPD file */
/*
- * End of "$Id: adminutil.c 9376 2010-11-17 19:58:22Z mike $".
+ * End of "$Id: adminutil.c 9445 2011-01-08 00:03:51Z mike $".
*/
diff --git a/cups/api-array.shtml b/cups/api-array.shtml
index bacf4830..66effeb5 100644
--- a/cups/api-array.shtml
+++ b/cups/api-array.shtml
@@ -1,9 +1,9 @@
<!--
- "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
+ "$Id: api-array.shtml 9728 2011-04-28 21:21:24Z mike $"
- Array API introduction for the Common UNIX Printing System (CUPS).
+ Array API introduction for CUPS.
- Copyright 2007-2008 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
diff --git a/cups/api-cups.shtml b/cups/api-cups.shtml
index cbe3c980..47d34450 100644
--- a/cups/api-cups.shtml
+++ b/cups/api-cups.shtml
@@ -1,9 +1,9 @@
<!--
- "$Id: api-cups.shtml 9061 2010-03-30 22:07:33Z mike $"
+ "$Id: api-cups.shtml 9728 2011-04-28 21:21:24Z mike $"
- CUPS API introduction for the Common UNIX Printing System (CUPS).
+ API introduction 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
@@ -50,7 +50,7 @@ specific destination for printing:</p>
int num_dests = <a href='#cupsGetDests'>cupsGetDests</a>(&amp;dests);
<a href='#cups_dest_t'>cups_dest_t</a> *dest = <a href='#cupsGetDest'>cupsGetDest</a>("name", NULL, num_dests, dests);
-/* do something wiith dest */
+/* do something with dest */
<a href='#cupsFreeDests'>cupsFreeDests</a>(num_dests, dests);
</pre>
diff --git a/cups/api-filedir.shtml b/cups/api-filedir.shtml
index 843812ce..c003ae11 100644
--- a/cups/api-filedir.shtml
+++ b/cups/api-filedir.shtml
@@ -1,9 +1,9 @@
<!--
- "$Id: api-filedir.shtml 7279 2008-01-31 01:50:44Z mike $"
+ "$Id: api-filedir.shtml 9728 2011-04-28 21:21:24Z mike $"
- File and directory API introduction for the Common UNIX Printing System (CUPS).
+ File and directory API introduction for CUPS.
- Copyright 2007-2008 by Apple Inc.
+ Copyright 2007-2011 by Apple Inc.
Copyright 1997-2005 by Easy Software Products, all rights reserved.
These coded instructions, statements, and computer programs are the
diff --git a/cups/api-filter.shtml b/cups/api-filter.shtml
index 7ca0cd6f..134958f2 100644
--- a/cups/api-filter.shtml
+++ b/cups/api-filter.shtml
@@ -1,5 +1,5 @@
<!--
- "$Id: api-filter.shtml 9120 2010-04-23 18:56:34Z mike $"
+ "$Id: api-filter.shtml 9728 2011-04-28 21:21:24Z mike $"
Filter and backend programming introduction for the Common UNIX Printing
System (CUPS).
@@ -58,7 +58,7 @@ more detail.</p>
<h3><a name="SECURITY">Security Considerations</a></h3>
<p>It is always important to use security programming practices. Filters and
-most backends are run as a non-priviledged user, so the major security
+most backends are run as a non-privileged user, so the major security
consideration is resource utilization - filters should not depend on unlimited
amounts of CPU, memory, or disk space, and should protect against conditions
that could lead to excess usage of any resource like infinite loops and
diff --git a/cups/api-httpipp.shtml b/cups/api-httpipp.shtml
index ed559efa..c8ae9cf8 100644
--- a/cups/api-httpipp.shtml
+++ b/cups/api-httpipp.shtml
@@ -1,9 +1,9 @@
<!--
- "$Id: api-httpipp.shtml 7684 2008-06-23 16:47:38Z mike $"
+ "$Id: api-httpipp.shtml 9728 2011-04-28 21:21:24Z mike $"
- HTTP and IPP API introduction for the Common UNIX Printing System (CUPS).
+ HTTP and IPP API introduction for CUPS.
- Copyright 2007-2008 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
diff --git a/cups/api-overview.shtml b/cups/api-overview.shtml
index dd1d6061..3ece1033 100644
--- a/cups/api-overview.shtml
+++ b/cups/api-overview.shtml
@@ -1,10 +1,9 @@
<!--
"$Id: api-cups.header 7279 2008-01-31 01:50:44Z mike $"
- Introduction to CUPS programming content for the Common UNIX Printing System
- (CUPS).
+ Introduction to CUPS programming content for CUPS.
- Copyright 2008 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
diff --git a/cups/api-ppd.shtml b/cups/api-ppd.shtml
index ad393e10..59620e85 100644
--- a/cups/api-ppd.shtml
+++ b/cups/api-ppd.shtml
@@ -1,9 +1,9 @@
<!--
- "$Id: api-ppd.shtml 7616 2008-05-28 00:34:13Z mike $"
+ "$Id: api-ppd.shtml 9728 2011-04-28 21:21:24Z mike $"
- PPD API introduction for the Common UNIX Printing System (CUPS).
+ PPD API introduction for CUPS.
- Copyright 2007-2008 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
diff --git a/cups/conflicts.c b/cups/conflicts.c
index d2cf5adf..8ce6e407 100644
--- a/cups/conflicts.c
+++ b/cups/conflicts.c
@@ -1,9 +1,9 @@
/*
- * "$Id: conflicts.c 9233 2010-08-10 06:15:55Z mike $"
+ * "$Id: conflicts.c 9470 2011-01-11 07:05:58Z mike $"
*
- * Option marking routines for the Common UNIX Printing System (CUPS).
+ * Option marking routines for CUPS.
*
- * Copyright 2007-2009 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
@@ -483,13 +483,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);
@@ -1143,5 +1143,5 @@ ppd_test_constraints(
/*
- * End of "$Id: conflicts.c 9233 2010-08-10 06:15:55Z mike $".
+ * End of "$Id: conflicts.c 9470 2011-01-11 07:05:58Z mike $".
*/
diff --git a/cups/cups.h b/cups/cups.h
index f6bfb394..2eef92b1 100644
--- a/cups/cups.h
+++ b/cups/cups.h
@@ -1,5 +1,5 @@
/*
- * "$Id: cups.h 9377 2010-11-17 19:59:14Z mike $"
+ * "$Id: cups.h 9426 2011-01-06 22:48:42Z mike $"
*
* API definitions for CUPS.
*
@@ -61,10 +61,10 @@ extern "C" {
* Constants...
*/
-# define CUPS_VERSION 1.0406
+# define CUPS_VERSION 1.0407
# define CUPS_VERSION_MAJOR 1
# define CUPS_VERSION_MINOR 4
-# define CUPS_VERSION_PATCH 6
+# define CUPS_VERSION_PATCH 7
# define CUPS_BC_FD 3 /* Back-channel file descriptor for select/poll */
# define CUPS_DATE_ANY (time_t)-1
@@ -336,5 +336,5 @@ extern http_status_t cupsWriteRequestData(http_t *http, const char *buffer,
#endif /* !_CUPS_CUPS_H_ */
/*
- * End of "$Id: cups.h 9377 2010-11-17 19:59:14Z mike $".
+ * End of "$Id: cups.h 9426 2011-01-06 22:48:42Z mike $".
*/
diff --git a/cups/custom.c b/cups/custom.c
index 2d086aca..2c428e39 100644
--- a/cups/custom.c
+++ b/cups/custom.c
@@ -1,9 +1,9 @@
/*
- * "$Id: custom.c 8179 2008-12-10 05:03:11Z mike $"
+ * "$Id: custom.c 9426 2011-01-06 22:48:42Z mike $"
*
- * PPD custom option routines for the Common UNIX Printing System (CUPS).
+ * PPD custom option routines for CUPS.
*
- * Copyright 2007 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
@@ -70,14 +70,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);
}
@@ -114,5 +119,5 @@ ppdNextCustomParam(ppd_coption_t *opt) /* I - Custom option */
/*
- * End of "$Id: custom.c 8179 2008-12-10 05:03:11Z mike $".
+ * End of "$Id: custom.c 9426 2011-01-06 22:48:42Z mike $".
*/
diff --git a/cups/globals.c b/cups/globals.c
index 552ba1f0..2d9c404c 100644
--- a/cups/globals.c
+++ b/cups/globals.c
@@ -1,5 +1,5 @@
/*
- * "$Id: globals.c 9161 2010-06-16 22:34:03Z mike $"
+ * "$Id: globals.c 9595 2011-03-11 05:56:56Z mike $"
*
* Global variable access routines for the Common UNIX Printing System (CUPS).
*
@@ -195,8 +195,9 @@ globals_destructor(void *value) /* I - Data to free */
free(buffer);
}
- cupsArrayDelete(cg->pwg_size_lut);
cupsArrayDelete(cg->leg_size_lut);
+ cupsArrayDelete(cg->ppd_size_lut);
+ cupsArrayDelete(cg->pwg_size_lut);
free(value);
}
@@ -244,5 +245,5 @@ _cupsGlobals(void)
/*
- * End of "$Id: globals.c 9161 2010-06-16 22:34:03Z mike $".
+ * End of "$Id: globals.c 9595 2011-03-11 05:56:56Z mike $".
*/
diff --git a/cups/http-addr.c b/cups/http-addr.c
index 63a94038..dbccfb8b 100644
--- a/cups/http-addr.c
+++ b/cups/http-addr.c
@@ -1,9 +1,9 @@
/*
- * "$Id: http-addr.c 8532 2009-04-20 21:37:14Z mike $"
+ * "$Id: http-addr.c 9609 2011-03-16 02:53:49Z mike $"
*
- * HTTP address routines for the Common UNIX Printing System (CUPS).
+ * HTTP address routines for CUPS.
*
- * Copyright 2007-2009 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
@@ -358,8 +358,11 @@ httpAddrString(const http_addr_t *addr, /* I - Address to convert */
#ifdef AF_INET6
else if (addr->addr.sa_family == AF_INET6)
{
+ char *sptr, /* Pointer into string */
+ temps[64]; /* Temporary string for address */
+
# ifdef HAVE_GETNAMEINFO
- if (getnameinfo(&addr->addr, httpAddrLength(addr), s, slen,
+ if (getnameinfo(&addr->addr, httpAddrLength(addr), temps, sizeof(temps),
NULL, 0, NI_NUMERICHOST))
{
/*
@@ -371,29 +374,36 @@ httpAddrString(const http_addr_t *addr, /* I - Address to convert */
return (NULL);
}
+ else if ((sptr = strchr(temps, '%')) != NULL)
+ {
+ /*
+ * Convert "%zone" to "+zone" to match URI form...
+ */
+
+ *sptr = '+';
+ }
+
# else
- char *sptr; /* Pointer into string */
int i; /* Looping var */
unsigned temp; /* Current value */
const char *prefix; /* Prefix for address */
prefix = "";
- for (sptr = s, i = 0; i < 4 && addr->ipv6.sin6_addr.s6_addr32[i]; i ++)
+ for (sptr = temps, i = 0; i < 4 && addr->ipv6.sin6_addr.s6_addr32[i]; i ++)
{
temp = ntohl(addr->ipv6.sin6_addr.s6_addr32[i]);
- snprintf(sptr, slen, "%s%x", prefix, (temp >> 16) & 0xffff);
+ snprintf(sptr, sizeof(temps) - (sptr - temps), "%s%x", prefix,
+ (temp >> 16) & 0xffff);
prefix = ":";
- slen -= strlen(sptr);
sptr += strlen(sptr);
temp &= 0xffff;
if (temp || i == 3 || addr->ipv6.sin6_addr.s6_addr32[i + 1])
{
- snprintf(sptr, slen, "%s%x", prefix, temp);
- slen -= strlen(sptr);
+ snprintf(sptr, sizeof(temps) - (sptr - temps), "%s%x", prefix, temp);
sptr += strlen(sptr);
}
}
@@ -405,24 +415,24 @@ httpAddrString(const http_addr_t *addr, /* I - Address to convert */
if (i < 4)
{
- snprintf(sptr, slen, "%s:", prefix);
+ snprintf(sptr, sizeof(temps) - (sptr - temps), "%s:", prefix);
prefix = ":";
- slen -= strlen(sptr);
sptr += strlen(sptr);
for (; i < 4; i ++)
{
temp = ntohl(addr->ipv6.sin6_addr.s6_addr32[i]);
- if ((temp & 0xffff0000) || addr->ipv6.sin6_addr.s6_addr32[i - 1])
+ if ((temp & 0xffff0000) ||
+ (i > 0 && addr->ipv6.sin6_addr.s6_addr32[i - 1]))
{
- snprintf(sptr, slen, "%s%x", prefix, (temp >> 16) & 0xffff);
- slen -= strlen(sptr);
+ snprintf(sptr, sizeof(temps) - (sptr - temps), "%s%x", prefix,
+ (temp >> 16) & 0xffff);
sptr += strlen(sptr);
}
- snprintf(sptr, slen, "%s%x", prefix, temp & 0xffff);
- slen -= strlen(sptr);
+ snprintf(sptr, sizeof(temps) - (sptr - temps), "%s%x", prefix,
+ temp & 0xffff);
sptr += strlen(sptr);
}
}
@@ -432,9 +442,7 @@ httpAddrString(const http_addr_t *addr, /* I - Address to convert */
* Empty address...
*/
- strlcpy(s, "::", slen);
- sptr = s + 2;
- slen -= 2;
+ strlcpy(temps, "::", sizeof(temps));
}
else
{
@@ -442,12 +450,16 @@ httpAddrString(const http_addr_t *addr, /* I - Address to convert */
* Empty at end...
*/
- strlcpy(sptr, "::", slen);
- sptr += 2;
- slen -= 2;
+ strlcpy(sptr, "::", sizeof(temps) - (sptr - temps));
}
}
# endif /* HAVE_GETNAMEINFO */
+
+ /*
+ * Add "[v1." and "]" around IPv6 address to convert to URI form.
+ */
+
+ snprintf(s, slen, "[v1.%s]", temps);
}
#endif /* AF_INET6 */
else
@@ -625,5 +637,5 @@ httpGetHostname(http_t *http, /* I - HTTP connection or NULL */
/*
- * End of "$Id: http-addr.c 8532 2009-04-20 21:37:14Z mike $".
+ * End of "$Id: http-addr.c 9609 2011-03-16 02:53:49Z mike $".
*/
diff --git a/cups/http-addrlist.c b/cups/http-addrlist.c
index d8963e4f..d481c0ee 100644
--- a/cups/http-addrlist.c
+++ b/cups/http-addrlist.c
@@ -1,9 +1,9 @@
/*
- * "$Id: http-addrlist.c 8532 2009-04-20 21:37:14Z mike $"
+ * "$Id: http-addrlist.c 9609 2011-03-16 02:53:49Z mike $"
*
- * HTTP address list routines for the Common UNIX Printing System (CUPS).
+ * HTTP address list routines for CUPS.
*
- * Copyright 2007-2009 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
@@ -271,7 +271,7 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
struct addrinfo hints, /* Address lookup hints */
*results, /* Address lookup results */
*current; /* Current result */
- char ipv6[1024], /* IPv6 address */
+ char ipv6[64], /* IPv6 address */
*ipv6zone; /* Pointer to zone separator */
int ipv6len; /* Length of IPv6 address */
int error; /* getaddrinfo() error */
@@ -657,5 +657,5 @@ httpAddrGetList(const char *hostname, /* I - Hostname, IP address, or NULL for p
/*
- * End of "$Id: http-addrlist.c 8532 2009-04-20 21:37:14Z mike $".
+ * End of "$Id: http-addrlist.c 9609 2011-03-16 02:53:49Z mike $".
*/
diff --git a/cups/http-private.h b/cups/http-private.h
index 9c88281a..99fc294e 100644
--- a/cups/http-private.h
+++ b/cups/http-private.h
@@ -1,9 +1,9 @@
/*
- * "$Id: http-private.h 9104 2010-04-12 04:03:53Z mike $"
+ * "$Id: http-private.h 9503 2011-01-22 00:07:22Z mike $"
*
- * Private HTTP definitions for the Common UNIX Printing System (CUPS).
+ * Private HTTP definitions for CUPS.
*
- * Copyright 2007-2008 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
@@ -269,9 +269,10 @@ extern char *_httpEncodeURI(char *dst, const char *src,
size_t dstsize);
extern const char *_httpResolveURI(const char *uri, char *resolved_uri,
size_t resolved_size, int log);
+extern int _httpUpdate(http_t *http, http_status_t *status);
extern int _httpWait(http_t *http, int msec, int usessl);
#endif /* !_CUPS_HTTP_PRIVATE_H_ */
/*
- * End of "$Id: http-private.h 9104 2010-04-12 04:03:53Z mike $".
+ * End of "$Id: http-private.h 9503 2011-01-22 00:07:22Z mike $".
*/
diff --git a/cups/http.c b/cups/http.c
index 65d623ea..6e4e673b 100644
--- a/cups/http.c
+++ b/cups/http.c
@@ -1,9 +1,9 @@
/*
- * "$Id: http.c 9233 2010-08-10 06:15:55Z mike $"
+ * "$Id: http.c 9519 2011-02-10 23:52:40Z mike $"
*
* 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
@@ -67,6 +67,7 @@
* httpSetField() - Set the value of an HTTP header.
* httpSetLength() - Set the content-length and content-encoding.
* httpTrace() - Send an TRACE request to the server.
+ * _httpUpdate() - Update the current HTTP status for incoming data.
* httpUpdate() - Update the current HTTP state for incoming data.
* _httpWait() - Wait for data available on a connection (no flush).
* httpWait() - Wait for data available on a connection.
@@ -2012,163 +2013,202 @@ httpTrace(http_t *http, /* I - Connection to server */
/*
- * 'httpUpdate()' - Update the current HTTP state for incoming data.
+ * '_httpUpdate()' - Update the current HTTP status for incoming data.
+ *
+ * Note: Unlike httpUpdate(), this function does not flush pending write data
+ * and only retrieves a single status line from the HTTP connection.
*/
-http_status_t /* O - HTTP status */
-httpUpdate(http_t *http) /* I - Connection to server */
+int /* O - 1 to continue, 0 to stop */
+_httpUpdate(http_t *http, /* I - Connection to server */
+ http_status_t *status) /* O - Current HTTP status */
{
char line[32768], /* Line from connection... */
*value; /* Pointer to value on line */
http_field_t field; /* Field index */
- int major, minor, /* HTTP version numbers */
- status; /* Request status */
+ int major, minor; /* HTTP version numbers */
- DEBUG_printf(("httpUpdate(http=%p), state=%s", http,
+ DEBUG_printf(("_httpUpdate(http=%p, status=%p), state=%s", http, status,
http_states[http->state]));
/*
- * Flush pending data, if any...
+ * Grab a single line from the connection...
*/
- if (http->wused)
+ if (!httpGets(line, sizeof(line), http))
{
- DEBUG_puts("2httpUpdate: flushing buffer...");
-
- if (httpFlushWrite(http) < 0)
- return (HTTP_ERROR);
+ *status = HTTP_ERROR;
+ return (0);
}
- /*
- * If we haven't issued any commands, then there is nothing to "update"...
- */
-
- if (http->state == HTTP_WAITING)
- return (HTTP_CONTINUE);
-
- /*
- * Grab all of the lines we can from the connection...
- */
+ DEBUG_printf(("2_httpUpdate: Got \"%s\"", line));
- while (httpGets(line, sizeof(line), http) != NULL)
+ if (line[0] == '\0')
{
- DEBUG_printf(("2httpUpdate: Got \"%s\"", line));
+ /*
+ * Blank line means the start of the data section (if any). Return
+ * the result code, too...
+ *
+ * If we get status 100 (HTTP_CONTINUE), then we *don't* change states.
+ * Instead, we just return HTTP_CONTINUE to the caller and keep on
+ * tryin'...
+ */
- if (line[0] == '\0')
+ if (http->status == HTTP_CONTINUE)
{
- /*
- * Blank line means the start of the data section (if any). Return
- * the result code, too...
- *
- * If we get status 100 (HTTP_CONTINUE), then we *don't* change states.
- * Instead, we just return HTTP_CONTINUE to the caller and keep on
- * tryin'...
- */
-
- if (http->status == HTTP_CONTINUE)
- return (http->status);
+ *status = http->status;
+ return (0);
+ }
- if (http->status < HTTP_BAD_REQUEST)
- http->digest_tries = 0;
+ if (http->status < HTTP_BAD_REQUEST)
+ http->digest_tries = 0;
#ifdef HAVE_SSL
- if (http->status == HTTP_SWITCHING_PROTOCOLS && !http->tls)
+ if (http->status == HTTP_SWITCHING_PROTOCOLS && !http->tls)
+ {
+ if (http_setup_ssl(http) != 0)
{
- if (http_setup_ssl(http) != 0)
- {
# ifdef WIN32
- closesocket(http->fd);
+ closesocket(http->fd);
# else
- close(http->fd);
+ close(http->fd);
# endif /* WIN32 */
- return (HTTP_ERROR);
- }
-
- return (HTTP_CONTINUE);
+ *status = http->status = HTTP_ERROR;
+ return (0);
}
+
+ *status = HTTP_CONTINUE;
+ return (0);
+ }
#endif /* HAVE_SSL */
- httpGetLength2(http);
+ httpGetLength2(http);
- switch (http->state)
- {
- case HTTP_GET :
- case HTTP_POST :
- case HTTP_POST_RECV :
- case HTTP_PUT :
- http->state ++;
- case HTTP_POST_SEND :
- case HTTP_HEAD :
- break;
-
- default :
- http->state = HTTP_WAITING;
- break;
- }
+ switch (http->state)
+ {
+ case HTTP_GET :
+ case HTTP_POST :
+ case HTTP_POST_RECV :
+ case HTTP_PUT :
+ http->state ++;
+ case HTTP_POST_SEND :
+ case HTTP_HEAD :
+ break;
+
+ default :
+ http->state = HTTP_WAITING;
+ break;
+ }
+
+ *status = http->status;
+ return (0);
+ }
+ else if (!strncmp(line, "HTTP/", 5))
+ {
+ /*
+ * Got the beginning of a response...
+ */
- return (http->status);
+ int intstatus; /* Status value as an integer */
+
+ if (sscanf(line, "HTTP/%d.%d%d", &major, &minor, &intstatus) != 3)
+ {
+ *status = http->status = HTTP_ERROR;
+ return (0);
}
- else if (!strncmp(line, "HTTP/", 5))
+
+ http->version = (http_version_t)(major * 100 + minor);
+ *status = http->status = (http_status_t)intstatus;
+ }
+ else if ((value = strchr(line, ':')) != NULL)
+ {
+ /*
+ * Got a value...
+ */
+
+ *value++ = '\0';
+ while (_cups_isspace(*value))
+ value ++;
+
+ /*
+ * Be tolerants of servers that send unknown attribute fields...
+ */
+
+ if (!strcasecmp(line, "expect"))
{
/*
- * Got the beginning of a response...
+ * "Expect: 100-continue" or similar...
*/
- if (sscanf(line, "HTTP/%d.%d%d", &major, &minor, &status) != 3)
- return (HTTP_ERROR);
-
- http->version = (http_version_t)(major * 100 + minor);
- http->status = (http_status_t)status;
+ http->expect = (http_status_t)atoi(value);
}
- else if ((value = strchr(line, ':')) != NULL)
+ else if (!strcasecmp(line, "cookie"))
{
/*
- * Got a value...
+ * "Cookie: name=value[; name=value ...]" - replaces previous cookies...
*/
- *value++ = '\0';
- while (_cups_isspace(*value))
- value ++;
+ httpSetCookie(http, value);
+ }
+ else if ((field = http_field(line)) != HTTP_FIELD_UNKNOWN)
+ httpSetField(http, field, value);
+#ifdef DEBUG
+ else
+ DEBUG_printf(("1_httpUpdate: unknown field %s seen!", line));
+#endif /* DEBUG */
+ }
+ else
+ {
+ DEBUG_printf(("1_httpUpdate: Bad response line \"%s\"!", line));
+ *status = http->status = HTTP_ERROR;
+ return (0);
+ }
- /*
- * Be tolerants of servers that send unknown attribute fields...
- */
+ return (1);
+}
- if (!strcasecmp(line, "expect"))
- {
- /*
- * "Expect: 100-continue" or similar...
- */
- http->expect = (http_status_t)atoi(value);
- }
- else if (!strcasecmp(line, "cookie"))
- {
- /*
- * "Cookie: name=value[; name=value ...]" - replaces previous cookies...
- */
+/*
+ * 'httpUpdate()' - Update the current HTTP state for incoming data.
+ */
- httpSetCookie(http, value);
- }
- else if ((field = http_field(line)) == HTTP_FIELD_UNKNOWN)
- {
- DEBUG_printf(("1httpUpdate: unknown field %s seen!", line));
- continue;
- }
- else
- httpSetField(http, field, value);
- }
- else
- {
- DEBUG_printf(("1httpUpdate: Bad response line \"%s\"!", line));
- http->status = HTTP_ERROR;
+http_status_t /* O - HTTP status */
+httpUpdate(http_t *http) /* I - Connection to server */
+{
+ http_status_t status; /* Request status */
+
+
+ DEBUG_printf(("httpUpdate(http=%p), state=%s", http,
+ http_states[http->state]));
+
+ /*
+ * Flush pending data, if any...
+ */
+
+ if (http->wused)
+ {
+ DEBUG_puts("2httpUpdate: flushing buffer...");
+
+ if (httpFlushWrite(http) < 0)
return (HTTP_ERROR);
- }
}
/*
+ * If we haven't issued any commands, then there is nothing to "update"...
+ */
+
+ if (http->state == HTTP_WAITING)
+ return (HTTP_CONTINUE);
+
+ /*
+ * Grab all of the lines we can from the connection...
+ */
+
+ while (_httpUpdate(http, &status));
+
+ /*
* See if there was an error...
*/
@@ -2187,10 +2227,10 @@ httpUpdate(http_t *http) /* I - Connection to server */
}
/*
- * If we haven't already returned, then there is nothing new...
+ * Return the current status...
*/
- return (HTTP_CONTINUE);
+ return (status);
}
@@ -2454,13 +2494,6 @@ httpWrite2(http_t *http, /* I - Connection to server */
http->data_encoding = HTTP_ENCODE_LENGTH;
http->data_remaining = 0;
}
-
- if (http->state == HTTP_POST_RECV)
- http->state ++;
- else if (http->state == HTTP_PUT_RECV)
- http->state = HTTP_STATUS;
- else
- http->state = HTTP_WAITING;
}
return (bytes);
@@ -3511,5 +3544,5 @@ http_write_ssl(http_t *http, /* I - Connection to server */
/*
- * End of "$Id: http.c 9233 2010-08-10 06:15:55Z mike $".
+ * End of "$Id: http.c 9519 2011-02-10 23:52:40Z mike $".
*/
diff --git a/cups/http.h b/cups/http.h
index 69ae8256..dd62f244 100644
--- a/cups/http.h
+++ b/cups/http.h
@@ -1,10 +1,9 @@
/*
- * "$Id: http.h 9157 2010-06-16 05:27:41Z mike $"
+ * "$Id: http.h 9428 2011-01-07 00:04:48Z mike $"
*
- * Hyper-Text Transport Protocol definitions for the Common UNIX Printing
- * System (CUPS).
+ * Hyper-Text Transport Protocol definitions for CUPS.
*
- * Copyright 2007-2009 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 +87,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
@@ -450,5 +449,5 @@ extern void httpSetAuthString(http_t *http, const char *scheme,
#endif /* !_CUPS_HTTP_H_ */
/*
- * End of "$Id: http.h 9157 2010-06-16 05:27:41Z mike $".
+ * End of "$Id: http.h 9428 2011-01-07 00:04:48Z mike $".
*/
diff --git a/cups/mark.c b/cups/mark.c
index b5bc43af..f6fb259e 100644
--- a/cups/mark.c
+++ b/cups/mark.c
@@ -1,5 +1,5 @@
/*
- * "$Id: mark.c 9293 2010-09-02 17:52:24Z mike $"
+ * "$Id: mark.c 9426 2011-01-06 22:48:42Z mike $"
*
* Option marking routines for CUPS.
*
@@ -81,10 +81,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 */
/*
@@ -97,29 +102,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;)
@@ -143,21 +158,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...
*/
@@ -166,6 +274,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") ||
@@ -231,60 +340,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"))
{
/*
@@ -1040,5 +1095,5 @@ ppd_mark_option(ppd_file_t *ppd, /* I - PPD file */
/*
- * End of "$Id: mark.c 9293 2010-09-02 17:52:24Z mike $".
+ * End of "$Id: mark.c 9426 2011-01-06 22:48:42Z mike $".
*/
diff --git a/cups/ppd.c b/cups/ppd.c
index e28dc60d..e2070fa6 100644
--- a/cups/ppd.c
+++ b/cups/ppd.c
@@ -1,9 +1,9 @@
/*
- * "$Id: ppd.c 9310 2010-09-21 22:34:57Z mike $"
+ * "$Id: ppd.c 9426 2011-01-06 22:48:42Z mike $"
*
* 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.
@@ -112,7 +111,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);
@@ -2313,18 +2311,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.
*/
@@ -2479,7 +2465,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);
@@ -3157,5 +3143,5 @@ ppd_read(cups_file_t *fp, /* I - File to read from */
/*
- * End of "$Id: ppd.c 9310 2010-09-21 22:34:57Z mike $".
+ * End of "$Id: ppd.c 9426 2011-01-06 22:48:42Z mike $".
*/
diff --git a/cups/pwg-ppd.c b/cups/pwg-ppd.c
index 51787331..e9761627 100644
--- a/cups/pwg-ppd.c
+++ b/cups/pwg-ppd.c
@@ -1,9 +1,9 @@
/*
- * "$Id: pwg-ppd.c 9328 2010-10-06 19:57:14Z mike $"
+ * "$Id: pwg-ppd.c 9586 2011-03-04 21:43:50Z mike $"
*
* PWG PPD mapping API implementation for CUPS.
*
- * Copyright 2010 by Apple Inc.
+ * Copyright 2010-2011 by Apple Inc.
*
* These coded instructions, statements, and computer programs are the
* property of Apple Inc. and are protected by Federal copyright
@@ -156,7 +156,7 @@ _pwgCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
if (!strcasecmp(ppd_size->name, "Custom"))
continue;
-
+
/*
* Convert the PPD size name to the corresponding PWG keyword name.
*/
@@ -225,12 +225,12 @@ _pwgCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
old_size->right == 0 && old_size->top == 0;
old_known_pwg = strncmp(old_size->map.pwg, "oe_", 3) &&
strncmp(old_size->map.pwg, "om_", 3);
-
+
similar = old_borderless == new_borderless &&
_PWG_EQUIVALENT(old_size->width, new_width) &&
_PWG_EQUIVALENT(old_size->length, new_length);
- if (similar &&
+ if (similar &&
(new_known_pwg || (!old_known_pwg && new_imageable > old_imageable)))
{
/*
@@ -254,7 +254,7 @@ _pwgCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
new_size = pwg_size ++;
pwg->num_sizes ++;
- }
+ }
if (new_size)
{
@@ -513,7 +513,7 @@ _pwgCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
if (pwg_print_quality != _PWG_PRINT_QUALITY_HIGH && paper_coating &&
strcmp(paper_coating, "none") &&
- strcmp(paper_coating, "autodetect"))
+ strcmp(paper_coating, "autodetect"))
continue;
/*
@@ -896,7 +896,7 @@ const char * /* O - PPD PageSize or NULL */
_pwgGetPageSize(_pwg_t *pwg, /* I - PWG mapping data */
ipp_t *job, /* I - Job attributes or NULL */
const char *keyword, /* I - Keyword string or NULL */
- int *exact) /* I - 1 if exact match, 0 otherwise */
+ int *exact) /* O - 1 if exact match, 0 otherwise */
{
int i; /* Looping var */
_pwg_size_t *size, /* Current size */
@@ -967,14 +967,15 @@ _pwgGetPageSize(_pwg_t *pwg, /* I - PWG mapping data */
DEBUG_printf(("2_pwgGetPageSize: size[%d]=[\"%s\" \"%s\"]",
(int)(size - pwg->sizes), size->map.pwg, size->map.ppd));
- if (!strcasecmp(ppd_name, size->map.ppd))
+ if (!strcasecmp(ppd_name, size->map.ppd) ||
+ !strcasecmp(ppd_name, size->map.pwg))
{
if (exact)
*exact = 1;
DEBUG_printf(("1_pwgGetPageSize: Returning \"%s\"", ppd_name));
- return (ppd_name);
+ return (size->map.ppd);
}
}
}
@@ -1016,55 +1017,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 (dleft <= -35 || dleft >= 35 || dright <= -35 || dright >= 35 ||
- dtop <= -35 || dtop >= 35 || dbottom <= -35 || dbottom >= 35)
+ if (dwidth <= -176 || dwidth >= 176 || dlength <= -176 || dlength >= 176)
+ continue;
+
+ 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...
+ */
+
+ dleft = size->left - jobsize.left;
+ dright = size->right - jobsize.right;
+ dtop = size->top - jobsize.top;
+ dbottom = size->bottom - jobsize.bottom;
- if (dmin < dclosest)
+ 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)
@@ -1482,5 +1487,5 @@ pwg_unppdize_name(const char *ppd, /* I - PPD keyword */
/*
- * End of "$Id: pwg-ppd.c 9328 2010-10-06 19:57:14Z mike $".
+ * End of "$Id: pwg-ppd.c 9586 2011-03-04 21:43:50Z mike $".
*/
diff --git a/cups/request.c b/cups/request.c
index 2ee139f7..95a3e419 100644
--- a/cups/request.c
+++ b/cups/request.c
@@ -1,9 +1,9 @@
/*
- * "$Id: request.c 9322 2010-10-01 22:40:38Z mike $"
+ * "$Id: request.c 9582 2011-03-04 19:28:38Z mike $"
*
- * IPP utilities for the Common UNIX Printing System (CUPS).
+ * IPP utilities 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
@@ -153,7 +153,11 @@ cupsDoIORequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP
if (!http)
if ((http = _cupsConnect()) == NULL)
+ {
+ ippDelete(request);
+
return (NULL);
+ }
/*
* See if we have a file to send...
@@ -245,7 +249,9 @@ cupsDoIORequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP
{
if (httpCheck(http))
{
- if ((status = httpUpdate(http)) != HTTP_CONTINUE)
+ _httpUpdate(http, &status);
+
+ if (status >= HTTP_MULTIPLE_CHOICES)
break;
}
@@ -385,9 +391,11 @@ cupsGetResponse(http_t *http, /* I - Connection to server or @code CUPS_HTTP
DEBUG_printf(("2cupsGetResponse: Update loop, http->status=%d...",
http->status));
- status = http->status;
- while (status == HTTP_CONTINUE)
+ do
+ {
status = httpUpdate(http);
+ }
+ while (http->state == HTTP_POST_RECV);
DEBUG_printf(("2cupsGetResponse: status=%d", status));
@@ -614,10 +622,25 @@ 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...
+ */
+
+ httpSetField(http, HTTP_FIELD_WWW_AUTHENTICATE, "Negotiate");
+ cupsDoAuthentication(http, "POST", resource);
+ httpSetField(http, HTTP_FIELD_WWW_AUTHENTICATE, "");
+ }
+#endif /* HAVE_GSSAPI */
+
httpSetField(http, HTTP_FIELD_AUTHORIZATION, http->authstring);
- httpSetExpect(http, expect);
DEBUG_printf(("2cupsSendRequest: authstring=\"%s\"", http->authstring));
@@ -655,7 +678,8 @@ cupsSendRequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP
{
got_status = 1;
- if ((status = httpUpdate(http)) != HTTP_CONTINUE)
+ _httpUpdate(http, &status);
+ if (status >= HTTP_MULTIPLE_CHOICES)
break;
}
@@ -663,15 +687,18 @@ cupsSendRequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP
* Wait up to 1 second to get the 100-continue response as needed...
*/
- if (!got_status && expect == HTTP_CONTINUE)
+ if (!got_status)
{
- DEBUG_puts("2cupsSendRequest: Waiting for 100-continue...");
+ if (expect == HTTP_CONTINUE)
+ {
+ DEBUG_puts("2cupsSendRequest: Waiting for 100-continue...");
- if (httpWait(http, 1000))
- status = httpUpdate(http);
+ if (httpWait(http, 1000))
+ _httpUpdate(http, &status);
+ }
+ else if (httpCheck(http))
+ _httpUpdate(http, &status);
}
- else if (httpCheck(http))
- status = httpUpdate(http);
DEBUG_printf(("2cupsSendRequest: status=%d", status));
@@ -679,7 +706,7 @@ cupsSendRequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP
* Process the current HTTP status...
*/
- if (status >= HTTP_BAD_REQUEST)
+ if (status >= HTTP_MULTIPLE_CHOICES)
httpFlush(http);
switch (status)
@@ -806,9 +833,10 @@ cupsWriteRequestData(
if (_httpWait(http, 0, 1))
{
- http_status_t status; /* Status from httpUpdate */
+ http_status_t status; /* Status from _httpUpdate */
- if ((status = httpUpdate(http)) >= HTTP_BAD_REQUEST)
+ _httpUpdate(http, &status);
+ if (status >= HTTP_MULTIPLE_CHOICES)
httpFlush(http);
return (status);
@@ -918,5 +946,5 @@ _cupsSetHTTPError(http_status_t status) /* I - HTTP status code */
/*
- * End of "$Id: request.c 9322 2010-10-01 22:40:38Z mike $".
+ * End of "$Id: request.c 9582 2011-03-04 19:28:38Z mike $".
*/
diff --git a/cups/testppd.c b/cups/testppd.c
index 812df973..a7c944f5 100644
--- a/cups/testppd.c
+++ b/cups/testppd.c
@@ -1,9 +1,9 @@
/*
- * "$Id: testppd.c 9127 2010-04-28 23:43:14Z mike $"
+ * "$Id: testppd.c 9586 2011-03-04 21:43:50Z mike $"
*
- * PPD test program for the Common UNIX Printing System (CUPS).
+ * PPD test program 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
@@ -445,6 +445,21 @@ main(int argc, /* I - Number of command-line arguments */
else
puts("PASS");
+ fputs("cupsMarkOptions(media=oe_letter-fullbleed_8.5x11in): ", stdout);
+ num_options = cupsAddOption("media", "oe_letter-fullbleed_8.5x11in", 0,
+ &options);
+ cupsMarkOptions(ppd, num_options, options);
+ cupsFreeOptions(num_options, options);
+
+ size = ppdPageSize(ppd, NULL);
+ if (!size || strcmp(size->name, "Letter.Fullbleed"))
+ {
+ printf("FAIL (%s)\n", size ? size->name : "unknown");
+ status ++;
+ }
+ else
+ puts("PASS");
+
fputs("cupsMarkOptions(media=A4): ", stdout);
num_options = cupsAddOption("media", "A4", 0, &options);
cupsMarkOptions(ppd, num_options, options);
@@ -714,7 +729,7 @@ main(int argc, /* I - Number of command-line arguments */
}
else
puts("FAIL (No conflicts!)");
-
+
fputs("ppdInstallableConflict(): ", stdout);
if (ppdInstallableConflict(ppd, "Duplex", "DuplexNoTumble") &&
!ppdInstallableConflict(ppd, "Duplex", "None"))
@@ -830,10 +845,23 @@ main(int argc, /* I - Number of command-line arguments */
if (!strncmp(argv[1], "-d", 2))
{
- filename = cupsGetPPD(argv[1] + 2);
+ const char *printer; /* Printer name */
+
+ if (argv[1][2])
+ printer = argv[1] + 2;
+ else if (argv[2])
+ printer = argv[2];
+ else
+ {
+ puts("Usage: ./testppd -d printer");
+ return (1);
+ }
+
+ filename = cupsGetPPD(printer);
+
if (!filename)
{
- printf("%s: %s\n", argv[1], cupsLastErrorString());
+ printf("%s: %s\n", printer, cupsLastErrorString());
return (1);
}
}
@@ -1049,5 +1077,5 @@ main(int argc, /* I - Number of command-line arguments */
/*
- * End of "$Id: testppd.c 9127 2010-04-28 23:43:14Z mike $".
+ * End of "$Id: testppd.c 9586 2011-03-04 21:43:50Z mike $".
*/
diff --git a/cups/transcode.c b/cups/transcode.c
index 90fb1bad..8ef7f1b4 100644
--- a/cups/transcode.c
+++ b/cups/transcode.c
@@ -1,9 +1,9 @@
/*
- * "$Id: transcode.c 8635 2009-05-14 21:18:35Z mike $"
+ * "$Id: transcode.c 9696 2011-04-18 16:25:38Z mike $"
*
- * Transcoding support for the Common UNIX Printing System (CUPS).
+ * Transcoding support 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
@@ -279,7 +279,7 @@ cupsCharsetToUTF8(
* Handle identity conversions...
*/
- if (encoding == CUPS_UTF8 ||
+ if (encoding == CUPS_UTF8 || encoding <= CUPS_US_ASCII ||
encoding < 0 || encoding >= CUPS_ENCODING_VBCS_END)
{
strlcpy((char *)dest, src, maxout);
@@ -385,13 +385,14 @@ cupsUTF8ToCharset(
* Handle UTF-8 to ISO-8859-1 directly...
*/
- if (encoding == CUPS_ISO8859_1)
+ if (encoding == CUPS_ISO8859_1 || encoding == CUPS_US_ASCII)
{
- int ch; /* Character from string */
+ int ch, /* Character from string */
+ maxch; /* Maximum character for charset */
char *destptr, /* Pointer into ISO-8859-1 buffer */
*destend; /* End of ISO-8859-1 buffer */
-
+ maxch = encoding == CUPS_ISO8859_1 ? 256 : 128;
destptr = dest;
destend = dest + maxout - 1;
@@ -403,7 +404,7 @@ cupsUTF8ToCharset(
{
ch = ((ch & 0x1f) << 6) | (*src++ & 0x3f);
- if (ch < 256)
+ if (ch < maxch)
*destptr++ = ch;
else
*destptr++ = '?';
@@ -1821,5 +1822,5 @@ get_vbcs_charmap(
/*
- * End of "$Id: transcode.c 8635 2009-05-14 21:18:35Z mike $"
+ * End of "$Id: transcode.c 9696 2011-04-18 16:25:38Z mike $"
*/
diff --git a/doc/Makefile b/doc/Makefile
index 7e4e44c1..74177297 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,9 +1,9 @@
#
-# "$Id: Makefile 9259 2010-08-13 04:11:46Z mike $"
+# "$Id: Makefile 9484 2011-01-17 05:41:04Z 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 8ec40856..51c4f4c3 100644
--- a/doc/cups.css
+++ b/doc/cups.css
@@ -114,7 +114,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 6ca957e3..a73d7717 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 da71c544..5afb0d0c 100755
--- 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 0408c388..5b79b6ae 100644
--- a/doc/eu/index.html.in
+++ b/doc/eu/index.html.in
@@ -99,8 +99,8 @@ 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>
+<TR><TD CLASS="trailer">CUPS eta CUPSen logotipoa <A HREF="http://www.apple.com">Apple Inc.</A> en marka erregistratuak dira.
+CUPSen copyright-a 2007-2011 Apple Inc. Eskubide guztiak gordeta.</TD></TR>
</TABLE>
</BODY>
</HTML>
diff --git a/doc/help/accounting.html b/doc/help/accounting.html
index fe995956..66c34ec1 100644
--- a/doc/help/accounting.html
+++ b/doc/help/accounting.html
@@ -18,15 +18,15 @@ support, there are several third-party solutions that can be found on
<P>CUPS supports page and size-based quotas for each printer.
The quotas are tracked individually for each user, but a single set of
-limits applies to all users for a partiuclar printer. For example, you
+limits applies to all users for a particular printer. For example, you
can limit every user to 5 pages per day on an expensive printer, but
you cannot limit every user except Johnny.</P>
-<P>The <CODE>job-k-limit</CODE>, <CODE>job-page-limit</CODE>, and <CODE>job-quota-peiod</CODE>
+<P>The <CODE>job-k-limit</CODE>, <CODE>job-page-limit</CODE>, and <CODE>job-quota-period</CODE>
options determine whether and how quotas are enforced for a printer.
The <CODE>job-quota-period</CODE> option determines the time interval for
quota tracking. The interval is expressed in seconds, so a day is
-86,400, a week is 604,800 and a month is 2,592,000 seconds. The
+86,400, a week is 604,800, and a month is 2,592,000 seconds. The
<CODE>job-k-limit</CODE> option specifies the job size limit in killobytes. The
<CODE>job-page-limit</CODE> option specifies the number of pages limit.</P>
diff --git a/doc/help/api-array.html b/doc/help/api-array.html
index 93ae48b1..8d381495 100644
--- a/doc/help/api-array.html
+++ b/doc/help/api-array.html
@@ -4,7 +4,7 @@
<head>
<title>Array API</title>
<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+<meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -338,7 +338,7 @@ div.contents ul.subcontents li {
<body>
<div class='body'>
<!--
- "$Id: api-array.html 8653 2009-05-16 23:53:28Z mike $"
+ "$Id: api-array.html 9728 2011-04-28 21:21:24Z mike $"
Array API header for the Common UNIX Printing System (CUPS).
@@ -407,11 +407,11 @@ div.contents ul.subcontents li {
<li><a href="#cups_array_t" title="CUPS array type">cups_array_t</a></li>
</ul></li>
<!--
- "$Id: api-array.html 8653 2009-05-16 23:53:28Z mike $"
+ "$Id: api-array.html 9728 2011-04-28 21:21:24Z mike $"
- Array API introduction for the Common UNIX Printing System (CUPS).
+ Array API introduction for CUPS.
- Copyright 2007-2008 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
diff --git a/doc/help/api-cgi.html b/doc/help/api-cgi.html
index 3cc681d7..5a0a99e6 100644
--- a/doc/help/api-cgi.html
+++ b/doc/help/api-cgi.html
@@ -4,7 +4,7 @@
<head>
<title>CGI API</title>
<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+<meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -338,7 +338,7 @@ div.contents ul.subcontents li {
<body>
<div class='body'>
<!--
- "$Id: api-cgi.html 9121 2010-04-23 18:57:00Z mike $"
+ "$Id: api-cgi.html 9728 2011-04-28 21:21:24Z mike $"
CGI API header for CUPS.
@@ -434,7 +434,7 @@ by the template file.">cgiGetAttributes</a></li>
<li><a href="#help_word_s" title="Help word structure...">help_word_s</a></li>
</ul></li>
<!--
- "$Id: api-cgi.html 9121 2010-04-23 18:57:00Z mike $"
+ "$Id: api-cgi.html 9728 2011-04-28 21:21:24Z mike $"
CGI API introduction for CUPS.
diff --git a/doc/help/api-cups.html b/doc/help/api-cups.html
index d2362431..d12cbc60 100644
--- a/doc/help/api-cups.html
+++ b/doc/help/api-cups.html
@@ -4,7 +4,7 @@
<head>
<title>CUPS API</title>
<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+<meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -338,7 +338,7 @@ div.contents ul.subcontents li {
<body>
<div class='body'>
<!--
- "$Id: api-cups.html 9121 2010-04-23 18:57:00Z mike $"
+ "$Id: api-cups.html 9728 2011-04-28 21:21:24Z mike $"
CUPS API header for the Common UNIX Printing System (CUPS).
@@ -475,11 +475,11 @@ specified server.">cupsPrintFiles2</a></li>
<li><a href="#cups_ptype_e" title="Printer type/capability bit constants">cups_ptype_e</a></li>
</ul></li>
<!--
- "$Id: api-cups.html 9121 2010-04-23 18:57:00Z mike $"
+ "$Id: api-cups.html 9728 2011-04-28 21:21:24Z mike $"
- CUPS API introduction for the Common UNIX Printing System (CUPS).
+ API introduction 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
@@ -526,7 +526,7 @@ specific destination for printing:</p>
int num_dests = <a href='#cupsGetDests'>cupsGetDests</a>(&amp;dests);
<a href='#cups_dest_t'>cups_dest_t</a> *dest = <a href='#cupsGetDest'>cupsGetDest</a>("name", NULL, num_dests, dests);
-/* do something wiith dest */
+/* do something with dest */
<a href='#cupsFreeDests'>cupsFreeDests</a>(num_dests, dests);
</pre>
diff --git a/doc/help/api-driver.html b/doc/help/api-driver.html
index aed3924b..b021207c 100644
--- a/doc/help/api-driver.html
+++ b/doc/help/api-driver.html
@@ -4,7 +4,7 @@
<head>
<title>Printer Driver API</title>
<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+<meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -338,7 +338,7 @@ div.contents ul.subcontents li {
<body>
<div class='body'>
<!--
- "$Id: api-driver.html 8653 2009-05-16 23:53:28Z mike $"
+ "$Id: api-driver.html 9728 2011-04-28 21:21:24Z mike $"
Driver API header for CUPS.
@@ -427,7 +427,7 @@ media, and resolution.">cupsFindAttr</a></li>
<li><a href="#cups_srgb_lut[256]" title="sRGB gamma lookup table">cups_srgb_lut[256]</a></li>
</ul></li>
<!--
- "$Id: api-driver.html 8653 2009-05-16 23:53:28Z mike $"
+ "$Id: api-driver.html 9728 2011-04-28 21:21:24Z mike $"
Driver API introduction for CUPS.
diff --git a/doc/help/api-filedir.html b/doc/help/api-filedir.html
index a899c93e..ada05aba 100644
--- a/doc/help/api-filedir.html
+++ b/doc/help/api-filedir.html
@@ -4,7 +4,7 @@
<head>
<title>File and Directory APIs</title>
<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+<meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -338,7 +338,7 @@ div.contents ul.subcontents li {
<body>
<div class='body'>
<!--
- "$Id: api-filedir.html 8653 2009-05-16 23:53:28Z mike $"
+ "$Id: api-filedir.html 9728 2011-04-28 21:21:24Z mike $"
File and Directory API header for the Common UNIX Printing System (CUPS).
@@ -421,11 +421,11 @@ file.">cupsFileRewind</a></li>
<li><a href="#cups_dentry_s" title="Directory entry type">cups_dentry_s</a></li>
</ul></li>
<!--
- "$Id: api-filedir.html 8653 2009-05-16 23:53:28Z mike $"
+ "$Id: api-filedir.html 9728 2011-04-28 21:21:24Z mike $"
- File and directory API introduction for the Common UNIX Printing System (CUPS).
+ File and directory API introduction for CUPS.
- Copyright 2007-2008 by Apple Inc.
+ Copyright 2007-2011 by Apple Inc.
Copyright 1997-2005 by Easy Software Products, all rights reserved.
These coded instructions, statements, and computer programs are the
diff --git a/doc/help/api-filter.html b/doc/help/api-filter.html
index 4b0ff8fa..22a1ff40 100644
--- a/doc/help/api-filter.html
+++ b/doc/help/api-filter.html
@@ -4,7 +4,7 @@
<head>
<title>Filter and Backend Programming</title>
<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+<meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -338,7 +338,7 @@ div.contents ul.subcontents li {
<body>
<div class='body'>
<!--
- "$Id: api-filter.html 9283 2010-08-31 18:07:49Z mike $"
+ "$Id: api-filter.html 9728 2011-04-28 21:21:24Z mike $"
Filter and backend programming header for the Common UNIX Printing System
(CUPS).
@@ -421,7 +421,7 @@ div.contents ul.subcontents li {
<li><a href="#cups_sc_status_e" title="Response status codes">cups_sc_status_e</a></li>
</ul></li>
<!--
- "$Id: api-filter.html 9283 2010-08-31 18:07:49Z mike $"
+ "$Id: api-filter.html 9728 2011-04-28 21:21:24Z mike $"
Filter and backend programming introduction for the Common UNIX Printing
System (CUPS).
@@ -480,7 +480,7 @@ more detail.</p>
<h3><a name="SECURITY">Security Considerations</a></h3>
<p>It is always important to use security programming practices. Filters and
-most backends are run as a non-priviledged user, so the major security
+most backends are run as a non-privileged user, so the major security
consideration is resource utilization - filters should not depend on unlimited
amounts of CPU, memory, or disk space, and should protect against conditions
that could lead to excess usage of any resource like infinite loops and
diff --git a/doc/help/api-httpipp.html b/doc/help/api-httpipp.html
index 715d71fe..76c45bde 100644
--- a/doc/help/api-httpipp.html
+++ b/doc/help/api-httpipp.html
@@ -4,7 +4,7 @@
<head>
<title>HTTP and IPP APIs</title>
<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+<meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -338,7 +338,7 @@ div.contents ul.subcontents li {
<body>
<div class='body'>
<!--
- "$Id: api-httpipp.html 9283 2010-08-31 18:07:49Z mike $"
+ "$Id: api-httpipp.html 9728 2011-04-28 21:21:24Z mike $"
HTTP and IPP API header for the Common UNIX Printing System (CUPS).
@@ -588,11 +588,11 @@ are server-oriented...">http_state_e</a></li>
<li><a href="#ipp_tag_e" title="Format tags for attributes">ipp_tag_e</a></li>
</ul></li>
<!--
- "$Id: api-httpipp.html 9283 2010-08-31 18:07:49Z mike $"
+ "$Id: api-httpipp.html 9728 2011-04-28 21:21:24Z mike $"
- HTTP and IPP API introduction for the Common UNIX Printing System (CUPS).
+ HTTP and IPP API introduction for CUPS.
- Copyright 2007-2008 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
diff --git a/doc/help/api-mime.html b/doc/help/api-mime.html
index 28d1ea53..7d370aad 100644
--- a/doc/help/api-mime.html
+++ b/doc/help/api-mime.html
@@ -4,7 +4,7 @@
<head>
<title>MIME API</title>
<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+<meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -338,7 +338,7 @@ div.contents ul.subcontents li {
<body>
<div class='body'>
<!--
- "$Id: api-mime.html 8653 2009-05-16 23:53:28Z mike $"
+ "$Id: api-mime.html 9728 2011-04-28 21:21:24Z mike $"
MIME API header for CUPS.
@@ -404,7 +404,7 @@ div.contents ul.subcontents li {
<li><a href="#mime_type_t" title="MIME Type Data">mime_type_t</a></li>
</ul></li>
<!--
- "$Id: api-mime.html 8653 2009-05-16 23:53:28Z mike $"
+ "$Id: api-mime.html 9728 2011-04-28 21:21:24Z mike $"
MIME API introduction for CUPS.
diff --git a/doc/help/api-overview.html b/doc/help/api-overview.html
index 28ac03fd..3cb894a2 100644
--- a/doc/help/api-overview.html
+++ b/doc/help/api-overview.html
@@ -4,7 +4,7 @@
<head>
<title>Introduction to CUPS Programming</title>
<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+<meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -338,7 +338,7 @@ div.contents ul.subcontents li {
<body>
<div class='body'>
<!--
- "$Id: api-overview.html 8653 2009-05-16 23:53:28Z mike $"
+ "$Id: api-overview.html 9728 2011-04-28 21:21:24Z mike $"
Introduction to CUPS programming header for the Common UNIX Printing System
(CUPS).
@@ -401,12 +401,11 @@ div.contents ul.subcontents li {
</ul></li>
<li><a href="#WHERETOGO">Where to Go Next</a></li>
<!--
- "$Id: api-overview.html 8653 2009-05-16 23:53:28Z mike $"
+ "$Id: api-overview.html 9728 2011-04-28 21:21:24Z mike $"
- Introduction to CUPS programming content for the Common UNIX Printing System
- (CUPS).
+ Introduction to CUPS programming content for CUPS.
- Copyright 2008 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
diff --git a/doc/help/api-ppd.html b/doc/help/api-ppd.html
index 6b1851f5..13535017 100644
--- a/doc/help/api-ppd.html
+++ b/doc/help/api-ppd.html
@@ -4,7 +4,7 @@
<head>
<title>PPD API</title>
<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+<meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -338,7 +338,7 @@ div.contents ul.subcontents li {
<body>
<div class='body'>
<!--
- "$Id: api-ppd.html 9121 2010-04-23 18:57:00Z mike $"
+ "$Id: api-ppd.html 9728 2011-04-28 21:21:24Z mike $"
PPD API header for the Common UNIX Printing System (CUPS).
@@ -482,11 +482,11 @@ conflicts.">ppdMarkOption</a></li>
<li><a href="#ppd_ui_e" title="UI Types">ppd_ui_e</a></li>
</ul></li>
<!--
- "$Id: api-ppd.html 9121 2010-04-23 18:57:00Z mike $"
+ "$Id: api-ppd.html 9728 2011-04-28 21:21:24Z mike $"
- PPD API introduction for the Common UNIX Printing System (CUPS).
+ PPD API introduction for CUPS.
- Copyright 2007-2008 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
diff --git a/doc/help/api-ppdc.html b/doc/help/api-ppdc.html
index 68cca178..4b95f6a5 100644
--- a/doc/help/api-ppdc.html
+++ b/doc/help/api-ppdc.html
@@ -4,7 +4,7 @@
<head>
<title>PPD Compiler API</title>
<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+<meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -338,7 +338,7 @@ div.contents ul.subcontents li {
<body>
<div class='body'>
<!--
- "$Id: api-ppdc.html 8704 2009-06-10 15:51:21Z mike $"
+ "$Id: api-ppdc.html 9728 2011-04-28 21:21:24Z mike $"
PPD Compiler API header for CUPS.
@@ -411,7 +411,7 @@ div.contents ul.subcontents li {
<li><a href="#ppdcOptType" title="// Option type">ppdcOptType</a></li>
</ul></li>
<!--
- "$Id: api-ppdc.html 8704 2009-06-10 15:51:21Z mike $"
+ "$Id: api-ppdc.html 9728 2011-04-28 21:21:24Z mike $"
PPD Compiler API introduction for CUPS.
diff --git a/doc/help/api-raster.html b/doc/help/api-raster.html
index 51263cb0..b592be87 100644
--- a/doc/help/api-raster.html
+++ b/doc/help/api-raster.html
@@ -4,7 +4,7 @@
<head>
<title>Raster API</title>
<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+<meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
@@ -338,7 +338,7 @@ div.contents ul.subcontents li {
<body>
<div class='body'>
<!--
- "$Id: api-raster.html 9283 2010-08-31 18:07:49Z mike $"
+ "$Id: api-raster.html 9728 2011-04-28 21:21:24Z mike $"
Raster API header for the Common UNIX Printing System (CUPS).
@@ -386,7 +386,7 @@ div.contents ul.subcontents 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="#cupsRasterOpen" title="Open a raster stream using a file descriptor.">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
@@ -429,11 +429,11 @@ page header structure.">cupsRasterWriteHeader2</a></li>
<li><a href="#cups_orient_e" title="Orientation attribute values">cups_orient_e</a></li>
</ul></li>
<!--
- "$Id: api-raster.html 9283 2010-08-31 18:07:49Z mike $"
+ "$Id: api-raster.html 9728 2011-04-28 21:21:24Z mike $"
- Raster API introduction for the Common UNIX Printing System (CUPS).
+ Raster API introduction for CUPS.
- Copyright 2007-2008 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
@@ -655,7 +655,7 @@ are supported.
</p>
<h3 class="function"><a name="cupsRasterOpen">cupsRasterOpen</a></h3>
-<p class="description">Open a raster stream.</p>
+<p class="description">Open a raster stream using a file descriptor.</p>
<p class="code">
<a href="#cups_raster_t">cups_raster_t</a> *cupsRasterOpen (<br>
&nbsp;&nbsp;&nbsp;&nbsp;int fd,<br>
@@ -666,7 +666,9 @@ are supported.
<dt>fd</dt>
<dd class="description">File descriptor</dd>
<dt>mode</dt>
-<dd class="description">Mode - <code>CUPS_RASTER_READ</code>, <code>CUPS_RASTER_WRITE</code>, or <code>CUPS_RASTER_WRITE_COMPRESSED</code></dd>
+<dd class="description">Mode - <code>CUPS_RASTER_READ</code>,
+<code>CUPS_RASTER_WRITE</code>, or
+<code>CUPS_RASTER_WRITE_COMPRESSED</code></dd>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">New stream</p>
@@ -677,8 +679,8 @@ image processor (RIP) filters that generate raster data, &quot;fd&quot; will be
(stdout).<br>
<br>
When writing raster data, the <code>CUPS_RASTER_WRITE</code> or
-<code>CUPS_RASTER_WRITE_COMPRESS</code> mode can be used - compressed output
-is generally 25-50% smaller but adds a 100-300% execution time overhead.</p>
+<code>CUPS_RASTER_WRITE_COMPRESS</code> mode can be used - compressed output is
+generally 25-50% smaller but adds a 100-300% execution time overhead.</p>
<h3 class="function"><span class="info">&nbsp;DEPRECATED&nbsp;</span><a name="cupsRasterReadHeader">cupsRasterReadHeader</a></h3>
<p class="description">Read a raster page header and store it in a
version 1 page header structure.</p>
diff --git a/doc/help/kerberos.html b/doc/help/kerberos.html
index 62c19eb0..82c9b5ff 100644
--- a/doc/help/kerberos.html
+++ b/doc/help/kerberos.html
@@ -53,7 +53,7 @@ systems and network.</P>
Kerberos on your system and setup a system as a KDC. Because this
configuration is highly system and site-specific, please consult
the following on-line resources provided by the creators of Kerberos
-at the Massachussetts Institute of Technology (MIT):</P>
+at the Massachusetts Institute of Technology (MIT):</P>
<UL>
diff --git a/doc/help/network.html b/doc/help/network.html
index 6b238108..d02d4f40 100644
--- a/doc/help/network.html
+++ b/doc/help/network.html
@@ -93,9 +93,9 @@ page on the device.</P>
<PRE>
socket://<i>ip-address-or-hostname</i>
-socket://<i>ip-address-or-hostname</i>?waiteof=false
+socket://<i>ip-address-or-hostname</i>/?waiteof=false
socket://<i>ip-address-or-hostname</i>:<i>port-number</i>
-socket://<i>ip-address-or-hostname</i>:<i>port-number</i>?waiteof=false
+socket://<i>ip-address-or-hostname</i>:<i>port-number</i>/?waiteof=false
</PRE>
<P>The "waiteof" option controls whether the <tt>socket</tt> backend waits for the printer to complete the printing of the job. The default is to wait.</P>
diff --git a/doc/help/options.html b/doc/help/options.html
index e3b5820b..0cfa7413 100644
--- a/doc/help/options.html
+++ b/doc/help/options.html
@@ -324,7 +324,7 @@ lpr -o sides=one-sided filename
<H3><A NAME="JOBSHEETS">Selecting the Banner Page(s)</A></H3>
-<P>The <CODE>-o jobsheets=start,end</CODE> option sets the banner
+<P>The <CODE>-o job-sheets=start,end</CODE> option sets the banner
page(s) to use for a job:</P>
<PRE CLASS="command">
@@ -416,7 +416,7 @@ assign a priority to your job from 1 (lowest) to 100 (highest),
which influences where the job appears in the print queue. Higher
priority jobs are printed before lower priority jobs, however
submitting a new job with a high priority will not interrupt an
-</P>
+already printing job.</P>
<H3><A NAME="OUTPUTORDER">Specifying the Output Order</A></H3>
@@ -548,7 +548,7 @@ for printers that print face up.
<H3><A NAME="MIRROR">Printing Mirrored Pages</A></H3>
<P>The <CODE>-o mirror</CODE> option flips each page along the
-vertical access to produce a mirrored image:</P>
+vertical axis to produce a mirrored image:</P>
<PRE CLASS="command">
lp -o mirror filename
diff --git a/doc/help/postscript-driver.html b/doc/help/postscript-driver.html
index 40a7db7a..c2b35b7e 100644
--- a/doc/help/postscript-driver.html
+++ b/doc/help/postscript-driver.html
@@ -4,7 +4,7 @@
<head>
<title>Developing PostScript Printer Drivers</title>
<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+<meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
diff --git a/doc/help/ppd-compiler.html b/doc/help/ppd-compiler.html
index c00d4dbd..d0aedaf2 100644
--- a/doc/help/ppd-compiler.html
+++ b/doc/help/ppd-compiler.html
@@ -4,7 +4,7 @@
<head>
<title>Introduction to the PPD Compiler</title>
<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+<meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
diff --git a/doc/help/raster-driver.html b/doc/help/raster-driver.html
index fc85337c..bb133ace 100644
--- a/doc/help/raster-driver.html
+++ b/doc/help/raster-driver.html
@@ -4,7 +4,7 @@
<head>
<title>Developing Raster Printer Drivers</title>
<meta name="keywords" content="Programming">
-<meta name="creator" content="Mini-XML v2.6">
+<meta name="creator" content="Mini-XML v2.7">
<style type="text/css"><!--
BODY {
font-family: lucida grande, geneva, helvetica, arial, sans-serif;
diff --git a/doc/help/ref-cupsd-conf.html.in b/doc/help/ref-cupsd-conf.html.in
index a35ca4af..abeeeba7 100644
--- a/doc/help/ref-cupsd-conf.html.in
+++ b/doc/help/ref-cupsd-conf.html.in
@@ -114,9 +114,9 @@ to the access log file. The following levels are defined:</P>
...
Allow from All
Allow from None
- Allow from *.domain.com
- Allow from .domain.com
- Allow from host.domain.com
+ Allow from *.example.com
+ Allow from .example.com
+ Allow from host.example.com
Allow from nnn.*
Allow from nnn.nnn.*
Allow from nnn.nnn.nnn.*
@@ -134,7 +134,7 @@ to the access log file. The following levels are defined:</P>
<P>The <CODE>Allow</CODE> directive specifies a hostname, IP
address, or network that is allowed access to the server.
-<CODE>Allow</CODE> directives are cummulative, so multiple
+<CODE>Allow</CODE> directives are cumulative, so multiple
<CODE>Allow</CODE> directives can be used to allow access for
multiple hosts or networks.</P>
@@ -342,7 +342,7 @@ default setting is <CODE>No</CODE>.</P>
<PRE CLASS="command">
BrowseAddress 255.255.255.255:631
BrowseAddress 192.0.2.255:631
-BrowseAddress host.domain.com:631
+BrowseAddress host.example.com:631
BrowseAddress @LOCAL
BrowseAddress @IF(name)
</PRE>
@@ -380,7 +380,7 @@ BrowseAllow from none
BrowseAllow from 192.0.2
BrowseAllow from 192.0.2.0/24
BrowseAllow from 192.0.2.0/255.255.255.0
-BrowseAllow from *.domain.com
+BrowseAllow from *.example.com
BrowseAllow from @LOCAL
BrowseAllow from @IF(name)
</PRE>
@@ -418,7 +418,7 @@ BrowseDeny from none
BrowseDeny from 192.0.2
BrowseDeny from 192.0.2.0/24
BrowseDeny from 192.0.2.0/255.255.255.0
-BrowseDeny from *.domain.com
+BrowseDeny from *.example.com
BrowseDeny from @LOCAL
BrowseDeny from @IF(name)
</PRE>
@@ -616,7 +616,7 @@ allow/deny processing. The default order is
<PRE CLASS="command">
BrowsePoll 192.0.2.2:631
-BrowsePoll host.domain.com:631
+BrowsePoll host.example.com:631
</PRE>
<H3>Description</H3>
@@ -698,8 +698,8 @@ requests for several seconds while polling the network.</P>
BrowseRelay 193.0.2.1 192.0.2.255
BrowseRelay 193.0.2.0/255.255.255.0 192.0.2.255
BrowseRelay 193.0.2.0/24 192.0.2.255
-BrowseRelay *.domain.com 192.0.2.255
-BrowseRelay host.domain.com 192.0.2.255
+BrowseRelay *.example.com 192.0.2.255
+BrowseRelay host.example.com 192.0.2.255
</PRE>
<H3>Description</H3>
@@ -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>
@@ -1044,9 +1048,9 @@ printers are shared (published) by default. The default is
..
Deny from All
Deny from None
- Deny from *.domain.com
- Deny from .domain.com
- Deny from host.domain.com
+ Deny from *.example.com
+ Deny from .example.com
+ Deny from host.example.com
Deny from nnn.*
Deny from nnn.nnn.*
Deny from nnn.nnn.nnn.*
@@ -1064,8 +1068,8 @@ 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 are cumulative, so multiple
+<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
@@ -1733,11 +1737,11 @@ operations.</P>
</TR>
<TR>
<TD>Get-Printer-Attributes</TD>
- <TD>Gets informaion about a printer or class</TD>
+ <TD>Gets information about a printer or class</TD>
</TR>
<TR>
<TD>Get-Subscription-Attributes</TD>
- <TD>Gets informaion about a notification subscription</TD>
+ <TD>Gets information about a notification subscription</TD>
</TR>
<TR>
<TD>Get-Subscriptions</TD>
@@ -1773,7 +1777,7 @@ operations.</P>
</TR>
<TR>
<TD>Resume-Printer</TD>
- <TD>Sets the printer-stae value for a printer to idle/processing</TD>
+ <TD>Sets the printer-state value for a printer to idle/processing</TD>
</TR>
<TR>
<TD>Send-Document</TD>
@@ -2330,8 +2334,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>
@@ -2364,7 +2368,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>
@@ -2697,7 +2701,7 @@ is generated only once on startup or on a restart. The default is
<P>The <CODE>Satisfy</CODE> directive specifies whether all
conditions must be satisfied to allow access to the resource. If
set to <CODE>all</CODE>, then all authentication and access
-control conditions must be satified to allow access.</P>
+control conditions must be satisfied to allow access.</P>
<P>Setting <CODE>Satisfy</CODE> to <CODE>any</CODE> allows a user
to gain access if the authentication or access control
@@ -2734,18 +2738,14 @@ HREF="#ServerName"><CODE>ServerName</CODE></A>.</P>
<PRE CLASS="command">
ServerAlias althost
-ServerAlias althost.foo.com
-ServerAlias althost.bar.com
+ServerAlias foo.example.com
+ServerAlias bar.example.com
ServerAlias *
</PRE>
<H3>Description</H3>
-<P>The <CODE>ServerAlias</CODE> directive specifies alternate names that the
-server is known by. By default it contains a list of all aliases associated
-with the <A HREF="#ServerName"><CODE>ServerName</CODE></A>. The special name
-"*" can be used to allow any hostname when accessing CUPS via an external
-network interfaces.</P>
+<P>The <CODE>ServerAlias</CODE> directive specifies alternate names that the server is known by. By default it contains a list of all aliases associated with the <A HREF="#ServerName"><CODE>ServerName</CODE></A>. The special name "*" can be used to allow any hostname when accessing CUPS via an external network interfaces.</P>
<BLOCKQUOTE><B>Note</B>
@@ -2822,8 +2822,8 @@ encrypted connections.</P>
<H3>Examples</H3>
<PRE CLASS="command">
-ServerName foo.domain.com
-ServerName myserver.domain.com
+ServerName foo.example.com
+ServerName myserver.example.com
</PRE>
<H3>Description</H3>
diff --git a/doc/help/ref-mailto-conf.html b/doc/help/ref-mailto-conf.html
index 16e8b409..0b951322 100644
--- a/doc/help/ref-mailto-conf.html
+++ b/doc/help/ref-mailto-conf.html
@@ -21,8 +21,8 @@ line.</P>
<H3>Examples</H3>
<PRE CLASS="command">
-Cc bigbrother@domain.com
-Cc John Doe &lt;jd@domain.com>
+Cc bigbrother@example.com
+Cc John Doe &lt;jd@example.com>
</PRE>
<H3>Description</H3>
@@ -37,8 +37,8 @@ default is to not send a copy to anyone but the subscriber.</P>
<H3>Examples</H3>
<PRE CLASS="command">
-From printserver@domain.com
-From Your Happy Printer &lt;printserver@domain.com>
+From printserver@example.com
+From Your Happy Printer &lt;printserver@example.com>
</PRE>
<H3>Description</H3>
@@ -73,7 +73,7 @@ default is <TT>/usr/sbin/sendmail</TT>.</P>
<H3>Examples</H3>
<PRE CLASS="command">
-SMTPServer mail.domain.com
+SMTPServer mail.example.com
SMTPServer 192.168.2.1
</PRE>
diff --git a/doc/help/ref-ppdcfile.html b/doc/help/ref-ppdcfile.html
index 696b7827..c3967f1c 100644
--- a/doc/help/ref-ppdcfile.html
+++ b/doc/help/ref-ppdcfile.html
@@ -31,7 +31,7 @@ mechanisms.</p>
<dd>Evaluates to the specified integer; the number can be preceded by
a leading sign (+/-) followed by a decimal number (1234), octal number
- (01234), or hexidecimal number (0x1234) using the same rules as C and
+ (01234), or hexadecimal number (0x1234) using the same rules as C and
C++.</dd>
<dt>(NAME NAME ... number number ...)</dt>
@@ -71,7 +71,7 @@ mechanisms.</p>
</dl>
<p>Printer driver information can be grouped and shared using
-curley braces ({ ... }); PPD files are written when a close
+curly braces ({ ... }); PPD files are written when a close
brace or end-of-file is seen and a <a href="#PCFileName">PCFileName</a>
directive has been defined.</p>
@@ -1798,8 +1798,7 @@ SimpleColorProfile 720dpi/Glossy 100 90 120 1.5 -5 5 10
<h3>Description</h3>
<p>The <code>SimpleColorProfile</code> directive creates a
-matrix-based <a href="#ColorProfile"><code>ColorProfile</code></a>
-using values chosen with the <code>cupsprofile(1)</code> utility.
+matrix-based <a href="#ColorProfile"><code>ColorProfile</code></a>.
The resolution and mediatype arguments specify the
<code>Resolution</code> and <code>MediaType</code> choices which use the
profile; the hyphen (<code>-</code>) is used to specify that any
@@ -1860,7 +1859,7 @@ Throughput 10
<h3>Description</h3>
-<p>The <code>Througput</code> directive sets the <code>Troughput</code>
+<p>The <code>Throughput</code> directive sets the <code>Throughput</code>
attribute for the current printer driver. The pages-per-minute
argument is a positive integer representing the peak number of
pages per minute that the printer is capable of producing. Use a
diff --git a/doc/help/ref-snmp-conf.html b/doc/help/ref-snmp-conf.html
index be7f11c6..db4aacee 100644
--- a/doc/help/ref-snmp-conf.html
+++ b/doc/help/ref-snmp-conf.html
@@ -136,7 +136,7 @@ MaxRunTime 300
<H3>Description</H3>
-<P>The <CODE>MaxRunTime</CODE> directive specifies the maxium
+<P>The <CODE>MaxRunTime</CODE> directive specifies the maximum
number of seconds that the SNMP backend will spend looking for
printer devices on the network.</P>
diff --git a/doc/help/security.html b/doc/help/security.html
index 38fb42cc..c86151d1 100644
--- a/doc/help/security.html
+++ b/doc/help/security.html
@@ -12,7 +12,7 @@
potential security risks - the CUPS server does not accept remote
connections, and only accepts shared printer information from the
local subnet. When you share printers and/or enable remote
-adminstration, you expose your system to potential unauthorized
+administration, you expose your system to potential unauthorized
access. This help page provides an analysis of possible CUPS
security concerns and describes how to better secure your
server.</P>
@@ -20,7 +20,7 @@ server.</P>
<H2 CLASS="title"><A NAME="AUTHENTICATION">Authentication Issues</A></H2>
<P>When you enable remote administration, the server will use
-Basic authentication for adminstration tasks. The current CUPS
+Basic authentication for administration tasks. The current CUPS
server supports Basic, Digest, Kerberos, and local certificate
authentication:</P>
diff --git a/doc/help/spec-banner.html b/doc/help/spec-banner.html
index b27fb265..7393a21e 100644
--- a/doc/help/spec-banner.html
+++ b/doc/help/spec-banner.html
@@ -8,11 +8,11 @@
</head>
<body>
<!--
- "$Id: spec-banner.html 8653 2009-05-16 23:53:28Z mike $"
+ "$Id: spec-banner.html 9728 2011-04-28 21:21:24Z mike $"
- Banner file format specification for the Common UNIX Printing System (CUPS).
+ Banner file format specification 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
diff --git a/doc/help/spec-browsing.html b/doc/help/spec-browsing.html
index 5b981ba9..e2ab44c7 100644
--- a/doc/help/spec-browsing.html
+++ b/doc/help/spec-browsing.html
@@ -8,11 +8,11 @@
</head>
<body>
<!--
- "$Id: spec-browsing.html 8653 2009-05-16 23:53:28Z mike $"
+ "$Id: spec-browsing.html 9728 2011-04-28 21:21:24Z mike $"
- CUPS Browse Protocol specification for the Common UNIX Printing System (CUPS).
+ CUPS Browse Protocol specification for CUPS.
- Copyright 2008 by Apple Inc.
+ Copyright 2008-2011 by Apple Inc.
Copyright 1997-2005 by Easy Software Products.
These coded instructions, statements, and computer programs are the
@@ -22,6 +22,12 @@
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<BLOCKQUOTE><B>Note:</B>
+
+<P>The CUPS Browse Protocol is deprecated and will no longer be used in a future release of CUPS.</P>
+
+</BLOCKQUOTE>
+
<H1 CLASS="title">CUPS Browse Protocol</H1>
<h2><a name='INTRO'>Introduction</a></h2>
diff --git a/doc/help/spec-cmp.html b/doc/help/spec-cmp.html
index ab9a1329..47f56d31 100644
--- a/doc/help/spec-cmp.html
+++ b/doc/help/spec-cmp.html
@@ -211,7 +211,7 @@ Detailed list of changes.
<P>Primary development occurs on the <var>trunk</var> branch,
with changes merged back to release branches as needed. Table 2
-shows the URLs developers use for the various CUPS subprojects
+shows the URLs developers use for the various CUPS sub-projects
and branches:</P>
<DIV CLASS="table"><TABLE SUMMARY="CUPS Subversion URLs">
@@ -233,30 +233,6 @@ and branches:</P>
<TD>CUPS release tags (read-only)</TD>
</TR>
<TR>
- <TD><A HREF="http://svn.easysw.com/public/cupsddk/trunk/">https://svn.easysw.com/public/cupsddk/trunk/</A></TD>
- <TD>Primary CUPS DDK development branch</TD>
-</TR>
-<TR>
- <TD><A HREF="http://svn.easysw.com/public/cupsddk/branches/">https://svn.easysw.com/public/cupsddk/branches/</A></TD>
- <TD>CUPS DDK maintenance branches (merge-only)</TD>
-</TR>
-<TR>
- <TD><A HREF="http://svn.easysw.com/public/cupsddk/tags/">https://svn.easysw.com/public/cupsddk/tags/</A></TD>
- <TD>CUPS DDK release tags (read-only)</TD>
-</TR>
-<TR>
- <TD><A HREF="http://svn.easysw.com/public/espgs/trunk/">https://svn.easysw.com/public/espgs/trunk/</A></TD>
- <TD>Primary ESP Ghostscript development branch</TD>
-</TR>
-<TR>
- <TD><A HREF="http://svn.easysw.com/public/espgs/branches/">https://svn.easysw.com/public/espgs/branches/</A></TD>
- <TD>ESP Ghostscript maintenance branches (merge-only)</TD>
-</TR>
-<TR>
- <TD><A HREF="http://svn.easysw.com/public/espgs/tags/">https://svn.easysw.com/public/espgs/tags/</A></TD>
- <TD>ESP Ghostscript release tags (read-only)</TD>
-</TR>
-<TR>
<TD><A HREF="http://svn.easysw.com/public/windows/trunk/">https://svn.easysw.com/public/windows/trunk/</A></TD>
<TD>Primary CUPS Windows Driver development branch</TD>
</TR>
@@ -283,7 +259,7 @@ created for developer snapshots.</P>
<H3>Files and Directories</H3>
<P>File and directory names may not exceed 16 characters in
-length to ensure compability with older UNIX filesystems. In
+length to ensure compatibility with older UNIX filesystems. In
addition, to avoid problems with case-insensitive filesystems,
you may not use names which differ only by case, for example
"ReadMe" and "README" are not allowed in the same directory.</P>
diff --git a/doc/help/spec-command.html b/doc/help/spec-command.html
index 1ba9654a..bf731ccb 100644
--- a/doc/help/spec-command.html
+++ b/doc/help/spec-command.html
@@ -8,12 +8,11 @@
</head>
<body>
<!--
- "$Id: spec-command.html 8653 2009-05-16 23:53:28Z mike $"
+ "$Id: spec-command.html 9728 2011-04-28 21:21:24Z mike $"
- CUPS command file format specification for the Common UNIX Printing
- System (CUPS).
+ CUPS command file format specification 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
diff --git a/doc/help/spec-ipp.html b/doc/help/spec-ipp.html
index 6ddb109d..c8767279 100644
--- a/doc/help/spec-ipp.html
+++ b/doc/help/spec-ipp.html
@@ -8,11 +8,11 @@
</head>
<body>
<!--
- "$Id: spec-ipp.html 8816 2009-09-14 21:41:50Z mike $"
+ "$Id: spec-ipp.html 9728 2011-04-28 21:21:24Z mike $"
- CUPS IPP specification for the Common UNIX Printing System (CUPS).
+ CUPS IPP specification 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
diff --git a/doc/help/spec-postscript.html b/doc/help/spec-postscript.html
index abb476e9..3bff7fbd 100644
--- a/doc/help/spec-postscript.html
+++ b/doc/help/spec-postscript.html
@@ -8,11 +8,11 @@
</head>
<body>
<!--
- "$Id: spec-postscript.html 8653 2009-05-16 23:53:28Z mike $"
+ "$Id: spec-postscript.html 9728 2011-04-28 21:21:24Z mike $"
- CUPS PostScript file specification for the Common UNIX Printing System (CUPS).
+ CUPS PostScript file specification for CUPS.
- Copyright 2007-2008 by Apple Inc.
+ Copyright 2007-2011 by Apple Inc.
Copyright 2006 by Easy Software Products.
These coded instructions, statements, and computer programs are the
@@ -36,7 +36,7 @@ Adobe TechNote and this document will ensure that your PostScript
output will work reliably.</p>
<blockquote><b>Note:</b> While PostScript is currently the
-defacto-standard print job file format/language for UNIX-based
+de-facto standard print job file format/language for UNIX-based
applications, it is slowly being phased out in favor of Adobe's
Portable Document Format ("PDF") which offers many advantages
over PostScript. Mac OS X uses PDF as the primary print job file
diff --git a/doc/help/spec-raster.html b/doc/help/spec-raster.html
index de5b7b50..50fca220 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>
@@ -265,14 +263,14 @@ for that page.</P>
<TD>Unsigned Integer</TD>
<TD>cupsBitsPerColor</TD>
<TD>1, 2, 4, 8 bits for version 1 raster files<BR>
- 1, 2, 4, 8, and 16 bits for version 2 raster files</TD>
+ 1, 2, 4, 8, and 16 bits for version 2/3 raster files</TD>
</TR>
<TR>
<TD>388-391</TD>
<TD>Unsigned Integer</TD>
<TD>cupsBitsPerPixel</TD>
<TD>1 to 32 bits for version 1 raster files<BR>
- 1 to 64 bits for version 2 raster files</TD>
+ 1 to 240 bits for version 2/3 raster files</TD>
</TR>
<TR>
<TD>392-395</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>
+ 49 = Device2 (DeviceN for 2 colors)<BR>
+ 50 = Device3 (DeviceN for 3 colors)<BR>
+ 51 = Device4 (DeviceN for 4 colors)<BR>
+ 52 = Device5 (DeviceN for 5 colors)<BR>
+ 53 = Device6 (DeviceN for 6 colors)<BR>
+ 54 = Device7 (DeviceN for 7 colors)<BR>
+ 55 = Device8 (DeviceN for 8 colors)<BR>
+ 56 = Device9 (DeviceN for 9 colors)<BR>
+ 57 = DeviceA (DeviceN for 10 colors)<BR>
+ 58 = DeviceB (DeviceN for 11 colors)<BR>
+ 59 = DeviceC (DeviceN for 12 colors)<BR>
+ 60 = DeviceD (DeviceN for 13 colors)<BR>
+ 61 = DeviceE (DeviceN for 14 colors)<BR>
+ 62 = 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>
@@ -390,7 +397,7 @@ for that page.</P>
<TD>420-423</TD>
<TD>Unsigned Integer</TD>
<TD>cupsNumColors</TD>
- <TD>1 to 6 colors</TD>
+ <TD>1 to 15 colors</TD>
</TR>
<TR>
<TD>424-427</TD>
@@ -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 white point 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 white point 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 white point 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/help/spec-stp.html b/doc/help/spec-stp.html
index fd04da64..06c099b5 100644
--- a/doc/help/spec-stp.html
+++ b/doc/help/spec-stp.html
@@ -17,7 +17,7 @@ to evaluate the stability and compliance of CUPS.</P>
<P>The test software and data files are located in the
<VAR>test</VAR> subdirectory of the source distribution. A script
-is provided to compile the <CODE>ipptest</CODE> program and run
+is provided to compile the <CODE>ipptool</CODE> program and run
all of the tests that follow, producing a success/fail
report.</P>
diff --git a/doc/help/translation.html b/doc/help/translation.html
index 8fa6efe2..a4ada4a7 100644
--- a/doc/help/translation.html
+++ b/doc/help/translation.html
@@ -141,7 +141,7 @@ subdirectories for each locale, e.g. "fr" for French, "de" for
German, "fr_ca" for French in Canada, and so forth.</P>
<P>Template files are HTML files with special formatting
-characters in them that allow substition of variables and arrays.
+characters in them that allow substitution of variables and arrays.
The CUPS CGI programs (<CODE>admin.cgi</CODE>,
<CODE>classes.cgi</CODE>, <CODE>help.cgi</CODE>,
<CODE>jobs.cgi</CODE>, and <CODE>printers.cgi</CODE>) use these
@@ -441,7 +441,7 @@ translated all of the templates, add the locale to the
</TR>
<TR>
<TD>subscription-added.tmpl</TD>
- <TD>This template shows "subscription xyz added".</TD>
+ <TD>This template shows "subscription ... added".</TD>
</TR>
<TR>
<TD>subscription-canceled.tmpl</TD>
@@ -466,7 +466,7 @@ translated all of the templates, add the locale to the
<H3><A NAME="VARIABLE">Inserting Attributes and Values</A></H3>
<P>Template files consist of HTML with variable substitutions for
-named inside curley braces "{name}". Variable names are generally
+named inside curly braces "{name}". Variable names are generally
the IPP attribute names with the hyphen ("-") replaced by the
underscore ("_") character. For example, the
<TT>job-printer-uri</TT> attribute is renamed to
@@ -518,7 +518,7 @@ in the <CODE>job_id</CODE> array:</P>
&lt;/TABLE&gt;
</PRE>
-<P>Arrays can be nested, however all elements within the curley
+<P>Arrays can be nested, however all elements within the curly
braces ("{" and "}") are indexed using the innermost array.</P>
<H3>Conditional Tests</H3>
diff --git a/doc/help/whatsnew.html b/doc/help/whatsnew.html
index dfbc62a6..9ffe6aed 100644
--- a/doc/help/whatsnew.html
+++ b/doc/help/whatsnew.html
@@ -100,7 +100,7 @@
<LI><EM>Access logging;</EM> the scheduler now supports an AccessLogLevel directive to control what is logged in the access_log file.</LI>
- <LI><EM>Configuration files;</EM> the default cupsd.conf file now provides an "authenticated" policy for easy authenticated sharing of printers.</LI>
+ <LI><EM>Configuration files;</EM> the default cupsd.conf file now provides an "authenticated" policy that can be used to require a username and password to print or cancel a job.</LI>
<LI><EM>Default LogLevel;</EM> the default LogLevel is now "warn" instead of "info".</LI>
diff --git a/doc/id/index.html.in b/doc/id/index.html.in
index 764e7b70..93b4621e 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 00000000..c390f414
--- /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 00000000..8f611f26
--- /dev/null
+++ b/doc/images/raster-organization.svg
@@ -0,0 +1,378 @@
+<?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>
+<?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 00000000..f78760e0
--- /dev/null
+++ b/doc/images/sample-image.png
Binary files differ
diff --git a/doc/index.html.in b/doc/index.html.in
index 05e5eb0f..26f8de13 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 a15de9d9..f65954f0 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 8919749c..4271c7ad 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 d0555887..943cb9e9 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 b0b6bbf9..7b2b745a 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/filter/api-raster.shtml b/filter/api-raster.shtml
index 880042b0..a309022e 100644
--- a/filter/api-raster.shtml
+++ b/filter/api-raster.shtml
@@ -1,9 +1,9 @@
<!--
"$Id$"
- Raster API introduction for the Common UNIX Printing System (CUPS).
+ Raster API introduction for CUPS.
- Copyright 2007-2008 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
diff --git a/filter/commandtops.c b/filter/commandtops.c
index 69866136..c3f4f1f5 100644
--- a/filter/commandtops.c
+++ b/filter/commandtops.c
@@ -1,9 +1,9 @@
/*
- * "$Id: commandtops.c 8205 2009-01-07 17:47:29Z mike $"
+ * "$Id: commandtops.c 9582 2011-03-04 19:28:38Z mike $"
*
* PostScript command filter for CUPS.
*
- * Copyright 2008 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
@@ -197,7 +197,7 @@ auto_configure(ppd_file_t *ppd, /* I - PPD file */
* Read the response data...
*/
- while ((bytes = cupsBackChannelRead(buffer, sizeof(buffer) - 1, 5.0)) > 0)
+ while ((bytes = cupsBackChannelRead(buffer, sizeof(buffer) - 1, 90.0)) > 0)
{
/*
* Trim whitespace from both ends...
@@ -213,6 +213,8 @@ auto_configure(ppd_file_t *ppd, /* I - PPD file */
for (bufptr = buffer; isspace(*bufptr & 255); bufptr ++);
+ fprintf(stderr, "DEBUG: Got \"%s\" (%d bytes)\n", bufptr, (int)bytes);
+
/*
* Skip blank lines...
*/
@@ -221,6 +223,13 @@ auto_configure(ppd_file_t *ppd, /* I - PPD file */
continue;
/*
+ * Verify the result is a valid option choice...
+ */
+
+ if (!ppdFindChoice(option, bufptr))
+ continue;
+
+ /*
* Write out the result and move on to the next option...
*/
@@ -343,5 +352,5 @@ report_levels(ppd_file_t *ppd, /* I - PPD file */
/*
- * End of "$Id: commandtops.c 8205 2009-01-07 17:47:29Z mike $".
+ * End of "$Id: commandtops.c 9582 2011-03-04 19:28:38Z mike $".
*/
diff --git a/filter/gziptoany.c b/filter/gziptoany.c
index 0c9e7938..b144b6b3 100644
--- a/filter/gziptoany.c
+++ b/filter/gziptoany.c
@@ -1,9 +1,9 @@
/*
- * "$Id: gziptoany.c 6649 2007-07-11 21:46:42Z mike $"
+ * "$Id: gziptoany.c 9558 2011-02-21 17:19:29Z mike $"
*
- * GZIP/raw pre-filter for the Common UNIX Printing System (CUPS).
+ * GZIP/raw pre-filter for CUPS.
*
- * Copyright 2007 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1993-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -27,6 +27,7 @@
#include <cups/string.h>
#include <cups/i18n.h>
#include <stdlib.h>
+#include <unistd.h>
#include <errno.h>
@@ -50,8 +51,9 @@ main(int argc, /* I - Number of command-line arguments */
if (argc != 7)
{
- fprintf(stderr, _("Usage: %s job-id user title copies options file\n"),
- argv[0]);
+ _cupsLangPrintf(stderr,
+ _("Usage: %s job-id user title copies options file\n"),
+ argv[0]);
return (1);
}
@@ -71,8 +73,8 @@ main(int argc, /* I - Number of command-line arguments */
if ((fp = cupsFileOpen(argv[6], "r")) == NULL)
{
- fprintf(stderr, _("ERROR: Unable to open file \"%s\": %s\n"), argv[6],
- strerror(errno));
+ _cupsLangPrintf(stderr, _("ERROR: Unable to open file \"%s\": %s\n"),
+ argv[6], strerror(errno));
return (1);
}
@@ -80,8 +82,6 @@ main(int argc, /* I - Number of command-line arguments */
* Copy the file to stdout...
*/
- setbuf(stdout, NULL);
-
while (copies > 0)
{
if (!getenv("FINAL_CONTENT_TYPE"))
@@ -90,11 +90,11 @@ main(int argc, /* I - Number of command-line arguments */
cupsFileRewind(fp);
while ((bytes = cupsFileRead(fp, buffer, sizeof(buffer))) > 0)
- if (fwrite(buffer, 1, bytes, stdout) < bytes)
+ if (write(1, buffer, bytes) < bytes)
{
- fprintf(stderr,
- _("ERROR: Unable to write uncompressed document data: %s\n"),
- strerror(ferror(stdout)));
+ _cupsLangPrintf(stderr,
+ _("ERROR: Unable to write uncompressed document data: "
+ "%s\n"), strerror(errno));
cupsFileClose(fp);
return (1);
@@ -114,5 +114,5 @@ main(int argc, /* I - Number of command-line arguments */
/*
- * End of "$Id: gziptoany.c 6649 2007-07-11 21:46:42Z mike $".
+ * End of "$Id: gziptoany.c 9558 2011-02-21 17:19:29Z mike $".
*/
diff --git a/filter/image-gif.c b/filter/image-gif.c
index 95427041..bead5204 100644
--- a/filter/image-gif.c
+++ b/filter/image-gif.c
@@ -1,5 +1,5 @@
/*
- * "$Id: image-gif.c 7720 2008-07-11 22:46:21Z mike $"
+ * "$Id: image-gif.c 9841 2011-06-20 20:37:51Z mike $"
*
* GIF image routines for the Common UNIX Printing System (CUPS).
*
@@ -353,7 +353,7 @@ gif_get_code(FILE *fp, /* I - File to read from */
* Read in another buffer...
*/
- if ((count = gif_get_block (fp, buf + last_byte)) <= 0)
+ if ((count = gif_get_block(fp, buf + last_byte)) <= 0)
{
/*
* Whoops, no more data!
@@ -582,19 +582,13 @@ gif_read_lzw(FILE *fp, /* I - File to read from */
gif_get_code(fp, 0, 1);
/*
- * Wipe the decompressor table...
+ * Wipe the decompressor table (already mostly 0 due to the calloc above...)
*/
fresh = 1;
- for (i = 0; i < clear_code; i ++)
- {
- table[0][i] = 0;
+ for (i = 1; i < clear_code; i ++)
table[1][i] = i;
- }
-
- for (; i < 4096; i ++)
- table[0][i] = table[1][0] = 0;
sp = stack;
@@ -605,29 +599,30 @@ gif_read_lzw(FILE *fp, /* I - File to read from */
fresh = 0;
do
+ {
firstcode = oldcode = gif_get_code(fp, code_size, 0);
+ }
while (firstcode == clear_code);
- return (firstcode);
+ return (firstcode & 255);
}
else if (!table)
return (0);
if (sp > stack)
- return (*--sp);
+ return ((*--sp) & 255);
- while ((code = gif_get_code (fp, code_size, 0)) >= 0)
+ while ((code = gif_get_code(fp, code_size, 0)) >= 0)
{
if (code == clear_code)
{
- for (i = 0; i < clear_code; i ++)
- {
- table[0][i] = 0;
- table[1][i] = i;
- }
+ /*
+ * Clear/reset the compression table...
+ */
- for (; i < 4096; i ++)
- table[0][i] = table[1][i] = 0;
+ memset(table, 0, 2 * sizeof(gif_table_t));
+ for (i = 1; i < clear_code; i ++)
+ table[1][i] = i;
code_size = set_code_size + 1;
max_code_size = 2 * clear_code;
@@ -637,12 +632,11 @@ gif_read_lzw(FILE *fp, /* I - File to read from */
firstcode = oldcode = gif_get_code(fp, code_size, 0);
- return (firstcode);
+ return (firstcode & 255);
}
- else if (code == end_code)
+ else if (code == end_code || code > max_code)
{
- unsigned char buf[260];
-
+ unsigned char buf[260]; /* Block buffer */
if (!gif_eof)
while (gif_get_block(fp, buf) > 0);
@@ -652,7 +646,7 @@ gif_read_lzw(FILE *fp, /* I - File to read from */
incode = code;
- if (code >= max_code)
+ if (code == max_code)
{
*sp++ = firstcode;
code = oldcode;
@@ -686,13 +680,13 @@ gif_read_lzw(FILE *fp, /* I - File to read from */
oldcode = incode;
if (sp > stack)
- return (*--sp);
+ return ((*--sp) & 255);
}
- return (code);
+ return (code & 255);
}
/*
- * End of "$Id: image-gif.c 7720 2008-07-11 22:46:21Z mike $".
+ * End of "$Id: image-gif.c 9841 2011-06-20 20:37:51Z mike $".
*/
diff --git a/filter/image-zoom.c b/filter/image-zoom.c
index f921fca8..300b43ae 100644
--- a/filter/image-zoom.c
+++ b/filter/image-zoom.c
@@ -1,9 +1,9 @@
/*
- * "$Id: image-zoom.c 6649 2007-07-11 21:46:42Z mike $"
+ * "$Id: image-zoom.c 9503 2011-01-22 00:07:22Z mike $"
*
- * cupsImage zoom routines for the Common UNIX Printing System (CUPS).
+ * cupsImage zoom routines for CUPS.
*
- * Copyright 2007 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1993-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -136,7 +136,7 @@ _cupsImageZoomNew(
z->ystep = z->height / z->ysize;
z->yincr = 1;
z->instep = z->xstep * z->depth;
- z->inincr = z->xincr * z->depth;
+ z->inincr = /* z->xincr * */ z->depth; /* z->xincr is always 1 */
if (z->width < img->ysize)
z->xmax = z->width;
@@ -163,7 +163,7 @@ _cupsImageZoomNew(
z->ystep = z->height / z->ysize;
z->yincr = 1;
z->instep = z->xstep * z->depth;
- z->inincr = z->xincr * z->depth;
+ z->inincr = /* z->xincr * */ z->depth; /* z->xincr is always 1 */
if (z->width < img->xsize)
z->xmax = z->width;
@@ -357,5 +357,5 @@ zoom_nearest(cups_izoom_t *z, /* I - Zoom record to fill */
/*
- * End of "$Id: image-zoom.c 6649 2007-07-11 21:46:42Z mike $".
+ * End of "$Id: image-zoom.c 9503 2011-01-22 00:07:22Z mike $".
*/
diff --git a/filter/libcupsimage2.def b/filter/libcupsimage2.def
new file mode 100644
index 00000000..001c7b52
--- /dev/null
+++ b/filter/libcupsimage2.def
@@ -0,0 +1,13 @@
+LIBRARY libcupsimage2
+VERSION 2.2
+EXPORTS
+cupsRasterClose
+cupsRasterErrorString
+cupsRasterInterpretPPD
+cupsRasterOpen
+cupsRasterReadHeader
+cupsRasterReadHeader2
+cupsRasterReadPixels
+cupsRasterWriteHeader
+cupsRasterWriteHeader2
+cupsRasterWritePixels
diff --git a/filter/pstops.c b/filter/pstops.c
index 9f15c6c2..3930f9d9 100644
--- a/filter/pstops.c
+++ b/filter/pstops.c
@@ -1,5 +1,5 @@
/*
- * "$Id: pstops.c 9376 2010-11-17 19:58:22Z mike $"
+ * "$Id: pstops.c 9426 2011-01-06 22:48:42Z mike $"
*
* PostScript filter for the Common UNIX Printing System (CUPS).
*
@@ -2927,9 +2927,6 @@ start_nup(pstops_doc_t *doc, /* I - Document information */
else if (doc->number_up > 1 || doc->fitplot)
doc_printf(doc, "%.1f %.1f translate\n", PageLeft, PageBottom);
- if (doc->mirror)
- doc_printf(doc, "%.1f 0.0 translate -1 1 scale\n", PageWidth);
-
switch (doc->number_up)
{
default :
@@ -3279,6 +3276,13 @@ start_nup(pstops_doc_t *doc, /* I - Document information */
bboxx + margin, bboxy + margin,
bboxw - 2 * margin, bboxl - 2 * margin);
}
+
+ /*
+ * Mirror the page as needed...
+ */
+
+ if (doc->mirror)
+ doc_printf(doc, "%.1f 0.0 translate -1 1 scale\n", PageWidth);
}
@@ -3523,5 +3527,5 @@ write_options(
/*
- * End of "$Id: pstops.c 9376 2010-11-17 19:58:22Z mike $".
+ * End of "$Id: pstops.c 9426 2011-01-06 22:48:42Z mike $".
*/
diff --git a/filter/raster.c b/filter/raster.c
index c3106318..1f059f61 100644
--- a/filter/raster.c
+++ b/filter/raster.c
@@ -1,9 +1,9 @@
/*
- * "$Id: raster.c 9282 2010-08-31 15:56:40Z mike $"
+ * "$Id: raster.c 9598 2011-03-11 23:53:27Z mike $"
*
* Raster file routines for CUPS.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* This file is part of the CUPS Imaging library.
@@ -19,7 +19,7 @@
* Contents:
*
* cupsRasterClose() - Close a raster stream.
- * cupsRasterOpen() - Open a raster stream.
+ * cupsRasterOpen() - Open a raster stream using a file descriptor.
* cupsRasterReadHeader() - Read a raster page header and store it in a
* version 1 page header structure.
* cupsRasterReadHeader2() - Read a raster page header and store it in a
@@ -30,14 +30,14 @@
* cupsRasterWriteHeader2() - Write a raster page header from a version 2
* page header structure.
* cupsRasterWritePixels() - Write raster pixels.
- * cups_raster_read() - Read through the raster buffer.
* cups_raster_read_header() - Read a raster page header.
+ * cups_raster_read() - Read through the raster buffer.
* cups_raster_update() - Update the raster header and row count for the
* current page.
- * cups_raster_write() - Write a row of raster data...
- * cups_read() - Read bytes from a file.
+ * cups_raster_write() - Write a row of compressed raster data...
+ * cups_read_fd() - Read bytes from a file.
* cups_swap() - Swap bytes in raster data...
- * cups_write() - Write bytes to a file.
+ * cups_write_fd() - Write bytes to a file.
*/
/*
@@ -45,13 +45,9 @@
*/
#include "image-private.h"
-#include <cups/debug.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <cups/string.h>
-
#if defined(WIN32) || defined(__EMX__)
# include <io.h>
+# include <winsock2.h> /* for htonl() definition */
#else
# include <unistd.h>
#endif /* WIN32 || __EMX__ */
@@ -61,10 +57,13 @@
* Private structures...
*/
+typedef ssize_t (*_cups_raster_iocb_t)(void *ctx, unsigned char *buffer, size_t length);
+
struct _cups_raster_s /**** Raster stream data ****/
{
unsigned sync; /* Sync word from start of stream */
- int fd; /* File descriptor */
+ void *ctx; /* File descriptor */
+ _cups_raster_iocb_t iocb; /* IO callback */
cups_mode_t mode; /* Read/write mode */
cups_page_header2_t header; /* Raster header for current page */
int count, /* Current row run-length count */
@@ -78,7 +77,7 @@ struct _cups_raster_s /**** Raster stream data ****/
unsigned char *buffer, /* Read/write buffer */
*bufptr, /* Current (read) position in buffer */
*bufend; /* End of current (read) buffer */
- int bufsize; /* Buffer size */
+ size_t bufsize; /* Buffer size */
};
@@ -86,14 +85,16 @@ struct _cups_raster_s /**** Raster stream data ****/
* Local functions...
*/
+static int cups_raster_io(cups_raster_t *r, unsigned char *buf, int bytes);
static unsigned cups_raster_read_header(cups_raster_t *r);
static int cups_raster_read(cups_raster_t *r, unsigned char *buf,
int bytes);
static void cups_raster_update(cups_raster_t *r);
-static int cups_raster_write(cups_raster_t *r, const unsigned char *pixels);
-static int cups_read(int fd, unsigned char *buf, int bytes);
+static int cups_raster_write(cups_raster_t *r,
+ const unsigned char *pixels);
+static ssize_t cups_read_fd(void *ctx, unsigned char *buf, size_t bytes);
static void cups_swap(unsigned char *buf, int bytes);
-static int cups_write(int fd, const unsigned char *buf, int bytes);
+static ssize_t cups_write_fd(void *ctx, unsigned char *buf, size_t bytes);
/*
@@ -120,7 +121,7 @@ cupsRasterClose(cups_raster_t *r) /* I - Stream to close */
/*
- * 'cupsRasterOpen()' - Open a raster stream.
+ * 'cupsRasterOpen()' - Open a raster stream using a file descriptor.
*
* This function associates a raster stream with the given file descriptor.
* For most printer driver filters, "fd" will be 0 (stdin). For most raster
@@ -128,13 +129,15 @@ cupsRasterClose(cups_raster_t *r) /* I - Stream to close */
* (stdout).
*
* When writing raster data, the @code CUPS_RASTER_WRITE@ or
- * @code CUPS_RASTER_WRITE_COMPRESS@ mode can be used - compressed output
- * is generally 25-50% smaller but adds a 100-300% execution time overhead.
+ * @code CUPS_RASTER_WRITE_COMPRESS@ mode can be used - compressed output is
+ * generally 25-50% smaller but adds a 100-300% execution time overhead.
*/
cups_raster_t * /* O - New stream */
cupsRasterOpen(int fd, /* I - File descriptor */
- cups_mode_t mode) /* I - Mode - @code CUPS_RASTER_READ@, @code CUPS_RASTER_WRITE@, or @code CUPS_RASTER_WRITE_COMPRESSED@ */
+ cups_mode_t mode) /* I - Mode - @code CUPS_RASTER_READ@,
+ @code CUPS_RASTER_WRITE@, or
+ @code CUPS_RASTER_WRITE_COMPRESSED@ */
{
cups_raster_t *r; /* New stream */
@@ -148,8 +151,9 @@ cupsRasterOpen(int fd, /* I - File descriptor */
return (NULL);
}
- r->fd = fd;
- r->mode = mode == CUPS_RASTER_WRITE_COMPRESSED ? CUPS_RASTER_WRITE : mode;
+ r->ctx = (void *)((intptr_t)fd);
+ r->iocb = mode == CUPS_RASTER_READ ? cups_read_fd : cups_write_fd;
+ r->mode = mode;
if (mode == CUPS_RASTER_READ)
{
@@ -157,7 +161,8 @@ cupsRasterOpen(int fd, /* I - File descriptor */
* Open for read - get sync word...
*/
- if (!cups_read(r->fd, (unsigned char *)&(r->sync), sizeof(r->sync)))
+ if (cups_raster_io(r, (unsigned char *)&(r->sync), sizeof(r->sync)) !=
+ sizeof(r->sync))
{
_cupsRasterAddError("Unable to read header from raster stream: %s\n",
strerror(errno));
@@ -194,15 +199,20 @@ cupsRasterOpen(int fd, /* I - File descriptor */
* Open for write - put sync word...
*/
- if (mode == CUPS_RASTER_WRITE_COMPRESSED)
+ switch (mode)
{
- r->compressed = 1;
- r->sync = CUPS_RASTER_SYNCv2;
+ default :
+ case CUPS_RASTER_WRITE :
+ r->sync = CUPS_RASTER_SYNC;
+ break;
+
+ case CUPS_RASTER_WRITE_COMPRESSED :
+ r->compressed = 1;
+ r->sync = CUPS_RASTER_SYNCv2;
+ break;
}
- else
- r->sync = CUPS_RASTER_SYNC;
- if (cups_write(r->fd, (unsigned char *)&(r->sync), sizeof(r->sync))
+ if (cups_raster_io(r, (unsigned char *)&(r->sync), sizeof(r->sync))
< sizeof(r->sync))
{
_cupsRasterAddError("Unable to write raster stream header: %s\n",
@@ -240,7 +250,7 @@ cupsRasterReadHeader(
if (!cups_raster_read_header(r))
return (0);
-
+
/*
* Copy the header to the user-supplied buffer...
*/
@@ -269,7 +279,7 @@ cupsRasterReadHeader2(
if (!cups_raster_read_header(r))
return (0);
-
+
/*
* Copy the header to the user-supplied buffer...
*/
@@ -313,17 +323,17 @@ cupsRasterReadPixels(cups_raster_t *r, /* I - Raster stream */
r->remaining -= len / r->header.cupsBytesPerLine;
- if (!cups_read(r->fd, p, len))
+ if (cups_raster_io(r, p, len) < (ssize_t)len)
return (0);
/*
* Swap bytes as needed...
*/
- if ((r->header.cupsBitsPerColor == 16 ||
+ if (r->swapped &&
+ (r->header.cupsBitsPerColor == 16 ||
r->header.cupsBitsPerPixel == 12 ||
- r->header.cupsBitsPerPixel == 16) &&
- r->swapped)
+ r->header.cupsBitsPerPixel == 16))
cups_swap(p, len);
/*
@@ -354,7 +364,7 @@ cupsRasterReadPixels(cups_raster_t *r, /* I - Raster stream */
ptr = r->pixels;
/*
- * Read using a modified TIFF "packbits" compression...
+ * Read using a modified PackBits compression...
*/
if (!cups_raster_read(r, &byte, 1))
@@ -464,7 +474,7 @@ cupsRasterReadPixels(cups_raster_t *r, /* I - Raster stream */
* Copy fragment from buffer...
*/
- if ((bytes = r->pend - r->pcurrent) > remaining)
+ if ((unsigned)(bytes = r->pend - r->pcurrent) > remaining)
bytes = remaining;
memcpy(p, r->pcurrent, bytes);
@@ -494,13 +504,13 @@ cupsRasterReadPixels(cups_raster_t *r, /* I - Raster stream */
*
* @deprecated@
*/
-
+
unsigned /* O - 1 on success, 0 on failure */
cupsRasterWriteHeader(
cups_raster_t *r, /* I - Raster stream */
cups_page_header_t *h) /* I - Raster page header */
{
- if (r == NULL || r->mode != CUPS_RASTER_WRITE)
+ if (r == NULL || r->mode == CUPS_RASTER_READ)
return (0);
/*
@@ -517,8 +527,8 @@ cupsRasterWriteHeader(
* Write the raster header...
*/
- return (cups_write(r->fd, (unsigned char *)&(r->header), sizeof(r->header))
- > 0);
+ return (cups_raster_io(r, (unsigned char *)&(r->header), sizeof(r->header))
+ == sizeof(r->header));
}
@@ -530,13 +540,13 @@ cupsRasterWriteHeader(
*
* @since CUPS 1.2/Mac OS X 10.5@
*/
-
+
unsigned /* O - 1 on success, 0 on failure */
cupsRasterWriteHeader2(
cups_raster_t *r, /* I - Raster stream */
cups_page_header2_t *h) /* I - Raster page header */
{
- if (r == NULL || r->mode != CUPS_RASTER_WRITE)
+ if (r == NULL || r->mode == CUPS_RASTER_READ)
return (0);
/*
@@ -552,8 +562,8 @@ cupsRasterWriteHeader2(
* Write the raster header...
*/
- return (cups_write(r->fd, (unsigned char *)&(r->header), sizeof(r->header))
- > 0);
+ return (cups_raster_io(r, (unsigned char *)&(r->header), sizeof(r->header))
+ == sizeof(r->header));
}
@@ -577,18 +587,65 @@ cupsRasterWritePixels(cups_raster_t *r, /* I - Raster stream */
DEBUG_printf(("cupsRasterWritePixels(r=%p, p=%p, len=%u), remaining=%u\n",
r, p, len, r->remaining));
- if (r == NULL || r->mode != CUPS_RASTER_WRITE || r->remaining == 0)
+ if (r == NULL || r->mode == CUPS_RASTER_READ || r->remaining == 0)
return (0);
if (!r->compressed)
{
/*
- * Without compression, just write the raster data raw...
+ * Without compression, just write the raster data raw unless the data needs
+ * to be swapped...
*/
r->remaining -= len / r->header.cupsBytesPerLine;
- return (cups_write(r->fd, p, len));
+ if (r->swapped &&
+ (r->header.cupsBitsPerColor == 16 ||
+ r->header.cupsBitsPerPixel == 12 ||
+ r->header.cupsBitsPerPixel == 16))
+ {
+ unsigned char *bufptr; /* Pointer into write buffer */
+ unsigned count; /* Remaining count */
+
+ /*
+ * Allocate a write buffer as needed...
+ */
+
+ if ((size_t)len > r->bufsize)
+ {
+ if (r->buffer)
+ bufptr = realloc(r->buffer, len);
+ else
+ bufptr = malloc(len);
+
+ if (!bufptr)
+ return (0);
+
+ r->buffer = bufptr;
+ r->bufsize = len;
+ }
+
+ /*
+ * Byte swap the pixels...
+ */
+
+ for (bufptr = r->buffer, count = len; count > 1; count -= 2, bufptr += 2)
+ {
+ bufptr[1] = *p++;
+ bufptr[0] = *p++;
+ }
+
+ if (count) /* This should never happen... */
+ *bufptr = *p;
+
+ /*
+ * Write the byte-swapped buffer...
+ */
+
+ return (cups_raster_io(r, r->buffer, len));
+ }
+ else
+ return (cups_raster_io(r, p, len));
}
/*
@@ -761,6 +818,37 @@ cups_raster_read_header(
/*
+ * 'cups_raster_io()' - Read/write bytes from a context, handling interruptions.
+ */
+
+static int /* O - Bytes read or -1 */
+cups_raster_io(cups_raster_t *r, /* I - Raster stream */
+ unsigned char *buf, /* I - Buffer for read/write */
+ int bytes) /* I - Number of bytes to read/write */
+{
+ ssize_t count; /* Number of bytes read/written */
+ size_t total; /* Total bytes read/written */
+
+
+ DEBUG_printf(("4cups_raster_io(r=%p, buf=%p, bytes=%d)", r, buf, bytes));
+
+ for (total = 0; total < bytes; total += count, buf += count)
+ {
+ count = (*r->iocb)(r->ctx, buf, bytes - total);
+
+ DEBUG_printf(("5cups_raster_io: count=%d, total=%d", (int)count,
+ (int)total));
+ if (count == 0)
+ return (0);
+ else if (count < 0)
+ return (-1);
+ }
+
+ return ((int)total);
+}
+
+
+/*
* 'cups_raster_read()' - Read through the raster buffer.
*/
@@ -777,7 +865,7 @@ cups_raster_read(cups_raster_t *r, /* I - Raster stream */
DEBUG_printf(("cups_raster_read(r=%p, buf=%p, bytes=%d)\n", r, buf, bytes));
if (!r->compressed)
- return (cups_read(r->fd, buf, bytes));
+ return (cups_raster_io(r, buf, bytes));
/*
* Allocate a read buffer as needed...
@@ -785,7 +873,7 @@ cups_raster_read(cups_raster_t *r, /* I - Raster stream */
count = 2 * r->header.cupsBytesPerLine;
- if (count > r->bufsize)
+ if ((size_t)count > r->bufsize)
{
int offset = r->bufptr - r->buffer; /* Offset to current start of buffer */
int end = r->bufend - r->buffer; /* Offset to current end of buffer */
@@ -826,7 +914,7 @@ cups_raster_read(cups_raster_t *r, /* I - Raster stream */
* Read into the raster buffer and then copy...
*/
- remaining = cups_read(r->fd, r->buffer, r->bufsize);
+ remaining = (*r->iocb)(r->ctx, r->buffer, r->bufsize);
if (remaining <= 0)
return (0);
@@ -839,7 +927,7 @@ cups_raster_read(cups_raster_t *r, /* I - Raster stream */
* Read directly into "buf"...
*/
- count = cups_read(r->fd, buf, count);
+ count = (*r->iocb)(r->ctx, buf, count);
if (count <= 0)
return (0);
@@ -1047,7 +1135,7 @@ cups_raster_write(
*/
count = r->header.cupsBytesPerLine * 2;
- if (count > r->bufsize)
+ if ((size_t)count > r->bufsize)
{
if (r->buffer)
wptr = realloc(r->buffer, count);
@@ -1119,7 +1207,7 @@ cups_raster_write(
count ++;
ptr += bpp;
}
-
+
*wptr++ = 257 - count;
count *= bpp;
@@ -1128,39 +1216,29 @@ cups_raster_write(
}
}
- return (cups_write(r->fd, r->buffer, wptr - r->buffer));
+ return (cups_raster_io(r, r->buffer, wptr - r->buffer));
}
/*
- * 'cups_read()' - Read bytes from a file.
+ * 'cups_read_fd()' - Read bytes from a file.
*/
-static int /* O - Bytes read or -1 */
-cups_read(int fd, /* I - File descriptor */
- unsigned char *buf, /* I - Buffer for read */
- int bytes) /* I - Number of bytes to read */
+static ssize_t /* O - Bytes read or -1 */
+cups_read_fd(void *ctx, /* I - File descriptor as pointer */
+ unsigned char *buf, /* I - Buffer for read */
+ size_t bytes) /* I - Maximum number of bytes to read */
{
- int count, /* Number of bytes read */
- total; /* Total bytes read */
-
+ int fd = (int)((intptr_t)ctx);
+ /* File descriptor */
+ ssize_t count; /* Number of bytes read */
- for (total = 0; total < bytes; total += count, buf += count)
- {
- count = read(fd, buf, bytes - total);
- if (count == 0)
- return (0);
- else if (count < 0)
- {
- if (errno == EINTR)
- count = 0;
- else
- return (-1);
- }
- }
+ while ((count = read(fd, buf, bytes)) < 0)
+ if (errno != EINTR && errno != EAGAIN)
+ return (-1);
- return (total);
+ return (count);
}
@@ -1191,35 +1269,27 @@ cups_swap(unsigned char *buf, /* I - Buffer to swap */
/*
- * 'cups_write()' - Write bytes to a file.
+ * 'cups_write_fd()' - Write bytes to a file.
*/
-static int /* O - Bytes written or -1 */
-cups_write(int fd, /* I - File descriptor */
- const unsigned char *buf, /* I - Bytes to write */
- int bytes) /* I - Number of bytes to write */
+static ssize_t /* O - Bytes written or -1 */
+cups_write_fd(void *ctx, /* I - File descriptor pointer */
+ unsigned char *buf, /* I - Bytes to write */
+ size_t bytes) /* I - Number of bytes to write */
{
- int count, /* Number of bytes written */
- total; /* Total bytes written */
+ int fd = (int)((intptr_t)ctx);
+ /* File descriptor */
+ ssize_t count; /* Number of bytes written */
- for (total = 0; total < bytes; total += count, buf += count)
- {
- count = write(fd, buf, bytes - total);
-
- if (count < 0)
- {
- if (errno == EINTR)
- count = 0;
- else
- return (-1);
- }
- }
+ while ((count = write(fd, buf, bytes)) < 0)
+ if (errno != EINTR && errno != EAGAIN)
+ return (-1);
- return (total);
+ return (count);
}
/*
- * End of "$Id: raster.c 9282 2010-08-31 15:56:40Z mike $".
+ * End of "$Id: raster.c 9598 2011-03-11 23:53:27Z mike $".
*/
diff --git a/filter/testraster.c b/filter/testraster.c
index d42438bd..3101bde9 100644
--- a/filter/testraster.c
+++ b/filter/testraster.c
@@ -1,9 +1,9 @@
/*
- * "$Id: testraster.c 7376 2008-03-19 21:07:45Z mike $"
+ * "$Id: testraster.c 9598 2011-03-11 23:53:27Z mike $"
*
- * Raster test program routines for the Common UNIX Printing System (CUPS).
+ * Raster test program routines for CUPS.
*
- * Copyright 2007-2008 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
@@ -19,6 +19,7 @@
* main() - Test the raster functions.
* do_ppd_tests() - Test the default option commands in a PPD file.
* do_ps_tests() - Test standard PostScript commands.
+ * do_ras_file() - Test reading of a raster file.
* do_raster_tests() - Test reading and writing of raster data.
* print_changes() - Print differences in the page header.
*/
@@ -28,8 +29,12 @@
*/
#include "image-private.h"
-#include <stdlib.h>
-#include <cups/string.h>
+#ifdef WIN32
+# include <io.h>
+#else
+# include <unistd.h>
+# include <fcntl.h>
+#endif /* WIN32 */
/*
@@ -195,6 +200,7 @@ static cups_page_header2_t setpagedevice_header =
static int do_ppd_tests(const char *filename, int num_options,
cups_option_t *options);
static int do_ps_tests(void);
+static int do_ras_file(const char *filename);
static int do_raster_tests(cups_mode_t mode);
static void print_changes(cups_page_header2_t *header,
cups_page_header2_t *expected);
@@ -209,6 +215,7 @@ main(int argc, /* I - Number of command-line args */
char *argv[]) /* I - Command-line arguments */
{
int errors; /* Number of errors */
+ const char *ext; /* Filename extension */
if (argc == 1)
@@ -240,6 +247,7 @@ main(int argc, /* I - Number of command-line args */
else
{
puts("Usage: testraster [-o name=value ...] [filename.ppd ...]");
+ puts(" testraster [filename.ras ...]");
return (1);
}
}
@@ -247,11 +255,23 @@ main(int argc, /* I - Number of command-line args */
else
{
puts("Usage: testraster [-o name=value ...] [filename.ppd ...]");
+ puts(" testraster [filename.ras ...]");
return (1);
}
}
+ else if ((ext = strrchr(argv[i], '.')) != NULL)
+ {
+ if (!strcmp(ext, ".ppd"))
+ errors += do_ppd_tests(argv[i], num_options, options);
+ else
+ errors += do_ras_file(argv[i]);
+ }
else
- errors += do_ppd_tests(argv[i], num_options, options);
+ {
+ puts("Usage: testraster [-o name=value ...] [filename.ppd ...]");
+ puts(" testraster [filename.ras ...]");
+ return (1);
+ }
}
cupsFreeOptions(num_options, options);
@@ -353,7 +373,7 @@ do_ps_tests(void)
}
else
puts("PASS");
-
+
fputs("_cupsRasterExecPS(\"roll\"): ", stdout);
fflush(stdout);
@@ -432,92 +452,66 @@ do_ps_tests(void)
else
puts("PASS");
-#if 0
- fputs("_cupsRasterExecPS(\"\"): ", stdout);
- fflush(stdout);
+ return (errors);
+}
- if (_cupsRasterExecPS(&header, &preferred_bits,
- ""))
- {
- puts("FAIL (error from function)");
- errors ++;
- }
- else if (header.)
- {
- printf("FAIL ()\n");
- errors ++;
- }
- else
- puts("PASS");
- fputs("_cupsRasterExecPS(\"\"): ", stdout);
- fflush(stdout);
+/*
+ * 'do_ras_file()' - Test reading of a raster file.
+ */
- if (_cupsRasterExecPS(&header, &preferred_bits,
- ""))
- {
- puts("FAIL (error from function)");
- errors ++;
- }
- else if (header.)
- {
- printf("FAIL ()\n");
- errors ++;
- }
- else
- puts("PASS");
+static int /* O - Number of errors */
+do_ras_file(const char *filename) /* I - Filename */
+{
+ unsigned y; /* Looping vars */
+ int fd; /* File descriptor */
+ cups_raster_t *ras; /* Raster stream */
+ cups_page_header2_t header; /* Page header */
+ unsigned char *data; /* Raster data */
+ int errors = 0; /* Number of errors */
+ unsigned pages = 0; /* Number of pages */
- fputs("_cupsRasterExecPS(\"\"): ", stdout);
- fflush(stdout);
- if (_cupsRasterExecPS(&header, &preferred_bits,
- ""))
+ if ((fd = open(filename, O_RDONLY)) < 0)
{
- puts("FAIL (error from function)");
- errors ++;
+ printf("%s: %s\n", filename, strerror(errno));
+ return (1);
}
- else if (header.)
+
+ if ((ras = cupsRasterOpen(fd, CUPS_RASTER_READ)) == NULL)
{
- printf("FAIL ()\n");
- errors ++;
+ printf("%s: cupsRasterOpen failed.\n", filename);
+ close(fd);
+ return (1);
}
- else
- puts("PASS");
- fputs("_cupsRasterExecPS(\"\"): ", stdout);
- fflush(stdout);
+ printf("%s:\n", filename);
- if (_cupsRasterExecPS(&header, &preferred_bits,
- ""))
+ while (cupsRasterReadHeader2(ras, &header))
{
- puts("FAIL (error from function)");
- errors ++;
- }
- else if (header.)
- {
- printf("FAIL ()\n");
- errors ++;
- }
- else
- puts("PASS");
+ pages ++;
+ data = malloc(header.cupsBytesPerLine);
- fputs("_cupsRasterExecPS(\"\"): ", stdout);
- fflush(stdout);
+ printf(" Page %u: %ux%ux%u@%ux%udpi", pages,
+ header.cupsWidth, header.cupsHeight, header.cupsBitsPerPixel,
+ header.HWResolution[0], header.HWResolution[1]);
+ fflush(stdout);
- if (_cupsRasterExecPS(&header, &preferred_bits,
- ""))
- {
- puts("FAIL (error from function)");
- errors ++;
- }
- else if (header.)
- {
- printf("FAIL ()\n");
- errors ++;
+ for (y = 0; y < header.cupsHeight; y ++)
+ if (cupsRasterReadPixels(ras, data, header.cupsBytesPerLine) <
+ header.cupsBytesPerLine)
+ break;
+
+ if (y < header.cupsHeight)
+ printf(" ERROR AT LINE %d\n", y);
+ else
+ putchar('\n');
+
+ free(data);
}
- else
- puts("PASS");
-#endif /* 0 */
+
+ cupsRasterClose(ras);
+ close(fd);
return (errors);
}
@@ -545,7 +539,7 @@ do_raster_tests(cups_mode_t mode) /* O - Write mode */
printf("cupsRasterOpen(%s): ",
mode == CUPS_RASTER_WRITE ? "CUPS_RASTER_WRITE" :
- "CUPS_RASTER_WRITE_COMPRESSED");
+ "CUPS_RASTER_WRITE_COMPRESSED");
fflush(stdout);
if ((fp = fopen("test.raster", "wb")) == NULL)
@@ -1078,5 +1072,5 @@ print_changes(
/*
- * End of "$Id: testraster.c 7376 2008-03-19 21:07:45Z mike $".
+ * End of "$Id: testraster.c 9598 2011-03-11 23:53:27Z mike $".
*/
diff --git a/man/cups-driverd.man.in b/man/cups-driverd.man.in
index 648bbc34..f0408415 100644
--- a/man/cups-driverd.man.in
+++ b/man/cups-driverd.man.in
@@ -1,9 +1,9 @@
.\"
-.\" "$Id: cups-driverd.man.in 8421 2009-03-09 21:59:55Z mike $"
+.\" "$Id: cups-driverd.man.in 9426 2011-01-06 22:48:42Z 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 8421 2009-03-09 21:59:55Z mike $".
+.\" End of "$Id: cups-driverd.man.in 9426 2011-01-06 22:48:42Z mike $".
.\"
diff --git a/man/cupsctl.man b/man/cupsctl.man
index cef4e107..87464336 100644
--- a/man/cupsctl.man
+++ b/man/cupsctl.man
@@ -1,9 +1,9 @@
.\"
-.\" "$Id: cupsctl.man 8421 2009-03-09 21:59:55Z mike $"
+.\" "$Id: cupsctl.man 9470 2011-01-11 07:05:58Z 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 8421 2009-03-09 21:59:55Z mike $".
+.\" End of "$Id: cupsctl.man 9470 2011-01-11 07:05:58Z mike $".
.\"
diff --git a/man/lp.man b/man/lp.man
index 2af1652b..b541db9c 100644
--- a/man/lp.man
+++ b/man/lp.man
@@ -1,9 +1,9 @@
.\"
-.\" "$Id: lp.man 9282 2010-08-31 15:56:40Z mike $"
+.\" "$Id: lp.man 9665 2011-03-31 18:54:19Z mike $"
.\"
-.\" lp man page for the Common UNIX Printing System (CUPS).
+.\" lp 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 lp 1 "CUPS" "31 August 2010" "Apple Inc."
+.TH lp 1 "CUPS" "31 March 2011" "Apple Inc."
.SH NAME
lp - print files
.SH SYNOPSIS
@@ -142,11 +142,10 @@ Submits jobs as \fIusername\fR.
.TP 5
-H resume
.br
-Specifies when the job should be printed. A value of
-\fIimmediate\fR will print the file immediately, a value of
-\fIhold\fR will hold the job indefinitely, and a time value
-(HH:MM) will hold the job until the specified time. Use a value
-of \fIresume\fR with the \fI-i\fR option to resume a held job.
+Specifies when the job should be printed. A value of \fIimmediate\fR will print
+the file immediately, a value of \fIhold\fR will hold the job indefinitely, and
+a UTC time value (HH:MM) will hold the job until the specified UTC (not local)
+time. Use a value of \fIresume\fR with the \fI-i\fR option to resume a held job.
Use a value of \fIrestart\fR with the \fI-i\fR option to restart
a completed job.
.TP 5
@@ -257,7 +256,7 @@ is highest priority).
.br
http://localhost:631/help
.SH COPYRIGHT
-Copyright 2007-2010 by Apple Inc.
+Copyright 2007-2011 by Apple Inc.
.\"
-.\" End of "$Id: lp.man 9282 2010-08-31 15:56:40Z mike $".
+.\" End of "$Id: lp.man 9665 2011-03-31 18:54:19Z mike $".
.\"
diff --git a/man/lpadmin.man b/man/lpadmin.man
index f05108ac..0926259e 100644
--- a/man/lpadmin.man
+++ b/man/lpadmin.man
@@ -1,9 +1,9 @@
.\"
-.\" "$Id: lpadmin.man 9291 2010-09-01 15:51:59Z mike $"
+.\" "$Id: lpadmin.man 9473 2011-01-11 16:28:51Z 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 9291 2010-09-01 15:51:59Z mike $".
+.\" End of "$Id: lpadmin.man 9473 2011-01-11 16:28:51Z mike $".
.\"
diff --git a/notifier/dbus.c b/notifier/dbus.c
index a06fcd70..88a8f942 100644
--- a/notifier/dbus.c
+++ b/notifier/dbus.c
@@ -1,5 +1,5 @@
/*
- * "$Id: dbus.c 7916 2008-09-07 22:27:01Z mike $"
+ * "$Id: dbus.c 9582 2011-03-04 19:28:38Z mike $"
*
* D-Bus notifier for the Common UNIX Printing System (CUPS).
*
@@ -332,7 +332,7 @@ main(int argc, /* I - Number of command-line args */
const char *word2 = event + 4; /* Second word */
params = PARAMS_JOB;
- if (!strcmp(word2, "state"))
+ if (!strcmp(word2, "state-changed"))
signame = "JobState";
else if (!strcmp(word2, "created"))
signame = "JobCreated";
@@ -548,5 +548,5 @@ acquire_lock(int *fd, /* O - Lock file descriptor */
/*
- * End of "$Id: dbus.c 7916 2008-09-07 22:27:01Z mike $".
+ * End of "$Id: dbus.c 9582 2011-03-04 19:28:38Z mike $".
*/
diff --git a/packaging/cups.spec b/packaging/cups.spec
index 52a581fd..d1d84991 100644
--- a/packaging/cups.spec
+++ b/packaging/cups.spec
@@ -34,12 +34,12 @@
Summary: CUPS
Name: cups
-Version: 1.4.6
+Version: 1.4.7
Release: 1
Epoch: 1
License: GPL
Group: System Environment/Daemons
-Source: http://ftp.easysw.com/pub/cups/1.4.6/cups-1.4.6-source.tar.gz
+Source: http://ftp.easysw.com/pub/cups/1.4.7/cups-1.4.7-source.tar.gz
Url: http://www.cups.org
Packager: Anonymous <anonymous@foo.com>
Vendor: Apple Inc.
diff --git a/ppdc/sample.drv b/ppdc/sample.drv
index 4a4020f1..e87e17a1 100644
--- a/ppdc/sample.drv
+++ b/ppdc/sample.drv
@@ -1,9 +1,9 @@
//
-// "$Id: sample.drv 9120 2010-04-23 18:56:34Z mike $"
+// "$Id: sample.drv 9593 2011-03-10 03:59:06Z mike $"
//
// Driver info file for CUPS-supplied PPDs.
//
-// Copyright 2007-2010 by Apple Inc.
+// Copyright 2007-2011 by Apple Inc.
// Copyright 1993-2006 by Easy Software Products.
//
// These coded instructions, statements, and computer programs are the
@@ -117,7 +117,7 @@ Attribute "FileSystem" "" "False"
Attribute "LandscapeOrientation" "" "Plus90"
Attribute "TTRasterizer" "" "Type42"
-Copyright "Copyright 2007-2010 by Apple Inc."
+Copyright "Copyright 2007-2011 by Apple Inc."
Copyright "Copyright 1997-2007 by Easy Software Products."
Copyright ""
Copyright "These coded instructions, statements, and computer programs are the"
@@ -154,9 +154,9 @@ Version "1.4"
MediaSize w41h144
MediaSize w153h198
- Resolution k 1 0 0 0 136dpi
- Resolution k 1 0 0 0 203dpi
- *Resolution k 1 0 0 0 300dpi
+ Resolution k 1 0 0 0 136dpi
+ Resolution k 1 0 0 0 203dpi
+ *Resolution k 1 0 0 0 300dpi
Darkness 0 Light
Darkness 1 Medium
@@ -211,7 +211,7 @@ Version "1.4"
MediaSize A4
MediaSize FanFoldUS
- Resolution k 1 8 0 0 60x720dpi
+ Resolution k 1 8 0 0 60x72dpi
*Resolution k 1 8 0 0 120x72dpi
Resolution k 1 8 0 0 240x72dpi
}
@@ -364,7 +364,7 @@ Version "1.4"
Attribute NickName "" "Generic PostScript Printer"
PCFileName "generic.ppd"
Throughput 8
- ColorDevice No
+ ColorDevice Yes
Attribute PSVersion "" "(2016.0) 0"
Attribute LanguageLevel "" 2
@@ -387,11 +387,12 @@ Version "1.4"
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
Installable "Option1/Duplexer"
+ Attribute "?Option1" "" "save currentpagedevice/Duplex known{(True)}{(False)}ifelse = flush restore"
}
}
@@ -443,7 +444,7 @@ Version "1.4"
Resolution - 1 0 0 0 600dpi
*InputSlot 1 Tray
- InputSlot 2 "Manual/Manual Feed"
+ InputSlot 2 "Manual/Manual Feed"
InputSlot 3 "Envelope/Envelope Feed"
*MediaType 0 "Plain/Plain Paper"
@@ -527,7 +528,7 @@ Version "1.4"
*MediaSize w288h432
- *Resolution k 1 0 0 0 300dpi
+ *Resolution k 1 0 0 0 300dpi
Group "PrinterSettings/Printer Settings"
Option "inPrintDensity/Print Density" PickOne DocumentSetup 20.0
@@ -652,7 +653,7 @@ Version "1.4"
ModelNumber $EPSON_9PIN
ColorDevice No
- Resolution k 1 8 0 0 60x720dpi
+ Resolution k 1 8 0 0 60x72dpi
*Resolution k 1 8 0 0 120x72dpi
Resolution k 1 8 0 0 240x72dpi
}
@@ -1245,5 +1246,5 @@ Version "1.4"
}
//
-// End of "$Id: sample.drv 9120 2010-04-23 18:56:34Z mike $".
+// End of "$Id: sample.drv 9593 2011-03-10 03:59:06Z mike $".
//
diff --git a/scheduler/client.c b/scheduler/client.c
index 7303a5a7..ee7924cb 100644
--- a/scheduler/client.c
+++ b/scheduler/client.c
@@ -1,9 +1,9 @@
/*
- * "$Id: client.c 9337 2010-10-17 04:13:56Z mike $"
+ * "$Id: client.c 9503 2011-01-22 00:07:22Z mike $"
*
* Client routines for the Common UNIX Printing System (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
@@ -54,7 +54,9 @@
#ifdef HAVE_CDSASSL
# include <Security/Security.h>
-# include <Security/SecItem.h>
+# ifdef HAVE_SECITEM_H
+# include <Security/SecItem.h>
+# endif /* HAVE_SECITEM_H */
# ifdef HAVE_SECITEMPRIV_H
# include <Security/SecItemPriv.h>
# else /* Declare constant from that header... */
@@ -3425,15 +3427,17 @@ get_cdsa_certificate(
servername = CFStringCreateWithCString(kCFAllocatorDefault, con->servername,
kCFStringEncodingUTF8);
- if ((policy = SecPolicyCreateSSL(1, servername)) == NULL)
+ policy = SecPolicyCreateSSL(1, servername);
+
+ if (servername)
+ CFRelease(servername);
+
+ if (!policy)
{
cupsdLogMessage(CUPSD_LOG_ERROR, "Cannot create ssl policy reference");
goto cleanup;
}
- if (servername)
- CFRelease(servername);
-
if (!(query = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks)))
@@ -3467,15 +3471,17 @@ get_cdsa_certificate(
CFRelease(policy);
- if ((policy = SecPolicyCreateSSL(1, servername)) == NULL)
+ policy = SecPolicyCreateSSL(1, servername);
+
+ if (servername)
+ CFRelease(servername);
+
+ if (!policy)
{
cupsdLogMessage(CUPSD_LOG_ERROR, "Cannot create ssl policy reference");
goto cleanup;
}
- if (servername)
- CFRelease(servername);
-
CFDictionarySetValue(query, kSecMatchPolicy, policy);
err = SecItemCopyMatching(query, (CFTypeRef *)&identity);
@@ -4881,8 +4887,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])));
@@ -5276,5 +5292,5 @@ write_pipe(cupsd_client_t *con) /* I - Client connection */
/*
- * End of "$Id: client.c 9337 2010-10-17 04:13:56Z mike $".
+ * End of "$Id: client.c 9503 2011-01-22 00:07:22Z mike $".
*/
diff --git a/scheduler/conf.c b/scheduler/conf.c
index e72ecead..eac4bf1b 100644
--- a/scheduler/conf.c
+++ b/scheduler/conf.c
@@ -1,9 +1,9 @@
/*
- * "$Id: conf.c 9273 2010-08-31 04:18:38Z mike $"
+ * "$Id: conf.c 9470 2011-01-11 07:05:58Z mike $"
*
* Configuration routines 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
@@ -496,7 +496,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");
@@ -695,6 +695,12 @@ cupsdReadConfiguration(void)
#endif /* __APPLE__ */
/*
+ * Setup environment variables...
+ */
+
+ cupsdInitEnv();
+
+ /*
* Read the configuration file...
*/
@@ -1037,10 +1043,10 @@ cupsdReadConfiguration(void)
}
/*
- * Setup environment variables...
+ * Update environment variables...
*/
- cupsdInitEnv();
+ cupsdUpdateEnv();
/*
* Update default paper size setting as needed...
@@ -3853,5 +3859,5 @@ read_policy(cups_file_t *fp, /* I - Configuration file */
/*
- * End of "$Id: conf.c 9273 2010-08-31 04:18:38Z mike $".
+ * End of "$Id: conf.c 9470 2011-01-11 07:05:58Z mike $".
*/
diff --git a/scheduler/cups-driverd.cxx b/scheduler/cups-driverd.cxx
index eebd7b27..f67ff4e2 100644
--- a/scheduler/cups-driverd.cxx
+++ b/scheduler/cups-driverd.cxx
@@ -1,5 +1,5 @@
/*
- * "$Id: cups-driverd.cxx 9107 2010-04-14 22:10:52Z mike $"
+ * "$Id: cups-driverd.cxx 9723 2011-04-27 20:28:36Z mike $"
*
* PPD/driver support for the Common UNIX Printing System (CUPS).
*
@@ -30,9 +30,9 @@
* dump_ppds_dat() - Dump the contents of the ppds.dat file.
* free_array() - Free an array of strings.
* list_ppds() - List PPD files.
- * load_ppds() - Load PPD files recursively.
* load_drv() - Load the PPDs from a driver information file.
* load_drivers() - Load driver-generated PPD files.
+ * load_ppds() - Load PPD files recursively.
* load_ppds_dat() - Load the ppds.dat file.
* regex_device_id() - Compile a regular expression based on the 1284 device
* ID.
@@ -101,7 +101,7 @@ typedef struct /**** PPD record ****/
make_and_model[128], /* NickName/ModelName */
device_id[256], /* IEEE 1284 Device ID */
scheme[128]; /* PPD scheme */
-} ppd_rec_t;
+} ppd_rec_t;
typedef struct /**** In-memory record ****/
{
@@ -284,7 +284,7 @@ cat_drv(const char *name, /* I - PPD name */
const char *datadir; // CUPS_DATADIR env var
ppdcSource *src; // PPD source file data
ppdcDriver *d; // Current driver
- cups_file_t *out; // Stdout via CUPS file API
+ cups_file_t *out; // Stdout via CUPS file API
char message[2048], // status-message
filename[1024], // Full path to .drv file(s)
scheme[32], // URI scheme ("drv")
@@ -299,7 +299,7 @@ cat_drv(const char *name, /* I - PPD name */
if ((datadir = getenv("CUPS_DATADIR")) == NULL)
datadir = CUPS_DATADIR;
- // Pull out the
+ // Pull out the path to the .drv file...
if (httpSeparateURI(HTTP_URI_CODING_ALL, name, scheme, sizeof(scheme),
userpass, sizeof(userpass), host, sizeof(host), &port,
resource, sizeof(resource)) < HTTP_URI_OK ||
@@ -543,6 +543,10 @@ cat_static(const char *name, /* I - PPD name */
const char *datadir; /* CUPS_DATADIR env var */
char line[1024], /* Line/filename */
message[2048]; /* status-message */
+#ifdef __APPLE__
+ const char *printerDriver, /* Pointer to .printerDriver extension */
+ *slash; /* Pointer to next slash */
+#endif /* __APPLE__ */
if (name[0] == '/' || strstr(name, "../") || strstr(name, "/.."))
@@ -575,7 +579,19 @@ cat_static(const char *name, /* I - PPD name */
#ifdef __APPLE__
if (!strncmp(name, "System/Library/Printers/PPDs/Contents/Resources/", 48) ||
- !strncmp(name, "Library/Printers/PPDs/Contents/Resources/", 41))
+ !strncmp(name, "Library/Printers/PPDs/Contents/Resources/", 41) ||
+ (!strncmp(name, "System/Library/Printers/", 24) &&
+ (printerDriver =
+ strstr(name + 24,
+ ".printerDriver/Contents/Resources/PPDs")) != NULL &&
+ (slash = strchr(name + 24, '/')) != NULL &&
+ slash > printerDriver) ||
+ (!strncmp(name, "Library/Printers/", 17) &&
+ (printerDriver =
+ strstr(name + 17,
+ ".printerDriver/Contents/Resources/PPDs")) != NULL &&
+ (slash = strchr(name + 17, '/')) != NULL &&
+ slash > printerDriver))
{
/*
* Map ppd-name to Mac OS X standard locations...
@@ -872,10 +888,14 @@ list_ppds(int request_id, /* I - Request ID */
* Load PPDs from standard Mac OS X locations...
*/
+ load_ppds("/Library/Printers",
+ "Library/Printers", 0);
load_ppds("/Library/Printers/PPDs/Contents/Resources",
"Library/Printers/PPDs/Contents/Resources", 0);
load_ppds("/Library/Printers/PPDs/Contents/Resources/en.lproj",
"Library/Printers/PPDs/Contents/Resources/en.lproj", 0);
+ load_ppds("/System/Library/Printers",
+ "System/Library/Printers", 0);
load_ppds("/System/Library/Printers/PPDs/Contents/Resources",
"System/Library/Printers/PPDs/Contents/Resources", 0);
load_ppds("/System/Library/Printers/PPDs/Contents/Resources/en.lproj",
@@ -922,11 +942,14 @@ list_ppds(int request_id, /* I - Request ID */
if (ChangedPPD)
{
- if ((fp = cupsFileOpen(filename, "w")) != NULL)
+ char newname[1024]; /* New filename */
+
+ snprintf(newname, sizeof(newname), "%s.%d", filename, (int)getpid());
+
+ if ((fp = cupsFileOpen(newname, "w")) != NULL)
{
unsigned ppdsync = PPD_SYNC; /* Sync word */
-
cupsFileWrite(fp, (char *)&ppdsync, sizeof(ppdsync));
for (ppd = (ppd_info_t *)cupsArrayFirst(PPDsByName);
@@ -936,8 +959,12 @@ list_ppds(int request_id, /* I - Request ID */
cupsFileClose(fp);
- fprintf(stderr, "INFO: [cups-driverd] Wrote \"%s\", %d PPDs...\n",
- filename, cupsArrayCount(PPDsByName));
+ if (rename(newname, filename))
+ fprintf(stderr, "ERROR: [cups-driverd] Unable to rename \"%s\" - %s\n",
+ newname, strerror(errno));
+ else
+ fprintf(stderr, "INFO: [cups-driverd] Wrote \"%s\", %d PPDs...\n",
+ filename, cupsArrayCount(PPDsByName));
}
else
fprintf(stderr, "ERROR: [cups-driverd] Unable to write \"%s\" - %s\n",
@@ -1337,6 +1364,373 @@ list_ppds(int request_id, /* I - Request ID */
/*
+ * 'load_drv()' - Load the PPDs from a driver information file.
+ */
+
+static int /* O - 1 on success, 0 on failure */
+load_drv(const char *filename, /* I - Actual filename */
+ const char *name, /* I - Name to the rest of the world */
+ cups_file_t *fp, /* I - File to read from */
+ time_t mtime, /* I - Mod time of driver info file */
+ off_t size) /* I - Size of driver info file */
+{
+ ppdcSource *src; // Driver information file
+ ppdcDriver *d; // Current driver
+ ppdcAttr *device_id, // 1284DeviceID attribute
+ *product, // Current product value
+ *ps_version, // PSVersion attribute
+ *cups_fax, // cupsFax attribute
+ *nick_name; // NickName attribute
+ ppdcFilter *filter; // Current filter
+ ppd_info_t *ppd; // Current PPD
+ int products_found; // Number of products found
+ char uri[1024], // Driver URI
+ make_model[1024]; // Make and model
+ int type; // Driver type
+
+
+ /*
+ * Load the driver info file...
+ */
+
+ src = new ppdcSource(filename, fp);
+
+ if (src->drivers->count == 0)
+ {
+ fprintf(stderr,
+ "ERROR: [cups-driverd] Bad driver information file \"%s\"!\n",
+ filename);
+ src->release();
+ return (0);
+ }
+
+ /*
+ * Add a dummy entry for the file...
+ */
+
+ add_ppd(name, name, "", "", "", "", "", "", mtime, size, 0,
+ PPD_TYPE_DRV, "drv");
+ ChangedPPD = 1;
+
+ /*
+ * Then the drivers in the file...
+ */
+
+ for (d = (ppdcDriver *)src->drivers->first();
+ d;
+ d = (ppdcDriver *)src->drivers->next())
+ {
+ httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "drv", "", "", 0,
+ "/%s/%s", name,
+ d->file_name ? d->file_name->value :
+ d->pc_file_name->value);
+
+ device_id = d->find_attr("1284DeviceID", NULL);
+ ps_version = d->find_attr("PSVersion", NULL);
+ nick_name = d->find_attr("NickName", NULL);
+
+ if (nick_name)
+ strlcpy(make_model, nick_name->value->value, sizeof(make_model));
+ else if (strncasecmp(d->model_name->value, d->manufacturer->value,
+ strlen(d->manufacturer->value)))
+ snprintf(make_model, sizeof(make_model), "%s %s, %s",
+ d->manufacturer->value, d->model_name->value,
+ d->version->value);
+ else
+ snprintf(make_model, sizeof(make_model), "%s, %s", d->model_name->value,
+ d->version->value);
+
+ if ((cups_fax = d->find_attr("cupsFax", NULL)) != NULL &&
+ !strcasecmp(cups_fax->value->value, "true"))
+ type = PPD_TYPE_FAX;
+ else if (d->type == PPDC_DRIVER_PS)
+ type = PPD_TYPE_POSTSCRIPT;
+ else if (d->type != PPDC_DRIVER_CUSTOM)
+ type = PPD_TYPE_RASTER;
+ else
+ {
+ for (filter = (ppdcFilter *)d->filters->first(),
+ type = PPD_TYPE_POSTSCRIPT;
+ filter;
+ filter = (ppdcFilter *)d->filters->next())
+ if (strcasecmp(filter->mime_type->value, "application/vnd.cups-raster"))
+ type = PPD_TYPE_RASTER;
+ else if (strcasecmp(filter->mime_type->value,
+ "application/vnd.cups-pdf"))
+ type = PPD_TYPE_PDF;
+ }
+
+ for (product = (ppdcAttr *)d->attrs->first(), products_found = 0,
+ ppd = NULL;
+ product;
+ product = (ppdcAttr *)d->attrs->next())
+ if (!strcmp(product->name->value, "Product"))
+ {
+ if (!products_found)
+ ppd = add_ppd(name, uri, "en", d->manufacturer->value, make_model,
+ device_id ? device_id->value->value : "",
+ product->value->value,
+ ps_version ? ps_version->value->value : "(3010) 0",
+ mtime, size, d->model_number, type, "drv");
+ else if (products_found < PPD_MAX_PROD)
+ strlcpy(ppd->record.products[products_found], product->value->value,
+ sizeof(ppd->record.products[0]));
+ else
+ break;
+
+ products_found ++;
+ }
+
+ if (!products_found)
+ add_ppd(name, uri, "en", d->manufacturer->value, make_model,
+ device_id ? device_id->value->value : "",
+ d->model_name->value,
+ ps_version ? ps_version->value->value : "(3010) 0",
+ mtime, size, d->model_number, type, "drv");
+ }
+
+ src->release();
+
+ return (1);
+}
+
+
+/*
+ * 'load_drivers()' - Load driver-generated PPD files.
+ */
+
+static int /* O - 1 on success, 0 on failure */
+load_drivers(cups_array_t *include, /* I - Drivers to include */
+ cups_array_t *exclude) /* I - Drivers to exclude */
+{
+ int i; /* Looping var */
+ char *start, /* Start of value */
+ *ptr; /* Pointer into string */
+ const char *server_bin, /* CUPS_SERVERBIN env variable */
+ *scheme, /* Scheme for this driver */
+ *scheme_end; /* Pointer to end of scheme */
+ char drivers[1024]; /* Location of driver programs */
+ int pid; /* Process ID for driver program */
+ cups_file_t *fp; /* Pipe to driver program */
+ cups_dir_t *dir; /* Directory pointer */
+ cups_dentry_t *dent; /* Directory entry */
+ char *argv[3], /* Arguments for command */
+ filename[1024], /* Name of driver */
+ line[2048], /* Line from driver */
+ name[512], /* ppd-name */
+ make[128], /* ppd-make */
+ make_and_model[128], /* ppd-make-and-model */
+ device_id[128], /* ppd-device-id */
+ languages[128], /* ppd-natural-language */
+ product[128], /* ppd-product */
+ psversion[128], /* ppd-psversion */
+ type_str[128]; /* ppd-type */
+ int type; /* PPD type */
+ ppd_info_t *ppd; /* Newly added PPD */
+
+
+ /*
+ * Try opening the driver directory...
+ */
+
+ if ((server_bin = getenv("CUPS_SERVERBIN")) == NULL)
+ server_bin = CUPS_SERVERBIN;
+
+ snprintf(drivers, sizeof(drivers), "%s/driver", server_bin);
+
+ if ((dir = cupsDirOpen(drivers)) == NULL)
+ {
+ fprintf(stderr, "ERROR: [cups-driverd] Unable to open driver directory "
+ "\"%s\": %s\n",
+ drivers, strerror(errno));
+ return (0);
+ }
+
+ /*
+ * Loop through all of the device drivers...
+ */
+
+ argv[1] = (char *)"list";
+ argv[2] = NULL;
+
+ while ((dent = cupsDirRead(dir)) != NULL)
+ {
+ /*
+ * Only look at executable files...
+ */
+
+ if (!(dent->fileinfo.st_mode & 0111) || !S_ISREG(dent->fileinfo.st_mode))
+ continue;
+
+ /*
+ * Include/exclude specific drivers...
+ */
+
+ if (exclude)
+ {
+ /*
+ * Look for "scheme" or "scheme*" (prefix match), and skip any matches.
+ */
+
+ for (scheme = (char *)cupsArrayFirst(exclude);
+ scheme;
+ scheme = (char *)cupsArrayNext(exclude))
+ {
+ fprintf(stderr, "DEBUG: [cups-driverd] Exclude \"%s\" with \"%s\"?\n",
+ dent->filename, scheme);
+ scheme_end = scheme + strlen(scheme) - 1;
+
+ if ((scheme_end > scheme && *scheme_end == '*' &&
+ !strncmp(scheme, dent->filename, scheme_end - scheme)) ||
+ !strcmp(scheme, dent->filename))
+ {
+ fputs("DEBUG: [cups-driverd] Yes, exclude!\n", stderr);
+ break;
+ }
+ }
+
+ if (scheme)
+ continue;
+ }
+
+ if (include)
+ {
+ /*
+ * Look for "scheme" or "scheme*" (prefix match), and skip any non-matches.
+ */
+
+ for (scheme = (char *)cupsArrayFirst(include);
+ scheme;
+ scheme = (char *)cupsArrayNext(include))
+ {
+ fprintf(stderr, "DEBUG: [cups-driverd] Include \"%s\" with \"%s\"?\n",
+ dent->filename, scheme);
+ scheme_end = scheme + strlen(scheme) - 1;
+
+ if ((scheme_end > scheme && *scheme_end == '*' &&
+ !strncmp(scheme, dent->filename, scheme_end - scheme)) ||
+ !strcmp(scheme, dent->filename))
+ {
+ fputs("DEBUG: [cups-driverd] Yes, include!\n", stderr);
+ break;
+ }
+ }
+
+ if (!scheme)
+ continue;
+ }
+ else
+ scheme = dent->filename;
+
+ /*
+ * Run the driver with no arguments and collect the output...
+ */
+
+ argv[0] = dent->filename;
+ snprintf(filename, sizeof(filename), "%s/%s", drivers, dent->filename);
+
+ if ((fp = cupsdPipeCommand(&pid, filename, argv, 0)) != NULL)
+ {
+ while (cupsFileGets(fp, line, sizeof(line)))
+ {
+ /*
+ * Each line is of the form:
+ *
+ * "ppd-name" ppd-natural-language "ppd-make" "ppd-make-and-model" \
+ * "ppd-device-id" "ppd-product" "ppd-psversion"
+ */
+
+ device_id[0] = '\0';
+ product[0] = '\0';
+ psversion[0] = '\0';
+ strcpy(type_str, "postscript");
+
+ if (sscanf(line, "\"%511[^\"]\"%127s%*[ \t]\"%127[^\"]\""
+ "%*[ \t]\"%127[^\"]\"%*[ \t]\"%127[^\"]\""
+ "%*[ \t]\"%127[^\"]\"%*[ \t]\"%127[^\"]\""
+ "%*[ \t]\"%127[^\"]\"",
+ name, languages, make, make_and_model,
+ device_id, product, psversion, type_str) < 4)
+ {
+ /*
+ * Bad format; strip trailing newline and write an error message.
+ */
+
+ if (line[strlen(line) - 1] == '\n')
+ line[strlen(line) - 1] = '\0';
+
+ fprintf(stderr, "ERROR: [cups-driverd] Bad line from \"%s\": %s\n",
+ dent->filename, line);
+ break;
+ }
+ else
+ {
+ /*
+ * Add the device to the array of available devices...
+ */
+
+ if ((start = strchr(languages, ',')) != NULL)
+ *start++ = '\0';
+
+ for (type = 0;
+ type < (int)(sizeof(ppd_types) / sizeof(ppd_types[0]));
+ type ++)
+ if (!strcmp(type_str, ppd_types[type]))
+ break;
+
+ if (type >= (int)(sizeof(ppd_types) / sizeof(ppd_types[0])))
+ {
+ fprintf(stderr,
+ "ERROR: [cups-driverd] Bad ppd-type \"%s\" ignored!\n",
+ type_str);
+ type = PPD_TYPE_UNKNOWN;
+ }
+
+ ppd = add_ppd(filename, name, languages, make, make_and_model,
+ device_id, product, psversion, 0, 0, 0, type, scheme);
+
+ if (!ppd)
+ {
+ cupsDirClose(dir);
+ cupsFileClose(fp);
+ return (0);
+ }
+
+ if (start && *start)
+ {
+ for (i = 1; i < PPD_MAX_LANG && *start; i ++)
+ {
+ if ((ptr = strchr(start, ',')) != NULL)
+ *ptr++ = '\0';
+ else
+ ptr = start + strlen(start);
+
+ strlcpy(ppd->record.languages[i], start,
+ sizeof(ppd->record.languages[0]));
+
+ start = ptr;
+ }
+ }
+
+ fprintf(stderr, "DEBUG2: [cups-driverd] Added dynamic PPD \"%s\"...\n",
+ name);
+ }
+ }
+
+ cupsFileClose(fp);
+ }
+ else
+ fprintf(stderr, "WARNING: [cups-driverd] Unable to execute \"%s\": %s\n",
+ filename, strerror(errno));
+ }
+
+ cupsDirClose(dir);
+
+ return (1);
+}
+
+
+/*
* 'load_ppds()' - Load PPD files recursively.
*/
@@ -1472,11 +1866,25 @@ load_ppds(const char *d, /* I - Actual directory */
*/
if (descend)
+ {
if (!load_ppds(filename, name, 1))
{
cupsDirClose(dir);
return (1);
}
+ }
+ else if ((ptr = filename + strlen(filename) - 14) > filename &&
+ !strcmp(ptr, ".printerDriver"))
+ {
+ /*
+ * Load PPDs in a printer driver bundle.
+ */
+
+ strlcat(filename, "/Contents/Resources/PPDs", sizeof(filename));
+ strlcat(name, "/Contents/Resources/PPDs", sizeof(name));
+
+ load_ppds(filename, name, 0);
+ }
continue;
}
@@ -1904,373 +2312,6 @@ load_ppds(const char *d, /* I - Actual directory */
/*
- * 'load_drv()' - Load the PPDs from a driver information file.
- */
-
-static int /* O - 1 on success, 0 on failure */
-load_drv(const char *filename, /* I - Actual filename */
- const char *name, /* I - Name to the rest of the world */
- cups_file_t *fp, /* I - File to read from */
- time_t mtime, /* I - Mod time of driver info file */
- off_t size) /* I - Size of driver info file */
-{
- ppdcSource *src; // Driver information file
- ppdcDriver *d; // Current driver
- ppdcAttr *device_id, // 1284DeviceID attribute
- *product, // Current product value
- *ps_version, // PSVersion attribute
- *cups_fax, // cupsFax attribute
- *nick_name; // NickName attribute
- ppdcFilter *filter; // Current filter
- ppd_info_t *ppd; // Current PPD
- int products_found; // Number of products found
- char uri[1024], // Driver URI
- make_model[1024]; // Make and model
- int type; // Driver type
-
-
- /*
- * Load the driver info file...
- */
-
- src = new ppdcSource(filename, fp);
-
- if (src->drivers->count == 0)
- {
- fprintf(stderr,
- "ERROR: [cups-driverd] Bad driver information file \"%s\"!\n",
- filename);
- src->release();
- return (0);
- }
-
- /*
- * Add a dummy entry for the file...
- */
-
- add_ppd(name, name, "", "", "", "", "", "", mtime, size, 0,
- PPD_TYPE_DRV, "drv");
- ChangedPPD = 1;
-
- /*
- * Then the drivers in the file...
- */
-
- for (d = (ppdcDriver *)src->drivers->first();
- d;
- d = (ppdcDriver *)src->drivers->next())
- {
- httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "drv", "", "", 0,
- "/%s/%s", name,
- d->file_name ? d->file_name->value :
- d->pc_file_name->value);
-
- device_id = d->find_attr("1284DeviceID", NULL);
- ps_version = d->find_attr("PSVersion", NULL);
- nick_name = d->find_attr("NickName", NULL);
-
- if (nick_name)
- strlcpy(make_model, nick_name->value->value, sizeof(make_model));
- else if (strncasecmp(d->model_name->value, d->manufacturer->value,
- strlen(d->manufacturer->value)))
- snprintf(make_model, sizeof(make_model), "%s %s, %s",
- d->manufacturer->value, d->model_name->value,
- d->version->value);
- else
- snprintf(make_model, sizeof(make_model), "%s, %s", d->model_name->value,
- d->version->value);
-
- if ((cups_fax = d->find_attr("cupsFax", NULL)) != NULL &&
- !strcasecmp(cups_fax->value->value, "true"))
- type = PPD_TYPE_FAX;
- else if (d->type == PPDC_DRIVER_PS)
- type = PPD_TYPE_POSTSCRIPT;
- else if (d->type != PPDC_DRIVER_CUSTOM)
- type = PPD_TYPE_RASTER;
- else
- {
- for (filter = (ppdcFilter *)d->filters->first(),
- type = PPD_TYPE_POSTSCRIPT;
- filter;
- filter = (ppdcFilter *)d->filters->next())
- if (strcasecmp(filter->mime_type->value, "application/vnd.cups-raster"))
- type = PPD_TYPE_RASTER;
- else if (strcasecmp(filter->mime_type->value,
- "application/vnd.cups-pdf"))
- type = PPD_TYPE_PDF;
- }
-
- for (product = (ppdcAttr *)d->attrs->first(), products_found = 0,
- ppd = NULL;
- product;
- product = (ppdcAttr *)d->attrs->next())
- if (!strcmp(product->name->value, "Product"))
- {
- if (!products_found)
- ppd = add_ppd(name, uri, "en", d->manufacturer->value, make_model,
- device_id ? device_id->value->value : "",
- product->value->value,
- ps_version ? ps_version->value->value : "(3010) 0",
- mtime, size, d->model_number, type, "drv");
- else if (products_found < PPD_MAX_PROD)
- strlcpy(ppd->record.products[products_found], product->value->value,
- sizeof(ppd->record.products[0]));
- else
- break;
-
- products_found ++;
- }
-
- if (!products_found)
- add_ppd(name, uri, "en", d->manufacturer->value, make_model,
- device_id ? device_id->value->value : "",
- d->model_name->value,
- ps_version ? ps_version->value->value : "(3010) 0",
- mtime, size, d->model_number, type, "drv");
- }
-
- src->release();
-
- return (1);
-}
-
-
-/*
- * 'load_drivers()' - Load driver-generated PPD files.
- */
-
-static int /* O - 1 on success, 0 on failure */
-load_drivers(cups_array_t *include, /* I - Drivers to include */
- cups_array_t *exclude) /* I - Drivers to exclude */
-{
- int i; /* Looping var */
- char *start, /* Start of value */
- *ptr; /* Pointer into string */
- const char *server_bin, /* CUPS_SERVERBIN env variable */
- *scheme, /* Scheme for this driver */
- *scheme_end; /* Pointer to end of scheme */
- char drivers[1024]; /* Location of driver programs */
- int pid; /* Process ID for driver program */
- cups_file_t *fp; /* Pipe to driver program */
- cups_dir_t *dir; /* Directory pointer */
- cups_dentry_t *dent; /* Directory entry */
- char *argv[3], /* Arguments for command */
- filename[1024], /* Name of driver */
- line[2048], /* Line from driver */
- name[512], /* ppd-name */
- make[128], /* ppd-make */
- make_and_model[128], /* ppd-make-and-model */
- device_id[128], /* ppd-device-id */
- languages[128], /* ppd-natural-language */
- product[128], /* ppd-product */
- psversion[128], /* ppd-psversion */
- type_str[128]; /* ppd-type */
- int type; /* PPD type */
- ppd_info_t *ppd; /* Newly added PPD */
-
-
- /*
- * Try opening the driver directory...
- */
-
- if ((server_bin = getenv("CUPS_SERVERBIN")) == NULL)
- server_bin = CUPS_SERVERBIN;
-
- snprintf(drivers, sizeof(drivers), "%s/driver", server_bin);
-
- if ((dir = cupsDirOpen(drivers)) == NULL)
- {
- fprintf(stderr, "ERROR: [cups-driverd] Unable to open driver directory "
- "\"%s\": %s\n",
- drivers, strerror(errno));
- return (0);
- }
-
- /*
- * Loop through all of the device drivers...
- */
-
- argv[1] = (char *)"list";
- argv[2] = NULL;
-
- while ((dent = cupsDirRead(dir)) != NULL)
- {
- /*
- * Only look at executable files...
- */
-
- if (!(dent->fileinfo.st_mode & 0111) || !S_ISREG(dent->fileinfo.st_mode))
- continue;
-
- /*
- * Include/exclude specific drivers...
- */
-
- if (exclude)
- {
- /*
- * Look for "scheme" or "scheme*" (prefix match), and skip any matches.
- */
-
- for (scheme = (char *)cupsArrayFirst(exclude);
- scheme;
- scheme = (char *)cupsArrayNext(exclude))
- {
- fprintf(stderr, "DEBUG: [cups-driverd] Exclude \"%s\" with \"%s\"?\n",
- dent->filename, scheme);
- scheme_end = scheme + strlen(scheme) - 1;
-
- if ((scheme_end > scheme && *scheme_end == '*' &&
- !strncmp(scheme, dent->filename, scheme_end - scheme)) ||
- !strcmp(scheme, dent->filename))
- {
- fputs("DEBUG: [cups-driverd] Yes, exclude!\n", stderr);
- break;
- }
- }
-
- if (scheme)
- continue;
- }
-
- if (include)
- {
- /*
- * Look for "scheme" or "scheme*" (prefix match), and skip any non-matches.
- */
-
- for (scheme = (char *)cupsArrayFirst(include);
- scheme;
- scheme = (char *)cupsArrayNext(include))
- {
- fprintf(stderr, "DEBUG: [cups-driverd] Include \"%s\" with \"%s\"?\n",
- dent->filename, scheme);
- scheme_end = scheme + strlen(scheme) - 1;
-
- if ((scheme_end > scheme && *scheme_end == '*' &&
- !strncmp(scheme, dent->filename, scheme_end - scheme)) ||
- !strcmp(scheme, dent->filename))
- {
- fputs("DEBUG: [cups-driverd] Yes, include!\n", stderr);
- break;
- }
- }
-
- if (!scheme)
- continue;
- }
- else
- scheme = dent->filename;
-
- /*
- * Run the driver with no arguments and collect the output...
- */
-
- argv[0] = dent->filename;
- snprintf(filename, sizeof(filename), "%s/%s", drivers, dent->filename);
-
- if ((fp = cupsdPipeCommand(&pid, filename, argv, 0)) != NULL)
- {
- while (cupsFileGets(fp, line, sizeof(line)))
- {
- /*
- * Each line is of the form:
- *
- * "ppd-name" ppd-natural-language "ppd-make" "ppd-make-and-model" \
- * "ppd-device-id" "ppd-product" "ppd-psversion"
- */
-
- device_id[0] = '\0';
- product[0] = '\0';
- psversion[0] = '\0';
- strcpy(type_str, "postscript");
-
- if (sscanf(line, "\"%511[^\"]\"%127s%*[ \t]\"%127[^\"]\""
- "%*[ \t]\"%127[^\"]\"%*[ \t]\"%127[^\"]\""
- "%*[ \t]\"%127[^\"]\"%*[ \t]\"%127[^\"]\""
- "%*[ \t]\"%127[^\"]\"",
- name, languages, make, make_and_model,
- device_id, product, psversion, type_str) < 4)
- {
- /*
- * Bad format; strip trailing newline and write an error message.
- */
-
- if (line[strlen(line) - 1] == '\n')
- line[strlen(line) - 1] = '\0';
-
- fprintf(stderr, "ERROR: [cups-driverd] Bad line from \"%s\": %s\n",
- dent->filename, line);
- break;
- }
- else
- {
- /*
- * Add the device to the array of available devices...
- */
-
- if ((start = strchr(languages, ',')) != NULL)
- *start++ = '\0';
-
- for (type = 0;
- type < (int)(sizeof(ppd_types) / sizeof(ppd_types[0]));
- type ++)
- if (!strcmp(type_str, ppd_types[type]))
- break;
-
- if (type >= (int)(sizeof(ppd_types) / sizeof(ppd_types[0])))
- {
- fprintf(stderr,
- "ERROR: [cups-driverd] Bad ppd-type \"%s\" ignored!\n",
- type_str);
- type = PPD_TYPE_UNKNOWN;
- }
-
- ppd = add_ppd(filename, name, languages, make, make_and_model,
- device_id, product, psversion, 0, 0, 0, type, scheme);
-
- if (!ppd)
- {
- cupsDirClose(dir);
- cupsFileClose(fp);
- return (0);
- }
-
- if (start && *start)
- {
- for (i = 1; i < PPD_MAX_LANG && *start; i ++)
- {
- if ((ptr = strchr(start, ',')) != NULL)
- *ptr++ = '\0';
- else
- ptr = start + strlen(start);
-
- strlcpy(ppd->record.languages[i], start,
- sizeof(ppd->record.languages[0]));
-
- start = ptr;
- }
- }
-
- fprintf(stderr, "DEBUG2: [cups-driverd] Added dynamic PPD \"%s\"...\n",
- name);
- }
- }
-
- cupsFileClose(fp);
- }
- else
- fprintf(stderr, "WARNING: [cups-driverd] Unable to execute \"%s\": %s\n",
- filename, strerror(errno));
- }
-
- cupsDirClose(dir);
-
- return (1);
-}
-
-
-/*
* 'load_ppds_dat()' - Load the ppds.dat file.
*/
@@ -2302,7 +2343,6 @@ load_ppds_dat(char *filename, /* I - Filename buffer */
unsigned ppdsync; /* Sync word */
int num_ppds; /* Number of PPDs */
-
if (cupsFileRead(fp, (char *)&ppdsync, sizeof(ppdsync))
== sizeof(ppdsync) &&
ppdsync == PPD_SYNC &&
@@ -2486,5 +2526,5 @@ regex_string(const char *s) /* I - String to compare */
/*
- * End of "$Id: cups-driverd.cxx 9107 2010-04-14 22:10:52Z mike $".
+ * End of "$Id: cups-driverd.cxx 9723 2011-04-27 20:28:36Z mike $".
*/
diff --git a/scheduler/cups-polld.c b/scheduler/cups-polld.c
index b7165b5c..e4cda221 100644
--- a/scheduler/cups-polld.c
+++ b/scheduler/cups-polld.c
@@ -1,5 +1,5 @@
/*
- * "$Id: cups-polld.c 7198 2008-01-08 00:12:17Z mike $"
+ * "$Id: cups-polld.c 9470 2011-01-11 07:05:58Z mike $"
*
* Polling daemon for the Common UNIX Printing System (CUPS).
*
@@ -315,7 +315,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...
@@ -471,5 +471,5 @@ sighup_handler(int sig) /* I - Signal number */
/*
- * End of "$Id: cups-polld.c 7198 2008-01-08 00:12:17Z mike $".
+ * End of "$Id: cups-polld.c 9470 2011-01-11 07:05:58Z mike $".
*/
diff --git a/scheduler/cupsd.h b/scheduler/cupsd.h
index 2e80e9c8..0731309b 100644
--- a/scheduler/cupsd.h
+++ b/scheduler/cupsd.h
@@ -1,9 +1,9 @@
/*
- * "$Id: cupsd.h 9310 2010-09-21 22:34:57Z mike $"
+ * "$Id: cupsd.h 9470 2011-01-11 07:05:58Z mike $"
*
- * Main header file for the Common UNIX Printing System (CUPS) scheduler.
+ * Main header file for the CUPS scheduler.
*
- * Copyright 2007-2009 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
@@ -218,6 +218,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);
@@ -244,5 +245,5 @@ extern int cupsdRemoveFile(const char *filename);
/*
- * End of "$Id: cupsd.h 9310 2010-09-21 22:34:57Z mike $".
+ * End of "$Id: cupsd.h 9470 2011-01-11 07:05:58Z mike $".
*/
diff --git a/scheduler/dirsvc.c b/scheduler/dirsvc.c
index 78d6849b..26d2517b 100644
--- a/scheduler/dirsvc.c
+++ b/scheduler/dirsvc.c
@@ -1,5 +1,5 @@
/*
- * "$Id: dirsvc.c 9120 2010-04-23 18:56:34Z mike $"
+ * "$Id: dirsvc.c 9503 2011-01-22 00:07:22Z mike $"
*
* Directory services routines for the Common UNIX Printing System (CUPS).
*
@@ -2546,6 +2546,9 @@ dnssdPackTxtRecord(int *txt_len, /* O - TXT record length */
* Calculate the buffer size
*/
+ if (count <= 0)
+ return (NULL);
+
for (length = i = 0; i < count; i++)
length += 1 + strlen(keyvalue[i][0]) +
(keyvalue[i][1] ? 1 + strlen(keyvalue[i][1]) : 0);
@@ -5545,5 +5548,5 @@ update_smb(int onoff) /* I - 1 = turn on, 0 = turn off */
/*
- * End of "$Id: dirsvc.c 9120 2010-04-23 18:56:34Z mike $".
+ * End of "$Id: dirsvc.c 9503 2011-01-22 00:07:22Z mike $".
*/
diff --git a/scheduler/env.c b/scheduler/env.c
index 881375f7..e992eb35 100644
--- a/scheduler/env.c
+++ b/scheduler/env.c
@@ -1,9 +1,9 @@
/*
- * "$Id: env.c 8712 2009-06-15 17:13:52Z mike $"
+ * "$Id: env.c 9470 2011-01-11 07:05:58Z mike $"
*
- * Environment management routines for the Common UNIX Printing System (CUPS).
+ * Environment management routines for the CUPS scheduler.
*
- * Copyright 2007 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.
*/
@@ -237,5 +248,24 @@ clear_env(void)
/*
- * End of "$Id: env.c 8712 2009-06-15 17:13:52Z mike $".
+ * 'find_env()' - Find a common environment variable.
+ */
+
+static int /* O - Index or -1 if not found */
+find_env(const char *name) /* I - Variable name */
+{
+ int i; /* Looping var */
+ size_t namelen; /* Length of name */
+
+
+ for (i = 0, namelen = strlen(name); i < num_common_env; i ++)
+ if (!strncmp(common_env[i], name, namelen) && common_env[i][namelen] == '=')
+ return (i);
+
+ return (-1);
+}
+
+
+/*
+ * End of "$Id: env.c 9470 2011-01-11 07:05:58Z mike $".
*/
diff --git a/scheduler/filter.c b/scheduler/filter.c
index 6df0483f..59a423e6 100644
--- a/scheduler/filter.c
+++ b/scheduler/filter.c
@@ -1,5 +1,5 @@
/*
- * "$Id: filter.c 7694 2008-06-26 00:23:20Z mike $"
+ * "$Id: filter.c 9706 2011-04-22 04:42:06Z mike $"
*
* File type conversion routines for the Common UNIX Printing System (CUPS).
*
@@ -121,6 +121,7 @@ mimeAddFilter(mime_t *mime, /* I - MIME database */
strlcpy(temp->filter, filter, sizeof(temp->filter));
cupsArrayAdd(mime->filters, temp);
+ cupsArrayAdd(mime->srcs, temp);
}
/*
@@ -403,5 +404,5 @@ find_filters(mime_t *mime, /* I - MIME database */
/*
- * End of "$Id: filter.c 7694 2008-06-26 00:23:20Z mike $".
+ * End of "$Id: filter.c 9706 2011-04-22 04:42:06Z mike $".
*/
diff --git a/scheduler/ipp.c b/scheduler/ipp.c
index e1600e47..fb28ecd5 100644
--- a/scheduler/ipp.c
+++ b/scheduler/ipp.c
@@ -1,9 +1,9 @@
/*
- * "$Id: ipp.c 9329 2010-10-06 20:07:44Z mike $"
+ * "$Id: ipp.c 9528 2011-02-14 23:47:29Z mike $"
*
* IPP routines for the Common UNIX Printing System (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
@@ -1958,7 +1958,7 @@ add_job(cupsd_client_t *con, /* I - Client connection */
}
else if ((attr = ippFindAttribute(job->attrs, "job-sheets",
IPP_TAG_ZERO)) != NULL)
- job->sheets = attr;
+ job->job_sheets = attr;
/*
* Fill in the response info...
@@ -3403,41 +3403,54 @@ apple_register_profiles(
* See if this is the default profile...
*/
- if (!default_profile_id)
+ if (!default_profile_id && q1_choice && q2_choice && q3_choice)
{
- if (q2_choice)
- {
- if (q3_choice)
- {
- snprintf(selector, sizeof(selector), "%s.%s.%s",
- q1_choice, q2_choice, q3_choice);
- if (!strcmp(selector, attr->spec))
- default_profile_id = profile_id;
- }
+ snprintf(selector, sizeof(selector), "%s.%s.%s", q1_choice, q2_choice,
+ q3_choice);
+ if (!strcmp(selector, attr->spec))
+ default_profile_id = profile_id;
+ }
- if (!default_profile_id)
- {
- snprintf(selector, sizeof(selector), "%s.%s.", q1_choice,
- q2_choice);
- if (!strcmp(selector, attr->spec))
- default_profile_id = profile_id;
- }
- }
+ if (!default_profile_id && q1_choice && q2_choice)
+ {
+ snprintf(selector, sizeof(selector), "%s.%s.", q1_choice, q2_choice);
+ if (!strcmp(selector, attr->spec))
+ default_profile_id = profile_id;
+ }
- if (!default_profile_id && q3_choice)
- {
- snprintf(selector, sizeof(selector), "%s..%s", q1_choice,
- q3_choice);
- if (!strcmp(selector, attr->spec))
- default_profile_id = profile_id;
- }
+ if (!default_profile_id && q1_choice && q3_choice)
+ {
+ snprintf(selector, sizeof(selector), "%s..%s", q1_choice, q3_choice);
+ if (!strcmp(selector, attr->spec))
+ default_profile_id = profile_id;
+ }
- if (!default_profile_id)
- {
- snprintf(selector, sizeof(selector), "%s..", q1_choice);
- if (!strcmp(selector, attr->spec))
- default_profile_id = profile_id;
- }
+ if (!default_profile_id && q1_choice)
+ {
+ snprintf(selector, sizeof(selector), "%s..", q1_choice);
+ if (!strcmp(selector, attr->spec))
+ default_profile_id = profile_id;
+ }
+
+ if (!default_profile_id && q2_choice && q3_choice)
+ {
+ snprintf(selector, sizeof(selector), ".%s.%s", q2_choice, q3_choice);
+ if (!strcmp(selector, attr->spec))
+ default_profile_id = profile_id;
+ }
+
+ if (!default_profile_id && q2_choice)
+ {
+ snprintf(selector, sizeof(selector), ".%s.", q2_choice);
+ if (!strcmp(selector, attr->spec))
+ default_profile_id = profile_id;
+ }
+
+ if (!default_profile_id && q3_choice)
+ {
+ snprintf(selector, sizeof(selector), "..%s", q3_choice);
+ if (!strcmp(selector, attr->spec))
+ default_profile_id = profile_id;
}
}
@@ -5001,7 +5014,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
@@ -6775,7 +6792,8 @@ get_document(cupsd_client_t *con, /* I - Client connection */
* Check policy...
*/
- if ((status = cupsdCheckPolicy(DefaultPolicyPtr, con, NULL)) != HTTP_OK)
+ if ((status = cupsdCheckPolicy(DefaultPolicyPtr, con,
+ job->username)) != HTTP_OK)
{
send_http_error(con, status, NULL);
return;
@@ -10026,8 +10044,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);
@@ -11596,5 +11615,5 @@ validate_user(cupsd_job_t *job, /* I - Job */
/*
- * End of "$Id: ipp.c 9329 2010-10-06 20:07:44Z mike $".
+ * End of "$Id: ipp.c 9528 2011-02-14 23:47:29Z mike $".
*/
diff --git a/scheduler/job.c b/scheduler/job.c
index c259772d..8db3b824 100644
--- a/scheduler/job.c
+++ b/scheduler/job.c
@@ -1,9 +1,9 @@
/*
- * "$Id: job.c 9393 2010-11-30 22:35:02Z mike $"
+ * "$Id: job.c 9716 2011-04-22 22:38:01Z mike $"
*
* 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);
@@ -1235,6 +1232,9 @@ void
cupsdDeleteJob(cupsd_job_t *job, /* I - Job */
cupsd_jobaction_t action)/* I - Action */
{
+ char filename[1024]; /* Job filename */
+
+
if (job->printer)
finalize_job(job, 1);
@@ -1244,8 +1244,6 @@ cupsdDeleteJob(cupsd_job_t *job, /* I - Job */
* Remove the job info file...
*/
- char filename[1024]; /* Job filename */
-
snprintf(filename, sizeof(filename), "%s/c%05d", RequestRoot,
job->id);
unlink(filename);
@@ -1276,7 +1274,14 @@ cupsdDeleteJob(cupsd_job_t *job, /* I - Job */
free(job->compressions);
free(job->filetypes);
- job->num_files = 0;
+ while (job->num_files > 0)
+ {
+ snprintf(filename, sizeof(filename), "%s/d%05d-%03d", RequestRoot,
+ job->id, job->num_files);
+ unlink(filename);
+
+ job->num_files --;
+ }
}
if (job->history)
@@ -2884,13 +2889,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;
}
}
}
@@ -3063,6 +3068,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)))
{
@@ -3124,25 +3130,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))
{
@@ -3174,7 +3161,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);
+ }
}
/*
@@ -3887,58 +3899,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.
*/
@@ -4464,7 +4424,7 @@ update_job(cupsd_job_t *job) /* I - Job to check */
event |= CUPSD_EVENT_PRINTER_STATE | CUPSD_EVENT_JOB_PROGRESS;
- if (loglevel < job->status_level)
+ if (loglevel <= job->status_level && job->status_level > CUPSD_LOG_ERROR)
{
/*
* Some messages show in the job-printer-state-message attribute...
@@ -4646,5 +4606,5 @@ update_job_attrs(cupsd_job_t *job, /* I - Job to update */
/*
- * End of "$Id: job.c 9393 2010-11-30 22:35:02Z mike $".
+ * End of "$Id: job.c 9716 2011-04-22 22:38:01Z mike $".
*/
diff --git a/scheduler/network.c b/scheduler/network.c
index 2e65e031..2acbe9e8 100644
--- a/scheduler/network.c
+++ b/scheduler/network.c
@@ -1,5 +1,5 @@
/*
- * "$Id: network.c 9098 2010-04-09 22:42:09Z mike $"
+ * "$Id: network.c 9445 2011-01-08 00:03:51Z mike $"
*
* Network interface functions for the CUPS scheduler.
*
@@ -154,11 +154,7 @@ cupsdNetIFUpdate(void)
* Try looking up the hostname for the address as needed...
*/
-#ifdef __APPLE__
if (HostNameLookups)
-#else
- if (HostNameLookups || RemotePort)
-#endif /* __APPLE__ */
httpAddrLookup((http_addr_t *)(addr->ifa_addr), hostname,
sizeof(hostname));
else
@@ -166,7 +162,7 @@ cupsdNetIFUpdate(void)
/*
* Map the default server address and localhost to the server name
* and localhost, respectively; for all other addresses, use the
- * dotted notation...
+ * numeric address...
*/
if (httpAddrLocalhost((http_addr_t *)(addr->ifa_addr)))
@@ -305,5 +301,5 @@ compare_netif(cupsd_netif_t *a, /* I - First network interface */
/*
- * End of "$Id: network.c 9098 2010-04-09 22:42:09Z mike $".
+ * End of "$Id: network.c 9445 2011-01-08 00:03:51Z mike $".
*/
diff --git a/scheduler/printers.c b/scheduler/printers.c
index 9774853c..bcace58d 100644
--- a/scheduler/printers.c
+++ b/scheduler/printers.c
@@ -1,9 +1,9 @@
/*
- * "$Id: printers.c 9313 2010-09-22 18:35:07Z mike $"
+ * "$Id: printers.c 9582 2011-03-04 19:28:38Z mike $"
*
* 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
@@ -49,6 +49,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.
@@ -71,11 +73,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>
@@ -94,6 +95,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);
@@ -293,13 +295,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 */
@@ -489,19 +491,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
@@ -509,7 +511,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
@@ -780,6 +782,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." :
@@ -2397,8 +2401,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);
@@ -2760,10 +2780,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"))
@@ -2816,12 +2833,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;
}
}
@@ -2853,12 +2865,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);
}
}
}
@@ -2897,9 +2904,6 @@ cupsdSetPrinterState(
* Set the new state...
*/
- if (PrintcapFormat == PRINTCAP_PLIST)
- cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP);
-
old_state = p->state;
p->state = s;
@@ -2909,7 +2913,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...
@@ -2960,12 +2964,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);
}
@@ -3986,6 +3985,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.
*/
@@ -4141,9 +4160,9 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
if (ppdFindChoice(output_mode, "draft") ||
ppdFindChoice(output_mode, "fast"))
qualities[num_qualities ++] = IPP_QUALITY_DRAFT;
- if (ppdFindChoice(output_mode, "normal") ||
- ppdFindChoice(output_mode, "good"))
- qualities[num_qualities ++] = IPP_QUALITY_NORMAL;
+
+ qualities[num_qualities ++] = IPP_QUALITY_NORMAL;
+
if (ppdFindChoice(output_mode, "best") ||
ppdFindChoice(output_mode, "high"))
qualities[num_qualities ++] = IPP_QUALITY_HIGH;
@@ -4165,8 +4184,7 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
qualities[num_qualities ++] = IPP_QUALITY_NORMAL;
qualities[num_qualities ++] = IPP_QUALITY_HIGH;
}
-
- if (num_qualities == 0)
+ else
qualities[num_qualities ++] = IPP_QUALITY_NORMAL;
ippAddIntegers(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_ENUM,
@@ -4773,7 +4791,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.
@@ -4818,8 +4847,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 ++)
{
@@ -4839,7 +4867,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,
@@ -5046,16 +5075,20 @@ load_ppd(cupsd_printer_t *p) /* I - Printer */
CGImageDestinationFinalize(destRef);
CFRelease(destRef);
}
+ }
+ if (imageRef)
CGImageRelease(imageRef);
- }
CFRelease(sourceRef);
- CFRelease(icnsFileUrl);
}
+ }
+ if (outUrl)
CFRelease(outUrl);
- }
+
+ if (icnsFileUrl)
+ CFRelease(icnsFileUrl);
}
#endif /* HAVE_APPLICATIONSERVICES_H */
@@ -5142,8 +5175,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...
@@ -5555,5 +5605,5 @@ write_xml_string(cups_file_t *fp, /* I - File to write to */
/*
- * End of "$Id: printers.c 9313 2010-09-22 18:35:07Z mike $".
+ * End of "$Id: printers.c 9582 2011-03-04 19:28:38Z mike $".
*/
diff --git a/scheduler/subscriptions.c b/scheduler/subscriptions.c
index aa2285f9..302b14dc 100644
--- a/scheduler/subscriptions.c
+++ b/scheduler/subscriptions.c
@@ -1,9 +1,9 @@
/*
- * "$Id: subscriptions.c 8481 2009-04-02 22:53:56Z mike $"
+ * "$Id: subscriptions.c 9445 2011-01-08 00:03:51Z mike $"
*
- * Subscription routines for the Common UNIX Printing System (CUPS) scheduler.
+ * Subscription routines for the CUPS scheduler.
*
- * Copyright 2007-2009 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);
@@ -1675,5 +1675,5 @@ cupsd_update_notifier(void)
/*
- * End of "$Id: subscriptions.c 8481 2009-04-02 22:53:56Z mike $".
+ * End of "$Id: subscriptions.c 9445 2011-01-08 00:03:51Z mike $".
*/
diff --git a/systemv/cupsctl.c b/systemv/cupsctl.c
index 9c8e4f8c..c41d7cc2 100644
--- a/systemv/cupsctl.c
+++ b/systemv/cupsctl.c
@@ -1,9 +1,9 @@
/*
* "$Id$"
*
- * CUPS control program for the Common UNIX Printing System (CUPS).
+ * CUPS control program for CUPS.
*
- * Copyright 2007-2008 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
@@ -143,6 +143,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 2829fbcc..a27c0147 100644
--- a/systemv/lpadmin.c
+++ b/systemv/lpadmin.c
@@ -1,9 +1,9 @@
/*
- * "$Id: lpadmin.c 9258 2010-08-13 01:34:04Z mike $"
+ * "$Id: lpadmin.c 9479 2011-01-13 00:01:48Z mike $"
*
* "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
@@ -1240,7 +1240,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(_("ERROR: Unable to create temporary file"));
ippDelete(request);
@@ -1390,5 +1390,5 @@ validate_name(const char *name) /* I - Name to check */
/*
- * End of "$Id: lpadmin.c 9258 2010-08-13 01:34:04Z mike $".
+ * End of "$Id: lpadmin.c 9479 2011-01-13 00:01:48Z mike $".
*/
diff --git a/templates/add-rss-subscription.tmpl b/templates/add-rss-subscription.tmpl
index e0727835..17e3fa0d 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 e62ea1e1..45d84de1 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 9987062d..477e0e8e 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 86b08b2f..6b92facb 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 073b0d82..0633fd6c 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 a64a2dae..61a89dc7 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 c88fe059..111397ce 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 40f01c32..74f62ad7 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 8fb7f3da..d17c86ee 100755
--- 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 c0257739..46ea17b1 100755
--- 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 f3704380..5eea4f19 100755
--- 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 8690af05..40fd124c 100755
--- 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 59f80680..3bd550b0 100755
--- 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 b81b5b22..86025a2d 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 2c7d0f27..4b1fd677 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 17e8c269..b3c68ca8 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 bec16df2..70866dfb 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 2f4f3c8c..92df0052 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 3d5ae7d7..bf8f9644 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 61dfdfe6..4391b911 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 6cb78c99..af217873 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 33fca8ab..8ee71b31 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 b729e56a..eb53dddb 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 ba33c14f..c85e45f0 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 8a4b6858..81b153a0 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 06a768ac..0089c934 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 528ef7c8..c21fc71b 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 788a8967..303b5b86 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 70203c1f..c5afeb06 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 bc8c0bc0..48978edf 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 2ee45eea..c2840764 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 58b267a9..514e2abc 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 62709b53..100d9f7a 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/option-pickone.tmpl b/templates/option-pickone.tmpl
index 5030c463..890ef4e7 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 bff17070..f11ba610 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 8d06e103..88201b92 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 6d83981d..5c015ac5 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 db40015e..598fe100 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 60c72c7d..5f2602b2 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 4c9925fb..6ff4ff2c 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 812f2db8..17e5e94f 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 d486b43e..70dd90a7 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 f2dbb5eb..49a9929a 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 52cde350..fa4ad012 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 62709b53..100d9f7a 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/run-stp-tests.sh b/test/run-stp-tests.sh
index 3054c951..b0667f5e 100755
--- a/test/run-stp-tests.sh
+++ b/test/run-stp-tests.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# "$Id: run-stp-tests.sh 9423 2011-01-06 22:21:05Z mike $"
+# "$Id: run-stp-tests.sh 9445 2011-01-08 00:03:51Z mike $"
#
# Perform the complete set of IPP compliance tests specified in the
# CUPS Software Test Plan.
@@ -463,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...
#
@@ -862,5 +865,5 @@ if test $fail != 0; then
fi
#
-# End of "$Id: run-stp-tests.sh 9423 2011-01-06 22:21:05Z mike $"
+# End of "$Id: run-stp-tests.sh 9445 2011-01-08 00:03:51Z mike $"
#
diff --git a/vc2005/cups.sln b/vc2005/cups.sln
index 00353516..cfec29e7 100644
--- a/vc2005/cups.sln
+++ b/vc2005/cups.sln
@@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual C++ Express 2005
+# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcups2", "libcups2.vcproj", "{CB4AA6F2-3E84-45BE-B505-95CD375E8BE3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testfile", "testfile.vcproj", "{CE75FC5F-E0CF-45DC-AD27-84666D3FBA30}"
@@ -14,6 +14,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testhttp", "testhttp.vcproj
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cupstestppd", "cupstestppd.vcproj", "{6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}"
ProjectSection(ProjectDependencies) = postProject
+ {CB4AA6F2-3E84-45BE-B505-95CD375E1234} = {CB4AA6F2-3E84-45BE-B505-95CD375E1234}
+ {CB4AA6F2-3E84-45BE-B505-95CD375E8BE3} = {CB4AA6F2-3E84-45BE-B505-95CD375E8BE3}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcupsimage2", "libcupsimage2.vcproj", "{CB4AA6F2-3E84-45BE-B505-95CD375E1234}"
+ ProjectSection(ProjectDependencies) = postProject
{CB4AA6F2-3E84-45BE-B505-95CD375E8BE3} = {CB4AA6F2-3E84-45BE-B505-95CD375E8BE3}
EndProjectSection
EndProject
@@ -51,10 +57,20 @@ Global
{90B0058C-8393-411F-BD3B-E2C831D4E883}.Release|x64.Build.0 = Debug|x64
{6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Debug|Win32.ActiveCfg = Debug|Win32
{6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Debug|Win32.Build.0 = Debug|Win32
- {6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Debug|x64.ActiveCfg = Debug|Win32
+ {6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Debug|x64.ActiveCfg = Debug|x64
+ {6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Debug|x64.Build.0 = Debug|x64
{6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Release|Win32.ActiveCfg = Release|Win32
{6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Release|Win32.Build.0 = Release|Win32
- {6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Release|x64.ActiveCfg = Release|Win32
+ {6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Release|x64.ActiveCfg = Release|x64
+ {6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Release|x64.Build.0 = Release|x64
+ {CB4AA6F2-3E84-45BE-B505-95CD375E1234}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CB4AA6F2-3E84-45BE-B505-95CD375E1234}.Debug|Win32.Build.0 = Debug|Win32
+ {CB4AA6F2-3E84-45BE-B505-95CD375E1234}.Debug|x64.ActiveCfg = Debug|x64
+ {CB4AA6F2-3E84-45BE-B505-95CD375E1234}.Debug|x64.Build.0 = Debug|x64
+ {CB4AA6F2-3E84-45BE-B505-95CD375E1234}.Release|Win32.ActiveCfg = Release|Win32
+ {CB4AA6F2-3E84-45BE-B505-95CD375E1234}.Release|Win32.Build.0 = Release|Win32
+ {CB4AA6F2-3E84-45BE-B505-95CD375E1234}.Release|x64.ActiveCfg = Release|x64
+ {CB4AA6F2-3E84-45BE-B505-95CD375E1234}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/vc2005/cupstestppd.vcproj b/vc2005/cupstestppd.vcproj
index 6fb4cfaf..479afcc1 100644
--- a/vc2005/cupstestppd.vcproj
+++ b/vc2005/cupstestppd.vcproj
@@ -11,6 +11,9 @@
<Platform
Name="Win32"
/>
+ <Platform
+ Name="x64"
+ />
</Platforms>
<ToolFiles>
</ToolFiles>
@@ -167,6 +170,160 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..;..\vcnet"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..;..\vcnet"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
</Configurations>
<References>
</References>
@@ -180,28 +337,12 @@
RelativePath="..\systemv\cupstestppd.c"
>
</File>
- <File
- RelativePath="..\filter\error.c"
- >
- </File>
- <File
- RelativePath="..\filter\interpret.c"
- >
- </File>
- <File
- RelativePath="..\filter\raster.c"
- >
- </File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
- <File
- RelativePath="..\cups\raster.h"
- >
- </File>
</Filter>
<Filter
Name="Resource Files"
diff --git a/vc2005/libcups2.vcproj b/vc2005/libcups2.vcproj
index b080826d..a7b06c6d 100644
--- a/vc2005/libcups2.vcproj
+++ b/vc2005/libcups2.vcproj
@@ -101,7 +101,7 @@
/>
</Configuration>
<Configuration
- Name="Release|Win32"
+ Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
@@ -122,13 +122,17 @@
/>
<Tool
Name="VCMIDLTool"
+ TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="1"
+ Optimization="0"
AdditionalIncludeDirectories="..\vcnet,.."
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS"
- RuntimeLibrary="2"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="true"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
@@ -147,15 +151,13 @@
Name="VCLinkerTool"
AdditionalDependencies="ws2_32.lib advapi32.lib"
OutputFile="$(OutDir)\libcups2.dll"
- LinkIncremental="1"
+ LinkIncremental="2"
ModuleDefinitionFile="..\cups\libcups2.def"
GenerateDebugInformation="true"
- ProgramDatabaseFile="libcups2.pdb"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\libcups2.pdb"
SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)\libcups2.lib"
- TargetMachine="1"
+ TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
@@ -180,11 +182,10 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="if not &quot;%RC_XBS%&quot; == &quot;YES&quot; goto END&#x0D;&#x0A;if not exist &quot;$(DSTROOT)\Program Files\Bonjour\$(PlatformName)&quot; mkdir &quot;$(DSTROOT)\Program Files\Bonjour\$(PlatformName)&quot;&#x0D;&#x0A;xcopy /I/Y &quot;$(TargetPath)&quot; &quot;$(DSTROOT)\Program Files\Bonjour\$(PlatformName)&quot;&#x0D;&#x0A;:END&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
- Name="Debug|x64"
+ Name="Release|Win32"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
@@ -205,17 +206,13 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="0"
+ Optimization="1"
AdditionalIncludeDirectories="..\vcnet,.."
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- BufferSecurityCheck="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS"
+ RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
@@ -234,13 +231,15 @@
Name="VCLinkerTool"
AdditionalDependencies="ws2_32.lib advapi32.lib"
OutputFile="$(OutDir)\libcups2.dll"
- LinkIncremental="2"
+ LinkIncremental="1"
ModuleDefinitionFile="..\cups\libcups2.def"
GenerateDebugInformation="true"
- ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\libcups2.pdb"
+ ProgramDatabaseFile="libcups2.pdb"
SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
ImportLibrary="$(OutDir)\libcups2.lib"
- TargetMachine="17"
+ TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
@@ -265,6 +264,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
+ CommandLine="if not &quot;%RC_XBS%&quot; == &quot;YES&quot; goto END&#x0D;&#x0A;if not exist &quot;$(DSTROOT)\Program Files\Bonjour\$(PlatformName)&quot; mkdir &quot;$(DSTROOT)\Program Files\Bonjour\$(PlatformName)&quot;&#x0D;&#x0A;xcopy /I/Y &quot;$(TargetPath)&quot; &quot;$(DSTROOT)\Program Files\Bonjour\$(PlatformName)&quot;&#x0D;&#x0A;:END&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
@@ -376,7 +376,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -384,7 +384,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -412,7 +412,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -420,7 +420,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -448,7 +448,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -456,7 +456,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -496,7 +496,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -504,7 +504,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -532,7 +532,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -540,7 +540,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -568,7 +568,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -576,7 +576,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -604,7 +604,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -612,7 +612,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -640,7 +640,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -648,7 +648,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -680,7 +680,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -688,7 +688,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -716,7 +716,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -724,7 +724,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -752,7 +752,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -760,7 +760,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -788,7 +788,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -796,7 +796,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -824,7 +824,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -832,7 +832,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -860,7 +860,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -868,7 +868,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -896,7 +896,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -904,7 +904,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -932,7 +932,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -940,7 +940,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -968,7 +968,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -976,7 +976,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1004,7 +1004,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1012,7 +1012,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1044,7 +1044,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1052,7 +1052,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1080,7 +1080,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1088,7 +1088,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1116,7 +1116,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1124,7 +1124,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1156,7 +1156,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1164,7 +1164,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1192,7 +1192,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1200,7 +1200,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1228,7 +1228,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1236,7 +1236,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1253,7 +1253,15 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\cups\pwgmedia.c"
+ RelativePath="..\cups\pwg-file.c"
+ >
+ </File>
+ <File
+ RelativePath="..\cups\pwg-media.c"
+ >
+ </File>
+ <File
+ RelativePath="..\cups\pwg-ppd.c"
>
</File>
<File
@@ -1276,7 +1284,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1284,7 +1292,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1312,7 +1320,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1320,7 +1328,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1348,7 +1356,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1356,7 +1364,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1384,7 +1392,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1392,7 +1400,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1420,7 +1428,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1428,7 +1436,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
@@ -1456,7 +1464,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
>
<Tool
Name="VCCLCompilerTool"
@@ -1464,7 +1472,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
diff --git a/vc2005/libcupsimage2.vcproj b/vc2005/libcupsimage2.vcproj
new file mode 100644
index 00000000..bb1f9efb
--- /dev/null
+++ b/vc2005/libcupsimage2.vcproj
@@ -0,0 +1,395 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="libcupsimage2"
+ ProjectGUID="{CB4AA6F2-3E84-45BE-B505-95CD375E1234}"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\vcnet,.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib"
+ OutputFile="$(OutDir)\libcupsimage2.dll"
+ LinkIncremental="2"
+ ModuleDefinitionFile="..\filter\libcupsimage2.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\libcupsimage2.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)\libcupsimage2.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\vcnet,.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib"
+ OutputFile="$(OutDir)\libcupsimage2.dll"
+ LinkIncremental="2"
+ ModuleDefinitionFile="..\filter\libcupsimage2.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\libcupsimage2.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)\libcupsimage2.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories="..\vcnet,.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib"
+ OutputFile="$(OutDir)\libcupsimage2.dll"
+ LinkIncremental="1"
+ ModuleDefinitionFile="..\filter\libcupsimage2.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="libcupsimage2.pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)\libcupsimage2.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="if not &quot;%RC_XBS%&quot; == &quot;YES&quot; goto END&#x0D;&#x0A;if not exist &quot;$(DSTROOT)\Program Files\Bonjour\$(PlatformName)&quot; mkdir &quot;$(DSTROOT)\Program Files\Bonjour\$(PlatformName)&quot;&#x0D;&#x0A;xcopy /I/Y &quot;$(TargetPath)&quot; &quot;$(DSTROOT)\Program Files\Bonjour\$(PlatformName)&quot;&#x0D;&#x0A;:END&#x0D;&#x0A;"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories="..\vcnet,.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib"
+ OutputFile="$(OutDir)\libcupsimage2.dll"
+ LinkIncremental="1"
+ ModuleDefinitionFile="..\filter\libcupsimage2.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="libcupsimage2.pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)\libcupsimage2.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="if not &quot;%RC_XBS%&quot; == &quot;YES&quot; goto END&#x0D;&#x0A;if not exist &quot;$(DSTROOT)\Program Files\Bonjour\$(PlatformName)&quot; mkdir &quot;$(DSTROOT)\Program Files\Bonjour\$(PlatformName)&quot;&#x0D;&#x0A;xcopy /I/Y &quot;$(TargetPath)&quot; &quot;$(DSTROOT)\Program Files\Bonjour\$(PlatformName)&quot;&#x0D;&#x0A;:END&#x0D;&#x0A;"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D7521234}"
+ >
+ <File
+ RelativePath="..\filter\error.c"
+ >
+ </File>
+ <File
+ RelativePath="..\filter\interpret.c"
+ >
+ </File>
+ <File
+ RelativePath="..\filter\raster.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE521234}"
+ >
+ <File
+ RelativePath="..\cups\raster.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121A1234}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/vcnet/config.h b/vcnet/config.h
index 018e8ef2..d089e738 100644
--- a/vcnet/config.h
+++ b/vcnet/config.h
@@ -1,9 +1,9 @@
/*
- * "$Id: config.h 9233 2010-08-10 06:15:55Z mike $"
+ * "$Id: config.h 9544 2011-02-18 04:28:50Z mike $"
*
* 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
@@ -83,8 +83,8 @@
* Version of software...
*/
-#define CUPS_SVERSION "CUPS v1.4.4"
-#define CUPS_MINIMAL "CUPS/1.4.4"
+#define CUPS_SVERSION "CUPS v1.4.7"
+#define CUPS_MINIMAL "CUPS/1.4.7"
/*
@@ -701,5 +701,5 @@
#endif /* !_CUPS_CONFIG_H_ */
/*
- * End of "$Id: config.h 9233 2010-08-10 06:15:55Z mike $".
+ * End of "$Id: config.h 9544 2011-02-18 04:28:50Z mike $".
*/
diff --git a/vcnet/cups.sln b/vcnet/cups.sln
index ccf6cbf6..96c46af1 100644
--- a/vcnet/cups.sln
+++ b/vcnet/cups.sln
@@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual C++ Express 2008
+# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcups2", "libcups2.vcproj", "{CB4AA6F2-3E84-45BE-B505-95CD375E8BE3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testfile", "testfile.vcproj", "{CE75FC5F-E0CF-45DC-AD27-84666D3FBA30}"
@@ -14,6 +14,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testhttp", "testhttp.vcproj
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cupstestppd", "cupstestppd.vcproj", "{6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}"
ProjectSection(ProjectDependencies) = postProject
+ {CB4AA6F2-3E84-45BE-B505-95CD375E1234} = {CB4AA6F2-3E84-45BE-B505-95CD375E1234}
+ {CB4AA6F2-3E84-45BE-B505-95CD375E8BE3} = {CB4AA6F2-3E84-45BE-B505-95CD375E8BE3}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcupsimage2", "libcupsimage2.vcproj", "{CB4AA6F2-3E84-45BE-B505-95CD375E1234}"
+ ProjectSection(ProjectDependencies) = postProject
{CB4AA6F2-3E84-45BE-B505-95CD375E8BE3} = {CB4AA6F2-3E84-45BE-B505-95CD375E8BE3}
EndProjectSection
EndProject
@@ -51,10 +57,20 @@ Global
{90B0058C-8393-411F-BD3B-E2C831D4E883}.Release|x64.Build.0 = Debug|x64
{6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Debug|Win32.ActiveCfg = Debug|Win32
{6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Debug|Win32.Build.0 = Debug|Win32
- {6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Debug|x64.ActiveCfg = Debug|Win32
+ {6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Debug|x64.ActiveCfg = Debug|x64
+ {6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Debug|x64.Build.0 = Debug|x64
{6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Release|Win32.ActiveCfg = Release|Win32
{6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Release|Win32.Build.0 = Release|Win32
- {6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Release|x64.ActiveCfg = Release|Win32
+ {6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Release|x64.ActiveCfg = Release|x64
+ {6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}.Release|x64.Build.0 = Release|x64
+ {CB4AA6F2-3E84-45BE-B505-95CD375E1234}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CB4AA6F2-3E84-45BE-B505-95CD375E1234}.Debug|Win32.Build.0 = Debug|Win32
+ {CB4AA6F2-3E84-45BE-B505-95CD375E1234}.Debug|x64.ActiveCfg = Debug|x64
+ {CB4AA6F2-3E84-45BE-B505-95CD375E1234}.Debug|x64.Build.0 = Debug|x64
+ {CB4AA6F2-3E84-45BE-B505-95CD375E1234}.Release|Win32.ActiveCfg = Release|Win32
+ {CB4AA6F2-3E84-45BE-B505-95CD375E1234}.Release|Win32.Build.0 = Release|Win32
+ {CB4AA6F2-3E84-45BE-B505-95CD375E1234}.Release|x64.ActiveCfg = Release|x64
+ {CB4AA6F2-3E84-45BE-B505-95CD375E1234}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/vcnet/cupstestppd.vcproj b/vcnet/cupstestppd.vcproj
index 2dd8c914..8c341696 100644
--- a/vcnet/cupstestppd.vcproj
+++ b/vcnet/cupstestppd.vcproj
@@ -12,6 +12,9 @@
<Platform
Name="Win32"
/>
+ <Platform
+ Name="x64"
+ />
</Platforms>
<ToolFiles>
</ToolFiles>
@@ -166,6 +169,158 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..;..\vcnet"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="..;..\vcnet"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
</Configurations>
<References>
</References>
@@ -179,28 +334,12 @@
RelativePath="..\systemv\cupstestppd.c"
>
</File>
- <File
- RelativePath="..\filter\error.c"
- >
- </File>
- <File
- RelativePath="..\filter\interpret.c"
- >
- </File>
- <File
- RelativePath="..\filter\raster.c"
- >
- </File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
- <File
- RelativePath="..\cups\raster.h"
- >
- </File>
</Filter>
<Filter
Name="Resource Files"
diff --git a/vcnet/libcups2.vcproj b/vcnet/libcups2.vcproj
index 6e369eea..d70c235e 100644
--- a/vcnet/libcups2.vcproj
+++ b/vcnet/libcups2.vcproj
@@ -152,7 +152,7 @@
AdditionalDependencies="ws2_32.lib advapi32.lib"
OutputFile="$(OutDir)\libcups2.dll"
LinkIncremental="2"
- ModuleDefinitionFile="..\vc2005\libcups2.def"
+ ModuleDefinitionFile="..\cups\libcups2.def"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\libcups2.pdb"
SubSystem="2"
@@ -312,7 +312,7 @@
AdditionalDependencies="ws2_32.lib advapi32.lib"
OutputFile="$(OutDir)\libcups2.dll"
LinkIncremental="1"
- ModuleDefinitionFile="..\vc2005\libcups2.def"
+ ModuleDefinitionFile="..\cups\libcups2.def"
GenerateDebugInformation="true"
ProgramDatabaseFile="libcups2.pdb"
SubSystem="2"
@@ -1500,6 +1500,10 @@
>
</File>
<File
+ RelativePath=".\config.h"
+ >
+ </File>
+ <File
RelativePath="..\cups\cups.h"
>
</File>
diff --git a/vcnet/libcupsimage2.vcproj b/vcnet/libcupsimage2.vcproj
new file mode 100644
index 00000000..23f3f5b9
--- /dev/null
+++ b/vcnet/libcupsimage2.vcproj
@@ -0,0 +1,388 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="libcupsimage2"
+ ProjectGUID="{CB4AA6F2-3E84-45BE-B505-95CD375E1234}"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\vcnet,.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib"
+ OutputFile="$(OutDir)\libcupsimage2.dll"
+ LinkIncremental="2"
+ ModuleDefinitionFile="..\filter\libcupsimage2.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\libcupsimage2.pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(OutDir)\libcupsimage2.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\vcnet,.."
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib"
+ OutputFile="$(OutDir)\libcupsimage2.dll"
+ LinkIncremental="2"
+ ModuleDefinitionFile="..\filter\libcupsimage2.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(PlatformName)\$(ConfigurationName)\libcupsimage2.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)\libcupsimage2.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories="..\vcnet,.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib"
+ OutputFile="$(OutDir)\libcupsimage2.dll"
+ LinkIncremental="1"
+ ModuleDefinitionFile="..\filter\libcupsimage2.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="libcupsimage2.pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(OutDir)\libcupsimage2.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories="..\vcnet,.."
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="ws2_32.lib"
+ OutputFile="$(OutDir)\libcupsimage2.dll"
+ LinkIncremental="1"
+ ModuleDefinitionFile="..\filter\libcupsimage2.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="libcupsimage2.pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="$(OutDir)\libcupsimage2.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine="if not &quot;%RC_XBS%&quot; == &quot;YES&quot; goto END&#x0D;&#x0A;if not exist &quot;$(DSTROOT)\Program Files\Bonjour\$(PlatformName)&quot; mkdir &quot;$(DSTROOT)\Program Files\Bonjour\$(PlatformName)&quot;&#x0D;&#x0A;xcopy /I/Y &quot;$(TargetPath)&quot; &quot;$(DSTROOT)\Program Files\Bonjour\$(PlatformName)&quot;&#x0D;&#x0A;:END&#x0D;&#x0A;"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D7521234}"
+ >
+ <File
+ RelativePath="..\filter\error.c"
+ >
+ </File>
+ <File
+ RelativePath="..\filter\interpret.c"
+ >
+ </File>
+ <File
+ RelativePath="..\filter\raster.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE521234}"
+ >
+ <File
+ RelativePath="..\cups\raster.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121A1234}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>