1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

Heiko W. Rupp fixed a lot of comments to generate better API descriptions

* include/libxml/*.h: Heiko W. Rupp fixed a lot of comments
  to generate better API descriptions etc...
Daniel
This commit is contained in:
Daniel Veillard
2002-03-12 18:46:39 +00:00
parent 9ff8817e67
commit 61f261749f
23 changed files with 277 additions and 272 deletions

View File

@@ -1,3 +1,8 @@
Tue Mar 12 19:45:24 CET 2002 Daniel Veillard <daniel@veillard.com>
* include/libxml/*.h: Heiko W. Rupp fixed a lot of comments
to generate better API descriptions etc...
Mon Mar 11 10:10:30 CET 2002 Daniel Veillard <daniel@veillard.com> Mon Mar 11 10:10:30 CET 2002 Daniel Veillard <daniel@veillard.com>
* c14n.c: Fixing #74186, made sure all boolean expressions * c14n.c: Fixing #74186, made sure all boolean expressions

View File

@@ -15,7 +15,7 @@ extern "C" {
#endif #endif
/* /*
* Most of the back-end structures from XML and SGML are shared * Most of the back-end structures from XML and SGML are shared.
*/ */
typedef xmlParserCtxt docbParserCtxt; typedef xmlParserCtxt docbParserCtxt;
typedef xmlParserCtxtPtr docbParserCtxtPtr; typedef xmlParserCtxtPtr docbParserCtxtPtr;
@@ -49,7 +49,7 @@ docbDocPtr docbParseFile (const char *filename,
const char *encoding); const char *encoding);
/** /**
* Interfaces for the Push mode * Interfaces for the Push mode.
*/ */
void docbFreeParserCtxt (docbParserCtxtPtr ctxt); void docbFreeParserCtxt (docbParserCtxtPtr ctxt);
docbParserCtxtPtr docbCreatePushParserCtxt(docbSAXHandlerPtr sax, docbParserCtxtPtr docbCreatePushParserCtxt(docbSAXHandlerPtr sax,

View File

@@ -15,7 +15,7 @@ extern "C" {
#endif #endif
/* /*
* Most of the back-end structures from XML and HTML are shared * Most of the back-end structures from XML and HTML are shared.
*/ */
typedef xmlParserCtxt htmlParserCtxt; typedef xmlParserCtxt htmlParserCtxt;
typedef xmlParserCtxtPtr htmlParserCtxtPtr; typedef xmlParserCtxtPtr htmlParserCtxtPtr;
@@ -28,7 +28,7 @@ typedef xmlDocPtr htmlDocPtr;
typedef xmlNodePtr htmlNodePtr; typedef xmlNodePtr htmlNodePtr;
/* /*
* Internal description of an HTML element * Internal description of an HTML element.
*/ */
typedef struct _htmlElemDesc htmlElemDesc; typedef struct _htmlElemDesc htmlElemDesc;
typedef htmlElemDesc *htmlElemDescPtr; typedef htmlElemDesc *htmlElemDescPtr;
@@ -45,7 +45,7 @@ struct _htmlElemDesc {
}; };
/* /*
* Internal description of an HTML entity * Internal description of an HTML entity.
*/ */
typedef struct _htmlEntityDesc htmlEntityDesc; typedef struct _htmlEntityDesc htmlEntityDesc;
typedef htmlEntityDesc *htmlEntityDescPtr; typedef htmlEntityDesc *htmlEntityDescPtr;
@@ -96,7 +96,7 @@ int htmlIsScriptAttribute(const xmlChar *name);
int htmlHandleOmittedElem(int val); int htmlHandleOmittedElem(int val);
/** /**
* Interfaces for the Push mode * Interfaces for the Push mode.
*/ */
void htmlFreeParserCtxt (htmlParserCtxtPtr ctxt); void htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
htmlParserCtxtPtr htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, htmlParserCtxtPtr htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,

View File

@@ -22,35 +22,35 @@ extern "C" {
/** /**
* HTML_TEXT_NODE: * HTML_TEXT_NODE:
* *
* Macro, a text node in a HTML document is really implemented * Macro. A text node in a HTML document is really implemented
* the same way as a text node in an XML document. * the same way as a text node in an XML document.
*/ */
#define HTML_TEXT_NODE XML_TEXT_NODE #define HTML_TEXT_NODE XML_TEXT_NODE
/** /**
* HTML_ENTITY_REF_NODE: * HTML_ENTITY_REF_NODE:
* *
* Macro, an entity reference in a HTML document is really implemented * Macro. An entity reference in a HTML document is really implemented
* the same way as an entity reference in an XML document. * the same way as an entity reference in an XML document.
*/ */
#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE #define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
/** /**
* HTML_COMMENT_NODE: * HTML_COMMENT_NODE:
* *
* Macro, a comment in a HTML document is really implemented * Macro. A comment in a HTML document is really implemented
* the same way as a comment in an XML document. * the same way as a comment in an XML document.
*/ */
#define HTML_COMMENT_NODE XML_COMMENT_NODE #define HTML_COMMENT_NODE XML_COMMENT_NODE
/** /**
* HTML_PRESERVE_NODE: * HTML_PRESERVE_NODE:
* *
* Macro, a preserved node in a HTML document is really implemented * Macro. A preserved node in a HTML document is really implemented
* the same way as a CDATA section in an XML document. * the same way as a CDATA section in an XML document.
*/ */
#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE #define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
/** /**
* HTML_PI_NODE: * HTML_PI_NODE:
* *
* Macro, a processing instruction in a HTML document is really implemented * Macro. A processing instruction in a HTML document is really implemented
* the same way as a processing instruction in an XML document. * the same way as a processing instruction in an XML document.
*/ */
#define HTML_PI_NODE XML_PI_NODE #define HTML_PI_NODE XML_PI_NODE

View File

@@ -31,20 +31,20 @@ extern "C" {
/** /**
* XML_CATALOGS_NAMESPACE: * XML_CATALOGS_NAMESPACE:
* *
* The namespace for the XML Catalogs elements * The namespace for the XML Catalogs elements.
*/ */
#define XML_CATALOGS_NAMESPACE \ #define XML_CATALOGS_NAMESPACE \
(const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog" (const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog"
/** /**
* XML_CATALOG_PI: * XML_CATALOG_PI:
* *
* the specific XML Catalog Processing Instuction name * The specific XML Catalog Processing Instuction name.
*/ */
#define XML_CATALOG_PI \ #define XML_CATALOG_PI \
(const xmlChar *) "oasis-xml-catalog" (const xmlChar *) "oasis-xml-catalog"
/* /*
* The API is voluntarily limited to general cataloging * The API is voluntarily limited to general cataloging.
*/ */
typedef enum { typedef enum {
XML_CATA_PREFER_NONE = 0, XML_CATA_PREFER_NONE = 0,
@@ -63,7 +63,7 @@ typedef struct _xmlCatalog xmlCatalog;
typedef xmlCatalog *xmlCatalogPtr; typedef xmlCatalog *xmlCatalogPtr;
/* /*
* Operations on a given catalog * Operations on a given catalog.
*/ */
xmlCatalogPtr xmlNewCatalog (int sgml); xmlCatalogPtr xmlNewCatalog (int sgml);
xmlCatalogPtr xmlLoadACatalog (const char *filename); xmlCatalogPtr xmlLoadACatalog (const char *filename);
@@ -90,7 +90,7 @@ void xmlFreeCatalog (xmlCatalogPtr catal);
int xmlCatalogIsEmpty (xmlCatalogPtr catal); int xmlCatalogIsEmpty (xmlCatalogPtr catal);
/* /*
* Global operations * Global operations.
*/ */
void xmlInitializeCatalog (void); void xmlInitializeCatalog (void);
int xmlLoadCatalog (const char *filename); int xmlLoadCatalog (const char *filename);
@@ -122,7 +122,7 @@ xmlChar * xmlCatalogLocalResolve (void *catalogs,
xmlChar * xmlCatalogLocalResolveURI(void *catalogs, xmlChar * xmlCatalogLocalResolveURI(void *catalogs,
const xmlChar *URI); const xmlChar *URI);
/* /*
* Preference settings * Preference settings.
*/ */
int xmlCatalogSetDebug (int level); int xmlCatalogSetDebug (int level);
xmlCatalogPrefer xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer); xmlCatalogPrefer xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);

View File

@@ -19,7 +19,7 @@ extern "C" {
#endif #endif
/* /*
* The standard Dump routines * The standard Dump routines.
*/ */
void xmlDebugDumpString (FILE *output, void xmlDebugDumpString (FILE *output,
const xmlChar *str); const xmlChar *str);
@@ -62,16 +62,16 @@ LIBXML_DLL_IMPORT const char *xmlBoolToText (int boolval);
* xmlShellReadlineFunc: * xmlShellReadlineFunc:
* @prompt: a string prompt * @prompt: a string prompt
* *
* This is a generic signature for the XML shell input function * This is a generic signature for the XML shell input function.
* *
* Returns a string which will be freed by the Shell * Returns a string which will be freed by the Shell.
*/ */
typedef char * (* xmlShellReadlineFunc)(char *prompt); typedef char * (* xmlShellReadlineFunc)(char *prompt);
/** /**
* xmlShellCtxt: * xmlShellCtxt:
* *
* A debugging shell context * A debugging shell context.
* TODO: add the defined function tables. * TODO: add the defined function tables.
*/ */
typedef struct _xmlShellCtxt xmlShellCtxt; typedef struct _xmlShellCtxt xmlShellCtxt;
@@ -93,9 +93,9 @@ struct _xmlShellCtxt {
* @node: a first node * @node: a first node
* @node2: a second node * @node2: a second node
* *
* This is a generic signature for the XML shell functions * This is a generic signature for the XML shell functions.
* *
* Returns an int, negative returns indicating errors * Returns an int, negative returns indicating errors.
*/ */
typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt, typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
char *arg, char *arg,

View File

@@ -36,8 +36,8 @@ extern "C" {
/** /**
* xmlCharEncoding: * xmlCharEncoding:
* *
* Predefined values for some standard encodings * Predefined values for some standard encodings.
* Libxml don't do beforehand translation on UTF8, ISOLatinX * Libxml don't do beforehand translation on UTF8, ISOLatinX.
* It also support UTF16 (LE and BE) by default. * It also support UTF16 (LE and BE) by default.
* *
* Anything else would have to be translated to UTF8 before being * Anything else would have to be translated to UTF8 before being
@@ -108,7 +108,7 @@ typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
* Take a block of UTF-8 chars in and try to convert it to an other * Take a block of UTF-8 chars in and try to convert it to an other
* encoding. * encoding.
* Note: a first call designed to produce heading info is called with * Note: a first call designed to produce heading info is called with
* in = NULL. If stateful this should also initialize the encoder state * in = NULL. If stateful this should also initialize the encoder state.
* *
* Returns the number of byte written, or -1 by lack of space, or -2 * Returns the number of byte written, or -1 by lack of space, or -2
* if the transcoding failed. * if the transcoding failed.
@@ -122,7 +122,7 @@ typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
/* /*
* Block defining the handlers for non UTF-8 encodings. * Block defining the handlers for non UTF-8 encodings.
* If iconv is supported, there is two extra fields * If iconv is supported, there is two extra fields.
*/ */
typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler; typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
@@ -146,7 +146,7 @@ extern "C" {
#endif #endif
/* /*
* Interfaces for encoding handlers * Interfaces for encoding handlers.
*/ */
void xmlInitCharEncodingHandlers (void); void xmlInitCharEncodingHandlers (void);
void xmlCleanupCharEncodingHandlers (void); void xmlCleanupCharEncodingHandlers (void);
@@ -158,7 +158,7 @@ xmlCharEncodingHandlerPtr
/* /*
* Interfaces for encoding names and aliases * Interfaces for encoding names and aliases.
*/ */
int xmlAddEncodingAlias (const char *name, int xmlAddEncodingAlias (const char *name,
const char *alias); const char *alias);
@@ -202,7 +202,7 @@ int isolat1ToUTF8 (unsigned char *out,
const unsigned char *in, const unsigned char *in,
int *inlen); int *inlen);
/* /*
* exports additional "UTF-8 aware" string routines which are * exports additional "UTF-8 aware" string routines which are.
*/ */
int xmlCheckUTF8 (const unsigned char *utf); int xmlCheckUTF8 (const unsigned char *utf);

View File

@@ -16,7 +16,7 @@ extern "C" {
#endif #endif
/* /*
* The different valid entity types * The different valid entity types.
*/ */
typedef enum { typedef enum {
XML_INTERNAL_GENERAL_ENTITY = 1, XML_INTERNAL_GENERAL_ENTITY = 1,
@@ -55,8 +55,8 @@ struct _xmlEntity {
}; };
/* /*
* All entities are stored in an hash table * All entities are stored in an hash table.
* there is 2 separate hash tables for global and parameter entities * There is 2 separate hash tables for global and parameter entities.
*/ */
typedef struct _xmlHashTable xmlEntitiesTable; typedef struct _xmlHashTable xmlEntitiesTable;

View File

@@ -25,7 +25,7 @@ extern "C" {
#endif #endif
/* /*
* The hash table * The hash table.
*/ */
typedef struct _xmlHashTable xmlHashTable; typedef struct _xmlHashTable xmlHashTable;
typedef xmlHashTable *xmlHashTablePtr; typedef xmlHashTable *xmlHashTablePtr;
@@ -38,7 +38,7 @@ typedef xmlHashTable *xmlHashTablePtr;
* @payload: the data in the hash * @payload: the data in the hash
* @name: the name associated * @name: the name associated
* *
* Callback to free data from a hash * Callback to free data from a hash.
*/ */
typedef void (*xmlHashDeallocator)(void *payload, xmlChar *name); typedef void (*xmlHashDeallocator)(void *payload, xmlChar *name);
/** /**
@@ -46,9 +46,9 @@ typedef void (*xmlHashDeallocator)(void *payload, xmlChar *name);
* @payload: the data in the hash * @payload: the data in the hash
* @name: the name associated * @name: the name associated
* *
* Callback to copy data from a hash * Callback to copy data from a hash.
* *
* Returns a copy of the data or NULL in case of error * Returns a copy of the data or NULL in case of error.
*/ */
typedef void *(*xmlHashCopier)(void *payload, xmlChar *name); typedef void *(*xmlHashCopier)(void *payload, xmlChar *name);
/** /**
@@ -57,7 +57,7 @@ typedef void *(*xmlHashCopier)(void *payload, xmlChar *name);
* @data: extra scannner data * @data: extra scannner data
* @name: the name associated * @name: the name associated
* *
* Callback when scanning data in a hash with the simple scanner * Callback when scanning data in a hash with the simple scanner.
*/ */
typedef void (*xmlHashScanner)(void *payload, void *data, xmlChar *name); typedef void (*xmlHashScanner)(void *payload, void *data, xmlChar *name);
/** /**
@@ -68,21 +68,21 @@ typedef void (*xmlHashScanner)(void *payload, void *data, xmlChar *name);
* @name2: the second name associated * @name2: the second name associated
* @name3: the third name associated * @name3: the third name associated
* *
* Callback when scanning data in a hash with the full scanner * Callback when scanning data in a hash with the full scanner.
*/ */
typedef void (*xmlHashScannerFull)(void *payload, void *data, typedef void (*xmlHashScannerFull)(void *payload, void *data,
const xmlChar *name, const xmlChar *name2, const xmlChar *name, const xmlChar *name2,
const xmlChar *name3); const xmlChar *name3);
/* /*
* Constructor and destructor * Constructor and destructor.
*/ */
xmlHashTablePtr xmlHashCreate (int size); xmlHashTablePtr xmlHashCreate (int size);
void xmlHashFree (xmlHashTablePtr table, void xmlHashFree (xmlHashTablePtr table,
xmlHashDeallocator f); xmlHashDeallocator f);
/* /*
* Add a new entry to the hash table * Add a new entry to the hash table.
*/ */
int xmlHashAddEntry (xmlHashTablePtr table, int xmlHashAddEntry (xmlHashTablePtr table,
const xmlChar *name, const xmlChar *name,
@@ -113,7 +113,7 @@ int xmlHashUpdateEntry3(xmlHashTablePtr table,
xmlHashDeallocator f); xmlHashDeallocator f);
/* /*
* Remove an entry from the hash table * Remove an entry from the hash table.
*/ */
int xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name, int xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name,
xmlHashDeallocator f); xmlHashDeallocator f);
@@ -124,7 +124,7 @@ int xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name,
xmlHashDeallocator f); xmlHashDeallocator f);
/* /*
* Retrieve the userdata * Retrieve the userdata.
*/ */
void * xmlHashLookup (xmlHashTablePtr table, void * xmlHashLookup (xmlHashTablePtr table,
const xmlChar *name); const xmlChar *name);
@@ -137,7 +137,7 @@ void * xmlHashLookup3 (xmlHashTablePtr table,
const xmlChar *name3); const xmlChar *name3);
/* /*
* Helpers * Helpers.
*/ */
xmlHashTablePtr xmlHashCopy (xmlHashTablePtr table, xmlHashTablePtr xmlHashCopy (xmlHashTablePtr table,
xmlHashCopier f); xmlHashCopier f);

View File

@@ -32,7 +32,7 @@ typedef xmlList *xmlListPtr;
* xmlListDeallocator: * xmlListDeallocator:
* @lk: the data to deallocate * @lk: the data to deallocate
* *
* Callback function used to free data from a list * Callback function used to free data from a list.
*/ */
typedef void (*xmlListDeallocator) (xmlLinkPtr lk); typedef void (*xmlListDeallocator) (xmlLinkPtr lk);
/** /**
@@ -40,9 +40,9 @@ typedef void (*xmlListDeallocator) (xmlLinkPtr lk);
* @data0: the first data * @data0: the first data
* @data1: the second data * @data1: the second data
* *
* Callback function used to compare 2 data * Callback function used to compare 2 data.
* *
* Returns 0 is equality, -1 or 1 otherwise depending on the ordering * Returns 0 is equality, -1 or 1 otherwise depending on the ordering.
*/ */
typedef int (*xmlListDataCompare) (const void *data0, const void *data1); typedef int (*xmlListDataCompare) (const void *data0, const void *data1);
/** /**
@@ -50,9 +50,9 @@ typedef int (*xmlListDataCompare) (const void *data0, const void *data1);
* @data: the data found in the list * @data: the data found in the list
* @user: extra user provided data to the walker * @user: extra user provided data to the walker
* *
* Callback function used when walking a list with xmlListWalk() * Callback function used when walking a list with xmlListWalk().
* *
* Returns 0 to stop walking the list, 1 otherwise * Returns 0 to stop walking the list, 1 otherwise.
*/ */
typedef int (*xmlListWalker) (const void *data, const void *user); typedef int (*xmlListWalker) (const void *data, const void *user);

View File

@@ -35,8 +35,8 @@ extern "C" {
* @hour: the hour * @hour: the hour
* @minute: the minute * @minute: the minute
* *
* A callback for the xmlNanoFTPList command * A callback for the xmlNanoFTPList command.
* Note that only one of year and day:minute are specified * Note that only one of year and day:minute are specified.
*/ */
typedef void (*ftpListCallback) (void *userData, typedef void (*ftpListCallback) (void *userData,
const char *filename, const char *attrib, const char *filename, const char *attrib,
@@ -50,7 +50,7 @@ typedef void (*ftpListCallback) (void *userData,
* @data: the data received * @data: the data received
* @len: its size in bytes * @len: its size in bytes
* *
* A callback for the xmlNanoFTPGet command * A callback for the xmlNanoFTPGet command.
*/ */
typedef void (*ftpDataCallback) (void *userData, typedef void (*ftpDataCallback) (void *userData,
const char *data, const char *data,
@@ -63,14 +63,14 @@ void xmlNanoFTPInit (void);
void xmlNanoFTPCleanup (void); void xmlNanoFTPCleanup (void);
/* /*
* Creating/freeing contexts * Creating/freeing contexts.
*/ */
void * xmlNanoFTPNewCtxt (const char *URL); void * xmlNanoFTPNewCtxt (const char *URL);
void xmlNanoFTPFreeCtxt (void * ctx); void xmlNanoFTPFreeCtxt (void * ctx);
void * xmlNanoFTPConnectTo (const char *server, void * xmlNanoFTPConnectTo (const char *server,
int port); int port);
/* /*
* Opening/closing session connections * Opening/closing session connections.
*/ */
void * xmlNanoFTPOpen (const char *URL); void * xmlNanoFTPOpen (const char *URL);
int xmlNanoFTPConnect (void *ctx); int xmlNanoFTPConnect (void *ctx);
@@ -86,13 +86,13 @@ int xmlNanoFTPUpdateURL (void *ctx,
const char *URL); const char *URL);
/* /*
* Rathern internal commands * Rather internal commands.
*/ */
int xmlNanoFTPGetResponse (void *ctx); int xmlNanoFTPGetResponse (void *ctx);
int xmlNanoFTPCheckResponse (void *ctx); int xmlNanoFTPCheckResponse (void *ctx);
/* /*
* CD/DIR/GET handlers * CD/DIR/GET handlers.
*/ */
int xmlNanoFTPCwd (void *ctx, int xmlNanoFTPCwd (void *ctx,
char *directory); char *directory);

View File

@@ -27,7 +27,7 @@ extern "C" {
/** /**
* xmlParserInput: * xmlParserInput:
* *
* an xmlParserInput is an input flow for the XML processor. * An xmlParserInput is an input flow for the XML processor.
* Each entity parsed is associated an xmlParserInput (except the * Each entity parsed is associated an xmlParserInput (except the
* few predefined ones). This is the case both for internal entities * few predefined ones). This is the case both for internal entities
* - in which case the flow is already completely in memory - or * - in which case the flow is already completely in memory - or
@@ -39,7 +39,7 @@ extern "C" {
* xmlParserInputDeallocate: * xmlParserInputDeallocate:
* @str: the string to deallocate * @str: the string to deallocate
* *
* Callback for freeing some parser input allocations * Callback for freeing some parser input allocations.
*/ */
typedef void (* xmlParserInputDeallocate)(xmlChar *str); typedef void (* xmlParserInputDeallocate)(xmlChar *str);
@@ -65,7 +65,7 @@ struct _xmlParserInput {
/** /**
* xmlParserNodeInfo: * xmlParserNodeInfo:
* *
* the parser can be asked to collect Node informations, i.e. at what * The parser can be asked to collect Node informations, i.e. at what
* place in the file they were detected. * place in the file they were detected.
* NOTE: This is off by default and not very well tested. * NOTE: This is off by default and not very well tested.
*/ */
@@ -92,8 +92,8 @@ struct _xmlParserNodeInfoSeq {
/** /**
* xmlParserInputState: * xmlParserInputState:
* *
* The parser is now working also as a state based parser * The parser is now working also as a state based parser.
* The recursive one use the state info for entities processing * The recursive one use the state info for entities processing.
*/ */
typedef enum { typedef enum {
XML_PARSER_EOF = -1, /* nothing is to be parsed */ XML_PARSER_EOF = -1, /* nothing is to be parsed */
@@ -119,8 +119,8 @@ typedef enum {
/** /**
* XML_DETECT_IDS: * XML_DETECT_IDS:
* *
* Bit in the loadsubset context field to tell to do ID/REFs lookups * Bit in the loadsubset context field to tell to do ID/REFs lookups.
* Use it to initialize xmlLoadExtDtdDefaultValue * Use it to initialize xmlLoadExtDtdDefaultValue.
*/ */
#define XML_DETECT_IDS 2 #define XML_DETECT_IDS 2
@@ -128,8 +128,8 @@ typedef enum {
* XML_COMPLETE_ATTRS: * XML_COMPLETE_ATTRS:
* *
* Bit in the loadsubset context field to tell to do complete the * Bit in the loadsubset context field to tell to do complete the
* elements attributes lists with the ones defaulted from the DTDs * elements attributes lists with the ones defaulted from the DTDs.
* Use it to initialize xmlLoadExtDtdDefaultValue * Use it to initialize xmlLoadExtDtdDefaultValue.
*/ */
#define XML_COMPLETE_ATTRS 4 #define XML_COMPLETE_ATTRS 4
@@ -137,7 +137,7 @@ typedef enum {
* xmlParserCtxt: * xmlParserCtxt:
* *
* The parser context. * The parser context.
* NOTE This doesn't completely defines the parser state, the (current ?) * NOTE This doesn't completely define the parser state, the (current ?)
* design of the parser uses recursive function calls since this allow * design of the parser uses recursive function calls since this allow
* and easy mapping from the production rules of the specification * and easy mapping from the production rules of the specification
* to the actual code. The drawback is that the actual function call * to the actual code. The drawback is that the actual function call
@@ -224,7 +224,7 @@ struct _xmlParserCtxt {
/** /**
* xmlSAXLocator: * xmlSAXLocator:
* *
* a SAX Locator. * A SAX Locator.
*/ */
struct _xmlSAXLocator { struct _xmlSAXLocator {
const xmlChar *(*getPublicId)(void *ctx); const xmlChar *(*getPublicId)(void *ctx);
@@ -236,7 +236,7 @@ struct _xmlSAXLocator {
/** /**
* xmlSAXHandler: * xmlSAXHandler:
* *
* a SAX handler is bunch of callbacks called by the parser when processing * A SAX handler is bunch of callbacks called by the parser when processing
* of the input generate data or structure informations. * of the input generate data or structure informations.
*/ */
@@ -289,7 +289,7 @@ typedef void (*externalSubsetSAXFunc) (void *ctx,
* @ctx: the user data (XML parser context) * @ctx: the user data (XML parser context)
* @name: The entity name * @name: The entity name
* *
* Get an entity by name * Get an entity by name.
* *
* Returns the xmlEntityPtr if found. * Returns the xmlEntityPtr if found.
*/ */
@@ -300,7 +300,7 @@ typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
* @ctx: the user data (XML parser context) * @ctx: the user data (XML parser context)
* @name: The entity name * @name: The entity name
* *
* Get a parameter entity by name * Get a parameter entity by name.
* *
* Returns the xmlEntityPtr if found. * Returns the xmlEntityPtr if found.
*/ */
@@ -315,7 +315,7 @@ typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
* @systemId: The system ID of the entity * @systemId: The system ID of the entity
* @content: the entity value (without processing). * @content: the entity value (without processing).
* *
* An entity definition has been parsed * An entity definition has been parsed.
*/ */
typedef void (*entityDeclSAXFunc) (void *ctx, typedef void (*entityDeclSAXFunc) (void *ctx,
const xmlChar *name, const xmlChar *name,
@@ -346,7 +346,7 @@ typedef void (*notationDeclSAXFunc)(void *ctx,
* @defaultValue: the attribute default value * @defaultValue: the attribute default value
* @tree: the tree of enumerated value set * @tree: the tree of enumerated value set
* *
* An attribute definition has been parsed * An attribute definition has been parsed.
*/ */
typedef void (*attributeDeclSAXFunc)(void *ctx, typedef void (*attributeDeclSAXFunc)(void *ctx,
const xmlChar *elem, const xmlChar *elem,
@@ -362,7 +362,7 @@ typedef void (*attributeDeclSAXFunc)(void *ctx,
* @type: the element type * @type: the element type
* @content: the element value tree * @content: the element value tree
* *
* An element definition has been parsed * An element definition has been parsed.
*/ */
typedef void (*elementDeclSAXFunc)(void *ctx, typedef void (*elementDeclSAXFunc)(void *ctx,
const xmlChar *name, const xmlChar *name,
@@ -376,7 +376,7 @@ typedef void (*elementDeclSAXFunc)(void *ctx,
* @systemId: The system ID of the entity * @systemId: The system ID of the entity
* @notationName: the name of the notation * @notationName: the name of the notation
* *
* What to do when an unparsed entity declaration is parsed * What to do when an unparsed entity declaration is parsed.
*/ */
typedef void (*unparsedEntityDeclSAXFunc)(void *ctx, typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
const xmlChar *name, const xmlChar *name,
@@ -388,7 +388,7 @@ typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
* @ctx: the user data (XML parser context) * @ctx: the user data (XML parser context)
* @loc: A SAX Locator * @loc: A SAX Locator
* *
* Receive the document locator at startup, actually xmlDefaultSAXLocator * Receive the document locator at startup, actually xmlDefaultSAXLocator.
* Everything is available on the context, so this is useless in our case. * Everything is available on the context, so this is useless in our case.
*/ */
typedef void (*setDocumentLocatorSAXFunc) (void *ctx, typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
@@ -397,14 +397,14 @@ typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
* startDocumentSAXFunc: * startDocumentSAXFunc:
* @ctx: the user data (XML parser context) * @ctx: the user data (XML parser context)
* *
* called when the document start being processed. * Called when the document start being processed.
*/ */
typedef void (*startDocumentSAXFunc) (void *ctx); typedef void (*startDocumentSAXFunc) (void *ctx);
/** /**
* endDocumentSAXFunc: * endDocumentSAXFunc:
* @ctx: the user data (XML parser context) * @ctx: the user data (XML parser context)
* *
* called when the document end has been detected. * Called when the document end has been detected.
*/ */
typedef void (*endDocumentSAXFunc) (void *ctx); typedef void (*endDocumentSAXFunc) (void *ctx);
/** /**
@@ -413,7 +413,7 @@ typedef void (*endDocumentSAXFunc) (void *ctx);
* @name: The element name, including namespace prefix * @name: The element name, including namespace prefix
* @atts: An array of name/value attributes pairs, NULL terminated * @atts: An array of name/value attributes pairs, NULL terminated
* *
* called when an opening tag has been processed. * Called when an opening tag has been processed.
*/ */
typedef void (*startElementSAXFunc) (void *ctx, typedef void (*startElementSAXFunc) (void *ctx,
const xmlChar *name, const xmlChar *name,
@@ -423,7 +423,7 @@ typedef void (*startElementSAXFunc) (void *ctx,
* @ctx: the user data (XML parser context) * @ctx: the user data (XML parser context)
* @name: The element name * @name: The element name
* *
* called when the end of an element has been detected. * Called when the end of an element has been detected.
*/ */
typedef void (*endElementSAXFunc) (void *ctx, typedef void (*endElementSAXFunc) (void *ctx,
const xmlChar *name); const xmlChar *name);
@@ -446,7 +446,7 @@ typedef void (*attributeSAXFunc) (void *ctx,
* @ctx: the user data (XML parser context) * @ctx: the user data (XML parser context)
* @name: The entity name * @name: The entity name
* *
* called when an entity reference is detected. * Called when an entity reference is detected.
*/ */
typedef void (*referenceSAXFunc) (void *ctx, typedef void (*referenceSAXFunc) (void *ctx,
const xmlChar *name); const xmlChar *name);
@@ -456,7 +456,7 @@ typedef void (*referenceSAXFunc) (void *ctx,
* @ch: a xmlChar string * @ch: a xmlChar string
* @len: the number of xmlChar * @len: the number of xmlChar
* *
* receiving some chars from the parser. * Receiving some chars from the parser.
*/ */
typedef void (*charactersSAXFunc) (void *ctx, typedef void (*charactersSAXFunc) (void *ctx,
const xmlChar *ch, const xmlChar *ch,
@@ -467,8 +467,8 @@ typedef void (*charactersSAXFunc) (void *ctx,
* @ch: a xmlChar string * @ch: a xmlChar string
* @len: the number of xmlChar * @len: the number of xmlChar
* *
* receiving some ignorable whitespaces from the parser. * Receiving some ignorable whitespaces from the parser.
* UNUSED: by default the DOM building will use characters * UNUSED: by default the DOM building will use characters.
*/ */
typedef void (*ignorableWhitespaceSAXFunc) (void *ctx, typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
const xmlChar *ch, const xmlChar *ch,
@@ -499,7 +499,7 @@ typedef void (*commentSAXFunc) (void *ctx,
* @value: The pcdata content * @value: The pcdata content
* @len: the block length * @len: the block length
* *
* called when a pcdata block has been parsed * Called when a pcdata block has been parsed.
*/ */
typedef void (*cdataBlockSAXFunc) ( typedef void (*cdataBlockSAXFunc) (
void *ctx, void *ctx,
@@ -511,7 +511,7 @@ typedef void (*cdataBlockSAXFunc) (
* @msg: the message to display/transmit * @msg: the message to display/transmit
* @...: extra parameters for the message display * @...: extra parameters for the message display
* *
* Display and format a warning messages, callback * Display and format a warning messages, callback.
*/ */
typedef void (*warningSAXFunc) (void *ctx, typedef void (*warningSAXFunc) (void *ctx,
const char *msg, ...); const char *msg, ...);
@@ -521,7 +521,7 @@ typedef void (*warningSAXFunc) (void *ctx,
* @msg: the message to display/transmit * @msg: the message to display/transmit
* @...: extra parameters for the message display * @...: extra parameters for the message display
* *
* Display and format an error messages, callback * Display and format an error messages, callback.
*/ */
typedef void (*errorSAXFunc) (void *ctx, typedef void (*errorSAXFunc) (void *ctx,
const char *msg, ...); const char *msg, ...);
@@ -531,7 +531,7 @@ typedef void (*errorSAXFunc) (void *ctx,
* @msg: the message to display/transmit * @msg: the message to display/transmit
* @...: extra parameters for the message display * @...: extra parameters for the message display
* *
* Display and format fatal error messages, callback * Display and format fatal error messages, callback.
*/ */
typedef void (*fatalErrorSAXFunc) (void *ctx, typedef void (*fatalErrorSAXFunc) (void *ctx,
const char *msg, ...); const char *msg, ...);
@@ -548,7 +548,7 @@ typedef int (*isStandaloneSAXFunc) (void *ctx);
* hasInternalSubsetSAXFunc: * hasInternalSubsetSAXFunc:
* @ctx: the user data (XML parser context) * @ctx: the user data (XML parser context)
* *
* Does this document has an internal subset * Does this document has an internal subset.
* *
* Returns 1 if true * Returns 1 if true
*/ */
@@ -557,7 +557,7 @@ typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
* hasExternalSubsetSAXFunc: * hasExternalSubsetSAXFunc:
* @ctx: the user data (XML parser context) * @ctx: the user data (XML parser context)
* *
* Does this document has an external subset * Does this document has an external subset?
* *
* Returns 1 if true * Returns 1 if true
*/ */
@@ -600,9 +600,9 @@ struct _xmlSAXHandler {
* @ID: The Public ID of the resource requested * @ID: The Public ID of the resource requested
* @context: the XML parser context * @context: the XML parser context
* *
* External entity loaders types * External entity loaders types.
* *
* Returns the entity input parser * Returns the entity input parser.
*/ */
typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL, typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
const char *ID, const char *ID,
@@ -624,14 +624,14 @@ LIBXML_DLL_IMPORT extern xmlSAXHandler docbDefaultSAXHandler;
*/ */
/* /*
* entity substitution default behavior. * Entity substitution default behavior.
*/ */
#ifdef VMS #ifdef VMS
/** /**
* xmlSubstituteEntitiesDefaultValue: * xmlSubstituteEntitiesDefaultValue:
* *
* global variable controlling the entity substitution default behavior * Global variable controlling the entity substitution default behavior.
*/ */
LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultVal; LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultVal;
#define xmlSubstituteEntitiesDefaultValue xmlSubstituteEntitiesDefaultVal #define xmlSubstituteEntitiesDefaultValue xmlSubstituteEntitiesDefaultVal
@@ -804,7 +804,7 @@ int xmlSetFeature (xmlParserCtxtPtr ctxt,
void *value); void *value);
/* /*
* Interfaces for the Push mode * Interfaces for the Push mode.
*/ */
xmlParserCtxtPtr xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, xmlParserCtxtPtr xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
void *user_data, void *user_data,
@@ -817,7 +817,7 @@ int xmlParseChunk (xmlParserCtxtPtr ctxt,
int terminate); int terminate);
/* /*
* Special I/O mode * Special I/O mode.
*/ */
xmlParserCtxtPtr xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax, xmlParserCtxtPtr xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
@@ -832,7 +832,7 @@ xmlParserInputPtr xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
xmlCharEncoding enc); xmlCharEncoding enc);
/* /*
* Node infos * Node infos.
*/ */
const xmlParserNodeInfo* const xmlParserNodeInfo*
xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt, xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt,
@@ -845,7 +845,7 @@ void xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
const xmlParserNodeInfoPtr info); const xmlParserNodeInfoPtr info);
/* /*
* External entities handling actually implemented in xmlIO * External entities handling actually implemented in xmlIO.
*/ */
void xmlSetExternalEntityLoader(xmlExternalEntityLoader f); void xmlSetExternalEntityLoader(xmlExternalEntityLoader f);

View File

@@ -31,8 +31,8 @@ extern "C" {
/** /**
* INPUT_CHUNK: * INPUT_CHUNK:
* *
* The parser tries to always have that amount of input ready * The parser tries to always have that amount of input ready.
* one of the point is providing context when reporting errors * One of the point is providing context when reporting errors.
*/ */
#define INPUT_CHUNK 250 #define INPUT_CHUNK 250
@@ -45,7 +45,7 @@ extern "C" {
* IS_CHAR: * IS_CHAR:
* @c: an UNICODE value (int) * @c: an UNICODE value (int)
* *
* Macro to check the following production in the XML spec * Macro to check the following production in the XML spec:
* *
* [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]
* | [#x10000-#x10FFFF] * | [#x10000-#x10FFFF]
@@ -61,7 +61,7 @@ extern "C" {
* IS_BLANK: * IS_BLANK:
* @c: an UNICODE value (int) * @c: an UNICODE value (int)
* *
* Macro to check the following production in the XML spec * Macro to check the following production in the XML spec:
* *
* [3] S ::= (#x20 | #x9 | #xD | #xA)+ * [3] S ::= (#x20 | #x9 | #xD | #xA)+
*/ */
@@ -72,7 +72,7 @@ extern "C" {
* IS_BASECHAR: * IS_BASECHAR:
* @c: an UNICODE value (int) * @c: an UNICODE value (int)
* *
* Macro to check the following production in the XML spec * Macro to check the following production in the XML spec:
* *
* [85] BaseChar ::= ... long list see REC ... * [85] BaseChar ::= ... long list see REC ...
*/ */
@@ -82,7 +82,7 @@ extern "C" {
* IS_DIGIT: * IS_DIGIT:
* @c: an UNICODE value (int) * @c: an UNICODE value (int)
* *
* Macro to check the following production in the XML spec * Macro to check the following production in the XML spec:
* *
* [88] Digit ::= ... long list see REC ... * [88] Digit ::= ... long list see REC ...
*/ */
@@ -92,7 +92,7 @@ extern "C" {
* IS_COMBINING: * IS_COMBINING:
* @c: an UNICODE value (int) * @c: an UNICODE value (int)
* *
* Macro to check the following production in the XML spec * Macro to check the following production in the XML spec:
* *
* [87] CombiningChar ::= ... long list see REC ... * [87] CombiningChar ::= ... long list see REC ...
*/ */
@@ -102,7 +102,7 @@ extern "C" {
* IS_EXTENDER: * IS_EXTENDER:
* @c: an UNICODE value (int) * @c: an UNICODE value (int)
* *
* Macro to check the following production in the XML spec * Macro to check the following production in the XML spec:
* *
* *
* [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 | * [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 |
@@ -115,7 +115,7 @@ extern "C" {
* IS_IDEOGRAPHIC: * IS_IDEOGRAPHIC:
* @c: an UNICODE value (int) * @c: an UNICODE value (int)
* *
* Macro to check the following production in the XML spec * Macro to check the following production in the XML spec:
* *
* *
* [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029] * [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
@@ -126,7 +126,7 @@ extern "C" {
* IS_LETTER: * IS_LETTER:
* @c: an UNICODE value (int) * @c: an UNICODE value (int)
* *
* Macro to check the following production in the XML spec * Macro to check the following production in the XML spec:
* *
* *
* [84] Letter ::= BaseChar | Ideographic * [84] Letter ::= BaseChar | Ideographic
@@ -138,7 +138,7 @@ extern "C" {
* IS_PUBIDCHAR: * IS_PUBIDCHAR:
* @c: an UNICODE value (int) * @c: an UNICODE value (int)
* *
* Macro to check the following production in the XML spec * Macro to check the following production in the XML spec:
* *
* *
* [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
@@ -149,7 +149,7 @@ extern "C" {
* SKIP_EOL: * SKIP_EOL:
* @p: and UTF8 string pointer * @p: and UTF8 string pointer
* *
* Skips the end of line chars * Skips the end of line chars.
*/ */
#define SKIP_EOL(p) \ #define SKIP_EOL(p) \
if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; } \ if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; } \
@@ -159,7 +159,7 @@ extern "C" {
* MOVETO_ENDTAG: * MOVETO_ENDTAG:
* @p: and UTF8 string pointer * @p: and UTF8 string pointer
* *
* Skips to the next '>' char * Skips to the next '>' char.
*/ */
#define MOVETO_ENDTAG(p) \ #define MOVETO_ENDTAG(p) \
while ((*p) && (*(p) != '>')) (p)++ while ((*p) && (*(p) != '>')) (p)++
@@ -168,20 +168,20 @@ extern "C" {
* MOVETO_STARTTAG: * MOVETO_STARTTAG:
* @p: and UTF8 string pointer * @p: and UTF8 string pointer
* *
* Skips to the next '<' char * Skips to the next '<' char.
*/ */
#define MOVETO_STARTTAG(p) \ #define MOVETO_STARTTAG(p) \
while ((*p) && (*(p) != '<')) (p)++ while ((*p) && (*(p) != '<')) (p)++
/** /**
* Global variables used for predefined strings * Global variables used for predefined strings.
*/ */
LIBXML_DLL_IMPORT extern const xmlChar xmlStringText[]; LIBXML_DLL_IMPORT extern const xmlChar xmlStringText[];
LIBXML_DLL_IMPORT extern const xmlChar xmlStringTextNoenc[]; LIBXML_DLL_IMPORT extern const xmlChar xmlStringTextNoenc[];
LIBXML_DLL_IMPORT extern const xmlChar xmlStringComment[]; LIBXML_DLL_IMPORT extern const xmlChar xmlStringComment[];
/* /*
* Function to finish the work of the macros where needed * Function to finish the work of the macros where needed.
*/ */
int xmlIsBaseChar (int c); int xmlIsBaseChar (int c);
int xmlIsBlank (int c); int xmlIsBlank (int c);
@@ -194,7 +194,7 @@ int xmlIsCombining (int c);
int xmlIsChar (int c); int xmlIsChar (int c);
/** /**
* Parser context * Parser context.
*/ */
xmlParserCtxtPtr xmlCreateFileParserCtxt (const char *filename); xmlParserCtxtPtr xmlCreateFileParserCtxt (const char *filename);
xmlParserCtxtPtr xmlCreateMemoryParserCtxt(const char *buffer, xmlParserCtxtPtr xmlCreateMemoryParserCtxt(const char *buffer,
@@ -215,7 +215,7 @@ void xmlHandleEntity (xmlParserCtxtPtr ctxt,
xmlEntityPtr entity); xmlEntityPtr entity);
/** /**
* Input Streams * Input Streams.
*/ */
xmlParserInputPtr xmlNewStringInputStream (xmlParserCtxtPtr ctxt, xmlParserInputPtr xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
const xmlChar *buffer); const xmlChar *buffer);
@@ -243,7 +243,7 @@ xmlChar * xmlParseQuotedString (xmlParserCtxtPtr ctxt);
void xmlParseNamespace (xmlParserCtxtPtr ctxt); void xmlParseNamespace (xmlParserCtxtPtr ctxt);
/** /**
* Generic production rules * Generic production rules.
*/ */
xmlChar * xmlScanName (xmlParserCtxtPtr ctxt); xmlChar * xmlScanName (xmlParserCtxtPtr ctxt);
xmlChar * xmlParseName (xmlParserCtxtPtr ctxt); xmlChar * xmlParseName (xmlParserCtxtPtr ctxt);
@@ -315,25 +315,25 @@ void xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
/** /**
* XML_SUBSTITUTE_NONE: * XML_SUBSTITUTE_NONE:
* *
* If no entities need to be substituted * If no entities need to be substituted.
*/ */
#define XML_SUBSTITUTE_NONE 0 #define XML_SUBSTITUTE_NONE 0
/** /**
* XML_SUBSTITUTE_REF: * XML_SUBSTITUTE_REF:
* *
* Whether general entities need to be substituted * Whether general entities need to be substituted.
*/ */
#define XML_SUBSTITUTE_REF 1 #define XML_SUBSTITUTE_REF 1
/** /**
* XML_SUBSTITUTE_PEREF: * XML_SUBSTITUTE_PEREF:
* *
* Whether parameter entities need to be substituted * Whether parameter entities need to be substituted.
*/ */
#define XML_SUBSTITUTE_PEREF 2 #define XML_SUBSTITUTE_PEREF 2
/** /**
* XML_SUBSTITUTE_BOTH: * XML_SUBSTITUTE_BOTH:
* *
* Both general and parameter entities need to be substituted * Both general and parameter entities need to be substituted.
*/ */
#define XML_SUBSTITUTE_BOTH 3 #define XML_SUBSTITUTE_BOTH 3
@@ -351,7 +351,7 @@ xmlChar * xmlStringDecodeEntities (xmlParserCtxtPtr ctxt,
xmlChar end3); xmlChar end3);
/* /*
* Generated by MACROS on top of parser.c c.f. PUSH_AND_POP * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
*/ */
int nodePush (xmlParserCtxtPtr ctxt, int nodePush (xmlParserCtxtPtr ctxt,
xmlNodePtr value); xmlNodePtr value);
@@ -364,7 +364,7 @@ int namePush (xmlParserCtxtPtr ctxt,
xmlChar *value); xmlChar *value);
/* /*
* other commodities shared between parser.c and parserInternals * other commodities shared between parser.c and parserInternals.
*/ */
int xmlSkipBlankChars (xmlParserCtxtPtr ctxt); int xmlSkipBlankChars (xmlParserCtxtPtr ctxt);
int xmlStringCurrentChar (xmlParserCtxtPtr ctxt, int xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
@@ -375,7 +375,7 @@ void xmlParserHandleReference(xmlParserCtxtPtr ctxt);
int xmlCheckLanguageID (const xmlChar *lang); int xmlCheckLanguageID (const xmlChar *lang);
/* /*
* Really core function shared with HTML parser * Really core function shared with HTML parser.
*/ */
int xmlCurrentChar (xmlParserCtxtPtr ctxt, int xmlCurrentChar (xmlParserCtxtPtr ctxt,
int *len); int *len);
@@ -389,7 +389,7 @@ void xmlParserInputShrink (xmlParserInputPtr in);
#ifdef LIBXML_HTML_ENABLED #ifdef LIBXML_HTML_ENABLED
/* /*
* Actually comes from the HTML parser but launched from the init stuff * Actually comes from the HTML parser but launched from the init stuff.
*/ */
void htmlInitAutoClose (void); void htmlInitAutoClose (void);
htmlParserCtxtPtr htmlCreateFileParserCtxt(const char *filename, htmlParserCtxtPtr htmlCreateFileParserCtxt(const char *filename,
@@ -398,7 +398,7 @@ htmlParserCtxtPtr htmlCreateFileParserCtxt(const char *filename,
/* /*
* Specific function to keep track of entities references * Specific function to keep track of entities references
* and used by the XSLT debugger * and used by the XSLT debugger.
*/ */
/** /**
* xmlEntityReferenceFunc: * xmlEntityReferenceFunc:
@@ -406,8 +406,8 @@ htmlParserCtxtPtr htmlCreateFileParserCtxt(const char *filename,
* @firstNode: the fist node in the chunk * @firstNode: the fist node in the chunk
* @lastNode: the last nod in the chunk * @lastNode: the last nod in the chunk
* *
* Callback function used when one need to be able to track back the * Callback function used when one needs to be able to track back the
* provenance of a chunk of nodes inherited from an entity replacement * provenance of a chunk of nodes inherited from an entity replacement.
*/ */
typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent, typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent,
xmlNodePtr firstNode, xmlNodePtr firstNode,

View File

@@ -14,13 +14,13 @@ extern "C" {
#endif #endif
/* /*
* xmlMutex are a simple mutual exception locks * xmlMutex are a simple mutual exception locks.
*/ */
typedef struct _xmlMutex xmlMutex; typedef struct _xmlMutex xmlMutex;
typedef xmlMutex *xmlMutexPtr; typedef xmlMutex *xmlMutexPtr;
/* /*
* xmlRMutex are reentrant mutual exception locks * xmlRMutex are reentrant mutual exception locks.
*/ */
typedef struct _xmlRMutex xmlRMutex; typedef struct _xmlRMutex xmlRMutex;
typedef xmlRMutex *xmlRMutexPtr; typedef xmlRMutex *xmlRMutexPtr;
@@ -44,7 +44,7 @@ void xmlRMutexUnlock (xmlRMutexPtr tok);
void xmlFreeRMutex (xmlRMutexPtr tok); void xmlFreeRMutex (xmlRMutexPtr tok);
/* /*
* Library wide APIs * Library wide APIs.
*/ */
void xmlInitThreads (void); void xmlInitThreads (void);
void xmlLockLibrary (void); void xmlLockLibrary (void);

View File

@@ -53,7 +53,7 @@ typedef xmlEntity *xmlEntityPtr;
/** /**
* BASE_BUFFER_SIZE: * BASE_BUFFER_SIZE:
* *
* default buffer size 4000 * default buffer size 4000.
*/ */
#define BASE_BUFFER_SIZE 4000 #define BASE_BUFFER_SIZE 4000
@@ -61,13 +61,13 @@ typedef xmlEntity *xmlEntityPtr;
* XML_XML_NAMESPACE: * XML_XML_NAMESPACE:
* *
* This is the namespace for the special xml: prefix predefined in the * This is the namespace for the special xml: prefix predefined in the
* XML Namespace specification * XML Namespace specification.
*/ */
#define XML_XML_NAMESPACE \ #define XML_XML_NAMESPACE \
(const xmlChar *) "http://www.w3.org/XML/1998/namespace" (const xmlChar *) "http://www.w3.org/XML/1998/namespace"
/* /*
* The different element types carried by an XML tree * The different element types carried by an XML tree.
* *
* NOTE: This is synchronized with DOM Level1 values * NOTE: This is synchronized with DOM Level1 values
* See http://www.w3.org/TR/REC-DOM-Level-1/ * See http://www.w3.org/TR/REC-DOM-Level-1/
@@ -121,7 +121,7 @@ typedef unsigned char xmlChar;
/** /**
* xmlNotation: * xmlNotation:
* *
* a DTD Notation definition * A DTD Notation definition.
*/ */
typedef struct _xmlNotation xmlNotation; typedef struct _xmlNotation xmlNotation;
@@ -135,7 +135,7 @@ struct _xmlNotation {
/** /**
* xmlAttributeType: * xmlAttributeType:
* *
* a DTD Attribute type definition * A DTD Attribute type definition.
*/ */
typedef enum { typedef enum {
@@ -154,7 +154,7 @@ typedef enum {
/** /**
* xmlAttributeDefault: * xmlAttributeDefault:
* *
* a DTD Attribute default definition * A DTD Attribute default definition.
*/ */
typedef enum { typedef enum {
@@ -167,7 +167,7 @@ typedef enum {
/** /**
* xmlEnumeration: * xmlEnumeration:
* *
* list structure used when there is an enumeration in DTDs * List structure used when there is an enumeration in DTDs.
*/ */
typedef struct _xmlEnumeration xmlEnumeration; typedef struct _xmlEnumeration xmlEnumeration;
@@ -180,7 +180,7 @@ struct _xmlEnumeration {
/** /**
* xmlAttribute: * xmlAttribute:
* *
* an Attribute declaration in a DTD * An Attribute declaration in a DTD.
*/ */
typedef struct _xmlAttribute xmlAttribute; typedef struct _xmlAttribute xmlAttribute;
@@ -208,7 +208,7 @@ struct _xmlAttribute {
/** /**
* xmlElementContentType: * xmlElementContentType:
* *
* Possible definitions of element content types * Possible definitions of element content types.
*/ */
typedef enum { typedef enum {
XML_ELEMENT_CONTENT_PCDATA = 1, XML_ELEMENT_CONTENT_PCDATA = 1,
@@ -220,7 +220,7 @@ typedef enum {
/** /**
* xmlElementContentOccur: * xmlElementContentOccur:
* *
* Possible definitions of element content occurrences * Possible definitions of element content occurrences.
*/ */
typedef enum { typedef enum {
XML_ELEMENT_CONTENT_ONCE = 1, XML_ELEMENT_CONTENT_ONCE = 1,
@@ -232,7 +232,7 @@ typedef enum {
/** /**
* xmlElementContent: * xmlElementContent:
* *
* an XML Element content as stored after parsing an element definition * An XML Element content as stored after parsing an element definition
* in a DTD. * in a DTD.
*/ */
@@ -251,7 +251,7 @@ struct _xmlElementContent {
/** /**
* xmlElementTypeVal: * xmlElementTypeVal:
* *
* the different possibilities for an element content type * The different possibilities for an element content type.
*/ */
typedef enum { typedef enum {
@@ -265,7 +265,7 @@ typedef enum {
/** /**
* xmlElement: * xmlElement:
* *
* an XML Element declaration from a DTD * An XML Element declaration from a DTD.
*/ */
typedef struct _xmlElement xmlElement; typedef struct _xmlElement xmlElement;
@@ -291,7 +291,7 @@ struct _xmlElement {
/** /**
* XML_LOCAL_NAMESPACE: * XML_LOCAL_NAMESPACE:
* *
* A namespace declaration node * A namespace declaration node.
*/ */
#define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL #define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
typedef xmlElementType xmlNsType; typedef xmlElementType xmlNsType;
@@ -303,7 +303,7 @@ typedef xmlElementType xmlNsType;
* Note that prefix == NULL is valid, it defines the default namespace * Note that prefix == NULL is valid, it defines the default namespace
* within the subtree (until overridden). * within the subtree (until overridden).
* *
* xmlNsType is unified with xmlElementType * xmlNsType is unified with xmlElementType.
*/ */
typedef struct _xmlNs xmlNs; typedef struct _xmlNs xmlNs;
@@ -319,7 +319,7 @@ struct _xmlNs {
* xmlDtd: * xmlDtd:
* *
* An XML DTD, as defined by <!DOCTYPE ... There is actually one for * An XML DTD, as defined by <!DOCTYPE ... There is actually one for
* the internal subset and for the external subset * the internal subset and for the external subset.
*/ */
typedef struct _xmlDtd xmlDtd; typedef struct _xmlDtd xmlDtd;
typedef xmlDtd *xmlDtdPtr; typedef xmlDtd *xmlDtdPtr;
@@ -347,7 +347,7 @@ struct _xmlDtd {
/** /**
* xmlAttr: * xmlAttr:
* *
* A attribute on an XML node. * An attribute on an XML node.
*/ */
typedef struct _xmlAttr xmlAttr; typedef struct _xmlAttr xmlAttr;
typedef xmlAttr *xmlAttrPtr; typedef xmlAttr *xmlAttrPtr;
@@ -397,7 +397,7 @@ struct _xmlRef {
* xmlBufferAllocationScheme: * xmlBufferAllocationScheme:
* *
* A buffer allocation scheme can be defined to either match exactly the * A buffer allocation scheme can be defined to either match exactly the
* need or double it's allocated size each time it is found too small * need or double it's allocated size each time it is found too small.
*/ */
typedef enum { typedef enum {
@@ -408,7 +408,7 @@ typedef enum {
/** /**
* xmlBuffer: * xmlBuffer:
* *
* A buffer structure * A buffer structure.
*/ */
typedef struct _xmlBuffer xmlBuffer; typedef struct _xmlBuffer xmlBuffer;
typedef xmlBuffer *xmlBufferPtr; typedef xmlBuffer *xmlBufferPtr;
@@ -447,7 +447,7 @@ struct _xmlNode {
/** /**
* XML_GET_CONTENT: * XML_GET_CONTENT:
* *
* macro to extract the content pointer of a node * Macro to extract the content pointer of a node.
*/ */
#define XML_GET_CONTENT(n) \ #define XML_GET_CONTENT(n) \
((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content) ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content)
@@ -455,9 +455,9 @@ struct _xmlNode {
/** /**
* XML_GET_LINE: * XML_GET_LINE:
* *
* macro to extract the line number of an element node. * Macro to extract the line number of an element node.
* This will work only if line numbering is activated by * This will work only if line numbering is activated by
* calling xmlLineNumbersDefault(1) before parsing * calling xmlLineNumbersDefault(1) before parsing.
*/ */
#define XML_GET_LINE(n) \ #define XML_GET_LINE(n) \
((n)->type == XML_ELEMENT_NODE ? (int) (n)->content : 0) ((n)->type == XML_ELEMENT_NODE ? (int) (n)->content : 0)
@@ -498,7 +498,7 @@ struct _xmlDoc {
/** /**
* xmlChildrenNode: * xmlChildrenNode:
* *
* Macro for compatibility naming layer with libxml1 * Macro for compatibility naming layer with libxml1.
*/ */
#ifndef xmlChildrenNode #ifndef xmlChildrenNode
#define xmlChildrenNode children #define xmlChildrenNode children
@@ -507,7 +507,7 @@ struct _xmlDoc {
/** /**
* xmlRootNode: * xmlRootNode:
* *
* Macro for compatibility naming layer with libxml1 * Macro for compatibility naming layer with libxml1.
*/ */
#ifndef xmlRootNode #ifndef xmlRootNode
#define xmlRootNode children #define xmlRootNode children
@@ -559,7 +559,7 @@ void xmlBufferSetAllocationScheme(xmlBufferPtr buf,
int xmlBufferLength (const xmlBufferPtr buf); int xmlBufferLength (const xmlBufferPtr buf);
/* /*
* Creating/freeing new structures * Creating/freeing new structures.
*/ */
xmlDtdPtr xmlCreateIntSubset (xmlDocPtr doc, xmlDtdPtr xmlCreateIntSubset (xmlDocPtr doc,
const xmlChar *name, const xmlChar *name,
@@ -602,7 +602,7 @@ xmlDocPtr xmlCopyDoc (xmlDocPtr doc,
int recursive); int recursive);
/* /*
* Creating new nodes * Creating new nodes.
*/ */
xmlNodePtr xmlNewDocNode (xmlDocPtr doc, xmlNodePtr xmlNewDocNode (xmlDocPtr doc,
xmlNsPtr ns, xmlNsPtr ns,
@@ -651,7 +651,7 @@ xmlNodePtr xmlCopyNodeList (xmlNodePtr node);
xmlNodePtr xmlNewDocFragment (xmlDocPtr doc); xmlNodePtr xmlNewDocFragment (xmlDocPtr doc);
/* /*
* Navigating * Navigating.
*/ */
long xmlGetLineNo (xmlNodePtr node); long xmlGetLineNo (xmlNodePtr node);
xmlChar * xmlGetNodePath (xmlNodePtr node); xmlChar * xmlGetNodePath (xmlNodePtr node);
@@ -661,7 +661,7 @@ int xmlNodeIsText (xmlNodePtr node);
int xmlIsBlankNode (xmlNodePtr node); int xmlIsBlankNode (xmlNodePtr node);
/* /*
* Changing the structure * Changing the structure.
*/ */
xmlNodePtr xmlDocSetRootElement (xmlDocPtr doc, xmlNodePtr xmlDocSetRootElement (xmlDocPtr doc,
xmlNodePtr root); xmlNodePtr root);
@@ -693,7 +693,7 @@ void xmlSetListDoc (xmlNodePtr list,
xmlDocPtr doc); xmlDocPtr doc);
/* /*
* Namespaces * Namespaces.
*/ */
xmlNsPtr xmlSearchNs (xmlDocPtr doc, xmlNsPtr xmlSearchNs (xmlDocPtr doc,
xmlNodePtr node, xmlNodePtr node,
@@ -772,7 +772,7 @@ int xmlUnsetNsProp (xmlNodePtr node,
const xmlChar *name); const xmlChar *name);
/* /*
* Internal, don't use * Internal, don't use.
*/ */
#ifdef VMS #ifdef VMS
void xmlBufferWriteXmlCHAR (xmlBufferPtr buf, void xmlBufferWriteXmlCHAR (xmlBufferPtr buf,
@@ -788,13 +788,13 @@ void xmlBufferWriteQuotedString(xmlBufferPtr buf,
const xmlChar *string); const xmlChar *string);
/* /*
* Namespace handling * Namespace handling.
*/ */
int xmlReconciliateNs (xmlDocPtr doc, int xmlReconciliateNs (xmlDocPtr doc,
xmlNodePtr tree); xmlNodePtr tree);
/* /*
* Saving * Saving.
*/ */
void xmlDocDumpFormatMemory (xmlDocPtr cur, void xmlDocDumpFormatMemory (xmlDocPtr cur,
xmlChar **mem, xmlChar **mem,
@@ -852,7 +852,7 @@ int xmlSaveFileEnc (const char *filename,
const char *encoding); const char *encoding);
/* /*
* Compression * Compression.
*/ */
int xmlGetDocCompressMode (xmlDocPtr doc); int xmlGetDocCompressMode (xmlDocPtr doc);
void xmlSetDocCompressMode (xmlDocPtr doc, void xmlSetDocCompressMode (xmlDocPtr doc,

View File

@@ -21,7 +21,7 @@ extern "C" {
* xmlURI: * xmlURI:
* *
* A parsed URI reference. This is a struct containing the various fields * A parsed URI reference. This is a struct containing the various fields
* as described in RFC 2396 but separated for further processing * as described in RFC 2396 but separated for further processing.
*/ */
typedef struct _xmlURI xmlURI; typedef struct _xmlURI xmlURI;
typedef xmlURI *xmlURIPtr; typedef xmlURI *xmlURIPtr;

View File

@@ -18,7 +18,7 @@ extern "C" {
#endif #endif
/* /*
* Validation state added for non-determinist content model * Validation state added for non-determinist content model.
*/ */
typedef struct _xmlValidState xmlValidState; typedef struct _xmlValidState xmlValidState;
typedef xmlValidState *xmlValidStatePtr; typedef xmlValidState *xmlValidStatePtr;
@@ -29,7 +29,7 @@ typedef xmlValidState *xmlValidStatePtr;
* @msg: the string to format *printf like vararg * @msg: the string to format *printf like vararg
* @...: remaining arguments to the format * @...: remaining arguments to the format
* *
* Callback called when a validity error is found, this is a message * Callback called when a validity error is found. This is a message
* oriented function similar to an *printf function. * oriented function similar to an *printf function.
*/ */
typedef void (*xmlValidityErrorFunc) (void *ctx, typedef void (*xmlValidityErrorFunc) (void *ctx,
@@ -42,7 +42,7 @@ typedef void (*xmlValidityErrorFunc) (void *ctx,
* @msg: the string to format *printf like vararg * @msg: the string to format *printf like vararg
* @...: remaining arguments to the format * @...: remaining arguments to the format
* *
* Callback called when a validity warning is found, this is a message * Callback called when a validity warning is found. This is a message
* oriented function similar to an *printf function. * oriented function similar to an *printf function.
*/ */
typedef void (*xmlValidityWarningFunc) (void *ctx, typedef void (*xmlValidityWarningFunc) (void *ctx,
@@ -51,7 +51,7 @@ typedef void (*xmlValidityWarningFunc) (void *ctx,
/** /**
* xmlValidCtxt: * xmlValidCtxt:
* an xmlValidCtxt is used for error reporting when validating * An xmlValidCtxt is used for error reporting when validating.
*/ */
typedef struct _xmlValidCtxt xmlValidCtxt; typedef struct _xmlValidCtxt xmlValidCtxt;
typedef xmlValidCtxt *xmlValidCtxtPtr; typedef xmlValidCtxt *xmlValidCtxtPtr;
@@ -78,40 +78,40 @@ struct _xmlValidCtxt {
}; };
/* /*
* ALl notation declarations are stored in a table * ALL notation declarations are stored in a table.
* there is one table per DTD * There is one table per DTD.
*/ */
typedef struct _xmlHashTable xmlNotationTable; typedef struct _xmlHashTable xmlNotationTable;
typedef xmlNotationTable *xmlNotationTablePtr; typedef xmlNotationTable *xmlNotationTablePtr;
/* /*
* ALl element declarations are stored in a table * ALL element declarations are stored in a table.
* there is one table per DTD * There is one table per DTD.
*/ */
typedef struct _xmlHashTable xmlElementTable; typedef struct _xmlHashTable xmlElementTable;
typedef xmlElementTable *xmlElementTablePtr; typedef xmlElementTable *xmlElementTablePtr;
/* /*
* ALl attribute declarations are stored in a table * ALL attribute declarations are stored in a table.
* there is one table per DTD * There is one table per DTD.
*/ */
typedef struct _xmlHashTable xmlAttributeTable; typedef struct _xmlHashTable xmlAttributeTable;
typedef xmlAttributeTable *xmlAttributeTablePtr; typedef xmlAttributeTable *xmlAttributeTablePtr;
/* /*
* ALl IDs attributes are stored in a table * ALL IDs attributes are stored in a table.
* there is one table per document * There is one table per document.
*/ */
typedef struct _xmlHashTable xmlIDTable; typedef struct _xmlHashTable xmlIDTable;
typedef xmlIDTable *xmlIDTablePtr; typedef xmlIDTable *xmlIDTablePtr;
/* /*
* ALl Refs attributes are stored in a table * ALL Refs attributes are stored in a table.
* there is one table per document * There is one table per document.
*/ */
typedef struct _xmlHashTable xmlRefTable; typedef struct _xmlHashTable xmlRefTable;
@@ -211,7 +211,7 @@ xmlListPtr xmlGetRefs (xmlDocPtr doc,
const xmlChar *ID); const xmlChar *ID);
/** /**
* The public function calls related to validity checking * The public function calls related to validity checking.
*/ */
int xmlValidateRoot (xmlValidCtxtPtr ctxt, int xmlValidateRoot (xmlValidCtxtPtr ctxt,

View File

@@ -22,9 +22,9 @@ extern "C" {
* Various defines for the various Link properties. * Various defines for the various Link properties.
* *
* NOTE: the link detection layer will try to resolve QName expansion * NOTE: the link detection layer will try to resolve QName expansion
* of namespaces, if "foo" is the prefix for "http://foo.com/" * of namespaces. If "foo" is the prefix for "http://foo.com/"
* then the link detection layer will expand role="foo:myrole" * then the link detection layer will expand role="foo:myrole"
* to "http://foo.com/:myrole" * to "http://foo.com/:myrole".
* NOTE: the link detection layer will expand URI-Refences found on * NOTE: the link detection layer will expand URI-Refences found on
* href attributes by using the base mechanism if found. * href attributes by using the base mechanism if found.
*/ */
@@ -57,7 +57,7 @@ typedef enum {
* @ctx: user data pointer * @ctx: user data pointer
* @node: the node to check * @node: the node to check
* *
* This is the prototype for the link detection routine * This is the prototype for the link detection routine.
* It calls the default link detection callbacks upon link detection. * It calls the default link detection callbacks upon link detection.
*/ */
typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node); typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node);
@@ -141,7 +141,7 @@ typedef void
const xmlChar **langs); const xmlChar **langs);
/** /**
* This is the structure containing a set of Links detection callbacks * This is the structure containing a set of Links detection callbacks.
* *
* There is no default xlink callbacks, if one want to get link * There is no default xlink callbacks, if one want to get link
* recognition activated, those call backs must be provided before parsing. * recognition activated, those call backs must be provided before parsing.
@@ -155,7 +155,7 @@ struct _xlinkHandler {
}; };
/* /*
* the default detection routine, can be overridden, they call the default * The default detection routine, can be overridden, they call the default
* detection callbacks. * detection callbacks.
*/ */

View File

@@ -145,7 +145,7 @@ typedef enum {
* @...: the extra arguments of the varags to format the message * @...: the extra arguments of the varags to format the message
* *
* Signature of the function to use when there is an error and * Signature of the function to use when there is an error and
* no parsing or validity context available * no parsing or validity context available .
*/ */
typedef void (*xmlGenericErrorFunc) (void *ctx, typedef void (*xmlGenericErrorFunc) (void *ctx,
const char *msg, const char *msg,
@@ -161,7 +161,7 @@ void initGenericErrorDefaultFunc(xmlGenericErrorFunc *handler);
/* /*
* Default message routines used by SAX and Valid context for error * Default message routines used by SAX and Valid context for error
* and warning reporting * and warning reporting.
*/ */
void xmlParserError (void *ctx, void xmlParserError (void *ctx,
const char *msg, const char *msg,

View File

@@ -18,10 +18,10 @@
/** /**
* DEBUG_MEMORY: * DEBUG_MEMORY:
* *
* should be activated only done when debugging libxml. It replaces the * DEBUG_MEMORY replaces the allocator with a collect and debug
* allocator with a collect and debug shell to the libc allocator. * shell to the libc allocator.
* DEBUG_MEMORY should be activated only when debugging * DEBUG_MEMORY should only be activated when debugging
* libxml i.e. if libxml has been configured with --with-debug-mem too * libxml i.e. if libxml has been configured with --with-debug-mem too.
*/ */
/* #define DEBUG_MEMORY_FREED */ /* #define DEBUG_MEMORY_FREED */
/* #define DEBUG_MEMORY_LOCATION */ /* #define DEBUG_MEMORY_LOCATION */
@@ -36,7 +36,7 @@
* DEBUG_MEMORY_LOCATION: * DEBUG_MEMORY_LOCATION:
* *
* DEBUG_MEMORY_LOCATION should be activated only when debugging * DEBUG_MEMORY_LOCATION should be activated only when debugging
* libxml i.e. if libxml has been configured with --with-debug-mem too * libxml i.e. if libxml has been configured with --with-debug-mem too.
*/ */
#ifdef DEBUG_MEMORY_LOCATION #ifdef DEBUG_MEMORY_LOCATION
#endif #endif
@@ -46,22 +46,22 @@ extern "C" {
#endif #endif
/* /*
* The XML memory wrapper support 4 basic overloadable functions * The XML memory wrapper support 4 basic overloadable functions.
*/ */
/** /**
* xmlFreeFunc: * xmlFreeFunc:
* @mem: an already allocated block of memory * @mem: an already allocated block of memory
* *
* Signature for a free() implementation * Signature for a free() implementation.
*/ */
typedef void (*xmlFreeFunc)(void *mem); typedef void (*xmlFreeFunc)(void *mem);
/** /**
* xmlMallocFunc: * xmlMallocFunc:
* @size: the size requested in bytes * @size: the size requested in bytes
* *
* Signature for a malloc() implementation * Signature for a malloc() implementation.
* *
* Returns a pointer to the newly allocated block or NULL in case of error * Returns a pointer to the newly allocated block or NULL in case of error.
*/ */
typedef void *(*xmlMallocFunc)(size_t size); typedef void *(*xmlMallocFunc)(size_t size);
@@ -70,9 +70,9 @@ typedef void *(*xmlMallocFunc)(size_t size);
* @mem: an already allocated block of memory * @mem: an already allocated block of memory
* @size: the new size requested in bytes * @size: the new size requested in bytes
* *
* Signature for a realloc() implementation * Signature for a realloc() implementation.
* *
* Returns a pointer to the newly reallocated block or NULL in case of error * Returns a pointer to the newly reallocated block or NULL in case of error.
*/ */
typedef void *(*xmlReallocFunc)(void *mem, size_t size); typedef void *(*xmlReallocFunc)(void *mem, size_t size);
@@ -80,14 +80,14 @@ typedef void *(*xmlReallocFunc)(void *mem, size_t size);
* xmlStrdupFunc: * xmlStrdupFunc:
* @str: a zero terminated string * @str: a zero terminated string
* *
* Signature for an strdup() implementation * Signature for an strdup() implementation.
* *
* Returns the copy of the string or NULL in case of error * Returns the copy of the string or NULL in case of error.
*/ */
typedef char *(*xmlStrdupFunc)(const char *str); typedef char *(*xmlStrdupFunc)(const char *str);
/* /*
* The 4 interfaces used for all memory handling within libxml * The 4 interfaces used for all memory handling within libxml.
LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree; LIBXML_DLL_IMPORT extern xmlFreeFunc xmlFree;
LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc; LIBXML_DLL_IMPORT extern xmlMallocFunc xmlMalloc;
LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc; LIBXML_DLL_IMPORT extern xmlReallocFunc xmlRealloc;
@@ -95,7 +95,7 @@ LIBXML_DLL_IMPORT extern xmlStrdupFunc xmlMemStrdup;
*/ */
/* /*
* The way to overload the existing functions * The way to overload the existing functions.
*/ */
int xmlMemSetup (xmlFreeFunc freeFunc, int xmlMemSetup (xmlFreeFunc freeFunc,
xmlMallocFunc mallocFunc, xmlMallocFunc mallocFunc,
@@ -107,12 +107,12 @@ int xmlMemGet (xmlFreeFunc *freeFunc,
xmlStrdupFunc *strdupFunc); xmlStrdupFunc *strdupFunc);
/* /*
* Initialization of the memory layer * Initialization of the memory layer.
*/ */
int xmlInitMemory (void); int xmlInitMemory (void);
/* /*
* Those are specific to the XML debug memory wrapper * Those are specific to the XML debug memory wrapper.
*/ */
int xmlMemUsed (void); int xmlMemUsed (void);
void xmlMemDisplay (FILE *fp); void xmlMemDisplay (FILE *fp);
@@ -124,9 +124,9 @@ void xmlMemoryDump (void);
* xmlMalloc: * xmlMalloc:
* @size: number of bytes to allocate * @size: number of bytes to allocate
* *
* Wrapper for the malloc() function used in the XML library * Wrapper for the malloc() function used in the XML library.
* *
* Returns the pointer to the allocated area or NULL in case of error * Returns the pointer to the allocated area or NULL in case of error.
*/ */
#define xmlMalloc(size) xmlMallocLoc((size), __FILE__, __LINE__) #define xmlMalloc(size) xmlMallocLoc((size), __FILE__, __LINE__)
/** /**
@@ -134,18 +134,18 @@ void xmlMemoryDump (void);
* @ptr: pointer to the existing allocated area * @ptr: pointer to the existing allocated area
* @size: number of bytes to allocate * @size: number of bytes to allocate
* *
* Wrapper for the realloc() function used in the XML library * Wrapper for the realloc() function used in the XML library.
* *
* Returns the pointer to the allocated area or NULL in case of error * Returns the pointer to the allocated area or NULL in case of error.
*/ */
#define xmlRealloc(ptr, size) xmlReallocLoc((ptr), (size), __FILE__, __LINE__) #define xmlRealloc(ptr, size) xmlReallocLoc((ptr), (size), __FILE__, __LINE__)
/** /**
* xmlMemStrdup: * xmlMemStrdup:
* @str: pointer to the existing string * @str: pointer to the existing string
* *
* Wrapper for the strdup() function, xmlStrdup() is usually preferred * Wrapper for the strdup() function, xmlStrdup() is usually preferred.
* *
* Returns the pointer to the allocated area or NULL in case of error * Returns the pointer to the allocated area or NULL in case of error.
*/ */
#define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__) #define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__)

View File

@@ -25,7 +25,7 @@ typedef struct _xmlXPathParserContext xmlXPathParserContext;
typedef xmlXPathParserContext *xmlXPathParserContextPtr; typedef xmlXPathParserContext *xmlXPathParserContextPtr;
/** /**
* The set of XPath error codes * The set of XPath error codes.
*/ */
typedef enum { typedef enum {
@@ -54,7 +54,7 @@ typedef enum {
} xmlXPathError; } xmlXPathError;
/* /*
* A node-set (an unordered collection of nodes without duplicates) * A node-set (an unordered collection of nodes without duplicates).
*/ */
typedef struct _xmlNodeSet xmlNodeSet; typedef struct _xmlNodeSet xmlNodeSet;
typedef xmlNodeSet *xmlNodeSetPtr; typedef xmlNodeSet *xmlNodeSetPtr;
@@ -142,7 +142,7 @@ struct _xmlXPathVariable {
* @ctxt: an XPath parser context * @ctxt: an XPath parser context
* @nargs: the number of arguments passed to the function * @nargs: the number of arguments passed to the function
* *
* an XPath evaluation function, the parameters are on the XPath context stack * An XPath evaluation function, the parameters are on the XPath context stack.
*/ */
typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt, typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt,
@@ -168,7 +168,7 @@ struct _xmlXPathFunct {
* the first time with cur == NULL and repeat until the function returns * the first time with cur == NULL and repeat until the function returns
* NULL indicating the end of the axis traversal. * NULL indicating the end of the axis traversal.
* *
* Returns the next node in that axis or NULL if at the end of the axis * Returns the next node in that axis or NULL if at the end of the axis.
*/ */
typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt, typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt,
@@ -255,7 +255,7 @@ struct _xmlXPathContext {
}; };
/* /*
* The structure of a compiled expression form is not public * The structure of a compiled expression form is not public.
*/ */
typedef struct _xmlXPathCompExpr xmlXPathCompExpr; typedef struct _xmlXPathCompExpr xmlXPathCompExpr;
@@ -264,7 +264,7 @@ typedef xmlXPathCompExpr *xmlXPathCompExprPtr;
/** /**
* xmlXPathParserContext: * xmlXPathParserContext:
* *
* An XPath parser context, it contains pure parsing informations, * An XPath parser context. It contains pure parsing informations,
* an xmlXPathContext, and the stack of objects. * an xmlXPathContext, and the stack of objects.
*/ */
struct _xmlXPathParserContext { struct _xmlXPathParserContext {
@@ -289,7 +289,7 @@ struct _xmlXPathParserContext {
* @ctxt: the XPath interprestation context * @ctxt: the XPath interprestation context
* @nargs: the number of arguments * @nargs: the number of arguments
* *
* An XPath function * An XPath function.
* The arguments (if any) are popped out from the context stack * The arguments (if any) are popped out from the context stack
* and the result is pushed on the stack. * and the result is pushed on the stack.
*/ */
@@ -318,7 +318,7 @@ int xmlXPathIsInf (double val);
* xmlXPathNodeSetGetLength: * xmlXPathNodeSetGetLength:
* @ns: a node-set * @ns: a node-set
* *
* Implement a functionality similar to the DOM NodeList.length * Implement a functionality similar to the DOM NodeList.length.
* *
* Returns the number of nodes in the node-set. * Returns the number of nodes in the node-set.
*/ */
@@ -328,7 +328,7 @@ int xmlXPathIsInf (double val);
* @ns: a node-set * @ns: a node-set
* @index: index of a node in the set * @index: index of a node in the set
* *
* Implements a functionality similar to the DOM NodeList.item() * Implements a functionality similar to the DOM NodeList.item().
* *
* Returns the xmlNodePtr at the given @index in @ns or NULL if * Returns the xmlNodePtr at the given @index in @ns or NULL if
* @index is out of range (0 to length-1) * @index is out of range (0 to length-1)
@@ -342,9 +342,9 @@ int xmlXPathIsInf (double val);
* xmlXPathNodeSetIsEmpty: * xmlXPathNodeSetIsEmpty:
* @ns: a node-set * @ns: a node-set
* *
* Checks whether @ns is empty or not * Checks whether @ns is empty or not.
* *
* Returns %TRUE if @ns is an empty node-set * Returns %TRUE if @ns is an empty node-set.
*/ */
#define xmlXPathNodeSetIsEmpty(ns) \ #define xmlXPathNodeSetIsEmpty(ns) \
(((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL)) (((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL))
@@ -358,7 +358,7 @@ xmlXPathObjectPtr xmlXPathObjectCopy (xmlXPathObjectPtr val);
int xmlXPathCmpNodes (xmlNodePtr node1, int xmlXPathCmpNodes (xmlNodePtr node1,
xmlNodePtr node2); xmlNodePtr node2);
/** /**
* Conversion functions to basic types * Conversion functions to basic types.
*/ */
int xmlXPathCastNumberToBoolean (double val); int xmlXPathCastNumberToBoolean (double val);
int xmlXPathCastStringToBoolean (const xmlChar * val); int xmlXPathCastStringToBoolean (const xmlChar * val);
@@ -382,7 +382,7 @@ xmlXPathObjectPtr xmlXPathConvertNumber (xmlXPathObjectPtr val);
xmlXPathObjectPtr xmlXPathConvertString (xmlXPathObjectPtr val); xmlXPathObjectPtr xmlXPathConvertString (xmlXPathObjectPtr val);
/** /**
* Context handling * Context handling.
*/ */
void xmlXPathInit (void); void xmlXPathInit (void);
xmlXPathContextPtr xmlXPathNewContext (xmlDocPtr doc); xmlXPathContextPtr xmlXPathNewContext (xmlDocPtr doc);
@@ -398,7 +398,7 @@ xmlXPathObjectPtr xmlXPathEvalExpression (const xmlChar *str,
int xmlXPathEvalPredicate (xmlXPathContextPtr ctxt, int xmlXPathEvalPredicate (xmlXPathContextPtr ctxt,
xmlXPathObjectPtr res); xmlXPathObjectPtr res);
/** /**
* Separate compilation/evaluation entry points * Separate compilation/evaluation entry points.
*/ */
xmlXPathCompExprPtr xmlXPathCompile (const xmlChar *str); xmlXPathCompExprPtr xmlXPathCompile (const xmlChar *str);
xmlXPathObjectPtr xmlXPathCompiledEval (xmlXPathCompExprPtr comp, xmlXPathObjectPtr xmlXPathCompiledEval (xmlXPathCompExprPtr comp,

View File

@@ -46,7 +46,7 @@ extern "C" {
* xmlXPathSetArityError: * xmlXPathSetArityError:
* @ctxt: an XPath parser context * @ctxt: an XPath parser context
* *
* Raises an XPATH_INVALID_ARITY error * Raises an XPATH_INVALID_ARITY error.
*/ */
#define xmlXPathSetArityError(ctxt) \ #define xmlXPathSetArityError(ctxt) \
xmlXPathSetError((ctxt), XPATH_INVALID_ARITY) xmlXPathSetError((ctxt), XPATH_INVALID_ARITY)
@@ -55,7 +55,7 @@ extern "C" {
* xmlXPathSetTypeError: * xmlXPathSetTypeError:
* @ctxt: an XPath parser context * @ctxt: an XPath parser context
* *
* Raises an XPATH_INVALID_TYPE error * Raises an XPATH_INVALID_TYPE error.
*/ */
#define xmlXPathSetTypeError(ctxt) \ #define xmlXPathSetTypeError(ctxt) \
xmlXPathSetError((ctxt), XPATH_INVALID_TYPE) xmlXPathSetError((ctxt), XPATH_INVALID_TYPE)
@@ -64,9 +64,9 @@ extern "C" {
* xmlXPathGetError: * xmlXPathGetError:
* @ctxt: an XPath parser context * @ctxt: an XPath parser context
* *
* Get the error code of an XPath context * Get the error code of an XPath context.
* *
* Returns the context error * Returns the context error.
*/ */
#define xmlXPathGetError(ctxt) ((ctxt)->error) #define xmlXPathGetError(ctxt) ((ctxt)->error)
@@ -74,7 +74,7 @@ extern "C" {
* xmlXPathCheckError: * xmlXPathCheckError:
* @ctxt: an XPath parser context * @ctxt: an XPath parser context
* *
* Check if an XPath error was raised * Check if an XPath error was raised.
* *
* Returns true if an error has been raised, false otherwise. * Returns true if an error has been raised, false otherwise.
*/ */
@@ -84,9 +84,9 @@ extern "C" {
* xmlXPathGetDocument: * xmlXPathGetDocument:
* @ctxt: an XPath parser context * @ctxt: an XPath parser context
* *
* Get the document of an XPath context * Get the document of an XPath context.
* *
* Returns the context document * Returns the context document.
*/ */
#define xmlXPathGetDocument(ctxt) ((ctxt)->context->doc) #define xmlXPathGetDocument(ctxt) ((ctxt)->context->doc)
@@ -94,9 +94,9 @@ extern "C" {
* xmlXPathGetContextNode: * xmlXPathGetContextNode:
* @ctxt: an XPath parser context * @ctxt: an XPath parser context
* *
* Get the context node of an XPath context * Get the context node of an XPath context.
* *
* Returns the context node * Returns the context node.
*/ */
#define xmlXPathGetContextNode(ctxt) ((ctxt)->context->node) #define xmlXPathGetContextNode(ctxt) ((ctxt)->context->node)
@@ -111,7 +111,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
* @ctxt: an XPath parser context * @ctxt: an XPath parser context
* @val: a boolean * @val: a boolean
* *
* Pushes the boolean @val on the context stack * Pushes the boolean @val on the context stack.
*/ */
#define xmlXPathReturnBoolean(ctxt, val) \ #define xmlXPathReturnBoolean(ctxt, val) \
valuePush((ctxt), xmlXPathNewBoolean(val)) valuePush((ctxt), xmlXPathNewBoolean(val))
@@ -120,7 +120,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
* xmlXPathReturnTrue: * xmlXPathReturnTrue:
* @ctxt: an XPath parser context * @ctxt: an XPath parser context
* *
* Pushes true on the context stack * Pushes true on the context stack.
*/ */
#define xmlXPathReturnTrue(ctxt) xmlXPathReturnBoolean((ctxt), 1) #define xmlXPathReturnTrue(ctxt) xmlXPathReturnBoolean((ctxt), 1)
@@ -128,7 +128,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
* xmlXPathReturnFalse: * xmlXPathReturnFalse:
* @ctxt: an XPath parser context * @ctxt: an XPath parser context
* *
* Pushes false on the context stack * Pushes false on the context stack.
*/ */
#define xmlXPathReturnFalse(ctxt) xmlXPathReturnBoolean((ctxt), 0) #define xmlXPathReturnFalse(ctxt) xmlXPathReturnBoolean((ctxt), 0)
@@ -137,7 +137,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
* @ctxt: an XPath parser context * @ctxt: an XPath parser context
* @val: a double * @val: a double
* *
* Pushes the double @val on the context stack * Pushes the double @val on the context stack.
*/ */
#define xmlXPathReturnNumber(ctxt, val) \ #define xmlXPathReturnNumber(ctxt, val) \
valuePush((ctxt), xmlXPathNewFloat(val)) valuePush((ctxt), xmlXPathNewFloat(val))
@@ -147,7 +147,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
* @ctxt: an XPath parser context * @ctxt: an XPath parser context
* @str: a string * @str: a string
* *
* Pushes the string @str on the context stack * Pushes the string @str on the context stack.
*/ */
#define xmlXPathReturnString(ctxt, str) \ #define xmlXPathReturnString(ctxt, str) \
valuePush((ctxt), xmlXPathWrapString(str)) valuePush((ctxt), xmlXPathWrapString(str))
@@ -156,7 +156,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
* xmlXPathReturnEmptyString: * xmlXPathReturnEmptyString:
* @ctxt: an XPath parser context * @ctxt: an XPath parser context
* *
* Pushes an empty string on the stack * Pushes an empty string on the stack.
*/ */
#define xmlXPathReturnEmptyString(ctxt) \ #define xmlXPathReturnEmptyString(ctxt) \
valuePush((ctxt), xmlXPathNewCString("")) valuePush((ctxt), xmlXPathNewCString(""))
@@ -166,7 +166,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
* @ctxt: an XPath parser context * @ctxt: an XPath parser context
* @ns: a node-set * @ns: a node-set
* *
* Pushes the node-set @ns on the context stack * Pushes the node-set @ns on the context stack.
*/ */
#define xmlXPathReturnNodeSet(ctxt, ns) \ #define xmlXPathReturnNodeSet(ctxt, ns) \
valuePush((ctxt), xmlXPathWrapNodeSet(ns)) valuePush((ctxt), xmlXPathWrapNodeSet(ns))
@@ -175,7 +175,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
* xmlXPathReturnEmptyNodeSet: * xmlXPathReturnEmptyNodeSet:
* @ctxt: an XPath parser context * @ctxt: an XPath parser context
* *
* Pushes an empty node-set on the context stack * Pushes an empty node-set on the context stack.
*/ */
#define xmlXPathReturnEmptyNodeSet(ctxt) \ #define xmlXPathReturnEmptyNodeSet(ctxt) \
valuePush((ctxt), xmlXPathNewNodeSet(NULL)) valuePush((ctxt), xmlXPathNewNodeSet(NULL))
@@ -185,7 +185,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
* @ctxt: an XPath parser context * @ctxt: an XPath parser context
* @val: user data * @val: user data
* *
* Pushes user data on the context stack * Pushes user data on the context stack.
*/ */
#define xmlXPathReturnExternal(ctxt, val) \ #define xmlXPathReturnExternal(ctxt, val) \
valuePush((ctxt), xmlXPathWrapExternal(val)) valuePush((ctxt), xmlXPathWrapExternal(val))
@@ -195,9 +195,9 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
* @ctxt: an XPath parser context * @ctxt: an XPath parser context
* *
* Check if the current value on the XPath stack is a node set or * Check if the current value on the XPath stack is a node set or
* an XSLT value tree * an XSLT value tree.
* *
* Returns true if the current object on the stack is a node-set * Returns true if the current object on the stack is a node-set.
*/ */
#define xmlXPathStackIsNodeSet(ctxt) \ #define xmlXPathStackIsNodeSet(ctxt) \
(((ctxt)->value != NULL) \ (((ctxt)->value != NULL) \
@@ -212,7 +212,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
* object. * object.
* *
* Returns true if the current object on the stack is an external * Returns true if the current object on the stack is an external
* object * object.
*/ */
#define xmlXPathStackIsExternal(ctxt) \ #define xmlXPathStackIsExternal(ctxt) \
((ctxt->value != NULL) && (ctxt->value->type == XPATH_USERS)) ((ctxt->value != NULL) && (ctxt->value->type == XPATH_USERS))
@@ -221,7 +221,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
* xmlXPathEmptyNodeSet: * xmlXPathEmptyNodeSet:
* @ns: a node-set * @ns: a node-set
* *
* Empties a node-set * Empties a node-set.
*/ */
#define xmlXPathEmptyNodeSet(ns) \ #define xmlXPathEmptyNodeSet(ns) \
{ while ((ns)->nodeNr > 0) (ns)->nodeTab[(ns)->nodeNr--] = NULL; } { while ((ns)->nodeNr > 0) (ns)->nodeTab[(ns)->nodeNr--] = NULL; }
@@ -229,7 +229,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
/** /**
* CHECK_ERROR: * CHECK_ERROR:
* *
* macro to return from the function if an XPath error was detected * Macro to return from the function if an XPath error was detected.
*/ */
#define CHECK_ERROR \ #define CHECK_ERROR \
if (ctxt->error != XPATH_EXPRESSION_OK) return if (ctxt->error != XPATH_EXPRESSION_OK) return
@@ -237,7 +237,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
/** /**
* CHECK_ERROR0: * CHECK_ERROR0:
* *
* macro to return 0 from the function if an XPath error was detected * Macro to return 0 from the function if an XPath error was detected.
*/ */
#define CHECK_ERROR0 \ #define CHECK_ERROR0 \
if (ctxt->error != XPATH_EXPRESSION_OK) return(0) if (ctxt->error != XPATH_EXPRESSION_OK) return(0)
@@ -246,7 +246,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
* XP_ERROR: * XP_ERROR:
* @X: the error code * @X: the error code
* *
* Macro to raise an XPath error and return * Macro to raise an XPath error and return.
*/ */
#define XP_ERROR(X) \ #define XP_ERROR(X) \
{ xmlXPatherror(ctxt, __FILE__, __LINE__, X); \ { xmlXPatherror(ctxt, __FILE__, __LINE__, X); \
@@ -256,7 +256,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
* XP_ERROR0: * XP_ERROR0:
* @X: the error code * @X: the error code
* *
* Macro to raise an XPath error and return 0 * Macro to raise an XPath error and return 0.
*/ */
#define XP_ERROR0(X) \ #define XP_ERROR0(X) \
{ xmlXPatherror(ctxt, __FILE__, __LINE__, X); \ { xmlXPatherror(ctxt, __FILE__, __LINE__, X); \
@@ -278,7 +278,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
* @typeval: the XPath type * @typeval: the XPath type
* *
* Macro to check that the value on top of the XPath stack is of a given * Macro to check that the value on top of the XPath stack is of a given
* type. return(0) in case of failure * type. Return(0) in case of failure
*/ */
#define CHECK_TYPE0(typeval) \ #define CHECK_TYPE0(typeval) \
if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \ if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
@@ -288,7 +288,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
* CHECK_ARITY: * CHECK_ARITY:
* @x: the number of expected args * @x: the number of expected args
* *
* Macro to check that the number of args passed to an XPath function matches * Macro to check that the number of args passed to an XPath function matches.
*/ */
#define CHECK_ARITY(x) \ #define CHECK_ARITY(x) \
if (nargs != (x)) \ if (nargs != (x)) \
@@ -297,7 +297,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
/** /**
* CAST_TO_STRING: * CAST_TO_STRING:
* *
* Macro to try to cast the value on the top of the XPath stack to a string * Macro to try to cast the value on the top of the XPath stack to a string.
*/ */
#define CAST_TO_STRING \ #define CAST_TO_STRING \
if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_STRING)) \ if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_STRING)) \
@@ -306,7 +306,7 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
/** /**
* CAST_TO_NUMBER: * CAST_TO_NUMBER:
* *
* Macro to try to cast the value on the top of the XPath stack to a number * Macro to try to cast the value on the top of the XPath stack to a number.
*/ */
#define CAST_TO_NUMBER \ #define CAST_TO_NUMBER \
if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_NUMBER)) \ if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_NUMBER)) \
@@ -315,14 +315,14 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
/** /**
* CAST_TO_BOOLEAN: * CAST_TO_BOOLEAN:
* *
* Macro to try to cast the value on the top of the XPath stack to a boolean * Macro to try to cast the value on the top of the XPath stack to a boolean.
*/ */
#define CAST_TO_BOOLEAN \ #define CAST_TO_BOOLEAN \
if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_BOOLEAN)) \ if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_BOOLEAN)) \
xmlXPathBooleanFunction(ctxt, 1); xmlXPathBooleanFunction(ctxt, 1);
/* /*
* Variable Lookup forwarding * Variable Lookup forwarding.
*/ */
/** /**
* xmlXPathVariableLookupFunc: * xmlXPathVariableLookupFunc:
@@ -331,9 +331,9 @@ void * xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
* @ns_uri: the namespace name hosting this variable * @ns_uri: the namespace name hosting this variable
* *
* Prototype for callbacks used to plug variable lookup in the XPath * Prototype for callbacks used to plug variable lookup in the XPath
* engine * engine.
* *
* Returns the XPath object value or NULL if not found * Returns the XPath object value or NULL if not found.
*/ */
typedef xmlXPathObjectPtr (*xmlXPathVariableLookupFunc) (void *ctxt, typedef xmlXPathObjectPtr (*xmlXPathVariableLookupFunc) (void *ctxt,
const xmlChar *name, const xmlChar *name,
@@ -344,7 +344,7 @@ void xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt,
void *data); void *data);
/* /*
* Function Lookup forwarding * Function Lookup forwarding.
*/ */
/** /**
* xmlXPathFuncLookupFunc: * xmlXPathFuncLookupFunc:
@@ -353,9 +353,9 @@ void xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt,
* @ns_uri: the namespace name hosting this function * @ns_uri: the namespace name hosting this function
* *
* Prototype for callbacks used to plug function lookup in the XPath * Prototype for callbacks used to plug function lookup in the XPath
* engine * engine.
* *
* Returns the XPath function or NULL if not found * Returns the XPath function or NULL if not found.
*/ */
typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt, typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt,
const xmlChar *name, const xmlChar *name,
@@ -366,7 +366,7 @@ void xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt,
void *funcCtxt); void *funcCtxt);
/* /*
* Error reporting * Error reporting.
*/ */
void xmlXPatherror (xmlXPathParserContextPtr ctxt, void xmlXPatherror (xmlXPathParserContextPtr ctxt,
const char *file, const char *file,
@@ -381,7 +381,7 @@ void xmlXPathDebugDumpCompExpr(FILE *output,
int depth); int depth);
/** /**
* NodeSet handling * NodeSet handling.
*/ */
int xmlXPathNodeSetContains (xmlNodeSetPtr cur, int xmlXPathNodeSetContains (xmlNodeSetPtr cur,
xmlNodePtr val); xmlNodePtr val);
@@ -416,7 +416,7 @@ xmlNodeSetPtr xmlXPathTrailing (xmlNodeSetPtr nodes1,
/** /**
* Extending a context * Extending a context.
*/ */
int xmlXPathRegisterNs (xmlXPathContextPtr ctxt, int xmlXPathRegisterNs (xmlXPathContextPtr ctxt,
@@ -454,14 +454,14 @@ xmlXPathObjectPtr xmlXPathVariableLookupNS (xmlXPathContextPtr ctxt,
void xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt); void xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt);
/** /**
* Utilities to extend XPath * Utilities to extend XPath.
*/ */
xmlXPathParserContextPtr xmlXPathParserContextPtr
xmlXPathNewParserContext (const xmlChar *str, xmlXPathNewParserContext (const xmlChar *str,
xmlXPathContextPtr ctxt); xmlXPathContextPtr ctxt);
void xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt); void xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt);
/* TODO: remap to xmlXPathValuePop and Push */ /* TODO: remap to xmlXPathValuePop and Push. */
xmlXPathObjectPtr valuePop (xmlXPathParserContextPtr ctxt); xmlXPathObjectPtr valuePop (xmlXPathParserContextPtr ctxt);
int valuePush (xmlXPathParserContextPtr ctxt, int valuePush (xmlXPathParserContextPtr ctxt,
xmlXPathObjectPtr value); xmlXPathObjectPtr value);
@@ -486,7 +486,7 @@ xmlChar * xmlXPathParseName (xmlXPathParserContextPtr ctxt);
xmlChar * xmlXPathParseNCName (xmlXPathParserContextPtr ctxt); xmlChar * xmlXPathParseNCName (xmlXPathParserContextPtr ctxt);
/* /*
* Existing functions * Existing functions.
*/ */
double xmlXPathStringEvalNumber(const xmlChar *str); double xmlXPathStringEvalNumber(const xmlChar *str);
int xmlXPathEvaluatePredicateResult(xmlXPathParserContextPtr ctxt, int xmlXPathEvaluatePredicateResult(xmlXPathParserContextPtr ctxt,
@@ -511,7 +511,7 @@ void xmlXPathModValues(xmlXPathParserContextPtr ctxt);
int xmlXPathIsNodeType(const xmlChar *name); int xmlXPathIsNodeType(const xmlChar *name);
/* /*
* Some of the axis navigation routines * Some of the axis navigation routines.
*/ */
xmlNodePtr xmlXPathNextSelf(xmlXPathParserContextPtr ctxt, xmlNodePtr xmlXPathNextSelf(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur); xmlNodePtr cur);
@@ -540,7 +540,7 @@ xmlNodePtr xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt,
xmlNodePtr xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt, xmlNodePtr xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt,
xmlNodePtr cur); xmlNodePtr cur);
/* /*
* The official core of XPath functions * The official core of XPath functions.
*/ */
void xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs);
void xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs); void xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs);

View File

@@ -31,7 +31,7 @@ struct _xmlLocationSet {
}; };
/* /*
* Handling of location sets * Handling of location sets.
*/ */
xmlLocationSetPtr xmlXPtrLocationSetCreate(xmlXPathObjectPtr val); xmlLocationSetPtr xmlXPtrLocationSetCreate(xmlXPathObjectPtr val);
@@ -65,7 +65,7 @@ void xmlXPtrLocationSetRemove(xmlLocationSetPtr cur,
int val); int val);
/* /*
* Functions * Functions.
*/ */
xmlXPathContextPtr xmlXPtrNewContext (xmlDocPtr doc, xmlXPathContextPtr xmlXPtrNewContext (xmlDocPtr doc,
xmlNodePtr here, xmlNodePtr here,