summaryrefslogtreecommitdiff
path: root/scheduler/cups-driverd.cxx
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2011-03-14 18:45:10 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2011-03-14 18:45:10 +0000
commitf14324a7920bee90b63469ce754e8040933f38e1 (patch)
tree0077407e46ff904efd4601b99932c9abfd894030 /scheduler/cups-driverd.cxx
parentc8fef167ba1e9d5d87fc77e4e99ca12ba9384cbb (diff)
downloadcups-f14324a7920bee90b63469ce754e8040933f38e1.tar.gz
Merge changes from CUPS 1.5svn-r9602.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@3046 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'scheduler/cups-driverd.cxx')
-rw-r--r--scheduler/cups-driverd.cxx27
1 files changed, 23 insertions, 4 deletions
diff --git a/scheduler/cups-driverd.cxx b/scheduler/cups-driverd.cxx
index 4b9d87855..5ddf5b3cf 100644
--- a/scheduler/cups-driverd.cxx
+++ b/scheduler/cups-driverd.cxx
@@ -1,13 +1,13 @@
/*
* "$Id$"
*
- * PPD/driver support for the Common UNIX Printing System (CUPS).
+ * PPD/driver support for CUPS.
*
* This program handles listing and installing static PPD files, PPD files
* created from driver information files, and dynamically generated PPD files
* using driver helper programs.
*
- * 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
@@ -2391,15 +2391,34 @@ regex_device_id(const char *device_id) /* I - IEEE-1284 device ID */
*ptr++ = '(';
- while (*device_id && *device_id != ';' && ptr < (res + sizeof(res) - 4))
+ while (*device_id && *device_id != ';' && ptr < (res + sizeof(res) - 8))
{
if (strchr("[]{}().*\\|", *device_id))
*ptr++ = '\\';
- *ptr++ = *device_id++;
+ if (*device_id == ':')
+ {
+ /*
+ * KEY:.*value
+ */
+
+ *ptr++ = *device_id++;
+ *ptr++ = '.';
+ *ptr++ = '*';
+ }
+ else
+ *ptr++ = *device_id++;
}
if (*device_id == ';' || !*device_id)
+ {
+ /*
+ * KEY:.*value.*;
+ */
+
+ *ptr++ = '.';
+ *ptr++ = '*';
*ptr++ = ';';
+ }
*ptr++ = ')';
if (cmd)
*ptr++ = '?';