cleanup TODO into XSLT_TODO Daniel
authorDaniel Veillard <veillard@src.gnome.org>
Wed, 17 Oct 2001 19:21:57 +0000 (19:21 +0000)
committerDaniel Veillard <veillard@src.gnome.org>
Wed, 17 Oct 2001 19:21:57 +0000 (19:21 +0000)
* libxslt/attributes.c libxslt/extensions.c libxslt/preproc.c
  libxslt/transform.c libxslt/xsltutils.h: cleanup TODO into
  XSLT_TODO
Daniel

ChangeLog
libxslt/attributes.c
libxslt/extensions.c
libxslt/preproc.c
libxslt/transform.c
libxslt/xsltutils.h

index 78caa6b..5521b70 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Oct 17 21:20:55 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+       * libxslt/attributes.c libxslt/extensions.c libxslt/preproc.c
+         libxslt/transform.c libxslt/xsltutils.h: cleanup TODO into
+         XSLT_TODO
+
 Wed Oct 17 02:46:55 CEST 2001 Thomas Broyer <tbroyer@ltgt.net>
 
        * libxslt/numbers.c: reworked internal representation of
index 249efa1..3453a5f 100644 (file)
@@ -245,7 +245,7 @@ xsltParseStylesheetAttributeSet(xsltStylesheetPtr style, xmlNodePtr cur) {
     xmlChar *ncname = NULL;
     xmlChar *prefix = NULL;
     xmlChar *attributes;
-    xmlChar *attribute, *end;
+    xmlChar *attrib, *endattr;
     xmlNodePtr list;
     xsltAttrElemPtr values;
 
@@ -313,39 +313,39 @@ xsltParseStylesheetAttributeSet(xsltStylesheetPtr style, xmlNodePtr cur) {
        goto done;
     }
 
-    attribute = attributes;
-    while (*attribute != 0) {
-       while (IS_BLANK(*attribute)) attribute++;
-       if (*attribute == 0)
+    attrib = attributes;
+    while (*attrib != 0) {
+       while (IS_BLANK(*attrib)) attrib++;
+       if (*attrib == 0)
            break;
-        end = attribute;
-       while ((*end != 0) && (!IS_BLANK(*end))) end++;
-       attribute = xmlStrndup(attribute, end - attribute);
-       if (attribute) {
+        endattr = attrib;
+       while ((*endattr != 0) && (!IS_BLANK(*endattr))) endattr++;
+       attrib = xmlStrndup(attrib, endattr - attrib);
+       if (attrib) {
            xmlChar *ncname2 = NULL;
            xmlChar *prefix2 = NULL;
            xsltAttrElemPtr values2;
 #ifdef WITH_XSLT_DEBUG_ATTRIBUTES
            xsltGenericDebug(xsltGenericDebugContext,
-               "xsl:attribute-set : %s adds use %s\n", ncname, attribute);
+               "xsl:attribute-set : %s adds use %s\n", ncname, attrib);
 #endif
-           ncname2 = xmlSplitQName2(attribute, &prefix2);
+           ncname2 = xmlSplitQName2(attrib, &prefix2);
            if (ncname2 == NULL) {
-               ncname2 = attribute;
-               attribute = NULL;
+               ncname2 = attrib;
+               attrib = NULL;
                prefix = NULL;
            }
            values2 = xmlHashLookup2(style->attributeSets, ncname2, prefix2);
            values = xsltMergeAttrElemList(values, values2);
 
-           if (attribute != NULL)
-               xmlFree(attribute);
+           if (attrib != NULL)
+               xmlFree(attrib);
            if (ncname2 != NULL)
                xmlFree(ncname2);
            if (prefix2 != NULL)
                xmlFree(prefix2);
        }
-       attribute = end;
+       attrib = endattr;
     }
     xmlFree(attributes);
 
@@ -522,7 +522,7 @@ xsltApplyAttributeSet(xsltTransformContextPtr ctxt, xmlNodePtr node,
                      xmlNodePtr inst ATTRIBUTE_UNUSED, xmlChar *attributes) {
     xmlChar *ncname = NULL;
     xmlChar *prefix = NULL;
-    xmlChar *attribute, *end;
+    xmlChar *attrib, *endattr;
     xsltAttrElemPtr values;
     xsltStylesheetPtr style;
 
@@ -530,23 +530,23 @@ xsltApplyAttributeSet(xsltTransformContextPtr ctxt, xmlNodePtr node,
        return;
     }
 
-    attribute = attributes;
-    while (*attribute != 0) {
-       while (IS_BLANK(*attribute)) attribute++;
-       if (*attribute == 0)
+    attrib = attributes;
+    while (*attrib != 0) {
+       while (IS_BLANK(*attrib)) attrib++;
+       if (*attrib == 0)
            break;
-        end = attribute;
-       while ((*end != 0) && (!IS_BLANK(*end))) end++;
-       attribute = xmlStrndup(attribute, end - attribute);
-       if (attribute) {
+        endattr = attrib;
+       while ((*endattr != 0) && (!IS_BLANK(*endattr))) endattr++;
+       attrib = xmlStrndup(attrib, endattr - attrib);
+       if (attrib) {
 #ifdef WITH_XSLT_DEBUG_ATTRIBUTES
            xsltGenericDebug(xsltGenericDebugContext,
-               "apply attribute set %s\n", attribute);
+               "apply attribute set %s\n", attrib);
 #endif
-           ncname = xmlSplitQName2(attribute, &prefix);
+           ncname = xmlSplitQName2(attrib, &prefix);
            if (ncname == NULL) {
-               ncname = attribute;
-               attribute = NULL;
+               ncname = attrib;
+               attrib = NULL;
                prefix = NULL;
            }
 
@@ -562,14 +562,14 @@ xsltApplyAttributeSet(xsltTransformContextPtr ctxt, xmlNodePtr node,
                }
                style = xsltNextImport(style);
            }
-           if (attribute != NULL)
-               xmlFree(attribute);
+           if (attrib != NULL)
+               xmlFree(attrib);
            if (ncname != NULL)
                xmlFree(ncname);
            if (prefix != NULL)
                xmlFree(prefix);
        }
-       attribute = end;
+       attrib = endattr;
     }
 }
 
index a30384c..879e956 100644 (file)
@@ -1383,7 +1383,7 @@ xsltExtElementTest(xsltTransformContextPtr ctxt, xmlNodePtr node,
                    xmlNodePtr inst,
                    xsltElemPreCompPtr comp ATTRIBUTE_UNUSED)
 {
-    xmlNodePtr comment;
+    xmlNodePtr commentNode;
 
     if (testData == NULL) {
         xsltGenericDebug(xsltGenericDebugContext,
@@ -1421,10 +1421,10 @@ xsltExtElementTest(xsltTransformContextPtr ctxt, xmlNodePtr node,
                          "xsltExtElementTest: no insertion point\n");
         return;
     }
-    comment =
+    commentNode =
         xmlNewComment((const xmlChar *)
                       "libxslt:test element test worked");
-    xmlAddChild(ctxt->insert, comment);
+    xmlAddChild(ctxt->insert, commentNode);
 }
 
 /**
index 522eaf8..1845cee 100644 (file)
@@ -750,7 +750,7 @@ xsltNumberComp(xsltStylesheetPtr style, xmlNodePtr cur) {
     
     prop = xsltGetNsProp(cur, (const xmlChar *)"lang", XSLT_NAMESPACE);
     if (prop != NULL) {
-       TODO; /* xsl:number lang attribute */
+       XSLT_TODO; /* xsl:number lang attribute */
        xmlFree(prop);
     }
     
@@ -761,13 +761,13 @@ xsltNumberComp(xsltStylesheetPtr style, xmlNodePtr cur) {
            xsltGenericError(xsltGenericErrorContext,
                 "xsl:number : letter-value 'alphabetic' not implemented\n");
            style->warnings++;
-           TODO; /* xsl:number letter-value attribute alphabetic */
+           XSLT_TODO; /* xsl:number letter-value attribute alphabetic */
        } else if (xmlStrEqual(prop, BAD_CAST("traditional"))) {
            xsltPrintErrorContext(NULL, style, cur);
            xsltGenericError(xsltGenericErrorContext,
                 "xsl:number : letter-value 'traditional' not implemented\n");
            style->warnings++;
-           TODO; /* xsl:number letter-value attribute traditional */
+           XSLT_TODO; /* xsl:number letter-value attribute traditional */
        } else {
            xsltPrintErrorContext(NULL, style, cur);
            xsltGenericError(xsltGenericErrorContext,
index 582c0b8..a863982 100644 (file)
@@ -2025,7 +2025,7 @@ void
 xsltComment(xsltTransformContextPtr ctxt, xmlNodePtr node,
                   xmlNodePtr inst, xsltStylePreCompPtr comp ATTRIBUTE_UNUSED) {
     xmlChar *value = NULL;
-    xmlNodePtr comment;
+    xmlNodePtr commentNode;
 
     value = xsltEvalTemplateString(ctxt, node, inst);
     /* TODO: use or generate the compiled form */
@@ -2039,8 +2039,8 @@ xsltComment(xsltTransformContextPtr ctxt, xmlNodePtr node,
             "xsltComment: content %s\n", value);
 #endif
 
-    comment = xmlNewComment(value);
-    xmlAddChild(ctxt->insert, comment);
+    commentNode = xmlNewComment(value);
+    xmlAddChild(ctxt->insert, commentNode);
 
     if (value != NULL)
        xmlFree(value);
@@ -3454,8 +3454,8 @@ xsltRunStylesheet(xsltStylesheetPtr style, xmlDocPtr doc,
 
     /* unsupported yet */
     if (SAX != NULL) {
-        TODO                    /* xsltRunStylesheet xmlSAXHandlerPtr SAX */
-            return (-1);
+        XSLT_TODO   /* xsltRunStylesheet xmlSAXHandlerPtr SAX */
+       return (-1);
     }
 
     tmp = xsltApplyStylesheetInternal(style, doc, params, output, NULL, NULL);
index 9d82cea..70cdc90 100644 (file)
@@ -28,7 +28,7 @@ extern "C" {
  *
  * macro to flag unimplemented blocks
  */
-#define TODO                                                           \
+#define XSLT_TODO                                                      \
     xsltGenericError(xsltGenericErrorContext,                          \
            "Unimplemented block at %s:%d\n",                           \
             __FILE__, __LINE__);
@@ -38,7 +38,7 @@ extern "C" {
  *
  * macro to flag that a problem was detected internally
  */
-#define STRANGE                                                        \
+#define XSLT_STRANGE                                                   \
     xsltGenericError(xsltGenericErrorContext,                          \
            "Internal error at %s:%d\n",                                \
             __FILE__, __LINE__);