Closed michaelrsweet closed 13 years ago
CUPS.org User: mike
This is a feature request until there is actually a PPD that is affected by this.
PPD files generally only include those 1284 keys that are needed for device selection. Increasing the size means bumping the storage format and forcing a regeneration of the PPD cache for potentially thousands of files, so this isn't something we are going to do in a patch release unless absolutely necessary.
CUPS.org User: twaugh.redhat
Are you sure it means changing the storage format? As I mentioned, load_ppds() already uses a limit of 256 characters, and that seems to be the storage format limit.
CUPS.org User: mike
OK, agreed - I looked at the code again and the (deprecated) driver interface program path is the only place we limit device IDs to 127 characters. Moving back to a P2 bug for CUPS 1.5...
CUPS.org User: mike
Fixed in Subversion repository.
"str3871.patch":
--- scheduler/cups-driverd.cxx (revision 9862) +++ scheduler/cups-driverd.cxx (working copy) @@ -1525,7 +1525,7 @@ name[512], /* ppd-name / make[128], / ppd-make _/ make_andmodel[128], / ppd-make-and-model */
device_id[256], /* ppd-device-id */
languages[128], /* ppd-natural-language */
product[128], /* ppd-product */
psversion[128], /* ppd-psversion */
@@ -1656,7 +1656,7 @@ strcpy(type_str, "postscript");
if (sscanf(line, "\"%511[^\"]\"%127s%*[ \t]\"%127[^\"]\""
Version: 1.5-current CUPS.org User: twaugh.redhat
Device IDs reported by PPD files are truncated to 128 characters (in load_drivers()), which is very restrictive. Consider this real world example for instance:
MFG:Hewlett-Packard;MDL:HP LaserJet 2100 Series;CMD:PJL,MLC,PCL,PCLXL,POSTSCRIPT;DES:Hewlett-Packard LaserJet 2100 Series;
This is already 122 characters. Imagine if the CLASS field had been included, as suggested in IEEE 1284:
CLS:PRINTER;MFG:Hewlett-Packard;MDL:HP LaserJet 2100 Series;CMD:PJL,MLC,PCL,PCLXL,POSTSCRIPT;DES:Hewlett-Packard LaserJet 2100 Series;
This would be 135 characters, so 8 of them would be lost (7 over-length, plus another to make room for a terminating nul). As the fields can be listed in any order, this information could be vital for matching devices to drivers.
Please increase this limit to something more reasonable, such as 256 -- which is what is used in load_ppds().