]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Mirror 1.1.x changes.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 21 Mar 2003 18:07:34 +0000 (18:07 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 21 Mar 2003 18:07:34 +0000 (18:07 +0000)
Add missing source file.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.2@3513 7a7537e8-13f0-0310-91df-b6672ffda945

cups/options.c
cups/testipp.c

index d212e61e927cb5255ad7ee3562df683a464c8308..ebf3807f1e385f5abdc6343503348d9902863762 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: options.c,v 1.21.2.8 2003/01/07 18:26:28 mike Exp $"
+ * "$Id: options.c,v 1.21.2.9 2003/03/21 18:07:34 mike Exp $"
  *
  *   Option routines for the Common UNIX Printing System (CUPS).
  *
@@ -242,7 +242,12 @@ cupsParseOptions(const char    *arg,               /* I - Argument to parse */
       value = ptr;
 
       while (*ptr != '\'' && *ptr != '\0')
+      {
+        if (*ptr == '\\')
+         strcpy(ptr, ptr + 1);
+
         ptr ++;
+      }
 
       if (*ptr != '\0')
         *ptr++ = '\0';
@@ -257,7 +262,42 @@ cupsParseOptions(const char    *arg,               /* I - Argument to parse */
       value = ptr;
 
       while (*ptr != '\"' && *ptr != '\0')
+      {
+        if (*ptr == '\\')
+         strcpy(ptr, ptr + 1);
+
         ptr ++;
+      }
+
+      if (*ptr != '\0')
+        *ptr++ = '\0';
+    }
+    else if (*ptr == '{')
+    {
+     /*
+      * Collection value...
+      */
+
+      int depth;
+
+      value = ptr;
+
+      for (depth = 1; *ptr; ptr ++)
+        if (*ptr == '{')
+         depth ++;
+       else if (*ptr == '}')
+       {
+         depth --;
+         if (!depth)
+         {
+           ptr ++;
+
+           if (*ptr != ',')
+             break;
+         }
+        }
+        else if (*ptr == '\\')
+         strcpy(ptr, ptr + 1);
 
       if (*ptr != '\0')
         *ptr++ = '\0';
@@ -271,7 +311,12 @@ cupsParseOptions(const char    *arg,               /* I - Argument to parse */
       value = ptr;
 
       while (!isspace(*ptr) && *ptr != '\0')
-       ptr ++;
+      {
+        if (*ptr == '\\')
+         strcpy(ptr, ptr + 1);
+
+        ptr ++;
+      }
     }
 
    /*
@@ -450,5 +495,5 @@ cupsMarkOptions(ppd_file_t    *ppd,         /* I - PPD file */
 
 
 /*
- * End of "$Id: options.c,v 1.21.2.8 2003/01/07 18:26:28 mike Exp $".
+ * End of "$Id: options.c,v 1.21.2.9 2003/03/21 18:07:34 mike Exp $".
  */
index a99e29f541c807ea1e2d67c8c17f39fc4c9dc2d2..3fe5780f6e29fed54af9690bc88662895faf156f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: testipp.c,v 1.1 2003/03/20 02:45:22 mike Exp $"
+ * "$Id: testipp.c,v 1.1.2.1 2003/03/21 18:07:34 mike Exp $"
  *
  *   IPP test program for the Common UNIX Printing System (CUPS).
  *
@@ -212,5 +212,5 @@ write_cb(void        *data,
 
 
 /*
- * End of "$Id: testipp.c,v 1.1 2003/03/20 02:45:22 mike Exp $".
+ * End of "$Id: testipp.c,v 1.1.2.1 2003/03/21 18:07:34 mike Exp $".
  */