Code

Connector tool: make connectors avoid the convex hull of shapes.
[inkscape.git] / src / dom / xpathparser.h
index ce565622807996d4e48f7033ea09520e2ef1402b..1ad4b5f549025d0b459b68bb7181467632cab5e5 100644 (file)
@@ -13,7 +13,7 @@
  * Authors:
  *   Bob Jamison
  *
- * Copyright (C) 2005 Bob Jamison
+ * Copyright (C) 2005-2007 Bob Jamison
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -63,7 +63,7 @@ typedef dom::NodeList  NodeList;
 typedef struct
 {
    int   ival;
-   char *sval;
+   char const *sval;
 } LookupEntry;
 
 
@@ -260,8 +260,8 @@ public:
         {
         if (type == OPERATOR)
             {
-            char *tokenStr = "unknown";
-            for (LookupEntry *entry = operatorTable; entry->sval ; entry++)
+            char const *tokenStr = "unknown";
+            for (LookupEntry const *entry = operatorTable; entry->sval ; entry++)
                 {
                 if (entry->ival == ival)
                     {
@@ -273,7 +273,7 @@ public:
             }
         else if (type == NODE_TYPE)
             {
-            char *tokenStr = "unknown";
+            char const *tokenStr = "unknown";
             for (LookupEntry *entry = nodeTypeTable; entry->sval ; entry++)
                 {
                 if (entry->ival == ival)
@@ -286,7 +286,7 @@ public:
             }
         else if (type == AXIS_NAME)
             {
-            char *tokenStr = "unknown";
+            char const *tokenStr = "unknown";
             for (LookupEntry *entry = axisNameTable; entry->sval ; entry++)
                 {
                 if (entry->ival == ival)
@@ -309,7 +309,7 @@ public:
             printf("#%f\n", dval);
         else
             {
-            char *tokenStr = "unknown";
+            char const *tokenStr = "unknown";
             for (LookupEntry *entry = exprTokenTable; entry->sval ; entry++)
                 {
                 if (entry->ival == type)
@@ -371,13 +371,13 @@ public:
      */
     XPathParser()
         {
-        debug = false;
+            debug = false;
         }
 
     /**
      *
      */
-    ~XPathParser() {}
+    virtual ~XPathParser() {}
 
     /**
      *
@@ -415,7 +415,11 @@ private:
     /**
      *
      */
-    void trace(const char *fmt, ...);
+    void trace(const char *fmt, ...)
+    #ifdef G_GNUC_PRINTF
+    G_GNUC_PRINTF(2, 3)
+    #endif
+    ;
 
     /**
      *
@@ -425,7 +429,11 @@ private:
     /**
      *
      */
-    void error(const char *fmt, ...);
+    void error(const char *fmt, ...)
+    #ifdef G_GNUC_PRINTF
+    G_GNUC_PRINTF(2, 3)
+    #endif
+    ;
 
     //#################################
     //# LEXICAL  SCANNING