diff --git a/ChangeLog b/ChangeLog index 1f91103c..c7cb9895 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Sat May 19 15:20:03 CEST 2001 Daniel Veillard + + * HTMLparser.c: Closed bug #54891 + * result/HTML/cf_128.html* test/HTML/cf_128.html: added the test + to the suite + +Thu May 17 14:15:07 CEST 2001 Daniel Veillard + + * encoding.h hash.c nanoftp.h parser.h tree.h uri.h xlink.h xpointer.c: + applied a documentation patch from LotR and filled in a few missing + descriptions + Wed May 16 23:02:41 CEST 2001 Daniel Veillard * xpath.c tree.c parser.c: speed optimizations at the parser level diff --git a/HTMLparser.c b/HTMLparser.c index 5e79464d..d2c1e6cf 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -739,7 +739,7 @@ htmlAutoCloseOnClose(htmlParserCtxtPtr ctxt, const xmlChar *newtag) { #endif } else if (info->endTag == 3) { #ifdef DEBUG - xmlGenericError(xmlGenericErrorContext,"End of tag %s: expecting %s\n", name, ctxt->name); + xmlGenericError(xmlGenericErrorContext,"End of tag %s: expecting %s\n", newtag, ctxt->name); #endif if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, @@ -1383,7 +1383,7 @@ htmlEntityDescPtr htmlEntityValueLookup(unsigned int value) { unsigned int i; #ifdef DEBUG - int lv = 0; + unsigned int lv = 0; #endif for (i = 0;i < (sizeof(html40EntitiesTable)/ @@ -4165,6 +4165,15 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { #ifdef DEBUG_PUSH xmlGenericError(xmlGenericErrorContext, "HPP: entering CONTENT\n"); +#endif + break; + } + if (in->cur[1] == '/') { + ctxt->instate = XML_PARSER_END_TAG; + ctxt->checkIndex = 0; +#ifdef DEBUG_PUSH + xmlGenericError(xmlGenericErrorContext, + "HPP: entering END_TAG\n"); #endif break; } diff --git a/encoding.h b/encoding.h index 555558fe..f25d9fde 100644 --- a/encoding.h +++ b/encoding.h @@ -32,6 +32,8 @@ extern "C" { #endif /** + * xmlCharEncoding: + * * Predefined values for some standard encodings * Libxml don't do beforehand translation on UTF8, ISOLatinX * It also support UTF16 (LE and BE) by default. diff --git a/hash.c b/hash.c index fc6fffee..e061c11b 100644 --- a/hash.c +++ b/hash.c @@ -626,6 +626,7 @@ xmlHashSize(xmlHashTablePtr table) { } /** + * xmlHashRemoveEntry: * @table: the hash table * @name: the name of the userdata * @f: the deallocator function for removed item (if any) @@ -642,6 +643,7 @@ int xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name, } /** + * xmlHashRemoveEntry2: * @table: the hash table * @name: the name of the userdata * @name2: a second name of the userdata @@ -659,6 +661,7 @@ int xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name, } /** + * xmlHashRemoveEntry3 * @table: the hash table * @name: the name of the userdata * @name2: a second name of the userdata diff --git a/include/libxml/encoding.h b/include/libxml/encoding.h index 555558fe..f25d9fde 100644 --- a/include/libxml/encoding.h +++ b/include/libxml/encoding.h @@ -32,6 +32,8 @@ extern "C" { #endif /** + * xmlCharEncoding: + * * Predefined values for some standard encodings * Libxml don't do beforehand translation on UTF8, ISOLatinX * It also support UTF16 (LE and BE) by default. diff --git a/include/libxml/nanoftp.h b/include/libxml/nanoftp.h index 53465280..cf334201 100644 --- a/include/libxml/nanoftp.h +++ b/include/libxml/nanoftp.h @@ -42,6 +42,10 @@ typedef void (*ftpListCallback) (void *userData, int minute); /** * ftpDataCallback: + * @userData: the user provided context + * @data: the data received + * @len: its size in bytes + * * A callback for the xmlNanoFTPGet command */ typedef void (*ftpDataCallback) (void *userData, const char *data, int len); diff --git a/include/libxml/parser.h b/include/libxml/parser.h index 0e91245d..a8f06373 100644 --- a/include/libxml/parser.h +++ b/include/libxml/parser.h @@ -25,6 +25,8 @@ extern "C" { #define XML_DEFAULT_VERSION "1.0" /** + * xmlParserInput: + * * an xmlParserInput is an input flow for the XML processor. * Each entity parsed is associated an xmlParserInput (except the * few predefined ones). This is the case both for internal entities @@ -56,6 +58,8 @@ struct _xmlParserInput { }; /** + * xmlParserNodeInfo: + * * the parser can be asked to collect Node informations, i.e. at what * place in the file they were detected. * NOTE: This is off by default and not very well tested. @@ -81,6 +85,8 @@ struct _xmlParserNodeInfoSeq { }; /** + * xmlParserInputState: + * * The parser is now working also as a state based parser * The recursive one use the stagte info for entities processing */ @@ -105,6 +111,8 @@ typedef enum { } xmlParserInputState; /** + * xmlParserCtxt: + * * The parser context. * NOTE This doesn't completely defines the parser state, the (current ?) * design of the parser uses recursive function calls since this allow @@ -191,6 +199,8 @@ struct _xmlParserCtxt { }; /** + * xmlSAXLocator: + * * a SAX Locator. */ typedef struct _xmlSAXLocator xmlSAXLocator; @@ -203,6 +213,8 @@ struct _xmlSAXLocator { }; /** + * xmlSAXHandler: + * * a SAX handler is bunch of callbacks called by the parser when processing * of the input generate data or structure informations. */ @@ -288,13 +300,18 @@ struct _xmlSAXHandler { }; /** + * xmlExternalEntityLoader: + * @URL: The System ID of the resource requested + * @ID: The Public ID of the resource requested + * @xmlParserCtxtPtr: the XML parser context + * * External entity loaders types */ typedef xmlParserInputPtr (*xmlExternalEntityLoader)(const char *URL, const char *ID, xmlParserCtxtPtr context); -/** +/* * Global variables: just the default SAX interface tables and XML * version infos. */ @@ -305,7 +322,7 @@ LIBXML_DLL_IMPORT extern xmlSAXHandler xmlDefaultSAXHandler; LIBXML_DLL_IMPORT extern xmlSAXHandler htmlDefaultSAXHandler; LIBXML_DLL_IMPORT extern xmlSAXHandler docbDefaultSAXHandler; -/** +/* * entity substitution default behaviour. */ @@ -318,13 +335,13 @@ LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultValue; LIBXML_DLL_IMPORT extern int xmlGetWarningsDefaultValue; -/** +/* * Init/Cleanup */ void xmlInitParser (void); void xmlCleanupParser (void); -/** +/* * Input functions */ int xmlParserInputRead (xmlParserInputPtr in, @@ -332,7 +349,7 @@ int xmlParserInputRead (xmlParserInputPtr in, int xmlParserInputGrow (xmlParserInputPtr in, int len); -/** +/* * xmlChar handling */ xmlChar * xmlStrdup (const xmlChar *cur); @@ -369,7 +386,7 @@ xmlChar * xmlStrncat (xmlChar *cur, const xmlChar *add, int len); -/** +/* * Basic parsing Interfaces */ xmlDocPtr xmlParseDoc (xmlChar *cur); @@ -381,7 +398,7 @@ int xmlKeepBlanksDefault (int val); void xmlStopParser (xmlParserCtxtPtr ctxt); int xmlPedanticParserDefault(int val); -/** +/* * Recovery mode */ xmlDocPtr xmlRecoverDoc (xmlChar *cur); @@ -389,7 +406,7 @@ xmlDocPtr xmlRecoverMemory (char *buffer, int size); xmlDocPtr xmlRecoverFile (const char *filename); -/** +/* * Less common routines and SAX interfaces */ int xmlParseDocument (xmlParserCtxtPtr ctxt); @@ -440,13 +457,13 @@ int xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, const xmlChar *ID, xmlNodePtr *list); -/** +/* * SAX initialization routines */ void xmlDefaultSAXHandlerInit(void); void htmlDefaultSAXHandlerInit(void); -/** +/* * Parser contexts handling. */ void xmlInitParserCtxt (xmlParserCtxtPtr ctxt); @@ -457,7 +474,7 @@ void xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt, const char* filename); xmlParserCtxtPtr xmlCreateDocParserCtxt (xmlChar *cur); -/** +/* * Reading/setting optional parsing features. */ @@ -470,7 +487,7 @@ int xmlSetFeature (xmlParserCtxtPtr ctxt, const char *name, void *value); -/** +/* * Interfaces for the Push mode */ xmlParserCtxtPtr xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, @@ -483,7 +500,7 @@ int xmlParseChunk (xmlParserCtxtPtr ctxt, int size, int terminate); -/** +/* * Special I/O mode */ @@ -498,7 +515,7 @@ xmlParserInputPtr xmlNewIOInputStream (xmlParserCtxtPtr ctxt, xmlParserInputBufferPtr input, xmlCharEncoding enc); -/** +/* * Node infos */ const xmlParserNodeInfo* diff --git a/include/libxml/tree.h b/include/libxml/tree.h index 841fef1b..4be4c5fa 100644 --- a/include/libxml/tree.h +++ b/include/libxml/tree.h @@ -313,7 +313,9 @@ struct _xmlBuffer { xmlBufferAllocationScheme alloc; /* The realloc method */ }; -/* +/** + * xmlNode: + * * A node in an XML tree. */ typedef struct _xmlNode xmlNode; diff --git a/include/libxml/uri.h b/include/libxml/uri.h index e7aeda41..3d87e142 100644 --- a/include/libxml/uri.h +++ b/include/libxml/uri.h @@ -18,20 +18,23 @@ extern "C" { #endif /** + * xmlURI: * + * A parsed URI reference. This is a struct containing the various fields + * as described in RFC 2396 but separated for further processing */ typedef struct _xmlURI xmlURI; typedef xmlURI *xmlURIPtr; struct _xmlURI { - char *scheme; - char *opaque; - char *authority; - char *server; - char *user; - int port; - char *path; - char *query; - char *fragment; + char *scheme; /* the URI scheme */ + char *opaque; /* opaque part */ + char *authority; /* the authority part */ + char *server; /* the server part */ + char *user; /* the user part */ + int port; /* the port number */ + char *path; /* the path string */ + char *query; /* the query string */ + char *fragment; /* the fragment identifier */ }; /* diff --git a/include/libxml/xlink.h b/include/libxml/xlink.h index 37a54151..dbe228b3 100644 --- a/include/libxml/xlink.h +++ b/include/libxml/xlink.h @@ -156,7 +156,7 @@ struct _xlinkHandler { xlinkExtendedLinkSetFunk set; }; -/** +/* * the default detection routine, can be overriden, they call the default * detection callbacks. */ @@ -164,7 +164,7 @@ struct _xlinkHandler { xlinkNodeDetectFunc xlinkGetDefaultDetect (void); void xlinkSetDefaultDetect (xlinkNodeDetectFunc func); -/** +/* * Routines to set/get the default handlers. */ xlinkHandlerPtr xlinkGetDefaultHandler (void); diff --git a/include/libxml/xmlmemory.h b/include/libxml/xmlmemory.h index 12538ab4..bd82c6d2 100644 --- a/include/libxml/xmlmemory.h +++ b/include/libxml/xmlmemory.h @@ -11,9 +11,13 @@ #include #include -/* - * DEBUG_MEMORY_LOCATION should be activated only done when debugging - * libxml. +/** + * DEBUG_MEMORY: + * + * should be activated only done when debugging libxml. It replaces the + * allocator with a collect and debug shell to the libc allocator. + * DEBUG_MEMORY should be activated only when debugging + * libxml i.e. if libxml has been configured with --with-debug-mem too */ /* #define DEBUG_MEMORY_FREED */ /* #define DEBUG_MEMORY_LOCATION */ @@ -24,15 +28,15 @@ #endif #endif +/** + * DEBUG_MEMORY_LOCATION: + * + * should be activated + * DEBUG_MEMORY_LOCATION should be activated only when debugging + * libxml i.e. if libxml has been configured with --with-debug-mem too + */ #ifdef DEBUG_MEMORY_LOCATION #define MEM_LIST /* keep a list of all the allocated memory blocks */ -#define DEBUG_MEMORY_FREED -#endif - -#ifdef DEBUG_MEMORY_FREED -#define MEM_CLEANUP(p,l) memset((p), -1, (l)); -#else -#define MEM_CLEANUP(p,l) #endif #ifdef __cplusplus diff --git a/nanoftp.h b/nanoftp.h index 53465280..cf334201 100644 --- a/nanoftp.h +++ b/nanoftp.h @@ -42,6 +42,10 @@ typedef void (*ftpListCallback) (void *userData, int minute); /** * ftpDataCallback: + * @userData: the user provided context + * @data: the data received + * @len: its size in bytes + * * A callback for the xmlNanoFTPGet command */ typedef void (*ftpDataCallback) (void *userData, const char *data, int len); diff --git a/parser.h b/parser.h index 0e91245d..a8f06373 100644 --- a/parser.h +++ b/parser.h @@ -25,6 +25,8 @@ extern "C" { #define XML_DEFAULT_VERSION "1.0" /** + * xmlParserInput: + * * an xmlParserInput is an input flow for the XML processor. * Each entity parsed is associated an xmlParserInput (except the * few predefined ones). This is the case both for internal entities @@ -56,6 +58,8 @@ struct _xmlParserInput { }; /** + * xmlParserNodeInfo: + * * the parser can be asked to collect Node informations, i.e. at what * place in the file they were detected. * NOTE: This is off by default and not very well tested. @@ -81,6 +85,8 @@ struct _xmlParserNodeInfoSeq { }; /** + * xmlParserInputState: + * * The parser is now working also as a state based parser * The recursive one use the stagte info for entities processing */ @@ -105,6 +111,8 @@ typedef enum { } xmlParserInputState; /** + * xmlParserCtxt: + * * The parser context. * NOTE This doesn't completely defines the parser state, the (current ?) * design of the parser uses recursive function calls since this allow @@ -191,6 +199,8 @@ struct _xmlParserCtxt { }; /** + * xmlSAXLocator: + * * a SAX Locator. */ typedef struct _xmlSAXLocator xmlSAXLocator; @@ -203,6 +213,8 @@ struct _xmlSAXLocator { }; /** + * xmlSAXHandler: + * * a SAX handler is bunch of callbacks called by the parser when processing * of the input generate data or structure informations. */ @@ -288,13 +300,18 @@ struct _xmlSAXHandler { }; /** + * xmlExternalEntityLoader: + * @URL: The System ID of the resource requested + * @ID: The Public ID of the resource requested + * @xmlParserCtxtPtr: the XML parser context + * * External entity loaders types */ typedef xmlParserInputPtr (*xmlExternalEntityLoader)(const char *URL, const char *ID, xmlParserCtxtPtr context); -/** +/* * Global variables: just the default SAX interface tables and XML * version infos. */ @@ -305,7 +322,7 @@ LIBXML_DLL_IMPORT extern xmlSAXHandler xmlDefaultSAXHandler; LIBXML_DLL_IMPORT extern xmlSAXHandler htmlDefaultSAXHandler; LIBXML_DLL_IMPORT extern xmlSAXHandler docbDefaultSAXHandler; -/** +/* * entity substitution default behaviour. */ @@ -318,13 +335,13 @@ LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultValue; LIBXML_DLL_IMPORT extern int xmlGetWarningsDefaultValue; -/** +/* * Init/Cleanup */ void xmlInitParser (void); void xmlCleanupParser (void); -/** +/* * Input functions */ int xmlParserInputRead (xmlParserInputPtr in, @@ -332,7 +349,7 @@ int xmlParserInputRead (xmlParserInputPtr in, int xmlParserInputGrow (xmlParserInputPtr in, int len); -/** +/* * xmlChar handling */ xmlChar * xmlStrdup (const xmlChar *cur); @@ -369,7 +386,7 @@ xmlChar * xmlStrncat (xmlChar *cur, const xmlChar *add, int len); -/** +/* * Basic parsing Interfaces */ xmlDocPtr xmlParseDoc (xmlChar *cur); @@ -381,7 +398,7 @@ int xmlKeepBlanksDefault (int val); void xmlStopParser (xmlParserCtxtPtr ctxt); int xmlPedanticParserDefault(int val); -/** +/* * Recovery mode */ xmlDocPtr xmlRecoverDoc (xmlChar *cur); @@ -389,7 +406,7 @@ xmlDocPtr xmlRecoverMemory (char *buffer, int size); xmlDocPtr xmlRecoverFile (const char *filename); -/** +/* * Less common routines and SAX interfaces */ int xmlParseDocument (xmlParserCtxtPtr ctxt); @@ -440,13 +457,13 @@ int xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, const xmlChar *ID, xmlNodePtr *list); -/** +/* * SAX initialization routines */ void xmlDefaultSAXHandlerInit(void); void htmlDefaultSAXHandlerInit(void); -/** +/* * Parser contexts handling. */ void xmlInitParserCtxt (xmlParserCtxtPtr ctxt); @@ -457,7 +474,7 @@ void xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt, const char* filename); xmlParserCtxtPtr xmlCreateDocParserCtxt (xmlChar *cur); -/** +/* * Reading/setting optional parsing features. */ @@ -470,7 +487,7 @@ int xmlSetFeature (xmlParserCtxtPtr ctxt, const char *name, void *value); -/** +/* * Interfaces for the Push mode */ xmlParserCtxtPtr xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, @@ -483,7 +500,7 @@ int xmlParseChunk (xmlParserCtxtPtr ctxt, int size, int terminate); -/** +/* * Special I/O mode */ @@ -498,7 +515,7 @@ xmlParserInputPtr xmlNewIOInputStream (xmlParserCtxtPtr ctxt, xmlParserInputBufferPtr input, xmlCharEncoding enc); -/** +/* * Node infos */ const xmlParserNodeInfo* diff --git a/result/HTML/cf_128.html b/result/HTML/cf_128.html new file mode 100644 index 00000000..9e82e1e7 --- /dev/null +++ b/result/HTML/cf_128.html @@ -0,0 +1,13 @@ + + +gnome-xml push mode bug + + + +
+ Foo1 +
Foo2

