]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/ppd-conflicts.c
Merge pull request #5677 from reddevillg/patch-2
[thirdparty/cups.git] / cups / ppd-conflicts.c
index 26e104e9201f2e326cf179b8a89641720486fe24..ffbacadca1f06ebac89d7cce825c041c9a8943bf 100644 (file)
@@ -1,18 +1,13 @@
 /*
  * Option conflict management routines for CUPS.
  *
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2018 by Apple Inc.
  * Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
- * 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/".
+ * Licensed under Apache License v2.0.  See the file "LICENSE" for more
+ * information.
  *
  * PostScript is a trademark of Adobe Systems, Inc.
- *
- * This file is subject to the Apple OS-Developed Software exception.
  */
 
 /*
@@ -21,6 +16,7 @@
 
 #include "cups-private.h"
 #include "ppd-private.h"
+#include "debug-internal.h"
 
 
 /*
@@ -29,7 +25,6 @@
 
 enum
 {
-  _PPD_NORMAL_CONSTRAINTS,
   _PPD_OPTION_CONSTRAINTS,
   _PPD_INSTALLABLE_CONSTRAINTS,
   _PPD_ALL_CONSTRAINTS
@@ -63,7 +58,7 @@ static cups_array_t   *ppd_test_constraints(ppd_file_t *ppd,
  * the conflicting options.  The returned option array must be freed using
  * @link cupsFreeOptions@.
  *
- * @since CUPS 1.4/OS X 10.6@
+ * @since CUPS 1.4/macOS 10.6@
  */
 
 int                                    /* O - Number of conflicting options */
@@ -162,7 +157,7 @@ cupsGetConflicts(
  * choice for the conflicting option, then iterating over all possible choices
  * until a non-conflicting option choice is found.
  *
- * @since CUPS 1.4/OS X 10.6@
+ * @since CUPS 1.4/macOS 10.6@
  */
 
 int                                    /* O  - 1 on success, 0 on failure */
@@ -634,7 +629,7 @@ ppdConflicts(ppd_file_t *ppd)               /* I - PPD to check */
  * This function tests whether a particular option choice is available based
  * on constraints against options in the "InstallableOptions" group.
  *
- * @since CUPS 1.4/OS X 10.6@
+ * @since CUPS 1.4/macOS 10.6@
  */
 
 int                                    /* O - 1 if conflicting, 0 if not conflicting */
@@ -998,7 +993,7 @@ ppd_test_constraints(
     if (!consts->installable && which == _PPD_INSTALLABLE_CONSTRAINTS)
       continue;                                /* Skip non-installable option constraint */
 
-    if (which == _PPD_OPTION_CONSTRAINTS && option)
+    if ((which == _PPD_OPTION_CONSTRAINTS || which == _PPD_INSTALLABLE_CONSTRAINTS) && option)
     {
      /*
       * Skip constraints that do not involve the current option...