]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - ppdc/ppdc-option.cxx
Import experimental work-in-progress HTTP/2 branch
[thirdparty/cups.git] / ppdc / ppdc-option.cxx
index 5a33a4eb348ddc0ad25661534109f6755e07b55b..3fdc296addca2953ee6d593d343c85682d242207 100644 (file)
@@ -1,9 +1,9 @@
 //
-// "$Id$"
+// "$Id: ppdc-option.cxx 3275 2011-05-20 07:26:13Z msweet $"
 //
 //   Option class for the CUPS PPD Compiler.
 //
-//   Copyright 2007-2008 by Apple Inc.
+//   Copyright 2007-2011 by Apple Inc.
 //   Copyright 2002-2005 by Easy Software Products.
 //
 //   These coded instructions, statements, and computer programs are the
@@ -14,7 +14,6 @@
 //
 // Contents:
 //
-//   ppdcOption::ppdcOption()    - Create a new option.
 //   ppdcOption::ppdcOption()    - Copy a new option.
 //   ppdcOption::~ppdcOption()   - Destroy an option.
 //   ppdcOption::find_choice()   - Find an option choice.
@@ -25,7 +24,7 @@
 // Include necessary headers...
 //
 
-#include "ppdc.h"
+#include "ppdc-private.h"
 
 
 //
@@ -37,9 +36,9 @@ ppdcOption::ppdcOption(ppdcOptType    ot,     // I - Option type
                       const char     *t,       // I - Option text
                       ppdcOptSection s,        // I - Section
                        float          o)       // I - Ordering number
+  : ppdcShared()
 {
-//  printf("ppdcOption(ot=%d, n=\"%s\", t=\"%s\"), this=%p\n",
-//         ot, n, t, this);
+  PPDC_NEW;
 
   type      = ot;
   name      = new ppdcString(n);
@@ -57,6 +56,8 @@ ppdcOption::ppdcOption(ppdcOptType    ot,     // I - Option type
 
 ppdcOption::ppdcOption(ppdcOption *o)          // I - Template option
 {
+  PPDC_NEW;
+
   o->name->retain();
   o->text->retain();
   if (o->defchoice)
@@ -78,6 +79,8 @@ ppdcOption::ppdcOption(ppdcOption *o)         // I - Template option
 
 ppdcOption::~ppdcOption()
 {
+  PPDC_DELETE;
+
   name->release();
   text->release();
   if (defchoice)
@@ -97,7 +100,7 @@ ppdcOption::find_choice(const char *n)               // I - Name of choice
 
 
   for (c = (ppdcChoice *)choices->first(); c; c = (ppdcChoice *)choices->next())
-    if (!strcasecmp(n, c->name->value))
+    if (!_cups_strcasecmp(n, c->name->value))
       return (c);
 
   return (0);
@@ -122,5 +125,5 @@ ppdcOption::set_defchoice(ppdcChoice *c)    // I - Choice
 
 
 //
-// End of "$Id$".
+// End of "$Id: ppdc-option.cxx 3275 2011-05-20 07:26:13Z msweet $".
 //