Commit ad7b9726 authored by Alexandre Julliard's avatar Alexandre Julliard

xml2: Import upstream release 2.11.4.

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