Commit ad7b9726 authored by Alexandre Julliard's avatar Alexandre Julliard

xml2: Import upstream release 2.11.4.

parent 6b678a4e
...@@ -25,7 +25,10 @@ ...@@ -25,7 +25,10 @@
#include <libxml/globals.h> #include <libxml/globals.h>
#include <libxml/uri.h> #include <libxml/uri.h>
#include "buf.h" #include "private/buf.h"
#include "private/error.h"
#include "private/io.h"
#include "private/save.h"
/************************************************************************ /************************************************************************
* * * *
...@@ -328,11 +331,6 @@ htmlIsBooleanAttr(const xmlChar *name) ...@@ -328,11 +331,6 @@ htmlIsBooleanAttr(const xmlChar *name)
} }
#ifdef LIBXML_OUTPUT_ENABLED #ifdef LIBXML_OUTPUT_ENABLED
/*
* private routine exported from xmlIO.c
*/
xmlOutputBufferPtr
xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder);
/************************************************************************ /************************************************************************
* * * *
* Output error handlers * * Output error handlers *
...@@ -417,7 +415,7 @@ htmlBufNodeDumpFormat(xmlBufPtr buf, xmlDocPtr doc, xmlNodePtr cur, ...@@ -417,7 +415,7 @@ htmlBufNodeDumpFormat(xmlBufPtr buf, xmlDocPtr doc, xmlNodePtr cur,
htmlSaveErrMemory("allocating HTML output buffer"); htmlSaveErrMemory("allocating HTML output buffer");
return (-1); return (-1);
} }
memset(outbuf, 0, (size_t) sizeof(xmlOutputBuffer)); memset(outbuf, 0, sizeof(xmlOutputBuffer));
outbuf->buffer = buf; outbuf->buffer = buf;
outbuf->encoder = NULL; outbuf->encoder = NULL;
outbuf->writecallback = NULL; outbuf->writecallback = NULL;
...@@ -622,8 +620,6 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) { ...@@ -622,8 +620,6 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
* * * *
************************************************************************/ ************************************************************************/
void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
/** /**
* htmlDtdDumpOutput: * htmlDtdDumpOutput:
* @buf: the HTML buffer output * @buf: the HTML buffer output
...@@ -705,10 +701,15 @@ htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) { ...@@ -705,10 +701,15 @@ htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) {
while (IS_BLANK_CH(*tmp)) tmp++; while (IS_BLANK_CH(*tmp)) tmp++;
/* /*
* the < and > have already been escaped at the entity level * Angle brackets are technically illegal in URIs, but they're
* And doing so here breaks server side includes * used in server side includes, for example. Curly brackets
* are illegal as well and often used in templates.
* Don't escape non-whitespace, printable ASCII chars for
* improved interoperability. Only escape space, control
* and non-ASCII chars.
*/ */
escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+<>"); escaped = xmlURIEscapeStr(tmp,
BAD_CAST "\"#$%&+,/:;<=>?@[\\]^`{|}");
if (escaped != NULL) { if (escaped != NULL) {
xmlBufWriteQuotedString(buf->buffer, escaped); xmlBufWriteQuotedString(buf->buffer, escaped);
xmlFree(escaped); xmlFree(escaped);
......
...@@ -28,6 +28,10 @@ ...@@ -28,6 +28,10 @@
#include <libxml/HTMLtree.h> #include <libxml/HTMLtree.h>
#include <libxml/globals.h> #include <libxml/globals.h>
#include "private/error.h"
#include "private/parser.h"
#include "private/tree.h"
/* #define DEBUG_SAX2 */ /* #define DEBUG_SAX2 */
/* #define DEBUG_SAX2_TREE */ /* #define DEBUG_SAX2_TREE */
...@@ -383,6 +387,9 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name, ...@@ -383,6 +387,9 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
xmlCharEncoding enc; xmlCharEncoding enc;
int oldcharset; int oldcharset;
const xmlChar *oldencoding; const xmlChar *oldencoding;
int oldprogressive;
unsigned long consumed;
size_t buffered;
/* /*
* Ask the Entity resolver to load the damn thing * Ask the Entity resolver to load the damn thing
...@@ -405,18 +412,22 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name, ...@@ -405,18 +412,22 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
oldinputTab = ctxt->inputTab; oldinputTab = ctxt->inputTab;
oldcharset = ctxt->charset; oldcharset = ctxt->charset;
oldencoding = ctxt->encoding; oldencoding = ctxt->encoding;
oldprogressive = ctxt->progressive;
ctxt->encoding = NULL; ctxt->encoding = NULL;
ctxt->progressive = 0;
ctxt->inputTab = (xmlParserInputPtr *) ctxt->inputTab = (xmlParserInputPtr *)
xmlMalloc(5 * sizeof(xmlParserInputPtr)); xmlMalloc(5 * sizeof(xmlParserInputPtr));
if (ctxt->inputTab == NULL) { if (ctxt->inputTab == NULL) {
xmlSAX2ErrMemory(ctxt, "xmlSAX2ExternalSubset"); xmlSAX2ErrMemory(ctxt, "xmlSAX2ExternalSubset");
xmlFreeInputStream(input);
ctxt->input = oldinput; ctxt->input = oldinput;
ctxt->inputNr = oldinputNr; ctxt->inputNr = oldinputNr;
ctxt->inputMax = oldinputMax; ctxt->inputMax = oldinputMax;
ctxt->inputTab = oldinputTab; ctxt->inputTab = oldinputTab;
ctxt->charset = oldcharset; ctxt->charset = oldcharset;
ctxt->encoding = oldencoding; ctxt->encoding = oldencoding;
ctxt->progressive = oldprogressive;
return; return;
} }
ctxt->inputNr = 0; ctxt->inputNr = 0;
...@@ -451,6 +462,18 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name, ...@@ -451,6 +462,18 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
while (ctxt->inputNr > 1) while (ctxt->inputNr > 1)
xmlPopInput(ctxt); xmlPopInput(ctxt);
consumed = ctxt->input->consumed;
buffered = ctxt->input->cur - ctxt->input->base;
if (buffered > ULONG_MAX - consumed)
consumed = ULONG_MAX;
else
consumed += buffered;
if (consumed > ULONG_MAX - ctxt->sizeentities)
ctxt->sizeentities = ULONG_MAX;
else
ctxt->sizeentities += consumed;
xmlFreeInputStream(ctxt->input); xmlFreeInputStream(ctxt->input);
xmlFree(ctxt->inputTab); xmlFree(ctxt->inputTab);
...@@ -467,6 +490,7 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name, ...@@ -467,6 +490,7 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
(!xmlDictOwns(ctxt->dict, ctxt->encoding)))) (!xmlDictOwns(ctxt->dict, ctxt->encoding))))
xmlFree((xmlChar *) ctxt->encoding); xmlFree((xmlChar *) ctxt->encoding);
ctxt->encoding = oldencoding; ctxt->encoding = oldencoding;
ctxt->progressive = oldprogressive;
/* ctxt->wellFormed = oldwellFormed; */ /* ctxt->wellFormed = oldwellFormed; */
} }
} }
...@@ -1311,25 +1335,25 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname, ...@@ -1311,25 +1335,25 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
/* !!!!!! <a toto:arg="" xmlns:toto="http://toto.com"> */ /* !!!!!! <a toto:arg="" xmlns:toto="http://toto.com"> */
ret = xmlNewNsPropEatName(ctxt->node, namespace, name, NULL); ret = xmlNewNsPropEatName(ctxt->node, namespace, name, NULL);
if (ret == NULL)
goto error;
if (ret != NULL) { if ((ctxt->replaceEntities == 0) && (!ctxt->html)) {
if ((ctxt->replaceEntities == 0) && (!ctxt->html)) { xmlNodePtr tmp;
xmlNodePtr tmp;
ret->children = xmlStringGetNodeList(ctxt->myDoc, value);
ret->children = xmlStringGetNodeList(ctxt->myDoc, value); tmp = ret->children;
tmp = ret->children; while (tmp != NULL) {
while (tmp != NULL) { tmp->parent = (xmlNodePtr) ret;
tmp->parent = (xmlNodePtr) ret; if (tmp->next == NULL)
if (tmp->next == NULL) ret->last = tmp;
ret->last = tmp; tmp = tmp->next;
tmp = tmp->next; }
} } else if (value != NULL) {
} else if (value != NULL) { ret->children = xmlNewDocText(ctxt->myDoc, value);
ret->children = xmlNewDocText(ctxt->myDoc, value); ret->last = ret->children;
ret->last = ret->children; if (ret->children != NULL)
if (ret->children != NULL) ret->children->parent = (xmlNodePtr) ret;
ret->children->parent = (xmlNodePtr) ret;
}
} }
#ifdef LIBXML_VALID_ENABLED #ifdef LIBXML_VALID_ENABLED
...@@ -1608,12 +1632,15 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts) ...@@ -1608,12 +1632,15 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
ctxt->validate = 0; ctxt->validate = 0;
} }
if (ctxt->html) {
/* prefix = NULL;
* Split the full name into a namespace prefix and the tag name name = xmlStrdup(fullname);
*/ } else {
name = xmlSplitQName(ctxt, fullname, &prefix); /*
* Split the full name into a namespace prefix and the tag name
*/
name = xmlSplitQName(ctxt, fullname, &prefix);
}
/* /*
* Note : the namespace resolution is deferred until the end of the * Note : the namespace resolution is deferred until the end of the
...@@ -1638,8 +1665,8 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts) ...@@ -1638,8 +1665,8 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
ctxt->nodemem = -1; ctxt->nodemem = -1;
if (ctxt->linenumbers) { if (ctxt->linenumbers) {
if (ctxt->input != NULL) { if (ctxt->input != NULL) {
if (ctxt->input->line < USHRT_MAX) if ((unsigned) ctxt->input->line < (unsigned) USHRT_MAX)
ret->line = (unsigned short) ctxt->input->line; ret->line = ctxt->input->line;
else else
ret->line = USHRT_MAX; ret->line = USHRT_MAX;
} }
...@@ -1803,13 +1830,6 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED) ...@@ -1803,13 +1830,6 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2EndElement(%s)\n", name); xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2EndElement(%s)\n", name);
#endif #endif
/* Capture end position and add node */
if (cur != NULL && ctxt->record_info) {
ctxt->nodeInfo->end_pos = ctxt->input->cur - ctxt->input->base;
ctxt->nodeInfo->end_line = ctxt->input->line;
ctxt->nodeInfo->node = cur;
xmlParserAddNodeInfo(ctxt, ctxt->nodeInfo);
}
ctxt->nodemem = -1; ctxt->nodemem = -1;
#ifdef LIBXML_VALID_ENABLED #ifdef LIBXML_VALID_ENABLED
...@@ -1903,8 +1923,8 @@ skip: ...@@ -1903,8 +1923,8 @@ skip:
if (ctxt->linenumbers) { if (ctxt->linenumbers) {
if (ctxt->input != NULL) { if (ctxt->input != NULL) {
if (ctxt->input->line < USHRT_MAX) if ((unsigned) ctxt->input->line < (unsigned) USHRT_MAX)
ret->line = (unsigned short) ctxt->input->line; ret->line = ctxt->input->line;
else { else {
ret->line = USHRT_MAX; ret->line = USHRT_MAX;
if (ctxt->options & XML_PARSE_BIG_LINES) if (ctxt->options & XML_PARSE_BIG_LINES)
...@@ -2260,6 +2280,7 @@ xmlSAX2StartElementNs(void *ctx, ...@@ -2260,6 +2280,7 @@ xmlSAX2StartElementNs(void *ctx,
ret->name = lname; ret->name = lname;
if (ret->name == NULL) { if (ret->name == NULL) {
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs"); xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
xmlFree(ret);
return; return;
} }
} }
...@@ -2281,8 +2302,8 @@ xmlSAX2StartElementNs(void *ctx, ...@@ -2281,8 +2302,8 @@ xmlSAX2StartElementNs(void *ctx,
} }
if (ctxt->linenumbers) { if (ctxt->linenumbers) {
if (ctxt->input != NULL) { if (ctxt->input != NULL) {
if (ctxt->input->line < USHRT_MAX) if ((unsigned) ctxt->input->line < (unsigned) USHRT_MAX)
ret->line = (unsigned short) ctxt->input->line; ret->line = ctxt->input->line;
else else
ret->line = USHRT_MAX; ret->line = USHRT_MAX;
} }
...@@ -2451,24 +2472,15 @@ xmlSAX2EndElementNs(void *ctx, ...@@ -2451,24 +2472,15 @@ xmlSAX2EndElementNs(void *ctx,
const xmlChar * URI ATTRIBUTE_UNUSED) const xmlChar * URI ATTRIBUTE_UNUSED)
{ {
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlParserNodeInfo node_info;
xmlNodePtr cur;
if (ctx == NULL) return; if (ctx == NULL) return;
cur = ctxt->node;
/* Capture end position and add node */
if ((ctxt->record_info) && (cur != NULL)) {
node_info.end_pos = ctxt->input->cur - ctxt->input->base;
node_info.end_line = ctxt->input->line;
node_info.node = cur;
xmlParserAddNodeInfo(ctxt, &node_info);
}
ctxt->nodemem = -1; ctxt->nodemem = -1;
#ifdef LIBXML_VALID_ENABLED #ifdef LIBXML_VALID_ENABLED
if (ctxt->validate && ctxt->wellFormed && if (ctxt->validate && ctxt->wellFormed &&
ctxt->myDoc && ctxt->myDoc->intSubset) ctxt->myDoc && ctxt->myDoc->intSubset)
ctxt->valid &= xmlValidateOneElement(&ctxt->vctxt, ctxt->myDoc, cur); ctxt->valid &= xmlValidateOneElement(&ctxt->vctxt, ctxt->myDoc,
ctxt->node);
#endif /* LIBXML_VALID_ENABLED */ #endif /* LIBXML_VALID_ENABLED */
/* /*
...@@ -2631,7 +2643,8 @@ xmlSAX2Text(xmlParserCtxtPtr ctxt, const xmlChar *ch, int len, ...@@ -2631,7 +2643,8 @@ xmlSAX2Text(xmlParserCtxtPtr ctxt, const xmlChar *ch, int len,
/* Mixed content, first time */ /* Mixed content, first time */
if (type == XML_TEXT_NODE) { if (type == XML_TEXT_NODE) {
lastChild = xmlSAX2TextNode(ctxt, ch, len); lastChild = xmlSAX2TextNode(ctxt, ch, len);
lastChild->doc = ctxt->myDoc; if (lastChild != NULL)
lastChild->doc = ctxt->myDoc;
} else } else
lastChild = xmlNewCDataBlock(ctxt->myDoc, ch, len); lastChild = xmlNewCDataBlock(ctxt->myDoc, ch, len);
if (lastChild != NULL) { if (lastChild != NULL) {
...@@ -2706,8 +2719,8 @@ xmlSAX2ProcessingInstruction(void *ctx, const xmlChar *target, ...@@ -2706,8 +2719,8 @@ xmlSAX2ProcessingInstruction(void *ctx, const xmlChar *target,
if (ctxt->linenumbers) { if (ctxt->linenumbers) {
if (ctxt->input != NULL) { if (ctxt->input != NULL) {
if (ctxt->input->line < USHRT_MAX) if ((unsigned) ctxt->input->line < (unsigned) USHRT_MAX)
ret->line = (unsigned short) ctxt->input->line; ret->line = ctxt->input->line;
else else
ret->line = USHRT_MAX; ret->line = USHRT_MAX;
} }
...@@ -2766,8 +2779,8 @@ xmlSAX2Comment(void *ctx, const xmlChar *value) ...@@ -2766,8 +2779,8 @@ xmlSAX2Comment(void *ctx, const xmlChar *value)
if (ret == NULL) return; if (ret == NULL) return;
if (ctxt->linenumbers) { if (ctxt->linenumbers) {
if (ctxt->input != NULL) { if (ctxt->input != NULL) {
if (ctxt->input->line < USHRT_MAX) if ((unsigned) ctxt->input->line < (unsigned) USHRT_MAX)
ret->line = (unsigned short) ctxt->input->line; ret->line = ctxt->input->line;
else else
ret->line = USHRT_MAX; ret->line = USHRT_MAX;
} }
...@@ -2825,6 +2838,8 @@ static int xmlSAX2DefaultVersionValue = 2; ...@@ -2825,6 +2838,8 @@ static int xmlSAX2DefaultVersionValue = 2;
* xmlSAXDefaultVersion: * xmlSAXDefaultVersion:
* @version: the version, 1 or 2 * @version: the version, 1 or 2
* *
* DEPRECATED: Use parser option XML_PARSE_SAX1.
*
* Set the default version of SAX used globally by the library. * Set the default version of SAX used globally by the library.
* By default, during initialization the default is set to 2. * By default, during initialization the default is set to 2.
* Note that it is generally a better coding style to use * Note that it is generally a better coding style to use
...@@ -2925,7 +2940,7 @@ xmlSAX2InitDefaultSAXHandler(xmlSAXHandler *hdlr, int warning) ...@@ -2925,7 +2940,7 @@ xmlSAX2InitDefaultSAXHandler(xmlSAXHandler *hdlr, int warning)
/** /**
* xmlDefaultSAXHandlerInit: * xmlDefaultSAXHandlerInit:
* *
* DEPRECATED: This function will be made private. Call xmlInitParser to * DEPRECATED: This function is a no-op. Call xmlInitParser to
* initialize the library. * initialize the library.
* *
* Initialize the default SAX2 handler * Initialize the default SAX2 handler
...@@ -2933,9 +2948,6 @@ xmlSAX2InitDefaultSAXHandler(xmlSAXHandler *hdlr, int warning) ...@@ -2933,9 +2948,6 @@ xmlSAX2InitDefaultSAXHandler(xmlSAXHandler *hdlr, int warning)
void void
xmlDefaultSAXHandlerInit(void) xmlDefaultSAXHandlerInit(void)
{ {
#ifdef LIBXML_SAX1_ENABLED
xmlSAXVersion((xmlSAXHandlerPtr) &xmlDefaultSAXHandler, 1);
#endif /* LIBXML_SAX1_ENABLED */
} }
#ifdef LIBXML_HTML_ENABLED #ifdef LIBXML_HTML_ENABLED
...@@ -2986,15 +2998,12 @@ xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr) ...@@ -2986,15 +2998,12 @@ xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr)
/** /**
* htmlDefaultSAXHandlerInit: * htmlDefaultSAXHandlerInit:
* *
* DEPRECATED: This function will be made private. Call xmlInitParser to * DEPRECATED: This function is a no-op. Call xmlInitParser to
* initialize the library. * initialize the library.
*
* Initialize the default SAX handler
*/ */
void void
htmlDefaultSAXHandlerInit(void) htmlDefaultSAXHandlerInit(void)
{ {
xmlSAX2InitHtmlDefaultSAXHandler((xmlSAXHandlerPtr) &htmlDefaultSAXHandler);
} }
#endif /* LIBXML_HTML_ENABLED */ #endif /* LIBXML_HTML_ENABLED */
...@@ -24,7 +24,9 @@ ...@@ -24,7 +24,9 @@
#include <libxml/globals.h> #include <libxml/globals.h>
#include <libxml/tree.h> #include <libxml/tree.h>
#include <libxml/parserInternals.h> /* for XML_MAX_TEXT_LENGTH */ #include <libxml/parserInternals.h> /* for XML_MAX_TEXT_LENGTH */
#include "buf.h"
#include "private/buf.h"
#include "private/error.h"
#ifndef SIZE_MAX #ifndef SIZE_MAX
#define SIZE_MAX ((size_t) -1) #define SIZE_MAX ((size_t) -1)
...@@ -133,7 +135,7 @@ xmlBufCreate(void) { ...@@ -133,7 +135,7 @@ xmlBufCreate(void) {
ret->size = xmlDefaultBufferSize; ret->size = xmlDefaultBufferSize;
UPDATE_COMPAT(ret); UPDATE_COMPAT(ret);
ret->alloc = xmlBufferAllocScheme; ret->alloc = xmlBufferAllocScheme;
ret->content = (xmlChar *) xmlMallocAtomic(ret->size * sizeof(xmlChar)); ret->content = (xmlChar *) xmlMallocAtomic(ret->size);
if (ret->content == NULL) { if (ret->content == NULL) {
xmlBufMemoryError(ret, "creating buffer"); xmlBufMemoryError(ret, "creating buffer");
xmlFree(ret); xmlFree(ret);
...@@ -169,7 +171,7 @@ xmlBufCreateSize(size_t size) { ...@@ -169,7 +171,7 @@ xmlBufCreateSize(size_t size) {
ret->size = (size ? size + 1 : 0); /* +1 for ending null */ ret->size = (size ? size + 1 : 0); /* +1 for ending null */
UPDATE_COMPAT(ret); UPDATE_COMPAT(ret);
if (ret->size){ if (ret->size){
ret->content = (xmlChar *) xmlMallocAtomic(ret->size * sizeof(xmlChar)); ret->content = (xmlChar *) xmlMallocAtomic(ret->size);
if (ret->content == NULL) { if (ret->content == NULL) {
xmlBufMemoryError(ret, "creating buffer"); xmlBufMemoryError(ret, "creating buffer");
xmlFree(ret); xmlFree(ret);
...@@ -198,8 +200,6 @@ xmlBufDetach(xmlBufPtr buf) { ...@@ -198,8 +200,6 @@ xmlBufDetach(xmlBufPtr buf) {
if (buf == NULL) if (buf == NULL)
return(NULL); return(NULL);
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
return(NULL);
if (buf->buffer != NULL) if (buf->buffer != NULL)
return(NULL); return(NULL);
if (buf->error) if (buf->error)
...@@ -214,40 +214,6 @@ xmlBufDetach(xmlBufPtr buf) { ...@@ -214,40 +214,6 @@ xmlBufDetach(xmlBufPtr buf) {
return ret; return ret;
} }
/**
* xmlBufCreateStatic:
* @mem: the memory area
* @size: the size in byte
*
* routine to create an XML buffer from an immutable memory area.
* The area won't be modified nor copied, and is expected to be
* present until the end of the buffer lifetime.
*
* returns the new structure.
*/
xmlBufPtr
xmlBufCreateStatic(void *mem, size_t size) {
xmlBufPtr ret;
if (mem == NULL)
return(NULL);
ret = (xmlBufPtr) xmlMalloc(sizeof(xmlBuf));
if (ret == NULL) {
xmlBufMemoryError(NULL, "creating buffer");
return(NULL);
}
ret->use = size;
ret->size = size;
UPDATE_COMPAT(ret);
ret->alloc = XML_BUFFER_ALLOC_IMMUTABLE;
ret->content = (xmlChar *) mem;
ret->error = 0;
ret->buffer = NULL;
return(ret);
}
/** /**
* xmlBufGetAllocationScheme: * xmlBufGetAllocationScheme:
* @buf: the buffer * @buf: the buffer
...@@ -287,13 +253,11 @@ xmlBufSetAllocationScheme(xmlBufPtr buf, ...@@ -287,13 +253,11 @@ xmlBufSetAllocationScheme(xmlBufPtr buf,
#endif #endif
return(-1); return(-1);
} }
if ((buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) || if (buf->alloc == XML_BUFFER_ALLOC_IO)
(buf->alloc == XML_BUFFER_ALLOC_IO))
return(-1); return(-1);
if ((scheme == XML_BUFFER_ALLOC_DOUBLEIT) || if ((scheme == XML_BUFFER_ALLOC_DOUBLEIT) ||
(scheme == XML_BUFFER_ALLOC_EXACT) || (scheme == XML_BUFFER_ALLOC_EXACT) ||
(scheme == XML_BUFFER_ALLOC_HYBRID) || (scheme == XML_BUFFER_ALLOC_HYBRID) ||
(scheme == XML_BUFFER_ALLOC_IMMUTABLE) ||
(scheme == XML_BUFFER_ALLOC_BOUNDED)) { (scheme == XML_BUFFER_ALLOC_BOUNDED)) {
buf->alloc = scheme; buf->alloc = scheme;
if (buf->buffer) if (buf->buffer)
...@@ -331,8 +295,7 @@ xmlBufFree(xmlBufPtr buf) { ...@@ -331,8 +295,7 @@ xmlBufFree(xmlBufPtr buf) {
if ((buf->alloc == XML_BUFFER_ALLOC_IO) && if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
(buf->contentIO != NULL)) { (buf->contentIO != NULL)) {
xmlFree(buf->contentIO); xmlFree(buf->contentIO);
} else if ((buf->content != NULL) && } else if (buf->content != NULL) {
(buf->alloc != XML_BUFFER_ALLOC_IMMUTABLE)) {
xmlFree(buf->content); xmlFree(buf->content);
} }
xmlFree(buf); xmlFree(buf);
...@@ -350,9 +313,7 @@ xmlBufEmpty(xmlBufPtr buf) { ...@@ -350,9 +313,7 @@ xmlBufEmpty(xmlBufPtr buf) {
if (buf->content == NULL) return; if (buf->content == NULL) return;
CHECK_COMPAT(buf) CHECK_COMPAT(buf)
buf->use = 0; buf->use = 0;
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) { if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
buf->content = BAD_CAST "";
} else if ((buf->alloc == XML_BUFFER_ALLOC_IO) &&
(buf->contentIO != NULL)) { (buf->contentIO != NULL)) {
size_t start_buf = buf->content - buf->contentIO; size_t start_buf = buf->content - buf->contentIO;
...@@ -385,8 +346,7 @@ xmlBufShrink(xmlBufPtr buf, size_t len) { ...@@ -385,8 +346,7 @@ xmlBufShrink(xmlBufPtr buf, size_t len) {
if (len > buf->use) return(0); if (len > buf->use) return(0);
buf->use -= len; buf->use -= len;
if ((buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) || if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL))) {
/* /*
* we just move the content pointer, but also make sure * we just move the content pointer, but also make sure
* the perceived buffer size has shrunk accordingly * the perceived buffer size has shrunk accordingly
...@@ -434,7 +394,6 @@ xmlBufGrowInternal(xmlBufPtr buf, size_t len) { ...@@ -434,7 +394,6 @@ xmlBufGrowInternal(xmlBufPtr buf, size_t len) {
if ((buf == NULL) || (buf->error != 0)) return(0); if ((buf == NULL) || (buf->error != 0)) return(0);
CHECK_COMPAT(buf) CHECK_COMPAT(buf)
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
if (len < buf->size - buf->use) if (len < buf->size - buf->use)
return(buf->size - buf->use - 1); return(buf->size - buf->use - 1);
if (len >= SIZE_MAX - buf->use) { if (len >= SIZE_MAX - buf->use) {
...@@ -504,7 +463,7 @@ xmlBufGrow(xmlBufPtr buf, int len) { ...@@ -504,7 +463,7 @@ xmlBufGrow(xmlBufPtr buf, int len) {
ret = xmlBufGrowInternal(buf, len); ret = xmlBufGrowInternal(buf, len);
if (buf->error != 0) if (buf->error != 0)
return(-1); return(-1);
return((int) ret); return(ret > INT_MAX ? INT_MAX : ret);
} }
/** /**
...@@ -536,7 +495,7 @@ xmlBufDump(FILE *file, xmlBufPtr buf) { ...@@ -536,7 +495,7 @@ xmlBufDump(FILE *file, xmlBufPtr buf) {
CHECK_COMPAT(buf) CHECK_COMPAT(buf)
if (file == NULL) if (file == NULL)
file = stdout; file = stdout;
ret = fwrite(buf->content, sizeof(xmlChar), buf->use, file); ret = fwrite(buf->content, 1, buf->use, file);
return(ret); return(ret);
} }
...@@ -699,7 +658,6 @@ xmlBufResize(xmlBufPtr buf, size_t size) ...@@ -699,7 +658,6 @@ xmlBufResize(xmlBufPtr buf, size_t size)
return(0); return(0);
CHECK_COMPAT(buf) CHECK_COMPAT(buf)
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) { if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
/* /*
* Used to provide parsing limits * Used to provide parsing limits
...@@ -777,7 +735,8 @@ xmlBufResize(xmlBufPtr buf, size_t size) ...@@ -777,7 +735,8 @@ xmlBufResize(xmlBufPtr buf, size_t size)
if (buf->content == NULL) { if (buf->content == NULL) {
rebuf = (xmlChar *) xmlMallocAtomic(newSize); rebuf = (xmlChar *) xmlMallocAtomic(newSize);
buf->use = 0; buf->use = 0;
rebuf[buf->use] = 0; if (rebuf != NULL)
rebuf[buf->use] = 0;
} else if (buf->size - buf->use < 100) { } else if (buf->size - buf->use < 100) {
rebuf = (xmlChar *) xmlRealloc(buf->content, newSize); rebuf = (xmlChar *) xmlRealloc(buf->content, newSize);
} else { } else {
...@@ -825,7 +784,6 @@ xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len) { ...@@ -825,7 +784,6 @@ xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len) {
return -1; return -1;
CHECK_COMPAT(buf) CHECK_COMPAT(buf)
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
if (len < -1) { if (len < -1) {
#ifdef DEBUG_BUFFER #ifdef DEBUG_BUFFER
xmlGenericError(xmlGenericErrorContext, xmlGenericError(xmlGenericErrorContext,
...@@ -863,7 +821,7 @@ xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len) { ...@@ -863,7 +821,7 @@ xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len) {
} }
} }
memmove(&buf->content[buf->use], str, len*sizeof(xmlChar)); memmove(&buf->content[buf->use], str, len);
buf->use += len; buf->use += len;
buf->content[buf->use] = 0; buf->content[buf->use] = 0;
UPDATE_COMPAT(buf) UPDATE_COMPAT(buf)
...@@ -885,7 +843,6 @@ xmlBufCat(xmlBufPtr buf, const xmlChar *str) { ...@@ -885,7 +843,6 @@ xmlBufCat(xmlBufPtr buf, const xmlChar *str) {
if ((buf == NULL) || (buf->error)) if ((buf == NULL) || (buf->error))
return(-1); return(-1);
CHECK_COMPAT(buf) CHECK_COMPAT(buf)
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
if (str == NULL) return -1; if (str == NULL) return -1;
return xmlBufAdd(buf, str, -1); return xmlBufAdd(buf, str, -1);
} }
...@@ -923,8 +880,6 @@ xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string) { ...@@ -923,8 +880,6 @@ xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string) {
if ((buf == NULL) || (buf->error)) if ((buf == NULL) || (buf->error))
return(-1); return(-1);
CHECK_COMPAT(buf) CHECK_COMPAT(buf)
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
return(-1);
if (xmlStrchr(string, '\"')) { if (xmlStrchr(string, '\"')) {
if (xmlStrchr(string, '\'')) { if (xmlStrchr(string, '\'')) {
#ifdef DEBUG_BUFFER #ifdef DEBUG_BUFFER
...@@ -1042,11 +997,11 @@ xmlBufBackToBuffer(xmlBufPtr buf) { ...@@ -1042,11 +997,11 @@ xmlBufBackToBuffer(xmlBufPtr buf) {
* Keep the buffer but provide a truncated size value. * Keep the buffer but provide a truncated size value.
*/ */
xmlBufOverflowError(buf, "Allocated size too big for xmlBuffer"); xmlBufOverflowError(buf, "Allocated size too big for xmlBuffer");
ret->use = (int) buf->use; ret->use = buf->use;
ret->size = INT_MAX; ret->size = INT_MAX;
} else { } else {
ret->use = (int) buf->use; ret->use = buf->use;
ret->size = (int) buf->size; ret->size = buf->size;
} }
ret->alloc = buf->alloc; ret->alloc = buf->alloc;
ret->content = buf->content; ret->content = buf->content;
...@@ -1114,7 +1069,7 @@ xmlBufGetInputBase(xmlBufPtr buf, xmlParserInputPtr input) { ...@@ -1114,7 +1069,7 @@ xmlBufGetInputBase(xmlBufPtr buf, xmlParserInputPtr input) {
size_t base; size_t base;
if ((input == NULL) || (buf == NULL) || (buf->error)) if ((input == NULL) || (buf == NULL) || (buf->error))
return(-1); return(0);
CHECK_COMPAT(buf) CHECK_COMPAT(buf)
base = input->base - buf->content; base = input->base - buf->content;
/* /*
......
/*
* Summary: Internal Interfaces for memory buffers in libxml2
* Description: this module describes most of the new xmlBuf buffer
* entry points, those are private routines, with a
* few exceptions exported in tree.h. This was added
* in 2.9.0.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_BUF_H__
#define __XML_BUF_H__
#include <libxml/tree.h>
#ifdef __cplusplus
extern "C" {
#endif
xmlBufPtr xmlBufCreate(void);
xmlBufPtr xmlBufCreateSize(size_t size);
xmlBufPtr xmlBufCreateStatic(void *mem, size_t size);
int xmlBufSetAllocationScheme(xmlBufPtr buf,
xmlBufferAllocationScheme scheme);
int xmlBufGetAllocationScheme(xmlBufPtr buf);
void xmlBufFree(xmlBufPtr buf);
void xmlBufEmpty(xmlBufPtr buf);
/* size_t xmlBufShrink(xmlBufPtr buf, size_t len); */
int xmlBufGrow(xmlBufPtr buf, int len);
int xmlBufResize(xmlBufPtr buf, size_t len);
int xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len);
int xmlBufCat(xmlBufPtr buf, const xmlChar *str);
int xmlBufCCat(xmlBufPtr buf, const char *str);
int xmlBufWriteQuotedString(xmlBufPtr buf, const xmlChar *string);
size_t xmlBufAvail(const xmlBufPtr buf);
size_t xmlBufLength(const xmlBufPtr buf);
/* size_t xmlBufUse(const xmlBufPtr buf); */
int xmlBufIsEmpty(const xmlBufPtr buf);
int xmlBufAddLen(xmlBufPtr buf, size_t len);
/* const xmlChar * xmlBufContent(const xmlBuf *buf); */
/* const xmlChar * xmlBufEnd(xmlBufPtr buf); */
xmlChar * xmlBufDetach(xmlBufPtr buf);
size_t xmlBufDump(FILE *file, xmlBufPtr buf);
xmlBufPtr xmlBufFromBuffer(xmlBufferPtr buffer);
xmlBufferPtr xmlBufBackToBuffer(xmlBufPtr buf);
int xmlBufMergeBuffer(xmlBufPtr buf, xmlBufferPtr buffer);
int xmlBufResetInput(xmlBufPtr buf, xmlParserInputPtr input);
size_t xmlBufGetInputBase(xmlBufPtr buf, xmlParserInputPtr input);
int xmlBufSetInputBaseCur(xmlBufPtr buf, xmlParserInputPtr input,
size_t base, size_t cur);
#ifdef __cplusplus
}
#endif
#endif /* __XML_BUF_H__ */
...@@ -18,14 +18,13 @@ ...@@ -18,14 +18,13 @@
#ifdef LIBXML_CATALOG_ENABLED #ifdef LIBXML_CATALOG_ENABLED
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H #ifdef HAVE_SYS_STAT_H
#include <sys/stat.h> #include <sys/stat.h>
#endif #endif
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#elif defined (_WIN32)
#include <io.h>
#endif #endif
#ifdef HAVE_FCNTL_H #ifdef HAVE_FCNTL_H
#include <fcntl.h> #include <fcntl.h>
...@@ -39,7 +38,8 @@ ...@@ -39,7 +38,8 @@
#include <libxml/threads.h> #include <libxml/threads.h>
#include <libxml/globals.h> #include <libxml/globals.h>
#include "buf.h" #include "private/buf.h"
#include "private/error.h"
#define MAX_DELEGATE 50 #define MAX_DELEGATE 50
#define MAX_CATAL_DEPTH 50 #define MAX_CATAL_DEPTH 50
...@@ -891,11 +891,7 @@ xmlParseCatalogFile(const char *filename) { ...@@ -891,11 +891,7 @@ xmlParseCatalogFile(const char *filename) {
ctxt = xmlNewParserCtxt(); ctxt = xmlNewParserCtxt();
if (ctxt == NULL) { if (ctxt == NULL) {
#ifdef LIBXML_SAX1_ENABLED xmlCatalogErrMemory("allocating parser context");
if (xmlDefaultSAXHandler.error != NULL) {
xmlDefaultSAXHandler.error(NULL, "out of memory\n");
}
#endif
return(NULL); return(NULL);
} }
...@@ -2177,7 +2173,6 @@ xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) { ...@@ -2177,7 +2173,6 @@ xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) {
int len = 0; int len = 0;
int size = 50; int size = 50;
xmlChar stop; xmlChar stop;
int count = 0;
*id = NULL; *id = NULL;
...@@ -2190,7 +2185,7 @@ xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) { ...@@ -2190,7 +2185,7 @@ xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) {
} else { } else {
stop = ' '; stop = ' ';
} }
buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar)); buf = (xmlChar *) xmlMallocAtomic(size);
if (buf == NULL) { if (buf == NULL) {
xmlCatalogErrMemory("allocating public ID"); xmlCatalogErrMemory("allocating public ID");
return(NULL); return(NULL);
...@@ -2202,7 +2197,7 @@ xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) { ...@@ -2202,7 +2197,7 @@ xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) {
break; break;
if (len + 1 >= size) { if (len + 1 >= size) {
size *= 2; size *= 2;
tmp = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar)); tmp = (xmlChar *) xmlRealloc(buf, size);
if (tmp == NULL) { if (tmp == NULL) {
xmlCatalogErrMemory("allocating public ID"); xmlCatalogErrMemory("allocating public ID");
xmlFree(buf); xmlFree(buf);
...@@ -2211,7 +2206,6 @@ xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) { ...@@ -2211,7 +2206,6 @@ xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) {
buf = tmp; buf = tmp;
} }
buf[len++] = *cur; buf[len++] = *cur;
count++;
NEXT; NEXT;
} }
buf[len] = 0; buf[len] = 0;
...@@ -2975,6 +2969,8 @@ xmlACatalogAdd(xmlCatalogPtr catal, const xmlChar * type, ...@@ -2975,6 +2969,8 @@ xmlACatalogAdd(xmlCatalogPtr catal, const xmlChar * type,
if (catal->sgml == NULL) if (catal->sgml == NULL)
catal->sgml = xmlHashCreate(10); catal->sgml = xmlHashCreate(10);
res = xmlHashAddEntry(catal->sgml, orig, entry); res = xmlHashAddEntry(catal->sgml, orig, entry);
if (res < 0)
xmlFreeCatalogEntry(entry, NULL);
} }
} }
return (res); return (res);
...@@ -3135,7 +3131,7 @@ xmlInitializeCatalog(void) { ...@@ -3135,7 +3131,7 @@ xmlInitializeCatalog(void) {
strncpy(p, "\\..\\etc\\catalog", 255 - (p - buf)); strncpy(p, "\\..\\etc\\catalog", 255 - (p - buf));
uri = xmlCanonicPath((const xmlChar*)buf); uri = xmlCanonicPath((const xmlChar*)buf);
if (uri != NULL) { if (uri != NULL) {
strncpy(XML_XML_DEFAULT_CATALOG, uri, 255); strncpy(XML_XML_DEFAULT_CATALOG, (char* )uri, 255);
xmlFree(uri); xmlFree(uri);
} }
} }
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#include "libxml.h" #include "libxml.h"
#include <libxml/chvalid.h> #include <libxml/chvalid.h>
#include <stddef.h>
/* /*
* The initial tables ({func_name}_tab) are used to validate whether a * The initial tables ({func_name}_tab) are used to validate whether a
* single-byte character is within the specified group. Each table * single-byte character is within the specified group. Each table
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#include <libxml/relaxng.h> #include <libxml/relaxng.h>
#endif #endif
#include "private/error.h"
#define DUMP_TEXT_TYPE 1 #define DUMP_TEXT_TYPE 1
typedef struct _xmlDebugCtxt xmlDebugCtxt; typedef struct _xmlDebugCtxt xmlDebugCtxt;
...@@ -2633,7 +2635,7 @@ xmlShellValidate(xmlShellCtxtPtr ctxt, char *dtd, ...@@ -2633,7 +2635,7 @@ xmlShellValidate(xmlShellCtxtPtr ctxt, char *dtd,
int res = -1; int res = -1;
if ((ctxt == NULL) || (ctxt->doc == NULL)) return(-1); if ((ctxt == NULL) || (ctxt->doc == NULL)) return(-1);
vctxt.userData = NULL; memset(&vctxt, 0, sizeof(vctxt));
vctxt.error = xmlGenericError; vctxt.error = xmlGenericError;
vctxt.warning = xmlGenericError; vctxt.warning = xmlGenericError;
......
...@@ -23,6 +23,9 @@ ...@@ -23,6 +23,9 @@
#include <stdlib.h> #include <stdlib.h>
#include <time.h> #include <time.h>
#include "private/dict.h"
#include "private/threads.h"
/* /*
* Following http://www.ocert.org/advisories/ocert-2011-003.html * Following http://www.ocert.org/advisories/ocert-2011-003.html
* it seems that having hash randomization might be a good idea * it seems that having hash randomization might be a good idea
...@@ -127,12 +130,7 @@ struct _xmlDict { ...@@ -127,12 +130,7 @@ struct _xmlDict {
* A mutex for modifying the reference counter for shared * A mutex for modifying the reference counter for shared
* dictionaries. * dictionaries.
*/ */
static xmlMutexPtr xmlDictMutex = NULL; static xmlMutex xmlDictMutex;
/*
* Whether the dictionary mutex was initialized.
*/
static int xmlDictInitialized = 0;
#ifdef DICT_RANDOMIZATION #ifdef DICT_RANDOMIZATION
#ifdef HAVE_RAND_R #ifdef HAVE_RAND_R
...@@ -146,15 +144,10 @@ static unsigned int rand_seed = 0; ...@@ -146,15 +144,10 @@ static unsigned int rand_seed = 0;
/** /**
* xmlInitializeDict: * xmlInitializeDict:
* *
* DEPRECATED: This function will be made private. Call xmlInitParser to * DEPRECATED: Alias for xmlInitParser.
* initialize the library.
*
* Do the dictionary mutex initialization.
*
* Returns 0 if initialization was already done, and 1 if that
* call led to the initialization
*/ */
int xmlInitializeDict(void) { int xmlInitializeDict(void) {
xmlInitParser();
return(0); return(0);
} }
...@@ -163,20 +156,9 @@ int xmlInitializeDict(void) { ...@@ -163,20 +156,9 @@ int xmlInitializeDict(void) {
* *
* This function is not public * This function is not public
* Do the dictionary mutex initialization. * Do the dictionary mutex initialization.
* this function is not thread safe, initialization should
* normally be done once at setup when called from xmlOnceInit()
* we may also land in this code if thread support is not compiled in
*
* Returns 0 if initialization was already done, and 1 if that
* call led to the initialization
*/ */
int __xmlInitializeDict(void) { int __xmlInitializeDict(void) {
if (xmlDictInitialized) xmlInitMutex(&xmlDictMutex);
return(1);
if ((xmlDictMutex = xmlNewMutex()) == NULL)
return(0);
xmlMutexLock(xmlDictMutex);
#ifdef DICT_RANDOMIZATION #ifdef DICT_RANDOMIZATION
#ifdef HAVE_RAND_R #ifdef HAVE_RAND_R
...@@ -186,8 +168,6 @@ int __xmlInitializeDict(void) { ...@@ -186,8 +168,6 @@ int __xmlInitializeDict(void) {
srand(time(NULL)); srand(time(NULL));
#endif #endif
#endif #endif
xmlDictInitialized = 1;
xmlMutexUnlock(xmlDictMutex);
return(1); return(1);
} }
...@@ -195,16 +175,13 @@ int __xmlInitializeDict(void) { ...@@ -195,16 +175,13 @@ int __xmlInitializeDict(void) {
int __xmlRandom(void) { int __xmlRandom(void) {
int ret; int ret;
if (xmlDictInitialized == 0) xmlMutexLock(&xmlDictMutex);
__xmlInitializeDict();
xmlMutexLock(xmlDictMutex);
#ifdef HAVE_RAND_R #ifdef HAVE_RAND_R
ret = rand_r(& rand_seed); ret = rand_r(& rand_seed);
#else #else
ret = rand(); ret = rand();
#endif #endif
xmlMutexUnlock(xmlDictMutex); xmlMutexUnlock(&xmlDictMutex);
return(ret); return(ret);
} }
#endif #endif
...@@ -212,22 +189,23 @@ int __xmlRandom(void) { ...@@ -212,22 +189,23 @@ int __xmlRandom(void) {
/** /**
* xmlDictCleanup: * xmlDictCleanup:
* *
* DEPRECATED: This function will be made private. Call xmlCleanupParser * DEPRECATED: This function is a no-op. Call xmlCleanupParser
* to free global state but see the warnings there. xmlCleanupParser * to free global state but see the warnings there. xmlCleanupParser
* should be only called once at program exit. In most cases, you don't * should be only called once at program exit. In most cases, you don't
* have call cleanup functions at all. * have call cleanup functions at all.
*
* Free the dictionary mutex. Do not call unless sure the library
* is not in use anymore !
*/ */
void void
xmlDictCleanup(void) { xmlDictCleanup(void) {
if (!xmlDictInitialized) }
return;
xmlFreeMutex(xmlDictMutex);
xmlDictInitialized = 0; /**
* xmlCleanupDictInternal:
*
* Free the dictionary mutex.
*/
void
xmlCleanupDictInternal(void) {
xmlCleanupMutex(&xmlDictMutex);
} }
/* /*
...@@ -376,6 +354,7 @@ found_pool: ...@@ -376,6 +354,7 @@ found_pool:
#ifdef __clang__ #ifdef __clang__
ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow") ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow")
ATTRIBUTE_NO_SANITIZE("unsigned-shift-base")
#endif #endif
static uint32_t static uint32_t
xmlDictComputeBigKey(const xmlChar* data, int namelen, int seed) { xmlDictComputeBigKey(const xmlChar* data, int namelen, int seed) {
...@@ -411,6 +390,7 @@ xmlDictComputeBigKey(const xmlChar* data, int namelen, int seed) { ...@@ -411,6 +390,7 @@ xmlDictComputeBigKey(const xmlChar* data, int namelen, int seed) {
*/ */
#ifdef __clang__ #ifdef __clang__
ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow") ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow")
ATTRIBUTE_NO_SANITIZE("unsigned-shift-base")
#endif #endif
static unsigned long static unsigned long
xmlDictComputeBigQKey(const xmlChar *prefix, int plen, xmlDictComputeBigQKey(const xmlChar *prefix, int plen,
...@@ -453,7 +433,8 @@ static unsigned long ...@@ -453,7 +433,8 @@ static unsigned long
xmlDictComputeFastKey(const xmlChar *name, int namelen, int seed) { xmlDictComputeFastKey(const xmlChar *name, int namelen, int seed) {
unsigned long value = seed; unsigned long value = seed;
if (name == NULL) return(0); if ((name == NULL) || (namelen <= 0))
return(value);
value += *name; value += *name;
value <<= 5; value <<= 5;
if (namelen > 10) { if (namelen > 10) {
...@@ -496,10 +477,10 @@ static unsigned long ...@@ -496,10 +477,10 @@ static unsigned long
xmlDictComputeFastQKey(const xmlChar *prefix, int plen, xmlDictComputeFastQKey(const xmlChar *prefix, int plen,
const xmlChar *name, int len, int seed) const xmlChar *name, int len, int seed)
{ {
unsigned long value = (unsigned long) seed; unsigned long value = seed;
if (plen == 0) if (plen == 0)
value += 30 * (unsigned long) ':'; value += 30 * ':';
else else
value += 30 * (*prefix); value += 30 * (*prefix);
...@@ -537,7 +518,7 @@ xmlDictComputeFastQKey(const xmlChar *prefix, int plen, ...@@ -537,7 +518,7 @@ xmlDictComputeFastQKey(const xmlChar *prefix, int plen,
} }
len -= plen; len -= plen;
if (len > 0) { if (len > 0) {
value += (unsigned long) ':'; value += ':';
len--; len--;
} }
switch (len) { switch (len) {
...@@ -577,9 +558,7 @@ xmlDictPtr ...@@ -577,9 +558,7 @@ xmlDictPtr
xmlDictCreate(void) { xmlDictCreate(void) {
xmlDictPtr dict; xmlDictPtr dict;
if (!xmlDictInitialized) xmlInitParser();
if (!__xmlInitializeDict())
return(NULL);
#ifdef DICT_DEBUG_PATTERNS #ifdef DICT_DEBUG_PATTERNS
fprintf(stderr, "C"); fprintf(stderr, "C");
...@@ -645,14 +624,10 @@ xmlDictCreateSub(xmlDictPtr sub) { ...@@ -645,14 +624,10 @@ xmlDictCreateSub(xmlDictPtr sub) {
*/ */
int int
xmlDictReference(xmlDictPtr dict) { xmlDictReference(xmlDictPtr dict) {
if (!xmlDictInitialized)
if (!__xmlInitializeDict())
return(-1);
if (dict == NULL) return -1; if (dict == NULL) return -1;
xmlMutexLock(xmlDictMutex); xmlMutexLock(&xmlDictMutex);
dict->ref_counter++; dict->ref_counter++;
xmlMutexUnlock(xmlDictMutex); xmlMutexUnlock(&xmlDictMutex);
return(0); return(0);
} }
...@@ -809,19 +784,15 @@ xmlDictFree(xmlDictPtr dict) { ...@@ -809,19 +784,15 @@ xmlDictFree(xmlDictPtr dict) {
if (dict == NULL) if (dict == NULL)
return; return;
if (!xmlDictInitialized)
if (!__xmlInitializeDict())
return;
/* decrement the counter, it may be shared by a parser and docs */ /* decrement the counter, it may be shared by a parser and docs */
xmlMutexLock(xmlDictMutex); xmlMutexLock(&xmlDictMutex);
dict->ref_counter--; dict->ref_counter--;
if (dict->ref_counter > 0) { if (dict->ref_counter > 0) {
xmlMutexUnlock(xmlDictMutex); xmlMutexUnlock(&xmlDictMutex);
return; return;
} }
xmlMutexUnlock(xmlDictMutex); xmlMutexUnlock(&xmlDictMutex);
if (dict->subdict != NULL) { if (dict->subdict != NULL) {
xmlDictFree(dict->subdict); xmlDictFree(dict->subdict);
...@@ -1005,7 +976,7 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) { ...@@ -1005,7 +976,7 @@ xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len) {
*/ */
const xmlChar * const xmlChar *
xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) { xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
unsigned long key, okey, nbi = 0; unsigned long key, okey;
xmlDictEntryPtr insert; xmlDictEntryPtr insert;
unsigned int l; unsigned int l;
...@@ -1040,7 +1011,6 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) { ...@@ -1040,7 +1011,6 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
(!xmlStrncmp(insert->name, name, l))) (!xmlStrncmp(insert->name, name, l)))
return(insert->name); return(insert->name);
#endif #endif
nbi++;
} }
#ifdef __GNUC__ #ifdef __GNUC__
if ((insert->okey == okey) && (insert->len == l)) { if ((insert->okey == okey) && (insert->len == l)) {
...@@ -1082,7 +1052,6 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) { ...@@ -1082,7 +1052,6 @@ xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len) {
(!xmlStrncmp(tmp->name, name, l))) (!xmlStrncmp(tmp->name, name, l)))
return(tmp->name); return(tmp->name);
#endif #endif
nbi++;
} }
#ifdef __GNUC__ #ifdef __GNUC__
if ((tmp->okey == skey) && (tmp->len == l)) { if ((tmp->okey == skey) && (tmp->len == l)) {
......
/*
* Summary: Internal Interfaces for encoding in libxml2
* Description: this module describes a few interfaces which were
* added along with the API changes in 2.9.0
* those are private routines at this point
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_ENC_H__
#define __XML_ENC_H__
#include <libxml/tree.h>
#ifdef __cplusplus
extern "C" {
#endif
int xmlCharEncFirstLineInt(xmlCharEncodingHandler *handler, xmlBufferPtr out,
xmlBufferPtr in, int len);
int xmlCharEncFirstLineInput(xmlParserInputBufferPtr input, int len);
int xmlCharEncInput(xmlParserInputBufferPtr input, int flush);
int xmlCharEncOutput(xmlOutputBufferPtr output, int init);
#ifdef __cplusplus
}
#endif
#endif /* __XML_ENC_H__ */
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
#include <libxml/globals.h> #include <libxml/globals.h>
#include <libxml/dict.h> #include <libxml/dict.h>
#include "save.h" #include "private/entities.h"
#include "private/error.h"
/* /*
* The XML predefined entities. * The XML predefined entities.
...@@ -37,35 +38,35 @@ static xmlEntity xmlEntityLt = { ...@@ -37,35 +38,35 @@ static xmlEntity xmlEntityLt = {
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
BAD_CAST "<", BAD_CAST "<", 1, BAD_CAST "<", BAD_CAST "<", 1,
XML_INTERNAL_PREDEFINED_ENTITY, XML_INTERNAL_PREDEFINED_ENTITY,
NULL, NULL, NULL, NULL, 0, 1 NULL, NULL, NULL, NULL, 0, 0, 0
}; };
static xmlEntity xmlEntityGt = { static xmlEntity xmlEntityGt = {
NULL, XML_ENTITY_DECL, BAD_CAST "gt", NULL, XML_ENTITY_DECL, BAD_CAST "gt",
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
BAD_CAST ">", BAD_CAST ">", 1, BAD_CAST ">", BAD_CAST ">", 1,
XML_INTERNAL_PREDEFINED_ENTITY, XML_INTERNAL_PREDEFINED_ENTITY,
NULL, NULL, NULL, NULL, 0, 1 NULL, NULL, NULL, NULL, 0, 0, 0
}; };
static xmlEntity xmlEntityAmp = { static xmlEntity xmlEntityAmp = {
NULL, XML_ENTITY_DECL, BAD_CAST "amp", NULL, XML_ENTITY_DECL, BAD_CAST "amp",
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
BAD_CAST "&", BAD_CAST "&", 1, BAD_CAST "&", BAD_CAST "&", 1,
XML_INTERNAL_PREDEFINED_ENTITY, XML_INTERNAL_PREDEFINED_ENTITY,
NULL, NULL, NULL, NULL, 0, 1 NULL, NULL, NULL, NULL, 0, 0, 0
}; };
static xmlEntity xmlEntityQuot = { static xmlEntity xmlEntityQuot = {
NULL, XML_ENTITY_DECL, BAD_CAST "quot", NULL, XML_ENTITY_DECL, BAD_CAST "quot",
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
BAD_CAST "\"", BAD_CAST "\"", 1, BAD_CAST "\"", BAD_CAST "\"", 1,
XML_INTERNAL_PREDEFINED_ENTITY, XML_INTERNAL_PREDEFINED_ENTITY,
NULL, NULL, NULL, NULL, 0, 1 NULL, NULL, NULL, NULL, 0, 0, 0
}; };
static xmlEntity xmlEntityApos = { static xmlEntity xmlEntityApos = {
NULL, XML_ENTITY_DECL, BAD_CAST "apos", NULL, XML_ENTITY_DECL, BAD_CAST "apos",
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
BAD_CAST "'", BAD_CAST "'", 1, BAD_CAST "'", BAD_CAST "'", 1,
XML_INTERNAL_PREDEFINED_ENTITY, XML_INTERNAL_PREDEFINED_ENTITY,
NULL, NULL, NULL, NULL, 0, 1 NULL, NULL, NULL, NULL, 0, 0, 0
}; };
/** /**
...@@ -162,7 +163,6 @@ xmlCreateEntity(xmlDictPtr dict, const xmlChar *name, int type, ...@@ -162,7 +163,6 @@ xmlCreateEntity(xmlDictPtr dict, const xmlChar *name, int type,
} }
memset(ret, 0, sizeof(xmlEntity)); memset(ret, 0, sizeof(xmlEntity));
ret->type = XML_ENTITY_DECL; ret->type = XML_ENTITY_DECL;
ret->checked = 0;
/* /*
* fill the structure. * fill the structure.
...@@ -604,7 +604,7 @@ xmlEncodeEntitiesInternal(xmlDocPtr doc, const xmlChar *input, int attr) { ...@@ -604,7 +604,7 @@ xmlEncodeEntitiesInternal(xmlDocPtr doc, const xmlChar *input, int attr) {
* allocate an translation buffer. * allocate an translation buffer.
*/ */
buffer_size = 1000; buffer_size = 1000;
buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar)); buffer = (xmlChar *) xmlMalloc(buffer_size);
if (buffer == NULL) { if (buffer == NULL) {
xmlEntitiesErrMemory("xmlEncodeEntities: malloc failed"); xmlEntitiesErrMemory("xmlEncodeEntities: malloc failed");
return(NULL); return(NULL);
...@@ -844,7 +844,7 @@ xmlEncodeSpecialChars(const xmlDoc *doc ATTRIBUTE_UNUSED, const xmlChar *input) ...@@ -844,7 +844,7 @@ xmlEncodeSpecialChars(const xmlDoc *doc ATTRIBUTE_UNUSED, const xmlChar *input)
* allocate an translation buffer. * allocate an translation buffer.
*/ */
buffer_size = 1000; buffer_size = 1000;
buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar)); buffer = (xmlChar *) xmlMalloc(buffer_size);
if (buffer == NULL) { if (buffer == NULL) {
xmlEntitiesErrMemory("xmlEncodeSpecialChars: malloc failed"); xmlEntitiesErrMemory("xmlEncodeSpecialChars: malloc failed");
return(NULL); return(NULL);
...@@ -1010,7 +1010,6 @@ xmlCopyEntitiesTable(xmlEntitiesTablePtr table) { ...@@ -1010,7 +1010,6 @@ xmlCopyEntitiesTable(xmlEntitiesTablePtr table) {
*/ */
static void static void
xmlDumpEntityContent(xmlBufferPtr buf, const xmlChar *content) { xmlDumpEntityContent(xmlBufferPtr buf, const xmlChar *content) {
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return;
if (xmlStrchr(content, '%')) { if (xmlStrchr(content, '%')) {
const xmlChar * base, *cur; const xmlChar * base, *cur;
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
#include <libxml/xmlmemory.h> #include <libxml/xmlmemory.h>
#include <libxml/globals.h> #include <libxml/globals.h>
void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED, #include "private/error.h"
const char *msg,
...) LIBXML_ATTR_FORMAT(2,3); #define XML_MAX_ERRORS 100
#define XML_GET_VAR_STR(msg, str) { \ #define XML_GET_VAR_STR(msg, str) { \
int size, prev_size = -1; \ int size, prev_size = -1; \
...@@ -83,6 +83,8 @@ xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) { ...@@ -83,6 +83,8 @@ xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
* initGenericErrorDefaultFunc: * initGenericErrorDefaultFunc:
* @handler: the handler * @handler: the handler
* *
* DEPRECATED: Use xmlSetGenericErrorFunc.
*
* Set or reset (if NULL) the default handler for generic errors * Set or reset (if NULL) the default handler for generic errors
* to the builtin error function. * to the builtin error function.
*/ */
...@@ -163,7 +165,7 @@ xmlParserPrintFileInfo(xmlParserInputPtr input) { ...@@ -163,7 +165,7 @@ xmlParserPrintFileInfo(xmlParserInputPtr input) {
} }
/** /**
* xmlParserPrintFileContext: * xmlParserPrintFileContextInternal:
* @input: an xmlParserInputPtr input * @input: an xmlParserInputPtr input
* *
* Displays current context within the input content for error tracking * Displays current context within the input content for error tracking
...@@ -172,7 +174,7 @@ xmlParserPrintFileInfo(xmlParserInputPtr input) { ...@@ -172,7 +174,7 @@ xmlParserPrintFileInfo(xmlParserInputPtr input) {
static void static void
xmlParserPrintFileContextInternal(xmlParserInputPtr input , xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
xmlGenericErrorFunc channel, void *data ) { xmlGenericErrorFunc channel, void *data ) {
const xmlChar *cur, *base; const xmlChar *cur, *base, *start;
unsigned int n, col; /* GCC warns if signed, because compared with sizeof() */ unsigned int n, col; /* GCC warns if signed, because compared with sizeof() */
xmlChar content[81]; /* space for 80 chars + line terminator */ xmlChar content[81]; /* space for 80 chars + line terminator */
xmlChar *ctnt; xmlChar *ctnt;
...@@ -188,22 +190,35 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input , ...@@ -188,22 +190,35 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
} }
n = 0; n = 0;
/* search backwards for beginning-of-line (to max buff size) */ /* search backwards for beginning-of-line (to max buff size) */
while ((n++ < (sizeof(content)-1)) && (cur > base) && while ((n < sizeof(content) - 1) && (cur > base) &&
(*(cur) != '\n') && (*(cur) != '\r')) (*cur != '\n') && (*cur != '\r')) {
cur--; cur--;
if ((*(cur) == '\n') || (*(cur) == '\r')) cur++; n++;
}
if ((n > 0) && ((*cur == '\n') || (*cur == '\r'))) {
cur++;
} else {
/* skip over continuation bytes */
while ((cur < input->cur) && ((*cur & 0xC0) == 0x80))
cur++;
}
/* calculate the error position in terms of the current position */ /* calculate the error position in terms of the current position */
col = input->cur - cur; col = input->cur - cur;
/* search forward for end-of-line (to max buff size) */ /* search forward for end-of-line (to max buff size) */
n = 0; n = 0;
ctnt = content; start = cur;
/* copy selected text to our buffer */ /* copy selected text to our buffer */
while ((*cur != 0) && (*(cur) != '\n') && while ((*cur != 0) && (*(cur) != '\n') && (*(cur) != '\r')) {
(*(cur) != '\r') && (n < sizeof(content)-1)) { int len = input->end - cur;
*ctnt++ = *cur++; int c = xmlGetUTF8Char(cur, &len);
n++;
if ((c < 0) || (n + len > sizeof(content)-1))
break;
cur += len;
n += len;
} }
*ctnt = 0; memcpy(content, start, n);
content[n] = 0;
/* print out the selected text */ /* print out the selected text */
channel(data ,"%s\n", content); channel(data ,"%s\n", content);
/* create blank line with problem pointer */ /* create blank line with problem pointer */
...@@ -474,12 +489,25 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel, ...@@ -474,12 +489,25 @@ __xmlRaiseError(xmlStructuredErrorFunc schannel,
(domain == XML_FROM_DTD) || (domain == XML_FROM_NAMESPACE) || (domain == XML_FROM_DTD) || (domain == XML_FROM_NAMESPACE) ||
(domain == XML_FROM_IO) || (domain == XML_FROM_VALID)) { (domain == XML_FROM_IO) || (domain == XML_FROM_VALID)) {
ctxt = (xmlParserCtxtPtr) ctx; ctxt = (xmlParserCtxtPtr) ctx;
if ((schannel == NULL) && (ctxt != NULL) && (ctxt->sax != NULL) &&
(ctxt->sax->initialized == XML_SAX2_MAGIC) && if (ctxt != NULL) {
(ctxt->sax->serror != NULL)) { if (level == XML_ERR_WARNING) {
schannel = ctxt->sax->serror; if (ctxt->nbWarnings >= XML_MAX_ERRORS)
data = ctxt->userData; return;
} ctxt->nbWarnings += 1;
} else {
if (ctxt->nbErrors >= XML_MAX_ERRORS)
return;
ctxt->nbErrors += 1;
}
if ((schannel == NULL) && (ctxt->sax != NULL) &&
(ctxt->sax->initialized == XML_SAX2_MAGIC) &&
(ctxt->sax->serror != NULL)) {
schannel = ctxt->sax->serror;
data = ctxt->userData;
}
}
} }
/* /*
* Check if structured error handler set * Check if structured error handler set
......
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
#include <libxml/xmlerror.h> #include <libxml/xmlerror.h>
#include <libxml/globals.h> #include <libxml/globals.h>
#include "private/dict.h"
#define MAX_HASH_LEN 8 #define MAX_HASH_LEN 8
/* #define DEBUG_GROW */ /* #define DEBUG_GROW */
...@@ -76,6 +78,7 @@ struct _xmlHashTable { ...@@ -76,6 +78,7 @@ struct _xmlHashTable {
*/ */
#ifdef __clang__ #ifdef __clang__
ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow") ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow")
ATTRIBUTE_NO_SANITIZE("unsigned-shift-base")
#endif #endif
static unsigned long static unsigned long
xmlHashComputeKey(xmlHashTablePtr table, const xmlChar *name, xmlHashComputeKey(xmlHashTablePtr table, const xmlChar *name,
...@@ -109,6 +112,7 @@ xmlHashComputeKey(xmlHashTablePtr table, const xmlChar *name, ...@@ -109,6 +112,7 @@ xmlHashComputeKey(xmlHashTablePtr table, const xmlChar *name,
#ifdef __clang__ #ifdef __clang__
ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow") ATTRIBUTE_NO_SANITIZE("unsigned-integer-overflow")
ATTRIBUTE_NO_SANITIZE("unsigned-shift-base")
#endif #endif
static unsigned long static unsigned long
xmlHashComputeQKey(xmlHashTablePtr table, xmlHashComputeQKey(xmlHashTablePtr table,
...@@ -130,7 +134,7 @@ xmlHashComputeQKey(xmlHashTablePtr table, ...@@ -130,7 +134,7 @@ xmlHashComputeQKey(xmlHashTablePtr table,
while ((ch = *prefix++) != 0) { while ((ch = *prefix++) != 0) {
value = value ^ ((value << 5) + (value >> 3) + ch); value = value ^ ((value << 5) + (value >> 3) + ch);
} }
value = value ^ ((value << 5) + (value >> 3) + (unsigned long)':'); value = value ^ ((value << 5) + (value >> 3) + ':');
} }
if (name != NULL) { if (name != NULL) {
while ((ch = *name++) != 0) { while ((ch = *name++) != 0) {
...@@ -142,7 +146,7 @@ xmlHashComputeQKey(xmlHashTablePtr table, ...@@ -142,7 +146,7 @@ xmlHashComputeQKey(xmlHashTablePtr table,
while ((ch = *prefix2++) != 0) { while ((ch = *prefix2++) != 0) {
value = value ^ ((value << 5) + (value >> 3) + ch); value = value ^ ((value << 5) + (value >> 3) + ch);
} }
value = value ^ ((value << 5) + (value >> 3) + (unsigned long)':'); value = value ^ ((value << 5) + (value >> 3) + ':');
} }
if (name2 != NULL) { if (name2 != NULL) {
while ((ch = *name2++) != 0) { while ((ch = *name2++) != 0) {
...@@ -154,7 +158,7 @@ xmlHashComputeQKey(xmlHashTablePtr table, ...@@ -154,7 +158,7 @@ xmlHashComputeQKey(xmlHashTablePtr table,
while ((ch = *prefix3++) != 0) { while ((ch = *prefix3++) != 0) {
value = value ^ ((value << 5) + (value >> 3) + ch); value = value ^ ((value << 5) + (value >> 3) + ch);
} }
value = value ^ ((value << 5) + (value >> 3) + (unsigned long)':'); value = value ^ ((value << 5) + (value >> 3) + ':');
} }
if (name3 != NULL) { if (name3 != NULL) {
while ((ch = *name3++) != 0) { while ((ch = *name3++) != 0) {
...@@ -176,6 +180,8 @@ xmlHashTablePtr ...@@ -176,6 +180,8 @@ xmlHashTablePtr
xmlHashCreate(int size) { xmlHashCreate(int size) {
xmlHashTablePtr table; xmlHashTablePtr table;
xmlInitParser();
if (size <= 0) if (size <= 0)
size = 256; size = 256;
...@@ -609,8 +615,24 @@ xmlHashAddEntry3(xmlHashTablePtr table, const xmlChar *name, ...@@ -609,8 +615,24 @@ xmlHashAddEntry3(xmlHashTablePtr table, const xmlChar *name,
entry->name3 = (xmlChar *) name3; entry->name3 = (xmlChar *) name3;
} else { } else {
entry->name = xmlStrdup(name); entry->name = xmlStrdup(name);
entry->name2 = xmlStrdup(name2); if (entry->name == NULL) {
entry->name3 = xmlStrdup(name3); entry->name2 = NULL;
goto error;
}
if (name2 == NULL) {
entry->name2 = NULL;
} else {
entry->name2 = xmlStrdup(name2);
if (entry->name2 == NULL)
goto error;
}
if (name3 == NULL) {
entry->name3 = NULL;
} else {
entry->name3 = xmlStrdup(name3);
if (entry->name3 == NULL)
goto error;
}
} }
entry->payload = userdata; entry->payload = userdata;
entry->next = NULL; entry->next = NULL;
...@@ -626,6 +648,13 @@ xmlHashAddEntry3(xmlHashTablePtr table, const xmlChar *name, ...@@ -626,6 +648,13 @@ xmlHashAddEntry3(xmlHashTablePtr table, const xmlChar *name,
xmlHashGrow(table, MAX_HASH_LEN * table->size); xmlHashGrow(table, MAX_HASH_LEN * table->size);
return(0); return(0);
error:
xmlFree(entry->name2);
xmlFree(entry->name);
if (insert != NULL)
xmlFree(entry);
return(-1);
} }
/** /**
...@@ -739,8 +768,24 @@ xmlHashUpdateEntry3(xmlHashTablePtr table, const xmlChar *name, ...@@ -739,8 +768,24 @@ xmlHashUpdateEntry3(xmlHashTablePtr table, const xmlChar *name,
entry->name3 = (xmlChar *) name3; entry->name3 = (xmlChar *) name3;
} else { } else {
entry->name = xmlStrdup(name); entry->name = xmlStrdup(name);
entry->name2 = xmlStrdup(name2); if (entry->name == NULL) {
entry->name3 = xmlStrdup(name3); entry->name2 = NULL;
goto error;
}
if (name2 == NULL) {
entry->name2 = NULL;
} else {
entry->name2 = xmlStrdup(name2);
if (entry->name2 == NULL)
goto error;
}
if (name3 == NULL) {
entry->name3 = NULL;
} else {
entry->name3 = xmlStrdup(name3);
if (entry->name3 == NULL)
goto error;
}
} }
entry->payload = userdata; entry->payload = userdata;
entry->next = NULL; entry->next = NULL;
...@@ -752,6 +797,13 @@ xmlHashUpdateEntry3(xmlHashTablePtr table, const xmlChar *name, ...@@ -752,6 +797,13 @@ xmlHashUpdateEntry3(xmlHashTablePtr table, const xmlChar *name,
insert->next = entry; insert->next = entry;
} }
return(0); return(0);
error:
xmlFree(entry->name2);
xmlFree(entry->name);
if (insert != NULL)
xmlFree(entry);
return(-1);
} }
/** /**
......
...@@ -83,87 +83,101 @@ struct _htmlEntityDesc { ...@@ -83,87 +83,101 @@ struct _htmlEntityDesc {
/* /*
* There is only few public functions. * There is only few public functions.
*/ */
XMLPUBFUN const htmlElemDesc * XMLCALL XML_DEPRECATED
XMLPUBFUN void
htmlInitAutoClose (void);
XMLPUBFUN const htmlElemDesc *
htmlTagLookup (const xmlChar *tag); htmlTagLookup (const xmlChar *tag);
XMLPUBFUN const htmlEntityDesc * XMLCALL XMLPUBFUN const htmlEntityDesc *
htmlEntityLookup(const xmlChar *name); htmlEntityLookup(const xmlChar *name);
XMLPUBFUN const htmlEntityDesc * XMLCALL XMLPUBFUN const htmlEntityDesc *
htmlEntityValueLookup(unsigned int value); htmlEntityValueLookup(unsigned int value);
XMLPUBFUN int XMLCALL XMLPUBFUN int
htmlIsAutoClosed(htmlDocPtr doc, htmlIsAutoClosed(htmlDocPtr doc,
htmlNodePtr elem); htmlNodePtr elem);
XMLPUBFUN int XMLCALL XMLPUBFUN int
htmlAutoCloseTag(htmlDocPtr doc, htmlAutoCloseTag(htmlDocPtr doc,
const xmlChar *name, const xmlChar *name,
htmlNodePtr elem); htmlNodePtr elem);
XMLPUBFUN const htmlEntityDesc * XMLCALL XML_DEPRECATED
XMLPUBFUN const htmlEntityDesc *
htmlParseEntityRef(htmlParserCtxtPtr ctxt, htmlParseEntityRef(htmlParserCtxtPtr ctxt,
const xmlChar **str); const xmlChar **str);
XMLPUBFUN int XMLCALL XML_DEPRECATED
XMLPUBFUN int
htmlParseCharRef(htmlParserCtxtPtr ctxt); htmlParseCharRef(htmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL XML_DEPRECATED
XMLPUBFUN void
htmlParseElement(htmlParserCtxtPtr ctxt); htmlParseElement(htmlParserCtxtPtr ctxt);
XMLPUBFUN htmlParserCtxtPtr XMLCALL XMLPUBFUN htmlParserCtxtPtr
htmlNewParserCtxt(void); htmlNewParserCtxt(void);
XMLPUBFUN htmlParserCtxtPtr
htmlNewSAXParserCtxt(const htmlSAXHandler *sax,
void *userData);
XMLPUBFUN htmlParserCtxtPtr XMLCALL XMLPUBFUN htmlParserCtxtPtr
htmlCreateMemoryParserCtxt(const char *buffer, htmlCreateMemoryParserCtxt(const char *buffer,
int size); int size);
XMLPUBFUN int XMLCALL XMLPUBFUN int
htmlParseDocument(htmlParserCtxtPtr ctxt); htmlParseDocument(htmlParserCtxtPtr ctxt);
XMLPUBFUN htmlDocPtr XMLCALL XML_DEPRECATED
XMLPUBFUN htmlDocPtr
htmlSAXParseDoc (const xmlChar *cur, htmlSAXParseDoc (const xmlChar *cur,
const char *encoding, const char *encoding,
htmlSAXHandlerPtr sax, htmlSAXHandlerPtr sax,
void *userData); void *userData);
XMLPUBFUN htmlDocPtr XMLCALL XMLPUBFUN htmlDocPtr
htmlParseDoc (const xmlChar *cur, htmlParseDoc (const xmlChar *cur,
const char *encoding); const char *encoding);
XMLPUBFUN htmlDocPtr XMLCALL XMLPUBFUN htmlParserCtxtPtr
htmlCreateFileParserCtxt(const char *filename,
const char *encoding);
XML_DEPRECATED
XMLPUBFUN htmlDocPtr
htmlSAXParseFile(const char *filename, htmlSAXParseFile(const char *filename,
const char *encoding, const char *encoding,
htmlSAXHandlerPtr sax, htmlSAXHandlerPtr sax,
void *userData); void *userData);
XMLPUBFUN htmlDocPtr XMLCALL XMLPUBFUN htmlDocPtr
htmlParseFile (const char *filename, htmlParseFile (const char *filename,
const char *encoding); const char *encoding);
XMLPUBFUN int XMLCALL XMLPUBFUN int
UTF8ToHtml (unsigned char *out, UTF8ToHtml (unsigned char *out,
int *outlen, int *outlen,
const unsigned char *in, const unsigned char *in,
int *inlen); int *inlen);
XMLPUBFUN int XMLCALL XMLPUBFUN int
htmlEncodeEntities(unsigned char *out, htmlEncodeEntities(unsigned char *out,
int *outlen, int *outlen,
const unsigned char *in, const unsigned char *in,
int *inlen, int quoteChar); int *inlen, int quoteChar);
XMLPUBFUN int XMLCALL XMLPUBFUN int
htmlIsScriptAttribute(const xmlChar *name); htmlIsScriptAttribute(const xmlChar *name);
XMLPUBFUN int XMLCALL XMLPUBFUN int
htmlHandleOmittedElem(int val); htmlHandleOmittedElem(int val);
#ifdef LIBXML_PUSH_ENABLED #ifdef LIBXML_PUSH_ENABLED
/** /**
* Interfaces for the Push mode. * Interfaces for the Push mode.
*/ */
XMLPUBFUN htmlParserCtxtPtr XMLCALL XMLPUBFUN htmlParserCtxtPtr
htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
void *user_data, void *user_data,
const char *chunk, const char *chunk,
int size, int size,
const char *filename, const char *filename,
xmlCharEncoding enc); xmlCharEncoding enc);
XMLPUBFUN int XMLCALL XMLPUBFUN int
htmlParseChunk (htmlParserCtxtPtr ctxt, htmlParseChunk (htmlParserCtxtPtr ctxt,
const char *chunk, const char *chunk,
int size, int size,
int terminate); int terminate);
#endif /* LIBXML_PUSH_ENABLED */ #endif /* LIBXML_PUSH_ENABLED */
XMLPUBFUN void XMLCALL XMLPUBFUN void
htmlFreeParserCtxt (htmlParserCtxtPtr ctxt); htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
/* /*
...@@ -188,63 +202,63 @@ typedef enum { ...@@ -188,63 +202,63 @@ typedef enum {
HTML_PARSE_IGNORE_ENC=1<<21 /* ignore internal document encoding hint */ HTML_PARSE_IGNORE_ENC=1<<21 /* ignore internal document encoding hint */
} htmlParserOption; } htmlParserOption;
XMLPUBFUN void XMLCALL XMLPUBFUN void
htmlCtxtReset (htmlParserCtxtPtr ctxt); htmlCtxtReset (htmlParserCtxtPtr ctxt);
XMLPUBFUN int XMLCALL XMLPUBFUN int
htmlCtxtUseOptions (htmlParserCtxtPtr ctxt, htmlCtxtUseOptions (htmlParserCtxtPtr ctxt,
int options); int options);
XMLPUBFUN htmlDocPtr XMLCALL XMLPUBFUN htmlDocPtr
htmlReadDoc (const xmlChar *cur, htmlReadDoc (const xmlChar *cur,
const char *URL, const char *URL,
const char *encoding, const char *encoding,
int options); int options);
XMLPUBFUN htmlDocPtr XMLCALL XMLPUBFUN htmlDocPtr
htmlReadFile (const char *URL, htmlReadFile (const char *URL,
const char *encoding, const char *encoding,
int options); int options);
XMLPUBFUN htmlDocPtr XMLCALL XMLPUBFUN htmlDocPtr
htmlReadMemory (const char *buffer, htmlReadMemory (const char *buffer,
int size, int size,
const char *URL, const char *URL,
const char *encoding, const char *encoding,
int options); int options);
XMLPUBFUN htmlDocPtr XMLCALL XMLPUBFUN htmlDocPtr
htmlReadFd (int fd, htmlReadFd (int fd,
const char *URL, const char *URL,
const char *encoding, const char *encoding,
int options); int options);
XMLPUBFUN htmlDocPtr XMLCALL XMLPUBFUN htmlDocPtr
htmlReadIO (xmlInputReadCallback ioread, htmlReadIO (xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose, xmlInputCloseCallback ioclose,
void *ioctx, void *ioctx,
const char *URL, const char *URL,
const char *encoding, const char *encoding,
int options); int options);
XMLPUBFUN htmlDocPtr XMLCALL XMLPUBFUN htmlDocPtr
htmlCtxtReadDoc (xmlParserCtxtPtr ctxt, htmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
const xmlChar *cur, const xmlChar *cur,
const char *URL, const char *URL,
const char *encoding, const char *encoding,
int options); int options);
XMLPUBFUN htmlDocPtr XMLCALL XMLPUBFUN htmlDocPtr
htmlCtxtReadFile (xmlParserCtxtPtr ctxt, htmlCtxtReadFile (xmlParserCtxtPtr ctxt,
const char *filename, const char *filename,
const char *encoding, const char *encoding,
int options); int options);
XMLPUBFUN htmlDocPtr XMLCALL XMLPUBFUN htmlDocPtr
htmlCtxtReadMemory (xmlParserCtxtPtr ctxt, htmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
const char *buffer, const char *buffer,
int size, int size,
const char *URL, const char *URL,
const char *encoding, const char *encoding,
int options); int options);
XMLPUBFUN htmlDocPtr XMLCALL XMLPUBFUN htmlDocPtr
htmlCtxtReadFd (xmlParserCtxtPtr ctxt, htmlCtxtReadFd (xmlParserCtxtPtr ctxt,
int fd, int fd,
const char *URL, const char *URL,
const char *encoding, const char *encoding,
int options); int options);
XMLPUBFUN htmlDocPtr XMLCALL XMLPUBFUN htmlDocPtr
htmlCtxtReadIO (xmlParserCtxtPtr ctxt, htmlCtxtReadIO (xmlParserCtxtPtr ctxt,
xmlInputReadCallback ioread, xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose, xmlInputCloseCallback ioclose,
...@@ -266,10 +280,10 @@ typedef enum { ...@@ -266,10 +280,10 @@ typedef enum {
/* Using htmlElemDesc rather than name here, to emphasise the fact /* Using htmlElemDesc rather than name here, to emphasise the fact
that otherwise there's a lookup overhead that otherwise there's a lookup overhead
*/ */
XMLPUBFUN htmlStatus XMLCALL htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ; XMLPUBFUN htmlStatus htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
XMLPUBFUN int XMLCALL htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ; XMLPUBFUN int htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
XMLPUBFUN htmlStatus XMLCALL htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ; XMLPUBFUN htmlStatus htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
XMLPUBFUN htmlStatus XMLCALL htmlNodeStatus(const htmlNodePtr, int) ; XMLPUBFUN htmlStatus htmlNodeStatus(const htmlNodePtr, int) ;
/** /**
* htmlDefaultSubelement: * htmlDefaultSubelement:
* @elt: HTML element * @elt: HTML element
......
...@@ -59,73 +59,73 @@ extern "C" { ...@@ -59,73 +59,73 @@ extern "C" {
*/ */
#define HTML_PI_NODE XML_PI_NODE #define HTML_PI_NODE XML_PI_NODE
XMLPUBFUN htmlDocPtr XMLCALL XMLPUBFUN htmlDocPtr
htmlNewDoc (const xmlChar *URI, htmlNewDoc (const xmlChar *URI,
const xmlChar *ExternalID); const xmlChar *ExternalID);
XMLPUBFUN htmlDocPtr XMLCALL XMLPUBFUN htmlDocPtr
htmlNewDocNoDtD (const xmlChar *URI, htmlNewDocNoDtD (const xmlChar *URI,
const xmlChar *ExternalID); const xmlChar *ExternalID);
XMLPUBFUN const xmlChar * XMLCALL XMLPUBFUN const xmlChar *
htmlGetMetaEncoding (htmlDocPtr doc); htmlGetMetaEncoding (htmlDocPtr doc);
XMLPUBFUN int XMLCALL XMLPUBFUN int
htmlSetMetaEncoding (htmlDocPtr doc, htmlSetMetaEncoding (htmlDocPtr doc,
const xmlChar *encoding); const xmlChar *encoding);
#ifdef LIBXML_OUTPUT_ENABLED #ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL XMLPUBFUN void
htmlDocDumpMemory (xmlDocPtr cur, htmlDocDumpMemory (xmlDocPtr cur,
xmlChar **mem, xmlChar **mem,
int *size); int *size);
XMLPUBFUN void XMLCALL XMLPUBFUN void
htmlDocDumpMemoryFormat (xmlDocPtr cur, htmlDocDumpMemoryFormat (xmlDocPtr cur,
xmlChar **mem, xmlChar **mem,
int *size, int *size,
int format); int format);
XMLPUBFUN int XMLCALL XMLPUBFUN int
htmlDocDump (FILE *f, htmlDocDump (FILE *f,
xmlDocPtr cur); xmlDocPtr cur);
XMLPUBFUN int XMLCALL XMLPUBFUN int
htmlSaveFile (const char *filename, htmlSaveFile (const char *filename,
xmlDocPtr cur); xmlDocPtr cur);
XMLPUBFUN int XMLCALL XMLPUBFUN int
htmlNodeDump (xmlBufferPtr buf, htmlNodeDump (xmlBufferPtr buf,
xmlDocPtr doc, xmlDocPtr doc,
xmlNodePtr cur); xmlNodePtr cur);
XMLPUBFUN void XMLCALL XMLPUBFUN void
htmlNodeDumpFile (FILE *out, htmlNodeDumpFile (FILE *out,
xmlDocPtr doc, xmlDocPtr doc,
xmlNodePtr cur); xmlNodePtr cur);
XMLPUBFUN int XMLCALL XMLPUBFUN int
htmlNodeDumpFileFormat (FILE *out, htmlNodeDumpFileFormat (FILE *out,
xmlDocPtr doc, xmlDocPtr doc,
xmlNodePtr cur, xmlNodePtr cur,
const char *encoding, const char *encoding,
int format); int format);
XMLPUBFUN int XMLCALL XMLPUBFUN int
htmlSaveFileEnc (const char *filename, htmlSaveFileEnc (const char *filename,
xmlDocPtr cur, xmlDocPtr cur,
const char *encoding); const char *encoding);
XMLPUBFUN int XMLCALL XMLPUBFUN int
htmlSaveFileFormat (const char *filename, htmlSaveFileFormat (const char *filename,
xmlDocPtr cur, xmlDocPtr cur,
const char *encoding, const char *encoding,
int format); int format);
XMLPUBFUN void XMLCALL XMLPUBFUN void
htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
xmlDocPtr doc, xmlDocPtr doc,
xmlNodePtr cur, xmlNodePtr cur,
const char *encoding, const char *encoding,
int format); int format);
XMLPUBFUN void XMLCALL XMLPUBFUN void
htmlDocContentDumpOutput(xmlOutputBufferPtr buf, htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
xmlDocPtr cur, xmlDocPtr cur,
const char *encoding); const char *encoding);
XMLPUBFUN void XMLCALL XMLPUBFUN void
htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
xmlDocPtr cur, xmlDocPtr cur,
const char *encoding, const char *encoding,
int format); int format);
XMLPUBFUN void XMLCALL XMLPUBFUN void
htmlNodeDumpOutput (xmlOutputBufferPtr buf, htmlNodeDumpOutput (xmlOutputBufferPtr buf,
xmlDocPtr doc, xmlDocPtr doc,
xmlNodePtr cur, xmlNodePtr cur,
...@@ -133,7 +133,7 @@ XMLPUBFUN void XMLCALL ...@@ -133,7 +133,7 @@ XMLPUBFUN void XMLCALL
#endif /* LIBXML_OUTPUT_ENABLED */ #endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN int XMLCALL XMLPUBFUN int
htmlIsBooleanAttr (const xmlChar *name); htmlIsBooleanAttr (const xmlChar *name);
......
...@@ -23,61 +23,61 @@ ...@@ -23,61 +23,61 @@
extern "C" { extern "C" {
#endif #endif
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN const xmlChar * XMLCALL XMLPUBFUN const xmlChar *
getPublicId (void *ctx); getPublicId (void *ctx);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN const xmlChar * XMLCALL XMLPUBFUN const xmlChar *
getSystemId (void *ctx); getSystemId (void *ctx);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
setDocumentLocator (void *ctx, setDocumentLocator (void *ctx,
xmlSAXLocatorPtr loc); xmlSAXLocatorPtr loc);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
getLineNumber (void *ctx); getLineNumber (void *ctx);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
getColumnNumber (void *ctx); getColumnNumber (void *ctx);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
isStandalone (void *ctx); isStandalone (void *ctx);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
hasInternalSubset (void *ctx); hasInternalSubset (void *ctx);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
hasExternalSubset (void *ctx); hasExternalSubset (void *ctx);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
internalSubset (void *ctx, internalSubset (void *ctx,
const xmlChar *name, const xmlChar *name,
const xmlChar *ExternalID, const xmlChar *ExternalID,
const xmlChar *SystemID); const xmlChar *SystemID);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
externalSubset (void *ctx, externalSubset (void *ctx,
const xmlChar *name, const xmlChar *name,
const xmlChar *ExternalID, const xmlChar *ExternalID,
const xmlChar *SystemID); const xmlChar *SystemID);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN xmlEntityPtr XMLCALL XMLPUBFUN xmlEntityPtr
getEntity (void *ctx, getEntity (void *ctx,
const xmlChar *name); const xmlChar *name);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN xmlEntityPtr XMLCALL XMLPUBFUN xmlEntityPtr
getParameterEntity (void *ctx, getParameterEntity (void *ctx,
const xmlChar *name); const xmlChar *name);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN xmlParserInputPtr XMLCALL XMLPUBFUN xmlParserInputPtr
resolveEntity (void *ctx, resolveEntity (void *ctx,
const xmlChar *publicId, const xmlChar *publicId,
const xmlChar *systemId); const xmlChar *systemId);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
entityDecl (void *ctx, entityDecl (void *ctx,
const xmlChar *name, const xmlChar *name,
int type, int type,
...@@ -85,7 +85,7 @@ XMLPUBFUN void XMLCALL ...@@ -85,7 +85,7 @@ XMLPUBFUN void XMLCALL
const xmlChar *systemId, const xmlChar *systemId,
xmlChar *content); xmlChar *content);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
attributeDecl (void *ctx, attributeDecl (void *ctx,
const xmlChar *elem, const xmlChar *elem,
const xmlChar *fullname, const xmlChar *fullname,
...@@ -94,19 +94,19 @@ XMLPUBFUN void XMLCALL ...@@ -94,19 +94,19 @@ XMLPUBFUN void XMLCALL
const xmlChar *defaultValue, const xmlChar *defaultValue,
xmlEnumerationPtr tree); xmlEnumerationPtr tree);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
elementDecl (void *ctx, elementDecl (void *ctx,
const xmlChar *name, const xmlChar *name,
int type, int type,
xmlElementContentPtr content); xmlElementContentPtr content);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
notationDecl (void *ctx, notationDecl (void *ctx,
const xmlChar *name, const xmlChar *name,
const xmlChar *publicId, const xmlChar *publicId,
const xmlChar *systemId); const xmlChar *systemId);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
unparsedEntityDecl (void *ctx, unparsedEntityDecl (void *ctx,
const xmlChar *name, const xmlChar *name,
const xmlChar *publicId, const xmlChar *publicId,
...@@ -114,83 +114,83 @@ XMLPUBFUN void XMLCALL ...@@ -114,83 +114,83 @@ XMLPUBFUN void XMLCALL
const xmlChar *notationName); const xmlChar *notationName);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
startDocument (void *ctx); startDocument (void *ctx);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
endDocument (void *ctx); endDocument (void *ctx);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
attribute (void *ctx, attribute (void *ctx,
const xmlChar *fullname, const xmlChar *fullname,
const xmlChar *value); const xmlChar *value);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
startElement (void *ctx, startElement (void *ctx,
const xmlChar *fullname, const xmlChar *fullname,
const xmlChar **atts); const xmlChar **atts);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
endElement (void *ctx, endElement (void *ctx,
const xmlChar *name); const xmlChar *name);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
reference (void *ctx, reference (void *ctx,
const xmlChar *name); const xmlChar *name);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
characters (void *ctx, characters (void *ctx,
const xmlChar *ch, const xmlChar *ch,
int len); int len);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
ignorableWhitespace (void *ctx, ignorableWhitespace (void *ctx,
const xmlChar *ch, const xmlChar *ch,
int len); int len);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
processingInstruction (void *ctx, processingInstruction (void *ctx,
const xmlChar *target, const xmlChar *target,
const xmlChar *data); const xmlChar *data);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
globalNamespace (void *ctx, globalNamespace (void *ctx,
const xmlChar *href, const xmlChar *href,
const xmlChar *prefix); const xmlChar *prefix);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
setNamespace (void *ctx, setNamespace (void *ctx,
const xmlChar *name); const xmlChar *name);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN xmlNsPtr XMLCALL XMLPUBFUN xmlNsPtr
getNamespace (void *ctx); getNamespace (void *ctx);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
checkNamespace (void *ctx, checkNamespace (void *ctx,
xmlChar *nameSpace); xmlChar *nameSpace);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
namespaceDecl (void *ctx, namespaceDecl (void *ctx,
const xmlChar *href, const xmlChar *href,
const xmlChar *prefix); const xmlChar *prefix);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
comment (void *ctx, comment (void *ctx,
const xmlChar *value); const xmlChar *value);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
cdataBlock (void *ctx, cdataBlock (void *ctx,
const xmlChar *value, const xmlChar *value,
int len); int len);
#ifdef LIBXML_SAX1_ENABLED #ifdef LIBXML_SAX1_ENABLED
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr, initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr,
int warning); int warning);
#ifdef LIBXML_HTML_ENABLED #ifdef LIBXML_HTML_ENABLED
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr); inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
#endif #endif
#endif /* LIBXML_SAX1_ENABLED */ #endif /* LIBXML_SAX1_ENABLED */
......
...@@ -20,55 +20,55 @@ ...@@ -20,55 +20,55 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
XMLPUBFUN const xmlChar * XMLCALL XMLPUBFUN const xmlChar *
xmlSAX2GetPublicId (void *ctx); xmlSAX2GetPublicId (void *ctx);
XMLPUBFUN const xmlChar * XMLCALL XMLPUBFUN const xmlChar *
xmlSAX2GetSystemId (void *ctx); xmlSAX2GetSystemId (void *ctx);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2SetDocumentLocator (void *ctx, xmlSAX2SetDocumentLocator (void *ctx,
xmlSAXLocatorPtr loc); xmlSAXLocatorPtr loc);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSAX2GetLineNumber (void *ctx); xmlSAX2GetLineNumber (void *ctx);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSAX2GetColumnNumber (void *ctx); xmlSAX2GetColumnNumber (void *ctx);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSAX2IsStandalone (void *ctx); xmlSAX2IsStandalone (void *ctx);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSAX2HasInternalSubset (void *ctx); xmlSAX2HasInternalSubset (void *ctx);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSAX2HasExternalSubset (void *ctx); xmlSAX2HasExternalSubset (void *ctx);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2InternalSubset (void *ctx, xmlSAX2InternalSubset (void *ctx,
const xmlChar *name, const xmlChar *name,
const xmlChar *ExternalID, const xmlChar *ExternalID,
const xmlChar *SystemID); const xmlChar *SystemID);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2ExternalSubset (void *ctx, xmlSAX2ExternalSubset (void *ctx,
const xmlChar *name, const xmlChar *name,
const xmlChar *ExternalID, const xmlChar *ExternalID,
const xmlChar *SystemID); const xmlChar *SystemID);
XMLPUBFUN xmlEntityPtr XMLCALL XMLPUBFUN xmlEntityPtr
xmlSAX2GetEntity (void *ctx, xmlSAX2GetEntity (void *ctx,
const xmlChar *name); const xmlChar *name);
XMLPUBFUN xmlEntityPtr XMLCALL XMLPUBFUN xmlEntityPtr
xmlSAX2GetParameterEntity (void *ctx, xmlSAX2GetParameterEntity (void *ctx,
const xmlChar *name); const xmlChar *name);
XMLPUBFUN xmlParserInputPtr XMLCALL XMLPUBFUN xmlParserInputPtr
xmlSAX2ResolveEntity (void *ctx, xmlSAX2ResolveEntity (void *ctx,
const xmlChar *publicId, const xmlChar *publicId,
const xmlChar *systemId); const xmlChar *systemId);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2EntityDecl (void *ctx, xmlSAX2EntityDecl (void *ctx,
const xmlChar *name, const xmlChar *name,
int type, int type,
const xmlChar *publicId, const xmlChar *publicId,
const xmlChar *systemId, const xmlChar *systemId,
xmlChar *content); xmlChar *content);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2AttributeDecl (void *ctx, xmlSAX2AttributeDecl (void *ctx,
const xmlChar *elem, const xmlChar *elem,
const xmlChar *fullname, const xmlChar *fullname,
...@@ -76,38 +76,38 @@ XMLPUBFUN void XMLCALL ...@@ -76,38 +76,38 @@ XMLPUBFUN void XMLCALL
int def, int def,
const xmlChar *defaultValue, const xmlChar *defaultValue,
xmlEnumerationPtr tree); xmlEnumerationPtr tree);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2ElementDecl (void *ctx, xmlSAX2ElementDecl (void *ctx,
const xmlChar *name, const xmlChar *name,
int type, int type,
xmlElementContentPtr content); xmlElementContentPtr content);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2NotationDecl (void *ctx, xmlSAX2NotationDecl (void *ctx,
const xmlChar *name, const xmlChar *name,
const xmlChar *publicId, const xmlChar *publicId,
const xmlChar *systemId); const xmlChar *systemId);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2UnparsedEntityDecl (void *ctx, xmlSAX2UnparsedEntityDecl (void *ctx,
const xmlChar *name, const xmlChar *name,
const xmlChar *publicId, const xmlChar *publicId,
const xmlChar *systemId, const xmlChar *systemId,
const xmlChar *notationName); const xmlChar *notationName);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2StartDocument (void *ctx); xmlSAX2StartDocument (void *ctx);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2EndDocument (void *ctx); xmlSAX2EndDocument (void *ctx);
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \ #if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED) defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2StartElement (void *ctx, xmlSAX2StartElement (void *ctx,
const xmlChar *fullname, const xmlChar *fullname,
const xmlChar **atts); const xmlChar **atts);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2EndElement (void *ctx, xmlSAX2EndElement (void *ctx,
const xmlChar *name); const xmlChar *name);
#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */ #endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2StartElementNs (void *ctx, xmlSAX2StartElementNs (void *ctx,
const xmlChar *localname, const xmlChar *localname,
const xmlChar *prefix, const xmlChar *prefix,
...@@ -117,54 +117,55 @@ XMLPUBFUN void XMLCALL ...@@ -117,54 +117,55 @@ XMLPUBFUN void XMLCALL
int nb_attributes, int nb_attributes,
int nb_defaulted, int nb_defaulted,
const xmlChar **attributes); const xmlChar **attributes);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2EndElementNs (void *ctx, xmlSAX2EndElementNs (void *ctx,
const xmlChar *localname, const xmlChar *localname,
const xmlChar *prefix, const xmlChar *prefix,
const xmlChar *URI); const xmlChar *URI);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2Reference (void *ctx, xmlSAX2Reference (void *ctx,
const xmlChar *name); const xmlChar *name);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2Characters (void *ctx, xmlSAX2Characters (void *ctx,
const xmlChar *ch, const xmlChar *ch,
int len); int len);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2IgnorableWhitespace (void *ctx, xmlSAX2IgnorableWhitespace (void *ctx,
const xmlChar *ch, const xmlChar *ch,
int len); int len);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2ProcessingInstruction (void *ctx, xmlSAX2ProcessingInstruction (void *ctx,
const xmlChar *target, const xmlChar *target,
const xmlChar *data); const xmlChar *data);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2Comment (void *ctx, xmlSAX2Comment (void *ctx,
const xmlChar *value); const xmlChar *value);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2CDataBlock (void *ctx, xmlSAX2CDataBlock (void *ctx,
const xmlChar *value, const xmlChar *value,
int len); int len);
#ifdef LIBXML_SAX1_ENABLED #ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN int XMLCALL XML_DEPRECATED
XMLPUBFUN int
xmlSAXDefaultVersion (int version); xmlSAXDefaultVersion (int version);
#endif /* LIBXML_SAX1_ENABLED */ #endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSAXVersion (xmlSAXHandler *hdlr, xmlSAXVersion (xmlSAXHandler *hdlr,
int version); int version);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr, xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
int warning); int warning);
#ifdef LIBXML_HTML_ENABLED #ifdef LIBXML_HTML_ENABLED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr); xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
htmlDefaultSAXHandlerInit (void); htmlDefaultSAXHandlerInit (void);
#endif #endif
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlDefaultSAXHandlerInit (void); xmlDefaultSAXHandlerInit (void);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -66,113 +66,113 @@ typedef xmlCatalog *xmlCatalogPtr; ...@@ -66,113 +66,113 @@ typedef xmlCatalog *xmlCatalogPtr;
/* /*
* Operations on a given catalog. * Operations on a given catalog.
*/ */
XMLPUBFUN xmlCatalogPtr XMLCALL XMLPUBFUN xmlCatalogPtr
xmlNewCatalog (int sgml); xmlNewCatalog (int sgml);
XMLPUBFUN xmlCatalogPtr XMLCALL XMLPUBFUN xmlCatalogPtr
xmlLoadACatalog (const char *filename); xmlLoadACatalog (const char *filename);
XMLPUBFUN xmlCatalogPtr XMLCALL XMLPUBFUN xmlCatalogPtr
xmlLoadSGMLSuperCatalog (const char *filename); xmlLoadSGMLSuperCatalog (const char *filename);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlConvertSGMLCatalog (xmlCatalogPtr catal); xmlConvertSGMLCatalog (xmlCatalogPtr catal);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlACatalogAdd (xmlCatalogPtr catal, xmlACatalogAdd (xmlCatalogPtr catal,
const xmlChar *type, const xmlChar *type,
const xmlChar *orig, const xmlChar *orig,
const xmlChar *replace); const xmlChar *replace);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlACatalogRemove (xmlCatalogPtr catal, xmlACatalogRemove (xmlCatalogPtr catal,
const xmlChar *value); const xmlChar *value);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlACatalogResolve (xmlCatalogPtr catal, xmlACatalogResolve (xmlCatalogPtr catal,
const xmlChar *pubID, const xmlChar *pubID,
const xmlChar *sysID); const xmlChar *sysID);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlACatalogResolveSystem(xmlCatalogPtr catal, xmlACatalogResolveSystem(xmlCatalogPtr catal,
const xmlChar *sysID); const xmlChar *sysID);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlACatalogResolvePublic(xmlCatalogPtr catal, xmlACatalogResolvePublic(xmlCatalogPtr catal,
const xmlChar *pubID); const xmlChar *pubID);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlACatalogResolveURI (xmlCatalogPtr catal, xmlACatalogResolveURI (xmlCatalogPtr catal,
const xmlChar *URI); const xmlChar *URI);
#ifdef LIBXML_OUTPUT_ENABLED #ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlACatalogDump (xmlCatalogPtr catal, xmlACatalogDump (xmlCatalogPtr catal,
FILE *out); FILE *out);
#endif /* LIBXML_OUTPUT_ENABLED */ #endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlFreeCatalog (xmlCatalogPtr catal); xmlFreeCatalog (xmlCatalogPtr catal);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlCatalogIsEmpty (xmlCatalogPtr catal); xmlCatalogIsEmpty (xmlCatalogPtr catal);
/* /*
* Global operations. * Global operations.
*/ */
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlInitializeCatalog (void); xmlInitializeCatalog (void);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlLoadCatalog (const char *filename); xmlLoadCatalog (const char *filename);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlLoadCatalogs (const char *paths); xmlLoadCatalogs (const char *paths);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlCatalogCleanup (void); xmlCatalogCleanup (void);
#ifdef LIBXML_OUTPUT_ENABLED #ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlCatalogDump (FILE *out); xmlCatalogDump (FILE *out);
#endif /* LIBXML_OUTPUT_ENABLED */ #endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlCatalogResolve (const xmlChar *pubID, xmlCatalogResolve (const xmlChar *pubID,
const xmlChar *sysID); const xmlChar *sysID);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlCatalogResolveSystem (const xmlChar *sysID); xmlCatalogResolveSystem (const xmlChar *sysID);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlCatalogResolvePublic (const xmlChar *pubID); xmlCatalogResolvePublic (const xmlChar *pubID);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlCatalogResolveURI (const xmlChar *URI); xmlCatalogResolveURI (const xmlChar *URI);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlCatalogAdd (const xmlChar *type, xmlCatalogAdd (const xmlChar *type,
const xmlChar *orig, const xmlChar *orig,
const xmlChar *replace); const xmlChar *replace);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlCatalogRemove (const xmlChar *value); xmlCatalogRemove (const xmlChar *value);
XMLPUBFUN xmlDocPtr XMLCALL XMLPUBFUN xmlDocPtr
xmlParseCatalogFile (const char *filename); xmlParseCatalogFile (const char *filename);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlCatalogConvert (void); xmlCatalogConvert (void);
/* /*
* Strictly minimal interfaces for per-document catalogs used * Strictly minimal interfaces for per-document catalogs used
* by the parser. * by the parser.
*/ */
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlCatalogFreeLocal (void *catalogs); xmlCatalogFreeLocal (void *catalogs);
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlCatalogAddLocal (void *catalogs, xmlCatalogAddLocal (void *catalogs,
const xmlChar *URL); const xmlChar *URL);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlCatalogLocalResolve (void *catalogs, xmlCatalogLocalResolve (void *catalogs,
const xmlChar *pubID, const xmlChar *pubID,
const xmlChar *sysID); const xmlChar *sysID);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlCatalogLocalResolveURI(void *catalogs, xmlCatalogLocalResolveURI(void *catalogs,
const xmlChar *URI); const xmlChar *URI);
/* /*
* Preference settings. * Preference settings.
*/ */
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlCatalogSetDebug (int level); xmlCatalogSetDebug (int level);
XMLPUBFUN xmlCatalogPrefer XMLCALL XMLPUBFUN xmlCatalogPrefer
xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer); xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlCatalogSetDefaults (xmlCatalogAllow allow); xmlCatalogSetDefaults (xmlCatalogAllow allow);
XMLPUBFUN xmlCatalogAllow XMLCALL XMLPUBFUN xmlCatalogAllow
xmlCatalogGetDefaults (void); xmlCatalogGetDefaults (void);
/* DEPRECATED interfaces */ /* DEPRECATED interfaces */
XMLPUBFUN const xmlChar * XMLCALL XMLPUBFUN const xmlChar *
xmlCatalogGetSystem (const xmlChar *sysID); xmlCatalogGetSystem (const xmlChar *sysID);
XMLPUBFUN const xmlChar * XMLCALL XMLPUBFUN const xmlChar *
xmlCatalogGetPublic (const xmlChar *pubID); xmlCatalogGetPublic (const xmlChar *pubID);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -51,7 +51,7 @@ struct _xmlChRangeGroup { ...@@ -51,7 +51,7 @@ struct _xmlChRangeGroup {
/** /**
* Range checking routine * Range checking routine
*/ */
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlCharInRange(unsigned int val, const xmlChRangeGroup *group); xmlCharInRange(unsigned int val, const xmlChRangeGroup *group);
...@@ -207,21 +207,21 @@ XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256]; ...@@ -207,21 +207,21 @@ XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256];
#define xmlIsPubidCharQ(c) (((c) < 0x100) ? \ #define xmlIsPubidCharQ(c) (((c) < 0x100) ? \
xmlIsPubidChar_ch((c)) : 0) xmlIsPubidChar_ch((c)) : 0)
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlIsBaseChar(unsigned int ch); xmlIsBaseChar(unsigned int ch);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlIsBlank(unsigned int ch); xmlIsBlank(unsigned int ch);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlIsChar(unsigned int ch); xmlIsChar(unsigned int ch);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlIsCombining(unsigned int ch); xmlIsCombining(unsigned int ch);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlIsDigit(unsigned int ch); xmlIsDigit(unsigned int ch);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlIsExtender(unsigned int ch); xmlIsExtender(unsigned int ch);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlIsIdeographic(unsigned int ch); xmlIsIdeographic(unsigned int ch);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlIsPubidChar(unsigned int ch); xmlIsPubidChar(unsigned int ch);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -25,39 +25,39 @@ extern "C" { ...@@ -25,39 +25,39 @@ extern "C" {
/* /*
* The standard Dump routines. * The standard Dump routines.
*/ */
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlDebugDumpString (FILE *output, xmlDebugDumpString (FILE *output,
const xmlChar *str); const xmlChar *str);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlDebugDumpAttr (FILE *output, xmlDebugDumpAttr (FILE *output,
xmlAttrPtr attr, xmlAttrPtr attr,
int depth); int depth);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlDebugDumpAttrList (FILE *output, xmlDebugDumpAttrList (FILE *output,
xmlAttrPtr attr, xmlAttrPtr attr,
int depth); int depth);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlDebugDumpOneNode (FILE *output, xmlDebugDumpOneNode (FILE *output,
xmlNodePtr node, xmlNodePtr node,
int depth); int depth);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlDebugDumpNode (FILE *output, xmlDebugDumpNode (FILE *output,
xmlNodePtr node, xmlNodePtr node,
int depth); int depth);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlDebugDumpNodeList (FILE *output, xmlDebugDumpNodeList (FILE *output,
xmlNodePtr node, xmlNodePtr node,
int depth); int depth);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlDebugDumpDocumentHead(FILE *output, xmlDebugDumpDocumentHead(FILE *output,
xmlDocPtr doc); xmlDocPtr doc);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlDebugDumpDocument (FILE *output, xmlDebugDumpDocument (FILE *output,
xmlDocPtr doc); xmlDocPtr doc);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlDebugDumpDTD (FILE *output, xmlDebugDumpDTD (FILE *output,
xmlDtdPtr dtd); xmlDtdPtr dtd);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlDebugDumpEntities (FILE *output, xmlDebugDumpEntities (FILE *output,
xmlDocPtr doc); xmlDocPtr doc);
...@@ -67,7 +67,7 @@ XMLPUBFUN void XMLCALL ...@@ -67,7 +67,7 @@ XMLPUBFUN void XMLCALL
* * * *
****************************************************************/ ****************************************************************/
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlDebugCheckDocument (FILE * output, xmlDebugCheckDocument (FILE * output,
xmlDocPtr doc); xmlDocPtr doc);
...@@ -77,12 +77,12 @@ XMLPUBFUN int XMLCALL ...@@ -77,12 +77,12 @@ XMLPUBFUN int XMLCALL
* * * *
****************************************************************/ ****************************************************************/
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlLsOneNode (FILE *output, xmlNodePtr node); xmlLsOneNode (FILE *output, xmlNodePtr node);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlLsCountNode (xmlNodePtr node); xmlLsCountNode (xmlNodePtr node);
XMLPUBFUN const char * XMLCALL XMLPUBFUN const char *
xmlBoolToText (int boolval); xmlBoolToText (int boolval);
/**************************************************************** /****************************************************************
...@@ -136,63 +136,63 @@ typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt, ...@@ -136,63 +136,63 @@ typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
xmlNodePtr node, xmlNodePtr node,
xmlNodePtr node2); xmlNodePtr node2);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlShellPrintXPathError (int errorType, xmlShellPrintXPathError (int errorType,
const char *arg); const char *arg);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlShellPrintXPathResult(xmlXPathObjectPtr list); xmlShellPrintXPathResult(xmlXPathObjectPtr list);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlShellList (xmlShellCtxtPtr ctxt, xmlShellList (xmlShellCtxtPtr ctxt,
char *arg, char *arg,
xmlNodePtr node, xmlNodePtr node,
xmlNodePtr node2); xmlNodePtr node2);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlShellBase (xmlShellCtxtPtr ctxt, xmlShellBase (xmlShellCtxtPtr ctxt,
char *arg, char *arg,
xmlNodePtr node, xmlNodePtr node,
xmlNodePtr node2); xmlNodePtr node2);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlShellDir (xmlShellCtxtPtr ctxt, xmlShellDir (xmlShellCtxtPtr ctxt,
char *arg, char *arg,
xmlNodePtr node, xmlNodePtr node,
xmlNodePtr node2); xmlNodePtr node2);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlShellLoad (xmlShellCtxtPtr ctxt, xmlShellLoad (xmlShellCtxtPtr ctxt,
char *filename, char *filename,
xmlNodePtr node, xmlNodePtr node,
xmlNodePtr node2); xmlNodePtr node2);
#ifdef LIBXML_OUTPUT_ENABLED #ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlShellPrintNode (xmlNodePtr node); xmlShellPrintNode (xmlNodePtr node);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlShellCat (xmlShellCtxtPtr ctxt, xmlShellCat (xmlShellCtxtPtr ctxt,
char *arg, char *arg,
xmlNodePtr node, xmlNodePtr node,
xmlNodePtr node2); xmlNodePtr node2);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlShellWrite (xmlShellCtxtPtr ctxt, xmlShellWrite (xmlShellCtxtPtr ctxt,
char *filename, char *filename,
xmlNodePtr node, xmlNodePtr node,
xmlNodePtr node2); xmlNodePtr node2);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlShellSave (xmlShellCtxtPtr ctxt, xmlShellSave (xmlShellCtxtPtr ctxt,
char *filename, char *filename,
xmlNodePtr node, xmlNodePtr node,
xmlNodePtr node2); xmlNodePtr node2);
#endif /* LIBXML_OUTPUT_ENABLED */ #endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_VALID_ENABLED #ifdef LIBXML_VALID_ENABLED
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlShellValidate (xmlShellCtxtPtr ctxt, xmlShellValidate (xmlShellCtxtPtr ctxt,
char *dtd, char *dtd,
xmlNodePtr node, xmlNodePtr node,
xmlNodePtr node2); xmlNodePtr node2);
#endif /* LIBXML_VALID_ENABLED */ #endif /* LIBXML_VALID_ENABLED */
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlShellDu (xmlShellCtxtPtr ctxt, xmlShellDu (xmlShellCtxtPtr ctxt,
char *arg, char *arg,
xmlNodePtr tree, xmlNodePtr tree,
xmlNodePtr node2); xmlNodePtr node2);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlShellPwd (xmlShellCtxtPtr ctxt, xmlShellPwd (xmlShellCtxtPtr ctxt,
char *buffer, char *buffer,
xmlNodePtr node, xmlNodePtr node,
...@@ -201,7 +201,7 @@ XMLPUBFUN int XMLCALL ...@@ -201,7 +201,7 @@ XMLPUBFUN int XMLCALL
/* /*
* The Shell interface. * The Shell interface.
*/ */
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlShell (xmlDocPtr doc, xmlShell (xmlDocPtr doc,
char *filename, char *filename,
xmlShellReadlineFunc input, xmlShellReadlineFunc input,
......
...@@ -28,51 +28,51 @@ typedef xmlDict *xmlDictPtr; ...@@ -28,51 +28,51 @@ typedef xmlDict *xmlDictPtr;
* Initializer * Initializer
*/ */
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL xmlInitializeDict(void); XMLPUBFUN int xmlInitializeDict(void);
/* /*
* Constructor and destructor. * Constructor and destructor.
*/ */
XMLPUBFUN xmlDictPtr XMLCALL XMLPUBFUN xmlDictPtr
xmlDictCreate (void); xmlDictCreate (void);
XMLPUBFUN size_t XMLCALL XMLPUBFUN size_t
xmlDictSetLimit (xmlDictPtr dict, xmlDictSetLimit (xmlDictPtr dict,
size_t limit); size_t limit);
XMLPUBFUN size_t XMLCALL XMLPUBFUN size_t
xmlDictGetUsage (xmlDictPtr dict); xmlDictGetUsage (xmlDictPtr dict);
XMLPUBFUN xmlDictPtr XMLCALL XMLPUBFUN xmlDictPtr
xmlDictCreateSub(xmlDictPtr sub); xmlDictCreateSub(xmlDictPtr sub);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlDictReference(xmlDictPtr dict); xmlDictReference(xmlDictPtr dict);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlDictFree (xmlDictPtr dict); xmlDictFree (xmlDictPtr dict);
/* /*
* Lookup of entry in the dictionary. * Lookup of entry in the dictionary.
*/ */
XMLPUBFUN const xmlChar * XMLCALL XMLPUBFUN const xmlChar *
xmlDictLookup (xmlDictPtr dict, xmlDictLookup (xmlDictPtr dict,
const xmlChar *name, const xmlChar *name,
int len); int len);
XMLPUBFUN const xmlChar * XMLCALL XMLPUBFUN const xmlChar *
xmlDictExists (xmlDictPtr dict, xmlDictExists (xmlDictPtr dict,
const xmlChar *name, const xmlChar *name,
int len); int len);
XMLPUBFUN const xmlChar * XMLCALL XMLPUBFUN const xmlChar *
xmlDictQLookup (xmlDictPtr dict, xmlDictQLookup (xmlDictPtr dict,
const xmlChar *prefix, const xmlChar *prefix,
const xmlChar *name); const xmlChar *name);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlDictOwns (xmlDictPtr dict, xmlDictOwns (xmlDictPtr dict,
const xmlChar *str); const xmlChar *str);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlDictSize (xmlDictPtr dict); xmlDictSize (xmlDictPtr dict);
/* /*
* Cleanup function * Cleanup function
*/ */
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlDictCleanup (void); xmlDictCleanup (void);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -154,18 +154,18 @@ extern "C" { ...@@ -154,18 +154,18 @@ extern "C" {
* Interfaces for encoding handlers. * Interfaces for encoding handlers.
*/ */
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlInitCharEncodingHandlers (void); xmlInitCharEncodingHandlers (void);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlCleanupCharEncodingHandlers (void); xmlCleanupCharEncodingHandlers (void);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler); xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL XMLPUBFUN xmlCharEncodingHandlerPtr
xmlGetCharEncodingHandler (xmlCharEncoding enc); xmlGetCharEncodingHandler (xmlCharEncoding enc);
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL XMLPUBFUN xmlCharEncodingHandlerPtr
xmlFindCharEncodingHandler (const char *name); xmlFindCharEncodingHandler (const char *name);
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL XMLPUBFUN xmlCharEncodingHandlerPtr
xmlNewCharEncodingHandler (const char *name, xmlNewCharEncodingHandler (const char *name,
xmlCharEncodingInputFunc input, xmlCharEncodingInputFunc input,
xmlCharEncodingOutputFunc output); xmlCharEncodingOutputFunc output);
...@@ -173,54 +173,55 @@ XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL ...@@ -173,54 +173,55 @@ XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
/* /*
* Interfaces for encoding names and aliases. * Interfaces for encoding names and aliases.
*/ */
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlAddEncodingAlias (const char *name, xmlAddEncodingAlias (const char *name,
const char *alias); const char *alias);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlDelEncodingAlias (const char *alias); xmlDelEncodingAlias (const char *alias);
XMLPUBFUN const char * XMLCALL XMLPUBFUN const char *
xmlGetEncodingAlias (const char *alias); xmlGetEncodingAlias (const char *alias);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlCleanupEncodingAliases (void); xmlCleanupEncodingAliases (void);
XMLPUBFUN xmlCharEncoding XMLCALL XMLPUBFUN xmlCharEncoding
xmlParseCharEncoding (const char *name); xmlParseCharEncoding (const char *name);
XMLPUBFUN const char * XMLCALL XMLPUBFUN const char *
xmlGetCharEncodingName (xmlCharEncoding enc); xmlGetCharEncodingName (xmlCharEncoding enc);
/* /*
* Interfaces directly used by the parsers. * Interfaces directly used by the parsers.
*/ */
XMLPUBFUN xmlCharEncoding XMLCALL XMLPUBFUN xmlCharEncoding
xmlDetectCharEncoding (const unsigned char *in, xmlDetectCharEncoding (const unsigned char *in,
int len); int len);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlCharEncOutFunc (xmlCharEncodingHandler *handler, xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
xmlBufferPtr out, xmlBufferPtr out,
xmlBufferPtr in); xmlBufferPtr in);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlCharEncInFunc (xmlCharEncodingHandler *handler, xmlCharEncInFunc (xmlCharEncodingHandler *handler,
xmlBufferPtr out, xmlBufferPtr out,
xmlBufferPtr in); xmlBufferPtr in);
XMLPUBFUN int XMLCALL XML_DEPRECATED
XMLPUBFUN int
xmlCharEncFirstLine (xmlCharEncodingHandler *handler, xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
xmlBufferPtr out, xmlBufferPtr out,
xmlBufferPtr in); xmlBufferPtr in);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlCharEncCloseFunc (xmlCharEncodingHandler *handler); xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);
/* /*
* Export a few useful functions * Export a few useful functions
*/ */
#ifdef LIBXML_OUTPUT_ENABLED #ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN int XMLCALL XMLPUBFUN int
UTF8Toisolat1 (unsigned char *out, UTF8Toisolat1 (unsigned char *out,
int *outlen, int *outlen,
const unsigned char *in, const unsigned char *in,
int *inlen); int *inlen);
#endif /* LIBXML_OUTPUT_ENABLED */ #endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN int XMLCALL XMLPUBFUN int
isolat1ToUTF8 (unsigned char *out, isolat1ToUTF8 (unsigned char *out,
int *outlen, int *outlen,
const unsigned char *in, const unsigned char *in,
......
...@@ -56,10 +56,8 @@ struct _xmlEntity { ...@@ -56,10 +56,8 @@ struct _xmlEntity {
struct _xmlEntity *nexte; /* unused */ struct _xmlEntity *nexte; /* unused */
const xmlChar *URI; /* the full URI as computed */ const xmlChar *URI; /* the full URI as computed */
int owner; /* does the entity own the childrens */ int owner; /* does the entity own the childrens */
int checked; /* was the entity content checked */ int flags; /* various flags */
/* this is also used to count entities unsigned long expandedSize; /* expanded size */
* references done from that entity
* and if it contains '<' */
}; };
/* /*
...@@ -76,72 +74,72 @@ typedef xmlEntitiesTable *xmlEntitiesTablePtr; ...@@ -76,72 +74,72 @@ typedef xmlEntitiesTable *xmlEntitiesTablePtr;
#ifdef LIBXML_LEGACY_ENABLED #ifdef LIBXML_LEGACY_ENABLED
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlInitializePredefinedEntities (void); xmlInitializePredefinedEntities (void);
#endif /* LIBXML_LEGACY_ENABLED */ #endif /* LIBXML_LEGACY_ENABLED */
XMLPUBFUN xmlEntityPtr XMLCALL XMLPUBFUN xmlEntityPtr
xmlNewEntity (xmlDocPtr doc, xmlNewEntity (xmlDocPtr doc,
const xmlChar *name, const xmlChar *name,
int type, int type,
const xmlChar *ExternalID, const xmlChar *ExternalID,
const xmlChar *SystemID, const xmlChar *SystemID,
const xmlChar *content); const xmlChar *content);
XMLPUBFUN xmlEntityPtr XMLCALL XMLPUBFUN xmlEntityPtr
xmlAddDocEntity (xmlDocPtr doc, xmlAddDocEntity (xmlDocPtr doc,
const xmlChar *name, const xmlChar *name,
int type, int type,
const xmlChar *ExternalID, const xmlChar *ExternalID,
const xmlChar *SystemID, const xmlChar *SystemID,
const xmlChar *content); const xmlChar *content);
XMLPUBFUN xmlEntityPtr XMLCALL XMLPUBFUN xmlEntityPtr
xmlAddDtdEntity (xmlDocPtr doc, xmlAddDtdEntity (xmlDocPtr doc,
const xmlChar *name, const xmlChar *name,
int type, int type,
const xmlChar *ExternalID, const xmlChar *ExternalID,
const xmlChar *SystemID, const xmlChar *SystemID,
const xmlChar *content); const xmlChar *content);
XMLPUBFUN xmlEntityPtr XMLCALL XMLPUBFUN xmlEntityPtr
xmlGetPredefinedEntity (const xmlChar *name); xmlGetPredefinedEntity (const xmlChar *name);
XMLPUBFUN xmlEntityPtr XMLCALL XMLPUBFUN xmlEntityPtr
xmlGetDocEntity (const xmlDoc *doc, xmlGetDocEntity (const xmlDoc *doc,
const xmlChar *name); const xmlChar *name);
XMLPUBFUN xmlEntityPtr XMLCALL XMLPUBFUN xmlEntityPtr
xmlGetDtdEntity (xmlDocPtr doc, xmlGetDtdEntity (xmlDocPtr doc,
const xmlChar *name); const xmlChar *name);
XMLPUBFUN xmlEntityPtr XMLCALL XMLPUBFUN xmlEntityPtr
xmlGetParameterEntity (xmlDocPtr doc, xmlGetParameterEntity (xmlDocPtr doc,
const xmlChar *name); const xmlChar *name);
#ifdef LIBXML_LEGACY_ENABLED #ifdef LIBXML_LEGACY_ENABLED
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN const xmlChar * XMLCALL XMLPUBFUN const xmlChar *
xmlEncodeEntities (xmlDocPtr doc, xmlEncodeEntities (xmlDocPtr doc,
const xmlChar *input); const xmlChar *input);
#endif /* LIBXML_LEGACY_ENABLED */ #endif /* LIBXML_LEGACY_ENABLED */
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlEncodeEntitiesReentrant(xmlDocPtr doc, xmlEncodeEntitiesReentrant(xmlDocPtr doc,
const xmlChar *input); const xmlChar *input);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlEncodeSpecialChars (const xmlDoc *doc, xmlEncodeSpecialChars (const xmlDoc *doc,
const xmlChar *input); const xmlChar *input);
XMLPUBFUN xmlEntitiesTablePtr XMLCALL XMLPUBFUN xmlEntitiesTablePtr
xmlCreateEntitiesTable (void); xmlCreateEntitiesTable (void);
#ifdef LIBXML_TREE_ENABLED #ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlEntitiesTablePtr XMLCALL XMLPUBFUN xmlEntitiesTablePtr
xmlCopyEntitiesTable (xmlEntitiesTablePtr table); xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
#endif /* LIBXML_TREE_ENABLED */ #endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlFreeEntitiesTable (xmlEntitiesTablePtr table); xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED #ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlDumpEntitiesTable (xmlBufferPtr buf, xmlDumpEntitiesTable (xmlBufferPtr buf,
xmlEntitiesTablePtr table); xmlEntitiesTablePtr table);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlDumpEntityDecl (xmlBufferPtr buf, xmlDumpEntityDecl (xmlBufferPtr buf,
xmlEntityPtr ent); xmlEntityPtr ent);
#endif /* LIBXML_OUTPUT_ENABLED */ #endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_LEGACY_ENABLED #ifdef LIBXML_LEGACY_ENABLED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlCleanupPredefinedEntities(void); xmlCleanupPredefinedEntities(void);
#endif /* LIBXML_LEGACY_ENABLED */ #endif /* LIBXML_LEGACY_ENABLED */
......
...@@ -103,48 +103,48 @@ typedef void (*xmlHashScannerFull)(void *payload, void *data, ...@@ -103,48 +103,48 @@ typedef void (*xmlHashScannerFull)(void *payload, void *data,
/* /*
* Constructor and destructor. * Constructor and destructor.
*/ */
XMLPUBFUN xmlHashTablePtr XMLCALL XMLPUBFUN xmlHashTablePtr
xmlHashCreate (int size); xmlHashCreate (int size);
XMLPUBFUN xmlHashTablePtr XMLCALL XMLPUBFUN xmlHashTablePtr
xmlHashCreateDict(int size, xmlHashCreateDict(int size,
xmlDictPtr dict); xmlDictPtr dict);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlHashFree (xmlHashTablePtr table, xmlHashFree (xmlHashTablePtr table,
xmlHashDeallocator f); xmlHashDeallocator f);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlHashDefaultDeallocator(void *entry, xmlHashDefaultDeallocator(void *entry,
const xmlChar *name); const xmlChar *name);
/* /*
* Add a new entry to the hash table. * Add a new entry to the hash table.
*/ */
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlHashAddEntry (xmlHashTablePtr table, xmlHashAddEntry (xmlHashTablePtr table,
const xmlChar *name, const xmlChar *name,
void *userdata); void *userdata);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlHashUpdateEntry(xmlHashTablePtr table, xmlHashUpdateEntry(xmlHashTablePtr table,
const xmlChar *name, const xmlChar *name,
void *userdata, void *userdata,
xmlHashDeallocator f); xmlHashDeallocator f);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlHashAddEntry2(xmlHashTablePtr table, xmlHashAddEntry2(xmlHashTablePtr table,
const xmlChar *name, const xmlChar *name,
const xmlChar *name2, const xmlChar *name2,
void *userdata); void *userdata);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlHashUpdateEntry2(xmlHashTablePtr table, xmlHashUpdateEntry2(xmlHashTablePtr table,
const xmlChar *name, const xmlChar *name,
const xmlChar *name2, const xmlChar *name2,
void *userdata, void *userdata,
xmlHashDeallocator f); xmlHashDeallocator f);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlHashAddEntry3(xmlHashTablePtr table, xmlHashAddEntry3(xmlHashTablePtr table,
const xmlChar *name, const xmlChar *name,
const xmlChar *name2, const xmlChar *name2,
const xmlChar *name3, const xmlChar *name3,
void *userdata); void *userdata);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlHashUpdateEntry3(xmlHashTablePtr table, xmlHashUpdateEntry3(xmlHashTablePtr table,
const xmlChar *name, const xmlChar *name,
const xmlChar *name2, const xmlChar *name2,
...@@ -155,13 +155,13 @@ XMLPUBFUN int XMLCALL ...@@ -155,13 +155,13 @@ XMLPUBFUN int XMLCALL
/* /*
* Remove an entry from the hash table. * Remove an entry from the hash table.
*/ */
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name, xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name,
xmlHashDeallocator f); xmlHashDeallocator f);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name, xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name,
const xmlChar *name2, xmlHashDeallocator f); const xmlChar *name2, xmlHashDeallocator f);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name, xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name,
const xmlChar *name2, const xmlChar *name3, const xmlChar *name2, const xmlChar *name3,
xmlHashDeallocator f); xmlHashDeallocator f);
...@@ -169,29 +169,29 @@ XMLPUBFUN int XMLCALL ...@@ -169,29 +169,29 @@ XMLPUBFUN int XMLCALL
/* /*
* Retrieve the userdata. * Retrieve the userdata.
*/ */
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlHashLookup (xmlHashTablePtr table, xmlHashLookup (xmlHashTablePtr table,
const xmlChar *name); const xmlChar *name);
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlHashLookup2 (xmlHashTablePtr table, xmlHashLookup2 (xmlHashTablePtr table,
const xmlChar *name, const xmlChar *name,
const xmlChar *name2); const xmlChar *name2);
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlHashLookup3 (xmlHashTablePtr table, xmlHashLookup3 (xmlHashTablePtr table,
const xmlChar *name, const xmlChar *name,
const xmlChar *name2, const xmlChar *name2,
const xmlChar *name3); const xmlChar *name3);
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlHashQLookup (xmlHashTablePtr table, xmlHashQLookup (xmlHashTablePtr table,
const xmlChar *name, const xmlChar *name,
const xmlChar *prefix); const xmlChar *prefix);
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlHashQLookup2 (xmlHashTablePtr table, xmlHashQLookup2 (xmlHashTablePtr table,
const xmlChar *name, const xmlChar *name,
const xmlChar *prefix, const xmlChar *prefix,
const xmlChar *name2, const xmlChar *name2,
const xmlChar *prefix2); const xmlChar *prefix2);
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlHashQLookup3 (xmlHashTablePtr table, xmlHashQLookup3 (xmlHashTablePtr table,
const xmlChar *name, const xmlChar *name,
const xmlChar *prefix, const xmlChar *prefix,
...@@ -203,27 +203,27 @@ XMLPUBFUN void * XMLCALL ...@@ -203,27 +203,27 @@ XMLPUBFUN void * XMLCALL
/* /*
* Helpers. * Helpers.
*/ */
XMLPUBFUN xmlHashTablePtr XMLCALL XMLPUBFUN xmlHashTablePtr
xmlHashCopy (xmlHashTablePtr table, xmlHashCopy (xmlHashTablePtr table,
xmlHashCopier f); xmlHashCopier f);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlHashSize (xmlHashTablePtr table); xmlHashSize (xmlHashTablePtr table);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlHashScan (xmlHashTablePtr table, xmlHashScan (xmlHashTablePtr table,
xmlHashScanner f, xmlHashScanner f,
void *data); void *data);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlHashScan3 (xmlHashTablePtr table, xmlHashScan3 (xmlHashTablePtr table,
const xmlChar *name, const xmlChar *name,
const xmlChar *name2, const xmlChar *name2,
const xmlChar *name3, const xmlChar *name3,
xmlHashScanner f, xmlHashScanner f,
void *data); void *data);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlHashScanFull (xmlHashTablePtr table, xmlHashScanFull (xmlHashTablePtr table,
xmlHashScannerFull f, xmlHashScannerFull f,
void *data); void *data);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlHashScanFull3(xmlHashTablePtr table, xmlHashScanFull3(xmlHashTablePtr table,
const xmlChar *name, const xmlChar *name,
const xmlChar *name2, const xmlChar *name2,
......
...@@ -52,79 +52,79 @@ typedef int (*xmlListDataCompare) (const void *data0, const void *data1); ...@@ -52,79 +52,79 @@ typedef int (*xmlListDataCompare) (const void *data0, const void *data1);
typedef int (*xmlListWalker) (const void *data, void *user); typedef int (*xmlListWalker) (const void *data, void *user);
/* Creation/Deletion */ /* Creation/Deletion */
XMLPUBFUN xmlListPtr XMLCALL XMLPUBFUN xmlListPtr
xmlListCreate (xmlListDeallocator deallocator, xmlListCreate (xmlListDeallocator deallocator,
xmlListDataCompare compare); xmlListDataCompare compare);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlListDelete (xmlListPtr l); xmlListDelete (xmlListPtr l);
/* Basic Operators */ /* Basic Operators */
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlListSearch (xmlListPtr l, xmlListSearch (xmlListPtr l,
void *data); void *data);
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlListReverseSearch (xmlListPtr l, xmlListReverseSearch (xmlListPtr l,
void *data); void *data);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlListInsert (xmlListPtr l, xmlListInsert (xmlListPtr l,
void *data) ; void *data) ;
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlListAppend (xmlListPtr l, xmlListAppend (xmlListPtr l,
void *data) ; void *data) ;
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlListRemoveFirst (xmlListPtr l, xmlListRemoveFirst (xmlListPtr l,
void *data); void *data);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlListRemoveLast (xmlListPtr l, xmlListRemoveLast (xmlListPtr l,
void *data); void *data);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlListRemoveAll (xmlListPtr l, xmlListRemoveAll (xmlListPtr l,
void *data); void *data);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlListClear (xmlListPtr l); xmlListClear (xmlListPtr l);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlListEmpty (xmlListPtr l); xmlListEmpty (xmlListPtr l);
XMLPUBFUN xmlLinkPtr XMLCALL XMLPUBFUN xmlLinkPtr
xmlListFront (xmlListPtr l); xmlListFront (xmlListPtr l);
XMLPUBFUN xmlLinkPtr XMLCALL XMLPUBFUN xmlLinkPtr
xmlListEnd (xmlListPtr l); xmlListEnd (xmlListPtr l);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlListSize (xmlListPtr l); xmlListSize (xmlListPtr l);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlListPopFront (xmlListPtr l); xmlListPopFront (xmlListPtr l);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlListPopBack (xmlListPtr l); xmlListPopBack (xmlListPtr l);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlListPushFront (xmlListPtr l, xmlListPushFront (xmlListPtr l,
void *data); void *data);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlListPushBack (xmlListPtr l, xmlListPushBack (xmlListPtr l,
void *data); void *data);
/* Advanced Operators */ /* Advanced Operators */
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlListReverse (xmlListPtr l); xmlListReverse (xmlListPtr l);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlListSort (xmlListPtr l); xmlListSort (xmlListPtr l);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlListWalk (xmlListPtr l, xmlListWalk (xmlListPtr l,
xmlListWalker walker, xmlListWalker walker,
void *user); void *user);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlListReverseWalk (xmlListPtr l, xmlListReverseWalk (xmlListPtr l,
xmlListWalker walker, xmlListWalker walker,
void *user); void *user);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlListMerge (xmlListPtr l1, xmlListMerge (xmlListPtr l1,
xmlListPtr l2); xmlListPtr l2);
XMLPUBFUN xmlListPtr XMLCALL XMLPUBFUN xmlListPtr
xmlListDup (const xmlListPtr old); xmlListDup (const xmlListPtr old);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlListCopy (xmlListPtr cur, xmlListCopy (xmlListPtr cur,
const xmlListPtr old); const xmlListPtr old);
/* Link operators */ /* Link operators */
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlLinkGetData (xmlLinkPtr lk); xmlLinkGetData (xmlLinkPtr lk);
/* xmlListUnique() */ /* xmlListUnique() */
......
...@@ -80,52 +80,52 @@ typedef void (*ftpDataCallback) (void *userData, ...@@ -80,52 +80,52 @@ typedef void (*ftpDataCallback) (void *userData,
* Init * Init
*/ */
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlNanoFTPInit (void); xmlNanoFTPInit (void);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlNanoFTPCleanup (void); xmlNanoFTPCleanup (void);
/* /*
* Creating/freeing contexts. * Creating/freeing contexts.
*/ */
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlNanoFTPNewCtxt (const char *URL); xmlNanoFTPNewCtxt (const char *URL);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlNanoFTPFreeCtxt (void * ctx); xmlNanoFTPFreeCtxt (void * ctx);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlNanoFTPConnectTo (const char *server, xmlNanoFTPConnectTo (const char *server,
int port); int port);
/* /*
* Opening/closing session connections. * Opening/closing session connections.
*/ */
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlNanoFTPOpen (const char *URL); xmlNanoFTPOpen (const char *URL);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlNanoFTPConnect (void *ctx); xmlNanoFTPConnect (void *ctx);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlNanoFTPClose (void *ctx); xmlNanoFTPClose (void *ctx);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlNanoFTPQuit (void *ctx); xmlNanoFTPQuit (void *ctx);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlNanoFTPScanProxy (const char *URL); xmlNanoFTPScanProxy (const char *URL);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlNanoFTPProxy (const char *host, xmlNanoFTPProxy (const char *host,
int port, int port,
const char *user, const char *user,
const char *passwd, const char *passwd,
int type); int type);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlNanoFTPUpdateURL (void *ctx, xmlNanoFTPUpdateURL (void *ctx,
const char *URL); const char *URL);
...@@ -133,48 +133,48 @@ XMLPUBFUN int XMLCALL ...@@ -133,48 +133,48 @@ XMLPUBFUN int XMLCALL
* Rather internal commands. * Rather internal commands.
*/ */
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlNanoFTPGetResponse (void *ctx); xmlNanoFTPGetResponse (void *ctx);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlNanoFTPCheckResponse (void *ctx); xmlNanoFTPCheckResponse (void *ctx);
/* /*
* CD/DIR/GET handlers. * CD/DIR/GET handlers.
*/ */
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlNanoFTPCwd (void *ctx, xmlNanoFTPCwd (void *ctx,
const char *directory); const char *directory);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlNanoFTPDele (void *ctx, xmlNanoFTPDele (void *ctx,
const char *file); const char *file);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN SOCKET XMLCALL XMLPUBFUN SOCKET
xmlNanoFTPGetConnection (void *ctx); xmlNanoFTPGetConnection (void *ctx);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlNanoFTPCloseConnection(void *ctx); xmlNanoFTPCloseConnection(void *ctx);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlNanoFTPList (void *ctx, xmlNanoFTPList (void *ctx,
ftpListCallback callback, ftpListCallback callback,
void *userData, void *userData,
const char *filename); const char *filename);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN SOCKET XMLCALL XMLPUBFUN SOCKET
xmlNanoFTPGetSocket (void *ctx, xmlNanoFTPGetSocket (void *ctx,
const char *filename); const char *filename);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlNanoFTPGet (void *ctx, xmlNanoFTPGet (void *ctx,
ftpDataCallback callback, ftpDataCallback callback,
void *userData, void *userData,
const char *filename); const char *filename);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlNanoFTPRead (void *ctx, xmlNanoFTPRead (void *ctx,
void *dest, void *dest,
int len); int len);
......
...@@ -18,24 +18,24 @@ ...@@ -18,24 +18,24 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlNanoHTTPInit (void); xmlNanoHTTPInit (void);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlNanoHTTPCleanup (void); xmlNanoHTTPCleanup (void);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlNanoHTTPScanProxy (const char *URL); xmlNanoHTTPScanProxy (const char *URL);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlNanoHTTPFetch (const char *URL, xmlNanoHTTPFetch (const char *URL,
const char *filename, const char *filename,
char **contentType); char **contentType);
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlNanoHTTPMethod (const char *URL, xmlNanoHTTPMethod (const char *URL,
const char *method, const char *method,
const char *input, const char *input,
char **contentType, char **contentType,
const char *headers, const char *headers,
int ilen); int ilen);
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlNanoHTTPMethodRedir (const char *URL, xmlNanoHTTPMethodRedir (const char *URL,
const char *method, const char *method,
const char *input, const char *input,
...@@ -43,35 +43,35 @@ XMLPUBFUN void * XMLCALL ...@@ -43,35 +43,35 @@ XMLPUBFUN void * XMLCALL
char **redir, char **redir,
const char *headers, const char *headers,
int ilen); int ilen);
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlNanoHTTPOpen (const char *URL, xmlNanoHTTPOpen (const char *URL,
char **contentType); char **contentType);
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlNanoHTTPOpenRedir (const char *URL, xmlNanoHTTPOpenRedir (const char *URL,
char **contentType, char **contentType,
char **redir); char **redir);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlNanoHTTPReturnCode (void *ctx); xmlNanoHTTPReturnCode (void *ctx);
XMLPUBFUN const char * XMLCALL XMLPUBFUN const char *
xmlNanoHTTPAuthHeader (void *ctx); xmlNanoHTTPAuthHeader (void *ctx);
XMLPUBFUN const char * XMLCALL XMLPUBFUN const char *
xmlNanoHTTPRedir (void *ctx); xmlNanoHTTPRedir (void *ctx);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlNanoHTTPContentLength( void * ctx ); xmlNanoHTTPContentLength( void * ctx );
XMLPUBFUN const char * XMLCALL XMLPUBFUN const char *
xmlNanoHTTPEncoding (void *ctx); xmlNanoHTTPEncoding (void *ctx);
XMLPUBFUN const char * XMLCALL XMLPUBFUN const char *
xmlNanoHTTPMimeType (void *ctx); xmlNanoHTTPMimeType (void *ctx);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlNanoHTTPRead (void *ctx, xmlNanoHTTPRead (void *ctx,
void *dest, void *dest,
int len); int len);
#ifdef LIBXML_OUTPUT_ENABLED #ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlNanoHTTPSave (void *ctxt, xmlNanoHTTPSave (void *ctxt,
const char *filename); const char *filename);
#endif /* LIBXML_OUTPUT_ENABLED */ #endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlNanoHTTPClose (void *ctx); xmlNanoHTTPClose (void *ctx);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -43,18 +43,18 @@ typedef enum { ...@@ -43,18 +43,18 @@ typedef enum {
XML_PATTERN_XSFIELD = 1<<2 /* XPath subset for schema field */ XML_PATTERN_XSFIELD = 1<<2 /* XPath subset for schema field */
} xmlPatternFlags; } xmlPatternFlags;
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlFreePattern (xmlPatternPtr comp); xmlFreePattern (xmlPatternPtr comp);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlFreePatternList (xmlPatternPtr comp); xmlFreePatternList (xmlPatternPtr comp);
XMLPUBFUN xmlPatternPtr XMLCALL XMLPUBFUN xmlPatternPtr
xmlPatterncompile (const xmlChar *pattern, xmlPatterncompile (const xmlChar *pattern,
xmlDict *dict, xmlDict *dict,
int flags, int flags,
const xmlChar **namespaces); const xmlChar **namespaces);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlPatternMatch (xmlPatternPtr comp, xmlPatternMatch (xmlPatternPtr comp,
xmlNodePtr node); xmlNodePtr node);
...@@ -62,34 +62,34 @@ XMLPUBFUN int XMLCALL ...@@ -62,34 +62,34 @@ XMLPUBFUN int XMLCALL
typedef struct _xmlStreamCtxt xmlStreamCtxt; typedef struct _xmlStreamCtxt xmlStreamCtxt;
typedef xmlStreamCtxt *xmlStreamCtxtPtr; typedef xmlStreamCtxt *xmlStreamCtxtPtr;
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlPatternStreamable (xmlPatternPtr comp); xmlPatternStreamable (xmlPatternPtr comp);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlPatternMaxDepth (xmlPatternPtr comp); xmlPatternMaxDepth (xmlPatternPtr comp);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlPatternMinDepth (xmlPatternPtr comp); xmlPatternMinDepth (xmlPatternPtr comp);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlPatternFromRoot (xmlPatternPtr comp); xmlPatternFromRoot (xmlPatternPtr comp);
XMLPUBFUN xmlStreamCtxtPtr XMLCALL XMLPUBFUN xmlStreamCtxtPtr
xmlPatternGetStreamCtxt (xmlPatternPtr comp); xmlPatternGetStreamCtxt (xmlPatternPtr comp);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlFreeStreamCtxt (xmlStreamCtxtPtr stream); xmlFreeStreamCtxt (xmlStreamCtxtPtr stream);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlStreamPushNode (xmlStreamCtxtPtr stream, xmlStreamPushNode (xmlStreamCtxtPtr stream,
const xmlChar *name, const xmlChar *name,
const xmlChar *ns, const xmlChar *ns,
int nodeType); int nodeType);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlStreamPush (xmlStreamCtxtPtr stream, xmlStreamPush (xmlStreamCtxtPtr stream,
const xmlChar *name, const xmlChar *name,
const xmlChar *ns); const xmlChar *ns);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlStreamPushAttr (xmlStreamCtxtPtr stream, xmlStreamPushAttr (xmlStreamCtxtPtr stream,
const xmlChar *name, const xmlChar *name,
const xmlChar *ns); const xmlChar *ns);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlStreamPop (xmlStreamCtxtPtr stream); xmlStreamPop (xmlStreamCtxtPtr stream);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream); xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -116,95 +116,95 @@ typedef enum { ...@@ -116,95 +116,95 @@ typedef enum {
XML_RELAXNGP_CRNG = 2 XML_RELAXNGP_CRNG = 2
} xmlRelaxNGParserFlag; } xmlRelaxNGParserFlag;
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlRelaxNGInitTypes (void); xmlRelaxNGInitTypes (void);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlRelaxNGCleanupTypes (void); xmlRelaxNGCleanupTypes (void);
/* /*
* Interfaces for parsing. * Interfaces for parsing.
*/ */
XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL XMLPUBFUN xmlRelaxNGParserCtxtPtr
xmlRelaxNGNewParserCtxt (const char *URL); xmlRelaxNGNewParserCtxt (const char *URL);
XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL XMLPUBFUN xmlRelaxNGParserCtxtPtr
xmlRelaxNGNewMemParserCtxt (const char *buffer, xmlRelaxNGNewMemParserCtxt (const char *buffer,
int size); int size);
XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL XMLPUBFUN xmlRelaxNGParserCtxtPtr
xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc); xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt,
int flag); int flag);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt); xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc err, xmlRelaxNGValidityErrorFunc err,
xmlRelaxNGValidityWarningFunc warn, xmlRelaxNGValidityWarningFunc warn,
void *ctx); void *ctx);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc *err, xmlRelaxNGValidityErrorFunc *err,
xmlRelaxNGValidityWarningFunc *warn, xmlRelaxNGValidityWarningFunc *warn,
void **ctx); void **ctx);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlRelaxNGSetParserStructuredErrors( xmlRelaxNGSetParserStructuredErrors(
xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGParserCtxtPtr ctxt,
xmlStructuredErrorFunc serror, xmlStructuredErrorFunc serror,
void *ctx); void *ctx);
XMLPUBFUN xmlRelaxNGPtr XMLCALL XMLPUBFUN xmlRelaxNGPtr
xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt); xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlRelaxNGFree (xmlRelaxNGPtr schema); xmlRelaxNGFree (xmlRelaxNGPtr schema);
#ifdef LIBXML_OUTPUT_ENABLED #ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlRelaxNGDump (FILE *output, xmlRelaxNGDump (FILE *output,
xmlRelaxNGPtr schema); xmlRelaxNGPtr schema);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlRelaxNGDumpTree (FILE * output, xmlRelaxNGDumpTree (FILE * output,
xmlRelaxNGPtr schema); xmlRelaxNGPtr schema);
#endif /* LIBXML_OUTPUT_ENABLED */ #endif /* LIBXML_OUTPUT_ENABLED */
/* /*
* Interfaces for validating * Interfaces for validating
*/ */
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt, xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc err, xmlRelaxNGValidityErrorFunc err,
xmlRelaxNGValidityWarningFunc warn, xmlRelaxNGValidityWarningFunc warn,
void *ctx); void *ctx);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt, xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGValidityErrorFunc *err, xmlRelaxNGValidityErrorFunc *err,
xmlRelaxNGValidityWarningFunc *warn, xmlRelaxNGValidityWarningFunc *warn,
void **ctx); void **ctx);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt, xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror, void *ctx); xmlStructuredErrorFunc serror, void *ctx);
XMLPUBFUN xmlRelaxNGValidCtxtPtr XMLCALL XMLPUBFUN xmlRelaxNGValidCtxtPtr
xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema); xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt); xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt, xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc); xmlDocPtr doc);
/* /*
* Interfaces for progressive validation when possible * Interfaces for progressive validation when possible
*/ */
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt, xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc, xmlDocPtr doc,
xmlNodePtr elem); xmlNodePtr elem);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt, xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt,
const xmlChar *data, const xmlChar *data,
int len); int len);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt, xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc, xmlDocPtr doc,
xmlNodePtr elem); xmlNodePtr elem);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt, xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt,
xmlDocPtr doc, xmlDocPtr doc,
xmlNodePtr elem); xmlNodePtr elem);
......
...@@ -947,8 +947,8 @@ struct _xmlSchema { ...@@ -947,8 +947,8 @@ struct _xmlSchema {
void *volatiles; /* Obsolete */ void *volatiles; /* Obsolete */
}; };
XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type); XMLPUBFUN void xmlSchemaFreeType (xmlSchemaTypePtr type);
XMLPUBFUN void XMLCALL xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard); XMLPUBFUN void xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -36,52 +36,55 @@ typedef xmlRMutex *xmlRMutexPtr; ...@@ -36,52 +36,55 @@ typedef xmlRMutex *xmlRMutexPtr;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
XMLPUBFUN xmlMutexPtr XMLCALL XMLPUBFUN xmlMutexPtr
xmlNewMutex (void); xmlNewMutex (void);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlMutexLock (xmlMutexPtr tok); xmlMutexLock (xmlMutexPtr tok);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlMutexUnlock (xmlMutexPtr tok); xmlMutexUnlock (xmlMutexPtr tok);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlFreeMutex (xmlMutexPtr tok); xmlFreeMutex (xmlMutexPtr tok);
XMLPUBFUN xmlRMutexPtr XMLCALL XMLPUBFUN xmlRMutexPtr
xmlNewRMutex (void); xmlNewRMutex (void);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlRMutexLock (xmlRMutexPtr tok); xmlRMutexLock (xmlRMutexPtr tok);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlRMutexUnlock (xmlRMutexPtr tok); xmlRMutexUnlock (xmlRMutexPtr tok);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlFreeRMutex (xmlRMutexPtr tok); xmlFreeRMutex (xmlRMutexPtr tok);
/* /*
* Library wide APIs. * Library wide APIs.
*/ */
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlInitThreads (void); xmlInitThreads (void);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlLockLibrary (void); xmlLockLibrary (void);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlUnlockLibrary(void); xmlUnlockLibrary(void);
XMLPUBFUN int XMLCALL XML_DEPRECATED
XMLPUBFUN int
xmlGetThreadId (void); xmlGetThreadId (void);
XMLPUBFUN int XMLCALL XML_DEPRECATED
XMLPUBFUN int
xmlIsMainThread (void); xmlIsMainThread (void);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlCleanupThreads(void); xmlCleanupThreads(void);
XMLPUBFUN xmlGlobalStatePtr XMLCALL XML_DEPRECATED
XMLPUBFUN xmlGlobalStatePtr
xmlGetGlobalState(void); xmlGetGlobalState(void);
#ifdef HAVE_PTHREAD_H /** DOC_DISABLE */
#elif defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && (!defined(LIBXML_STATIC) || defined(LIBXML_STATIC_FOR_DLL)) #if defined(LIBXML_THREAD_ENABLED) && defined(_WIN32) && \
#if defined(LIBXML_STATIC_FOR_DLL) !defined(HAVE_COMPILER_TLS) && defined(LIBXML_STATIC_FOR_DLL)
int XMLCALL int
xmlDllMain(void *hinstDLL, unsigned long fdwReason, xmlDllMain(void *hinstDLL, unsigned long fdwReason,
void *lpvReserved); void *lpvReserved);
#endif #endif
#endif /** DOC_ENABLE */
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -49,43 +49,43 @@ struct _xmlURI { ...@@ -49,43 +49,43 @@ struct _xmlURI {
* xmlChar * xmlNodeGetBase (xmlDocPtr doc, * xmlChar * xmlNodeGetBase (xmlDocPtr doc,
* xmlNodePtr cur); * xmlNodePtr cur);
*/ */
XMLPUBFUN xmlURIPtr XMLCALL XMLPUBFUN xmlURIPtr
xmlCreateURI (void); xmlCreateURI (void);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlBuildURI (const xmlChar *URI, xmlBuildURI (const xmlChar *URI,
const xmlChar *base); const xmlChar *base);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlBuildRelativeURI (const xmlChar *URI, xmlBuildRelativeURI (const xmlChar *URI,
const xmlChar *base); const xmlChar *base);
XMLPUBFUN xmlURIPtr XMLCALL XMLPUBFUN xmlURIPtr
xmlParseURI (const char *str); xmlParseURI (const char *str);
XMLPUBFUN xmlURIPtr XMLCALL XMLPUBFUN xmlURIPtr
xmlParseURIRaw (const char *str, xmlParseURIRaw (const char *str,
int raw); int raw);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlParseURIReference (xmlURIPtr uri, xmlParseURIReference (xmlURIPtr uri,
const char *str); const char *str);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlSaveUri (xmlURIPtr uri); xmlSaveUri (xmlURIPtr uri);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlPrintURI (FILE *stream, xmlPrintURI (FILE *stream,
xmlURIPtr uri); xmlURIPtr uri);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlURIEscapeStr (const xmlChar *str, xmlURIEscapeStr (const xmlChar *str,
const xmlChar *list); const xmlChar *list);
XMLPUBFUN char * XMLCALL XMLPUBFUN char *
xmlURIUnescapeString (const char *str, xmlURIUnescapeString (const char *str,
int len, int len,
char *target); char *target);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlNormalizeURIPath (char *path); xmlNormalizeURIPath (char *path);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlURIEscape (const xmlChar *str); xmlURIEscape (const xmlChar *str);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlFreeURI (xmlURIPtr uri); xmlFreeURI (xmlURIPtr uri);
XMLPUBFUN xmlChar* XMLCALL XMLPUBFUN xmlChar*
xmlCanonicPath (const xmlChar *path); xmlCanonicPath (const xmlChar *path);
XMLPUBFUN xmlChar* XMLCALL XMLPUBFUN xmlChar*
xmlPathToURI (const xmlChar *path); xmlPathToURI (const xmlChar *path);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -89,35 +89,35 @@ typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr; ...@@ -89,35 +89,35 @@ typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
/* /*
* standalone processing * standalone processing
*/ */
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlXIncludeProcess (xmlDocPtr doc); xmlXIncludeProcess (xmlDocPtr doc);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlXIncludeProcessFlags (xmlDocPtr doc, xmlXIncludeProcessFlags (xmlDocPtr doc,
int flags); int flags);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlXIncludeProcessFlagsData(xmlDocPtr doc, xmlXIncludeProcessFlagsData(xmlDocPtr doc,
int flags, int flags,
void *data); void *data);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree, xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree,
int flags, int flags,
void *data); void *data);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlXIncludeProcessTree (xmlNodePtr tree); xmlXIncludeProcessTree (xmlNodePtr tree);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlXIncludeProcessTreeFlags(xmlNodePtr tree, xmlXIncludeProcessTreeFlags(xmlNodePtr tree,
int flags); int flags);
/* /*
* contextual processing * contextual processing
*/ */
XMLPUBFUN xmlXIncludeCtxtPtr XMLCALL XMLPUBFUN xmlXIncludeCtxtPtr
xmlXIncludeNewContext (xmlDocPtr doc); xmlXIncludeNewContext (xmlDocPtr doc);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt, xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
int flags); int flags);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt); xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt, xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
xmlNodePtr tree); xmlNodePtr tree);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -11,11 +11,11 @@ ...@@ -11,11 +11,11 @@
#define __XML_AUTOMATA_H__ #define __XML_AUTOMATA_H__
#include <libxml/xmlversion.h> #include <libxml/xmlversion.h>
#include <libxml/tree.h>
#ifdef LIBXML_REGEXP_ENABLED #ifdef LIBXML_REGEXP_ENABLED
#ifdef LIBXML_AUTOMATA_ENABLED #ifdef LIBXML_AUTOMATA_ENABLED
#include <libxml/xmlregexp.h>
#include <libxml/xmlstring.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -40,32 +40,32 @@ typedef xmlAutomataState *xmlAutomataStatePtr; ...@@ -40,32 +40,32 @@ typedef xmlAutomataState *xmlAutomataStatePtr;
/* /*
* Building API * Building API
*/ */
XMLPUBFUN xmlAutomataPtr XMLCALL XMLPUBFUN xmlAutomataPtr
xmlNewAutomata (void); xmlNewAutomata (void);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlFreeAutomata (xmlAutomataPtr am); xmlFreeAutomata (xmlAutomataPtr am);
XMLPUBFUN xmlAutomataStatePtr XMLCALL XMLPUBFUN xmlAutomataStatePtr
xmlAutomataGetInitState (xmlAutomataPtr am); xmlAutomataGetInitState (xmlAutomataPtr am);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlAutomataSetFinalState (xmlAutomataPtr am, xmlAutomataSetFinalState (xmlAutomataPtr am,
xmlAutomataStatePtr state); xmlAutomataStatePtr state);
XMLPUBFUN xmlAutomataStatePtr XMLCALL XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewState (xmlAutomataPtr am); xmlAutomataNewState (xmlAutomataPtr am);
XMLPUBFUN xmlAutomataStatePtr XMLCALL XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewTransition (xmlAutomataPtr am, xmlAutomataNewTransition (xmlAutomataPtr am,
xmlAutomataStatePtr from, xmlAutomataStatePtr from,
xmlAutomataStatePtr to, xmlAutomataStatePtr to,
const xmlChar *token, const xmlChar *token,
void *data); void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewTransition2 (xmlAutomataPtr am, xmlAutomataNewTransition2 (xmlAutomataPtr am,
xmlAutomataStatePtr from, xmlAutomataStatePtr from,
xmlAutomataStatePtr to, xmlAutomataStatePtr to,
const xmlChar *token, const xmlChar *token,
const xmlChar *token2, const xmlChar *token2,
void *data); void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewNegTrans (xmlAutomataPtr am, xmlAutomataNewNegTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from, xmlAutomataStatePtr from,
xmlAutomataStatePtr to, xmlAutomataStatePtr to,
...@@ -73,7 +73,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL ...@@ -73,7 +73,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
const xmlChar *token2, const xmlChar *token2,
void *data); void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewCountTrans (xmlAutomataPtr am, xmlAutomataNewCountTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from, xmlAutomataStatePtr from,
xmlAutomataStatePtr to, xmlAutomataStatePtr to,
...@@ -81,7 +81,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL ...@@ -81,7 +81,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
int min, int min,
int max, int max,
void *data); void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewCountTrans2 (xmlAutomataPtr am, xmlAutomataNewCountTrans2 (xmlAutomataPtr am,
xmlAutomataStatePtr from, xmlAutomataStatePtr from,
xmlAutomataStatePtr to, xmlAutomataStatePtr to,
...@@ -90,7 +90,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL ...@@ -90,7 +90,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
int min, int min,
int max, int max,
void *data); void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewOnceTrans (xmlAutomataPtr am, xmlAutomataNewOnceTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from, xmlAutomataStatePtr from,
xmlAutomataStatePtr to, xmlAutomataStatePtr to,
...@@ -98,7 +98,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL ...@@ -98,7 +98,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
int min, int min,
int max, int max,
void *data); void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewOnceTrans2 (xmlAutomataPtr am, xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
xmlAutomataStatePtr from, xmlAutomataStatePtr from,
xmlAutomataStatePtr to, xmlAutomataStatePtr to,
...@@ -107,33 +107,33 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL ...@@ -107,33 +107,33 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
int min, int min,
int max, int max,
void *data); void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewAllTrans (xmlAutomataPtr am, xmlAutomataNewAllTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from, xmlAutomataStatePtr from,
xmlAutomataStatePtr to, xmlAutomataStatePtr to,
int lax); int lax);
XMLPUBFUN xmlAutomataStatePtr XMLCALL XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewEpsilon (xmlAutomataPtr am, xmlAutomataNewEpsilon (xmlAutomataPtr am,
xmlAutomataStatePtr from, xmlAutomataStatePtr from,
xmlAutomataStatePtr to); xmlAutomataStatePtr to);
XMLPUBFUN xmlAutomataStatePtr XMLCALL XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewCountedTrans (xmlAutomataPtr am, xmlAutomataNewCountedTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from, xmlAutomataStatePtr from,
xmlAutomataStatePtr to, xmlAutomataStatePtr to,
int counter); int counter);
XMLPUBFUN xmlAutomataStatePtr XMLCALL XMLPUBFUN xmlAutomataStatePtr
xmlAutomataNewCounterTrans (xmlAutomataPtr am, xmlAutomataNewCounterTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from, xmlAutomataStatePtr from,
xmlAutomataStatePtr to, xmlAutomataStatePtr to,
int counter); int counter);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlAutomataNewCounter (xmlAutomataPtr am, xmlAutomataNewCounter (xmlAutomataPtr am,
int min, int min,
int max); int max);
XMLPUBFUN xmlRegexpPtr XMLCALL XMLPUBFUN struct _xmlRegexp *
xmlAutomataCompile (xmlAutomataPtr am); xmlAutomataCompile (xmlAutomataPtr am);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlAutomataIsDeterminist (xmlAutomataPtr am); xmlAutomataIsDeterminist (xmlAutomataPtr am);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -855,19 +855,20 @@ typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx, ...@@ -855,19 +855,20 @@ typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx,
* Signature of the function to use when there is an error and * Signature of the function to use when there is an error and
* the module handles the new error reporting mechanism. * the module handles the new error reporting mechanism.
*/ */
typedef void (XMLCALL *xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error); typedef void (*xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
/* /*
* Use the following function to reset the two global variables * Use the following function to reset the two global variables
* xmlGenericError and xmlGenericErrorContext. * xmlGenericError and xmlGenericErrorContext.
*/ */
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSetGenericErrorFunc (void *ctx, xmlSetGenericErrorFunc (void *ctx,
xmlGenericErrorFunc handler); xmlGenericErrorFunc handler);
XMLPUBFUN void XMLCALL XML_DEPRECATED
XMLPUBFUN void
initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler); initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSetStructuredErrorFunc (void *ctx, xmlSetStructuredErrorFunc (void *ctx,
xmlStructuredErrorFunc handler); xmlStructuredErrorFunc handler);
/* /*
...@@ -890,57 +891,28 @@ XMLPUBFUN void XMLCDECL ...@@ -890,57 +891,28 @@ XMLPUBFUN void XMLCDECL
xmlParserValidityWarning (void *ctx, xmlParserValidityWarning (void *ctx,
const char *msg, const char *msg,
...) LIBXML_ATTR_FORMAT(2,3); ...) LIBXML_ATTR_FORMAT(2,3);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlParserPrintFileInfo (xmlParserInputPtr input); xmlParserPrintFileInfo (xmlParserInputPtr input);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlParserPrintFileContext (xmlParserInputPtr input); xmlParserPrintFileContext (xmlParserInputPtr input);
/* /*
* Extended error information routines * Extended error information routines
*/ */
XMLPUBFUN xmlErrorPtr XMLCALL XMLPUBFUN xmlErrorPtr
xmlGetLastError (void); xmlGetLastError (void);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlResetLastError (void); xmlResetLastError (void);
XMLPUBFUN xmlErrorPtr XMLCALL XMLPUBFUN xmlErrorPtr
xmlCtxtGetLastError (void *ctx); xmlCtxtGetLastError (void *ctx);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlCtxtResetLastError (void *ctx); xmlCtxtResetLastError (void *ctx);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlResetError (xmlErrorPtr err); xmlResetError (xmlErrorPtr err);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlCopyError (xmlErrorPtr from, xmlCopyError (xmlErrorPtr from,
xmlErrorPtr to); xmlErrorPtr to);
#ifdef IN_LIBXML
/*
* Internal callback reporting routine
*/
XMLPUBFUN void XMLCDECL
__xmlRaiseError (xmlStructuredErrorFunc schannel,
xmlGenericErrorFunc channel,
void *data,
void *ctx,
void *node,
int domain,
int code,
xmlErrorLevel level,
const char *file,
int line,
const char *str1,
const char *str2,
const char *str3,
int int1,
int col,
const char *msg,
...) LIBXML_ATTR_FORMAT(16,17);
XMLPUBFUN void XMLCALL
__xmlSimpleError (int domain,
int code,
xmlNodePtr node,
const char *msg,
const char *extra) LIBXML_ATTR_FORMAT(4,0);
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
...@@ -8,52 +8,19 @@ ...@@ -8,52 +8,19 @@
#ifndef __XML_EXPORTS_H__ #ifndef __XML_EXPORTS_H__
#define __XML_EXPORTS_H__ #define __XML_EXPORTS_H__
#if defined(_WIN32) || defined(__CYGWIN__)
/** DOC_DISABLE */ /** DOC_DISABLE */
#if defined(_WIN32) || defined(__CYGWIN__)
#include <windef.h> #ifdef LIBXML_STATIC
#define XMLPUBLIC
#ifdef LIBXML_STATIC #elif defined(IN_LIBXML)
#define XMLPUBLIC #define XMLPUBLIC __declspec(dllexport)
#elif defined(IN_LIBXML) #else
#define XMLPUBLIC __declspec(dllexport) #define XMLPUBLIC __declspec(dllimport)
#else #endif
#define XMLPUBLIC __declspec(dllimport)
#endif
#if defined(LIBXML_FASTCALL)
#define XMLCALL __fastcall
#else
#define XMLCALL __cdecl
#endif
#define XMLCDECL WINAPIV
/** DOC_ENABLE */
#else /* not Windows */ #else /* not Windows */
#define XMLPUBLIC
/**
* XMLPUBLIC:
*
* Macro which declares a public symbol
*/
#define XMLPUBLIC
/**
* XMLCALL:
*
* Macro which declares the calling convention for exported functions
*/
#define XMLCALL
/**
* XMLCDECL:
*
* Macro which declares the calling convention for exported functions that
* use '...'.
*/
#define XMLCDECL
#endif /* platform switch */ #endif /* platform switch */
/** DOC_ENABLE */
/* /*
* XMLPUBFUN: * XMLPUBFUN:
...@@ -69,10 +36,14 @@ ...@@ -69,10 +36,14 @@
*/ */
#define XMLPUBVAR XMLPUBLIC extern #define XMLPUBVAR XMLPUBLIC extern
/** DOC_DISABLE */
/* Compatibility */ /* Compatibility */
#define XMLCALL
#define XMLCDECL WINAPIV
#if !defined(LIBXML_DLL_IMPORT) #if !defined(LIBXML_DLL_IMPORT)
#define LIBXML_DLL_IMPORT XMLPUBVAR #define LIBXML_DLL_IMPORT XMLPUBVAR
#endif #endif
/** DOC_ENABLE */
#endif /* __XML_EXPORTS_H__ */ #endif /* __XML_EXPORTS_H__ */
......
...@@ -54,7 +54,7 @@ extern "C" { ...@@ -54,7 +54,7 @@ extern "C" {
* *
* Signature for a free() implementation. * Signature for a free() implementation.
*/ */
typedef void (XMLCALL *xmlFreeFunc)(void *mem); typedef void (*xmlFreeFunc)(void *mem);
/** /**
* xmlMallocFunc: * xmlMallocFunc:
* @size: the size requested in bytes * @size: the size requested in bytes
...@@ -63,7 +63,7 @@ typedef void (XMLCALL *xmlFreeFunc)(void *mem); ...@@ -63,7 +63,7 @@ typedef void (XMLCALL *xmlFreeFunc)(void *mem);
* *
* 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 *(LIBXML_ATTR_ALLOC_SIZE(1) XMLCALL *xmlMallocFunc)(size_t size); typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) *xmlMallocFunc)(size_t size);
/** /**
* xmlReallocFunc: * xmlReallocFunc:
...@@ -74,7 +74,7 @@ typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) XMLCALL *xmlMallocFunc)(size_t size); ...@@ -74,7 +74,7 @@ typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) XMLCALL *xmlMallocFunc)(size_t size);
* *
* 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 *(XMLCALL *xmlReallocFunc)(void *mem, size_t size); typedef void *(*xmlReallocFunc)(void *mem, size_t size);
/** /**
* xmlStrdupFunc: * xmlStrdupFunc:
...@@ -84,7 +84,7 @@ typedef void *(XMLCALL *xmlReallocFunc)(void *mem, size_t size); ...@@ -84,7 +84,7 @@ typedef void *(XMLCALL *xmlReallocFunc)(void *mem, size_t size);
* *
* 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 *(XMLCALL *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.
...@@ -100,23 +100,23 @@ LIBXML_DLL_IMPORT xmlStrdupFunc xmlMemStrdup; ...@@ -100,23 +100,23 @@ LIBXML_DLL_IMPORT xmlStrdupFunc xmlMemStrdup;
* The xmlGc function have an extra entry for atomic block * The xmlGc function have an extra entry for atomic block
* allocations useful for garbage collected memory allocators * allocations useful for garbage collected memory allocators
*/ */
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlMemSetup (xmlFreeFunc freeFunc, xmlMemSetup (xmlFreeFunc freeFunc,
xmlMallocFunc mallocFunc, xmlMallocFunc mallocFunc,
xmlReallocFunc reallocFunc, xmlReallocFunc reallocFunc,
xmlStrdupFunc strdupFunc); xmlStrdupFunc strdupFunc);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlMemGet (xmlFreeFunc *freeFunc, xmlMemGet (xmlFreeFunc *freeFunc,
xmlMallocFunc *mallocFunc, xmlMallocFunc *mallocFunc,
xmlReallocFunc *reallocFunc, xmlReallocFunc *reallocFunc,
xmlStrdupFunc *strdupFunc); xmlStrdupFunc *strdupFunc);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlGcMemSetup (xmlFreeFunc freeFunc, xmlGcMemSetup (xmlFreeFunc freeFunc,
xmlMallocFunc mallocFunc, xmlMallocFunc mallocFunc,
xmlMallocFunc mallocAtomicFunc, xmlMallocFunc mallocAtomicFunc,
xmlReallocFunc reallocFunc, xmlReallocFunc reallocFunc,
xmlStrdupFunc strdupFunc); xmlStrdupFunc strdupFunc);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlGcMemGet (xmlFreeFunc *freeFunc, xmlGcMemGet (xmlFreeFunc *freeFunc,
xmlMallocFunc *mallocFunc, xmlMallocFunc *mallocFunc,
xmlMallocFunc *mallocAtomicFunc, xmlMallocFunc *mallocAtomicFunc,
...@@ -127,45 +127,47 @@ XMLPUBFUN int XMLCALL ...@@ -127,45 +127,47 @@ XMLPUBFUN int XMLCALL
* Initialization of the memory layer. * Initialization of the memory layer.
*/ */
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlInitMemory (void); xmlInitMemory (void);
/* /*
* Cleanup of the memory layer. * Cleanup of the memory layer.
*/ */
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlCleanupMemory (void); xmlCleanupMemory (void);
/* /*
* These are specific to the XML debug memory wrapper. * These are specific to the XML debug memory wrapper.
*/ */
XMLPUBFUN int XMLCALL XMLPUBFUN size_t
xmlMemSize (void *ptr);
XMLPUBFUN int
xmlMemUsed (void); xmlMemUsed (void);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlMemBlocks (void); xmlMemBlocks (void);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlMemDisplay (FILE *fp); xmlMemDisplay (FILE *fp);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlMemDisplayLast(FILE *fp, long nbBytes); xmlMemDisplayLast(FILE *fp, long nbBytes);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlMemShow (FILE *fp, int nr); xmlMemShow (FILE *fp, int nr);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlMemoryDump (void); xmlMemoryDump (void);
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlMemMalloc (size_t size) LIBXML_ATTR_ALLOC_SIZE(1); xmlMemMalloc (size_t size) LIBXML_ATTR_ALLOC_SIZE(1);
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlMemRealloc (void *ptr,size_t size); xmlMemRealloc (void *ptr,size_t size);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlMemFree (void *ptr); xmlMemFree (void *ptr);
XMLPUBFUN char * XMLCALL XMLPUBFUN char *
xmlMemoryStrdup (const char *str); xmlMemoryStrdup (const char *str);
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlMallocLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1); xmlMallocLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlReallocLoc (void *ptr, size_t size, const char *file, int line); xmlReallocLoc (void *ptr, size_t size, const char *file, int line);
XMLPUBFUN void * XMLCALL XMLPUBFUN void *
xmlMallocAtomicLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1); xmlMallocAtomicLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
XMLPUBFUN char * XMLCALL XMLPUBFUN char *
xmlMemStrdupLoc (const char *str, const char *file, int line); xmlMemStrdupLoc (const char *str, const char *file, int line);
......
...@@ -48,16 +48,16 @@ extern "C" { ...@@ -48,16 +48,16 @@ extern "C" {
/* /*
* The POSIX like API * The POSIX like API
*/ */
XMLPUBFUN xmlRegexpPtr XMLCALL XMLPUBFUN xmlRegexpPtr
xmlRegexpCompile (const xmlChar *regexp); xmlRegexpCompile (const xmlChar *regexp);
XMLPUBFUN void XMLCALL xmlRegFreeRegexp(xmlRegexpPtr regexp); XMLPUBFUN void xmlRegFreeRegexp(xmlRegexpPtr regexp);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlRegexpExec (xmlRegexpPtr comp, xmlRegexpExec (xmlRegexpPtr comp,
const xmlChar *value); const xmlChar *value);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlRegexpPrint (FILE *output, xmlRegexpPrint (FILE *output,
xmlRegexpPtr regexp); xmlRegexpPtr regexp);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlRegexpIsDeterminist(xmlRegexpPtr comp); xmlRegexpIsDeterminist(xmlRegexpPtr comp);
/** /**
...@@ -77,29 +77,29 @@ typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec, ...@@ -77,29 +77,29 @@ typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
/* /*
* The progressive API * The progressive API
*/ */
XMLPUBFUN xmlRegExecCtxtPtr XMLCALL XMLPUBFUN xmlRegExecCtxtPtr
xmlRegNewExecCtxt (xmlRegexpPtr comp, xmlRegNewExecCtxt (xmlRegexpPtr comp,
xmlRegExecCallbacks callback, xmlRegExecCallbacks callback,
void *data); void *data);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec); xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlRegExecPushString(xmlRegExecCtxtPtr exec, xmlRegExecPushString(xmlRegExecCtxtPtr exec,
const xmlChar *value, const xmlChar *value,
void *data); void *data);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlRegExecPushString2(xmlRegExecCtxtPtr exec, xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
const xmlChar *value, const xmlChar *value,
const xmlChar *value2, const xmlChar *value2,
void *data); void *data);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlRegExecNextValues(xmlRegExecCtxtPtr exec, xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
int *nbval, int *nbval,
int *nbneg, int *nbneg,
xmlChar **values, xmlChar **values,
int *terminal); int *terminal);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlRegExecErrInfo (xmlRegExecCtxtPtr exec, xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
const xmlChar **string, const xmlChar **string,
int *nbval, int *nbval,
...@@ -116,15 +116,15 @@ XMLPUBFUN int XMLCALL ...@@ -116,15 +116,15 @@ XMLPUBFUN int XMLCALL
typedef struct _xmlExpCtxt xmlExpCtxt; typedef struct _xmlExpCtxt xmlExpCtxt;
typedef xmlExpCtxt *xmlExpCtxtPtr; typedef xmlExpCtxt *xmlExpCtxtPtr;
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlExpFreeCtxt (xmlExpCtxtPtr ctxt); xmlExpFreeCtxt (xmlExpCtxtPtr ctxt);
XMLPUBFUN xmlExpCtxtPtr XMLCALL XMLPUBFUN xmlExpCtxtPtr
xmlExpNewCtxt (int maxNodes, xmlExpNewCtxt (int maxNodes,
xmlDictPtr dict); xmlDictPtr dict);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt); xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt); xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt);
/* Expressions are trees but the tree is opaque */ /* Expressions are trees but the tree is opaque */
...@@ -150,31 +150,31 @@ XMLPUBVAR xmlExpNodePtr emptyExp; ...@@ -150,31 +150,31 @@ XMLPUBVAR xmlExpNodePtr emptyExp;
/* /*
* Expressions are reference counted internally * Expressions are reference counted internally
*/ */
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlExpFree (xmlExpCtxtPtr ctxt, xmlExpFree (xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr); xmlExpNodePtr expr);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlExpRef (xmlExpNodePtr expr); xmlExpRef (xmlExpNodePtr expr);
/* /*
* constructors can be either manual or from a string * constructors can be either manual or from a string
*/ */
XMLPUBFUN xmlExpNodePtr XMLCALL XMLPUBFUN xmlExpNodePtr
xmlExpParse (xmlExpCtxtPtr ctxt, xmlExpParse (xmlExpCtxtPtr ctxt,
const char *expr); const char *expr);
XMLPUBFUN xmlExpNodePtr XMLCALL XMLPUBFUN xmlExpNodePtr
xmlExpNewAtom (xmlExpCtxtPtr ctxt, xmlExpNewAtom (xmlExpCtxtPtr ctxt,
const xmlChar *name, const xmlChar *name,
int len); int len);
XMLPUBFUN xmlExpNodePtr XMLCALL XMLPUBFUN xmlExpNodePtr
xmlExpNewOr (xmlExpCtxtPtr ctxt, xmlExpNewOr (xmlExpCtxtPtr ctxt,
xmlExpNodePtr left, xmlExpNodePtr left,
xmlExpNodePtr right); xmlExpNodePtr right);
XMLPUBFUN xmlExpNodePtr XMLCALL XMLPUBFUN xmlExpNodePtr
xmlExpNewSeq (xmlExpCtxtPtr ctxt, xmlExpNewSeq (xmlExpCtxtPtr ctxt,
xmlExpNodePtr left, xmlExpNodePtr left,
xmlExpNodePtr right); xmlExpNodePtr right);
XMLPUBFUN xmlExpNodePtr XMLCALL XMLPUBFUN xmlExpNodePtr
xmlExpNewRange (xmlExpCtxtPtr ctxt, xmlExpNewRange (xmlExpCtxtPtr ctxt,
xmlExpNodePtr subset, xmlExpNodePtr subset,
int min, int min,
...@@ -182,34 +182,34 @@ XMLPUBFUN xmlExpNodePtr XMLCALL ...@@ -182,34 +182,34 @@ XMLPUBFUN xmlExpNodePtr XMLCALL
/* /*
* The really interesting APIs * The really interesting APIs
*/ */
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlExpIsNillable(xmlExpNodePtr expr); xmlExpIsNillable(xmlExpNodePtr expr);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlExpMaxToken (xmlExpNodePtr expr); xmlExpMaxToken (xmlExpNodePtr expr);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlExpGetLanguage(xmlExpCtxtPtr ctxt, xmlExpGetLanguage(xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr, xmlExpNodePtr expr,
const xmlChar**langList, const xmlChar**langList,
int len); int len);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlExpGetStart (xmlExpCtxtPtr ctxt, xmlExpGetStart (xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr, xmlExpNodePtr expr,
const xmlChar**tokList, const xmlChar**tokList,
int len); int len);
XMLPUBFUN xmlExpNodePtr XMLCALL XMLPUBFUN xmlExpNodePtr
xmlExpStringDerive(xmlExpCtxtPtr ctxt, xmlExpStringDerive(xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr, xmlExpNodePtr expr,
const xmlChar *str, const xmlChar *str,
int len); int len);
XMLPUBFUN xmlExpNodePtr XMLCALL XMLPUBFUN xmlExpNodePtr
xmlExpExpDerive (xmlExpCtxtPtr ctxt, xmlExpExpDerive (xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr, xmlExpNodePtr expr,
xmlExpNodePtr sub); xmlExpNodePtr sub);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlExpSubsume (xmlExpCtxtPtr ctxt, xmlExpSubsume (xmlExpCtxtPtr ctxt,
xmlExpNodePtr expr, xmlExpNodePtr expr,
xmlExpNodePtr sub); xmlExpNodePtr sub);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlExpDump (xmlBufferPtr buf, xmlExpDump (xmlBufferPtr buf,
xmlExpNodePtr expr); xmlExpNodePtr expr);
#endif /* LIBXML_EXPR_ENABLED */ #endif /* LIBXML_EXPR_ENABLED */
......
...@@ -41,42 +41,42 @@ typedef enum { ...@@ -41,42 +41,42 @@ typedef enum {
typedef struct _xmlSaveCtxt xmlSaveCtxt; typedef struct _xmlSaveCtxt xmlSaveCtxt;
typedef xmlSaveCtxt *xmlSaveCtxtPtr; typedef xmlSaveCtxt *xmlSaveCtxtPtr;
XMLPUBFUN xmlSaveCtxtPtr XMLCALL XMLPUBFUN xmlSaveCtxtPtr
xmlSaveToFd (int fd, xmlSaveToFd (int fd,
const char *encoding, const char *encoding,
int options); int options);
XMLPUBFUN xmlSaveCtxtPtr XMLCALL XMLPUBFUN xmlSaveCtxtPtr
xmlSaveToFilename (const char *filename, xmlSaveToFilename (const char *filename,
const char *encoding, const char *encoding,
int options); int options);
XMLPUBFUN xmlSaveCtxtPtr XMLCALL XMLPUBFUN xmlSaveCtxtPtr
xmlSaveToBuffer (xmlBufferPtr buffer, xmlSaveToBuffer (xmlBufferPtr buffer,
const char *encoding, const char *encoding,
int options); int options);
XMLPUBFUN xmlSaveCtxtPtr XMLCALL XMLPUBFUN xmlSaveCtxtPtr
xmlSaveToIO (xmlOutputWriteCallback iowrite, xmlSaveToIO (xmlOutputWriteCallback iowrite,
xmlOutputCloseCallback ioclose, xmlOutputCloseCallback ioclose,
void *ioctx, void *ioctx,
const char *encoding, const char *encoding,
int options); int options);
XMLPUBFUN long XMLCALL XMLPUBFUN long
xmlSaveDoc (xmlSaveCtxtPtr ctxt, xmlSaveDoc (xmlSaveCtxtPtr ctxt,
xmlDocPtr doc); xmlDocPtr doc);
XMLPUBFUN long XMLCALL XMLPUBFUN long
xmlSaveTree (xmlSaveCtxtPtr ctxt, xmlSaveTree (xmlSaveCtxtPtr ctxt,
xmlNodePtr node); xmlNodePtr node);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSaveFlush (xmlSaveCtxtPtr ctxt); xmlSaveFlush (xmlSaveCtxtPtr ctxt);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSaveClose (xmlSaveCtxtPtr ctxt); xmlSaveClose (xmlSaveCtxtPtr ctxt);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSaveSetEscape (xmlSaveCtxtPtr ctxt, xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
xmlCharEncodingOutputFunc escape); xmlCharEncodingOutputFunc escape);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt, xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
xmlCharEncodingOutputFunc escape); xmlCharEncodingOutputFunc escape);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -134,89 +134,89 @@ typedef int (XMLCDECL *xmlSchemaValidityLocatorFunc) (void *ctx, ...@@ -134,89 +134,89 @@ typedef int (XMLCDECL *xmlSchemaValidityLocatorFunc) (void *ctx,
/* /*
* Interfaces for parsing. * Interfaces for parsing.
*/ */
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL XMLPUBFUN xmlSchemaParserCtxtPtr
xmlSchemaNewParserCtxt (const char *URL); xmlSchemaNewParserCtxt (const char *URL);
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL XMLPUBFUN xmlSchemaParserCtxtPtr
xmlSchemaNewMemParserCtxt (const char *buffer, xmlSchemaNewMemParserCtxt (const char *buffer,
int size); int size);
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL XMLPUBFUN xmlSchemaParserCtxtPtr
xmlSchemaNewDocParserCtxt (xmlDocPtr doc); xmlSchemaNewDocParserCtxt (xmlDocPtr doc);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt); xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSchemaSetParserErrors (xmlSchemaParserCtxtPtr ctxt, xmlSchemaSetParserErrors (xmlSchemaParserCtxtPtr ctxt,
xmlSchemaValidityErrorFunc err, xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn, xmlSchemaValidityWarningFunc warn,
void *ctx); void *ctx);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt, xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
xmlStructuredErrorFunc serror, xmlStructuredErrorFunc serror,
void *ctx); void *ctx);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt, xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
xmlSchemaValidityErrorFunc * err, xmlSchemaValidityErrorFunc * err,
xmlSchemaValidityWarningFunc * warn, xmlSchemaValidityWarningFunc * warn,
void **ctx); void **ctx);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt); xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt);
XMLPUBFUN xmlSchemaPtr XMLCALL XMLPUBFUN xmlSchemaPtr
xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt); xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSchemaFree (xmlSchemaPtr schema); xmlSchemaFree (xmlSchemaPtr schema);
#ifdef LIBXML_OUTPUT_ENABLED #ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSchemaDump (FILE *output, xmlSchemaDump (FILE *output,
xmlSchemaPtr schema); xmlSchemaPtr schema);
#endif /* LIBXML_OUTPUT_ENABLED */ #endif /* LIBXML_OUTPUT_ENABLED */
/* /*
* Interfaces for validating * Interfaces for validating
*/ */
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt, xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt,
xmlSchemaValidityErrorFunc err, xmlSchemaValidityErrorFunc err,
xmlSchemaValidityWarningFunc warn, xmlSchemaValidityWarningFunc warn,
void *ctx); void *ctx);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt, xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
xmlStructuredErrorFunc serror, xmlStructuredErrorFunc serror,
void *ctx); void *ctx);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt, xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
xmlSchemaValidityErrorFunc *err, xmlSchemaValidityErrorFunc *err,
xmlSchemaValidityWarningFunc *warn, xmlSchemaValidityWarningFunc *warn,
void **ctx); void **ctx);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaSetValidOptions (xmlSchemaValidCtxtPtr ctxt, xmlSchemaSetValidOptions (xmlSchemaValidCtxtPtr ctxt,
int options); int options);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSchemaValidateSetFilename(xmlSchemaValidCtxtPtr vctxt, xmlSchemaValidateSetFilename(xmlSchemaValidCtxtPtr vctxt,
const char *filename); const char *filename);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt); xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt);
XMLPUBFUN xmlSchemaValidCtxtPtr XMLCALL XMLPUBFUN xmlSchemaValidCtxtPtr
xmlSchemaNewValidCtxt (xmlSchemaPtr schema); xmlSchemaNewValidCtxt (xmlSchemaPtr schema);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt); xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt, xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
xmlDocPtr instance); xmlDocPtr instance);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt, xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
xmlNodePtr elem); xmlNodePtr elem);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt, xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
xmlParserInputBufferPtr input, xmlParserInputBufferPtr input,
xmlCharEncoding enc, xmlCharEncoding enc,
xmlSAXHandlerPtr sax, xmlSAXHandlerPtr sax,
void *user_data); void *user_data);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt, xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt,
const char * filename, const char * filename,
int options); int options);
XMLPUBFUN xmlParserCtxtPtr XMLCALL XMLPUBFUN xmlParserCtxtPtr
xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt); xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt);
/* /*
...@@ -225,15 +225,15 @@ XMLPUBFUN xmlParserCtxtPtr XMLCALL ...@@ -225,15 +225,15 @@ XMLPUBFUN xmlParserCtxtPtr XMLCALL
typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct; typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr; typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr;
XMLPUBFUN xmlSchemaSAXPlugPtr XMLCALL XMLPUBFUN xmlSchemaSAXPlugPtr
xmlSchemaSAXPlug (xmlSchemaValidCtxtPtr ctxt, xmlSchemaSAXPlug (xmlSchemaValidCtxtPtr ctxt,
xmlSAXHandlerPtr *sax, xmlSAXHandlerPtr *sax,
void **user_data); void **user_data);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug); xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSchemaValidateSetLocator (xmlSchemaValidCtxtPtr vctxt, xmlSchemaValidateSetLocator (xmlSchemaValidCtxtPtr vctxt,
xmlSchemaValidityLocatorFunc f, xmlSchemaValidityLocatorFunc f,
void *ctxt); void *ctxt);
......
...@@ -30,118 +30,118 @@ typedef enum { ...@@ -30,118 +30,118 @@ typedef enum {
XML_SCHEMA_WHITESPACE_COLLAPSE = 3 XML_SCHEMA_WHITESPACE_COLLAPSE = 3
} xmlSchemaWhitespaceValueType; } xmlSchemaWhitespaceValueType;
XMLPUBFUN void XMLCALL XMLPUBFUN int
xmlSchemaInitTypes (void); xmlSchemaInitTypes (void);
XML_DEPRECATED XML_DEPRECATED
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSchemaCleanupTypes (void); xmlSchemaCleanupTypes (void);
XMLPUBFUN xmlSchemaTypePtr XMLCALL XMLPUBFUN xmlSchemaTypePtr
xmlSchemaGetPredefinedType (const xmlChar *name, xmlSchemaGetPredefinedType (const xmlChar *name,
const xmlChar *ns); const xmlChar *ns);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type, xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type,
const xmlChar *value, const xmlChar *value,
xmlSchemaValPtr *val); xmlSchemaValPtr *val);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type, xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type,
const xmlChar *value, const xmlChar *value,
xmlSchemaValPtr *val, xmlSchemaValPtr *val,
xmlNodePtr node); xmlNodePtr node);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaValidateFacet (xmlSchemaTypePtr base, xmlSchemaValidateFacet (xmlSchemaTypePtr base,
xmlSchemaFacetPtr facet, xmlSchemaFacetPtr facet,
const xmlChar *value, const xmlChar *value,
xmlSchemaValPtr val); xmlSchemaValPtr val);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet, xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet,
xmlSchemaWhitespaceValueType fws, xmlSchemaWhitespaceValueType fws,
xmlSchemaValType valType, xmlSchemaValType valType,
const xmlChar *value, const xmlChar *value,
xmlSchemaValPtr val, xmlSchemaValPtr val,
xmlSchemaWhitespaceValueType ws); xmlSchemaWhitespaceValueType ws);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSchemaFreeValue (xmlSchemaValPtr val); xmlSchemaFreeValue (xmlSchemaValPtr val);
XMLPUBFUN xmlSchemaFacetPtr XMLCALL XMLPUBFUN xmlSchemaFacetPtr
xmlSchemaNewFacet (void); xmlSchemaNewFacet (void);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaCheckFacet (xmlSchemaFacetPtr facet, xmlSchemaCheckFacet (xmlSchemaFacetPtr facet,
xmlSchemaTypePtr typeDecl, xmlSchemaTypePtr typeDecl,
xmlSchemaParserCtxtPtr ctxt, xmlSchemaParserCtxtPtr ctxt,
const xmlChar *name); const xmlChar *name);
XMLPUBFUN void XMLCALL XMLPUBFUN void
xmlSchemaFreeFacet (xmlSchemaFacetPtr facet); xmlSchemaFreeFacet (xmlSchemaFacetPtr facet);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaCompareValues (xmlSchemaValPtr x, xmlSchemaCompareValues (xmlSchemaValPtr x,
xmlSchemaValPtr y); xmlSchemaValPtr y);
XMLPUBFUN xmlSchemaTypePtr XMLCALL XMLPUBFUN xmlSchemaTypePtr
xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type); xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet, xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet,
const xmlChar *value, const xmlChar *value,
unsigned long actualLen, unsigned long actualLen,
unsigned long *expectedLen); unsigned long *expectedLen);
XMLPUBFUN xmlSchemaTypePtr XMLCALL XMLPUBFUN xmlSchemaTypePtr
xmlSchemaGetBuiltInType (xmlSchemaValType type); xmlSchemaGetBuiltInType (xmlSchemaValType type);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type, xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type,
int facetType); int facetType);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlSchemaCollapseString (const xmlChar *value); xmlSchemaCollapseString (const xmlChar *value);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlSchemaWhiteSpaceReplace (const xmlChar *value); xmlSchemaWhiteSpaceReplace (const xmlChar *value);
XMLPUBFUN unsigned long XMLCALL XMLPUBFUN unsigned long
xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet); xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type, xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type,
xmlSchemaFacetPtr facet, xmlSchemaFacetPtr facet,
const xmlChar *value, const xmlChar *value,
xmlSchemaValPtr val, xmlSchemaValPtr val,
unsigned long *length); unsigned long *length);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet, xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
xmlSchemaValType valType, xmlSchemaValType valType,
const xmlChar *value, const xmlChar *value,
xmlSchemaValPtr val, xmlSchemaValPtr val,
unsigned long *length, unsigned long *length,
xmlSchemaWhitespaceValueType ws); xmlSchemaWhitespaceValueType ws);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type, xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type,
const xmlChar *value, const xmlChar *value,
xmlSchemaValPtr *val, xmlSchemaValPtr *val,
xmlNodePtr node); xmlNodePtr node);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaGetCanonValue (xmlSchemaValPtr val, xmlSchemaGetCanonValue (xmlSchemaValPtr val,
const xmlChar **retValue); const xmlChar **retValue);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val, xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,
const xmlChar **retValue, const xmlChar **retValue,
xmlSchemaWhitespaceValueType ws); xmlSchemaWhitespaceValueType ws);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaValueAppend (xmlSchemaValPtr prev, xmlSchemaValueAppend (xmlSchemaValPtr prev,
xmlSchemaValPtr cur); xmlSchemaValPtr cur);
XMLPUBFUN xmlSchemaValPtr XMLCALL XMLPUBFUN xmlSchemaValPtr
xmlSchemaValueGetNext (xmlSchemaValPtr cur); xmlSchemaValueGetNext (xmlSchemaValPtr cur);
XMLPUBFUN const xmlChar * XMLCALL XMLPUBFUN const xmlChar *
xmlSchemaValueGetAsString (xmlSchemaValPtr val); xmlSchemaValueGetAsString (xmlSchemaValPtr val);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val); xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val);
XMLPUBFUN xmlSchemaValPtr XMLCALL XMLPUBFUN xmlSchemaValPtr
xmlSchemaNewStringValue (xmlSchemaValType type, xmlSchemaNewStringValue (xmlSchemaValType type,
const xmlChar *value); const xmlChar *value);
XMLPUBFUN xmlSchemaValPtr XMLCALL XMLPUBFUN xmlSchemaValPtr
xmlSchemaNewNOTATIONValue (const xmlChar *name, xmlSchemaNewNOTATIONValue (const xmlChar *name,
const xmlChar *ns); const xmlChar *ns);
XMLPUBFUN xmlSchemaValPtr XMLCALL XMLPUBFUN xmlSchemaValPtr
xmlSchemaNewQNameValue (const xmlChar *namespaceName, xmlSchemaNewQNameValue (const xmlChar *namespaceName,
const xmlChar *localName); const xmlChar *localName);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x, xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x,
xmlSchemaWhitespaceValueType xws, xmlSchemaWhitespaceValueType xws,
xmlSchemaValPtr y, xmlSchemaValPtr y,
xmlSchemaWhitespaceValueType yws); xmlSchemaWhitespaceValueType yws);
XMLPUBFUN xmlSchemaValPtr XMLCALL XMLPUBFUN xmlSchemaValPtr
xmlSchemaCopyValue (xmlSchemaValPtr val); xmlSchemaCopyValue (xmlSchemaValPtr val);
XMLPUBFUN xmlSchemaValType XMLCALL XMLPUBFUN xmlSchemaValType
xmlSchemaGetValType (xmlSchemaValPtr val); xmlSchemaGetValType (xmlSchemaValPtr val);
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -37,60 +37,60 @@ typedef unsigned char xmlChar; ...@@ -37,60 +37,60 @@ typedef unsigned char xmlChar;
/* /*
* xmlChar handling * xmlChar handling
*/ */
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlStrdup (const xmlChar *cur); xmlStrdup (const xmlChar *cur);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlStrndup (const xmlChar *cur, xmlStrndup (const xmlChar *cur,
int len); int len);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlCharStrndup (const char *cur, xmlCharStrndup (const char *cur,
int len); int len);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlCharStrdup (const char *cur); xmlCharStrdup (const char *cur);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlStrsub (const xmlChar *str, xmlStrsub (const xmlChar *str,
int start, int start,
int len); int len);
XMLPUBFUN const xmlChar * XMLCALL XMLPUBFUN const xmlChar *
xmlStrchr (const xmlChar *str, xmlStrchr (const xmlChar *str,
xmlChar val); xmlChar val);
XMLPUBFUN const xmlChar * XMLCALL XMLPUBFUN const xmlChar *
xmlStrstr (const xmlChar *str, xmlStrstr (const xmlChar *str,
const xmlChar *val); const xmlChar *val);
XMLPUBFUN const xmlChar * XMLCALL XMLPUBFUN const xmlChar *
xmlStrcasestr (const xmlChar *str, xmlStrcasestr (const xmlChar *str,
const xmlChar *val); const xmlChar *val);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlStrcmp (const xmlChar *str1, xmlStrcmp (const xmlChar *str1,
const xmlChar *str2); const xmlChar *str2);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlStrncmp (const xmlChar *str1, xmlStrncmp (const xmlChar *str1,
const xmlChar *str2, const xmlChar *str2,
int len); int len);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlStrcasecmp (const xmlChar *str1, xmlStrcasecmp (const xmlChar *str1,
const xmlChar *str2); const xmlChar *str2);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlStrncasecmp (const xmlChar *str1, xmlStrncasecmp (const xmlChar *str1,
const xmlChar *str2, const xmlChar *str2,
int len); int len);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlStrEqual (const xmlChar *str1, xmlStrEqual (const xmlChar *str1,
const xmlChar *str2); const xmlChar *str2);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlStrQEqual (const xmlChar *pref, xmlStrQEqual (const xmlChar *pref,
const xmlChar *name, const xmlChar *name,
const xmlChar *str); const xmlChar *str);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlStrlen (const xmlChar *str); xmlStrlen (const xmlChar *str);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlStrcat (xmlChar *cur, xmlStrcat (xmlChar *cur,
const xmlChar *add); const xmlChar *add);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlStrncat (xmlChar *cur, xmlStrncat (xmlChar *cur,
const xmlChar *add, const xmlChar *add,
int len); int len);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlStrncatNew (const xmlChar *str1, xmlStrncatNew (const xmlChar *str1,
const xmlChar *str2, const xmlChar *str2,
int len); int len);
...@@ -99,38 +99,38 @@ XMLPUBFUN int XMLCDECL ...@@ -99,38 +99,38 @@ XMLPUBFUN int XMLCDECL
int len, int len,
const char *msg, const char *msg,
...) LIBXML_ATTR_FORMAT(3,4); ...) LIBXML_ATTR_FORMAT(3,4);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlStrVPrintf (xmlChar *buf, xmlStrVPrintf (xmlChar *buf,
int len, int len,
const char *msg, const char *msg,
va_list ap) LIBXML_ATTR_FORMAT(3,0); va_list ap) LIBXML_ATTR_FORMAT(3,0);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlGetUTF8Char (const unsigned char *utf, xmlGetUTF8Char (const unsigned char *utf,
int *len); int *len);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlCheckUTF8 (const unsigned char *utf); xmlCheckUTF8 (const unsigned char *utf);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlUTF8Strsize (const xmlChar *utf, xmlUTF8Strsize (const xmlChar *utf,
int len); int len);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlUTF8Strndup (const xmlChar *utf, xmlUTF8Strndup (const xmlChar *utf,
int len); int len);
XMLPUBFUN const xmlChar * XMLCALL XMLPUBFUN const xmlChar *
xmlUTF8Strpos (const xmlChar *utf, xmlUTF8Strpos (const xmlChar *utf,
int pos); int pos);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlUTF8Strloc (const xmlChar *utf, xmlUTF8Strloc (const xmlChar *utf,
const xmlChar *utfchar); const xmlChar *utfchar);
XMLPUBFUN xmlChar * XMLCALL XMLPUBFUN xmlChar *
xmlUTF8Strsub (const xmlChar *utf, xmlUTF8Strsub (const xmlChar *utf,
int start, int start,
int len); int len);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlUTF8Strlen (const xmlChar *utf); xmlUTF8Strlen (const xmlChar *utf);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlUTF8Size (const xmlChar *utf); xmlUTF8Size (const xmlChar *utf);
XMLPUBFUN int XMLCALL XMLPUBFUN int
xmlUTF8Charcmp (const xmlChar *utf1, xmlUTF8Charcmp (const xmlChar *utf1,
const xmlChar *utf2); const xmlChar *utf2);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment