diff --git a/ChangeLog b/ChangeLog index 7799b531..8f2d2a98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Thu Jun 21 13:13:36 CEST 2001 Daniel Veillard + + * Makefile.am: cleanup when --without-debug is specified + * xinclude.c xpath.c xpathInternals.h xpointer.c: cleanup + w.r.t. --without-debug and other include points + * catalog.h testCatalog.c: a bit of cleanup and prepare for XML + Catalogs + * configure.in entities.h tree.h HTMLparser.c: removed + --without-corba, made the _private field mandatory + Wed Jun 20 19:37:25 CEST 2001 Daniel Veillard * parser.c parserInternals.c encoding.c: Since Notepad on Win2k diff --git a/HTMLparser.c b/HTMLparser.c index b096d82e..61e61b7b 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -1833,9 +1833,7 @@ htmlNewDocNoDtD(const xmlChar *URI, const xmlChar *ExternalID) { cur->compression = 0; cur->ids = NULL; cur->refs = NULL; -#ifndef XML_WITHOUT_CORBA cur->_private = NULL; -#endif return(cur); } diff --git a/Makefile.am b/Makefile.am index 6882d363..2bf97500 100644 --- a/Makefile.am +++ b/Makefile.am @@ -263,7 +263,9 @@ XPathtests : testXPath @echo "##" @echo "## XPath regression tests" @echo "##" - @(for i in $(srcdir)/test/XPath/expr/* ; do \ + @(if [ "`$(top_builddir)/testXPath | grep 'support not compiled in'`" != "" ] ; \ + then echo Skipping debug not compiled in ; exit 0 ; fi ; \ + for i in $(srcdir)/test/XPath/expr/* ; do \ name=`basename $$i`; \ if [ ! -d $$i ] ; then \ if [ ! -f $(srcdir)/result/XPath/expr/$$name ] ; then \ @@ -276,8 +278,8 @@ XPathtests : testXPath grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ diff $(srcdir)/result/XPath/expr/$$name result.$$name ; \ rm result.$$name ; \ - fi ; fi ; done) - @(for i in $(srcdir)/test/XPath/docs/* ; do \ + fi ; fi ; done ; \ + for i in $(srcdir)/test/XPath/docs/* ; do \ if [ ! -d $$i ] ; then \ doc=`basename $$i`; \ for j in $(srcdir)/test/XPath/tests/$$doc* ; do \ @@ -301,7 +303,9 @@ XPtrtests : testXPath @echo "##" @echo "## XPointer regression tests" @echo "##" - @(for i in $(srcdir)/test/XPath/docs/* ; do \ + @(if [ "`$(top_builddir)/testXPath | grep 'support not compiled in'`" != "" ] ; \ + then echo Skipping debug not compiled in ; exit 0 ; fi ; \ + for i in $(srcdir)/test/XPath/docs/* ; do \ if [ ! -d $$i ] ; then \ doc=`basename $$i`; \ for j in $(srcdir)/test/XPath/xptr/$$doc* ; do \ diff --git a/catalog.h b/catalog.h index 25ef5eb7..88175e14 100644 --- a/catalog.h +++ b/catalog.h @@ -4,6 +4,9 @@ * Reference: SGML Open Technical Resolution TR9401:1997. * http://www.jclark.com/sp/catalog.htm * + * XML Catalogs Working Draft 12 Jun 2001 + * http://www.oasis-open.org/committees/entity/spec-2001-06-12.html + * * See Copyright for the status of this software. * * Daniel.Veillard@w3.org @@ -21,6 +24,14 @@ extern "C" { #endif +/** + * XML_CATALOGS_NAMESPACE: + * + * The namespace for the XML Catalogs elements + */ +#define XML_CATALOGS_NAMESPACE \ + (const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog" + int xmlLoadCatalog (const char *URL); void xmlLoadCatalogs (const char *paths); void xmlCatalogCleanup (void); diff --git a/configure.in b/configure.in index 44b0fe05..717dc65e 100644 --- a/configure.in +++ b/configure.in @@ -255,7 +255,7 @@ if test "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ; then if test "${with_xptr}" = "" ; then with_xptr="yes" fi - CFLAGS="${CFLAGS} -g -O -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline " + CFLAGS="-g -O -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline " dnl -Wcast-qual -ansi fi diff --git a/entities.h b/entities.h index a811eb93..33270655 100644 --- a/entities.h +++ b/entities.h @@ -35,9 +35,7 @@ typedef enum { typedef struct _xmlEntity xmlEntity; typedef xmlEntity *xmlEntityPtr; struct _xmlEntity { -#ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ -#endif xmlElementType type; /* XML_ENTITY_DECL, must be second ! */ const xmlChar *name; /* Attribute name */ struct _xmlNode *children; /* NULL */ diff --git a/include/libxml/catalog.h b/include/libxml/catalog.h index 25ef5eb7..88175e14 100644 --- a/include/libxml/catalog.h +++ b/include/libxml/catalog.h @@ -4,6 +4,9 @@ * Reference: SGML Open Technical Resolution TR9401:1997. * http://www.jclark.com/sp/catalog.htm * + * XML Catalogs Working Draft 12 Jun 2001 + * http://www.oasis-open.org/committees/entity/spec-2001-06-12.html + * * See Copyright for the status of this software. * * Daniel.Veillard@w3.org @@ -21,6 +24,14 @@ extern "C" { #endif +/** + * XML_CATALOGS_NAMESPACE: + * + * The namespace for the XML Catalogs elements + */ +#define XML_CATALOGS_NAMESPACE \ + (const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog" + int xmlLoadCatalog (const char *URL); void xmlLoadCatalogs (const char *paths); void xmlCatalogCleanup (void); diff --git a/include/libxml/entities.h b/include/libxml/entities.h index a811eb93..33270655 100644 --- a/include/libxml/entities.h +++ b/include/libxml/entities.h @@ -35,9 +35,7 @@ typedef enum { typedef struct _xmlEntity xmlEntity; typedef xmlEntity *xmlEntityPtr; struct _xmlEntity { -#ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ -#endif xmlElementType type; /* XML_ENTITY_DECL, must be second ! */ const xmlChar *name; /* Attribute name */ struct _xmlNode *children; /* NULL */ diff --git a/include/libxml/tree.h b/include/libxml/tree.h index 51a0a7d6..814c9047 100644 --- a/include/libxml/tree.h +++ b/include/libxml/tree.h @@ -144,9 +144,7 @@ struct _xmlEnumeration { typedef struct _xmlAttribute xmlAttribute; typedef xmlAttribute *xmlAttributePtr; struct _xmlAttribute { -#ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ -#endif xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */ const xmlChar *name; /* Attribute name */ struct _xmlNode *children; /* NULL */ @@ -230,9 +228,7 @@ typedef enum { typedef struct _xmlElement xmlElement; typedef xmlElement *xmlElementPtr; struct _xmlElement { -#ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ -#endif xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */ const xmlChar *name; /* Element name */ struct _xmlNode *children; /* NULL */ @@ -281,9 +277,7 @@ struct _xmlNs { typedef struct _xmlDtd xmlDtd; typedef xmlDtd *xmlDtdPtr; struct _xmlDtd { -#ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ -#endif xmlElementType type; /* XML_DTD_NODE, must be second ! */ const xmlChar *name; /* Name of the DTD */ struct _xmlNode *children; /* the value of the property link */ @@ -311,9 +305,7 @@ struct _xmlDtd { typedef struct _xmlAttr xmlAttr; typedef xmlAttr *xmlAttrPtr; struct _xmlAttr { -#ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ -#endif xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */ const xmlChar *name; /* the name of the property */ struct _xmlNode *children; /* the value of the property */ @@ -388,9 +380,7 @@ struct _xmlBuffer { typedef struct _xmlNode xmlNode; typedef xmlNode *xmlNodePtr; struct _xmlNode { -#ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ -#endif xmlElementType type; /* type number, must be second ! */ const xmlChar *name; /* the name of the node, or the entity */ struct _xmlNode *children; /* parent->childs link */ @@ -419,9 +409,7 @@ struct _xmlNode { typedef struct _xmlDoc xmlDoc; typedef xmlDoc *xmlDocPtr; struct _xmlDoc { -#ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ -#endif xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */ char *name; /* name/filename/URI of the document */ struct _xmlNode *children; /* the document tree */ diff --git a/include/libxml/xpathInternals.h b/include/libxml/xpathInternals.h index 122244b9..557b8e9d 100644 --- a/include/libxml/xpathInternals.h +++ b/include/libxml/xpathInternals.h @@ -10,6 +10,7 @@ #ifndef __XML_XPATH_INTERNALS_H__ #define __XML_XPATH_INTERNALS_H__ +#include #include #ifdef __cplusplus @@ -208,13 +209,12 @@ xmlChar * xmlXPathParseNCName (xmlXPathParserContextPtr ctxt); * Debug */ #ifdef LIBXML_DEBUG_ENABLED -double xmlXPathStringEvalNumber(const xmlChar *str); void xmlXPathDebugDumpObject(FILE *output, xmlXPathObjectPtr cur, int depth); #endif /* * Existing functions */ - +double xmlXPathStringEvalNumber(const xmlChar *str); int xmlXPathEvaluatePredicateResult(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr res); void xmlXPathInit(void); diff --git a/testCatalog.c b/testCatalog.c index 99f6c66c..fa4c646d 100644 --- a/testCatalog.c +++ b/testCatalog.c @@ -26,6 +26,7 @@ int main(int argc, char **argv) { xmlCatalogDump(stdout); xmlCatalogCleanup(); + xmlCleanupParser(); xmlMemoryDump(); #endif return(0); diff --git a/tree.h b/tree.h index 51a0a7d6..814c9047 100644 --- a/tree.h +++ b/tree.h @@ -144,9 +144,7 @@ struct _xmlEnumeration { typedef struct _xmlAttribute xmlAttribute; typedef xmlAttribute *xmlAttributePtr; struct _xmlAttribute { -#ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ -#endif xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */ const xmlChar *name; /* Attribute name */ struct _xmlNode *children; /* NULL */ @@ -230,9 +228,7 @@ typedef enum { typedef struct _xmlElement xmlElement; typedef xmlElement *xmlElementPtr; struct _xmlElement { -#ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ -#endif xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */ const xmlChar *name; /* Element name */ struct _xmlNode *children; /* NULL */ @@ -281,9 +277,7 @@ struct _xmlNs { typedef struct _xmlDtd xmlDtd; typedef xmlDtd *xmlDtdPtr; struct _xmlDtd { -#ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ -#endif xmlElementType type; /* XML_DTD_NODE, must be second ! */ const xmlChar *name; /* Name of the DTD */ struct _xmlNode *children; /* the value of the property link */ @@ -311,9 +305,7 @@ struct _xmlDtd { typedef struct _xmlAttr xmlAttr; typedef xmlAttr *xmlAttrPtr; struct _xmlAttr { -#ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ -#endif xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */ const xmlChar *name; /* the name of the property */ struct _xmlNode *children; /* the value of the property */ @@ -388,9 +380,7 @@ struct _xmlBuffer { typedef struct _xmlNode xmlNode; typedef xmlNode *xmlNodePtr; struct _xmlNode { -#ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ -#endif xmlElementType type; /* type number, must be second ! */ const xmlChar *name; /* the name of the node, or the entity */ struct _xmlNode *children; /* parent->childs link */ @@ -419,9 +409,7 @@ struct _xmlNode { typedef struct _xmlDoc xmlDoc; typedef xmlDoc *xmlDocPtr; struct _xmlDoc { -#ifndef XML_WITHOUT_CORBA void *_private; /* for Corba, must be first ! */ -#endif xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */ char *name; /* name/filename/URI of the document */ struct _xmlNode *children; /* the document tree */ diff --git a/xinclude.c b/xinclude.c index b659b441..89d74a30 100644 --- a/xinclude.c +++ b/xinclude.c @@ -23,9 +23,6 @@ #include #include #include -#ifdef LIBXML_DEBUG_ENABLED -#include -#endif #include #ifdef LIBXML_XINCLUDE_ENABLED @@ -39,6 +36,11 @@ #define XINCLUDE_PARSE_TEXT (const xmlChar *) "text" /* #define DEBUG_XINCLUDE */ +#ifdef DEBUG_XINCLUDE +#ifdef LIBXML_DEBUG_ENABLED +#include +#endif +#endif /************************************************************************ * * diff --git a/xpath.c b/xpath.c index bccf54b1..9d18ee7f 100644 --- a/xpath.c +++ b/xpath.c @@ -555,7 +555,7 @@ xmlXPathDebugDumpLocationSet(FILE *output, xmlLocationSetPtr cur, int depth) { xmlXPathDebugDumpObject(output, cur->locTab[i], depth + 1); } } -#endif +#endif /* LIBXML_XPTR_ENABLED */ /** * xmlXPathDebugDumpObject: @@ -863,7 +863,7 @@ xmlXPathDebugDumpCompExpr(FILE *output, xmlXPathCompExprPtr comp, i = comp->last; xmlXPathDebugDumpStepOp(output, comp, &comp->steps[i], depth + 1); } -#endif +#endif /* LIBXML_DEBUG_ENABLED */ /************************************************************************ * * diff --git a/xpathInternals.h b/xpathInternals.h index 122244b9..557b8e9d 100644 --- a/xpathInternals.h +++ b/xpathInternals.h @@ -10,6 +10,7 @@ #ifndef __XML_XPATH_INTERNALS_H__ #define __XML_XPATH_INTERNALS_H__ +#include #include #ifdef __cplusplus @@ -208,13 +209,12 @@ xmlChar * xmlXPathParseNCName (xmlXPathParserContextPtr ctxt); * Debug */ #ifdef LIBXML_DEBUG_ENABLED -double xmlXPathStringEvalNumber(const xmlChar *str); void xmlXPathDebugDumpObject(FILE *output, xmlXPathObjectPtr cur, int depth); #endif /* * Existing functions */ - +double xmlXPathStringEvalNumber(const xmlChar *str); int xmlXPathEvaluatePredicateResult(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr res); void xmlXPathInit(void); diff --git a/xpointer.c b/xpointer.c index 4a28b466..2a61003b 100644 --- a/xpointer.c +++ b/xpointer.c @@ -26,9 +26,6 @@ #include #include #include -#ifdef LIBXML_DEBUG_ENABLED -#include -#endif #include #ifdef LIBXML_XPTR_ENABLED @@ -37,6 +34,11 @@ #define XPTR_XMLNS_SCHEME /* #define DEBUG_RANGES */ +#ifdef DEBUG_RANGES +#ifdef LIBXML_DEBUG_ENABLED +#include +#endif +#endif #define TODO \ xmlGenericError(xmlGenericErrorContext, \