]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Mapping of PPD keywords to IPP keywords did not work if the PPD keyword was
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 28 Jan 2015 16:21:40 +0000 (16:21 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 28 Jan 2015 16:21:40 +0000 (16:21 +0000)
already an IPP keyword (<rdar://problem/19121005>)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12432 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES-2.0.txt
cups/ppd-cache.c

index d3930abe6fee17705a4dc9c15ada09643889267f..5ff4ac0291bab075a0b654849b6248be94be7fbd 100644 (file)
@@ -22,6 +22,8 @@ CHANGES IN CUPS V2.0.2
        - The --without-xinetd configure option did not work (STR #4542)
        - Backends needing to load OS X kernel extensions did not work
          (<rdar://problem/19015679>)
+       - Mapping of PPD keywords to IPP keywords did not work if the PPD
+         keyword was already an IPP keyword (<rdar://problem/19121005>)
 
 
 CHANGES IN CUPS V2.0.1
index 510bb5f9f5dbafaa69765bdde8bc4dfa44ccd6e0..ddccfb93febba1c4bb0f2784a8e6e2fc97a33cf2 100644 (file)
@@ -3,7 +3,7 @@
  *
  * PPD cache implementation for CUPS.
  *
- * Copyright 2010-2014 by Apple Inc.
+ * Copyright 2010-2015 by Apple Inc.
  *
  * These coded instructions, statements, and computer programs are the
  * property of Apple Inc. and are protected by Federal copyright
@@ -2691,6 +2691,25 @@ pwg_unppdize_name(const char *ppd,       /* I - PPD keyword */
        *end;                           /* End of name buffer */
 
 
+  if (_cups_islower(*ppd))
+  {
+   /*
+    * Already lowercase name, use as-is?
+    */
+
+    const char *ppdptr;                        /* Pointer into PPD keyword */
+
+    for (ppdptr = ppd + 1; *ppdptr; ppdptr ++)
+      if (_cups_isupper(*ppdptr) || strchr(dashchars, *ppdptr))
+        break;
+
+    if (!*ppdptr)
+    {
+      strlcpy(name, ppd, namesize);
+      return;
+    }
+  }
+
   for (ptr = name, end = name + namesize - 1; *ppd && ptr < end; ppd ++)
   {
     if (_cups_isalnum(*ppd) || *ppd == '-')