]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/testconflicts.c
Stop accepting attributes in collections (Issue #5630)
[thirdparty/cups.git] / cups / testconflicts.c
index 0d7531bdbb8e82038a615a66a560d7bc0804130e..6ea70fa33a6796fc4b931b95a5b4d62acbcaea6e 100644 (file)
@@ -1,21 +1,9 @@
 /*
- * "$Id$"
+ * PPD constraint test program for CUPS.
  *
- *   PPD constraint test program for the Common UNIX Printing System (CUPS).
+ * Copyright 2008-2012 by Apple Inc.
  *
- *   Copyright 2008-2009 by Apple Inc.
- *
- *   These coded instructions, statements, and computer programs are the
- *   property of Apple Inc. and are protected by Federal copyright
- *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
- *   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/".
- *
- *   This file is subject to the Apple OS-Developed Software exception.
- *
- * Contents:
- *
- *   main() - Main entry.
+ * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
  */
 
 /*
@@ -23,7 +11,8 @@
  */
 
 #include "cups.h"
-#include "string.h"
+#include "ppd.h"
+#include "string-private.h"
 
 
 /*
@@ -80,7 +69,7 @@ main(int  argc,                               /* I - Number of command-line arguments */
     {
       fputs("Resolved conflicts with the following options:\n   ", stdout);
       for (i = 0; i < num_options; i ++)
-        if (!option || strcasecmp(option, options[i].name))
+        if (!option || _cups_strcasecmp(option, options[i].name))
          printf(" %s=%s", options[i].name, options[i].value);
       putchar('\n');
 
@@ -90,7 +79,13 @@ main(int  argc,                              /* I - Number of command-line arguments */
     if (option)
     {
       free(option);
+      option = NULL;
+    }
+
+    if (choice)
+    {
       free(choice);
+      choice = NULL;
     }
 
     printf("\nNew Option(s): ");
@@ -117,10 +112,10 @@ main(int  argc,                           /* I - Number of command-line arguments */
     cupsFreeOptions(num_options, options);
   }
 
+  if (option)
+    free(option);
+  if (choice)
+    free(choice);
+
   return (0);
 }
-
-
-/*
- * End of "$Id$".
- */