+

+

+
Foo3
+ diff --git a/result/HTML/cf_128.html.err b/result/HTML/cf_128.html.err new file mode 100644 index 00000000..e69de29b diff --git a/result/HTML/cf_128.html.sax b/result/HTML/cf_128.html.sax new file mode 100644 index 00000000..8aa82c14 --- /dev/null +++ b/result/HTML/cf_128.html.sax @@ -0,0 +1,69 @@ +SAX.setDocumentLocator() +SAX.startDocument() +SAX.internalSubset(HTML, -//W3C//DTD HTML 4.0 Transitional//EN, http://www.w3.org/TR/REC-html40/strict.dtd) +SAX.startElement(html) +SAX.ignorableWhitespace( +, 1) +SAX.startElement(head) +SAX.ignorableWhitespace( +, 1) +SAX.startElement(title) +SAX.characters(gnome-xml push mode bug, 23) +SAX.endElement(title) +SAX.ignorableWhitespace( +, 1) +SAX.endElement(head) +SAX.ignorableWhitespace( +, 1) +SAX.startElement(body) +SAX.ignorableWhitespace( + +, 2) +SAX.startElement(table, border='4') +SAX.characters( + , 3) +SAX.startElement(tr) +SAX.characters( + , 5) +SAX.startElement(td, bgcolor='white') +SAX.characters( + Foo1 + , 8) +SAX.startElement(table, border='4') +SAX.characters( + , 4) +SAX.startElement(tr) +SAX.characters( + , 6) +SAX.startElement(td) +SAX.characters(Foo2, 4) +SAX.startElement(p) +SAX.endElement(p) +SAX.startElement(p) +SAX.endElement(p) +SAX.endElement(td) +SAX.endElement(tr) +SAX.endElement(table) +SAX.characters( + , 5) +SAX.endElement(td) +SAX.characters( + , 5) +SAX.startElement(td, bgcolor='blue') +SAX.characters(Foo3, 4) +SAX.endElement(td) +SAX.characters( + , 4) +SAX.endElement(tr) +SAX.characters( + , 3) +SAX.endElement(table) +SAX.ignorableWhitespace( + , 3) +SAX.endElement(body) +SAX.ignorableWhitespace( +, 1) +SAX.endElement(html) +SAX.ignorableWhitespace( +, 3) +SAX.endDocument() diff --git a/test/HTML/cf_128.html b/test/HTML/cf_128.html new file mode 100644 index 00000000..4cd118ce --- /dev/null +++ b/test/HTML/cf_128.html @@ -0,0 +1,20 @@ + + + +gnome-xml push mode bug + + + + + + + + +
+ Foo1 + + +
Foo2

+
Foo3
+ + diff --git a/tree.h b/tree.h index 841fef1b..4be4c5fa 100644 --- a/tree.h +++ b/tree.h @@ -313,7 +313,9 @@ struct _xmlBuffer { xmlBufferAllocationScheme alloc; /* The realloc method */ }; -/* +/** + * xmlNode: + * * A node in an XML tree. */ typedef struct _xmlNode xmlNode; diff --git a/uri.h b/uri.h index e7aeda41..3d87e142 100644 --- a/uri.h +++ b/uri.h @@ -18,20 +18,23 @@ extern "C" { #endif /** + * xmlURI: * + * A parsed URI reference. This is a struct containing the various fields + * as described in RFC 2396 but separated for further processing */ typedef struct _xmlURI xmlURI; typedef xmlURI *xmlURIPtr; struct _xmlURI { - char *scheme; - char *opaque; - char *authority; - char *server; - char *user; - int port; - char *path; - char *query; - char *fragment; + char *scheme; /* the URI scheme */ + char *opaque; /* opaque part */ + char *authority; /* the authority part */ + char *server; /* the server part */ + char *user; /* the user part */ + int port; /* the port number */ + char *path; /* the path string */ + char *query; /* the query string */ + char *fragment; /* the fragment identifier */ }; /* diff --git a/valid.c b/valid.c index 81df7783..a05a83c2 100644 --- a/valid.c +++ b/valid.c @@ -4577,6 +4577,7 @@ xmlValidGetPotentialChildren(xmlElementContent *ctree, const xmlChar **list, int xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **list, int max) { + xmlValidCtxt vctxt; int nb_valid_elements = 0; const xmlChar *elements[256]; int nb_elements = 0, i; @@ -4592,6 +4593,10 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **list, xmlElement *element_desc; + vctxt.userData = NULL; + vctxt.error = NULL; + vctxt.warning = NULL; + if (prev == NULL && next == NULL) return(-1); @@ -4644,7 +4649,7 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **list, for (i = 0;i < nb_elements;i++) { test_node->name = elements[i]; - if (xmlValidateOneElement(NULL, parent->doc, parent)) { + if (xmlValidateOneElement(&vctxt, parent->doc, parent)) { int j; for (j = 0; j < nb_valid_elements;j++) diff --git a/xlink.h b/xlink.h index 37a54151..dbe228b3 100644 --- a/xlink.h +++ b/xlink.h @@ -156,7 +156,7 @@ struct _xlinkHandler { xlinkExtendedLinkSetFunk set; }; -/** +/* * the default detection routine, can be overriden, they call the default * detection callbacks. */ @@ -164,7 +164,7 @@ struct _xlinkHandler { xlinkNodeDetectFunc xlinkGetDefaultDetect (void); void xlinkSetDefaultDetect (xlinkNodeDetectFunc func); -/** +/* * Routines to set/get the default handlers. */ xlinkHandlerPtr xlinkGetDefaultHandler (void); diff --git a/xmlmemory.h b/xmlmemory.h index 12538ab4..bd82c6d2 100644 --- a/xmlmemory.h +++ b/xmlmemory.h @@ -11,9 +11,13 @@ #include #include -/* - * DEBUG_MEMORY_LOCATION should be activated only done when debugging - * libxml. +/** + * DEBUG_MEMORY: + * + * should be activated only done when debugging libxml. It replaces the + * allocator with a collect and debug shell to the libc allocator. + * DEBUG_MEMORY should be activated only when debugging + * libxml i.e. if libxml has been configured with --with-debug-mem too */ /* #define DEBUG_MEMORY_FREED */ /* #define DEBUG_MEMORY_LOCATION */ @@ -24,15 +28,15 @@ #endif #endif +/** + * DEBUG_MEMORY_LOCATION: + * + * should be activated + * DEBUG_MEMORY_LOCATION should be activated only when debugging + * libxml i.e. if libxml has been configured with --with-debug-mem too + */ #ifdef DEBUG_MEMORY_LOCATION #define MEM_LIST /* keep a list of all the allocated memory blocks */ -#define DEBUG_MEMORY_FREED -#endif - -#ifdef DEBUG_MEMORY_FREED -#define MEM_CLEANUP(p,l) memset((p), -1, (l)); -#else -#define MEM_CLEANUP(p,l) #endif #ifdef __cplusplus diff --git a/xpointer.c b/xpointer.c index cb2d2180..91bbebb6 100644 --- a/xpointer.c +++ b/xpointer.c @@ -11,7 +11,7 @@ #include "libxml.h" -/** +/* * TODO: better handling of error cases, the full expression should * be parsed beforehand instead of a progressive evaluation * TODO: Access into entities references are not supported now ...