1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-25 10:50:08 +03:00

Big space and tab cleanup

Remove all space before tabs and space and tabs at end of lines.
This commit is contained in:
Daniel Veillard 2012-09-11 13:26:36 +08:00
parent 429d3a0aae
commit f8e3db0445
103 changed files with 3740 additions and 3691 deletions

View File

@ -53,7 +53,7 @@ docbEncodeEntities(unsigned char *out ATTRIBUTE_UNUSED,
/**
* docbParseDocument:
* @ctxt: an SGML parser context
*
*
* parse an SGML document (and build a tree if using the standard SAX
* interface).
*
@ -163,12 +163,12 @@ docbCreatePushParserCtxt(docbSAXHandlerPtr sax ATTRIBUTE_UNUSED,
* @cur: a pointer to an array of xmlChar
* @encoding: a free form C string describing the SGML document encoding, or NULL
* @sax: the SAX handler block
* @userData: if using SAX, this pointer will be provided on callbacks.
* @userData: if using SAX, this pointer will be provided on callbacks.
*
* parse an SGML in-memory document and build a tree.
* It use the given SAX function block to handle the parsing callback.
* If sax is NULL, fallback to the default DOM tree building routines.
*
*
* Returns the resulting document tree
*/
@ -196,7 +196,7 @@ docbSAXParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
* @encoding: a free form C string describing the SGML document encoding, or NULL
*
* parse an SGML in-memory document and build a tree.
*
*
* Returns the resulting document tree
*/
@ -221,7 +221,7 @@ docbParseDoc(xmlChar * cur ATTRIBUTE_UNUSED,
* @filename: the filename
* @encoding: the SGML document encoding, or NULL
*
* Create a parser context for a file content.
* Create a parser context for a file content.
* Automatic support for ZLIB/Compress compressed document is provided
* by default if found at compile-time.
*
@ -247,7 +247,7 @@ docbCreateFileParserCtxt(const char *filename ATTRIBUTE_UNUSED,
* @filename: the filename
* @encoding: a free form C string describing the SGML document encoding, or NULL
* @sax: the SAX handler block
* @userData: if using SAX, this pointer will be provided on callbacks.
* @userData: if using SAX, this pointer will be provided on callbacks.
*
* parse an SGML file and build a tree. Automatic support for ZLIB/Compress
* compressed document is provided by default if found at compile-time.

View File

@ -5162,13 +5162,13 @@ htmlParseLookupSequence(htmlParserCtxtPtr ctxt, xmlChar first,
* @stop: Array of chars, which stop the lookup.
* @stopLen: Length of stop-Array
*
* Try to find if any char of the stop-Array is available in the input
* Try to find if any char of the stop-Array is available in the input
* stream.
* This function has a side effect of (possibly) incrementing ctxt->checkIndex
* to avoid rescanning sequences of bytes, it DOES change the state of the
* parser, do not use liberally.
*
* Returns the index to the current parsing point if a stopChar
* Returns the index to the current parsing point if a stopChar
* is available, -1 otherwise.
*/
static int

View File

@ -34,14 +34,14 @@
/************************************************************************
* *
* Getting/Setting encoding meta tags *
* Getting/Setting encoding meta tags *
* *
************************************************************************/
/**
* htmlGetMetaEncoding:
* @doc: the document
*
*
* Encoding definition lookup in the Meta tags
*
* Returns the current encoding as flagged in the HTML source
@ -128,17 +128,17 @@ found_meta:
found_content:
encoding = xmlStrstr(content, BAD_CAST"charset=");
if (encoding == NULL)
if (encoding == NULL)
encoding = xmlStrstr(content, BAD_CAST"Charset=");
if (encoding == NULL)
if (encoding == NULL)
encoding = xmlStrstr(content, BAD_CAST"CHARSET=");
if (encoding != NULL) {
encoding += 8;
} else {
encoding = xmlStrstr(content, BAD_CAST"charset =");
if (encoding == NULL)
if (encoding == NULL)
encoding = xmlStrstr(content, BAD_CAST"Charset =");
if (encoding == NULL)
if (encoding == NULL)
encoding = xmlStrstr(content, BAD_CAST"CHARSET =");
if (encoding != NULL)
encoding += 9;
@ -316,7 +316,7 @@ static const char* htmlBooleanAttrs[] = {
* @name: the name of the attribute to check
*
* Determine if a given attribute is a boolean attribute.
*
*
* returns: false if the attribute is not boolean, true otherwise.
*/
int
@ -340,7 +340,7 @@ xmlOutputBufferPtr
xmlAllocOutputBufferInternal(xmlCharEncodingHandlerPtr encoder);
/************************************************************************
* *
* Output error handlers *
* Output error handlers *
* *
************************************************************************/
/**
@ -389,7 +389,7 @@ htmlSaveErr(int code, xmlNodePtr node, const char *extra)
/************************************************************************
* *
* Dumping HTML tree content to a simple buffer *
* Dumping HTML tree content to a simple buffer *
* *
************************************************************************/
@ -512,7 +512,7 @@ htmlNodeDumpFileFormat(FILE *out, xmlDocPtr doc,
if (handler == NULL)
handler = xmlFindCharEncodingHandler("ascii");
/*
/*
* save the content to a temp buffer.
*/
buf = xmlOutputBufferCreateFile(out, handler);
@ -634,7 +634,7 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
/************************************************************************
* *
* Dumping HTML tree content to an I/O output buffer *
* Dumping HTML tree content to an I/O output buffer *
* *
************************************************************************/
@ -645,7 +645,7 @@ void xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur);
* @buf: the HTML buffer output
* @doc: the document
* @encoding: the encoding string
*
*
* TODO: check whether encoding is needed
*
* Dump the HTML document DTD, if any.
@ -667,7 +667,7 @@ htmlDtdDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
if (cur->SystemID != NULL) {
xmlOutputBufferWriteString(buf, " ");
xmlBufWriteQuotedString(buf->buffer, cur->SystemID);
}
}
} else if (cur->SystemID != NULL) {
xmlOutputBufferWriteString(buf, " SYSTEM ");
xmlBufWriteQuotedString(buf->buffer, cur->SystemID);
@ -1123,7 +1123,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) {
if ((cur == NULL) || (filename == NULL))
return(-1);
xmlInitParser();
encoding = (const char *) htmlGetMetaEncoding(cur);
@ -1154,7 +1154,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) {
if (handler == NULL)
handler = xmlFindCharEncodingHandler("ascii");
/*
/*
* save the content to a temp buffer.
*/
buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression);
@ -1174,7 +1174,7 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) {
* @encoding: the document encoding
*
* Dump an HTML document to a file using a given encoding.
*
*
* returns: the number of byte written or -1 in case of failure.
*/
int
@ -1218,7 +1218,7 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur,
if (handler == NULL)
handler = xmlFindCharEncodingHandler("ascii");
/*
/*
* save the content to a temp buffer.
*/
buf = xmlOutputBufferCreateFilename(filename, handler, 0);
@ -1238,7 +1238,7 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur,
*
* Dump an HTML document to a file using a given encoding
* and formatting returns/spaces are added.
*
*
* returns: the number of byte written or -1 in case of failure.
*/
int

2
SAX.c
View File

@ -41,7 +41,7 @@
void
initxmlDefaultSAXHandler(xmlSAXHandlerV1 *hdlr, int warning)
{
if(hdlr->initialized == 1)
return;

96
SAX2.c
View File

@ -45,7 +45,7 @@
*> values "system" and "public". I have made the default be "system" to
*> match yours.
*/
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
@ -143,7 +143,7 @@ xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
if (ctxt != NULL)
ctxt->errNo = error;
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error,
XML_ERR_FATAL, NULL, 0,
XML_ERR_FATAL, NULL, 0,
(const char *) str1, (const char *) str2,
NULL, 0, 0, msg, str1, str2);
if (ctxt != NULL) {
@ -174,7 +174,7 @@ xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
if (ctxt != NULL)
ctxt->errNo = error;
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_PARSER, error,
XML_ERR_WARNING, NULL, 0,
XML_ERR_WARNING, NULL, 0,
(const char *) str1, NULL,
NULL, 0, 0, msg, str1);
}
@ -199,7 +199,7 @@ xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
if (ctxt != NULL)
ctxt->errNo = error;
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error,
XML_ERR_ERROR, NULL, 0,
XML_ERR_ERROR, NULL, 0,
(const char *) str1, (const char *) str2,
NULL, 0, 0, msg, str1, str2);
}
@ -223,7 +223,7 @@ xmlNsWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
if (ctxt != NULL)
ctxt->errNo = error;
__xmlRaiseError(NULL, NULL, NULL, ctxt, NULL, XML_FROM_NAMESPACE, error,
XML_ERR_WARNING, NULL, 0,
XML_ERR_WARNING, NULL, 0,
(const char *) str1, (const char *) str2,
NULL, 0, 0, msg, str1, str2);
}
@ -257,7 +257,7 @@ xmlSAX2GetSystemId(void *ctx)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
if ((ctx == NULL) || (ctxt->input == NULL)) return(NULL);
return((const xmlChar *) ctxt->input->filename);
return((const xmlChar *) ctxt->input->filename);
}
/**
@ -372,7 +372,7 @@ xmlSAX2InternalSubset(void *ctx, const xmlChar *name,
xmlFreeDtd(dtd);
ctxt->myDoc->intSubset = NULL;
}
ctxt->myDoc->intSubset =
ctxt->myDoc->intSubset =
xmlCreateIntSubset(ctxt->myDoc, name, ExternalID, SystemID);
if (ctxt->myDoc->intSubset == NULL)
xmlSAX2ErrMemory(ctxt, "xmlSAX2InternalSubset");
@ -638,8 +638,8 @@ xmlSAX2GetParameterEntity(void *ctx, const xmlChar *name)
/**
* xmlSAX2EntityDecl:
* @ctx: the user data (XML parser context)
* @name: the entity name
* @type: the entity type
* @name: the entity name
* @type: the entity type
* @publicId: The public ID of the entity
* @systemId: The system ID of the entity
* @content: the entity value (without processing).
@ -674,7 +674,7 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
base = ctxt->input->filename;
if (base == NULL)
base = ctxt->directory;
URI = xmlBuildURI(systemId, (const xmlChar *) base);
ent->URI = URI;
}
@ -683,7 +683,7 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
systemId, content);
if ((ent == NULL) && (ctxt->pedantic) &&
(ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
ctxt->sax->warning(ctxt->userData,
ctxt->sax->warning(ctxt->userData,
"Entity(%s) already defined in the external subset\n", name);
if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) {
xmlChar *URI;
@ -693,7 +693,7 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
base = ctxt->input->filename;
if (base == NULL)
base = ctxt->directory;
URI = xmlBuildURI(systemId, (const xmlChar *) base);
ent->URI = URI;
}
@ -708,8 +708,8 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
* xmlSAX2AttributeDecl:
* @ctx: the user data (XML parser context)
* @elem: the name of the element
* @fullname: the attribute name
* @type: the attribute type
* @fullname: the attribute name
* @type: the attribute type
* @def: the type of default value
* @defaultValue: the attribute default value
* @tree: the tree of enumerated value set
@ -752,7 +752,7 @@ xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
(xmlAttributeDefault) def, defaultValue, tree);
else if (ctxt->inSubset == 2)
attr = xmlAddAttributeDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, elem,
name, prefix, (xmlAttributeType) type,
name, prefix, (xmlAttributeType) type,
(xmlAttributeDefault) def, defaultValue, tree);
else {
xmlFatalErrMsg(ctxt, XML_ERR_INTERNAL_ERROR,
@ -778,8 +778,8 @@ xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
/**
* xmlSAX2ElementDecl:
* @ctx: the user data (XML parser context)
* @name: the element name
* @type: the element type
* @name: the element name
* @type: the element type
* @content: the element value tree
*
* An element definition has been parsed
@ -900,7 +900,7 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name,
publicId, systemId, notationName);
if ((ent == NULL) && (ctxt->pedantic) &&
(ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
ctxt->sax->warning(ctxt->userData,
ctxt->sax->warning(ctxt->userData,
"Entity(%s) already defined in the internal subset\n", name);
if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) {
xmlChar *URI;
@ -910,7 +910,7 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name,
base = ctxt->input->filename;
if (base == NULL)
base = ctxt->directory;
URI = xmlBuildURI(systemId, (const xmlChar *) base);
ent->URI = URI;
}
@ -920,7 +920,7 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name,
publicId, systemId, notationName);
if ((ent == NULL) && (ctxt->pedantic) &&
(ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
ctxt->sax->warning(ctxt->userData,
ctxt->sax->warning(ctxt->userData,
"Entity(%s) already defined in the external subset\n", name);
if ((ent != NULL) && (ent->URI == NULL) && (systemId != NULL)) {
xmlChar *URI;
@ -930,7 +930,7 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name,
base = ctxt->input->filename;
if (base == NULL)
base = ctxt->directory;
URI = xmlBuildURI(systemId, (const xmlChar *) base);
ent->URI = URI;
}
@ -1174,12 +1174,12 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
uri = xmlParseURI((const char *)val);
if (uri == NULL) {
if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
ctxt->sax->warning(ctxt->userData,
ctxt->sax->warning(ctxt->userData,
"xmlns: %s not a valid URI\n", val);
} else {
if (uri->scheme == NULL) {
if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL))
ctxt->sax->warning(ctxt->userData,
ctxt->sax->warning(ctxt->userData,
"xmlns: URI %s is not absolute\n", val);
}
xmlFreeURI(uri);
@ -1199,7 +1199,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc,
ctxt->node, prefix, nsret, val);
#endif /* LIBXML_VALID_ENABLED */
if (name != NULL)
if (name != NULL)
xmlFree(name);
if (nval != NULL)
xmlFree(nval);
@ -1221,7 +1221,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
if (val == NULL) {
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement");
xmlFree(ns);
if (name != NULL)
if (name != NULL)
xmlFree(name);
return;
}
@ -1262,7 +1262,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
ctxt->valid &= xmlValidateOneNamespace(&ctxt->vctxt, ctxt->myDoc,
ctxt->node, prefix, nsret, value);
#endif /* LIBXML_VALID_ENABLED */
if (name != NULL)
if (name != NULL)
xmlFree(name);
if (nval != NULL)
xmlFree(nval);
@ -1328,7 +1328,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
#ifdef LIBXML_VALID_ENABLED
if ((!ctxt->html) && ctxt->validate && ctxt->wellFormed &&
ctxt->myDoc && ctxt->myDoc->intSubset) {
/*
* If we don't substitute entities, the validation should be
* done on a value with replaced entities anyway.
@ -1340,7 +1340,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
val = xmlStringDecodeEntities(ctxt, value, XML_SUBSTITUTE_REF,
0,0,0);
ctxt->depth--;
if (val == NULL)
ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt,
ctxt->myDoc, ctxt->node, ret, value);
@ -1397,7 +1397,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
error:
if (nval != NULL)
xmlFree(nval);
if (ns != NULL)
if (ns != NULL)
xmlFree(ns);
}
@ -1496,7 +1496,7 @@ process_external_subset:
* - this is a namespace prefix
* - the user required for completion in the tree
* like XSLT
* - there isn't already an attribute definition
* - there isn't already an attribute definition
* in the internal subset overriding it.
*/
if (((attr->prefix != NULL) &&
@ -1585,17 +1585,17 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
/*
* First check on validity:
*/
if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) &&
if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) &&
((ctxt->myDoc->intSubset == NULL) ||
((ctxt->myDoc->intSubset->notations == NULL) &&
((ctxt->myDoc->intSubset->notations == NULL) &&
(ctxt->myDoc->intSubset->elements == NULL) &&
(ctxt->myDoc->intSubset->attributes == NULL) &&
(ctxt->myDoc->intSubset->attributes == NULL) &&
(ctxt->myDoc->intSubset->entities == NULL)))) {
xmlErrValid(ctxt, XML_ERR_NO_DTD,
"Validation failed: no DTD found !", NULL, NULL);
ctxt->validate = 0;
}
/*
* Split the full name into a namespace prefix and the tag name
@ -1783,7 +1783,7 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
else
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;
@ -1800,7 +1800,7 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
cur);
#endif /* LIBXML_VALID_ENABLED */
/*
* end of parsing of this node.
*/
@ -1816,7 +1816,7 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
* @ctxt: the parser context
* @str: the input string
* @len: the string length
*
*
* Callback for a text node
*
* Returns the newly allocated string or NULL if not needed or error
@ -1905,7 +1905,7 @@ skip:
* @ctxt: the parser context
* @str: the input string
* @len: the string length
*
*
* Remove the entities from an attribute value
*
* Returns the newly allocated string or NULL if not needed or error
@ -1971,7 +1971,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
memset(ret, 0, sizeof(xmlAttr));
ret->type = XML_ATTRIBUTE_NODE;
ret->parent = ctxt->node;
ret->parent = ctxt->node;
ret->doc = ctxt->myDoc;
ret->ns = namespace;
@ -1995,7 +1995,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
xmlRegisterNodeDefaultValue((xmlNodePtr)ret);
} else {
if (ctxt->dictNames)
ret = xmlNewNsPropEatName(ctxt->node, namespace,
ret = xmlNewNsPropEatName(ctxt->node, namespace,
(xmlChar *) localname, NULL);
else
ret = xmlNewNsProp(ctxt->node, namespace, localname, NULL);
@ -2081,7 +2081,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
xmlChar *nvalnorm;
xmlChar fn[50];
xmlChar *fullname;
fullname = xmlBuildQName(localname, prefix, fn, 50);
if (fullname != NULL) {
ctxt->vctxt.valid = 1;
@ -2196,11 +2196,11 @@ xmlSAX2StartElementNs(void *ctx,
/*
* First check on validity:
*/
if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) &&
if (ctxt->validate && (ctxt->myDoc->extSubset == NULL) &&
((ctxt->myDoc->intSubset == NULL) ||
((ctxt->myDoc->intSubset->notations == NULL) &&
((ctxt->myDoc->intSubset->notations == NULL) &&
(ctxt->myDoc->intSubset->elements == NULL) &&
(ctxt->myDoc->intSubset->attributes == NULL) &&
(ctxt->myDoc->intSubset->attributes == NULL) &&
(ctxt->myDoc->intSubset->entities == NULL)))) {
xmlErrValid(ctxt, XML_ERR_NO_DTD,
"Validation failed: no DTD found !", NULL, NULL);
@ -2247,12 +2247,12 @@ xmlSAX2StartElementNs(void *ctx,
xmlRegisterNodeDefaultValue(ret);
} else {
if (ctxt->dictNames)
ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL,
ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL,
(xmlChar *) localname, NULL);
else if (lname == NULL)
ret = xmlNewDocNode(ctxt->myDoc, NULL, localname, NULL);
else
ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL,
ret = xmlNewDocNodeEatName(ctxt->myDoc, NULL,
(xmlChar *) lname, NULL);
if (ret == NULL) {
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
@ -2457,7 +2457,7 @@ xmlSAX2EndElementNs(void *ctx,
* @ctx: the user data (XML parser context)
* @name: The entity name
*
* called when an entity xmlSAX2Reference is detected.
* called when an entity xmlSAX2Reference is detected.
*/
void
xmlSAX2Reference(void *ctx, const xmlChar *name)
@ -2562,7 +2562,7 @@ xmlSAX2Characters(void *ctx, const xmlChar *ch, int len)
xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters: huge text node");
return;
}
if ((size_t)ctxt->nodelen > SIZE_T_MAX - (size_t)len ||
if ((size_t)ctxt->nodelen > SIZE_T_MAX - (size_t)len ||
(size_t)ctxt->nodemem + (size_t)len > SIZE_T_MAX / 2) {
xmlSAX2ErrMemory(ctxt, "xmlSAX2Characters overflow prevented");
return;

626
c14n.c

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
/**
* catalog.c: set of generic Catalog related routines
* catalog.c: set of generic Catalog related routines
*
* Reference: SGML Open Technical Resolution TR9401:1997.
* http://www.jclark.com/sp/catalog.htm
@ -62,7 +62,7 @@
*> values "system" and "public". I have made the default be "system" to
*> match yours.
*/
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
@ -208,7 +208,7 @@ static int xmlCatalogInitialized = 0;
/************************************************************************
* *
* Catalog error handlers *
* Catalog error handlers *
* *
************************************************************************/
@ -261,9 +261,9 @@ xmlCatalogErr(xmlCatalogEntryPtr catal, xmlNodePtr node, int error,
* @name: name of the entry
* @value: value of the entry
* @prefer: the PUBLIC vs. SYSTEM current preference value
* @group: for members of a group, the group entry
* @group: for members of a group, the group entry
*
* create a new Catalog entry, this type is shared both by XML and
* create a new Catalog entry, this type is shared both by XML and
* SGML catalogs, but the acceptable types values differs.
*
* Returns the xmlCatalogEntryPtr or NULL in case of error
@ -401,7 +401,7 @@ xmlFreeCatalogHashEntryList(xmlCatalogEntryPtr catal) {
* @type: type of catalog
* @prefer: the PUBLIC vs. SYSTEM current preference value
*
* create a new Catalog, this type is shared both by XML and
* create a new Catalog, this type is shared both by XML and
* SGML catalogs, but the acceptable types values differs.
*
* Returns the xmlCatalogPtr or NULL in case of error
@ -569,7 +569,7 @@ static void xmlDumpXMLCatalogNode(xmlCatalogEntryPtr catal, xmlNodePtr catalog,
xns = xmlSearchNsByHref(doc, node, XML_XML_NAMESPACE);
if (xns != NULL)
xmlSetNsProp(node, xns, BAD_CAST "base",
cur->value);
cur->value);
}
switch (cur->prefer) {
case XML_CATA_PREFER_NONE:
@ -687,7 +687,7 @@ BAD_CAST "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd");
xmlAddChild((xmlNodePtr) doc, catalog);
xmlDumpXMLCatalogNode(catal, catalog, doc, ns, NULL);
/*
* reserialize it
*/
@ -824,7 +824,7 @@ xmlCatalogUnWrapURN(const xmlChar *urn) {
if (xmlStrncmp(urn, BAD_CAST XML_URN_PUBID, sizeof(XML_URN_PUBID) - 1))
return(NULL);
urn += sizeof(XML_URN_PUBID) - 1;
while (*urn != 0) {
if (i > sizeof(result) - 4)
break;
@ -937,7 +937,7 @@ xmlParseCatalogFile(const char *filename) {
ctxt->myDoc = NULL;
}
xmlFreeParserCtxt(ctxt);
return(ret);
}
@ -1327,7 +1327,7 @@ xmlParseXMLCatalogNodeList(xmlNodePtr cur, xmlCatalogPrefer prefer,
*
* Parses the catalog file to extract the XML tree and then analyze the
* tree to build a list of Catalog entries corresponding to this catalog
*
*
* Returns the resulting Catalog entries list
*/
static xmlCatalogEntryPtr
@ -1395,14 +1395,14 @@ xmlParseXMLCatalogFile(xmlCatalogPrefer prefer, const xmlChar *filename) {
* @catal: an existing but incomplete catalog entry
*
* Fetch and parse the subcatalog referenced by an entry
*
*
* Returns 0 in case of success, -1 otherwise
*/
static int
xmlFetchXMLCatalogFile(xmlCatalogEntryPtr catal) {
xmlCatalogEntryPtr doc;
if (catal == NULL)
if (catal == NULL)
return(-1);
if (catal->URL == NULL)
return(-1);
@ -1494,7 +1494,7 @@ xmlAddXMLCatalog(xmlCatalogEntryPtr catal, const xmlChar *type,
xmlCatalogEntryType typ;
int doregister = 0;
if ((catal == NULL) ||
if ((catal == NULL) ||
((catal->type != XML_CATA_CATALOG) &&
(catal->type != XML_CATA_BROKEN_CATALOG)))
return(-1);
@ -1570,7 +1570,7 @@ xmlDelXMLCatalog(xmlCatalogEntryPtr catal, const xmlChar *value) {
xmlCatalogEntryPtr cur;
int ret = 0;
if ((catal == NULL) ||
if ((catal == NULL) ||
((catal->type != XML_CATA_CATALOG) &&
(catal->type != XML_CATA_BROKEN_CATALOG)))
return(-1);
@ -1785,7 +1785,7 @@ xmlCatalogXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID,
}
if (nbList < MAX_DELEGATE)
delegates[nbList++] = cur->URL;
if (cur->children == NULL) {
xmlFetchXMLCatalogFile(cur);
}
@ -1998,7 +1998,7 @@ xmlCatalogListXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID,
xmlChar *ret = NULL;
xmlChar *urnID = NULL;
xmlChar *normid;
if (catal == NULL)
return(NULL);
if ((pubID == NULL) && (sysID == NULL))
@ -2007,7 +2007,7 @@ xmlCatalogListXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID,
normid = xmlCatalogNormalizePublic(pubID);
if (normid != NULL)
pubID = (*normid != 0 ? normid : NULL);
if (!xmlStrncmp(pubID, BAD_CAST XML_URN_PUBID, sizeof(XML_URN_PUBID) - 1)) {
urnID = xmlCatalogUnWrapURN(pubID);
if (xmlDebugCatalogs) {
@ -2087,7 +2087,7 @@ static xmlChar *
xmlCatalogListXMLResolveURI(xmlCatalogEntryPtr catal, const xmlChar *URI) {
xmlChar *ret = NULL;
xmlChar *urnID = NULL;
if (catal == NULL)
return(NULL);
if (URI == NULL)
@ -2147,7 +2147,7 @@ xmlCatalogListXMLResolveURI(xmlCatalogEntryPtr catal, const xmlChar *URI) {
*/
static const xmlChar *
xmlParseSGMLCatalogComment(const xmlChar *cur) {
if ((cur[0] != '-') || (cur[1] != '-'))
if ((cur[0] != '-') || (cur[1] != '-'))
return(cur);
SKIP(2);
while ((cur[0] != 0) && ((cur[0] != '-') || ((cur[1] != '-'))))
@ -2682,7 +2682,7 @@ xmlLoadACatalog(const char *filename)
first = content;
while ((*first != 0) && (*first != '-') && (*first != '<') &&
(!(((*first >= 'A') && (*first <= 'Z')) ||
((*first >= 'a') && (*first <= 'z')))))
@ -2777,7 +2777,7 @@ xmlACatalogResolveSystem(xmlCatalogPtr catal, const xmlChar *sysID) {
if ((sysID == NULL) || (catal == NULL))
return(NULL);
if (xmlDebugCatalogs)
xmlGenericError(xmlGenericErrorContext,
"Resolve sysID %s\n", sysID);
@ -2812,7 +2812,7 @@ xmlACatalogResolvePublic(xmlCatalogPtr catal, const xmlChar *pubID) {
if ((pubID == NULL) || (catal == NULL))
return(NULL);
if (xmlDebugCatalogs)
xmlGenericError(xmlGenericErrorContext,
"Resolve pubID %s\n", pubID);
@ -2931,7 +2931,7 @@ xmlACatalogDump(xmlCatalogPtr catal, FILE *out) {
} else {
xmlHashScan(catal->sgml,
(xmlHashScanner) xmlCatalogDumpEntry, out);
}
}
}
#endif /* LIBXML_OUTPUT_ENABLED */
@ -2939,7 +2939,7 @@ xmlACatalogDump(xmlCatalogPtr catal, FILE *out) {
* xmlACatalogAdd:
* @catal: a Catalog
* @type: the type of record to add to the catalog
* @orig: the system, public or prefix to match
* @orig: the system, public or prefix to match
* @replace: the replacement value for the match
*
* Add an entry in the catalog, it may overwrite existing but
@ -2998,7 +2998,7 @@ xmlACatalogRemove(xmlCatalogPtr catal, const xmlChar *value) {
(xmlHashDeallocator) xmlFreeCatalogEntry);
if (res == 0)
res = 1;
}
}
return(res);
}
@ -3057,7 +3057,7 @@ xmlCatalogIsEmpty(xmlCatalogPtr catal) {
return(1);
if (res < 0)
return(-1);
}
}
return(0);
}
@ -3080,7 +3080,7 @@ xmlInitializeCatalogData(void) {
if (xmlCatalogInitialized != 0)
return;
if (getenv("XML_DEBUG_CATALOG"))
if (getenv("XML_DEBUG_CATALOG"))
xmlDebugCatalogs = 1;
xmlCatalogMutex = xmlNewRMutex();
@ -3101,7 +3101,7 @@ xmlInitializeCatalog(void) {
xmlInitializeCatalogData();
xmlRMutexLock(xmlCatalogMutex);
if (getenv("XML_DEBUG_CATALOG"))
if (getenv("XML_DEBUG_CATALOG"))
xmlDebugCatalogs = 1;
if (xmlDefaultCatalog == NULL) {
@ -3124,7 +3124,7 @@ xmlInitializeCatalog(void) {
unsigned long len = GetModuleFileNameA(hmodule, buf, 255);
if (len != 0) {
char* p = &(buf[len]);
while (*p != '\\' && p > buf)
while (*p != '\\' && p > buf)
p--;
if (p != buf) {
xmlChar* uri;
@ -3143,15 +3143,15 @@ xmlInitializeCatalog(void) {
catalogs = XML_XML_DEFAULT_CATALOG;
#endif
catal = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE,
catal = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE,
xmlCatalogDefaultPrefer);
if (catal != NULL) {
/* the XML_CATALOG_FILES envvar is allowed to contain a
/* the XML_CATALOG_FILES envvar is allowed to contain a
space-separated list of entries. */
cur = catalogs;
nextent = &catal->xml;
while (*cur != '\0') {
while (xmlIsBlank_ch(*cur))
while (xmlIsBlank_ch(*cur))
cur++;
if (*cur != 0) {
paths = cur;
@ -3276,7 +3276,7 @@ xmlCatalogCleanup(void) {
xmlGenericError(xmlGenericErrorContext,
"Catalogs cleanup\n");
if (xmlCatalogXMLFiles != NULL)
xmlHashFree(xmlCatalogXMLFiles,
xmlHashFree(xmlCatalogXMLFiles,
(xmlHashDeallocator)xmlFreeCatalogHashEntryList);
xmlCatalogXMLFiles = NULL;
if (xmlDefaultCatalog != NULL)
@ -3391,7 +3391,7 @@ xmlCatalogDump(FILE *out) {
/**
* xmlCatalogAdd:
* @type: the type of record to add to the catalog
* @orig: the system, public or prefix to match
* @orig: the system, public or prefix to match
* @replace: the replacement value for the match
*
* Add an entry in the catalog, it may overwrite existing but
@ -3422,7 +3422,7 @@ xmlCatalogAdd(const xmlChar *type, const xmlChar *orig, const xmlChar *replace)
xmlRMutexUnlock(xmlCatalogMutex);
return(0);
}
}
res = xmlACatalogAdd(xmlDefaultCatalog, type, orig, replace);
xmlRMutexUnlock(xmlCatalogMutex);
@ -3610,7 +3610,7 @@ xmlCatalogFreeLocal(void *catalogs) {
*
* Returns the updated list
*/
void *
void *
xmlCatalogAddLocal(void *catalogs, const xmlChar *URL) {
xmlCatalogEntryPtr catal, add;
@ -3630,7 +3630,7 @@ xmlCatalogAddLocal(void *catalogs, const xmlChar *URL) {
return(catalogs);
catal = (xmlCatalogEntryPtr) catalogs;
if (catal == NULL)
if (catal == NULL)
return((void *) add);
while (catal->next != NULL)
@ -3645,7 +3645,7 @@ xmlCatalogAddLocal(void *catalogs, const xmlChar *URL) {
* @pubID: the public ID string
* @sysID: the system ID string
*
* Do a complete resolution lookup of an External Identifier using a
* Do a complete resolution lookup of an External Identifier using a
* document's private catalog list
*
* Returns the URI of the resource or NULL if not found, it must be freed
@ -3690,7 +3690,7 @@ xmlCatalogLocalResolve(void *catalogs, const xmlChar *pubID,
* @catalogs: a document's list of catalogs
* @URI: the URI
*
* Do a complete resolution lookup of an URI using a
* Do a complete resolution lookup of an URI using a
* document's private catalog list
*
* Returns the URI of the resource or NULL if not found, it must be freed
@ -3751,7 +3751,7 @@ xmlCatalogGetSystem(const xmlChar *sysID) {
if (sysID == NULL)
return(NULL);
/*
* Check first the XML catalogs
*/
@ -3795,7 +3795,7 @@ xmlCatalogGetPublic(const xmlChar *pubID) {
if (pubID == NULL)
return(NULL);
/*
* Check first the XML catalogs
*/

164
chvalid.c Executable file → Normal file
View File

@ -46,109 +46,109 @@ const unsigned char xmlIsPubidChar_tab[256] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 };
static const xmlChSRange xmlIsBaseChar_srng[] = { {0x100, 0x131},
{0x134, 0x13e}, {0x141, 0x148}, {0x14a, 0x17e}, {0x180, 0x1c3},
{0x1cd, 0x1f0}, {0x1f4, 0x1f5}, {0x1fa, 0x217}, {0x250, 0x2a8},
{0x2bb, 0x2c1}, {0x386, 0x386}, {0x388, 0x38a}, {0x38c, 0x38c},
{0x38e, 0x3a1}, {0x3a3, 0x3ce}, {0x3d0, 0x3d6}, {0x3da, 0x3da},
{0x3dc, 0x3dc}, {0x3de, 0x3de}, {0x3e0, 0x3e0}, {0x3e2, 0x3f3},
{0x401, 0x40c}, {0x40e, 0x44f}, {0x451, 0x45c}, {0x45e, 0x481},
{0x490, 0x4c4}, {0x4c7, 0x4c8}, {0x4cb, 0x4cc}, {0x4d0, 0x4eb},
{0x4ee, 0x4f5}, {0x4f8, 0x4f9}, {0x531, 0x556}, {0x559, 0x559},
{0x561, 0x586}, {0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a},
{0x641, 0x64a}, {0x671, 0x6b7}, {0x6ba, 0x6be}, {0x6c0, 0x6ce},
{0x6d0, 0x6d3}, {0x6d5, 0x6d5}, {0x6e5, 0x6e6}, {0x905, 0x939},
{0x93d, 0x93d}, {0x958, 0x961}, {0x985, 0x98c}, {0x98f, 0x990},
{0x993, 0x9a8}, {0x9aa, 0x9b0}, {0x9b2, 0x9b2}, {0x9b6, 0x9b9},
{0x9dc, 0x9dd}, {0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0xa05, 0xa0a},
{0xa0f, 0xa10}, {0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33},
{0xa35, 0xa36}, {0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e},
{0xa72, 0xa74}, {0xa85, 0xa8b}, {0xa8d, 0xa8d}, {0xa8f, 0xa91},
{0xa93, 0xaa8}, {0xaaa, 0xab0}, {0xab2, 0xab3}, {0xab5, 0xab9},
{0xabd, 0xabd}, {0xae0, 0xae0}, {0xb05, 0xb0c}, {0xb0f, 0xb10},
{0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb36, 0xb39},
{0xb3d, 0xb3d}, {0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb85, 0xb8a},
{0xb8e, 0xb90}, {0xb92, 0xb95}, {0xb99, 0xb9a}, {0xb9c, 0xb9c},
{0xb9e, 0xb9f}, {0xba3, 0xba4}, {0xba8, 0xbaa}, {0xbae, 0xbb5},
{0xbb7, 0xbb9}, {0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28},
{0xc2a, 0xc33}, {0xc35, 0xc39}, {0xc60, 0xc61}, {0xc85, 0xc8c},
{0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9},
{0xcde, 0xcde}, {0xce0, 0xce1}, {0xd05, 0xd0c}, {0xd0e, 0xd10},
{0xd12, 0xd28}, {0xd2a, 0xd39}, {0xd60, 0xd61}, {0xe01, 0xe2e},
{0xe30, 0xe30}, {0xe32, 0xe33}, {0xe40, 0xe45}, {0xe81, 0xe82},
{0xe84, 0xe84}, {0xe87, 0xe88}, {0xe8a, 0xe8a}, {0xe8d, 0xe8d},
{0xe94, 0xe97}, {0xe99, 0xe9f}, {0xea1, 0xea3}, {0xea5, 0xea5},
{0xea7, 0xea7}, {0xeaa, 0xeab}, {0xead, 0xeae}, {0xeb0, 0xeb0},
{0xeb2, 0xeb3}, {0xebd, 0xebd}, {0xec0, 0xec4}, {0xf40, 0xf47},
{0xf49, 0xf69}, {0x10a0, 0x10c5}, {0x10d0, 0x10f6}, {0x1100, 0x1100},
{0x1102, 0x1103}, {0x1105, 0x1107}, {0x1109, 0x1109}, {0x110b, 0x110c},
{0x110e, 0x1112}, {0x113c, 0x113c}, {0x113e, 0x113e}, {0x1140, 0x1140},
{0x114c, 0x114c}, {0x114e, 0x114e}, {0x1150, 0x1150}, {0x1154, 0x1155},
{0x1159, 0x1159}, {0x115f, 0x1161}, {0x1163, 0x1163}, {0x1165, 0x1165},
{0x1167, 0x1167}, {0x1169, 0x1169}, {0x116d, 0x116e}, {0x1172, 0x1173},
{0x1175, 0x1175}, {0x119e, 0x119e}, {0x11a8, 0x11a8}, {0x11ab, 0x11ab},
{0x11ae, 0x11af}, {0x11b7, 0x11b8}, {0x11ba, 0x11ba}, {0x11bc, 0x11c2},
{0x11eb, 0x11eb}, {0x11f0, 0x11f0}, {0x11f9, 0x11f9}, {0x1e00, 0x1e9b},
{0x1ea0, 0x1ef9}, {0x1f00, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45},
{0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b},
{0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc},
{0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3},
{0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc},
{0x2126, 0x2126}, {0x212a, 0x212b}, {0x212e, 0x212e}, {0x2180, 0x2182},
static const xmlChSRange xmlIsBaseChar_srng[] = { {0x100, 0x131},
{0x134, 0x13e}, {0x141, 0x148}, {0x14a, 0x17e}, {0x180, 0x1c3},
{0x1cd, 0x1f0}, {0x1f4, 0x1f5}, {0x1fa, 0x217}, {0x250, 0x2a8},
{0x2bb, 0x2c1}, {0x386, 0x386}, {0x388, 0x38a}, {0x38c, 0x38c},
{0x38e, 0x3a1}, {0x3a3, 0x3ce}, {0x3d0, 0x3d6}, {0x3da, 0x3da},
{0x3dc, 0x3dc}, {0x3de, 0x3de}, {0x3e0, 0x3e0}, {0x3e2, 0x3f3},
{0x401, 0x40c}, {0x40e, 0x44f}, {0x451, 0x45c}, {0x45e, 0x481},
{0x490, 0x4c4}, {0x4c7, 0x4c8}, {0x4cb, 0x4cc}, {0x4d0, 0x4eb},
{0x4ee, 0x4f5}, {0x4f8, 0x4f9}, {0x531, 0x556}, {0x559, 0x559},
{0x561, 0x586}, {0x5d0, 0x5ea}, {0x5f0, 0x5f2}, {0x621, 0x63a},
{0x641, 0x64a}, {0x671, 0x6b7}, {0x6ba, 0x6be}, {0x6c0, 0x6ce},
{0x6d0, 0x6d3}, {0x6d5, 0x6d5}, {0x6e5, 0x6e6}, {0x905, 0x939},
{0x93d, 0x93d}, {0x958, 0x961}, {0x985, 0x98c}, {0x98f, 0x990},
{0x993, 0x9a8}, {0x9aa, 0x9b0}, {0x9b2, 0x9b2}, {0x9b6, 0x9b9},
{0x9dc, 0x9dd}, {0x9df, 0x9e1}, {0x9f0, 0x9f1}, {0xa05, 0xa0a},
{0xa0f, 0xa10}, {0xa13, 0xa28}, {0xa2a, 0xa30}, {0xa32, 0xa33},
{0xa35, 0xa36}, {0xa38, 0xa39}, {0xa59, 0xa5c}, {0xa5e, 0xa5e},
{0xa72, 0xa74}, {0xa85, 0xa8b}, {0xa8d, 0xa8d}, {0xa8f, 0xa91},
{0xa93, 0xaa8}, {0xaaa, 0xab0}, {0xab2, 0xab3}, {0xab5, 0xab9},
{0xabd, 0xabd}, {0xae0, 0xae0}, {0xb05, 0xb0c}, {0xb0f, 0xb10},
{0xb13, 0xb28}, {0xb2a, 0xb30}, {0xb32, 0xb33}, {0xb36, 0xb39},
{0xb3d, 0xb3d}, {0xb5c, 0xb5d}, {0xb5f, 0xb61}, {0xb85, 0xb8a},
{0xb8e, 0xb90}, {0xb92, 0xb95}, {0xb99, 0xb9a}, {0xb9c, 0xb9c},
{0xb9e, 0xb9f}, {0xba3, 0xba4}, {0xba8, 0xbaa}, {0xbae, 0xbb5},
{0xbb7, 0xbb9}, {0xc05, 0xc0c}, {0xc0e, 0xc10}, {0xc12, 0xc28},
{0xc2a, 0xc33}, {0xc35, 0xc39}, {0xc60, 0xc61}, {0xc85, 0xc8c},
{0xc8e, 0xc90}, {0xc92, 0xca8}, {0xcaa, 0xcb3}, {0xcb5, 0xcb9},
{0xcde, 0xcde}, {0xce0, 0xce1}, {0xd05, 0xd0c}, {0xd0e, 0xd10},
{0xd12, 0xd28}, {0xd2a, 0xd39}, {0xd60, 0xd61}, {0xe01, 0xe2e},
{0xe30, 0xe30}, {0xe32, 0xe33}, {0xe40, 0xe45}, {0xe81, 0xe82},
{0xe84, 0xe84}, {0xe87, 0xe88}, {0xe8a, 0xe8a}, {0xe8d, 0xe8d},
{0xe94, 0xe97}, {0xe99, 0xe9f}, {0xea1, 0xea3}, {0xea5, 0xea5},
{0xea7, 0xea7}, {0xeaa, 0xeab}, {0xead, 0xeae}, {0xeb0, 0xeb0},
{0xeb2, 0xeb3}, {0xebd, 0xebd}, {0xec0, 0xec4}, {0xf40, 0xf47},
{0xf49, 0xf69}, {0x10a0, 0x10c5}, {0x10d0, 0x10f6}, {0x1100, 0x1100},
{0x1102, 0x1103}, {0x1105, 0x1107}, {0x1109, 0x1109}, {0x110b, 0x110c},
{0x110e, 0x1112}, {0x113c, 0x113c}, {0x113e, 0x113e}, {0x1140, 0x1140},
{0x114c, 0x114c}, {0x114e, 0x114e}, {0x1150, 0x1150}, {0x1154, 0x1155},
{0x1159, 0x1159}, {0x115f, 0x1161}, {0x1163, 0x1163}, {0x1165, 0x1165},
{0x1167, 0x1167}, {0x1169, 0x1169}, {0x116d, 0x116e}, {0x1172, 0x1173},
{0x1175, 0x1175}, {0x119e, 0x119e}, {0x11a8, 0x11a8}, {0x11ab, 0x11ab},
{0x11ae, 0x11af}, {0x11b7, 0x11b8}, {0x11ba, 0x11ba}, {0x11bc, 0x11c2},
{0x11eb, 0x11eb}, {0x11f0, 0x11f0}, {0x11f9, 0x11f9}, {0x1e00, 0x1e9b},
{0x1ea0, 0x1ef9}, {0x1f00, 0x1f15}, {0x1f18, 0x1f1d}, {0x1f20, 0x1f45},
{0x1f48, 0x1f4d}, {0x1f50, 0x1f57}, {0x1f59, 0x1f59}, {0x1f5b, 0x1f5b},
{0x1f5d, 0x1f5d}, {0x1f5f, 0x1f7d}, {0x1f80, 0x1fb4}, {0x1fb6, 0x1fbc},
{0x1fbe, 0x1fbe}, {0x1fc2, 0x1fc4}, {0x1fc6, 0x1fcc}, {0x1fd0, 0x1fd3},
{0x1fd6, 0x1fdb}, {0x1fe0, 0x1fec}, {0x1ff2, 0x1ff4}, {0x1ff6, 0x1ffc},
{0x2126, 0x2126}, {0x212a, 0x212b}, {0x212e, 0x212e}, {0x2180, 0x2182},
{0x3041, 0x3094}, {0x30a1, 0x30fa}, {0x3105, 0x312c}, {0xac00, 0xd7a3}};
const xmlChRangeGroup xmlIsBaseCharGroup =
{197, 0, xmlIsBaseChar_srng, (xmlChLRangePtr)0};
static const xmlChSRange xmlIsChar_srng[] = { {0x100, 0xd7ff},
static const xmlChSRange xmlIsChar_srng[] = { {0x100, 0xd7ff},
{0xe000, 0xfffd}};
static const xmlChLRange xmlIsChar_lrng[] = { {0x10000, 0x10ffff}};
const xmlChRangeGroup xmlIsCharGroup =
{2, 1, xmlIsChar_srng, xmlIsChar_lrng};
static const xmlChSRange xmlIsCombining_srng[] = { {0x300, 0x345},
{0x360, 0x361}, {0x483, 0x486}, {0x591, 0x5a1}, {0x5a3, 0x5b9},
{0x5bb, 0x5bd}, {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4},
{0x64b, 0x652}, {0x670, 0x670}, {0x6d6, 0x6dc}, {0x6dd, 0x6df},
{0x6e0, 0x6e4}, {0x6e7, 0x6e8}, {0x6ea, 0x6ed}, {0x901, 0x903},
{0x93c, 0x93c}, {0x93e, 0x94c}, {0x94d, 0x94d}, {0x951, 0x954},
{0x962, 0x963}, {0x981, 0x983}, {0x9bc, 0x9bc}, {0x9be, 0x9be},
{0x9bf, 0x9bf}, {0x9c0, 0x9c4}, {0x9c7, 0x9c8}, {0x9cb, 0x9cd},
{0x9d7, 0x9d7}, {0x9e2, 0x9e3}, {0xa02, 0xa02}, {0xa3c, 0xa3c},
{0xa3e, 0xa3e}, {0xa3f, 0xa3f}, {0xa40, 0xa42}, {0xa47, 0xa48},
{0xa4b, 0xa4d}, {0xa70, 0xa71}, {0xa81, 0xa83}, {0xabc, 0xabc},
{0xabe, 0xac5}, {0xac7, 0xac9}, {0xacb, 0xacd}, {0xb01, 0xb03},
{0xb3c, 0xb3c}, {0xb3e, 0xb43}, {0xb47, 0xb48}, {0xb4b, 0xb4d},
{0xb56, 0xb57}, {0xb82, 0xb83}, {0xbbe, 0xbc2}, {0xbc6, 0xbc8},
{0xbca, 0xbcd}, {0xbd7, 0xbd7}, {0xc01, 0xc03}, {0xc3e, 0xc44},
{0xc46, 0xc48}, {0xc4a, 0xc4d}, {0xc55, 0xc56}, {0xc82, 0xc83},
{0xcbe, 0xcc4}, {0xcc6, 0xcc8}, {0xcca, 0xccd}, {0xcd5, 0xcd6},
{0xd02, 0xd03}, {0xd3e, 0xd43}, {0xd46, 0xd48}, {0xd4a, 0xd4d},
{0xd57, 0xd57}, {0xe31, 0xe31}, {0xe34, 0xe3a}, {0xe47, 0xe4e},
{0xeb1, 0xeb1}, {0xeb4, 0xeb9}, {0xebb, 0xebc}, {0xec8, 0xecd},
{0xf18, 0xf19}, {0xf35, 0xf35}, {0xf37, 0xf37}, {0xf39, 0xf39},
{0xf3e, 0xf3e}, {0xf3f, 0xf3f}, {0xf71, 0xf84}, {0xf86, 0xf8b},
{0xf90, 0xf95}, {0xf97, 0xf97}, {0xf99, 0xfad}, {0xfb1, 0xfb7},
{0xfb9, 0xfb9}, {0x20d0, 0x20dc}, {0x20e1, 0x20e1}, {0x302a, 0x302f},
static const xmlChSRange xmlIsCombining_srng[] = { {0x300, 0x345},
{0x360, 0x361}, {0x483, 0x486}, {0x591, 0x5a1}, {0x5a3, 0x5b9},
{0x5bb, 0x5bd}, {0x5bf, 0x5bf}, {0x5c1, 0x5c2}, {0x5c4, 0x5c4},
{0x64b, 0x652}, {0x670, 0x670}, {0x6d6, 0x6dc}, {0x6dd, 0x6df},
{0x6e0, 0x6e4}, {0x6e7, 0x6e8}, {0x6ea, 0x6ed}, {0x901, 0x903},
{0x93c, 0x93c}, {0x93e, 0x94c}, {0x94d, 0x94d}, {0x951, 0x954},
{0x962, 0x963}, {0x981, 0x983}, {0x9bc, 0x9bc}, {0x9be, 0x9be},
{0x9bf, 0x9bf}, {0x9c0, 0x9c4}, {0x9c7, 0x9c8}, {0x9cb, 0x9cd},
{0x9d7, 0x9d7}, {0x9e2, 0x9e3}, {0xa02, 0xa02}, {0xa3c, 0xa3c},
{0xa3e, 0xa3e}, {0xa3f, 0xa3f}, {0xa40, 0xa42}, {0xa47, 0xa48},
{0xa4b, 0xa4d}, {0xa70, 0xa71}, {0xa81, 0xa83}, {0xabc, 0xabc},
{0xabe, 0xac5}, {0xac7, 0xac9}, {0xacb, 0xacd}, {0xb01, 0xb03},
{0xb3c, 0xb3c}, {0xb3e, 0xb43}, {0xb47, 0xb48}, {0xb4b, 0xb4d},
{0xb56, 0xb57}, {0xb82, 0xb83}, {0xbbe, 0xbc2}, {0xbc6, 0xbc8},
{0xbca, 0xbcd}, {0xbd7, 0xbd7}, {0xc01, 0xc03}, {0xc3e, 0xc44},
{0xc46, 0xc48}, {0xc4a, 0xc4d}, {0xc55, 0xc56}, {0xc82, 0xc83},
{0xcbe, 0xcc4}, {0xcc6, 0xcc8}, {0xcca, 0xccd}, {0xcd5, 0xcd6},
{0xd02, 0xd03}, {0xd3e, 0xd43}, {0xd46, 0xd48}, {0xd4a, 0xd4d},
{0xd57, 0xd57}, {0xe31, 0xe31}, {0xe34, 0xe3a}, {0xe47, 0xe4e},
{0xeb1, 0xeb1}, {0xeb4, 0xeb9}, {0xebb, 0xebc}, {0xec8, 0xecd},
{0xf18, 0xf19}, {0xf35, 0xf35}, {0xf37, 0xf37}, {0xf39, 0xf39},
{0xf3e, 0xf3e}, {0xf3f, 0xf3f}, {0xf71, 0xf84}, {0xf86, 0xf8b},
{0xf90, 0xf95}, {0xf97, 0xf97}, {0xf99, 0xfad}, {0xfb1, 0xfb7},
{0xfb9, 0xfb9}, {0x20d0, 0x20dc}, {0x20e1, 0x20e1}, {0x302a, 0x302f},
{0x3099, 0x3099}, {0x309a, 0x309a}};
const xmlChRangeGroup xmlIsCombiningGroup =
{95, 0, xmlIsCombining_srng, (xmlChLRangePtr)0};
static const xmlChSRange xmlIsDigit_srng[] = { {0x660, 0x669},
{0x6f0, 0x6f9}, {0x966, 0x96f}, {0x9e6, 0x9ef}, {0xa66, 0xa6f},
{0xae6, 0xaef}, {0xb66, 0xb6f}, {0xbe7, 0xbef}, {0xc66, 0xc6f},
{0xce6, 0xcef}, {0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9},
static const xmlChSRange xmlIsDigit_srng[] = { {0x660, 0x669},
{0x6f0, 0x6f9}, {0x966, 0x96f}, {0x9e6, 0x9ef}, {0xa66, 0xa6f},
{0xae6, 0xaef}, {0xb66, 0xb6f}, {0xbe7, 0xbef}, {0xc66, 0xc6f},
{0xce6, 0xcef}, {0xd66, 0xd6f}, {0xe50, 0xe59}, {0xed0, 0xed9},
{0xf20, 0xf29}};
const xmlChRangeGroup xmlIsDigitGroup =
{14, 0, xmlIsDigit_srng, (xmlChLRangePtr)0};
static const xmlChSRange xmlIsExtender_srng[] = { {0x2d0, 0x2d0},
{0x2d1, 0x2d1}, {0x387, 0x387}, {0x640, 0x640}, {0xe46, 0xe46},
{0xec6, 0xec6}, {0x3005, 0x3005}, {0x3031, 0x3035}, {0x309d, 0x309e},
static const xmlChSRange xmlIsExtender_srng[] = { {0x2d0, 0x2d0},
{0x2d1, 0x2d1}, {0x387, 0x387}, {0x640, 0x640}, {0xe46, 0xe46},
{0xec6, 0xec6}, {0x3005, 0x3005}, {0x3031, 0x3035}, {0x309d, 0x309e},
{0x30fc, 0x30fe}};
const xmlChRangeGroup xmlIsExtenderGroup =
{10, 0, xmlIsExtender_srng, (xmlChLRangePtr)0};
static const xmlChSRange xmlIsIdeographic_srng[] = { {0x3007, 0x3007},
static const xmlChSRange xmlIsIdeographic_srng[] = { {0x3007, 0x3007},
{0x3021, 0x3029}, {0x4e00, 0x9fa5}};
const xmlChRangeGroup xmlIsIdeographicGroup =
{3, 0, xmlIsIdeographic_srng, (xmlChLRangePtr)0};

View File

@ -85,7 +85,7 @@ xmlCtxtDumpCleanCtxt(xmlDebugCtxtPtr ctxt ATTRIBUTE_UNUSED)
*
* Check that a given namespace is in scope on a node.
*
* Returns 1 if in scope, -1 in case of argument error,
* Returns 1 if in scope, -1 in case of argument error,
* -2 if the namespace is not in scope, and -3 if not on
* an ancestor node.
*/
@ -311,7 +311,7 @@ xmlCtxtGenericNodeCheck(xmlDebugCtxtPtr ctxt, xmlNodePtr node) {
(node != (xmlNodePtr) node->parent->properties))
xmlDebugErr(ctxt, XML_CHECK_NO_PREV,
"Attr has no prev and not first of attr list\n");
} else if ((node->parent != NULL) && (node->parent->children != node))
xmlDebugErr(ctxt, XML_CHECK_NO_PREV,
"Node has no prev and not first of parent list\n");
@ -1068,7 +1068,7 @@ xmlCtxtDumpNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node)
return;
}
xmlCtxtDumpOneNode(ctxt, node);
if ((node->type != XML_NAMESPACE_DECL) &&
if ((node->type != XML_NAMESPACE_DECL) &&
(node->children != NULL) && (node->type != XML_ENTITY_REF_NODE)) {
ctxt->depth++;
xmlCtxtDumpNodeList(ctxt, node->children);
@ -1603,7 +1603,7 @@ int
xmlLsCountNode(xmlNodePtr node) {
int ret = 0;
xmlNodePtr list = NULL;
if (node == NULL)
return(0);
@ -1644,7 +1644,7 @@ xmlLsCountNode(xmlNodePtr node) {
ret = 1;
break;
}
for (;list != NULL;ret++)
for (;list != NULL;ret++)
list = list->next;
return(ret);
}
@ -1712,11 +1712,11 @@ xmlLsOneNode(FILE *output, xmlNodePtr node) {
if (node->type != XML_NAMESPACE_DECL) {
if (node->properties != NULL)
fprintf(output, "a");
else
else
fprintf(output, "-");
if (node->nsDef != NULL)
if (node->nsDef != NULL)
fprintf(output, "n");
else
else
fprintf(output, "-");
}
@ -1786,7 +1786,7 @@ xmlLsOneNode(FILE *output, xmlNodePtr node) {
* xmlBoolToText:
* @boolval: a bool to turn into text
*
* Convenient way to turn bool into text
* Convenient way to turn bool into text
*
* Returns a pointer to either "True" or "False"
*/
@ -1802,7 +1802,7 @@ xmlBoolToText(int boolval)
#ifdef LIBXML_XPATH_ENABLED
/****************************************************************
* *
* The XML shell related functions *
* The XML shell related functions *
* *
****************************************************************/
@ -2053,7 +2053,7 @@ xmlShellBase(xmlShellCtxtPtr ctxt,
if (node == NULL) {
fprintf(ctxt->output, "NULL\n");
return (0);
}
}
base = xmlNodeGetBase(node->doc, node);
@ -2280,7 +2280,7 @@ xmlShellDir(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED,
if (node == NULL) {
fprintf(ctxt->output, "NULL\n");
return (0);
}
}
if ((node->type == XML_DOCUMENT_NODE) ||
(node->type == XML_HTML_DOCUMENT_NODE)) {
xmlDebugDumpDocumentHead(ctxt->output, (xmlDocPtr) node);
@ -2415,7 +2415,7 @@ xmlShellCat(xmlShellCtxtPtr ctxt, char *arg ATTRIBUTE_UNUSED,
if (node == NULL) {
fprintf(ctxt->output, "NULL\n");
return (0);
}
}
if (ctxt->doc->type == XML_HTML_DOCUMENT_NODE) {
#ifdef LIBXML_HTML_ENABLED
if (node->type == XML_HTML_DOCUMENT_NODE)
@ -2753,7 +2753,7 @@ xmlShellDu(xmlShellCtxtPtr ctxt,
* xmlShellPwd:
* @ctxt: the shell context
* @buffer: the output buffer
* @node: a node
* @node: a node
* @node2: unused
*
* Implements the XML shell function "pwd"
@ -2798,7 +2798,7 @@ xmlShellPwd(xmlShellCtxtPtr ctxt ATTRIBUTE_UNUSED, char *buffer,
* @input: the line reading function
* @output: the output FILE*, defaults to stdout if NULL
*
* Implements the XML shell
* Implements the XML shell
* This allow to load, validate, view, modify and save a document
* using a environment similar to a UNIX commandline.
*/

View File

@ -33,6 +33,6 @@
<h2>
<span class="refentrytitle">libxml2 API Modules</span>
</h2>
<p><a href="libxml2-DOCBparser.html">DOCBparser</a> - old DocBook SGML parser<br/><a href="libxml2-HTMLparser.html">HTMLparser</a> - interface for an HTML 4.0 non-verifying parser<br/><a href="libxml2-HTMLtree.html">HTMLtree</a> - specific APIs to process HTML tree, especially serialization<br/><a href="libxml2-SAX.html">SAX</a> - Old SAX version 1 handler, deprecated<br/><a href="libxml2-SAX2.html">SAX2</a> - SAX2 parser interface used to build the DOM tree<br/><a href="libxml2-c14n.html">c14n</a> - Provide Canonical XML and Exclusive XML Canonicalization<br/><a href="libxml2-catalog.html">catalog</a> - interfaces to the Catalog handling system<br/><a href="libxml2-chvalid.html">chvalid</a> - Unicode character range checking<br/><a href="libxml2-debugXML.html">debugXML</a> - Tree debugging APIs<br/><a href="libxml2-dict.html">dict</a> - string dictionnary<br/><a href="libxml2-encoding.html">encoding</a> - interface for the encoding conversion functions<br/><a href="libxml2-entities.html">entities</a> - interface for the XML entities handling<br/><a href="libxml2-globals.html">globals</a> - interface for all global variables of the library<br/><a href="libxml2-hash.html">hash</a> - Chained hash tables<br/><a href="libxml2-list.html">list</a> - lists interfaces<br/><a href="libxml2-nanoftp.html">nanoftp</a> - minimal FTP implementation<br/><a href="libxml2-nanohttp.html">nanohttp</a> - minimal HTTP implementation<br/><a href="libxml2-parser.html">parser</a> - the core parser module<br/><a href="libxml2-parserInternals.html">parserInternals</a> - internals routines and limits exported by the parser.<br/><a href="libxml2-pattern.html">pattern</a> - pattern expression handling<br/><a href="libxml2-relaxng.html">relaxng</a> - implementation of the Relax-NG validation<br/><a href="libxml2-schemasInternals.html">schemasInternals</a> - internal interfaces for XML Schemas<br/><a href="libxml2-schematron.html">schematron</a> - XML Schemastron implementation<br/><a href="libxml2-threads.html">threads</a> - interfaces for thread handling<br/><a href="libxml2-tree.html">tree</a> - interfaces for tree manipulation<br/><a href="libxml2-uri.html">uri</a> - library of generic URI related routines<br/><a href="libxml2-valid.html">valid</a> - The DTD validation<br/><a href="libxml2-xinclude.html">xinclude</a> - implementation of XInclude<br/><a href="libxml2-xlink.html">xlink</a> - unfinished XLink detection module<br/><a href="libxml2-xmlIO.html">xmlIO</a> - interface for the I/O interfaces used by the parser<br/><a href="libxml2-xmlautomata.html">xmlautomata</a> - API to build regexp automata<br/><a href="libxml2-xmlerror.html">xmlerror</a> - error handling<br/><a href="libxml2-xmlexports.html">xmlexports</a> - macros for marking symbols as exportable/importable.<br/><a href="libxml2-xmlmemory.html">xmlmemory</a> - interface for the memory allocator<br/><a href="libxml2-xmlmodule.html">xmlmodule</a> - dynamic module loading<br/><a href="libxml2-xmlreader.html">xmlreader</a> - the XMLReader implementation<br/><a href="libxml2-xmlregexp.html">xmlregexp</a> - regular expressions handling<br/><a href="libxml2-xmlschemas.html">xmlschemas</a> - incomplete XML Schemas structure implementation<br/><a href="libxml2-xmlschemastypes.html">xmlschemastypes</a> - implementation of XML Schema Datatypes<br/><a href="libxml2-xmlstring.html">xmlstring</a> - set of routines to process strings<br/><a href="libxml2-xmlunicode.html">xmlunicode</a> - Unicode character APIs<br/><a href="libxml2-xmlversion.html">xmlversion</a> - compile-time version informations<br/><a href="libxml2-xmlwriter.html">xmlwriter</a> - text writing API for XML<br/><a href="libxml2-xpath.html">xpath</a> - XML Path Language implementation<br/><a href="libxml2-xpathInternals.html">xpathInternals</a> - internal interfaces for XML Path Language implementation<br/><a href="libxml2-xpointer.html">xpointer</a> - API to handle XML Pointers<br/></p>
<p><a href="libxml2-DOCBparser.html">DOCBparser</a> - old DocBook SGML parser<br/><a href="libxml2-HTMLparser.html">HTMLparser</a> - interface for an HTML 4.0 non-verifying parser<br/><a href="libxml2-HTMLtree.html">HTMLtree</a> - specific APIs to process HTML tree, especially serialization<br/><a href="libxml2-SAX.html">SAX</a> - Old SAX version 1 handler, deprecated<br/><a href="libxml2-SAX2.html">SAX2</a> - SAX2 parser interface used to build the DOM tree<br/><a href="libxml2-c14n.html">c14n</a> - Provide Canonical XML and Exclusive XML Canonicalization<br/><a href="libxml2-catalog.html">catalog</a> - interfaces to the Catalog handling system<br/><a href="libxml2-chvalid.html">chvalid</a> - Unicode character range checking<br/><a href="libxml2-debugXML.html">debugXML</a> - Tree debugging APIs<br/><a href="libxml2-dict.html">dict</a> - string dictionnary<br/><a href="libxml2-encoding.html">encoding</a> - interface for the encoding conversion functions<br/><a href="libxml2-entities.html">entities</a> - interface for the XML entities handling<br/><a href="libxml2-globals.html">globals</a> - interface for all global variables of the library<br/><a href="libxml2-hash.html">hash</a> - Chained hash tables<br/><a href="libxml2-list.html">list</a> - lists interfaces<br/><a href="libxml2-nanoftp.html">nanoftp</a> - minimal FTP implementation<br/><a href="libxml2-nanohttp.html">nanohttp</a> - minimal HTTP implementation<br/><a href="libxml2-parser.html">parser</a> - the core parser module<br/><a href="libxml2-parserInternals.html">parserInternals</a> - internals routines and limits exported by the parser.<br/><a href="libxml2-pattern.html">pattern</a> - pattern expression handling<br/><a href="libxml2-relaxng.html">relaxng</a> - implementation of the Relax-NG validation<br/><a href="libxml2-schemasInternals.html">schemasInternals</a> - internal interfaces for XML Schemas<br/><a href="libxml2-schematron.html">schematron</a> - XML Schemastron implementation<br/><a href="libxml2-threads.html">threads</a> - interfaces for thread handling<br/><a href="libxml2-tree.html">tree</a> - interfaces for tree manipulation<br/><a href="libxml2-uri.html">uri</a> - library of generic URI related routines<br/><a href="libxml2-valid.html">valid</a> - The DTD validation<br/><a href="libxml2-xinclude.html">xinclude</a> - implementation of XInclude<br/><a href="libxml2-xlink.html">xlink</a> - unfinished XLink detection module<br/><a href="libxml2-xmlIO.html">xmlIO</a> - interface for the I/O interfaces used by the parser<br/><a href="libxml2-xmlautomata.html">xmlautomata</a> - API to build regexp automata<br/><a href="libxml2-xmlerror.html">xmlerror</a> - error handling<br/><a href="libxml2-xmlexports.html">xmlexports</a> - macros for marking symbols as exportable/importable.<br/><a href="libxml2-xmlmemory.html">xmlmemory</a> - interface for the memory allocator<br/><a href="libxml2-xmlmodule.html">xmlmodule</a> - dynamic module loading<br/><a href="libxml2-xmlreader.html">xmlreader</a> - the XMLReader implementation<br/><a href="libxml2-xmlregexp.html">xmlregexp</a> - regular expressions handling<br/><a href="libxml2-xmlsave.html">xmlsave</a> - the XML document serializer<br/><a href="libxml2-xmlschemas.html">xmlschemas</a> - incomplete XML Schemas structure implementation<br/><a href="libxml2-xmlschemastypes.html">xmlschemastypes</a> - implementation of XML Schema Datatypes<br/><a href="libxml2-xmlstring.html">xmlstring</a> - set of routines to process strings<br/><a href="libxml2-xmlunicode.html">xmlunicode</a> - Unicode character APIs<br/><a href="libxml2-xmlversion.html">xmlversion</a> - compile-time version informations<br/><a href="libxml2-xmlwriter.html">xmlwriter</a> - text writing API for XML<br/><a href="libxml2-xpath.html">xpath</a> - XML Path Language implementation<br/><a href="libxml2-xpathInternals.html">xpathInternals</a> - internal interfaces for XML Path Language implementation<br/><a href="libxml2-xpointer.html">xpointer</a> - API to handle XML Pointers<br/></p>
</body>
</html>

View File

@ -309,7 +309,8 @@ void <a href="#xmlSetExternalEntityLoader">xmlSetExternalEntityLoader</a> (<a hr
<a name="XML_PARSE_NOBASEFIX">XML_PARSE_NOBASEFIX</a> = 262144 /* do not fixup XINCLUDE xml:base uris */
<a name="XML_PARSE_HUGE">XML_PARSE_HUGE</a> = 524288 /* relax any hardcoded limit from the parser */
<a name="XML_PARSE_OLDSAX">XML_PARSE_OLDSAX</a> = 1048576 /* parse using SAX2 interface before 2.7.0 */
<a name="XML_PARSE_IGNORE_ENC">XML_PARSE_IGNORE_ENC</a> = 2097152 /* ignore internal document encoding hint */
<a name="XML_PARSE_IGNORE_ENC">XML_PARSE_IGNORE_ENC</a> = 2097152 /* ignore internal document encoding hint */
<a name="XML_PARSE_BIG_LINES">XML_PARSE_BIG_LINES</a> = 4194304 /* Store big lines numbers in text PSVI field */
};
</pre><p/>
</div>

View File

@ -259,6 +259,7 @@ void <a href="#xmlNodeSetLang">xmlNodeSetLang</a> (<a href="libxml2-tree.html#
void <a href="#xmlFreeDtd">xmlFreeDtd</a> (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> cur);
void <a href="#xmlFreeNodeList">xmlFreeNodeList</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur);
void <a href="#xmlFreeDoc">xmlFreeDoc</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur);
size_t <a href="#xmlBufShrink">xmlBufShrink</a> (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br/> size_t len);
<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocNode">xmlNewDocNode</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content);
int <a href="#xmlSaveFileEnc">xmlSaveFileEnc</a> (const char * filename, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br/> const char * encoding);
<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlSetNsProp">xmlSetNsProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
@ -972,6 +973,10 @@ The content of this structure is not made public by the API.
<div class="refsect2" lang="en"><h3><a name="xmlBufNodeDump"/>xmlBufNodeDump ()</h3><pre class="programlisting">size_t xmlBufNodeDump (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br/> int level, <br/> int format)<br/>
</pre><p>Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if <a href="libxml2-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the XML buffer output</td></tr><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>level</tt></i>:</span></td><td>the imbrication level for indenting</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>is formatting allowed</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written to the buffer, in case of error 0 is returned or @buf stores the error</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlBufShrink"/>xmlBufShrink ()</h3><pre class="programlisting">size_t xmlBufShrink (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br/> size_t len)<br/>
</pre><p>Remove the beginning of an XML buffer. NOTE that this routine behaviour differs from xmlBufferShrink() as it will return 0 on error instead of -1 due to size_t being used as the return type.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>the buffer to dump</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> to remove</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of byte removed or 0 in case of failure</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlBufUse"/>xmlBufUse ()</h3><pre class="programlisting">size_t xmlBufUse (const <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf)<br/>
</pre><p>Function to get the length of a buffer</p>
@ -1226,7 +1231,7 @@ The content of this structure is not made public by the API.
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>parent</tt></i>:</span></td><td>the parent node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last child or NULL if none.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlGetLineNo"/>xmlGetLineNo ()</h3><pre class="programlisting">long xmlGetLineNo (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br/>
</pre><p>Get line number of @node. This requires activation of this option before invoking the parser by calling xmlLineNumbersDefault(1)</p>
</pre><p>Get line number of @node. Try to override the limitation of lines being store in 16 bits ints if <a href="libxml2-parser.html#XML_PARSE_BIG_LINES">XML_PARSE_BIG_LINES</a> parser option was used</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>valid node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the line number if successful, -1 otherwise</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlGetNoNsProp"/>xmlGetNoNsProp ()</h3><pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlGetNoNsProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br/>

View File

@ -84,11 +84,11 @@ The content of this structure is not made public by the API.
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>module</tt></i>:</span></td><td>the module handle</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of argument error</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlModuleOpen"/>xmlModuleOpen ()</h3><pre class="programlisting"><a href="libxml2-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> xmlModuleOpen (const char * name, <br/> int options)<br/>
</pre><p>Opens a module/shared library given its name or path TODO: options are not yet implemented.</p>
</pre><p>Opens a module/shared library given its name or path NOTE: that due to portability issues, behaviour can only be guaranteed with @name using ASCII. We canot guarantee that an UTF-8 string would work, which is why name is a const char * and not a const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * . TODO: options are not yet implemented.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the module name</td></tr><tr><td><span class="term"><i><tt>options</tt></i>:</span></td><td>a set of <a href="libxml2-xmlmodule.html#xmlModuleOption">xmlModuleOption</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a handle for the module or NULL in case of error</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlModuleSymbol"/>xmlModuleSymbol ()</h3><pre class="programlisting">int xmlModuleSymbol (<a href="libxml2-xmlmodule.html#xmlModulePtr">xmlModulePtr</a> module, <br/> const char * name, <br/> void ** symbol)<br/>
</pre><p>Lookup for a symbol address in the given module</p>
</pre><p>Lookup for a symbol address in the given module NOTE: that due to portability issues, behaviour can only be guaranteed with @name using ASCII. We canot guarantee that an UTF-8 string would work, which is why name is a const char * and not a const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * .</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>module</tt></i>:</span></td><td>the module</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>the name of the symbol</td></tr><tr><td><span class="term"><i><tt>symbol</tt></i>:</span></td><td>the resulting symbol address</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the symbol was found, or -1 in case of error</td></tr></tbody></table></div></div>
<hr/>
</div>

View File

@ -28,7 +28,7 @@
</a>
</td>
<td>
<a accesskey="n" href="libxml2-xmlschemas.html">
<a accesskey="n" href="libxml2-xmlsave.html">
<img src="right.png" width="24" height="24" border="0" alt="Next"/>
</a>
</td>

View File

@ -13,7 +13,7 @@
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td>
<a accesskey="p" href="libxml2-xmlregexp.html">
<a accesskey="p" href="libxml2-xmlsave.html">
<img src="left.png" width="24" height="24" border="0" alt="Prev"/>
</a>
</td>
@ -57,12 +57,14 @@ typedef struct _xmlSchemaValidCtxt <a href="#xmlSchemaValidCtxt">xmlSchemaValidC
int <a href="#xmlSchemaSAXUnplug">xmlSchemaSAXUnplug</a> (<a href="libxml2-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> plug);
<a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> <a href="#xmlSchemaParse">xmlSchemaParse</a> (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt);
void <a href="#xmlSchemaFreeParserCtxt">xmlSchemaFreeParserCtxt</a> (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt);
void <a href="#xmlSchemaValidateSetFilename">xmlSchemaValidateSetFilename</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> vctxt, <br/> const char * filename);
<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> <a href="#xmlSchemaNewParserCtxt">xmlSchemaNewParserCtxt</a> (const char * URL);
int <a href="#xmlSchemaIsValid">xmlSchemaIsValid</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt);
typedef void <a href="#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
<a href="libxml2-xmlschemas.html#xmlSchemaSAXPlugPtr">xmlSchemaSAXPlugPtr</a> <a href="#xmlSchemaSAXPlug">xmlSchemaSAXPlug</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> * sax, <br/> void ** user_data);
int <a href="#xmlSchemaValidateStream">xmlSchemaValidateStream</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, <br/> <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data);
int <a href="#xmlSchemaGetParserErrors">xmlSchemaGetParserErrors</a> (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br/> void ** ctx);
void <a href="#xmlSchemaValidateSetLocator">xmlSchemaValidateSetLocator</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> vctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a> f, <br/> void * ctxt);
int <a href="#xmlSchemaValidateOneElement">xmlSchemaValidateOneElement</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem);
void <a href="#xmlSchemaSetValidStructuredErrors">xmlSchemaSetValidStructuredErrors</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror, <br/> void * ctx);
void <a href="#xmlSchemaSetValidErrors">xmlSchemaSetValidErrors</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br/> void * ctx);
@ -71,6 +73,7 @@ int <a href="#xmlSchemaValidateFile">xmlSchemaValidateFile</a> (<a href="libxml
int <a href="#xmlSchemaValidateDoc">xmlSchemaValidateDoc</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc);
void <a href="#xmlSchemaFree">xmlSchemaFree</a> (<a href="libxml2-xmlschemas.html#xmlSchemaPtr">xmlSchemaPtr</a> schema);
<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> <a href="#xmlSchemaNewMemParserCtxt">xmlSchemaNewMemParserCtxt</a> (const char * buffer, <br/> int size);
typedef int <a href="#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a> (void * ctx, <br/> const char ** file, <br/> unsigned long * line);
int <a href="#xmlSchemaGetValidErrors">xmlSchemaGetValidErrors</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> * err, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> * warn, <br/> void ** ctx);
int <a href="#xmlSchemaSetValidOptions">xmlSchemaSetValidOptions</a> (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> int options);
void <a href="#xmlSchemaSetParserErrors">xmlSchemaSetParserErrors</a> (<a href="libxml2-xmlschemas.html#xmlSchemaParserCtxtPtr">xmlSchemaParserCtxtPtr</a> ctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc">xmlSchemaValidityErrorFunc</a> err, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc">xmlSchemaValidityWarningFunc</a> warn, <br/> void * ctx);
@ -188,6 +191,10 @@ The content of this structure is not made public by the API.
<div class="refsect2" lang="en"><h3><a name="xmlSchemaValidityErrorFunc"/>Function type xmlSchemaValidityErrorFunc</h3><pre class="programlisting">void xmlSchemaValidityErrorFunc (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
</pre><p>Signature of an error callback from an XSD validation</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the validation context</td></tr><tr><td><span class="term"><i><tt>msg</tt></i>:</span></td><td>the message</td></tr><tr><td><span class="term"><i><tt>...</tt></i>:</span></td><td>extra arguments</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSchemaValidityLocatorFunc"/>Function type xmlSchemaValidityLocatorFunc</h3><pre class="programlisting">int xmlSchemaValidityLocatorFunc (void * ctx, <br/> const char ** file, <br/> unsigned long * line)<br/>
</pre><p>A schemas validation locator, a callback called by the validator. This is used when file or node informations are not available to find out what file and line number are affected</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>user provided context</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>returned file information</td></tr><tr><td><span class="term"><i><tt>line</tt></i>:</span></td><td>returned line information</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSchemaValidityWarningFunc"/>Function type xmlSchemaValidityWarningFunc</h3><pre class="programlisting">void xmlSchemaValidityWarningFunc (void * ctx, <br/> const char * msg, <br/> ... ...)<br/>
</pre><p>Signature of a warning callback from an XSD validation</p>
@ -288,6 +295,14 @@ The content of this structure is not made public by the API.
<div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateOneElement"/>xmlSchemaValidateOneElement ()</h3><pre class="programlisting">int xmlSchemaValidateOneElement (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem)<br/>
</pre><p>Validate a branch of a tree, starting with the given @elem.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>elem</tt></i>:</span></td><td>an element node</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the element and its subtree is valid, a positive error code number otherwise and -1 in case of an internal or API error.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateSetFilename"/>xmlSchemaValidateSetFilename ()</h3><pre class="programlisting">void xmlSchemaValidateSetFilename (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> vctxt, <br/> const char * filename)<br/>
</pre><p>Workaround to provide file error reporting information when this is not provided by current APIs</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>vctxt</tt></i>:</span></td><td>the schema validation context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file name</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateSetLocator"/>xmlSchemaValidateSetLocator ()</h3><pre class="programlisting">void xmlSchemaValidateSetLocator (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> vctxt, <br/> <a href="libxml2-xmlschemas.html#xmlSchemaValidityLocatorFunc">xmlSchemaValidityLocatorFunc</a> f, <br/> void * ctxt)<br/>
</pre><p>Allows to set a locator function to the validation context, which will be used to provide file and line information since those are not provided as part of the SAX validation flow Setting @f to NULL disable the locator.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>vctxt</tt></i>:</span></td><td>a schema validation context</td></tr><tr><td><span class="term"><i><tt>f</tt></i>:</span></td><td>the locator function pointer</td></tr><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>the locator context</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="xmlSchemaValidateStream"/>xmlSchemaValidateStream ()</h3><pre class="programlisting">int xmlSchemaValidateStream (<a href="libxml2-xmlschemas.html#xmlSchemaValidCtxtPtr">xmlSchemaValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> input, <br/> <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a> enc, <br/> <a href="libxml2-tree.html#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a> sax, <br/> void * user_data)<br/>
</pre><p>Validate an input based on a flow of SAX event from the parser and forward the events to the @sax handler with the provided @user_data the user provided @sax handler must be a SAX2 one.</p>

View File

@ -39,6 +39,7 @@
<sub name="xmlmodule" link="libxml2-xmlmodule.html"/>
<sub name="xmlreader" link="libxml2-xmlreader.html"/>
<sub name="xmlregexp" link="libxml2-xmlregexp.html"/>
<sub name="xmlsave" link="libxml2-xmlsave.html"/>
<sub name="xmlschemas" link="libxml2-xmlschemas.html"/>
<sub name="xmlschemastypes" link="libxml2-xmlschemastypes.html"/>
<sub name="xmlstring" link="libxml2-xmlstring.html"/>
@ -772,6 +773,7 @@
<function name="XML_PARSER_SUBST_ENTITIES" link="libxml2-xmlreader.html#XML_PARSER_SUBST_ENTITIES"/>
<function name="XML_PARSER_SYSTEM_LITERAL" link="libxml2-parser.html#XML_PARSER_SYSTEM_LITERAL"/>
<function name="XML_PARSER_VALIDATE" link="libxml2-xmlreader.html#XML_PARSER_VALIDATE"/>
<function name="XML_PARSE_BIG_LINES" link="libxml2-parser.html#XML_PARSE_BIG_LINES"/>
<function name="XML_PARSE_COMPACT" link="libxml2-parser.html#XML_PARSE_COMPACT"/>
<function name="XML_PARSE_DOM" link="libxml2-parser.html#XML_PARSE_DOM"/>
<function name="XML_PARSE_DTDATTR" link="libxml2-parser.html#XML_PARSE_DTDATTR"/>
@ -990,10 +992,18 @@
<function name="XML_RNGP_VALUE_NO_CONTENT" link="libxml2-xmlerror.html#XML_RNGP_VALUE_NO_CONTENT"/>
<function name="XML_RNGP_XMLNS_NAME" link="libxml2-xmlerror.html#XML_RNGP_XMLNS_NAME"/>
<function name="XML_RNGP_XML_NS" link="libxml2-xmlerror.html#XML_RNGP_XML_NS"/>
<function name="XML_SAVE_AS_HTML" link="libxml2-xmlsave.html#XML_SAVE_AS_HTML"/>
<function name="XML_SAVE_AS_XML" link="libxml2-xmlsave.html#XML_SAVE_AS_XML"/>
<function name="XML_SAVE_CHAR_INVALID" link="libxml2-xmlerror.html#XML_SAVE_CHAR_INVALID"/>
<function name="XML_SAVE_FORMAT" link="libxml2-xmlsave.html#XML_SAVE_FORMAT"/>
<function name="XML_SAVE_NOT_UTF8" link="libxml2-xmlerror.html#XML_SAVE_NOT_UTF8"/>
<function name="XML_SAVE_NO_DECL" link="libxml2-xmlsave.html#XML_SAVE_NO_DECL"/>
<function name="XML_SAVE_NO_DOCTYPE" link="libxml2-xmlerror.html#XML_SAVE_NO_DOCTYPE"/>
<function name="XML_SAVE_NO_EMPTY" link="libxml2-xmlsave.html#XML_SAVE_NO_EMPTY"/>
<function name="XML_SAVE_NO_XHTML" link="libxml2-xmlsave.html#XML_SAVE_NO_XHTML"/>
<function name="XML_SAVE_UNKNOWN_ENCODING" link="libxml2-xmlerror.html#XML_SAVE_UNKNOWN_ENCODING"/>
<function name="XML_SAVE_WSNONSIG" link="libxml2-xmlsave.html#XML_SAVE_WSNONSIG"/>
<function name="XML_SAVE_XHTML" link="libxml2-xmlsave.html#XML_SAVE_XHTML"/>
<function name="XML_SCHEMAP_AG_PROPS_CORRECT" link="libxml2-xmlerror.html#XML_SCHEMAP_AG_PROPS_CORRECT"/>
<function name="XML_SCHEMAP_ATTRFORMDEFAULT_VALUE" link="libxml2-xmlerror.html#XML_SCHEMAP_ATTRFORMDEFAULT_VALUE"/>
<function name="XML_SCHEMAP_ATTRGRP_NONAME_NOREF" link="libxml2-xmlerror.html#XML_SCHEMAP_ATTRGRP_NONAME_NOREF"/>
@ -1650,6 +1660,8 @@
<function name="xmlSAXHandlerPtr" link="libxml2-tree.html#xmlSAXHandlerPtr"/>
<function name="xmlSAXHandlerV1Ptr" link="libxml2-parser.html#xmlSAXHandlerV1Ptr"/>
<function name="xmlSAXLocatorPtr" link="libxml2-tree.html#xmlSAXLocatorPtr"/>
<function name="xmlSaveCtxtPtr" link="libxml2-xmlsave.html#xmlSaveCtxtPtr"/>
<function name="xmlSaveOption" link="libxml2-xmlsave.html#xmlSaveOption"/>
<function name="xmlSchemaAnnotPtr" link="libxml2-schemasInternals.html#xmlSchemaAnnotPtr"/>
<function name="xmlSchemaAttributeGroupPtr" link="libxml2-schemasInternals.html#xmlSchemaAttributeGroupPtr"/>
<function name="xmlSchemaAttributeLinkPtr" link="libxml2-schemasInternals.html#xmlSchemaAttributeLinkPtr"/>
@ -1758,6 +1770,7 @@
<function name="xmlSAXHandler" link="libxml2-tree.html#xmlSAXHandler"/>
<function name="xmlSAXHandlerV1" link="libxml2-parser.html#xmlSAXHandlerV1"/>
<function name="xmlSAXLocator" link="libxml2-tree.html#xmlSAXLocator"/>
<function name="xmlSaveCtxt" link="libxml2-xmlsave.html#xmlSaveCtxt"/>
<function name="xmlSchema" link="libxml2-xmlschemas.html#xmlSchema"/>
<function name="xmlSchemaAnnot" link="libxml2-schemasInternals.html#xmlSchemaAnnot"/>
<function name="xmlSchemaAttribute" link="libxml2-schemasInternals.html#xmlSchemaAttribute"/>
@ -1864,6 +1877,7 @@
<function name="xmlRelaxNGValidityErrorFunc" link="libxml2-relaxng.html#xmlRelaxNGValidityErrorFunc"/>
<function name="xmlRelaxNGValidityWarningFunc" link="libxml2-relaxng.html#xmlRelaxNGValidityWarningFunc"/>
<function name="xmlSchemaValidityErrorFunc" link="libxml2-xmlschemas.html#xmlSchemaValidityErrorFunc"/>
<function name="xmlSchemaValidityLocatorFunc" link="libxml2-xmlschemas.html#xmlSchemaValidityLocatorFunc"/>
<function name="xmlSchemaValidityWarningFunc" link="libxml2-xmlschemas.html#xmlSchemaValidityWarningFunc"/>
<function name="xmlSchematronValidityErrorFunc" link="libxml2-schematron.html#xmlSchematronValidityErrorFunc"/>
<function name="xmlSchematronValidityWarningFunc" link="libxml2-schematron.html#xmlSchematronValidityWarningFunc"/>
@ -2097,6 +2111,7 @@
<function name="xmlBufEnd ()" link="libxml2-tree.html#xmlBufEnd"/>
<function name="xmlBufGetNodeContent ()" link="libxml2-tree.html#xmlBufGetNodeContent"/>
<function name="xmlBufNodeDump ()" link="libxml2-tree.html#xmlBufNodeDump"/>
<function name="xmlBufShrink ()" link="libxml2-tree.html#xmlBufShrink"/>
<function name="xmlBufUse ()" link="libxml2-tree.html#xmlBufUse"/>
<function name="xmlBufferAdd ()" link="libxml2-tree.html#xmlBufferAdd"/>
<function name="xmlBufferAddHead ()" link="libxml2-tree.html#xmlBufferAddHead"/>
@ -2829,12 +2844,22 @@
<function name="xmlSAXUserParseFile ()" link="libxml2-parser.html#xmlSAXUserParseFile"/>
<function name="xmlSAXUserParseMemory ()" link="libxml2-parser.html#xmlSAXUserParseMemory"/>
<function name="xmlSAXVersion ()" link="libxml2-SAX2.html#xmlSAXVersion"/>
<function name="xmlSaveClose ()" link="libxml2-xmlsave.html#xmlSaveClose"/>
<function name="xmlSaveDoc ()" link="libxml2-xmlsave.html#xmlSaveDoc"/>
<function name="xmlSaveFile ()" link="libxml2-tree.html#xmlSaveFile"/>
<function name="xmlSaveFileEnc ()" link="libxml2-tree.html#xmlSaveFileEnc"/>
<function name="xmlSaveFileTo ()" link="libxml2-tree.html#xmlSaveFileTo"/>
<function name="xmlSaveFlush ()" link="libxml2-xmlsave.html#xmlSaveFlush"/>
<function name="xmlSaveFormatFile ()" link="libxml2-tree.html#xmlSaveFormatFile"/>
<function name="xmlSaveFormatFileEnc ()" link="libxml2-tree.html#xmlSaveFormatFileEnc"/>
<function name="xmlSaveFormatFileTo ()" link="libxml2-tree.html#xmlSaveFormatFileTo"/>
<function name="xmlSaveSetAttrEscape ()" link="libxml2-xmlsave.html#xmlSaveSetAttrEscape"/>
<function name="xmlSaveSetEscape ()" link="libxml2-xmlsave.html#xmlSaveSetEscape"/>
<function name="xmlSaveToBuffer ()" link="libxml2-xmlsave.html#xmlSaveToBuffer"/>
<function name="xmlSaveToFd ()" link="libxml2-xmlsave.html#xmlSaveToFd"/>
<function name="xmlSaveToFilename ()" link="libxml2-xmlsave.html#xmlSaveToFilename"/>
<function name="xmlSaveToIO ()" link="libxml2-xmlsave.html#xmlSaveToIO"/>
<function name="xmlSaveTree ()" link="libxml2-xmlsave.html#xmlSaveTree"/>
<function name="xmlSaveUri ()" link="libxml2-uri.html#xmlSaveUri"/>
<function name="xmlScanName ()" link="libxml2-parserInternals.html#xmlScanName"/>
<function name="xmlSchemaCheckFacet ()" link="libxml2-xmlschemastypes.html#xmlSchemaCheckFacet"/>
@ -2892,6 +2917,8 @@
<function name="xmlSchemaValidateListSimpleTypeFacet ()" link="libxml2-xmlschemastypes.html#xmlSchemaValidateListSimpleTypeFacet"/>
<function name="xmlSchemaValidateOneElement ()" link="libxml2-xmlschemas.html#xmlSchemaValidateOneElement"/>
<function name="xmlSchemaValidatePredefinedType ()" link="libxml2-xmlschemastypes.html#xmlSchemaValidatePredefinedType"/>
<function name="xmlSchemaValidateSetFilename ()" link="libxml2-xmlschemas.html#xmlSchemaValidateSetFilename"/>
<function name="xmlSchemaValidateSetLocator ()" link="libxml2-xmlschemas.html#xmlSchemaValidateSetLocator"/>
<function name="xmlSchemaValidateStream ()" link="libxml2-xmlschemas.html#xmlSchemaValidateStream"/>
<function name="xmlSchemaValueAppend ()" link="libxml2-xmlschemastypes.html#xmlSchemaValueAppend"/>
<function name="xmlSchemaValueGetAsBoolean ()" link="libxml2-xmlschemastypes.html#xmlSchemaValueGetAsBoolean"/>

View File

@ -1759,5 +1759,6 @@
<symbol file="xmlschemas">xmlSchemaValidateSetLocator</symbol>
<symbol file="xmlIO">xmlOutputBufferGetContent</symbol>
<symbol file="xmlIO">xmlOutputBufferGetSize</symbol>
<symbol file="xmlwriter">xmlTextWriterSetQuoteChar</symbol>
</release>
</symbols>

View File

@ -1829,7 +1829,7 @@ xmlIconvWrapper(iconv_t cd, unsigned char *out, int *outlen,
/************************************************************************
* *
* ICU based generic conversion functions *
* ICU based generic conversion functions *
* *
************************************************************************/
@ -2673,7 +2673,7 @@ retry:
else if (handler->uconv_out != NULL) {
ret = xmlUconvWrapper(handler->uconv_out, 0,
&out->content[out->use],
&written, NULL, &toconv);
&written, NULL, &toconv);
out->use += written;
out->content[out->use] = 0;
}
@ -3094,7 +3094,7 @@ UTF8ToISO8859x(unsigned char* out, int *outlen,
c2 = c2 & 0x3F;
d = d & 0x0F;
d = xlattable [48 + c2 + xlattable [48 + c1 +
xlattable [32 + d] * 64] * 64];
xlattable [32 + d] * 64] * 64];
if (d == 0) {
/* not in character set */
*outlen = out - outstart;

View File

@ -28,35 +28,35 @@
static xmlEntity xmlEntityLt = {
NULL, XML_ENTITY_DECL, BAD_CAST "lt",
NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
BAD_CAST "<", BAD_CAST "<", 1,
XML_INTERNAL_PREDEFINED_ENTITY,
NULL, NULL, NULL, NULL, 0, 1
};
static xmlEntity xmlEntityGt = {
NULL, XML_ENTITY_DECL, BAD_CAST "gt",
NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
BAD_CAST ">", BAD_CAST ">", 1,
XML_INTERNAL_PREDEFINED_ENTITY,
NULL, NULL, NULL, NULL, 0, 1
};
static xmlEntity xmlEntityAmp = {
NULL, XML_ENTITY_DECL, BAD_CAST "amp",
NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
BAD_CAST "&", BAD_CAST "&", 1,
XML_INTERNAL_PREDEFINED_ENTITY,
NULL, NULL, NULL, NULL, 0, 1
};
static xmlEntity xmlEntityQuot = {
NULL, XML_ENTITY_DECL, BAD_CAST "quot",
NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
BAD_CAST "\"", BAD_CAST "\"", 1,
XML_INTERNAL_PREDEFINED_ENTITY,
NULL, NULL, NULL, NULL, 0, 1
};
static xmlEntity xmlEntityApos = {
NULL, XML_ENTITY_DECL, BAD_CAST "apos",
NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
BAD_CAST "'", BAD_CAST "'", 1,
XML_INTERNAL_PREDEFINED_ENTITY,
NULL, NULL, NULL, NULL, 0, 1
@ -426,7 +426,7 @@ xmlNewEntity(xmlDocPtr doc, const xmlChar *name, int type,
*
* Do an entity lookup in the table.
* returns the corresponding parameter entity, if found.
*
*
* Returns A pointer to the entity structure or NULL if not found.
*/
static xmlEntityPtr
@ -441,7 +441,7 @@ xmlGetEntityFromTable(xmlEntitiesTablePtr table, const xmlChar *name) {
*
* Do an entity lookup in the internal and external subsets and
* returns the corresponding parameter entity, if found.
*
*
* Returns A pointer to the entity structure or NULL if not found.
*/
xmlEntityPtr
@ -472,7 +472,7 @@ xmlGetParameterEntity(xmlDocPtr doc, const xmlChar *name) {
* Do an entity lookup in the DTD entity hash table and
* returns the corresponding entity, if found.
* Note: the first argument is the document node, not the DTD node.
*
*
* Returns A pointer to the entity structure or NULL if not found.
*/
xmlEntityPtr
@ -496,7 +496,7 @@ xmlGetDtdEntity(xmlDocPtr doc, const xmlChar *name) {
* Do an entity lookup in the document entity hash table and
* returns the corresponding entity, otherwise a lookup is done
* in the predefined entities too.
*
*
* Returns A pointer to the entity structure or NULL if not found.
*/
xmlEntityPtr
@ -900,7 +900,7 @@ xmlFreeEntitiesTable(xmlEntitiesTablePtr table) {
* @ent: An entity
*
* Build a copy of an entity
*
*
* Returns the new xmlEntitiesPtr or NULL in case of error.
*/
static xmlEntityPtr
@ -936,7 +936,7 @@ xmlCopyEntity(xmlEntityPtr ent) {
* @table: An entity table
*
* Build a copy of an entity table.
*
*
* Returns the new xmlEntitiesTablePtr or NULL in case of error.
*/
xmlEntitiesTablePtr
@ -1085,7 +1085,7 @@ static void
xmlDumpEntityDeclScan(xmlEntityPtr ent, xmlBufferPtr buf) {
xmlDumpEntityDecl(buf, ent);
}
/**
* xmlDumpEntitiesTable:
* @buf: An XML buffer.

58
error.c
View File

@ -33,7 +33,7 @@ void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
\
while (size < 64000) { \
va_start(ap, msg); \
chars = vsnprintf(str, size, msg, ap); \
chars = vsnprintf(str, size, msg, ap); \
va_end(ap); \
if ((chars > -1) && (chars < size)) { \
if (prev_size == chars) { \
@ -54,9 +54,9 @@ void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
}
/************************************************************************
* *
* Handling of out of context errors *
* *
* *
* Handling of out of context errors *
* *
************************************************************************/
/**
@ -64,7 +64,7 @@ void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED,
* @ctx: an error context
* @msg: the message to display/transmit
* @...: extra parameters for the message display
*
*
* Default handler for out of context error messages.
*/
void XMLCDECL
@ -82,7 +82,7 @@ xmlGenericErrorDefaultFunc(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) {
/**
* initGenericErrorDefaultFunc:
* @handler: the handler
*
*
* Set or reset (if NULL) the default handler for generic errors
* to the builtin error function.
*/
@ -137,15 +137,15 @@ xmlSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler) {
}
/************************************************************************
* *
* Handling of parsing errors *
* *
* *
* Handling of parsing errors *
* *
************************************************************************/
/**
* xmlParserPrintFileInfo:
* @input: an xmlParserInputPtr input
*
*
* Displays the associated file and line informations for the current input
*/
@ -165,12 +165,12 @@ xmlParserPrintFileInfo(xmlParserInputPtr input) {
/**
* xmlParserPrintFileContext:
* @input: an xmlParserInputPtr input
*
*
* Displays current context within the input content for error tracking
*/
static void
xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
xmlGenericErrorFunc channel, void *data ) {
const xmlChar *cur, *base;
unsigned int n, col; /* GCC warns if signed, because compared with sizeof() */
@ -186,8 +186,8 @@ 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++;
/* calculate the error position in terms of the current position */
@ -196,8 +196,8 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
n = 0;
ctnt = content;
/* copy selected text to our buffer */
while ((*cur != 0) && (*(cur) != '\n') &&
(*(cur) != '\r') && (n < sizeof(content)-1)) {
while ((*cur != 0) && (*(cur) != '\n') &&
(*(cur) != '\r') && (n < sizeof(content)-1)) {
*ctnt++ = *cur++;
n++;
}
@ -221,7 +221,7 @@ xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
/**
* xmlParserPrintFileContext:
* @input: an xmlParserInputPtr input
*
*
* Displays current context within the input content for error tracking
*/
void
@ -292,7 +292,7 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
} else {
if (file != NULL)
channel(data, "%s:%d: ", file, line);
else if ((line != 0) &&
else if ((line != 0) &&
((domain == XML_FROM_PARSER) || (domain == XML_FROM_SCHEMASV)||
(domain == XML_FROM_SCHEMASP)||(domain == XML_FROM_DTD) ||
(domain == XML_FROM_RELAXNGP)||(domain == XML_FROM_RELAXNGV)))
@ -441,7 +441,7 @@ xmlReportError(xmlErrorPtr err, xmlParserCtxtPtr ctxt, const char *str,
* @str2: extra string info
* @str3: extra string info
* @int1: extra int info
* @col: column number of the error or 0 if N/A
* @col: column number of the error or 0 if N/A
* @msg: the message to display/transmit
* @...: extra parameters for the message display
*
@ -671,7 +671,7 @@ __xmlSimpleError(int domain, int code, xmlNodePtr node,
* @ctx: an XML parser context
* @msg: the message to display/transmit
* @...: extra parameters for the message display
*
*
* Display and format an error messages, gives file, line, position and
* extra parameters.
*/
@ -714,7 +714,7 @@ xmlParserError(void *ctx, const char *msg, ...)
* @ctx: an XML parser context
* @msg: the message to display/transmit
* @...: extra parameters for the message display
*
*
* Display and format a warning messages, gives file, line, position and
* extra parameters.
*/
@ -735,7 +735,7 @@ xmlParserWarning(void *ctx, const char *msg, ...)
}
xmlParserPrintFileInfo(input);
}
xmlGenericError(xmlGenericErrorContext, "warning: ");
XML_GET_VAR_STR(msg, str);
xmlGenericError(xmlGenericErrorContext, "%s", str);
@ -753,9 +753,9 @@ xmlParserWarning(void *ctx, const char *msg, ...)
}
/************************************************************************
* *
* Handling of validation errors *
* *
* *
* Handling of validation errors *
* *
************************************************************************/
/**
@ -763,7 +763,7 @@ xmlParserWarning(void *ctx, const char *msg, ...)
* @ctx: an XML parser context
* @msg: the message to display/transmit
* @...: extra parameters for the message display
*
*
* Display and format an validity error messages, gives file,
* line, position and extra parameters.
*/
@ -781,7 +781,7 @@ xmlParserValidityError(void *ctx, const char *msg, ...)
input = ctxt->input;
if ((input->filename == NULL) && (ctxt->inputNr > 1))
input = ctxt->inputTab[ctxt->inputNr - 2];
if (had_info == 0) {
xmlParserPrintFileInfo(input);
}
@ -807,7 +807,7 @@ xmlParserValidityError(void *ctx, const char *msg, ...)
* @ctx: an XML parser context
* @msg: the message to display/transmit
* @...: extra parameters for the message display
*
*
* Display and format a validity warning messages, gives file, line,
* position and extra parameters.
*/
@ -826,7 +826,7 @@ xmlParserValidityWarning(void *ctx, const char *msg, ...)
xmlParserPrintFileInfo(input);
}
xmlGenericError(xmlGenericErrorContext, "validity warning: ");
XML_GET_VAR_STR(msg, str);
xmlGenericError(xmlGenericErrorContext, "%s", str);

View File

@ -65,9 +65,9 @@ void xmlCleanupGlobals(void)
}
/************************************************************************
* *
* *
* All the user accessible global variables of the library *
* *
* *
************************************************************************/
/*
@ -246,7 +246,7 @@ static int xmlPedanticParserDefaultValueThrDef = 0;
* xmlLineNumbersDefaultValue:
*
* Global setting, indicate that the parser should store the line number
* in the content field of elements in the DOM tree.
* in the content field of elements in the DOM tree.
* Disabled by default since this may not be safe for old classes of
* applicaton.
*/
@ -523,7 +523,7 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs)
gs->xmlDefaultSAXLocator.getSystemId = xmlSAX2GetSystemId;
gs->xmlDefaultSAXLocator.getLineNumber = xmlSAX2GetLineNumber;
gs->xmlDefaultSAXLocator.getColumnNumber = xmlSAX2GetColumnNumber;
gs->xmlDoValidityCheckingDefaultValue =
gs->xmlDoValidityCheckingDefaultValue =
xmlDoValidityCheckingDefaultValueThrDef;
#if defined(DEBUG_MEMORY_LOCATION) | defined(DEBUG_MEMORY)
gs->xmlFree = (xmlFreeFunc) xmlMemFree;
@ -548,7 +548,7 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs)
gs->xmlParserVersion = LIBXML_VERSION_STRING;
gs->xmlPedanticParserDefaultValue = xmlPedanticParserDefaultValueThrDef;
gs->xmlSaveNoEmptyTags = xmlSaveNoEmptyTagsThrDef;
gs->xmlSubstituteEntitiesDefaultValue =
gs->xmlSubstituteEntitiesDefaultValue =
xmlSubstituteEntitiesDefaultValueThrDef;
gs->xmlGenericError = xmlGenericErrorThrDef;
@ -600,7 +600,7 @@ xmlRegisterNodeFunc
xmlRegisterNodeDefault(xmlRegisterNodeFunc func)
{
xmlRegisterNodeFunc old = xmlRegisterNodeDefaultValue;
__xmlRegisterCallbacks = 1;
xmlRegisterNodeDefaultValue = func;
return(old);
@ -610,10 +610,10 @@ xmlRegisterNodeFunc
xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func)
{
xmlRegisterNodeFunc old;
xmlMutexLock(xmlThrDefMutex);
old = xmlRegisterNodeDefaultValueThrDef;
__xmlRegisterCallbacks = 1;
xmlRegisterNodeDefaultValueThrDef = func;
xmlMutexUnlock(xmlThrDefMutex);
@ -633,7 +633,7 @@ xmlDeregisterNodeFunc
xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func)
{
xmlDeregisterNodeFunc old = xmlDeregisterNodeDefaultValue;
__xmlRegisterCallbacks = 1;
xmlDeregisterNodeDefaultValue = func;
return(old);
@ -646,7 +646,7 @@ xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func)
xmlMutexLock(xmlThrDefMutex);
old = xmlDeregisterNodeDefaultValueThrDef;
__xmlRegisterCallbacks = 1;
xmlDeregisterNodeDefaultValueThrDef = func;
xmlMutexUnlock(xmlThrDefMutex);
@ -658,7 +658,7 @@ xmlParserInputBufferCreateFilenameFunc
xmlThrDefParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilenameFunc func)
{
xmlParserInputBufferCreateFilenameFunc old;
xmlMutexLock(xmlThrDefMutex);
old = xmlParserInputBufferCreateFilenameValueThrDef;
if (old == NULL) {
@ -675,7 +675,7 @@ xmlOutputBufferCreateFilenameFunc
xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func)
{
xmlOutputBufferCreateFilenameFunc old;
xmlMutexLock(xmlThrDefMutex);
old = xmlOutputBufferCreateFilenameValueThrDef;
#ifdef LIBXML_OUTPUT_ENABLED
@ -732,7 +732,7 @@ __xmlMalloc(void){
if (IS_MAIN_THREAD)
return (&xmlMalloc);
else
return (&xmlGetGlobalState()->xmlMalloc);
return (&xmlGetGlobalState()->xmlMalloc);
}
#undef xmlMallocAtomic

44
hash.c
View File

@ -83,7 +83,7 @@ xmlHashComputeKey(xmlHashTablePtr table, const xmlChar *name,
const xmlChar *name2, const xmlChar *name3) {
unsigned long value = 0L;
char ch;
#ifdef HASH_RANDOMIZATION
value = table->random_seed;
#endif
@ -113,7 +113,7 @@ xmlHashComputeQKey(xmlHashTablePtr table,
const xmlChar *prefix3, const xmlChar *name3) {
unsigned long value = 0L;
char ch;
#ifdef HASH_RANDOMIZATION
value = table->random_seed;
#endif
@ -169,10 +169,10 @@ xmlHashComputeQKey(xmlHashTablePtr table,
xmlHashTablePtr
xmlHashCreate(int size) {
xmlHashTablePtr table;
if (size <= 0)
size = 256;
table = xmlMalloc(sizeof(xmlHashTable));
if (table) {
table->dict = NULL;
@ -180,11 +180,11 @@ xmlHashCreate(int size) {
table->nbElems = 0;
table->table = xmlMalloc(size * sizeof(xmlHashEntry));
if (table->table) {
memset(table->table, 0, size * sizeof(xmlHashEntry));
memset(table->table, 0, size * sizeof(xmlHashEntry));
#ifdef HASH_RANDOMIZATION
table->random_seed = __xmlRandom();
#endif
return(table);
return(table);
}
xmlFree(table);
}
@ -230,7 +230,7 @@ xmlHashGrow(xmlHashTablePtr table, int size) {
#ifdef DEBUG_GROW
unsigned long nbElem = 0;
#endif
if (table == NULL)
return(-1);
if (size < 8)
@ -242,7 +242,7 @@ xmlHashGrow(xmlHashTablePtr table, int size) {
oldtable = table->table;
if (oldtable == NULL)
return(-1);
table->table = xmlMalloc(size * sizeof(xmlHashEntry));
if (table->table == NULL) {
table->table = oldtable;
@ -252,13 +252,13 @@ xmlHashGrow(xmlHashTablePtr table, int size) {
table->size = size;
/* If the two loops are merged, there would be situations where
a new entry needs to allocated and data copied into it from
a new entry needs to allocated and data copied into it from
the main table. So instead, we run through the array twice, first
copying all the elements in the main array (where we can't get
conflicts) and then the rest, so we only free (and don't allocate)
*/
for (i = 0; i < oldsize; i++) {
if (oldtable[i].valid == 0)
if (oldtable[i].valid == 0)
continue;
key = xmlHashComputeKey(table, oldtable[i].name, oldtable[i].name2,
oldtable[i].name3);
@ -282,8 +282,8 @@ xmlHashGrow(xmlHashTablePtr table, int size) {
table->table[key].next = NULL;
xmlFree(iter);
} else {
iter->next = table->table[key].next;
table->table[key].next = iter;
iter->next = table->table[key].next;
table->table[key].next = iter;
}
#ifdef DEBUG_GROW
@ -599,7 +599,7 @@ xmlHashAddEntry3(xmlHashTablePtr table, const xmlChar *name,
entry->valid = 1;
if (insert != NULL)
if (insert != NULL)
insert->next = entry;
table->nbElems++;
@ -748,7 +748,7 @@ xmlHashUpdateEntry3(xmlHashTablePtr table, const xmlChar *name,
* Returns the a pointer to the userdata
*/
void *
xmlHashLookup3(xmlHashTablePtr table, const xmlChar *name,
xmlHashLookup3(xmlHashTablePtr table, const xmlChar *name,
const xmlChar *name2, const xmlChar *name3) {
unsigned long key;
xmlHashEntryPtr entry;
@ -821,14 +821,14 @@ typedef struct {
void *data;
} stubData;
static void
stubHashScannerFull (void *payload, void *data, const xmlChar *name,
static void
stubHashScannerFull (void *payload, void *data, const xmlChar *name,
const xmlChar *name2 ATTRIBUTE_UNUSED,
const xmlChar *name3 ATTRIBUTE_UNUSED) {
stubData *stubdata = (stubData *) data;
stubdata->hashscanner (payload, stubdata->data, (xmlChar *) name);
}
}
/**
* xmlHashScan:
* @table: the hash table
@ -841,7 +841,7 @@ void
xmlHashScan(xmlHashTablePtr table, xmlHashScanner f, void *data) {
stubData stubdata;
stubdata.data = data;
stubdata.hashscanner = f;
stubdata.hashscanner = f;
xmlHashScanFull (table, stubHashScannerFull, &stubdata);
}
@ -866,7 +866,7 @@ xmlHashScanFull(xmlHashTablePtr table, xmlHashScannerFull f, void *data) {
if (table->table) {
for(i = 0; i < table->size; i++) {
if (table->table[i].valid == 0)
if (table->table[i].valid == 0)
continue;
iter = &(table->table[i]);
while (iter) {
@ -905,7 +905,7 @@ xmlHashScanFull(xmlHashTablePtr table, xmlHashScannerFull f, void *data) {
* the comparison is considered to match.
*/
void
xmlHashScan3(xmlHashTablePtr table, const xmlChar *name,
xmlHashScan3(xmlHashTablePtr table, const xmlChar *name,
const xmlChar *name2, const xmlChar *name3,
xmlHashScanner f, void *data) {
xmlHashScanFull3 (table, name, name2, name3,
@ -926,7 +926,7 @@ xmlHashScan3(xmlHashTablePtr table, const xmlChar *name,
* the comparison is considered to match.
*/
void
xmlHashScanFull3(xmlHashTablePtr table, const xmlChar *name,
xmlHashScanFull3(xmlHashTablePtr table, const xmlChar *name,
const xmlChar *name2, const xmlChar *name3,
xmlHashScannerFull f, void *data) {
int i;

View File

@ -47,44 +47,44 @@ XMLPUBFUN int XMLCALL
const unsigned char *in,
int *inlen, int quoteChar);
XMLPUBFUN docbDocPtr XMLCALL
XMLPUBFUN docbDocPtr XMLCALL
docbSAXParseDoc (xmlChar *cur,
const char *encoding,
docbSAXHandlerPtr sax,
void *userData);
XMLPUBFUN docbDocPtr XMLCALL
XMLPUBFUN docbDocPtr XMLCALL
docbParseDoc (xmlChar *cur,
const char *encoding);
XMLPUBFUN docbDocPtr XMLCALL
XMLPUBFUN docbDocPtr XMLCALL
docbSAXParseFile (const char *filename,
const char *encoding,
docbSAXHandlerPtr sax,
void *userData);
XMLPUBFUN docbDocPtr XMLCALL
XMLPUBFUN docbDocPtr XMLCALL
docbParseFile (const char *filename,
const char *encoding);
/**
* Interfaces for the Push mode.
*/
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
docbFreeParserCtxt (docbParserCtxtPtr ctxt);
XMLPUBFUN docbParserCtxtPtr XMLCALL
XMLPUBFUN docbParserCtxtPtr XMLCALL
docbCreatePushParserCtxt(docbSAXHandlerPtr sax,
void *user_data,
const char *chunk,
int size,
const char *filename,
xmlCharEncoding enc);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
docbParseChunk (docbParserCtxtPtr ctxt,
const char *chunk,
int size,
int terminate);
XMLPUBFUN docbParserCtxtPtr XMLCALL
XMLPUBFUN docbParserCtxtPtr XMLCALL
docbCreateFileParserCtxt(const char *filename,
const char *encoding);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
docbParseDocument (docbParserCtxtPtr ctxt);
#ifdef __cplusplus

View File

@ -83,87 +83,87 @@ struct _htmlEntityDesc {
/*
* There is only few public functions.
*/
XMLPUBFUN const htmlElemDesc * XMLCALL
XMLPUBFUN const htmlElemDesc * XMLCALL
htmlTagLookup (const xmlChar *tag);
XMLPUBFUN const htmlEntityDesc * XMLCALL
XMLPUBFUN const htmlEntityDesc * XMLCALL
htmlEntityLookup(const xmlChar *name);
XMLPUBFUN const htmlEntityDesc * XMLCALL
XMLPUBFUN const htmlEntityDesc * XMLCALL
htmlEntityValueLookup(unsigned int value);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
htmlIsAutoClosed(htmlDocPtr doc,
htmlNodePtr elem);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
htmlAutoCloseTag(htmlDocPtr doc,
const xmlChar *name,
htmlNodePtr elem);
XMLPUBFUN const htmlEntityDesc * XMLCALL
XMLPUBFUN const htmlEntityDesc * XMLCALL
htmlParseEntityRef(htmlParserCtxtPtr ctxt,
const xmlChar **str);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
htmlParseCharRef(htmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
htmlParseElement(htmlParserCtxtPtr ctxt);
XMLPUBFUN htmlParserCtxtPtr XMLCALL
XMLPUBFUN htmlParserCtxtPtr XMLCALL
htmlNewParserCtxt(void);
XMLPUBFUN htmlParserCtxtPtr XMLCALL
XMLPUBFUN htmlParserCtxtPtr XMLCALL
htmlCreateMemoryParserCtxt(const char *buffer,
int size);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
htmlParseDocument(htmlParserCtxtPtr ctxt);
XMLPUBFUN htmlDocPtr XMLCALL
XMLPUBFUN htmlDocPtr XMLCALL
htmlSAXParseDoc (xmlChar *cur,
const char *encoding,
htmlSAXHandlerPtr sax,
void *userData);
XMLPUBFUN htmlDocPtr XMLCALL
XMLPUBFUN htmlDocPtr XMLCALL
htmlParseDoc (xmlChar *cur,
const char *encoding);
XMLPUBFUN htmlDocPtr XMLCALL
XMLPUBFUN htmlDocPtr XMLCALL
htmlSAXParseFile(const char *filename,
const char *encoding,
htmlSAXHandlerPtr sax,
void *userData);
XMLPUBFUN htmlDocPtr XMLCALL
XMLPUBFUN htmlDocPtr XMLCALL
htmlParseFile (const char *filename,
const char *encoding);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
UTF8ToHtml (unsigned char *out,
int *outlen,
const unsigned char *in,
int *inlen);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
htmlEncodeEntities(unsigned char *out,
int *outlen,
const unsigned char *in,
int *inlen, int quoteChar);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
htmlIsScriptAttribute(const xmlChar *name);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
htmlHandleOmittedElem(int val);
#ifdef LIBXML_PUSH_ENABLED
/**
* Interfaces for the Push mode.
*/
XMLPUBFUN htmlParserCtxtPtr XMLCALL
XMLPUBFUN htmlParserCtxtPtr XMLCALL
htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
void *user_data,
const char *chunk,
int size,
const char *filename,
xmlCharEncoding enc);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
htmlParseChunk (htmlParserCtxtPtr ctxt,
const char *chunk,
int size,
int terminate);
#endif /* LIBXML_PUSH_ENABLED */
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
/*

View File

@ -62,78 +62,78 @@ extern "C" {
XMLPUBFUN htmlDocPtr XMLCALL
htmlNewDoc (const xmlChar *URI,
const xmlChar *ExternalID);
XMLPUBFUN htmlDocPtr XMLCALL
XMLPUBFUN htmlDocPtr XMLCALL
htmlNewDocNoDtD (const xmlChar *URI,
const xmlChar *ExternalID);
XMLPUBFUN const xmlChar * XMLCALL
XMLPUBFUN const xmlChar * XMLCALL
htmlGetMetaEncoding (htmlDocPtr doc);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
htmlSetMetaEncoding (htmlDocPtr doc,
const xmlChar *encoding);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
htmlDocDumpMemory (xmlDocPtr cur,
xmlChar **mem,
int *size);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
htmlDocDumpMemoryFormat (xmlDocPtr cur,
xmlChar **mem,
int *size,
int format);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
htmlDocDump (FILE *f,
xmlDocPtr cur);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
htmlSaveFile (const char *filename,
xmlDocPtr cur);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
htmlNodeDump (xmlBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
htmlNodeDumpFile (FILE *out,
xmlDocPtr doc,
xmlNodePtr cur);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
htmlNodeDumpFileFormat (FILE *out,
xmlDocPtr doc,
xmlNodePtr cur,
const char *encoding,
int format);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
htmlSaveFileEnc (const char *filename,
xmlDocPtr cur,
const char *encoding);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
htmlSaveFileFormat (const char *filename,
xmlDocPtr cur,
const char *encoding,
int format);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
const char *encoding,
int format);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding,
int format);
XMLPUBFUN void XMLCALL
htmlNodeDumpOutput (xmlOutputBufferPtr buf,
XMLPUBFUN void XMLCALL
htmlNodeDumpOutput (xmlOutputBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
xmlNodePtr cur,
const char *encoding);
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
htmlIsBooleanAttr (const xmlChar *name);

View File

@ -25,53 +25,53 @@ extern "C" {
#endif
XMLPUBFUN const xmlChar * XMLCALL
getPublicId (void *ctx);
XMLPUBFUN const xmlChar * XMLCALL
XMLPUBFUN const xmlChar * XMLCALL
getSystemId (void *ctx);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
setDocumentLocator (void *ctx,
xmlSAXLocatorPtr loc);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
getLineNumber (void *ctx);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
getColumnNumber (void *ctx);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
isStandalone (void *ctx);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
hasInternalSubset (void *ctx);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
hasExternalSubset (void *ctx);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
internalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
externalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN xmlEntityPtr XMLCALL
XMLPUBFUN xmlEntityPtr XMLCALL
getEntity (void *ctx,
const xmlChar *name);
XMLPUBFUN xmlEntityPtr XMLCALL
XMLPUBFUN xmlEntityPtr XMLCALL
getParameterEntity (void *ctx,
const xmlChar *name);
XMLPUBFUN xmlParserInputPtr XMLCALL
XMLPUBFUN xmlParserInputPtr XMLCALL
resolveEntity (void *ctx,
const xmlChar *publicId,
const xmlChar *systemId);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
entityDecl (void *ctx,
const xmlChar *name,
int type,
const xmlChar *publicId,
const xmlChar *systemId,
xmlChar *content);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
attributeDecl (void *ctx,
const xmlChar *elem,
const xmlChar *fullname,
@ -79,87 +79,87 @@ XMLPUBFUN void XMLCALL
int def,
const xmlChar *defaultValue,
xmlEnumerationPtr tree);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
elementDecl (void *ctx,
const xmlChar *name,
int type,
xmlElementContentPtr content);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
notationDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
unparsedEntityDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId,
const xmlChar *notationName);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
startDocument (void *ctx);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
endDocument (void *ctx);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
attribute (void *ctx,
const xmlChar *fullname,
const xmlChar *value);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
startElement (void *ctx,
const xmlChar *fullname,
const xmlChar **atts);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
endElement (void *ctx,
const xmlChar *name);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
reference (void *ctx,
const xmlChar *name);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
characters (void *ctx,
const xmlChar *ch,
int len);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
ignorableWhitespace (void *ctx,
const xmlChar *ch,
int len);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
processingInstruction (void *ctx,
const xmlChar *target,
const xmlChar *data);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
globalNamespace (void *ctx,
const xmlChar *href,
const xmlChar *prefix);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
setNamespace (void *ctx,
const xmlChar *name);
XMLPUBFUN xmlNsPtr XMLCALL
XMLPUBFUN xmlNsPtr XMLCALL
getNamespace (void *ctx);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
checkNamespace (void *ctx,
xmlChar *nameSpace);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
namespaceDecl (void *ctx,
const xmlChar *href,
const xmlChar *prefix);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
comment (void *ctx,
const xmlChar *value);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
cdataBlock (void *ctx,
const xmlChar *value,
int len);
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr,
int warning);
#ifdef LIBXML_HTML_ENABLED
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
#endif
#ifdef LIBXML_DOCB_ENABLED
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
initdocbDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
#endif
#endif /* LIBXML_SAX1_ENABLED */

View File

@ -23,53 +23,53 @@ extern "C" {
#endif
XMLPUBFUN const xmlChar * XMLCALL
xmlSAX2GetPublicId (void *ctx);
XMLPUBFUN const xmlChar * XMLCALL
XMLPUBFUN const xmlChar * XMLCALL
xmlSAX2GetSystemId (void *ctx);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2SetDocumentLocator (void *ctx,
xmlSAXLocatorPtr loc);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSAX2GetLineNumber (void *ctx);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSAX2GetColumnNumber (void *ctx);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSAX2IsStandalone (void *ctx);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSAX2HasInternalSubset (void *ctx);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSAX2HasExternalSubset (void *ctx);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2InternalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2ExternalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN xmlEntityPtr XMLCALL
XMLPUBFUN xmlEntityPtr XMLCALL
xmlSAX2GetEntity (void *ctx,
const xmlChar *name);
XMLPUBFUN xmlEntityPtr XMLCALL
XMLPUBFUN xmlEntityPtr XMLCALL
xmlSAX2GetParameterEntity (void *ctx,
const xmlChar *name);
XMLPUBFUN xmlParserInputPtr XMLCALL
XMLPUBFUN xmlParserInputPtr XMLCALL
xmlSAX2ResolveEntity (void *ctx,
const xmlChar *publicId,
const xmlChar *systemId);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2EntityDecl (void *ctx,
const xmlChar *name,
int type,
const xmlChar *publicId,
const xmlChar *systemId,
xmlChar *content);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2AttributeDecl (void *ctx,
const xmlChar *elem,
const xmlChar *fullname,
@ -77,33 +77,33 @@ XMLPUBFUN void XMLCALL
int def,
const xmlChar *defaultValue,
xmlEnumerationPtr tree);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2ElementDecl (void *ctx,
const xmlChar *name,
int type,
xmlElementContentPtr content);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2NotationDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2UnparsedEntityDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId,
const xmlChar *notationName);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2StartDocument (void *ctx);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2EndDocument (void *ctx);
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2StartElement (void *ctx,
const xmlChar *fullname,
const xmlChar **atts);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2EndElement (void *ctx,
const xmlChar *name);
#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED */
@ -122,25 +122,25 @@ XMLPUBFUN void XMLCALL
const xmlChar *localname,
const xmlChar *prefix,
const xmlChar *URI);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2Reference (void *ctx,
const xmlChar *name);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2Characters (void *ctx,
const xmlChar *ch,
int len);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2IgnorableWhitespace (void *ctx,
const xmlChar *ch,
int len);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2ProcessingInstruction (void *ctx,
const xmlChar *target,
const xmlChar *data);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2Comment (void *ctx,
const xmlChar *value);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2CDataBlock (void *ctx,
const xmlChar *value,
int len);
@ -153,22 +153,22 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSAXVersion (xmlSAXHandler *hdlr,
int version);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
int warning);
#ifdef LIBXML_HTML_ENABLED
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
htmlDefaultSAXHandlerInit (void);
#endif
#ifdef LIBXML_DOCB_ENABLED
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
docbDefaultSAXHandlerInit (void);
#endif
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDefaultSAXHandlerInit (void);
#ifdef __cplusplus
}

View File

@ -54,7 +54,7 @@ extern "C" {
/*
* xmlC14NMode:
*
*
* Predefined values for C14N modes
*
*/

View File

@ -68,111 +68,111 @@ typedef xmlCatalog *xmlCatalogPtr;
*/
XMLPUBFUN xmlCatalogPtr XMLCALL
xmlNewCatalog (int sgml);
XMLPUBFUN xmlCatalogPtr XMLCALL
XMLPUBFUN xmlCatalogPtr XMLCALL
xmlLoadACatalog (const char *filename);
XMLPUBFUN xmlCatalogPtr XMLCALL
XMLPUBFUN xmlCatalogPtr XMLCALL
xmlLoadSGMLSuperCatalog (const char *filename);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlConvertSGMLCatalog (xmlCatalogPtr catal);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlACatalogAdd (xmlCatalogPtr catal,
const xmlChar *type,
const xmlChar *orig,
const xmlChar *replace);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlACatalogRemove (xmlCatalogPtr catal,
const xmlChar *value);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlACatalogResolve (xmlCatalogPtr catal,
const xmlChar *pubID,
const xmlChar *sysID);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlACatalogResolveSystem(xmlCatalogPtr catal,
const xmlChar *sysID);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlACatalogResolvePublic(xmlCatalogPtr catal,
const xmlChar *pubID);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlACatalogResolveURI (xmlCatalogPtr catal,
const xmlChar *URI);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlACatalogDump (xmlCatalogPtr catal,
FILE *out);
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeCatalog (xmlCatalogPtr catal);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlCatalogIsEmpty (xmlCatalogPtr catal);
/*
* Global operations.
*/
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlInitializeCatalog (void);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlLoadCatalog (const char *filename);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlLoadCatalogs (const char *paths);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlCatalogCleanup (void);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlCatalogDump (FILE *out);
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlCatalogResolve (const xmlChar *pubID,
const xmlChar *sysID);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlCatalogResolveSystem (const xmlChar *sysID);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlCatalogResolvePublic (const xmlChar *pubID);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlCatalogResolveURI (const xmlChar *URI);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlCatalogAdd (const xmlChar *type,
const xmlChar *orig,
const xmlChar *replace);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlCatalogRemove (const xmlChar *value);
XMLPUBFUN xmlDocPtr XMLCALL
XMLPUBFUN xmlDocPtr XMLCALL
xmlParseCatalogFile (const char *filename);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlCatalogConvert (void);
/*
* Strictly minimal interfaces for per-document catalogs used
* by the parser.
*/
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlCatalogFreeLocal (void *catalogs);
XMLPUBFUN void * XMLCALL
XMLPUBFUN void * XMLCALL
xmlCatalogAddLocal (void *catalogs,
const xmlChar *URL);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlCatalogLocalResolve (void *catalogs,
const xmlChar *pubID,
const xmlChar *sysID);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlCatalogLocalResolveURI(void *catalogs,
const xmlChar *URI);
/*
* Preference settings.
*/
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlCatalogSetDebug (int level);
XMLPUBFUN xmlCatalogPrefer XMLCALL
XMLPUBFUN xmlCatalogPrefer XMLCALL
xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlCatalogSetDefaults (xmlCatalogAllow allow);
XMLPUBFUN xmlCatalogAllow XMLCALL
XMLPUBFUN xmlCatalogAllow XMLCALL
xmlCatalogGetDefaults (void);
/* DEPRECATED interfaces */
XMLPUBFUN const xmlChar * XMLCALL
XMLPUBFUN const xmlChar * XMLCALL
xmlCatalogGetSystem (const xmlChar *sysID);
XMLPUBFUN const xmlChar * XMLCALL
XMLPUBFUN const xmlChar * XMLCALL
xmlCatalogGetPublic (const xmlChar *pubID);
#ifdef __cplusplus

View File

@ -25,18 +25,18 @@ extern "C" {
/*
* The standard Dump routines.
*/
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDebugDumpString (FILE *output,
const xmlChar *str);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDebugDumpAttr (FILE *output,
xmlAttrPtr attr,
int depth);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDebugDumpAttrList (FILE *output,
xmlAttrPtr attr,
int depth);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDebugDumpOneNode (FILE *output,
xmlNodePtr node,
int depth);
@ -54,16 +54,16 @@ XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDebugDumpDocument (FILE *output,
xmlDocPtr doc);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDebugDumpDTD (FILE *output,
xmlDtdPtr dtd);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDebugDumpEntities (FILE *output,
xmlDocPtr doc);
/****************************************************************
* *
* Checking routines *
* Checking routines *
* *
****************************************************************/
@ -73,16 +73,16 @@ XMLPUBFUN int XMLCALL
/****************************************************************
* *
* XML shell helpers *
* XML shell helpers *
* *
****************************************************************/
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlLsOneNode (FILE *output, xmlNodePtr node);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlLsCountNode (xmlNodePtr node);
XMLPUBFUN const char * XMLCALL
XMLPUBFUN const char * XMLCALL
xmlBoolToText (int boolval);
/****************************************************************
@ -136,63 +136,63 @@ typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
xmlNodePtr node,
xmlNodePtr node2);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlShellPrintXPathError (int errorType,
const char *arg);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlShellPrintXPathResult(xmlXPathObjectPtr list);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlShellList (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlShellBase (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlShellDir (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlShellLoad (xmlShellCtxtPtr ctxt,
char *filename,
xmlNodePtr node,
xmlNodePtr node2);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlShellPrintNode (xmlNodePtr node);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlShellCat (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlShellWrite (xmlShellCtxtPtr ctxt,
char *filename,
xmlNodePtr node,
xmlNodePtr node2);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlShellSave (xmlShellCtxtPtr ctxt,
char *filename,
xmlNodePtr node,
xmlNodePtr node2);
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_VALID_ENABLED
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlShellValidate (xmlShellCtxtPtr ctxt,
char *dtd,
xmlNodePtr node,
xmlNodePtr node2);
#endif /* LIBXML_VALID_ENABLED */
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlShellDu (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr tree,
xmlNodePtr node2);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlShellPwd (xmlShellCtxtPtr ctxt,
char *buffer,
xmlNodePtr node,
@ -201,12 +201,12 @@ XMLPUBFUN int XMLCALL
/*
* The Shell interface.
*/
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlShell (xmlDocPtr doc,
char *filename,
xmlShellReadlineFunc input,
FILE *output);
#endif /* LIBXML_XPATH_ENABLED */
#ifdef __cplusplus

View File

@ -163,32 +163,32 @@ extern "C" {
/*
* Interfaces for encoding handlers.
*/
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlInitCharEncodingHandlers (void);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlCleanupCharEncodingHandlers (void);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
xmlGetCharEncodingHandler (xmlCharEncoding enc);
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
xmlFindCharEncodingHandler (const char *name);
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
xmlNewCharEncodingHandler (const char *name,
xmlCharEncodingInputFunc input,
xmlCharEncodingOutputFunc output);
xmlNewCharEncodingHandler (const char *name,
xmlCharEncodingInputFunc input,
xmlCharEncodingOutputFunc output);
/*
* Interfaces for encoding names and aliases.
*/
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlAddEncodingAlias (const char *name,
const char *alias);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlDelEncodingAlias (const char *alias);
XMLPUBFUN const char * XMLCALL
xmlGetEncodingAlias (const char *alias);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlCleanupEncodingAliases (void);
XMLPUBFUN xmlCharEncoding XMLCALL
xmlParseCharEncoding (const char *name);
@ -202,12 +202,12 @@ XMLPUBFUN xmlCharEncoding XMLCALL
xmlDetectCharEncoding (const unsigned char *in,
int len);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
xmlBufferPtr out,
xmlBufferPtr in);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlCharEncInFunc (xmlCharEncodingHandler *handler,
xmlBufferPtr out,
xmlBufferPtr in);
@ -215,20 +215,20 @@ XMLPUBFUN int XMLCALL
xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
xmlBufferPtr out,
xmlBufferPtr in);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);
/*
* Export a few useful functions
*/
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
UTF8Toisolat1 (unsigned char *out,
int *outlen,
const unsigned char *in,
int *inlen);
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
isolat1ToUTF8 (unsigned char *out,
int *outlen,
const unsigned char *in,

View File

@ -1,7 +1,7 @@
/*
* Summary: Chained hash tables
* Description: This module implements the hash table support used in
* various places in the library.
* Description: This module implements the hash table support used in
* various places in the library.
*
* Copy: See Copyright for the status of this software.
*
@ -108,40 +108,40 @@ XMLPUBFUN xmlHashTablePtr XMLCALL
XMLPUBFUN xmlHashTablePtr XMLCALL
xmlHashCreateDict(int size,
xmlDictPtr dict);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlHashFree (xmlHashTablePtr table,
xmlHashDeallocator f);
/*
* Add a new entry to the hash table.
*/
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlHashAddEntry (xmlHashTablePtr table,
const xmlChar *name,
void *userdata);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlHashUpdateEntry(xmlHashTablePtr table,
const xmlChar *name,
void *userdata,
xmlHashDeallocator f);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlHashAddEntry2(xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *name2,
void *userdata);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlHashUpdateEntry2(xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *name2,
void *userdata,
xmlHashDeallocator f);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlHashAddEntry3(xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *name2,
const xmlChar *name3,
void *userdata);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlHashUpdateEntry3(xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *name2,
@ -152,13 +152,13 @@ XMLPUBFUN int XMLCALL
/*
* Remove an entry from the hash table.
*/
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name,
xmlHashDeallocator f);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name,
const xmlChar *name2, xmlHashDeallocator f);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name,
const xmlChar *name2, const xmlChar *name3,
xmlHashDeallocator f);
@ -166,29 +166,29 @@ XMLPUBFUN int XMLCALL
/*
* Retrieve the userdata.
*/
XMLPUBFUN void * XMLCALL
XMLPUBFUN void * XMLCALL
xmlHashLookup (xmlHashTablePtr table,
const xmlChar *name);
XMLPUBFUN void * XMLCALL
XMLPUBFUN void * XMLCALL
xmlHashLookup2 (xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *name2);
XMLPUBFUN void * XMLCALL
XMLPUBFUN void * XMLCALL
xmlHashLookup3 (xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *name2,
const xmlChar *name3);
XMLPUBFUN void * XMLCALL
XMLPUBFUN void * XMLCALL
xmlHashQLookup (xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *prefix);
XMLPUBFUN void * XMLCALL
XMLPUBFUN void * XMLCALL
xmlHashQLookup2 (xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *prefix,
const xmlChar *name2,
const xmlChar *prefix2);
XMLPUBFUN void * XMLCALL
XMLPUBFUN void * XMLCALL
xmlHashQLookup3 (xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *prefix,
@ -200,27 +200,27 @@ XMLPUBFUN void * XMLCALL
/*
* Helpers.
*/
XMLPUBFUN xmlHashTablePtr XMLCALL
XMLPUBFUN xmlHashTablePtr XMLCALL
xmlHashCopy (xmlHashTablePtr table,
xmlHashCopier f);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlHashSize (xmlHashTablePtr table);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlHashScan (xmlHashTablePtr table,
xmlHashScanner f,
void *data);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlHashScan3 (xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *name2,
const xmlChar *name3,
xmlHashScanner f,
void *data);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlHashScanFull (xmlHashTablePtr table,
xmlHashScannerFull f,
void *data);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlHashScanFull3(xmlHashTablePtr table,
const xmlChar *name,
const xmlChar *name2,

View File

@ -1,6 +1,6 @@
/*
* Summary: lists interfaces
* Description: this module implement the list support used in
* Description: this module implement the list support used in
* various place in the library.
*
* Copy: See Copyright for the status of this software.
@ -55,76 +55,76 @@ typedef int (*xmlListWalker) (const void *data, const void *user);
XMLPUBFUN xmlListPtr XMLCALL
xmlListCreate (xmlListDeallocator deallocator,
xmlListDataCompare compare);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlListDelete (xmlListPtr l);
/* Basic Operators */
XMLPUBFUN void * XMLCALL
XMLPUBFUN void * XMLCALL
xmlListSearch (xmlListPtr l,
void *data);
XMLPUBFUN void * XMLCALL
XMLPUBFUN void * XMLCALL
xmlListReverseSearch (xmlListPtr l,
void *data);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlListInsert (xmlListPtr l,
void *data) ;
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlListAppend (xmlListPtr l,
void *data) ;
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlListRemoveFirst (xmlListPtr l,
void *data);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlListRemoveLast (xmlListPtr l,
void *data);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlListRemoveAll (xmlListPtr l,
void *data);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlListClear (xmlListPtr l);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlListEmpty (xmlListPtr l);
XMLPUBFUN xmlLinkPtr XMLCALL
XMLPUBFUN xmlLinkPtr XMLCALL
xmlListFront (xmlListPtr l);
XMLPUBFUN xmlLinkPtr XMLCALL
XMLPUBFUN xmlLinkPtr XMLCALL
xmlListEnd (xmlListPtr l);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlListSize (xmlListPtr l);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlListPopFront (xmlListPtr l);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlListPopBack (xmlListPtr l);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlListPushFront (xmlListPtr l,
void *data);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlListPushBack (xmlListPtr l,
void *data);
/* Advanced Operators */
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlListReverse (xmlListPtr l);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlListSort (xmlListPtr l);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlListWalk (xmlListPtr l,
xmlListWalker walker,
const void *user);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlListReverseWalk (xmlListPtr l,
xmlListWalker walker,
const void *user);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlListMerge (xmlListPtr l1,
xmlListPtr l2);
XMLPUBFUN xmlListPtr XMLCALL
XMLPUBFUN xmlListPtr XMLCALL
xmlListDup (const xmlListPtr old);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlListCopy (xmlListPtr cur,
const xmlListPtr old);
/* Link operators */
XMLPUBFUN void * XMLCALL
XMLPUBFUN void * XMLCALL
xmlLinkGetData (xmlLinkPtr lk);
/* xmlListUnique() */

View File

@ -7,7 +7,7 @@
*
* Author: Daniel Veillard
*/
#ifndef __NANO_HTTP_H__
#define __NANO_HTTP_H__
@ -20,22 +20,22 @@ extern "C" {
#endif
XMLPUBFUN void XMLCALL
xmlNanoHTTPInit (void);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlNanoHTTPCleanup (void);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlNanoHTTPScanProxy (const char *URL);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlNanoHTTPFetch (const char *URL,
const char *filename,
char **contentType);
XMLPUBFUN void * XMLCALL
XMLPUBFUN void * XMLCALL
xmlNanoHTTPMethod (const char *URL,
const char *method,
const char *input,
char **contentType,
const char *headers,
int ilen);
XMLPUBFUN void * XMLCALL
XMLPUBFUN void * XMLCALL
xmlNanoHTTPMethodRedir (const char *URL,
const char *method,
const char *input,
@ -43,16 +43,16 @@ XMLPUBFUN void * XMLCALL
char **redir,
const char *headers,
int ilen);
XMLPUBFUN void * XMLCALL
XMLPUBFUN void * XMLCALL
xmlNanoHTTPOpen (const char *URL,
char **contentType);
XMLPUBFUN void * XMLCALL
XMLPUBFUN void * XMLCALL
xmlNanoHTTPOpenRedir (const char *URL,
char **contentType,
char **redir);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlNanoHTTPReturnCode (void *ctx);
XMLPUBFUN const char * XMLCALL
XMLPUBFUN const char * XMLCALL
xmlNanoHTTPAuthHeader (void *ctx);
XMLPUBFUN const char * XMLCALL
xmlNanoHTTPRedir (void *ctx);
@ -62,16 +62,16 @@ XMLPUBFUN const char * XMLCALL
xmlNanoHTTPEncoding (void *ctx);
XMLPUBFUN const char * XMLCALL
xmlNanoHTTPMimeType (void *ctx);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlNanoHTTPRead (void *ctx,
void *dest,
int len);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlNanoHTTPSave (void *ctxt,
const char *filename);
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlNanoHTTPClose (void *ctx);
#ifdef __cplusplus
}

View File

@ -80,7 +80,7 @@ struct _xmlParserInput {
* xmlParserNodeInfo:
*
* The parser can be asked to collect Node informations, i.e. at what
* place in the file they were detected.
* place in the file they were detected.
* NOTE: This is off by default and not very well tested.
*/
typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
@ -125,9 +125,9 @@ typedef enum {
XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */
XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */
XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */
XML_PARSER_EPILOG, /* the Misc* after the last end tag */
XML_PARSER_EPILOG, /* the Misc* after the last end tag */
XML_PARSER_IGNORE, /* within an IGNORED section */
XML_PARSER_PUBLIC_LITERAL /* within a PUBLIC value */
XML_PARSER_PUBLIC_LITERAL /* within a PUBLIC value */
} xmlParserInputState;
/**
@ -221,7 +221,7 @@ struct _xmlParserCtxt {
xmlValidCtxt vctxt; /* The validity context */
xmlParserInputState instate; /* current type of input */
int token; /* next char look-ahead */
int token; /* next char look-ahead */
char *directory; /* the data directory */
@ -400,8 +400,8 @@ typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
/**
* entityDeclSAXFunc:
* @ctx: the user data (XML parser context)
* @name: the entity name
* @type: the entity type
* @name: the entity name
* @type: the entity type
* @publicId: The public ID of the entity
* @systemId: The system ID of the entity
* @content: the entity value (without processing).
@ -431,8 +431,8 @@ typedef void (*notationDeclSAXFunc)(void *ctx,
* attributeDeclSAXFunc:
* @ctx: the user data (XML parser context)
* @elem: the name of the element
* @fullname: the attribute name
* @type: the attribute type
* @fullname: the attribute name
* @type: the attribute type
* @def: the type of default value
* @defaultValue: the attribute default value
* @tree: the tree of enumerated value set
@ -449,8 +449,8 @@ typedef void (*attributeDeclSAXFunc)(void *ctx,
/**
* elementDeclSAXFunc:
* @ctx: the user data (XML parser context)
* @name: the element name
* @type: the element type
* @name: the element name
* @type: the element type
* @content: the element value tree
*
* An element definition has been parsed.
@ -537,7 +537,7 @@ typedef void (*attributeSAXFunc) (void *ctx,
* @ctx: the user data (XML parser context)
* @name: The entity name
*
* Called when an entity reference is detected.
* Called when an entity reference is detected.
*/
typedef void (*referenceSAXFunc) (void *ctx,
const xmlChar *name);
@ -601,7 +601,7 @@ typedef void (*cdataBlockSAXFunc) (
* @ctx: an XML parser context
* @msg: the message to display/transmit
* @...: extra parameters for the message display
*
*
* Display and format a warning messages, callback.
*/
typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
@ -611,7 +611,7 @@ typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
* @ctx: an XML parser context
* @msg: the message to display/transmit
* @...: extra parameters for the message display
*
*
* Display and format an error messages, callback.
*/
typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
@ -621,7 +621,7 @@ typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
* @ctx: an XML parser context
* @msg: the message to display/transmit
* @...: extra parameters for the message display
*
*
* Display and format fatal error messages, callback.
* Note: so far fatalError() SAX callbacks are not used, error()
* get all the callbacks for errors.
@ -697,7 +697,7 @@ typedef void (*startElementNsSAX2Func) (void *ctx,
int nb_attributes,
int nb_defaulted,
const xmlChar **attributes);
/**
* endElementNsSAX2Func:
* @ctx: the user data (XML parser context)
@ -792,7 +792,7 @@ struct _xmlSAXHandlerV1 {
* xmlExternalEntityLoader:
* @URL: The System ID of the resource requested
* @ID: The Public ID of the resource requested
* @context: the XML parser context
* @context: the XML parser context
*
* External entity loaders types.
*
@ -818,18 +818,18 @@ extern "C" {
/*
* Init/Cleanup
*/
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlInitParser (void);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlCleanupParser (void);
/*
* Input functions
*/
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParserInputRead (xmlParserInputPtr in,
int len);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParserInputGrow (xmlParserInputPtr in,
int len);
@ -837,101 +837,101 @@ XMLPUBFUN int XMLCALL
* Basic parsing Interfaces
*/
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN xmlDocPtr XMLCALL
XMLPUBFUN xmlDocPtr XMLCALL
xmlParseDoc (const xmlChar *cur);
XMLPUBFUN xmlDocPtr XMLCALL
XMLPUBFUN xmlDocPtr XMLCALL
xmlParseFile (const char *filename);
XMLPUBFUN xmlDocPtr XMLCALL
XMLPUBFUN xmlDocPtr XMLCALL
xmlParseMemory (const char *buffer,
int size);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSubstituteEntitiesDefault(int val);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlKeepBlanksDefault (int val);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlStopParser (xmlParserCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlPedanticParserDefault(int val);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlLineNumbersDefault (int val);
#ifdef LIBXML_SAX1_ENABLED
/*
* Recovery mode
* Recovery mode
*/
XMLPUBFUN xmlDocPtr XMLCALL
XMLPUBFUN xmlDocPtr XMLCALL
xmlRecoverDoc (const xmlChar *cur);
XMLPUBFUN xmlDocPtr XMLCALL
XMLPUBFUN xmlDocPtr XMLCALL
xmlRecoverMemory (const char *buffer,
int size);
XMLPUBFUN xmlDocPtr XMLCALL
XMLPUBFUN xmlDocPtr XMLCALL
xmlRecoverFile (const char *filename);
#endif /* LIBXML_SAX1_ENABLED */
/*
* Less common routines and SAX interfaces
*/
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParseDocument (xmlParserCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
void *user_data,
const char *filename);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
void *user_data,
const char *buffer,
int size);
XMLPUBFUN xmlDocPtr XMLCALL
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseDoc (xmlSAXHandlerPtr sax,
const xmlChar *cur,
int recovery);
XMLPUBFUN xmlDocPtr XMLCALL
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseMemory (xmlSAXHandlerPtr sax,
const char *buffer,
int size,
int size,
int recovery);
XMLPUBFUN xmlDocPtr XMLCALL
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
const char *buffer,
int size,
int size,
int recovery,
void *data);
XMLPUBFUN xmlDocPtr XMLCALL
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseFile (xmlSAXHandlerPtr sax,
const char *filename,
int recovery);
XMLPUBFUN xmlDocPtr XMLCALL
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
const char *filename,
int recovery,
void *data);
XMLPUBFUN xmlDocPtr XMLCALL
XMLPUBFUN xmlDocPtr XMLCALL
xmlSAXParseEntity (xmlSAXHandlerPtr sax,
const char *filename);
XMLPUBFUN xmlDocPtr XMLCALL
XMLPUBFUN xmlDocPtr XMLCALL
xmlParseEntity (const char *filename);
#endif /* LIBXML_SAX1_ENABLED */
#ifdef LIBXML_VALID_ENABLED
XMLPUBFUN xmlDtdPtr XMLCALL
XMLPUBFUN xmlDtdPtr XMLCALL
xmlSAXParseDTD (xmlSAXHandlerPtr sax,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN xmlDtdPtr XMLCALL
XMLPUBFUN xmlDtdPtr XMLCALL
xmlParseDTD (const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN xmlDtdPtr XMLCALL
XMLPUBFUN xmlDtdPtr XMLCALL
xmlIOParseDTD (xmlSAXHandlerPtr sax,
xmlParserInputBufferPtr input,
xmlCharEncoding enc);
#endif /* LIBXML_VALID_ENABLE */
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParseBalancedChunkMemory(xmlDocPtr doc,
xmlSAXHandlerPtr sax,
void *user_data,
@ -946,7 +946,7 @@ XMLPUBFUN xmlParserErrors XMLCALL
int options,
xmlNodePtr *lst);
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
xmlSAXHandlerPtr sax,
void *user_data,
@ -954,7 +954,7 @@ XMLPUBFUN int XMLCALL
const xmlChar *string,
xmlNodePtr *lst,
int recover);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParseExternalEntity (xmlDocPtr doc,
xmlSAXHandlerPtr sax,
void *user_data,
@ -963,7 +963,7 @@ XMLPUBFUN int XMLCALL
const xmlChar *ID,
xmlNodePtr *lst);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
const xmlChar *URL,
const xmlChar *ID,
@ -972,35 +972,35 @@ XMLPUBFUN int XMLCALL
/*
* Parser contexts handling.
*/
XMLPUBFUN xmlParserCtxtPtr XMLCALL
XMLPUBFUN xmlParserCtxtPtr XMLCALL
xmlNewParserCtxt (void);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
const xmlChar* buffer,
const char *filename);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN xmlParserCtxtPtr XMLCALL
XMLPUBFUN xmlParserCtxtPtr XMLCALL
xmlCreateDocParserCtxt (const xmlChar *cur);
#ifdef LIBXML_LEGACY_ENABLED
/*
* Reading/setting optional parsing features.
*/
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlGetFeaturesList (int *len,
const char **result);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlGetFeature (xmlParserCtxtPtr ctxt,
const char *name,
void *result);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSetFeature (xmlParserCtxtPtr ctxt,
const char *name,
void *value);
@ -1010,13 +1010,13 @@ XMLPUBFUN int XMLCALL
/*
* Interfaces for the Push mode.
*/
XMLPUBFUN xmlParserCtxtPtr XMLCALL
XMLPUBFUN xmlParserCtxtPtr XMLCALL
xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
void *user_data,
const char *chunk,
int size,
const char *filename);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParseChunk (xmlParserCtxtPtr ctxt,
const char *chunk,
int size,
@ -1027,7 +1027,7 @@ XMLPUBFUN int XMLCALL
* Special I/O mode.
*/
XMLPUBFUN xmlParserCtxtPtr XMLCALL
XMLPUBFUN xmlParserCtxtPtr XMLCALL
xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
void *user_data,
xmlInputReadCallback ioread,
@ -1035,7 +1035,7 @@ XMLPUBFUN xmlParserCtxtPtr XMLCALL
void *ioctx,
xmlCharEncoding enc);
XMLPUBFUN xmlParserInputPtr XMLCALL
XMLPUBFUN xmlParserInputPtr XMLCALL
xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
xmlParserInputBufferPtr input,
xmlCharEncoding enc);
@ -1046,14 +1046,14 @@ XMLPUBFUN xmlParserInputPtr XMLCALL
XMLPUBFUN const xmlParserNodeInfo* XMLCALL
xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt,
const xmlNodePtr node);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
XMLPUBFUN unsigned long XMLCALL
XMLPUBFUN unsigned long XMLCALL
xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
const xmlNodePtr node);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
const xmlParserNodeInfoPtr info);
@ -1061,7 +1061,7 @@ XMLPUBFUN void XMLCALL
* External entities handling actually implemented in xmlIO.
*/
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
XMLPUBFUN xmlExternalEntityLoader XMLCALL
xmlGetExternalEntityLoader(void);

View File

@ -90,7 +90,7 @@ XMLPUBVAR unsigned int xmlParserMaxDepth;
/************************************************************************
* *
* UNICODE version of the macros. *
* UNICODE version of the macros. *
* *
************************************************************************/
/**
@ -186,7 +186,7 @@ XMLPUBVAR unsigned int xmlParserMaxDepth;
*
* Always false (all combining chars > 0xff)
*/
#define IS_COMBINING_CH(c) 0
#define IS_COMBINING_CH(c) 0
/**
* IS_EXTENDER:
@ -227,7 +227,7 @@ XMLPUBVAR unsigned int xmlParserMaxDepth;
* Macro to check the following production in the XML spec:
*
*
* [84] Letter ::= BaseChar | Ideographic
* [84] Letter ::= BaseChar | Ideographic
*/
#define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
@ -284,7 +284,7 @@ XMLPUBVAR unsigned int xmlParserMaxDepth;
*
* Skips the end of line chars.
*/
#define SKIP_EOL(p) \
#define SKIP_EOL(p) \
if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; } \
if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; }
@ -321,25 +321,25 @@ XMLPUBFUN int XMLCALL xmlIsLetter (int c);
/**
* Parser context.
*/
XMLPUBFUN xmlParserCtxtPtr XMLCALL
XMLPUBFUN xmlParserCtxtPtr XMLCALL
xmlCreateFileParserCtxt (const char *filename);
XMLPUBFUN xmlParserCtxtPtr XMLCALL
XMLPUBFUN xmlParserCtxtPtr XMLCALL
xmlCreateURLParserCtxt (const char *filename,
int options);
XMLPUBFUN xmlParserCtxtPtr XMLCALL
XMLPUBFUN xmlParserCtxtPtr XMLCALL
xmlCreateMemoryParserCtxt(const char *buffer,
int size);
XMLPUBFUN xmlParserCtxtPtr XMLCALL
XMLPUBFUN xmlParserCtxtPtr XMLCALL
xmlCreateEntityParserCtxt(const xmlChar *URL,
const xmlChar *ID,
const xmlChar *base);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
xmlCharEncoding enc);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
xmlCharEncodingHandlerPtr handler);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt,
xmlParserInputPtr input,
xmlCharEncodingHandlerPtr handler);
@ -357,29 +357,29 @@ XMLPUBFUN void XMLCALL
/**
* Input Streams.
*/
XMLPUBFUN xmlParserInputPtr XMLCALL
XMLPUBFUN xmlParserInputPtr XMLCALL
xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
const xmlChar *buffer);
XMLPUBFUN xmlParserInputPtr XMLCALL
XMLPUBFUN xmlParserInputPtr XMLCALL
xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
xmlEntityPtr entity);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlPushInput (xmlParserCtxtPtr ctxt,
xmlParserInputPtr input);
XMLPUBFUN xmlChar XMLCALL
XMLPUBFUN xmlChar XMLCALL
xmlPopInput (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeInputStream (xmlParserInputPtr input);
XMLPUBFUN xmlParserInputPtr XMLCALL
XMLPUBFUN xmlParserInputPtr XMLCALL
xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
const char *filename);
XMLPUBFUN xmlParserInputPtr XMLCALL
XMLPUBFUN xmlParserInputPtr XMLCALL
xmlNewInputStream (xmlParserCtxtPtr ctxt);
/**
* Namespaces.
*/
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlSplitQName (xmlParserCtxtPtr ctxt,
const xmlChar *name,
xmlChar **prefix);
@ -387,112 +387,112 @@ XMLPUBFUN xmlChar * XMLCALL
/**
* Generic production rules.
*/
XMLPUBFUN const xmlChar * XMLCALL
XMLPUBFUN const xmlChar * XMLCALL
xmlParseName (xmlParserCtxtPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlParseNmtoken (xmlParserCtxtPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlParseEntityValue (xmlParserCtxtPtr ctxt,
xmlChar **orig);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlParseAttValue (xmlParserCtxtPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlParseSystemLiteral (xmlParserCtxtPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlParsePubidLiteral (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParseCharData (xmlParserCtxtPtr ctxt,
int cdata);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlParseExternalID (xmlParserCtxtPtr ctxt,
xmlChar **publicID,
int strict);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParseComment (xmlParserCtxtPtr ctxt);
XMLPUBFUN const xmlChar * XMLCALL
XMLPUBFUN const xmlChar * XMLCALL
xmlParsePITarget (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParsePI (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParseNotationDecl (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParseEntityDecl (xmlParserCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
xmlChar **value);
XMLPUBFUN xmlEnumerationPtr XMLCALL
XMLPUBFUN xmlEnumerationPtr XMLCALL
xmlParseNotationType (xmlParserCtxtPtr ctxt);
XMLPUBFUN xmlEnumerationPtr XMLCALL
XMLPUBFUN xmlEnumerationPtr XMLCALL
xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParseEnumeratedType (xmlParserCtxtPtr ctxt,
xmlEnumerationPtr *tree);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParseAttributeType (xmlParserCtxtPtr ctxt,
xmlEnumerationPtr *tree);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
XMLPUBFUN xmlElementContentPtr XMLCALL
XMLPUBFUN xmlElementContentPtr XMLCALL
xmlParseElementMixedContentDecl
(xmlParserCtxtPtr ctxt,
int inputchk);
XMLPUBFUN xmlElementContentPtr XMLCALL
XMLPUBFUN xmlElementContentPtr XMLCALL
xmlParseElementChildrenContentDecl
(xmlParserCtxtPtr ctxt,
int inputchk);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
const xmlChar *name,
xmlElementContentPtr *result);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParseElementDecl (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParseMarkupDecl (xmlParserCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParseCharRef (xmlParserCtxtPtr ctxt);
XMLPUBFUN xmlEntityPtr XMLCALL
XMLPUBFUN xmlEntityPtr XMLCALL
xmlParseEntityRef (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParseReference (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParsePEReference (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
#ifdef LIBXML_SAX1_ENABLED
XMLPUBFUN const xmlChar * XMLCALL
XMLPUBFUN const xmlChar * XMLCALL
xmlParseAttribute (xmlParserCtxtPtr ctxt,
xmlChar **value);
XMLPUBFUN const xmlChar * XMLCALL
XMLPUBFUN const xmlChar * XMLCALL
xmlParseStartTag (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParseEndTag (xmlParserCtxtPtr ctxt);
#endif /* LIBXML_SAX1_ENABLED */
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParseCDSect (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParseContent (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParseElement (xmlParserCtxtPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlParseVersionNum (xmlParserCtxtPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlParseVersionInfo (xmlParserCtxtPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlParseEncName (xmlParserCtxtPtr ctxt);
XMLPUBFUN const xmlChar * XMLCALL
XMLPUBFUN const xmlChar * XMLCALL
xmlParseEncodingDecl (xmlParserCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParseSDDecl (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParseXMLDecl (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParseTextDecl (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParseMisc (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
const xmlChar *ExternalID,
const xmlChar *SystemID);
const xmlChar *SystemID);
/**
* XML_SUBSTITUTE_NONE:
*
@ -516,7 +516,7 @@ XMLPUBFUN void XMLCALL
*
* Both general and parameter entities need to be substituted.
*/
#define XML_SUBSTITUTE_BOTH 3
#define XML_SUBSTITUTE_BOTH 3
XMLPUBFUN xmlChar * XMLCALL
xmlStringDecodeEntities (xmlParserCtxtPtr ctxt,
@ -596,21 +596,21 @@ XMLPUBFUN htmlParserCtxtPtr XMLCALL htmlCreateFileParserCtxt(const char *filenam
typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent,
xmlNodePtr firstNode,
xmlNodePtr lastNode);
XMLPUBFUN void XMLCALL xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlParseQuotedString (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
xmlParseNamespace (xmlParserCtxtPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlScanName (xmlParserCtxtPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL xmlParserHandleReference(xmlParserCtxtPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
xmlChar **prefix);
/**
@ -623,7 +623,7 @@ XMLPUBFUN xmlChar * XMLCALL
xmlChar end,
xmlChar end2,
xmlChar end3);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlHandleEntity (xmlParserCtxtPtr ctxt,
xmlEntityPtr entity);

View File

@ -104,8 +104,8 @@ typedef enum {
XML_SCHEMA_TYPE_IDC_UNIQUE,
XML_SCHEMA_TYPE_IDC_KEY,
XML_SCHEMA_TYPE_IDC_KEYREF,
XML_SCHEMA_TYPE_PARTICLE = 25,
XML_SCHEMA_TYPE_ATTRIBUTE_USE,
XML_SCHEMA_TYPE_PARTICLE = 25,
XML_SCHEMA_TYPE_ATTRIBUTE_USE,
XML_SCHEMA_FACET_MININCLUSIVE = 1000,
XML_SCHEMA_FACET_MINEXCLUSIVE,
XML_SCHEMA_FACET_MAXINCLUSIVE,

View File

@ -69,17 +69,17 @@ typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
/*
* Interfaces for parsing.
*/
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
xmlSchematronNewParserCtxt (const char *URL);
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
xmlSchematronNewMemParserCtxt(const char *buffer,
int size);
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
/*****
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
xmlSchematronValidityErrorFunc err,
xmlSchematronValidityWarningFunc warn,
@ -92,9 +92,9 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt);
*****/
XMLPUBFUN xmlSchematronPtr XMLCALL
XMLPUBFUN xmlSchematronPtr XMLCALL
xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSchematronFree (xmlSchematronPtr schema);
/*
* Interfaces for validating
@ -105,7 +105,7 @@ XMLPUBFUN void XMLCALL
xmlStructuredErrorFunc serror,
void *ctx);
/******
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
xmlSchematronValidityErrorFunc err,
xmlSchematronValidityWarningFunc warn,
@ -125,12 +125,12 @@ XMLPUBFUN int XMLCALL
xmlNodePtr elem);
*******/
XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL
XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL
xmlSchematronNewValidCtxt (xmlSchematronPtr schema,
int options);
XMLPUBFUN void XMLCALL
int options);
XMLPUBFUN void XMLCALL
xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt,
xmlDocPtr instance);

View File

@ -517,7 +517,7 @@ struct _xmlNode {
/**
* XML_GET_LINE:
*
* Macro to extract the line number of an element node.
* Macro to extract the line number of an element node.
*/
#define XML_GET_LINE(n) \
(xmlGetLineNo(n))
@ -560,7 +560,7 @@ struct _xmlDoc {
/* End of common part */
int compression;/* level of zlib compression */
int standalone; /* standalone document (no external refs)
int standalone; /* standalone document (no external refs)
1 if standalone="yes"
0 if standalone="no"
-1 if there is no XML declaration
@ -591,9 +591,9 @@ typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
/**
* xmlDOMWrapAcquireNsFunction:
* @ctxt: a DOM wrapper context
* @node: the context node (element or attribute)
* @node: the context node (element or attribute)
* @nsName: the requested namespace name
* @nsPrefix: the requested namespace prefix
* @nsPrefix: the requested namespace prefix
*
* A function called to acquire namespaces (xmlNs) from the wrapper.
*
@ -640,7 +640,7 @@ struct _xmlDOMWrapCtxt {
/**
* xmlRootNode:
*
* Macro for compatibility naming layer with libxml1. Maps
* Macro for compatibility naming layer with libxml1. Maps
* to "children".
*/
#ifndef xmlRootNode
@ -661,26 +661,26 @@ XMLPUBFUN int XMLCALL
#endif
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateQName (const xmlChar *value,
int space);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateName (const xmlChar *value,
int space);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateNMToken (const xmlChar *value,
int space);
#endif
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlBuildQName (const xmlChar *ncname,
const xmlChar *prefix,
xmlChar *memory,
int len);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlSplitQName2 (const xmlChar *name,
xmlChar **prefix);
XMLPUBFUN const xmlChar * XMLCALL
XMLPUBFUN const xmlChar * XMLCALL
xmlSplitQName3 (const xmlChar *name,
int *len);
@ -688,383 +688,383 @@ XMLPUBFUN const xmlChar * XMLCALL
* Handling Buffers, the old ones see @xmlBuf for the new ones.
*/
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
XMLPUBFUN xmlBufferAllocationScheme XMLCALL
XMLPUBFUN xmlBufferAllocationScheme XMLCALL
xmlGetBufferAllocationScheme(void);
XMLPUBFUN xmlBufferPtr XMLCALL
XMLPUBFUN xmlBufferPtr XMLCALL
xmlBufferCreate (void);
XMLPUBFUN xmlBufferPtr XMLCALL
XMLPUBFUN xmlBufferPtr XMLCALL
xmlBufferCreateSize (size_t size);
XMLPUBFUN xmlBufferPtr XMLCALL
XMLPUBFUN xmlBufferPtr XMLCALL
xmlBufferCreateStatic (void *mem,
size_t size);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlBufferResize (xmlBufferPtr buf,
unsigned int size);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlBufferFree (xmlBufferPtr buf);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlBufferDump (FILE *file,
xmlBufferPtr buf);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlBufferAdd (xmlBufferPtr buf,
const xmlChar *str,
int len);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlBufferAddHead (xmlBufferPtr buf,
const xmlChar *str,
int len);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlBufferCat (xmlBufferPtr buf,
const xmlChar *str);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlBufferCCat (xmlBufferPtr buf,
const char *str);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlBufferShrink (xmlBufferPtr buf,
unsigned int len);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlBufferGrow (xmlBufferPtr buf,
unsigned int len);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlBufferEmpty (xmlBufferPtr buf);
XMLPUBFUN const xmlChar* XMLCALL
XMLPUBFUN const xmlChar* XMLCALL
xmlBufferContent (const xmlBufferPtr buf);
XMLPUBFUN xmlChar* XMLCALL
xmlBufferDetach (xmlBufferPtr buf);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlBufferSetAllocationScheme(xmlBufferPtr buf,
xmlBufferAllocationScheme scheme);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlBufferLength (const xmlBufferPtr buf);
/*
* Creating/freeing new structures.
*/
XMLPUBFUN xmlDtdPtr XMLCALL
XMLPUBFUN xmlDtdPtr XMLCALL
xmlCreateIntSubset (xmlDocPtr doc,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN xmlDtdPtr XMLCALL
XMLPUBFUN xmlDtdPtr XMLCALL
xmlNewDtd (xmlDocPtr doc,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
XMLPUBFUN xmlDtdPtr XMLCALL
XMLPUBFUN xmlDtdPtr XMLCALL
xmlGetIntSubset (xmlDocPtr doc);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeDtd (xmlDtdPtr cur);
#ifdef LIBXML_LEGACY_ENABLED
XMLPUBFUN xmlNsPtr XMLCALL
XMLPUBFUN xmlNsPtr XMLCALL
xmlNewGlobalNs (xmlDocPtr doc,
const xmlChar *href,
const xmlChar *prefix);
#endif /* LIBXML_LEGACY_ENABLED */
XMLPUBFUN xmlNsPtr XMLCALL
XMLPUBFUN xmlNsPtr XMLCALL
xmlNewNs (xmlNodePtr node,
const xmlChar *href,
const xmlChar *prefix);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeNs (xmlNsPtr cur);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeNsList (xmlNsPtr cur);
XMLPUBFUN xmlDocPtr XMLCALL
XMLPUBFUN xmlDocPtr XMLCALL
xmlNewDoc (const xmlChar *version);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeDoc (xmlDocPtr cur);
XMLPUBFUN xmlAttrPtr XMLCALL
XMLPUBFUN xmlAttrPtr XMLCALL
xmlNewDocProp (xmlDocPtr doc,
const xmlChar *name,
const xmlChar *value);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN xmlAttrPtr XMLCALL
XMLPUBFUN xmlAttrPtr XMLCALL
xmlNewProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *value);
#endif
XMLPUBFUN xmlAttrPtr XMLCALL
XMLPUBFUN xmlAttrPtr XMLCALL
xmlNewNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *value);
XMLPUBFUN xmlAttrPtr XMLCALL
XMLPUBFUN xmlAttrPtr XMLCALL
xmlNewNsPropEatName (xmlNodePtr node,
xmlNsPtr ns,
xmlChar *name,
const xmlChar *value);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreePropList (xmlAttrPtr cur);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeProp (xmlAttrPtr cur);
XMLPUBFUN xmlAttrPtr XMLCALL
XMLPUBFUN xmlAttrPtr XMLCALL
xmlCopyProp (xmlNodePtr target,
xmlAttrPtr cur);
XMLPUBFUN xmlAttrPtr XMLCALL
XMLPUBFUN xmlAttrPtr XMLCALL
xmlCopyPropList (xmlNodePtr target,
xmlAttrPtr cur);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlDtdPtr XMLCALL
XMLPUBFUN xmlDtdPtr XMLCALL
xmlCopyDtd (xmlDtdPtr dtd);
#endif /* LIBXML_TREE_ENABLED */
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN xmlDocPtr XMLCALL
XMLPUBFUN xmlDocPtr XMLCALL
xmlCopyDoc (xmlDocPtr doc,
int recursive);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
/*
* Creating new nodes.
*/
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocNode (xmlDocPtr doc,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocNodeEatName (xmlDocPtr doc,
xmlNsPtr ns,
xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewNode (xmlNsPtr ns,
const xmlChar *name);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewNodeEatName (xmlNsPtr ns,
xmlChar *name);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewChild (xmlNodePtr parent,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
#endif
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocText (xmlDocPtr doc,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewText (const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocPI (xmlDocPtr doc,
const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewPI (const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocTextLen (xmlDocPtr doc,
const xmlChar *content,
int len);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewTextLen (const xmlChar *content,
int len);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocComment (xmlDocPtr doc,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewComment (const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewCDataBlock (xmlDocPtr doc,
const xmlChar *content,
int len);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewCharRef (xmlDocPtr doc,
const xmlChar *name);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewReference (xmlDocPtr doc,
const xmlChar *name);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlCopyNode (const xmlNodePtr node,
int recursive);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlDocCopyNode (const xmlNodePtr node,
xmlDocPtr doc,
int recursive);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlDocCopyNodeList (xmlDocPtr doc,
const xmlNodePtr node);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlCopyNodeList (const xmlNodePtr node);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewTextChild (xmlNodePtr parent,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocRawNode (xmlDocPtr doc,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *content);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlNewDocFragment (xmlDocPtr doc);
#endif /* LIBXML_TREE_ENABLED */
/*
* Navigating.
*/
XMLPUBFUN long XMLCALL
XMLPUBFUN long XMLCALL
xmlGetLineNo (xmlNodePtr node);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlGetNodePath (xmlNodePtr node);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlDocGetRootElement (xmlDocPtr doc);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlGetLastChild (xmlNodePtr parent);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlNodeIsText (xmlNodePtr node);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlIsBlankNode (xmlNodePtr node);
/*
* Changing the structure.
*/
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlDocSetRootElement (xmlDocPtr doc,
xmlNodePtr root);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlNodeSetName (xmlNodePtr cur,
const xmlChar *name);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlAddChild (xmlNodePtr parent,
xmlNodePtr cur);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlAddChildList (xmlNodePtr parent,
xmlNodePtr cur);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlReplaceNode (xmlNodePtr old,
xmlNodePtr cur);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlAddPrevSibling (xmlNodePtr cur,
xmlNodePtr elem);
#endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlAddSibling (xmlNodePtr cur,
xmlNodePtr elem);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlAddNextSibling (xmlNodePtr cur,
xmlNodePtr elem);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlUnlinkNode (xmlNodePtr cur);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlTextMerge (xmlNodePtr first,
xmlNodePtr second);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlTextConcat (xmlNodePtr node,
const xmlChar *content,
int len);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeNodeList (xmlNodePtr cur);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeNode (xmlNodePtr cur);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSetTreeDoc (xmlNodePtr tree,
xmlDocPtr doc);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSetListDoc (xmlNodePtr list,
xmlDocPtr doc);
/*
* Namespaces.
*/
XMLPUBFUN xmlNsPtr XMLCALL
XMLPUBFUN xmlNsPtr XMLCALL
xmlSearchNs (xmlDocPtr doc,
xmlNodePtr node,
const xmlChar *nameSpace);
XMLPUBFUN xmlNsPtr XMLCALL
XMLPUBFUN xmlNsPtr XMLCALL
xmlSearchNsByHref (xmlDocPtr doc,
xmlNodePtr node,
const xmlChar *href);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN xmlNsPtr * XMLCALL
XMLPUBFUN xmlNsPtr * XMLCALL
xmlGetNsList (xmlDocPtr doc,
xmlNodePtr node);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSetNs (xmlNodePtr node,
xmlNsPtr ns);
XMLPUBFUN xmlNsPtr XMLCALL
XMLPUBFUN xmlNsPtr XMLCALL
xmlCopyNamespace (xmlNsPtr cur);
XMLPUBFUN xmlNsPtr XMLCALL
XMLPUBFUN xmlNsPtr XMLCALL
xmlCopyNamespaceList (xmlNsPtr cur);
/*
* Changing the content.
*/
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
XMLPUBFUN xmlAttrPtr XMLCALL
XMLPUBFUN xmlAttrPtr XMLCALL
xmlSetProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *value);
XMLPUBFUN xmlAttrPtr XMLCALL
XMLPUBFUN xmlAttrPtr XMLCALL
xmlSetNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar *name,
const xmlChar *value);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlGetNoNsProp (xmlNodePtr node,
const xmlChar *name);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlGetProp (xmlNodePtr node,
const xmlChar *name);
XMLPUBFUN xmlAttrPtr XMLCALL
XMLPUBFUN xmlAttrPtr XMLCALL
xmlHasProp (xmlNodePtr node,
const xmlChar *name);
XMLPUBFUN xmlAttrPtr XMLCALL
XMLPUBFUN xmlAttrPtr XMLCALL
xmlHasNsProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *nameSpace);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlGetNsProp (xmlNodePtr node,
const xmlChar *name,
const xmlChar *nameSpace);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlStringGetNodeList (xmlDocPtr doc,
const xmlChar *value);
XMLPUBFUN xmlNodePtr XMLCALL
XMLPUBFUN xmlNodePtr XMLCALL
xmlStringLenGetNodeList (xmlDocPtr doc,
const xmlChar *value,
int len);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlNodeListGetString (xmlDocPtr doc,
xmlNodePtr list,
int inLine);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlNodeListGetRawString (xmlDocPtr doc,
xmlNodePtr list,
int inLine);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlNodeSetContent (xmlNodePtr cur,
const xmlChar *content);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlNodeSetContentLen (xmlNodePtr cur,
const xmlChar *content,
int len);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlNodeAddContent (xmlNodePtr cur,
const xmlChar *content);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlNodeAddContentLen (xmlNodePtr cur,
const xmlChar *content,
int len);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlNodeGetContent (xmlNodePtr cur);
XMLPUBFUN int XMLCALL
@ -1074,23 +1074,23 @@ XMLPUBFUN int XMLCALL
xmlBufGetNodeContent (xmlBufPtr buf,
xmlNodePtr cur);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlNodeGetLang (xmlNodePtr cur);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlNodeGetSpacePreserve (xmlNodePtr cur);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlNodeSetLang (xmlNodePtr cur,
const xmlChar *lang);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlNodeSetSpacePreserve (xmlNodePtr cur,
int val);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlNodeGetBase (xmlDocPtr doc,
xmlNodePtr cur);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlNodeSetBase (xmlNodePtr cur,
const xmlChar *uri);
#endif
@ -1098,14 +1098,14 @@ XMLPUBFUN void XMLCALL
/*
* Removing content.
*/
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlRemoveProp (xmlAttrPtr cur);
#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlUnsetNsProp (xmlNodePtr node,
xmlNsPtr ns,
const xmlChar *name);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlUnsetProp (xmlNodePtr node,
const xmlChar *name);
#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
@ -1113,13 +1113,13 @@ XMLPUBFUN int XMLCALL
/*
* Internal, don't use.
*/
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlBufferWriteCHAR (xmlBufferPtr buf,
const xmlChar *string);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlBufferWriteChar (xmlBufferPtr buf,
const char *string);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlBufferWriteQuotedString(xmlBufferPtr buf,
const xmlChar *string);
@ -1134,7 +1134,7 @@ XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
/*
* Namespace handling.
*/
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlReconciliateNs (xmlDocPtr doc,
xmlNodePtr tree);
#endif
@ -1143,41 +1143,41 @@ XMLPUBFUN int XMLCALL
/*
* Saving.
*/
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDocDumpFormatMemory (xmlDocPtr cur,
xmlChar **mem,
int *size,
int format);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDocDumpMemory (xmlDocPtr cur,
xmlChar **mem,
int *size);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
xmlChar **doc_txt_ptr,
int * doc_txt_len,
const char *txt_encoding);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
xmlChar **doc_txt_ptr,
int * doc_txt_len,
const char *txt_encoding,
int format);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlDocFormatDump (FILE *f,
xmlDocPtr cur,
int format);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlDocDump (FILE *f,
xmlDocPtr cur);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlElemDump (FILE *f,
xmlDocPtr doc,
xmlNodePtr cur);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSaveFile (const char *filename,
xmlDocPtr cur);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSaveFormatFile (const char *filename,
xmlDocPtr cur,
int format);
@ -1187,23 +1187,23 @@ XMLPUBFUN size_t XMLCALL
xmlNodePtr cur,
int level,
int format);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlNodeDump (xmlBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
int level,
int format);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSaveFileTo (xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding,
int format);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlNodeDumpOutput (xmlOutputBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur,
@ -1211,13 +1211,13 @@ XMLPUBFUN void XMLCALL
int format,
const char *encoding);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSaveFormatFileEnc (const char *filename,
xmlDocPtr cur,
const char *encoding,
int format);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSaveFileEnc (const char *filename,
xmlDocPtr cur,
const char *encoding);
@ -1226,21 +1226,21 @@ XMLPUBFUN int XMLCALL
/*
* XHTML
*/
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlIsXHTML (const xmlChar *systemID,
const xmlChar *publicID);
/*
* Compression.
*/
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlGetDocCompressMode (xmlDocPtr doc);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSetDocCompressMode (xmlDocPtr doc,
int mode);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlGetCompressMode (void);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSetCompressMode (int mode);
/*
@ -1258,7 +1258,7 @@ XMLPUBFUN int XMLCALL
xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt,
xmlDocPtr sourceDoc,
xmlNodePtr node,
xmlDocPtr destDoc,
xmlDocPtr destDoc,
xmlNodePtr destParent,
int options);
XMLPUBFUN int XMLCALL

View File

@ -150,55 +150,55 @@ typedef struct _xmlHashTable xmlRefTable;
typedef xmlRefTable *xmlRefTablePtr;
/* Notation */
XMLPUBFUN xmlNotationPtr XMLCALL
XMLPUBFUN xmlNotationPtr XMLCALL
xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd,
const xmlChar *name,
const xmlChar *PublicID,
const xmlChar *SystemID);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlNotationTablePtr XMLCALL
XMLPUBFUN xmlNotationTablePtr XMLCALL
xmlCopyNotationTable (xmlNotationTablePtr table);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeNotationTable (xmlNotationTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDumpNotationDecl (xmlBufferPtr buf,
xmlNotationPtr nota);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDumpNotationTable (xmlBufferPtr buf,
xmlNotationTablePtr table);
#endif /* LIBXML_OUTPUT_ENABLED */
/* Element Content */
/* the non Doc version are being deprecated */
XMLPUBFUN xmlElementContentPtr XMLCALL
XMLPUBFUN xmlElementContentPtr XMLCALL
xmlNewElementContent (const xmlChar *name,
xmlElementContentType type);
XMLPUBFUN xmlElementContentPtr XMLCALL
XMLPUBFUN xmlElementContentPtr XMLCALL
xmlCopyElementContent (xmlElementContentPtr content);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeElementContent (xmlElementContentPtr cur);
/* the new versions with doc argument */
XMLPUBFUN xmlElementContentPtr XMLCALL
XMLPUBFUN xmlElementContentPtr XMLCALL
xmlNewDocElementContent (xmlDocPtr doc,
const xmlChar *name,
xmlElementContentType type);
XMLPUBFUN xmlElementContentPtr XMLCALL
XMLPUBFUN xmlElementContentPtr XMLCALL
xmlCopyDocElementContent(xmlDocPtr doc,
xmlElementContentPtr content);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeDocElementContent(xmlDocPtr doc,
xmlElementContentPtr cur);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSnprintfElementContent(char *buf,
int size,
xmlElementContentPtr content,
int englob);
#ifdef LIBXML_OUTPUT_ENABLED
/* DEPRECATED */
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSprintfElementContent(char *buf,
xmlElementContentPtr content,
int englob);
@ -206,39 +206,39 @@ XMLPUBFUN void XMLCALL
/* DEPRECATED */
/* Element */
XMLPUBFUN xmlElementPtr XMLCALL
XMLPUBFUN xmlElementPtr XMLCALL
xmlAddElementDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd,
const xmlChar *name,
xmlElementTypeVal type,
xmlElementContentPtr content);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlElementTablePtr XMLCALL
XMLPUBFUN xmlElementTablePtr XMLCALL
xmlCopyElementTable (xmlElementTablePtr table);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeElementTable (xmlElementTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDumpElementTable (xmlBufferPtr buf,
xmlElementTablePtr table);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDumpElementDecl (xmlBufferPtr buf,
xmlElementPtr elem);
#endif /* LIBXML_OUTPUT_ENABLED */
/* Enumeration */
XMLPUBFUN xmlEnumerationPtr XMLCALL
XMLPUBFUN xmlEnumerationPtr XMLCALL
xmlCreateEnumeration (const xmlChar *name);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeEnumeration (xmlEnumerationPtr cur);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlEnumerationPtr XMLCALL
XMLPUBFUN xmlEnumerationPtr XMLCALL
xmlCopyEnumeration (xmlEnumerationPtr cur);
#endif /* LIBXML_TREE_ENABLED */
/* Attribute */
XMLPUBFUN xmlAttributePtr XMLCALL
XMLPUBFUN xmlAttributePtr XMLCALL
xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
xmlDtdPtr dtd,
const xmlChar *elem,
@ -249,55 +249,55 @@ XMLPUBFUN xmlAttributePtr XMLCALL
const xmlChar *defaultValue,
xmlEnumerationPtr tree);
#ifdef LIBXML_TREE_ENABLED
XMLPUBFUN xmlAttributeTablePtr XMLCALL
XMLPUBFUN xmlAttributeTablePtr XMLCALL
xmlCopyAttributeTable (xmlAttributeTablePtr table);
#endif /* LIBXML_TREE_ENABLED */
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeAttributeTable (xmlAttributeTablePtr table);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDumpAttributeTable (xmlBufferPtr buf,
xmlAttributeTablePtr table);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlDumpAttributeDecl (xmlBufferPtr buf,
xmlAttributePtr attr);
#endif /* LIBXML_OUTPUT_ENABLED */
/* IDs */
XMLPUBFUN xmlIDPtr XMLCALL
XMLPUBFUN xmlIDPtr XMLCALL
xmlAddID (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
const xmlChar *value,
xmlAttrPtr attr);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeIDTable (xmlIDTablePtr table);
XMLPUBFUN xmlAttrPtr XMLCALL
XMLPUBFUN xmlAttrPtr XMLCALL
xmlGetID (xmlDocPtr doc,
const xmlChar *ID);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlIsID (xmlDocPtr doc,
xmlNodePtr elem,
xmlAttrPtr attr);
XMLPUBFUN int XMLCALL
xmlRemoveID (xmlDocPtr doc,
XMLPUBFUN int XMLCALL
xmlRemoveID (xmlDocPtr doc,
xmlAttrPtr attr);
/* IDREFs */
XMLPUBFUN xmlRefPtr XMLCALL
XMLPUBFUN xmlRefPtr XMLCALL
xmlAddRef (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
const xmlChar *value,
xmlAttrPtr attr);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeRefTable (xmlRefTablePtr table);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlIsRef (xmlDocPtr doc,
xmlNodePtr elem,
xmlAttrPtr attr);
XMLPUBFUN int XMLCALL
xmlRemoveRef (xmlDocPtr doc,
XMLPUBFUN int XMLCALL
xmlRemoveRef (xmlDocPtr doc,
xmlAttrPtr attr);
XMLPUBFUN xmlListPtr XMLCALL
XMLPUBFUN xmlListPtr XMLCALL
xmlGetRefs (xmlDocPtr doc,
const xmlChar *ID);
@ -306,146 +306,146 @@ XMLPUBFUN xmlListPtr XMLCALL
*/
#ifdef LIBXML_VALID_ENABLED
/* Allocate/Release Validation Contexts */
XMLPUBFUN xmlValidCtxtPtr XMLCALL
XMLPUBFUN xmlValidCtxtPtr XMLCALL
xmlNewValidCtxt(void);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeValidCtxt(xmlValidCtxtPtr);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateRoot (xmlValidCtxtPtr ctxt,
xmlDocPtr doc);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlElementPtr elem);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlValidNormalizeAttributeValue(xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar *name,
const xmlChar *value);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar *name,
const xmlChar *value);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlAttributePtr attr);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateAttributeValue(xmlAttributeType type,
const xmlChar *value);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNotationPtr nota);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateDtd (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlDtdPtr dtd);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateDtdFinal (xmlValidCtxtPtr ctxt,
xmlDocPtr doc);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateDocument (xmlValidCtxtPtr ctxt,
xmlDocPtr doc);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateOneElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
xmlAttrPtr attr,
const xmlChar *value);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar *prefix,
xmlNsPtr ns,
const xmlChar *value);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
xmlDocPtr doc);
#endif /* LIBXML_VALID_ENABLED */
#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
const xmlChar *notationName);
#endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlIsMixedElement (xmlDocPtr doc,
const xmlChar *name);
XMLPUBFUN xmlAttributePtr XMLCALL
XMLPUBFUN xmlAttributePtr XMLCALL
xmlGetDtdAttrDesc (xmlDtdPtr dtd,
const xmlChar *elem,
const xmlChar *name);
XMLPUBFUN xmlAttributePtr XMLCALL
XMLPUBFUN xmlAttributePtr XMLCALL
xmlGetDtdQAttrDesc (xmlDtdPtr dtd,
const xmlChar *elem,
const xmlChar *name,
const xmlChar *prefix);
XMLPUBFUN xmlNotationPtr XMLCALL
XMLPUBFUN xmlNotationPtr XMLCALL
xmlGetDtdNotationDesc (xmlDtdPtr dtd,
const xmlChar *name);
XMLPUBFUN xmlElementPtr XMLCALL
XMLPUBFUN xmlElementPtr XMLCALL
xmlGetDtdQElementDesc (xmlDtdPtr dtd,
const xmlChar *name,
const xmlChar *prefix);
XMLPUBFUN xmlElementPtr XMLCALL
XMLPUBFUN xmlElementPtr XMLCALL
xmlGetDtdElementDesc (xmlDtdPtr dtd,
const xmlChar *name);
#ifdef LIBXML_VALID_ENABLED
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidGetPotentialChildren(xmlElementContent *ctree,
const xmlChar **names,
int *len,
int max);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidGetValidElements(xmlNode *prev,
xmlNode *next,
const xmlChar **names,
int max);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateNameValue (const xmlChar *value);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateNamesValue (const xmlChar *value);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateNmtokenValue (const xmlChar *value);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidateNmtokensValue(const xmlChar *value);
#ifdef LIBXML_REGEXP_ENABLED
/*
* Validation based on the regexp support
*/
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
xmlElementPtr elem);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidatePushElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,
const xmlChar *qname);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidatePushCData (xmlValidCtxtPtr ctxt,
const xmlChar *data,
int len);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlValidatePopElement (xmlValidCtxtPtr ctxt,
xmlDocPtr doc,
xmlNodePtr elem,

View File

@ -57,7 +57,7 @@ typedef enum {
* xlinkNodeDetectFunc:
* @ctx: user data pointer
* @node: the node to check
*
*
* This is the prototype for the link detection routine.
* It calls the default link detection callbacks upon link detection.
*/
@ -157,26 +157,26 @@ struct _xlinkHandler {
/*
* The default detection routine, can be overridden, they call the default
* detection callbacks.
* detection callbacks.
*/
XMLPUBFUN xlinkNodeDetectFunc XMLCALL
XMLPUBFUN xlinkNodeDetectFunc XMLCALL
xlinkGetDefaultDetect (void);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xlinkSetDefaultDetect (xlinkNodeDetectFunc func);
/*
* Routines to set/get the default handlers.
*/
XMLPUBFUN xlinkHandlerPtr XMLCALL
XMLPUBFUN xlinkHandlerPtr XMLCALL
xlinkGetDefaultHandler (void);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xlinkSetDefaultHandler (xlinkHandlerPtr handler);
/*
* Link detection module itself.
*/
XMLPUBFUN xlinkType XMLCALL
XMLPUBFUN xlinkType XMLCALL
xlinkIsLink (xmlDocPtr doc,
xmlNodePtr node);

View File

@ -26,7 +26,7 @@ extern "C" {
* xmlInputMatchCallback:
* @filename: the filename or URI
*
* Callback used in the I/O Input API to detect if the current handler
* Callback used in the I/O Input API to detect if the current handler
* can provide input fonctionnalities for this resource.
*
* Returns 1 if yes and 0 if another Input module should be used
@ -72,7 +72,7 @@ typedef int (XMLCALL *xmlInputCloseCallback) (void * context);
* xmlOutputMatchCallback:
* @filename: the filename or URI
*
* Callback used in the I/O Output API to detect if the current handler
* Callback used in the I/O Output API to detect if the current handler
* can provide output fonctionnalities for this resource.
*
* Returns 1 if yes and 0 if another Output module should be used
@ -126,9 +126,9 @@ struct _xmlParserInputBuffer {
void* context;
xmlInputReadCallback readcallback;
xmlInputCloseCallback closecallback;
xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
xmlBufPtr buffer; /* Local buffer encoded in UTF-8 */
xmlBufPtr raw; /* if encoder != NULL buffer for raw input */
int compressed; /* -1=unknown, 0=not compressed, 1=compressed */
@ -142,9 +142,9 @@ struct _xmlOutputBuffer {
void* context;
xmlOutputWriteCallback writecallback;
xmlOutputCloseCallback closecallback;
xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
xmlBufPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */
xmlBufPtr conv; /* if encoder != NULL buffer for output */
int written; /* total number of byte written */
@ -155,13 +155,13 @@ struct _xmlOutputBuffer {
/*
* Interfaces for input
*/
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlCleanupInputCallbacks (void);
XMLPUBFUN int XMLCALL
xmlPopInputCallbacks (void);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlRegisterDefaultInputCallbacks (void);
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
xmlAllocParserInputBuffer (xmlCharEncoding enc);
@ -186,22 +186,22 @@ XMLPUBFUN xmlParserInputBufferPtr XMLCALL
xmlInputCloseCallback ioclose,
void *ioctx,
xmlCharEncoding enc);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParserInputBufferRead (xmlParserInputBufferPtr in,
int len);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
int len);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlParserInputBufferPush (xmlParserInputBufferPtr in,
int len,
const char *buf);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeParserInputBuffer (xmlParserInputBufferPtr in);
XMLPUBFUN char * XMLCALL
XMLPUBFUN char * XMLCALL
xmlParserGetDirectory (const char *filename);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc,
xmlInputOpenCallback openFunc,
xmlInputReadCallback readFunc,
@ -215,9 +215,9 @@ xmlParserInputBufferPtr
/*
* Interfaces for output
*/
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlCleanupOutputCallbacks (void);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlRegisterDefaultOutputCallbacks(void);
XMLPUBFUN xmlOutputBufferPtr XMLCALL
xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
@ -251,24 +251,24 @@ XMLPUBFUN const xmlChar * XMLCALL
XMLPUBFUN size_t XMLCALL
xmlOutputBufferGetSize (xmlOutputBufferPtr out);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlOutputBufferWrite (xmlOutputBufferPtr out,
int len,
const char *buf);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlOutputBufferWriteString (xmlOutputBufferPtr out,
const char *str);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
const xmlChar *str,
xmlCharEncodingOutputFunc escaping);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlOutputBufferFlush (xmlOutputBufferPtr out);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlOutputBufferClose (xmlOutputBufferPtr out);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
xmlOutputOpenCallback openFunc,
xmlOutputWriteCallback writeFunc,
@ -281,10 +281,10 @@ xmlOutputBufferPtr
#ifdef LIBXML_HTTP_ENABLED
/* This function only exists if HTTP support built into the library */
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlRegisterHTTPPostCallbacks (void );
#endif /* LIBXML_HTTP_ENABLED */
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN xmlParserInputPtr XMLCALL
@ -294,69 +294,69 @@ XMLPUBFUN xmlParserInputPtr XMLCALL
/*
* A predefined entity loader disabling network accesses
*/
XMLPUBFUN xmlParserInputPtr XMLCALL
XMLPUBFUN xmlParserInputPtr XMLCALL
xmlNoNetExternalEntityLoader (const char *URL,
const char *ID,
xmlParserCtxtPtr ctxt);
/*
* xmlNormalizeWindowsPath is obsolete, don't use it.
/*
* xmlNormalizeWindowsPath is obsolete, don't use it.
* Check xmlCanonicPath in uri.h for a better alternative.
*/
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlNormalizeWindowsPath (const xmlChar *path);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlCheckFilename (const char *path);
/**
* Default 'file://' protocol callbacks
* Default 'file://' protocol callbacks
*/
XMLPUBFUN int XMLCALL
xmlFileMatch (const char *filename);
XMLPUBFUN void * XMLCALL
xmlFileOpen (const char *filename);
XMLPUBFUN int XMLCALL
xmlFileRead (void * context,
char * buffer,
XMLPUBFUN int XMLCALL
xmlFileMatch (const char *filename);
XMLPUBFUN void * XMLCALL
xmlFileOpen (const char *filename);
XMLPUBFUN int XMLCALL
xmlFileRead (void * context,
char * buffer,
int len);
XMLPUBFUN int XMLCALL
xmlFileClose (void * context);
XMLPUBFUN int XMLCALL
xmlFileClose (void * context);
/**
* Default 'http://' protocol callbacks
* Default 'http://' protocol callbacks
*/
#ifdef LIBXML_HTTP_ENABLED
XMLPUBFUN int XMLCALL
xmlIOHTTPMatch (const char *filename);
XMLPUBFUN void * XMLCALL
xmlIOHTTPOpen (const char *filename);
XMLPUBFUN int XMLCALL
xmlIOHTTPMatch (const char *filename);
XMLPUBFUN void * XMLCALL
xmlIOHTTPOpen (const char *filename);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void * XMLCALL
XMLPUBFUN void * XMLCALL
xmlIOHTTPOpenW (const char * post_uri,
int compression );
#endif /* LIBXML_OUTPUT_ENABLED */
XMLPUBFUN int XMLCALL
xmlIOHTTPRead (void * context,
char * buffer,
XMLPUBFUN int XMLCALL
xmlIOHTTPRead (void * context,
char * buffer,
int len);
XMLPUBFUN int XMLCALL
xmlIOHTTPClose (void * context);
XMLPUBFUN int XMLCALL
xmlIOHTTPClose (void * context);
#endif /* LIBXML_HTTP_ENABLED */
/**
* Default 'ftp://' protocol callbacks
* Default 'ftp://' protocol callbacks
*/
#ifdef LIBXML_FTP_ENABLED
XMLPUBFUN int XMLCALL
xmlIOFTPMatch (const char *filename);
XMLPUBFUN void * XMLCALL
xmlIOFTPOpen (const char *filename);
XMLPUBFUN int XMLCALL
xmlIOFTPRead (void * context,
char * buffer,
#ifdef LIBXML_FTP_ENABLED
XMLPUBFUN int XMLCALL
xmlIOFTPMatch (const char *filename);
XMLPUBFUN void * XMLCALL
xmlIOFTPOpen (const char *filename);
XMLPUBFUN int XMLCALL
xmlIOFTPRead (void * context,
char * buffer,
int len);
XMLPUBFUN int XMLCALL
xmlIOFTPClose (void * context);
XMLPUBFUN int XMLCALL
xmlIOFTPClose (void * context);
#endif /* LIBXML_FTP_ENABLED */
#ifdef __cplusplus

View File

@ -40,25 +40,25 @@ typedef xmlAutomataState *xmlAutomataStatePtr;
/*
* Building API
*/
XMLPUBFUN xmlAutomataPtr XMLCALL
XMLPUBFUN xmlAutomataPtr XMLCALL
xmlNewAutomata (void);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlFreeAutomata (xmlAutomataPtr am);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataGetInitState (xmlAutomataPtr am);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlAutomataSetFinalState (xmlAutomataPtr am,
xmlAutomataStatePtr state);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewState (xmlAutomataPtr am);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewTransition (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
const xmlChar *token,
void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewTransition2 (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
@ -73,7 +73,7 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
const xmlChar *token2,
void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
XMLPUBFUN xmlAutomataStatePtr XMLCALL
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 XMLCALL
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 XMLCALL
xmlAutomataNewOnceTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
@ -99,46 +99,46 @@ XMLPUBFUN xmlAutomataStatePtr XMLCALL
int max,
void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
xmlAutomataStatePtr to,
const xmlChar *token,
const xmlChar *token2,
int min,
int max,
int min,
int max,
void *data);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewAllTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int lax);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewEpsilon (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewCountedTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int counter);
XMLPUBFUN xmlAutomataStatePtr XMLCALL
XMLPUBFUN xmlAutomataStatePtr XMLCALL
xmlAutomataNewCounterTrans (xmlAutomataPtr am,
xmlAutomataStatePtr from,
xmlAutomataStatePtr to,
int counter);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlAutomataNewCounter (xmlAutomataPtr am,
int min,
int max);
XMLPUBFUN xmlRegexpPtr XMLCALL
XMLPUBFUN xmlRegexpPtr XMLCALL
xmlAutomataCompile (xmlAutomataPtr am);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlAutomataIsDeterminist (xmlAutomataPtr am);
#ifdef __cplusplus
}
#endif
#endif
#endif /* LIBXML_AUTOMATA_ENABLED */
#endif /* LIBXML_REGEXP_ENABLED */

View File

@ -43,7 +43,7 @@
/**
* XMLCDECL:
*
* Macro which declares the calling convention for exported functions that
* Macro which declares the calling convention for exported functions that
* use '...'.
*/
#define XMLCDECL

View File

@ -50,7 +50,7 @@ XMLPUBFUN int XMLCALL xmlModuleFree (xmlModulePtr module);
#ifdef __cplusplus
}
#endif
#endif
#endif /* LIBXML_MODULES_ENABLED */

View File

@ -130,16 +130,16 @@ XMLPUBFUN int XMLCALL
#ifdef LIBXML_WRITER_ENABLED
XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderReadInnerXml (xmlTextReaderPtr reader);
xmlTextReaderReadInnerXml(xmlTextReaderPtr reader);
XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderReadOuterXml (xmlTextReaderPtr reader);
xmlTextReaderReadOuterXml(xmlTextReaderPtr reader);
#endif
XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderReadString (xmlTextReaderPtr reader);
xmlTextReaderReadString (xmlTextReaderPtr reader);
XMLPUBFUN int XMLCALL
xmlTextReaderReadAttributeValue (xmlTextReaderPtr reader);
xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader);
/*
* Attributes of the node
@ -397,27 +397,26 @@ typedef void * xmlTextReaderLocatorPtr;
*
* Signature of an error callback from a reader parser
*/
typedef void (XMLCALL *xmlTextReaderErrorFunc)(void *arg,
const char *msg,
xmlParserSeverities severity,
xmlTextReaderLocatorPtr locator);
typedef void (XMLCALL *xmlTextReaderErrorFunc)(void *arg,
const char *msg,
xmlParserSeverities severity,
xmlTextReaderLocatorPtr locator);
XMLPUBFUN int XMLCALL
xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
/*int xmlTextReaderLocatorLinePosition(xmlTextReaderLocatorPtr locator);*/
xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
XMLPUBFUN xmlChar * XMLCALL
xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
XMLPUBFUN void XMLCALL
xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
xmlTextReaderErrorFunc f,
void *arg);
xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
xmlTextReaderErrorFunc f,
void *arg);
XMLPUBFUN void XMLCALL
xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
xmlStructuredErrorFunc f,
void *arg);
xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
xmlStructuredErrorFunc f,
void *arg);
XMLPUBFUN void XMLCALL
xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
xmlTextReaderErrorFunc *f,
void **arg);
xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
xmlTextReaderErrorFunc *f,
void **arg);
#endif /* LIBXML_READER_ENABLED */

View File

@ -92,7 +92,8 @@ typedef xmlSchema *xmlSchemaPtr;
*
* Signature of an error callback from an XSD validation
*/
typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
typedef void (XMLCDECL *xmlSchemaValidityErrorFunc)
(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
* xmlSchemaValidityWarningFunc:
@ -102,7 +103,8 @@ typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg,
*
* Signature of a warning callback from an XSD validation
*/
typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
typedef void (XMLCDECL *xmlSchemaValidityWarningFunc)
(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
/**
* A schemas validation context

View File

@ -30,23 +30,23 @@ typedef enum {
XML_SCHEMA_WHITESPACE_COLLAPSE = 3
} xmlSchemaWhitespaceValueType;
XMLPUBFUN void XMLCALL
xmlSchemaInitTypes (void);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSchemaInitTypes (void);
XMLPUBFUN void XMLCALL
xmlSchemaCleanupTypes (void);
XMLPUBFUN xmlSchemaTypePtr XMLCALL
XMLPUBFUN xmlSchemaTypePtr XMLCALL
xmlSchemaGetPredefinedType (const xmlChar *name,
const xmlChar *ns);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type,
const xmlChar *value,
xmlSchemaValPtr *val);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type,
const xmlChar *value,
xmlSchemaValPtr *val,
xmlNodePtr node);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSchemaValidateFacet (xmlSchemaTypePtr base,
xmlSchemaFacetPtr facet,
const xmlChar *value,
@ -54,25 +54,25 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet,
xmlSchemaWhitespaceValueType fws,
xmlSchemaValType valType,
xmlSchemaValType valType,
const xmlChar *value,
xmlSchemaValPtr val,
xmlSchemaWhitespaceValueType ws);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSchemaFreeValue (xmlSchemaValPtr val);
XMLPUBFUN xmlSchemaFacetPtr XMLCALL
XMLPUBFUN xmlSchemaFacetPtr XMLCALL
xmlSchemaNewFacet (void);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSchemaCheckFacet (xmlSchemaFacetPtr facet,
xmlSchemaTypePtr typeDecl,
xmlSchemaParserCtxtPtr ctxt,
const xmlChar *name);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlSchemaFreeFacet (xmlSchemaFacetPtr facet);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlSchemaCompareValues (xmlSchemaValPtr x,
xmlSchemaValPtr y);
XMLPUBFUN xmlSchemaTypePtr XMLCALL
XMLPUBFUN xmlSchemaTypePtr XMLCALL
xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type);
XMLPUBFUN int XMLCALL
xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet,
@ -82,7 +82,7 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN xmlSchemaTypePtr XMLCALL
xmlSchemaGetBuiltInType (xmlSchemaValType type);
XMLPUBFUN int XMLCALL
xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type,
xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type,
int facetType);
XMLPUBFUN xmlChar * XMLCALL
xmlSchemaCollapseString (const xmlChar *value);
@ -91,7 +91,7 @@ XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN unsigned long XMLCALL
xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet);
XMLPUBFUN int XMLCALL
xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type,
xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type,
xmlSchemaFacetPtr facet,
const xmlChar *value,
xmlSchemaValPtr val,
@ -100,19 +100,19 @@ XMLPUBFUN int XMLCALL
xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
xmlSchemaValType valType,
const xmlChar *value,
xmlSchemaValPtr val,
xmlSchemaValPtr val,
unsigned long *length,
xmlSchemaWhitespaceValueType ws);
XMLPUBFUN int XMLCALL
xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type,
xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type,
const xmlChar *value,
xmlSchemaValPtr *val,
xmlSchemaValPtr *val,
xmlNodePtr node);
XMLPUBFUN int XMLCALL
xmlSchemaGetCanonValue (xmlSchemaValPtr val,
const xmlChar **retValue);
XMLPUBFUN int XMLCALL
xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,
xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,
const xmlChar **retValue,
xmlSchemaWhitespaceValueType ws);
XMLPUBFUN int XMLCALL

View File

@ -113,16 +113,16 @@ XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlUTF8Strsize (const xmlChar *utf,
int len);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlUTF8Strndup (const xmlChar *utf,
int len);
XMLPUBFUN const xmlChar * XMLCALL
XMLPUBFUN const xmlChar * XMLCALL
xmlUTF8Strpos (const xmlChar *utf,
int pos);
XMLPUBFUN int XMLCALL
xmlUTF8Strloc (const xmlChar *utf,
const xmlChar *utfchar);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlUTF8Strsub (const xmlChar *utf,
int start,
int len);

View File

@ -188,7 +188,7 @@ extern void xmlCheckVersion(int version);
/**
* LIBXML_DLL_IMPORT:
*
* Used on Windows (MS C compiler only) to declare a variable as
* Used on Windows (MS C compiler only) to declare a variable as
* imported from the library. This macro should be empty when compiling
* libxml itself. It should expand to __declspec(dllimport)
* when the client code includes this header, and that only if the client
@ -196,9 +196,9 @@ extern void xmlCheckVersion(int version);
* For this to work, we need three macros. One tells us which compiler is
* being used and luckily the compiler defines such a thing: _MSC_VER. The
* second macro tells us if we are compiling libxml or the client code and
* we define the macro IN_LIBXML on the compiler's command line for this
* purpose. The third macro, LIBXML_STATIC, must be defined by any client
* code which links against libxml statically.
* we define the macro IN_LIBXML on the compiler's command line for this
* purpose. The third macro, LIBXML_STATIC, must be defined by any client
* code which links against libxml statically.
*/
#ifndef LIBXML_DLL_IMPORT
#if defined(_MSC_VER) && !defined(IN_LIBXML) && !defined(LIBXML_STATIC)

View File

@ -1,4 +1,3 @@
/*
* Summary: text writing API for XML
* Description: text writing API for XML

View File

@ -33,7 +33,7 @@
extern "C" {
#endif
#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED */
#ifdef LIBXML_XPATH_ENABLED
typedef struct _xmlXPathContext xmlXPathContext;
@ -273,11 +273,11 @@ typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt,
*
* Expression evaluation occurs with respect to a context.
* he context consists of:
* - a node (the context node)
* - a node list (the context node list)
* - a set of variable bindings
* - a function library
* - the set of namespace declarations in scope for the expression
* - a node (the context node)
* - a node list (the context node list)
* - a set of variable bindings
* - a function library
* - the set of namespace declarations in scope for the expression
* Following the switch to hash tables, this need to be trimmed up at
* the next binary incompatible release.
* The node may be modified when the context is passed to libxml2
@ -421,7 +421,7 @@ XMLPUBVAR double xmlXPathNINF;
* @index is out of range (0 to length-1)
*/
#define xmlXPathNodeSetItem(ns, index) \
((((ns) != NULL) && \
((((ns) != NULL) && \
((index) >= 0) && ((index) < (ns)->nodeNr)) ? \
(ns)->nodeTab[(index)] \
: NULL)
@ -437,64 +437,64 @@ XMLPUBVAR double xmlXPathNINF;
(((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL))
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPathFreeObject (xmlXPathObjectPtr obj);
XMLPUBFUN xmlNodeSetPtr XMLCALL
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathNodeSetCreate (xmlNodePtr val);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPathFreeNodeSet (xmlNodeSetPtr obj);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathObjectCopy (xmlXPathObjectPtr val);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathCmpNodes (xmlNodePtr node1,
xmlNodePtr node2);
/**
* Conversion functions to basic types.
*/
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathCastNumberToBoolean (double val);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathCastStringToBoolean (const xmlChar * val);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathCastToBoolean (xmlXPathObjectPtr val);
XMLPUBFUN double XMLCALL
XMLPUBFUN double XMLCALL
xmlXPathCastBooleanToNumber (int val);
XMLPUBFUN double XMLCALL
XMLPUBFUN double XMLCALL
xmlXPathCastStringToNumber (const xmlChar * val);
XMLPUBFUN double XMLCALL
XMLPUBFUN double XMLCALL
xmlXPathCastNodeToNumber (xmlNodePtr node);
XMLPUBFUN double XMLCALL
XMLPUBFUN double XMLCALL
xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns);
XMLPUBFUN double XMLCALL
XMLPUBFUN double XMLCALL
xmlXPathCastToNumber (xmlXPathObjectPtr val);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlXPathCastBooleanToString (int val);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlXPathCastNumberToString (double val);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlXPathCastNodeToString (xmlNodePtr node);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlXPathCastNodeSetToString (xmlNodeSetPtr ns);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlXPathCastToString (xmlXPathObjectPtr val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathConvertBoolean (xmlXPathObjectPtr val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathConvertNumber (xmlXPathObjectPtr val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathConvertString (xmlXPathObjectPtr val);
/**
* Context handling.
*/
XMLPUBFUN xmlXPathContextPtr XMLCALL
XMLPUBFUN xmlXPathContextPtr XMLCALL
xmlXPathNewContext (xmlDocPtr doc);
XMLPUBFUN void XMLCALL
xmlXPathFreeContext (xmlXPathContextPtr ctxt);
@ -506,36 +506,36 @@ XMLPUBFUN int XMLCALL
/**
* Evaluation functions.
*/
XMLPUBFUN long XMLCALL
XMLPUBFUN long XMLCALL
xmlXPathOrderDocElems (xmlDocPtr doc);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathEval (const xmlChar *str,
xmlXPathContextPtr ctx);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathEvalExpression (const xmlChar *str,
xmlXPathContextPtr ctxt);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathEvalPredicate (xmlXPathContextPtr ctxt,
xmlXPathObjectPtr res);
/**
* Separate compilation/evaluation entry points.
*/
XMLPUBFUN xmlXPathCompExprPtr XMLCALL
XMLPUBFUN xmlXPathCompExprPtr XMLCALL
xmlXPathCompile (const xmlChar *str);
XMLPUBFUN xmlXPathCompExprPtr XMLCALL
XMLPUBFUN xmlXPathCompExprPtr XMLCALL
xmlXPathCtxtCompile (xmlXPathContextPtr ctxt,
const xmlChar *str);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
const xmlChar *str);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathCompiledEval (xmlXPathCompExprPtr comp,
xmlXPathContextPtr ctx);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp,
xmlXPathContextPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp);
#endif /* LIBXML_XPATH_ENABLED */
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPathInit (void);
XMLPUBFUN int XMLCALL
xmlXPathIsNaN (double val);

View File

@ -100,16 +100,16 @@ extern "C" {
*/
#define xmlXPathGetContextNode(ctxt) ((ctxt)->context->node)
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt);
XMLPUBFUN double XMLCALL
xmlXPathPopNumber (xmlXPathParserContextPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
xmlXPathPopString (xmlXPathParserContextPtr ctxt);
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt);
XMLPUBFUN void * XMLCALL
xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
XMLPUBFUN double XMLCALL
xmlXPathPopNumber (xmlXPathParserContextPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
xmlXPathPopString (xmlXPathParserContextPtr ctxt);
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt);
XMLPUBFUN void * XMLCALL
xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
/**
* xmlXPathReturnBoolean:
@ -331,7 +331,7 @@ XMLPUBFUN void * XMLCALL
* Variable Lookup forwarding.
*/
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt,
xmlXPathVariableLookupFunc f,
void *data);
@ -340,7 +340,7 @@ XMLPUBFUN void XMLCALL
* Function Lookup forwarding.
*/
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt,
xmlXPathFuncLookupFunc f,
void *funcCtxt);
@ -348,7 +348,7 @@ XMLPUBFUN void XMLCALL
/*
* Error reporting.
*/
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPatherror (xmlXPathParserContextPtr ctxt,
const char *file,
int line,
@ -359,11 +359,11 @@ XMLPUBFUN void XMLCALL
int error);
#ifdef LIBXML_DEBUG_ENABLED
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPathDebugDumpObject (FILE *output,
xmlXPathObjectPtr cur,
int depth);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPathDebugDumpCompExpr(FILE *output,
xmlXPathCompExprPtr comp,
int depth);
@ -371,48 +371,48 @@ XMLPUBFUN void XMLCALL
/**
* NodeSet handling.
*/
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathNodeSetContains (xmlNodeSetPtr cur,
xmlNodePtr val);
XMLPUBFUN xmlNodeSetPtr XMLCALL
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathDifference (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
XMLPUBFUN xmlNodeSetPtr XMLCALL
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathIntersection (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
XMLPUBFUN xmlNodeSetPtr XMLCALL
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathDistinctSorted (xmlNodeSetPtr nodes);
XMLPUBFUN xmlNodeSetPtr XMLCALL
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathDistinct (xmlNodeSetPtr nodes);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathHasSameNodes (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
XMLPUBFUN xmlNodeSetPtr XMLCALL
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathNodeLeadingSorted (xmlNodeSetPtr nodes,
xmlNodePtr node);
XMLPUBFUN xmlNodeSetPtr XMLCALL
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathLeadingSorted (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
XMLPUBFUN xmlNodeSetPtr XMLCALL
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathNodeLeading (xmlNodeSetPtr nodes,
xmlNodePtr node);
XMLPUBFUN xmlNodeSetPtr XMLCALL
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathLeading (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
XMLPUBFUN xmlNodeSetPtr XMLCALL
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathNodeTrailingSorted (xmlNodeSetPtr nodes,
xmlNodePtr node);
XMLPUBFUN xmlNodeSetPtr XMLCALL
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathTrailingSorted (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
XMLPUBFUN xmlNodeSetPtr XMLCALL
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathNodeTrailing (xmlNodeSetPtr nodes,
xmlNodePtr node);
XMLPUBFUN xmlNodeSetPtr XMLCALL
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathTrailing (xmlNodeSetPtr nodes1,
xmlNodeSetPtr nodes2);
@ -421,51 +421,51 @@ XMLPUBFUN xmlNodeSetPtr XMLCALL
* Extending a context.
*/
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathRegisterNs (xmlXPathContextPtr ctxt,
const xmlChar *prefix,
const xmlChar *ns_uri);
XMLPUBFUN const xmlChar * XMLCALL
XMLPUBFUN const xmlChar * XMLCALL
xmlXPathNsLookup (xmlXPathContextPtr ctxt,
const xmlChar *prefix);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathRegisterFunc (xmlXPathContextPtr ctxt,
const xmlChar *name,
xmlXPathFunction f);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathRegisterFuncNS (xmlXPathContextPtr ctxt,
const xmlChar *name,
const xmlChar *ns_uri,
xmlXPathFunction f);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathRegisterVariable (xmlXPathContextPtr ctxt,
const xmlChar *name,
xmlXPathObjectPtr value);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathRegisterVariableNS (xmlXPathContextPtr ctxt,
const xmlChar *name,
const xmlChar *ns_uri,
xmlXPathObjectPtr value);
XMLPUBFUN xmlXPathFunction XMLCALL
XMLPUBFUN xmlXPathFunction XMLCALL
xmlXPathFunctionLookup (xmlXPathContextPtr ctxt,
const xmlChar *name);
XMLPUBFUN xmlXPathFunction XMLCALL
XMLPUBFUN xmlXPathFunction XMLCALL
xmlXPathFunctionLookupNS (xmlXPathContextPtr ctxt,
const xmlChar *name,
const xmlChar *ns_uri);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPathRegisteredFuncsCleanup (xmlXPathContextPtr ctxt);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathVariableLookup (xmlXPathContextPtr ctxt,
const xmlChar *name);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathVariableLookupNS (xmlXPathContextPtr ctxt,
const xmlChar *name,
const xmlChar *ns_uri);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt);
/**
@ -473,79 +473,79 @@ XMLPUBFUN void XMLCALL
*/
XMLPUBFUN xmlXPathParserContextPtr XMLCALL
xmlXPathNewParserContext (const xmlChar *str,
xmlXPathContextPtr ctxt);
XMLPUBFUN void XMLCALL
xmlXPathContextPtr ctxt);
XMLPUBFUN void XMLCALL
xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt);
/* TODO: remap to xmlXPathValuePop and Push. */
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
valuePop (xmlXPathParserContextPtr ctxt);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
valuePush (xmlXPathParserContextPtr ctxt,
xmlXPathObjectPtr value);
xmlXPathObjectPtr value);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathNewString (const xmlChar *val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathNewCString (const char *val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathWrapString (xmlChar *val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathWrapCString (char * val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathNewFloat (double val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathNewBoolean (int val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathNewNodeSet (xmlNodePtr val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathNewValueTree (xmlNodePtr val);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathNodeSetAdd (xmlNodeSetPtr cur,
xmlNodePtr val);
XMLPUBFUN int XMLCALL
XMLPUBFUN int XMLCALL
xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur,
xmlNodePtr val);
XMLPUBFUN int XMLCALL
xmlXPathNodeSetAddNs (xmlNodeSetPtr cur,
xmlNodePtr node,
XMLPUBFUN int XMLCALL
xmlXPathNodeSetAddNs (xmlNodeSetPtr cur,
xmlNodePtr node,
xmlNsPtr ns);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPathNodeSetSort (xmlNodeSetPtr set);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPathRoot (xmlXPathParserContextPtr ctxt);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlXPathParseName (xmlXPathParserContextPtr ctxt);
XMLPUBFUN xmlChar * XMLCALL
XMLPUBFUN xmlChar * XMLCALL
xmlXPathParseNCName (xmlXPathParserContextPtr ctxt);
/*
* Existing functions.
*/
XMLPUBFUN double XMLCALL
XMLPUBFUN double XMLCALL
xmlXPathStringEvalNumber (const xmlChar *str);
XMLPUBFUN int XMLCALL
xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
XMLPUBFUN int XMLCALL
xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
xmlXPathObjectPtr res);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPathRegisterAllFunctions (xmlXPathContextPtr ctxt);
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathNodeSetMerge (xmlNodeSetPtr val1,
XMLPUBFUN xmlNodeSetPtr XMLCALL
xmlXPathNodeSetMerge (xmlNodeSetPtr val1,
xmlNodeSetPtr val2);
XMLPUBFUN void XMLCALL
xmlXPathNodeSetDel (xmlNodeSetPtr cur,
XMLPUBFUN void XMLCALL
xmlXPathNodeSetDel (xmlNodeSetPtr cur,
xmlNodePtr val);
XMLPUBFUN void XMLCALL
xmlXPathNodeSetRemove (xmlNodeSetPtr cur,
XMLPUBFUN void XMLCALL
xmlXPathNodeSetRemove (xmlNodeSetPtr cur,
int val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathNewNodeSetList (xmlNodeSetPtr val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathWrapNodeSet (xmlNodeSetPtr val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPathWrapExternal (void *val);
XMLPUBFUN int XMLCALL xmlXPathEqualValues(xmlXPathParserContextPtr ctxt);
@ -623,7 +623,7 @@ XMLPUBFUN void XMLCALL xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, in
* Really internal functions
*/
XMLPUBFUN void XMLCALL xmlXPathNodeSetFreeNs(xmlNsPtr ns);
#ifdef __cplusplus
}
#endif

View File

@ -7,7 +7,7 @@
*
* Added support for the element() scheme described in:
* W3C Proposed Recommendation 13 November 2002
* http://www.w3.org/TR/2002/PR-xptr-element-20021113/
* http://www.w3.org/TR/2002/PR-xptr-element-20021113/
*
* Copy: See Copyright for the status of this software.
*
@ -43,68 +43,68 @@ struct _xmlLocationSet {
* Handling of location sets.
*/
XMLPUBFUN xmlLocationSetPtr XMLCALL
XMLPUBFUN xmlLocationSetPtr XMLCALL
xmlXPtrLocationSetCreate (xmlXPathObjectPtr val);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPtrFreeLocationSet (xmlLocationSetPtr obj);
XMLPUBFUN xmlLocationSetPtr XMLCALL
XMLPUBFUN xmlLocationSetPtr XMLCALL
xmlXPtrLocationSetMerge (xmlLocationSetPtr val1,
xmlLocationSetPtr val2);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewRange (xmlNodePtr start,
int startindex,
xmlNodePtr end,
int endindex);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewRangePoints (xmlXPathObjectPtr start,
xmlXPathObjectPtr end);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewRangeNodePoint (xmlNodePtr start,
xmlXPathObjectPtr end);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewRangePointNode (xmlXPathObjectPtr start,
xmlNodePtr end);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewRangeNodes (xmlNodePtr start,
xmlNodePtr end);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewLocationSetNodes (xmlNodePtr start,
xmlNodePtr end);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewRangeNodeObject (xmlNodePtr start,
xmlXPathObjectPtr end);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrNewCollapsedRange (xmlNodePtr start);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPtrLocationSetAdd (xmlLocationSetPtr cur,
xmlXPathObjectPtr val);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrWrapLocationSet (xmlLocationSetPtr val);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPtrLocationSetDel (xmlLocationSetPtr cur,
xmlXPathObjectPtr val);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPtrLocationSetRemove (xmlLocationSetPtr cur,
int val);
/*
* Functions.
*/
XMLPUBFUN xmlXPathContextPtr XMLCALL
XMLPUBFUN xmlXPathContextPtr XMLCALL
xmlXPtrNewContext (xmlDocPtr doc,
xmlNodePtr here,
xmlNodePtr origin);
XMLPUBFUN xmlXPathObjectPtr XMLCALL
XMLPUBFUN xmlXPathObjectPtr XMLCALL
xmlXPtrEval (const xmlChar *str,
xmlXPathContextPtr ctx);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt,
int nargs);
XMLPUBFUN xmlNodePtr XMLCALL
int nargs);
XMLPUBFUN xmlNodePtr XMLCALL
xmlXPtrBuildNodeList (xmlXPathObjectPtr obj);
XMLPUBFUN void XMLCALL
XMLPUBFUN void XMLCALL
xmlXPtrEvalRangePredicate (xmlXPathParserContextPtr ctxt);
#ifdef __cplusplus
}

View File

@ -393,7 +393,7 @@ xmlSetFeature(xmlParserCtxtPtr ctxt, const char *name, void *value)
* @end: an end marker xmlChar, 0 if none
* @end2: an end marker xmlChar, 0 if none
* @end3: an end marker xmlChar, 0 if none
*
*
* This function is deprecated, we now always process entities content
* through xmlStringDecodeEntities
*
@ -456,7 +456,7 @@ xmlNamespaceParseNCName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
/**
* xmlNamespaceParseQName:
* @ctxt: an XML parser context
* @prefix: a xmlChar **
* @prefix: a xmlChar **
*
* TODO: this seems not in use anymore, the namespace handling is done on
* top of the SAX interfaces, i.e. not on raw input.
@ -603,7 +603,7 @@ xmlScanName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
/**
* xmlParserHandleReference:
* @ctxt: the parser context
*
*
* TODO: Remove, now deprecated ... the test is done directly in the
* content parsing
* routines.
@ -615,7 +615,7 @@ xmlScanName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
* [ WFC: Entity Declared ]
* the Name given in the entity reference must match that in an entity
* declaration, except that well-formed documents need not declare any
* of the following entities: amp, lt, gt, apos, quot.
* of the following entities: amp, lt, gt, apos, quot.
*
* [ WFC: Parsed Entity ]
* An entity reference must not contain the name of an unparsed entity
@ -624,7 +624,7 @@ xmlScanName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
* '&#x' [0-9a-fA-F]+ ';'
*
* A PEReference may have been detected in the current input stream
* the handling is done accordingly to
* the handling is done accordingly to
* http://www.w3.org/TR/REC-xml#entproc
*/
void
@ -693,7 +693,7 @@ xmlNewGlobalNs(xmlDocPtr doc ATTRIBUTE_UNUSED,
/**
* xmlUpgradeOldNs:
* @doc: a document pointer
*
*
* Upgrade old style Namespaces (PI) and move them to the root of the document.
* DEPRECATED
*/
@ -719,7 +719,7 @@ xmlUpgradeOldNs(xmlDocPtr doc ATTRIBUTE_UNUSED)
*
* People must migrate their code to xmlEncodeEntitiesReentrant !
* This routine will issue a warning when encountered.
*
*
* Returns NULL
*/
const xmlChar *
@ -740,7 +740,7 @@ xmlEncodeEntities(xmlDocPtr doc ATTRIBUTE_UNUSED,
/************************************************************************
* *
* Old set of SAXv1 functions *
* Old set of SAXv1 functions *
* *
************************************************************************/
static int deprecated_v1_msg = 0;
@ -961,8 +961,8 @@ getParameterEntity(void *ctx, const xmlChar * name)
/**
* entityDecl:
* @ctx: the user data (XML parser context)
* @name: the entity name
* @type: the entity type
* @name: the entity name
* @type: the entity type
* @publicId: The public ID of the entity
* @systemId: The system ID of the entity
* @content: the entity value (without processing).
@ -983,8 +983,8 @@ entityDecl(void *ctx, const xmlChar * name, int type,
* attributeDecl:
* @ctx: the user data (XML parser context)
* @elem: the name of the element
* @fullname: the attribute name
* @type: the attribute type
* @fullname: the attribute name
* @type: the attribute type
* @def: the type of default value
* @defaultValue: the attribute default value
* @tree: the tree of enumerated value set
@ -1005,8 +1005,8 @@ attributeDecl(void *ctx, const xmlChar * elem, const xmlChar * fullname,
/**
* elementDecl:
* @ctx: the user data (XML parser context)
* @name: the element name
* @type: the element type
* @name: the element name
* @type: the element type
* @content: the element value tree
*
* An element definition has been parsed
@ -1159,7 +1159,7 @@ endElement(void *ctx, const xmlChar * name ATTRIBUTE_UNUSED)
* @ctx: the user data (XML parser context)
* @name: The entity name
*
* called when an entity reference is detected.
* called when an entity reference is detected.
* DEPRECATED: use xmlSAX2Reference()
*/
void

76
list.c
View File

@ -94,15 +94,15 @@ xmlLinkCompare(const void *data0, const void *data1)
*
* Returns the link containing the data or NULL
*/
static xmlLinkPtr
xmlListLowerSearch(xmlListPtr l, void *data)
static xmlLinkPtr
xmlListLowerSearch(xmlListPtr l, void *data)
{
xmlLinkPtr lk;
if (l == NULL)
return(NULL);
for(lk = l->sentinel->next;lk != l->sentinel && l->linkCompare(lk->data, data) <0 ;lk = lk->next);
return lk;
return lk;
}
/**
@ -114,15 +114,15 @@ xmlListLowerSearch(xmlListPtr l, void *data)
*
* Returns the link containing the data or NULL
*/
static xmlLinkPtr
xmlListHigherSearch(xmlListPtr l, void *data)
static xmlLinkPtr
xmlListHigherSearch(xmlListPtr l, void *data)
{
xmlLinkPtr lk;
if (l == NULL)
return(NULL);
for(lk = l->sentinel->prev;lk != l->sentinel && l->linkCompare(lk->data, data) >0 ;lk = lk->prev);
return lk;
return lk;
}
/**
@ -134,8 +134,8 @@ xmlListHigherSearch(xmlListPtr l, void *data)
*
* Returns the link containing the data or NULL
*/
static xmlLinkPtr
xmlListLinkSearch(xmlListPtr l, void *data)
static xmlLinkPtr
xmlListLinkSearch(xmlListPtr l, void *data)
{
xmlLinkPtr lk;
if (l == NULL)
@ -159,8 +159,8 @@ xmlListLinkSearch(xmlListPtr l, void *data)
*
* Returns the link containing the data or NULL
*/
static xmlLinkPtr
xmlListLinkReverseSearch(xmlListPtr l, void *data)
static xmlLinkPtr
xmlListLinkReverseSearch(xmlListPtr l, void *data)
{
xmlLinkPtr lk;
if (l == NULL)
@ -189,16 +189,16 @@ xmlListCreate(xmlListDeallocator deallocator, xmlListDataCompare compare)
{
xmlListPtr l;
if (NULL == (l = (xmlListPtr )xmlMalloc( sizeof(xmlList)))) {
xmlGenericError(xmlGenericErrorContext,
xmlGenericError(xmlGenericErrorContext,
"Cannot initialize memory for list");
return (NULL);
}
/* Initialize the list to NULL */
memset(l, 0, sizeof(xmlList));
/* Add the sentinel */
if (NULL ==(l->sentinel = (xmlLinkPtr )xmlMalloc(sizeof(xmlLink)))) {
xmlGenericError(xmlGenericErrorContext,
xmlGenericError(xmlGenericErrorContext,
"Cannot initialize memory for sentinel");
xmlFree(l);
return (NULL);
@ -206,7 +206,7 @@ xmlListCreate(xmlListDeallocator deallocator, xmlListDataCompare compare)
l->sentinel->next = l->sentinel;
l->sentinel->prev = l->sentinel;
l->sentinel->data = NULL;
/* If there is a link deallocator, use it */
if (deallocator != NULL)
l->linkDeallocator = deallocator;
@ -217,7 +217,7 @@ xmlListCreate(xmlListDeallocator deallocator, xmlListDataCompare compare)
l->linkCompare = xmlLinkCompare;
return l;
}
/**
* xmlListSearch:
* @l: a list
@ -228,7 +228,7 @@ xmlListCreate(xmlListDeallocator deallocator, xmlListDataCompare compare)
* Returns the value associated to @data or NULL in case of error
*/
void *
xmlListSearch(xmlListPtr l, void *data)
xmlListSearch(xmlListPtr l, void *data)
{
xmlLinkPtr lk;
if (l == NULL)
@ -249,7 +249,7 @@ xmlListSearch(xmlListPtr l, void *data)
* Returns the value associated to @data or NULL in case of error
*/
void *
xmlListReverseSearch(xmlListPtr l, void *data)
xmlListReverseSearch(xmlListPtr l, void *data)
{
xmlLinkPtr lk;
if (l == NULL)
@ -270,7 +270,7 @@ xmlListReverseSearch(xmlListPtr l, void *data)
* Returns 0 in case of success, 1 in case of failure
*/
int
xmlListInsert(xmlListPtr l, void *data)
xmlListInsert(xmlListPtr l, void *data)
{
xmlLinkPtr lkPlace, lkNew;
@ -280,7 +280,7 @@ xmlListInsert(xmlListPtr l, void *data)
/* Add the new link */
lkNew = (xmlLinkPtr) xmlMalloc(sizeof(xmlLink));
if (lkNew == NULL) {
xmlGenericError(xmlGenericErrorContext,
xmlGenericError(xmlGenericErrorContext,
"Cannot initialize memory for new link");
return (1);
}
@ -302,7 +302,7 @@ xmlListInsert(xmlListPtr l, void *data)
*
* Returns 0 in case of success, 1 in case of failure
*/
int xmlListAppend(xmlListPtr l, void *data)
int xmlListAppend(xmlListPtr l, void *data)
{
xmlLinkPtr lkPlace, lkNew;
@ -312,7 +312,7 @@ int xmlListAppend(xmlListPtr l, void *data)
/* Add the new link */
lkNew = (xmlLinkPtr) xmlMalloc(sizeof(xmlLink));
if (lkNew == NULL) {
xmlGenericError(xmlGenericErrorContext,
xmlGenericError(xmlGenericErrorContext,
"Cannot initialize memory for new link");
return (1);
}
@ -353,7 +353,7 @@ int
xmlListRemoveFirst(xmlListPtr l, void *data)
{
xmlLinkPtr lk;
if (l == NULL)
return(0);
/*Find the first instance of this data */
@ -378,7 +378,7 @@ int
xmlListRemoveLast(xmlListPtr l, void *data)
{
xmlLinkPtr lk;
if (l == NULL)
return(0);
/*Find the last instance of this data */
@ -403,7 +403,7 @@ int
xmlListRemoveAll(xmlListPtr l, void *data)
{
int count=0;
if (l == NULL)
return(0);
@ -422,7 +422,7 @@ void
xmlListClear(xmlListPtr l)
{
xmlLinkPtr lk;
if (l == NULL)
return;
lk = l->sentinel->next;
@ -458,14 +458,14 @@ xmlListEmpty(xmlListPtr l)
*
* Returns the first element in the list, or NULL
*/
xmlLinkPtr
xmlLinkPtr
xmlListFront(xmlListPtr l)
{
if (l == NULL)
return(NULL);
return (l->sentinel->next);
}
/**
* xmlListEnd:
* @l: a list
@ -474,14 +474,14 @@ xmlListFront(xmlListPtr l)
*
* Returns the last element in the list, or NULL
*/
xmlLinkPtr
xmlLinkPtr
xmlListEnd(xmlListPtr l)
{
if (l == NULL)
return(NULL);
return (l->sentinel->prev);
}
/**
* xmlListSize:
* @l: a list
@ -539,7 +539,7 @@ xmlListPopBack(xmlListPtr l)
* Returns 1 if successful, 0 otherwise
*/
int
xmlListPushFront(xmlListPtr l, void *data)
xmlListPushFront(xmlListPtr l, void *data)
{
xmlLinkPtr lkPlace, lkNew;
@ -549,7 +549,7 @@ xmlListPushFront(xmlListPtr l, void *data)
/* Add the new link */
lkNew = (xmlLinkPtr) xmlMalloc(sizeof(xmlLink));
if (lkNew == NULL) {
xmlGenericError(xmlGenericErrorContext,
xmlGenericError(xmlGenericErrorContext,
"Cannot initialize memory for new link");
return (0);
}
@ -571,7 +571,7 @@ xmlListPushFront(xmlListPtr l, void *data)
* Returns 1 if successful, 0 otherwise
*/
int
xmlListPushBack(xmlListPtr l, void *data)
xmlListPushBack(xmlListPtr l, void *data)
{
xmlLinkPtr lkPlace, lkNew;
@ -580,7 +580,7 @@ xmlListPushBack(xmlListPtr l, void *data)
lkPlace = l->sentinel->prev;
/* Add the new link */
if (NULL ==(lkNew = (xmlLinkPtr )xmlMalloc(sizeof(xmlLink)))) {
xmlGenericError(xmlGenericErrorContext,
xmlGenericError(xmlGenericErrorContext,
"Cannot initialize memory for new link");
return (0);
}
@ -643,7 +643,7 @@ void
xmlListSort(xmlListPtr l)
{
xmlListPtr lTemp;
if (l == NULL)
return;
if(xmlListEmpty(l))
@ -725,10 +725,10 @@ xmlListMerge(xmlListPtr l1, xmlListPtr l2)
* @old: the list
*
* Duplicate the list
*
*
* Returns a new copy of the list or NULL in case of error
*/
xmlListPtr
xmlListPtr
xmlListDup(const xmlListPtr old)
{
xmlListPtr cur;
@ -754,7 +754,7 @@ xmlListDup(const xmlListPtr old)
* @old: the old list
*
* Move all the element from the old list in the new list
*
*
* Returns 0 in case of success 1 in case of error
*/
int
@ -771,7 +771,7 @@ xmlListCopy(xmlListPtr cur, const xmlListPtr old)
return (1);
}
}
return (0);
return (0);
}
/* xmlListUnique() */
/* xmlListSwap */

View File

@ -41,7 +41,7 @@
#include <netdb.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#include <fcntl.h>
#endif
#ifdef HAVE_ERRNO_H
#include <errno.h>
@ -188,7 +188,7 @@ void
xmlNanoFTPInit(void) {
const char *env;
#ifdef _WINSOCKAPI_
WSADATA wsaData;
WSADATA wsaData;
#endif
if (initialized)
@ -305,15 +305,15 @@ xmlNanoFTPScanURL(void *ctx, const char *URL) {
/*
* Clear any existing data from the context
*/
if (ctxt->protocol != NULL) {
if (ctxt->protocol != NULL) {
xmlFree(ctxt->protocol);
ctxt->protocol = NULL;
}
if (ctxt->hostname != NULL) {
if (ctxt->hostname != NULL) {
xmlFree(ctxt->hostname);
ctxt->hostname = NULL;
}
if (ctxt->path != NULL) {
if (ctxt->path != NULL) {
xmlFree(ctxt->path);
ctxt->path = NULL;
}
@ -327,7 +327,7 @@ xmlNanoFTPScanURL(void *ctx, const char *URL) {
xmlFreeURI(uri);
return;
}
ctxt->protocol = xmlMemStrdup(uri->scheme);
ctxt->hostname = xmlMemStrdup(uri->server);
if (uri->path != NULL)
@ -358,7 +358,7 @@ xmlNanoFTPScanURL(void *ctx, const char *URL) {
* @URL: The URL used to update the context
*
* Update an FTP context by parsing the URL and finding
* new path it indicates. If there is an error in the
* new path it indicates. If there is an error in the
* protocol, hostname, port or other information, the
* error is raised. It indicates a new connection has to
* be established.
@ -403,7 +403,7 @@ xmlNanoFTPUpdateURL(void *ctx, const char *URL) {
ctxt->path = NULL;
}
if (uri->path == NULL)
if (uri->path == NULL)
ctxt->path = xmlMemStrdup("/");
else
ctxt->path = xmlMemStrdup(uri->path);
@ -427,7 +427,7 @@ void
xmlNanoFTPScanProxy(const char *URL) {
xmlURIPtr uri;
if (proxy != NULL) {
if (proxy != NULL) {
xmlFree(proxy);
proxy = NULL;
}
@ -451,7 +451,7 @@ xmlNanoFTPScanProxy(const char *URL) {
xmlFreeURI(uri);
return;
}
proxy = xmlMemStrdup(uri->server);
if (uri->port != 0)
proxyPort = uri->port;
@ -523,7 +523,7 @@ xmlNanoFTPFreeCtxt(void * ctx) {
* xmlNanoFTPParseResponse:
* @buf: the buffer containing the response
* @len: the buffer length
*
*
* Parsing of the server answer, we just extract the code.
*
* returns 0 for errors
@ -535,22 +535,22 @@ xmlNanoFTPParseResponse(char *buf, int len) {
int val = 0;
if (len < 3) return(-1);
if ((*buf >= '0') && (*buf <= '9'))
if ((*buf >= '0') && (*buf <= '9'))
val = val * 10 + (*buf - '0');
else
return(0);
buf++;
if ((*buf >= '0') && (*buf <= '9'))
if ((*buf >= '0') && (*buf <= '9'))
val = val * 10 + (*buf - '0');
else
return(0);
buf++;
if ((*buf >= '0') && (*buf <= '9'))
if ((*buf >= '0') && (*buf <= '9'))
val = val * 10 + (*buf - '0');
else
return(0);
buf++;
if (*buf == '-')
if (*buf == '-')
return(-val);
return(val);
}
@ -749,7 +749,7 @@ xmlNanoFTPCheckResponse(void *ctx) {
case -1:
__xmlIOErr(XML_FROM_FTP, 0, "select");
return(-1);
}
return(xmlNanoFTPReadResponse(ctx));
@ -1103,7 +1103,7 @@ xmlNanoFTPConnect(void *ctx) {
/* we assume it worked :-\ 1 is error for SITE command */
proxyType = 1;
break;
}
}
if (proxyType == 1) {
closesocket(ctxt->controlFd); ctxt->controlFd = INVALID_SOCKET;
ctxt->controlFd = INVALID_SOCKET;
@ -1134,7 +1134,7 @@ xmlNanoFTPConnect(void *ctx) {
/* we assume it worked :-\ */
proxyType = 2;
return(0);
}
}
if (ctxt->passwd == NULL)
snprintf(buf, sizeof(buf), "PASS anonymous@\r\n");
else
@ -1239,7 +1239,7 @@ xmlNanoFTPConnectTo(const char *server, int port) {
int res;
xmlNanoFTPInit();
if (server == NULL)
if (server == NULL)
return(NULL);
if (port <= 0)
return(NULL);
@ -1332,7 +1332,7 @@ xmlNanoFTPDele(void *ctx, const char *file) {
* 450, 550
* 500, 501, 502, 421, 530
*/
snprintf(buf, sizeof(buf), "DELE %s\r\n", file);
buf[sizeof(buf) - 1] = 0;
len = strlen(buf);
@ -1430,7 +1430,7 @@ xmlNanoFTPGetConnection(void *ctx) {
ctxt->passive = 0;
}
}
cur = &ctxt->controlBuf[ctxt->controlBufAnswer];
cur = &ctxt->controlBuf[ctxt->controlBufAnswer];
while (((*cur < '0') || (*cur > '9')) && *cur != '\0') cur++;
#ifdef SUPPORT_IP6
if ((ctxt->ftpAddr).ss_family == AF_INET6) {
@ -1525,7 +1525,7 @@ xmlNanoFTPGetConnection(void *ctx) {
}
}
return(ctxt->dataFd);
}
/**
@ -1583,7 +1583,7 @@ xmlNanoFTPCloseConnection(void *ctx) {
* @callback: the user callback
* @userData: the user callback data
*
* Parse at most one entry from the listing.
* Parse at most one entry from the listing.
*
* Returns -1 incase of error, the length of data parsed otherwise
*/
@ -1620,7 +1620,7 @@ xmlNanoFTPParseList(const char *list, ftpListCallback callback, void *userData)
if (*cur == 0) return(0);
i = 0;
while (*cur != ' ') {
if (i < 10)
if (i < 10)
attrib[i++] = *cur;
cur++;
if (*cur == 0) return(0);
@ -1634,7 +1634,7 @@ xmlNanoFTPParseList(const char *list, ftpListCallback callback, void *userData)
if (*cur == 0) return(0);
i = 0;
while (*cur != ' ') {
if (i < 10)
if (i < 10)
owner[i++] = *cur;
cur++;
if (*cur == 0) return(0);
@ -1644,7 +1644,7 @@ xmlNanoFTPParseList(const char *list, ftpListCallback callback, void *userData)
if (*cur == 0) return(0);
i = 0;
while (*cur != ' ') {
if (i < 10)
if (i < 10)
group[i++] = *cur;
cur++;
if (*cur == 0) return(0);
@ -1986,7 +1986,7 @@ xmlNanoFTPRead(void *ctx, void *dest, int len) {
*
* Start to fetch the given ftp:// resource
*
* Returns an FTP context, or NULL
* Returns an FTP context, or NULL
*/
void*
@ -2043,9 +2043,9 @@ xmlNanoFTPClose(void *ctx) {
#ifdef STANDALONE
/************************************************************************
* *
* Basic test in Standalone mode *
* *
* *
* Basic test in Standalone mode *
* *
************************************************************************/
static
void ftpList(void *userData, const char *filename, const char* attrib,
@ -2060,7 +2060,7 @@ void ftpData(void *userData, const char *data, int len) {
if (len <= 0) {
fclose((FILE*)userData);
return;
}
}
fwrite(data, len, 1, (FILE*)userData);
}
@ -2092,7 +2092,7 @@ int main(int argc, char **argv) {
if (xmlNanoFTPGet(ctxt, ftpData, (void *) output, tstfile) < 0)
xmlGenericError(xmlGenericErrorContext,
"Failed to get file\n");
}
xmlNanoFTPClose(ctxt);
xmlMemoryDump();

View File

@ -10,7 +10,7 @@
*
* daniel@veillard.com
*/
#define NEED_SOCKETS
#define IN_LIBXML
#include "libxml.h"
@ -46,7 +46,7 @@
#include <resolv.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#include <fcntl.h>
#endif
#ifdef HAVE_ERRNO_H
#include <errno.h>
@ -213,7 +213,7 @@ void
xmlNanoHTTPInit(void) {
const char *env;
#ifdef _WINSOCKAPI_
WSADATA wsaData;
WSADATA wsaData;
#endif
if (initialized)
@ -279,19 +279,19 @@ xmlNanoHTTPScanURL(xmlNanoHTTPCtxtPtr ctxt, const char *URL) {
/*
* Clear any existing data from the context
*/
if (ctxt->protocol != NULL) {
if (ctxt->protocol != NULL) {
xmlFree(ctxt->protocol);
ctxt->protocol = NULL;
}
if (ctxt->hostname != NULL) {
if (ctxt->hostname != NULL) {
xmlFree(ctxt->hostname);
ctxt->hostname = NULL;
}
if (ctxt->path != NULL) {
if (ctxt->path != NULL) {
xmlFree(ctxt->path);
ctxt->path = NULL;
}
if (ctxt->query != NULL) {
if (ctxt->query != NULL) {
xmlFree(ctxt->query);
ctxt->query = NULL;
}
@ -305,7 +305,7 @@ xmlNanoHTTPScanURL(xmlNanoHTTPCtxtPtr ctxt, const char *URL) {
xmlFreeURI(uri);
return;
}
ctxt->protocol = xmlMemStrdup(uri->scheme);
ctxt->hostname = xmlMemStrdup(uri->server);
if (uri->path != NULL)
@ -334,7 +334,7 @@ void
xmlNanoHTTPScanProxy(const char *URL) {
xmlURIPtr uri;
if (proxy != NULL) {
if (proxy != NULL) {
xmlFree(proxy);
proxy = NULL;
}
@ -358,7 +358,7 @@ xmlNanoHTTPScanProxy(const char *URL) {
xmlFreeURI(uri);
return;
}
proxy = xmlMemStrdup(uri->server);
if (uri->port != 0)
proxyPort = uri->port;
@ -644,7 +644,7 @@ xmlNanoHTTPReadLine(xmlNanoHTTPCtxtPtr ctxt) {
char buf[4096];
char *bp = buf;
int rc;
while (bp - buf < 4095) {
if (ctxt->inrptr == ctxt->inptr) {
if ( (rc = xmlNanoHTTPRecv(ctxt)) == 0) {
@ -781,9 +781,9 @@ xmlNanoHTTPScanAnswer(xmlNanoHTTPCtxtPtr ctxt, const char *line) {
xmlFree(ctxt->location);
if (*cur == '/') {
xmlChar *tmp_http = xmlStrdup(BAD_CAST "http://");
xmlChar *tmp_loc =
xmlChar *tmp_loc =
xmlStrcat(tmp_http, (const xmlChar *) ctxt->hostname);
ctxt->location =
ctxt->location =
(char *) xmlStrcat (tmp_loc, (const xmlChar *) cur);
} else {
ctxt->location = xmlMemStrdup(cur);
@ -1267,7 +1267,7 @@ xmlNanoHTTPRead(void *ctx, void *dest, int len) {
#ifdef HAVE_ZLIB_H
if (ctxt->usesGzip == 1) {
if (ctxt->strm == NULL) return(0);
ctxt->strm->next_out = dest;
ctxt->strm->avail_out = len;
ctxt->strm->avail_in = ctxt->inptr - ctxt->inrptr;
@ -1346,7 +1346,7 @@ xmlNanoHTTPMethodRedir(const char *URL, const char *method, const char *input,
#ifdef DEBUG_HTTP
int xmt_bytes;
#endif
if (URL == NULL) return(NULL);
if (method == NULL) method = "GET";
xmlNanoHTTPInit();
@ -1427,13 +1427,13 @@ retry:
if (proxy) {
if (ctxt->port != 80) {
p += snprintf( p, blen - (p - bp), "%s http://%s:%d%s",
p += snprintf( p, blen - (p - bp), "%s http://%s:%d%s",
method, ctxt->hostname,
ctxt->port, ctxt->path );
ctxt->port, ctxt->path );
}
else
else
p += snprintf( p, blen - (p - bp), "%s http://%s%s", method,
ctxt->hostname, ctxt->path);
ctxt->hostname, ctxt->path);
}
else
p += snprintf( p, blen - (p - bp), "%s %s", method, ctxt->path);
@ -1442,7 +1442,7 @@ retry:
p += snprintf( p, blen - (p - bp), "?%s", ctxt->query);
if (ctxt->port == 80) {
p += snprintf( p, blen - (p - bp), " HTTP/1.0\r\nHost: %s\r\n",
p += snprintf( p, blen - (p - bp), " HTTP/1.0\r\nHost: %s\r\n",
ctxt->hostname);
} else {
p += snprintf( p, blen - (p - bp), " HTTP/1.0\r\nHost: %s:%d\r\n",
@ -1453,7 +1453,7 @@ retry:
p += snprintf(p, blen - (p - bp), "Accept-Encoding: gzip\r\n");
#endif
if (contentType != NULL && *contentType)
if (contentType != NULL && *contentType)
p += snprintf(p, blen - (p - bp), "Content-Type: %s\r\n", *contentType);
if (headers != NULL)
@ -1492,7 +1492,7 @@ retry:
if ( xmt_bytes != ilen )
xmlGenericError( xmlGenericErrorContext,
"xmlNanoHTTPMethodRedir: Only %d of %d %s %s\n",
"xmlNanoHTTPMethodRedir: Only %d of %d %s %s\n",
xmt_bytes, ilen,
"bytes of HTTP content sent to host",
ctxt->hostname );
@ -1620,7 +1620,7 @@ xmlNanoHTTPFetch(const char *URL, const char *filename, char **contentType) {
ctxt = xmlNanoHTTPOpen(URL, contentType);
if (ctxt == NULL) return(-1);
if (!strcmp(filename, "-"))
if (!strcmp(filename, "-"))
fd = 0;
else {
fd = open(filename, O_CREAT | O_WRONLY, 00644);
@ -1666,7 +1666,7 @@ xmlNanoHTTPSave(void *ctxt, const char *filename) {
if ((ctxt == NULL) || (filename == NULL)) return(-1);
if (!strcmp(filename, "-"))
if (!strcmp(filename, "-"))
fd = 0;
else {
fd = open(filename, O_CREAT | O_WRONLY, 0666);
@ -1795,7 +1795,7 @@ xmlNanoHTTPMimeType( void * ctx ) {
* Check if all the content was read
*
* Returns 0 if all the content was read and available, returns
* -1 if received content length was less than specified or an error
* -1 if received content length was less than specified or an error
* occurred.
*/
static int
@ -1849,7 +1849,7 @@ int main(int argc, char **argv) {
char *contentType = NULL;
if (argv[1] != NULL) {
if (argv[2] != NULL)
if (argv[2] != NULL)
xmlNanoHTTPFetch(argv[1], argv[2], &contentType);
else
xmlNanoHTTPFetch(argv[1], "-", &contentType);

356
parser.c

File diff suppressed because it is too large Load Diff

View File

@ -76,15 +76,15 @@ xmlCheckVersion(int version) {
xmlInitParser();
if ((myversion / 10000) != (version / 10000)) {
xmlGenericError(xmlGenericErrorContext,
xmlGenericError(xmlGenericErrorContext,
"Fatal: program compiled against libxml %d using libxml %d\n",
(version / 10000), (myversion / 10000));
fprintf(stderr,
fprintf(stderr,
"Fatal: program compiled against libxml %d using libxml %d\n",
(version / 10000), (myversion / 10000));
}
if ((myversion / 100) < (version / 100)) {
xmlGenericError(xmlGenericErrorContext,
xmlGenericError(xmlGenericErrorContext,
"Warning: program compiled against libxml %d using older %d\n",
(version / 100), (myversion / 100));
}
@ -93,7 +93,7 @@ xmlCheckVersion(int version) {
/************************************************************************
* *
* Some factorized error routines *
* Some factorized error routines *
* *
************************************************************************/
@ -404,7 +404,7 @@ xmlParserInputShrink(xmlParserInputPtr in) {
/************************************************************************
* *
* UTF8 character input and related functions *
* UTF8 character input and related functions *
* *
************************************************************************/
@ -455,7 +455,7 @@ xmlNextChar(xmlParserCtxtPtr ctxt)
* UCS-4 range (hex.) UTF-8 octet sequence (binary)
* 0000 0000-0000 007F 0xxxxxxx
* 0000 0080-0000 07FF 110xxxxx 10xxxxxx
* 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx
* 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx
*
* Check for the 0x110000 limit too
*/
@ -605,7 +605,7 @@ xmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) {
* UCS-4 range (hex.) UTF-8 octet sequence (binary)
* 0000 0000-0000 007F 0xxxxxxx
* 0000 0080-0000 07FF 110xxxxx 10xxxxxx
* 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx
* 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx
*
* Check for the 0x110000 limit too
*/
@ -666,7 +666,7 @@ xmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) {
if (!IS_CHAR(val)) {
xmlErrEncodingInt(ctxt, XML_ERR_INVALID_CHAR,
"Char 0x%X out of allowed range\n", val);
}
}
return(val);
} else {
/* 1-byte code */
@ -730,7 +730,7 @@ encoding_error:
"Input is not proper UTF-8, indicate encoding !\n%s",
BAD_CAST buffer, NULL);
}
ctxt->charset = XML_CHAR_ENCODING_8859_1;
ctxt->charset = XML_CHAR_ENCODING_8859_1;
*len = 1;
return((int) *ctxt->input->cur);
}
@ -759,7 +759,7 @@ xmlStringCurrentChar(xmlParserCtxtPtr ctxt, const xmlChar * cur, int *len)
* UCS-4 range (hex.) UTF-8 octet sequence (binary)
* 0000 0000-0000 007F 0xxxxxxx
* 0000 0080-0000 07FF 110xxxxx 10xxxxxx
* 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx
* 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx
*
* Check for the 0x110000 limit too
*/
@ -852,7 +852,7 @@ encoding_error:
* @out: pointer to an array of xmlChar
* @val: the char value
*
* append the char value in the array
* append the char value in the array
*
* Returns the number of xmlChar written
*/
@ -866,7 +866,7 @@ xmlCopyCharMultiByte(xmlChar *out, int val) {
* UCS-4 range (hex.) UTF-8 octet sequence (binary)
* 0000 0000-0000 007F 0xxxxxxx
* 0000 0080-0000 07FF 110xxxxx 10xxxxxx
* 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx
* 0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx
*/
if (val >= 0x80) {
xmlChar *savedout = out;
@ -894,7 +894,7 @@ xmlCopyCharMultiByte(xmlChar *out, int val) {
* @out: pointer to an array of xmlChar
* @val: the char value
*
* append the char value in the array
* append the char value in the array
*
* Returns the number of xmlChar written
*/
@ -1160,7 +1160,7 @@ xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
unsigned int use;
/*
* Specific handling of the Byte Order Mark for
* Specific handling of the Byte Order Mark for
* UTF-16
*/
if ((handler->name != NULL) &&
@ -1295,7 +1295,7 @@ xmlSwitchToEncodingInt(xmlParserCtxtPtr ctxt,
* Returns 0 in case of success, -1 otherwise
*/
int
xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler)
xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler)
{
return (xmlSwitchToEncodingInt(ctxt, handler, -1));
}
@ -1322,7 +1322,7 @@ xmlFreeInputStream(xmlParserInputPtr input) {
if (input->version != NULL) xmlFree((char *) input->version);
if ((input->free != NULL) && (input->base != NULL))
input->free((xmlChar *) input->base);
if (input->buf != NULL)
if (input->buf != NULL)
xmlFreeParserInputBuffer(input->buf);
xmlFree(input);
}
@ -1528,7 +1528,7 @@ xmlNewInputFromFile(xmlParserCtxtPtr ctxt, const char *filename) {
inputStream = xmlCheckHTTPInput(ctxt, inputStream);
if (inputStream == NULL)
return(NULL);
if (inputStream->filename == NULL)
URI = xmlStrdup((xmlChar *) filename);
else
@ -1765,7 +1765,7 @@ xmlFreeParserCtxt(xmlParserCtxtPtr ctxt)
if (ctxt->nsTab != NULL) xmlFree((char *) ctxt->nsTab);
if (ctxt->pushTab != NULL) xmlFree(ctxt->pushTab);
if (ctxt->attallocs != NULL) xmlFree(ctxt->attallocs);
if (ctxt->attsDefault != NULL)
if (ctxt->attsDefault != NULL)
xmlHashFree(ctxt->attsDefault, (xmlHashDeallocator) xmlFree);
if (ctxt->attsSpecial != NULL)
xmlHashFree(ctxt->attsSpecial, NULL);
@ -1865,7 +1865,7 @@ xmlClearParserCtxt(xmlParserCtxtPtr ctxt)
* @node: an XML node within the tree
*
* Find the parser node info struct for a given node
*
*
* Returns an xmlParserNodeInfo block pointer or NULL
*/
const xmlParserNodeInfo *
@ -1923,7 +1923,7 @@ xmlClearNodeInfoSeq(xmlParserNodeInfoSeqPtr seq)
* @seq: a node info sequence pointer
* @node: an XML node pointer
*
*
*
* xmlParserFindNodeInfoIndex : Find the index that the info record for
* the given node is or should be at in a sorted sequence
*
@ -1980,7 +1980,7 @@ xmlParserAddNodeInfo(xmlParserCtxtPtr ctxt,
pos = xmlParserFindNodeInfoIndex(&ctxt->node_seq, (xmlNodePtr)
info->node);
if ((pos < ctxt->node_seq.length) &&
if ((pos < ctxt->node_seq.length) &&
(ctxt->node_seq.buffer != NULL) &&
(ctxt->node_seq.buffer[pos].node == info->node)) {
ctxt->node_seq.buffer[pos] = *info;
@ -2033,7 +2033,7 @@ xmlParserAddNodeInfo(xmlParserCtxtPtr ctxt,
************************************************************************/
/**
* xmlPedanticParserDefault:
* @val: int 0 or 1
* @val: int 0 or 1
*
* Set and return the previous value for enabling pedantic warnings.
*
@ -2050,7 +2050,7 @@ xmlPedanticParserDefault(int val) {
/**
* xmlLineNumbersDefault:
* @val: int 0 or 1
* @val: int 0 or 1
*
* Set and return the previous value for enabling line numbers in elements
* contents. This may break on old application and is turned off by default.
@ -2068,7 +2068,7 @@ xmlLineNumbersDefault(int val) {
/**
* xmlSubstituteEntitiesDefault:
* @val: int 0 or 1
* @val: int 0 or 1
*
* Set and return the previous value for default entity support.
* Initially the parser always keep entity references instead of substituting
@ -2090,7 +2090,7 @@ xmlSubstituteEntitiesDefault(int val) {
/**
* xmlKeepBlanksDefault:
* @val: int 0 or 1
* @val: int 0 or 1
*
* Set and return the previous value for default blanks text nodes support.
* The 1.x version of the parser used an heuristic to try to detect
@ -2101,7 +2101,7 @@ xmlSubstituteEntitiesDefault(int val) {
* ignorableWhitespace() are only generated when running the parser in
* validating mode and when the current element doesn't allow CDATA or
* mixed content.
* This function is provided as a way to force the standard behavior
* This function is provided as a way to force the standard behavior
* on 1.X libs and to switch back to the old mode for compatibility when
* running 1.X client code on 2.X . Upgrade of 1.X code should be done
* by using xmlIsBlankNode() commodity function to detect the "empty"

202
pattern.c
View File

@ -3,7 +3,7 @@
*
* Reference:
* http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/
* to some extent
* to some extent
* http://www.w3.org/TR/1999/REC-xml-19991116
*
* See Copyright for the status of this software.
@ -56,7 +56,7 @@
* NOTE: Those private flags (XML_STREAM_xxx) are used
* in _xmlStreamCtxt->flag. They extend the public
* xmlPatternFlags, so be carefull not to interfere with the
* reserved values for xmlPatternFlags.
* reserved values for xmlPatternFlags.
*/
#define XML_STREAM_FINAL_IS_ANY_NODE 1<<14
#define XML_STREAM_FROM_ROOT 1<<15
@ -162,7 +162,7 @@ struct _xmlStepOp {
#define PAT_FROM_CUR (1<<9)
struct _xmlPattern {
void *data; /* the associated template */
void *data; /* the associated template */
xmlDictPtr dict; /* the optional dictionary */
struct _xmlPattern *next; /* next pattern if | is used */
const xmlChar *pattern; /* the pattern */
@ -181,15 +181,15 @@ struct _xmlPatParserContext {
int error; /* error code */
xmlDictPtr dict; /* the dictionary if any */
xmlPatternPtr comp; /* the result */
xmlNodePtr elem; /* the current node if any */
xmlNodePtr elem; /* the current node if any */
const xmlChar **namespaces; /* the namespaces definitions */
int nb_namespaces; /* the number of namespaces */
};
/************************************************************************
* *
* Type functions *
* *
* *
* Type functions *
* *
************************************************************************/
/**
@ -327,7 +327,7 @@ xmlNewPatParserContext(const xmlChar *pattern, xmlDictPtr dict,
static void
xmlFreePatParserContext(xmlPatParserContextPtr ctxt) {
if (ctxt == NULL)
return;
return;
memset(ctxt, -1, sizeof(xmlPatParserContext));
xmlFree(ctxt);
}
@ -455,9 +455,9 @@ xmlReversePattern(xmlPatternPtr comp) {
}
/************************************************************************
* *
* The interpreter for the precompiled patterns *
* *
* *
* The interpreter for the precompiled patterns *
* *
************************************************************************/
static int
@ -709,7 +709,7 @@ rollback:
* *
************************************************************************/
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
@ -719,14 +719,14 @@ rollback:
#define PEEKPREV(val) ctxt->cur[-(val)]
#define CUR_PTR ctxt->cur
#define SKIP_BLANKS \
#define SKIP_BLANKS \
while (IS_BLANK_CH(CUR)) NEXT
#define CURRENT (*ctxt->cur)
#define NEXT ((*ctxt->cur) ? ctxt->cur++: ctxt->cur)
#define PUSH(op, val, val2) \
#define PUSH(op, val, val2) \
if (xmlPatternAdd(ctxt, ctxt->comp, (op), (val), (val2))) goto error;
#define XSLT_ERROR(X) \
@ -772,7 +772,7 @@ xmlPatScanLiteral(xmlPatParserContextPtr ctxt) {
if (ctxt->dict)
ret = (xmlChar *) xmlDictLookup(ctxt->dict, q, cur - q);
else
ret = xmlStrndup(q, cur - q);
ret = xmlStrndup(q, cur - q);
}
cur += len;
CUR_PTR = cur;
@ -791,7 +791,7 @@ xmlPatScanLiteral(xmlPatParserContextPtr ctxt) {
if (ctxt->dict)
ret = (xmlChar *) xmlDictLookup(ctxt->dict, q, cur - q);
else
ret = xmlStrndup(q, cur - q);
ret = xmlStrndup(q, cur - q);
}
cur += len;
CUR_PTR = cur;
@ -808,7 +808,7 @@ xmlPatScanLiteral(xmlPatParserContextPtr ctxt) {
* xmlPatScanName:
* @ctxt: the XPath Parser context
*
* [4] NameChar ::= Letter | Digit | '.' | '-' | '_' |
* [4] NameChar ::= Letter | Digit | '.' | '-' | '_' |
* CombiningChar | Extender
*
* [5] Name ::= (Letter | '_' | ':') (NameChar)*
@ -833,7 +833,7 @@ xmlPatScanName(xmlPatParserContextPtr ctxt) {
while ((IS_LETTER(val)) || (IS_DIGIT(val)) ||
(val == '.') || (val == '-') ||
(val == '_') ||
(val == '_') ||
(IS_COMBINING(val)) ||
(IS_EXTENDER(val))) {
cur += len;
@ -842,7 +842,7 @@ xmlPatScanName(xmlPatParserContextPtr ctxt) {
if (ctxt->dict)
ret = (xmlChar *) xmlDictLookup(ctxt->dict, q, cur - q);
else
ret = xmlStrndup(q, cur - q);
ret = xmlStrndup(q, cur - q);
CUR_PTR = cur;
return(ret);
}
@ -922,7 +922,7 @@ xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) {
xmlChar *token = NULL;
xmlChar *name = NULL;
xmlChar *URL = NULL;
SKIP_BLANKS;
name = xmlPatScanNCName(ctxt);
if (name == NULL) {
@ -939,10 +939,10 @@ xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) {
if (CUR == ':') {
int i;
xmlChar *prefix = name;
NEXT;
if (IS_BLANK_CH(CUR)) {
if (IS_BLANK_CH(CUR)) {
ERROR5(NULL, NULL, NULL, "Invalid QName.\n", NULL);
XML_PAT_FREE_STRING(ctxt, prefix);
ctxt->error = 1;
@ -957,11 +957,11 @@ xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) {
(prefix[2] == 'l') &&
(prefix[3] == 0))
{
XML_PAT_COPY_NSNAME(ctxt, URL, XML_XML_NAMESPACE);
XML_PAT_COPY_NSNAME(ctxt, URL, XML_XML_NAMESPACE);
} else {
for (i = 0;i < ctxt->nb_namespaces;i++) {
if (xmlStrEqual(ctxt->namespaces[2 * i + 1], prefix)) {
XML_PAT_COPY_NSNAME(ctxt, URL, ctxt->namespaces[2 * i])
XML_PAT_COPY_NSNAME(ctxt, URL, ctxt->namespaces[2 * i])
break;
}
}
@ -969,7 +969,7 @@ xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) {
ERROR5(NULL, NULL, NULL,
"xmlCompileAttributeTest : no namespace bound to prefix %s\n",
prefix);
ctxt->error = 1;
ctxt->error = 1;
goto error;
}
}
@ -983,7 +983,7 @@ xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) {
"xmlCompileAttributeTest : Name expected\n");
ctxt->error = 1;
goto error;
}
}
} else {
PUSH(XML_OP_ATTR, token, URL);
}
@ -993,7 +993,7 @@ xmlCompileAttributeTest(xmlPatParserContextPtr ctxt) {
return;
error:
if (URL != NULL)
XML_PAT_FREE_STRING(ctxt, URL)
XML_PAT_FREE_STRING(ctxt, URL)
if (token != NULL)
XML_PAT_FREE_STRING(ctxt, token);
}
@ -1006,7 +1006,7 @@ error:
* form suitable for fast matching.
*
* [3] Step ::= '.' | NameTest
* [4] NameTest ::= QName | '*' | NCName ':' '*'
* [4] NameTest ::= QName | '*' | NCName ':' '*'
*/
static void
@ -1037,7 +1037,7 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
}
NEXT;
xmlCompileAttributeTest(ctxt);
if (ctxt->error != 0)
if (ctxt->error != 0)
goto error;
return;
}
@ -1062,7 +1062,7 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
NEXT;
if (CUR != ':') {
xmlChar *prefix = name;
int i;
int i;
if (hasBlanks || IS_BLANK_CH(CUR)) {
ERROR5(NULL, NULL, NULL, "Invalid QName.\n", NULL);
@ -1111,7 +1111,7 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
}
} else {
NEXT;
if (xmlStrEqual(name, (const xmlChar *) "child")) {
if (xmlStrEqual(name, (const xmlChar *) "child")) {
XML_PAT_FREE_STRING(ctxt, name);
name = xmlPatScanName(ctxt);
if (name == NULL) {
@ -1129,7 +1129,7 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
if (CUR == ':') {
xmlChar *prefix = name;
int i;
NEXT;
if (IS_BLANK_CH(CUR)) {
ERROR5(NULL, NULL, NULL, "Invalid QName.\n", NULL);
@ -1145,11 +1145,11 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
(prefix[2] == 'l') &&
(prefix[3] == 0))
{
XML_PAT_COPY_NSNAME(ctxt, URL, XML_XML_NAMESPACE)
XML_PAT_COPY_NSNAME(ctxt, URL, XML_XML_NAMESPACE)
} else {
for (i = 0;i < ctxt->nb_namespaces;i++) {
if (xmlStrEqual(ctxt->namespaces[2 * i + 1], prefix)) {
XML_PAT_COPY_NSNAME(ctxt, URL, ctxt->namespaces[2 * i])
XML_PAT_COPY_NSNAME(ctxt, URL, ctxt->namespaces[2 * i])
break;
}
}
@ -1197,7 +1197,7 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
"The 'element' or 'attribute' axis is expected.\n", NULL);
ctxt->error = 1;
goto error;
}
}
}
} else if (CUR == '*') {
if (name != NULL) {
@ -1212,7 +1212,7 @@ xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
return;
error:
if (URL != NULL)
XML_PAT_FREE_STRING(ctxt, URL)
XML_PAT_FREE_STRING(ctxt, URL)
if (token != NULL)
XML_PAT_FREE_STRING(ctxt, token)
if (name != NULL)
@ -1226,7 +1226,7 @@ error:
* Compile the Path Pattern and generates a precompiled
* form suitable for fast matching.
*
* [5] Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest )
* [5] Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest )
*/
static void
xmlCompilePathPattern(xmlPatParserContextPtr ctxt) {
@ -1236,7 +1236,7 @@ xmlCompilePathPattern(xmlPatParserContextPtr ctxt) {
} else if ((CUR == '.') || (ctxt->comp->flags & XML_PATTERN_NOTPATTERN)) {
ctxt->comp->flags |= PAT_FROM_CUR;
}
if ((CUR == '/') && (NXT(1) == '/')) {
PUSH(XML_OP_ANCESTOR, NULL, NULL);
NEXT;
@ -1299,7 +1299,7 @@ xmlCompilePathPattern(xmlPatParserContextPtr ctxt) {
ERROR5(NULL, NULL, NULL,
"Incomplete expression '%s'.\n", ctxt->base);
ctxt->error = 1;
goto error;
goto error;
}
xmlCompileStepPattern(ctxt);
if (ctxt->error != 0)
@ -1323,7 +1323,7 @@ error:
* Compile the Path Pattern and generates a precompiled
* form suitable for fast matching.
*
* [5] Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest )
* [5] Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest )
*/
static void
xmlCompileIDCXPathPath(xmlPatParserContextPtr ctxt) {
@ -1378,7 +1378,7 @@ xmlCompileIDCXPathPath(xmlPatParserContextPtr ctxt) {
*/
do {
xmlCompileStepPattern(ctxt);
if (ctxt->error != 0)
if (ctxt->error != 0)
goto error;
SKIP_BLANKS;
if (CUR != '/')
@ -1397,7 +1397,7 @@ xmlCompileIDCXPathPath(xmlPatParserContextPtr ctxt) {
}
if (CUR == 0)
goto error_unfinished;
} while (CUR != 0);
if (CUR != 0) {
@ -1413,7 +1413,7 @@ error:
error_unfinished:
ctxt->error = 1;
ERROR5(NULL, NULL, NULL,
"Unfinished expression '%s'.\n", ctxt->base);
"Unfinished expression '%s'.\n", ctxt->base);
return;
}
@ -1568,7 +1568,7 @@ xmlStreamCompAddStep(xmlStreamCompPtr comp, const xmlChar *name,
/**
* xmlStreamCompile:
* @comp: the precompiled pattern
*
*
* Tries to stream compile a pattern
*
* Returns -1 in case of failure and 0 in case of success.
@ -1605,7 +1605,7 @@ xmlStreamCompile(xmlPatternPtr comp) {
xmlDictReference(stream->dict);
}
i = 0;
i = 0;
if (comp->flags & PAT_FROM_ROOT)
stream->flags |= XML_STREAM_FROM_ROOT;
@ -1621,12 +1621,12 @@ xmlStreamCompile(xmlPatternPtr comp) {
break;
case XML_OP_NS:
s = xmlStreamCompAddStep(stream, NULL, step.value,
XML_ELEMENT_NODE, flags);
XML_ELEMENT_NODE, flags);
if (s < 0)
goto error;
prevs = s;
flags = 0;
break;
flags = 0;
break;
case XML_OP_ATTR:
flags |= XML_STREAM_STEP_ATTR;
prevs = -1;
@ -1636,7 +1636,7 @@ xmlStreamCompile(xmlPatternPtr comp) {
if (s < 0)
goto error;
break;
case XML_OP_ELEM:
case XML_OP_ELEM:
if ((step.value == NULL) && (step.value2 == NULL)) {
/*
* We have a "." or "self::node()" here.
@ -1655,7 +1655,7 @@ xmlStreamCompile(xmlPatternPtr comp) {
if (comp->nbStep == i + 1) {
stream->flags |= XML_STREAM_FINAL_IS_ANY_NODE;
}
flags |= XML_STREAM_STEP_NODE;
flags |= XML_STREAM_STEP_NODE;
s = xmlStreamCompAddStep(stream, NULL, NULL,
XML_STREAM_ANY_NODE, flags);
if (s < 0)
@ -1671,39 +1671,39 @@ xmlStreamCompile(xmlPatternPtr comp) {
stream->steps[prevs].flags |= XML_STREAM_STEP_IN_SET;
prevs = -1;
}
break;
break;
} else {
/* Just skip this one. */
continue;
}
}
/* An element node. */
/* An element node. */
s = xmlStreamCompAddStep(stream, step.value, step.value2,
XML_ELEMENT_NODE, flags);
if (s < 0)
goto error;
prevs = s;
flags = 0;
break;
case XML_OP_CHILD:
/* An element node child. */
s = xmlStreamCompAddStep(stream, step.value, step.value2,
XML_ELEMENT_NODE, flags);
if (s < 0)
goto error;
prevs = s;
flags = 0;
break;
case XML_OP_ALL:
s = xmlStreamCompAddStep(stream, NULL, NULL,
XML_ELEMENT_NODE, flags);
XML_ELEMENT_NODE, flags);
if (s < 0)
goto error;
prevs = s;
flags = 0;
break;
case XML_OP_PARENT:
case XML_OP_CHILD:
/* An element node child. */
s = xmlStreamCompAddStep(stream, step.value, step.value2,
XML_ELEMENT_NODE, flags);
if (s < 0)
goto error;
prevs = s;
flags = 0;
break;
case XML_OP_ALL:
s = xmlStreamCompAddStep(stream, NULL, NULL,
XML_ELEMENT_NODE, flags);
if (s < 0)
goto error;
prevs = s;
flags = 0;
break;
case XML_OP_PARENT:
break;
case XML_OP_ANCESTOR:
/* Skip redundant continuations. */
@ -1717,7 +1717,7 @@ xmlStreamCompile(xmlPatternPtr comp) {
stream->flags |= XML_STREAM_DESC;
break;
}
}
}
if ((! root) && (comp->flags & XML_PATTERN_NOTPATTERN) == 0) {
/*
* If this should behave like a real pattern, we will mark
@ -1729,7 +1729,7 @@ xmlStreamCompile(xmlPatternPtr comp) {
if (stream->nbStep > 0) {
if ((stream->steps[0].flags & XML_STREAM_STEP_DESC) == 0)
stream->steps[0].flags |= XML_STREAM_STEP_DESC;
stream->steps[0].flags |= XML_STREAM_STEP_DESC;
}
}
if (stream->nbStep <= s)
@ -1922,7 +1922,7 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
if ((nodeType != XML_ATTRIBUTE_NODE) &&
(((stream->flags & XML_PATTERN_NOTPATTERN) == 0) ||
(stream->level == 0))) {
ret = 1;
ret = 1;
}
stream->level++;
goto stream_next;
@ -1931,7 +1931,7 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
/*
* Skip blocked expressions.
*/
stream->level++;
stream->level++;
goto stream_next;
}
@ -1974,7 +1974,7 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
* If there are "//", then we need to process every "//"
* occuring in the states, plus any other state for this
* level.
*/
*/
stepNr = stream->states[2 * i];
/* TODO: should not happen anymore: dead states */
@ -1992,7 +1992,7 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
if ((tmp < stream->level) && (!desc))
goto next_state;
}
/*
/*
* Check for correct node-type.
*/
step = comp->steps[stepNr];
@ -2006,7 +2006,7 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
goto next_state;
} else if (step.nodeType != XML_STREAM_ANY_NODE)
goto next_state;
}
}
/*
* Compare local/namespace-name.
*/
@ -2027,9 +2027,9 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
xmlStrEqual(step.name, name) &&
((step.ns == ns) || xmlStrEqual(step.ns, ns)))
{
match = 1;
}
#if 0
match = 1;
}
#if 0
/*
* TODO: Pointer comparison won't work, since not guaranteed that the given
* values are in the same dict; especially if it's the namespace name,
@ -2044,8 +2044,8 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
} else {
match = ((step.name == name) && (step.ns == ns));
}
#endif /* if 0 ------------------------------------------------------- */
if (match) {
#endif /* if 0 ------------------------------------------------------- */
if (match) {
final = step.flags & XML_STREAM_STEP_FINAL;
if (desc) {
if (final) {
@ -2070,7 +2070,7 @@ xmlStreamPushInternal(xmlStreamCtxtPtr stream,
*/
ret = 1;
}
}
}
if (((comp->flags & XML_STREAM_DESC) == 0) &&
((! match) || final)) {
/*
@ -2101,7 +2101,7 @@ next_state:
* Re/enter the expression if it is a "descendant" one,
* or if we are at the 1st level of evaluation.
*/
if (stream->level == 1) {
if (XML_STREAM_XS_IDC(stream)) {
/*
@ -2111,7 +2111,7 @@ next_state:
goto stream_next;
} else
goto compare;
}
}
/*
* A "//" is always reentrant.
*/
@ -2121,14 +2121,14 @@ next_state:
/*
* XS-IDC: Process the 2nd level, since the missing
* "self::node()" is responsible for the 2nd level being
* the real start level.
*/
* the real start level.
*/
if ((stream->level == 2) && XML_STREAM_XS_IDC(stream))
goto compare;
goto stream_next;
}
compare:
/*
* Check expected node-type.
@ -2137,7 +2137,7 @@ compare:
if (nodeType == XML_ATTRIBUTE_NODE)
goto stream_next;
else if (step.nodeType != XML_STREAM_ANY_NODE)
goto stream_next;
goto stream_next;
}
/*
* Compare local/namespace-name.
@ -2159,10 +2159,10 @@ compare:
xmlStrEqual(step.name, name) &&
((step.ns == ns) || xmlStrEqual(step.ns, ns)))
{
match = 1;
}
match = 1;
}
final = step.flags & XML_STREAM_STEP_FINAL;
if (match) {
if (match) {
if (final)
ret = 1;
else
@ -2187,7 +2187,7 @@ compare:
stream_next:
stream = stream->next;
} /* while stream != NULL */
if (err > 0)
ret = -1;
#ifdef DEBUG_STREAMING
@ -2279,7 +2279,7 @@ xmlStreamPushAttr(xmlStreamCtxtPtr stream,
int
xmlStreamPop(xmlStreamCtxtPtr stream) {
int i, lev;
if (stream == NULL)
return(-1);
while (stream != NULL) {
@ -2298,7 +2298,7 @@ xmlStreamPop(xmlStreamCtxtPtr stream) {
stream->level--;
/*
* Check evolution of existing states
*/
*/
for (i = stream->nbState -1; i >= 0; i--) {
/* discard obsoleted states */
lev = stream->states[(2 * i) + 1];
@ -2326,11 +2326,11 @@ xmlStreamPop(xmlStreamCtxtPtr stream) {
*/
int
xmlStreamWantsAnyNode(xmlStreamCtxtPtr streamCtxt)
{
{
if (streamCtxt == NULL)
return(-1);
while (streamCtxt != NULL) {
if (streamCtxt->comp->flags & XML_STREAM_FINAL_IS_ANY_NODE)
if (streamCtxt->comp->flags & XML_STREAM_FINAL_IS_ANY_NODE)
return(1);
streamCtxt = streamCtxt->next;
}
@ -2381,13 +2381,13 @@ xmlPatterncompile(const xmlChar *pattern, xmlDict *dict, int flags,
}
or++;
}
if (ctxt == NULL) goto error;
if (ctxt == NULL) goto error;
cur = xmlNewPattern();
if (cur == NULL) goto error;
/*
* Assign string dict.
*/
if (dict) {
if (dict) {
cur->dict = dict;
xmlDictReference(dict);
}
@ -2570,7 +2570,7 @@ xmlPatternMaxDepth(xmlPatternPtr comp) {
* part of the set.
*
* Returns -1 in case of error otherwise the depth,
*
*
*/
int
xmlPatternMinDepth(xmlPatternPtr comp) {

0
python/setup.py Normal file → Executable file
View File

View File

@ -61,7 +61,7 @@ static const xmlChar *xmlRelaxNGNs = (const xmlChar *)
#define DEBUG_LIST 1
#define DEBUG_INCLUDE 1
#define DEBUG_INCLUDE 1
#define DEBUG_ERROR 1
@ -72,7 +72,7 @@ static const xmlChar *xmlRelaxNGNs = (const xmlChar *)
#define MAX_ERROR 5
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
@ -422,7 +422,7 @@ struct _xmlRelaxNGDocument {
/************************************************************************
* *
* Some factorized error routines *
* Some factorized error routines *
* *
************************************************************************/
@ -565,9 +565,9 @@ xmlRngVErr(xmlRelaxNGValidCtxtPtr ctxt, xmlNodePtr node, int error,
}
/************************************************************************
* *
* Preliminary type checking interfaces *
* *
* *
* Preliminary type checking interfaces *
* *
************************************************************************/
/**
@ -655,9 +655,9 @@ struct _xmlRelaxNGTypeLibrary {
};
/************************************************************************
* *
* Allocation functions *
* *
* *
* Allocation functions *
* *
************************************************************************/
static void xmlRelaxNGFreeGrammar(xmlRelaxNGGrammarPtr grammar);
static void xmlRelaxNGFreeDefine(xmlRelaxNGDefinePtr define);
@ -1398,9 +1398,9 @@ xmlRelaxNGFreeValidState(xmlRelaxNGValidCtxtPtr ctxt,
}
/************************************************************************
* *
* Semi internal functions *
* *
* *
* Semi internal functions *
* *
************************************************************************/
/**
@ -1430,9 +1430,9 @@ xmlRelaxParserSetFlag(xmlRelaxNGParserCtxtPtr ctxt, int flags)
}
/************************************************************************
* *
* Document functions *
* *
* *
* Document functions *
* *
************************************************************************/
static xmlDocPtr xmlRelaxNGCleanupDoc(xmlRelaxNGParserCtxtPtr ctxt,
xmlDocPtr doc);
@ -2008,9 +2008,9 @@ xmlRelaxNGLoadExternalRef(xmlRelaxNGParserCtxtPtr ctxt,
}
/************************************************************************
* *
* Error functions *
* *
* *
* Error functions *
* *
************************************************************************/
#define VALID_ERR(a) xmlRelaxNGAddValidError(ctxt, a, NULL, NULL, 0);
@ -2361,7 +2361,7 @@ xmlRelaxNGAddValidError(xmlRelaxNGValidCtxtPtr ctxt,
* generate the error directly
*/
if (((ctxt->flags & FLAGS_IGNORABLE) == 0) ||
(ctxt->flags & FLAGS_NEGATIVE)) {
(ctxt->flags & FLAGS_NEGATIVE)) {
xmlNodePtr node, seq;
/*
@ -2391,9 +2391,9 @@ xmlRelaxNGAddValidError(xmlRelaxNGValidCtxtPtr ctxt,
/************************************************************************
* *
* Type library hooks *
* *
* *
* Type library hooks *
* *
************************************************************************/
static xmlChar *xmlRelaxNGNormalize(xmlRelaxNGValidCtxtPtr ctxt,
const xmlChar * str);
@ -2848,12 +2848,12 @@ xmlRelaxNGCleanupTypes(void)
}
/************************************************************************
* *
* Compiling element content into regexp *
* *
* *
* Compiling element content into regexp *
* *
* Sometime the element content can be compiled into a pure regexp, *
* This allows a faster execution and streamability at that level *
* *
* *
************************************************************************/
/* from automata.c but not exported */
@ -3326,9 +3326,9 @@ xmlRelaxNGTryCompile(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr def)
}
/************************************************************************
* *
* Parsing functions *
* *
* *
* Parsing functions *
* *
************************************************************************/
static xmlRelaxNGDefinePtr xmlRelaxNGParseAttribute(xmlRelaxNGParserCtxtPtr
@ -6706,9 +6706,9 @@ xmlRelaxNGParseDocument(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node)
}
/************************************************************************
* *
* Reading RelaxNGs *
* *
* *
* Reading RelaxNGs *
* *
************************************************************************/
/**
@ -7522,7 +7522,7 @@ xmlRelaxNGParse(xmlRelaxNGParserCtxtPtr ctxt)
xmlRngPErr(ctxt, (xmlNodePtr) doc,
XML_RNGP_EMPTY, "xmlRelaxNGParse: %s is empty\n",
(ctxt->URL ? ctxt->URL : BAD_CAST "schemas"), NULL);
xmlFreeDoc(ctxt->document);
ctxt->document = NULL;
return (NULL);
@ -7664,9 +7664,9 @@ xmlRelaxNGSetParserStructuredErrors(xmlRelaxNGParserCtxtPtr ctxt,
#ifdef LIBXML_OUTPUT_ENABLED
/************************************************************************
* *
* Dump back a compiled form *
* *
* *
* Dump back a compiled form *
* *
************************************************************************/
static void xmlRelaxNGDumpDefine(FILE * output,
xmlRelaxNGDefinePtr define);
@ -7807,7 +7807,7 @@ xmlRelaxNGDumpDefine(FILE * output, xmlRelaxNGDefinePtr define)
* xmlRelaxNGDumpGrammar:
* @output: the file output
* @grammar: a grammar structure
* @top: is this a top grammar
* @top: is this a top grammar
*
* Dump a RelaxNG structure back
*/
@ -7900,9 +7900,9 @@ xmlRelaxNGDumpTree(FILE * output, xmlRelaxNGPtr schema)
#endif /* LIBXML_OUTPUT_ENABLED */
/************************************************************************
* *
* Validation of compiled content *
* *
* *
* Validation of compiled content *
* *
************************************************************************/
static int xmlRelaxNGValidateDefinition(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGDefinePtr define);
@ -8045,9 +8045,9 @@ xmlRelaxNGValidateCompiledContent(xmlRelaxNGValidCtxtPtr ctxt,
}
/************************************************************************
* *
* Progressive validation of when possible *
* *
* *
* Progressive validation of when possible *
* *
************************************************************************/
static int xmlRelaxNGValidateAttributeList(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGDefinePtr defines);
@ -8481,9 +8481,9 @@ xmlRelaxNGValidateFullElement(xmlRelaxNGValidCtxtPtr ctxt,
}
/************************************************************************
* *
* Generic interpreted validation implementation *
* *
* *
* Generic interpreted validation implementation *
* *
************************************************************************/
static int xmlRelaxNGValidateValue(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGDefinePtr define);
@ -10843,9 +10843,9 @@ xmlRelaxNGCleanPSVI(xmlNodePtr node) {
return;
}
/************************************************************************
* *
* Validation interfaces *
* *
* *
* Validation interfaces *
* *
************************************************************************/
/**

View File

@ -18,7 +18,7 @@
#include <libxml/relaxng.h>
#include <libxml/dict.h>
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
@ -282,7 +282,7 @@ retry:
ctxt->cur++;
if (ctxt->cur >= ctxt->end) goto eof;
cur = ctxt->cur;
if ((ctxt->end - ctxt->end > 2) &&
if ((ctxt->end - ctxt->end > 2) &&
(*cur == '"') && (cur[1] == '"')) {
TODO
} else {
@ -395,7 +395,7 @@ xmlParseCRNGGetToken(xmlCRelaxNGParserCtxtPtr ctxt, int no) {
* xmlParseCRNGDropTokens:
* @ctxt: a compact RNG parser context
* @nr: the number of token marked as read
*
*
* mark a number of token as read and consumed.
*
* Returns -1 in case of error and 0 otherwise
@ -408,7 +408,7 @@ xmlParseCRNGDropTokens(xmlCRelaxNGParserCtxtPtr ctxt, int nr) {
nr--;
ctxt->nbTokens--;
ctxt->totalToken++;
if (ctxt->totalToken == 384)
if (ctxt->totalToken == 384)
fprintf(stderr, "found\n");
}
ctxt->firstToken = ctxt->firstToken % MAX_TOKEN;
@ -418,7 +418,7 @@ xmlParseCRNGDropTokens(xmlCRelaxNGParserCtxtPtr ctxt, int nr) {
static void
xmlParseCRNGTokenize(xmlCRelaxNGParserCtxtPtr ctxt) {
tokenPtr token;
token = xmlParseCRNGGetToken(ctxt, 1);
while (token != NULL) {
switch (token->toktype) {
@ -450,7 +450,7 @@ xmlParseCRNGTokenize(xmlCRelaxNGParserCtxtPtr ctxt) {
* Returns 0 in case of success and -1 in case of error
*/
static int
xmlParseCRNG_attribute(xmlCRelaxNGParserCtxtPtr ctxt,
xmlParseCRNG_attribute(xmlCRelaxNGParserCtxtPtr ctxt,
const xmlChar *name,
xmlNsPtr ns,
const xmlChar *value)
@ -477,7 +477,7 @@ xmlParseCRNG_attribute(xmlCRelaxNGParserCtxtPtr ctxt,
* Returns 0 in case of success and -1 in case of error
*/
static int
xmlParseCRNG_bindPrefix(xmlCRelaxNGParserCtxtPtr ctxt,
xmlParseCRNG_bindPrefix(xmlCRelaxNGParserCtxtPtr ctxt,
const xmlChar *prefix,
const xmlChar *namespace)
{
@ -502,7 +502,7 @@ xmlParseCRNG_bindPrefix(xmlCRelaxNGParserCtxtPtr ctxt,
ret = xmlHashAddEntry(ctxt->namespaces, xmlCRelaxNGDefault,
(void *) namespace);
else
ret = xmlHashAddEntry(ctxt->namespaces, prefix,
ret = xmlHashAddEntry(ctxt->namespaces, prefix,
(void *) namespace);
if (ret < 0) {
if (prefix == NULL) {
@ -527,14 +527,14 @@ xmlParseCRNG_bindPrefix(xmlCRelaxNGParserCtxtPtr ctxt,
* Returns 0 in case of success and -1 in case of error
*/
static int
xmlParseCRNG_bindDatatypePrefix(xmlCRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
xmlParseCRNG_bindDatatypePrefix(xmlCRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
const xmlChar *prefix,
const xmlChar *namespace)
{
int ret;
if ((prefix != NULL) && (xmlStrEqual(prefix, BAD_CAST "xsd")) &&
(!xmlStrEqual(namespace,
(!xmlStrEqual(namespace,
BAD_CAST "http://www.w3.org/2001/XMLSchema-datatypes"))) {
ERROR("The \"xsd\" prefix must be bound to \"http://www.w3.org/2001/XMLSchema-datatypes\"");
return(-1);
@ -545,7 +545,7 @@ xmlParseCRNG_bindDatatypePrefix(xmlCRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
ERROR("Failed to create namespace hash table");
return(-1);
}
ret = xmlHashAddEntry(ctxt->datatypes, prefix,
ret = xmlHashAddEntry(ctxt->datatypes, prefix,
(void *) namespace);
if (ret < 0) {
ERROR("Redefinition of datatype");
@ -564,7 +564,7 @@ xmlParseCRNG_bindDatatypePrefix(xmlCRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
* Returns the prefix in case of success or NULL in case of error
*/
static const xmlChar *
xmlParseCRNG_lookupPrefix(xmlCRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
xmlParseCRNG_lookupPrefix(xmlCRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
const xmlChar *prefix)
{
const xmlChar *ret;
@ -586,7 +586,7 @@ xmlParseCRNG_lookupPrefix(xmlCRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
* Returns the prefix in case of success or NULL in case of error
*/
static const xmlChar *
xmlParseCRNG_lookupDatatypePrefix(xmlCRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
xmlParseCRNG_lookupDatatypePrefix(xmlCRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
const xmlChar *prefix)
{
const xmlChar *ret;
@ -604,7 +604,7 @@ xmlParseCRNG_lookupDatatypePrefix(xmlCRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED
* Returns the prefix in case of success or NULL in case of error
*/
static xmlAttrPtr
xmlParseCRNG_datatypeAttributes(xmlCRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
xmlParseCRNG_datatypeAttributes(xmlCRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
const xmlChar *library, const xmlChar *type)
{
xmlAttrPtr lib, typ;
@ -727,9 +727,9 @@ xmlParseCRNG_innerNameClass(xmlCRelaxNGParserCtxtPtr ctxt)
if (cur == NULL) CRNG_MEM_ERROR0();
if (ctxt->isElem) {
xmlSetProp(cur, BAD_CAST "ns",
xmlParseCRNG_lookupPrefix(ctxt, NULL));
xmlParseCRNG_lookupPrefix(ctxt, NULL));
} else {
xmlSetProp(cur, BAD_CAST "ns", BAD_CAST "");
xmlSetProp(cur, BAD_CAST "ns", BAD_CAST "");
}
xmlNodeAddContent(cur, token->token);
if (ctxt->insert != NULL)
@ -742,7 +742,7 @@ xmlParseCRNG_innerNameClass(xmlCRelaxNGParserCtxtPtr ctxt)
cur = xmlNewNode(NULL, BAD_CAST "nsName");
if (cur == NULL) CRNG_MEM_ERROR0();
xmlSetProp(cur, BAD_CAST "ns",
xmlParseCRNG_lookupPrefix(ctxt, token->token));
xmlParseCRNG_lookupPrefix(ctxt, token->token));
if (ctxt->insert != NULL)
xmlAddChild(ctxt->insert, cur);
ctxt->insert = cur;
@ -837,11 +837,11 @@ xmlParseCRNG_datatype(xmlCRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
token = xmlParseCRNGGetToken(ctxt, 1);
if (token->toktype == CRNG_KEYWORD) {
if (token->token == ctxt->key_string) {
attrs = xmlParseCRNG_datatypeAttributes(ctxt, BAD_CAST "",
attrs = xmlParseCRNG_datatypeAttributes(ctxt, BAD_CAST "",
token->token);
xmlParseCRNGDropTokens(ctxt, 1);
} else if (token->token == ctxt->key_token) {
attrs = xmlParseCRNG_datatypeAttributes(ctxt, BAD_CAST "",
attrs = xmlParseCRNG_datatypeAttributes(ctxt, BAD_CAST "",
token->token);
xmlParseCRNGDropTokens(ctxt, 1);
} else {
@ -853,7 +853,7 @@ xmlParseCRNG_datatype(xmlCRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
if (ctxt->insert == NULL) CRNG_MEM_ERROR0();
xmlNodeAddContent(ctxt->insert, token->token);
} else if (token->toktype == CRNG_QNAME) {
attrs = xmlParseCRNG_datatypeAttributes(ctxt,
attrs = xmlParseCRNG_datatypeAttributes(ctxt,
xmlParseCRNG_lookupDatatypePrefix(ctxt, token->prefix),
token->token);
} else {
@ -1075,7 +1075,7 @@ xmlParseCRNG_pattern(xmlCRelaxNGParserCtxtPtr ctxt)
} else {
ctxt->insert = prev;
}
return(0);
}
@ -1092,7 +1092,7 @@ xmlParseCRNG_component(xmlCRelaxNGParserCtxtPtr ctxt)
{
tokenPtr token, tok2;
xmlNodePtr insert = ctxt->insert;
token = xmlParseCRNGGetToken(ctxt, 1);
if (token == NULL)
return(0);
@ -1185,7 +1185,7 @@ xmlParseCRNG_grammar(xmlCRelaxNGParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
{
tokenPtr token;
int ret;
token = xmlParseCRNGGetToken(ctxt, 1);
while (token != NULL) {
ret = xmlParseCRNG_component(ctxt);
@ -1208,7 +1208,7 @@ static int
xmlParseCRNG_topLevelBody(xmlCRelaxNGParserCtxtPtr ctxt)
{
tokenPtr token, tok2;
token = xmlParseCRNGGetToken(ctxt, 1);
if (token->toktype == CRNG_KEYWORD) {
if ((token->token == ctxt->key_start) ||
@ -1220,14 +1220,14 @@ xmlParseCRNG_topLevelBody(xmlCRelaxNGParserCtxtPtr ctxt)
if (grammar == NULL) CRNG_MEM_ERROR0();
xmlDocSetRootElement(ctxt->doc, grammar);
ctxt->insert = grammar;
xmlParseCRNG_grammar(ctxt);
} else {
xmlParseCRNG_pattern(ctxt);
}
} else {
tok2 = xmlParseCRNGGetToken(ctxt, 2);
if ((tok2->toktype == CRNG_OP) &&
if ((tok2->toktype == CRNG_OP) &&
((tok2->token == ctxt->key_equal) ||
(tok2->token == ctxt->key_orequal) ||
(tok2->token == ctxt->key_andequal))) {
@ -1237,7 +1237,7 @@ xmlParseCRNG_topLevelBody(xmlCRelaxNGParserCtxtPtr ctxt)
if (grammar == NULL) CRNG_MEM_ERROR0();
xmlDocSetRootElement(ctxt->doc, grammar);
ctxt->insert = grammar;
xmlParseCRNG_grammar(ctxt);
} else {
xmlParseCRNG_pattern(ctxt);
@ -1293,7 +1293,7 @@ xmlParseCRNG_decl(xmlCRelaxNGParserCtxtPtr ctxt)
const xmlChar *prefix = NULL;
const xmlChar *namespace = NULL;
tokenPtr token;
token = xmlParseCRNGGetToken(ctxt, 1);
if (token->toktype != CRNG_KEYWORD) return(-1);
if (token->token == ctxt->key_default) {
@ -1349,12 +1349,12 @@ xmlParseCRNG_decl(xmlCRelaxNGParserCtxtPtr ctxt)
xmlParseCRNG_bindPrefix(ctxt, prefix, namespace);
} else if (token->token == ctxt->key_datatypes) {
xmlParseCRNGDropTokens(ctxt, 1);
token = xmlParseCRNGGetToken(ctxt, 1);
if ((token->toktype != CRNG_KEYWORD) &&
(token->toktype != CRNG_IDENTIFIER)) {
ERROR("Expecting a datatype prefix identifier here");
} else
} else
prefix = token->token;
xmlParseCRNGDropTokens(ctxt, 1);
token = xmlParseCRNGGetToken(ctxt, 1);
@ -1389,7 +1389,7 @@ static int
xmlParseCRNG_preamble(xmlCRelaxNGParserCtxtPtr ctxt)
{
tokenPtr token;
token = xmlParseCRNGGetToken(ctxt, 1);
while (token != NULL) {
if (token == NULL) return(-1);
@ -1514,7 +1514,7 @@ xmlConvertCRNGFile(const char *URL, const char *encoding) {
}
#ifdef STANDALONE
const xmlChar *schemas =
const xmlChar *schemas =
"# RELAX NG XML syntax specified in compact syntax.\n\
\n\
default namespace rng = \"http://relaxng.org/ns/structure/1.0\"\n\

View File

@ -1,5 +1,5 @@
/*
* runsuite.c: C program to run libxml2 againts published testsuites
* runsuite.c: C program to run libxml2 againts published testsuites
*
* See Copyright for the status of this software.
*
@ -123,7 +123,7 @@ static int addEntity(char *name, char *content) {
* which is shared to the current running test. We also don't want to have
* network downloads modifying tests.
*/
static xmlParserInputPtr
static xmlParserInputPtr
testExternalEntityLoader(const char *URL, const char *ID,
xmlParserCtxtPtr ctxt) {
xmlParserInputPtr ret;
@ -152,7 +152,7 @@ testExternalEntityLoader(const char *URL, const char *ID,
fprintf(stderr, "Failed to find resource %s\n", URL);
}
#endif
return(ret);
}
@ -415,7 +415,7 @@ installDirs(xmlNodePtr tst, const xmlChar *base) {
xmlFree(res);
}
static int
static int
xsdTestCase(xmlNodePtr tst) {
xmlNodePtr test, tmp, cur;
xmlBufferPtr buf;
@ -442,7 +442,7 @@ xsdTestCase(xmlNodePtr tst) {
if (cur == NULL) {
return(xsdIncorectTestCase(tst));
}
test = getNext(cur, "./*");
if (test == NULL) {
fprintf(stderr, "Failed to find test in correct line %ld\n",
@ -488,7 +488,7 @@ xsdTestCase(xmlNodePtr tst) {
if (test == NULL) {
fprintf(stderr, "Failed to find test in <valid> line %ld\n",
xmlGetLineNo(tmp));
} else {
xmlBufferEmpty(buf);
if (dtd != NULL)
@ -547,7 +547,7 @@ xsdTestCase(xmlNodePtr tst) {
if (test == NULL) {
fprintf(stderr, "Failed to find test in <invalid> line %ld\n",
xmlGetLineNo(tmp));
} else {
xmlBufferEmpty(buf);
xmlNodeDump(buf, test->doc, test, 0, 0);
@ -608,7 +608,7 @@ done:
return(ret);
}
static int
static int
xsdTestSuite(xmlNodePtr cur) {
if (verbose) {
xmlChar *doc = getString(cur, "string(documentation)");
@ -623,11 +623,11 @@ xsdTestSuite(xmlNodePtr cur) {
xsdTestCase(cur);
cur = getNext(cur, "following-sibling::testCase[1]");
}
return(0);
}
static int
static int
xsdTest(void) {
xmlDocPtr doc;
xmlNodePtr cur;
@ -665,7 +665,7 @@ done:
return(ret);
}
static int
static int
rngTestSuite(xmlNodePtr cur) {
if (verbose) {
xmlChar *doc = getString(cur, "string(documentation)");
@ -686,11 +686,11 @@ rngTestSuite(xmlNodePtr cur) {
xsdTestSuite(cur);
cur = getNext(cur, "following-sibling::testSuite[1]");
}
return(0);
}
static int
static int
rngTest1(void) {
xmlDocPtr doc;
xmlNodePtr cur;
@ -728,7 +728,7 @@ done:
return(ret);
}
static int
static int
rngTest2(void) {
xmlDocPtr doc;
xmlNodePtr cur;
@ -938,7 +938,7 @@ xstcTestGroup(xmlNodePtr cur, const char *base) {
instance = getNext(cur, "./ts:instanceTest[1]");
while (instance != NULL) {
if (schemas != NULL) {
xstcTestInstance(instance, schemas, path, base);
xstcTestInstance(instance, schemas, path, base);
} else {
/*
* We'll automatically mark the instances as failed

View File

@ -383,7 +383,7 @@ xmlconfTestItem(xmlDocPtr doc, xmlNodePtr cur) {
if (xmlStrEqual(type, BAD_CAST "not-wf")) {
if (nstest == 0)
xmlconfTestNotWF((char *) id, (char *) filename, options);
else
else
xmlconfTestNotNSWF((char *) id, (char *) filename, options);
} else if (xmlStrEqual(type, BAD_CAST "valid")) {
options |= XML_PARSE_DTDVALID;

View File

@ -53,7 +53,7 @@ static const xmlChar *xmlOldSchematronNs = SCT_OLD_NS;
#define NEXT_SCHEMATRON(node) \
while (node != NULL) { \
if ((node->type == XML_ELEMENT_NODE ) && (node->ns != NULL) && \
if ((node->type == XML_ELEMENT_NODE ) && (node->ns != NULL) && \
((xmlStrEqual(node->ns->href, xmlSchematronNs)) || \
(xmlStrEqual(node->ns->href, xmlOldSchematronNs)))) \
break; \
@ -65,7 +65,7 @@ static const xmlChar *xmlOldSchematronNs = SCT_OLD_NS;
*
* macro to flag unimplemented blocks
*/
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
@ -240,7 +240,7 @@ xmlSchematronPErrMemory(xmlSchematronParserCtxtPtr ctxt,
* @msg: the error message
* @str1: extra data
* @str2: extra data
*
*
* Handle a parser error
*/
static void
@ -568,7 +568,7 @@ xmlSchematronFree(xmlSchematronPtr schema)
if (schema->namespaces != NULL)
xmlFree((char **) schema->namespaces);
xmlSchematronFreeRules(schema->rules);
xmlSchematronFreePatterns(schema->patterns);
xmlDictFree(schema->dict);
@ -826,9 +826,9 @@ xmlSchematronAddNamespace(xmlSchematronParserCtxtPtr ctxt,
ctxt->namespaces = tmp;
ctxt->maxNamespaces *= 2;
}
ctxt->namespaces[2 * ctxt->nbNamespaces] =
ctxt->namespaces[2 * ctxt->nbNamespaces] =
xmlDictLookup(ctxt->dict, ns, -1);
ctxt->namespaces[2 * ctxt->nbNamespaces + 1] =
ctxt->namespaces[2 * ctxt->nbNamespaces + 1] =
xmlDictLookup(ctxt->dict, prefix, -1);
ctxt->nbNamespaces++;
ctxt->namespaces[2 * ctxt->nbNamespaces] = NULL;
@ -1288,7 +1288,7 @@ xmlSchematronReportOutput(xmlSchematronValidCtxtPtr ctxt ATTRIBUTE_UNUSED,
* to be deallocated by teh caller
*/
static xmlChar *
xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt,
xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt,
xmlNodePtr test, xmlNodePtr cur) {
xmlChar *ret = NULL;
xmlNodePtr child, node;
@ -1314,7 +1314,7 @@ xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt,
xmlFree(path);
}
if ((node->ns == NULL) || (node->ns->prefix == NULL))
if ((node->ns == NULL) || (node->ns->prefix == NULL))
ret = xmlStrcat(ret, node->name);
else {
ret = xmlStrcat(ret, node->ns->prefix);
@ -1365,7 +1365,7 @@ xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt,
* been done.
*/
static void
xmlSchematronReportSuccess(xmlSchematronValidCtxtPtr ctxt,
xmlSchematronReportSuccess(xmlSchematronValidCtxtPtr ctxt,
xmlSchematronTestPtr test, xmlNodePtr cur, xmlSchematronPatternPtr pattern, int success) {
if ((ctxt == NULL) || (cur == NULL) || (test == NULL))
return;
@ -1445,7 +1445,7 @@ xmlSchematronReportSuccess(xmlSchematronValidCtxtPtr ctxt,
* called from the validation engine when starting to check a pattern
*/
static void
xmlSchematronReportPattern(xmlSchematronValidCtxtPtr ctxt,
xmlSchematronReportPattern(xmlSchematronValidCtxtPtr ctxt,
xmlSchematronPatternPtr pattern) {
if ((ctxt == NULL) || (pattern == NULL))
return;
@ -1572,7 +1572,7 @@ xmlSchematronNextNode(xmlNodePtr cur) {
(cur->type != XML_DTD_NODE))
return(cur);
}
do {
cur = cur->parent;
if (cur == NULL) break;
@ -1589,7 +1589,7 @@ xmlSchematronNextNode(xmlNodePtr cur) {
* xmlSchematronRunTest:
* @ctxt: the schema validation context
* @test: the current test
* @instance: the document instace tree
* @instance: the document instace tree
* @cur: the current node in the instance
*
* Validate a rule against a tree instance at a given position
@ -1653,7 +1653,7 @@ xmlSchematronRunTest(xmlSchematronValidCtxtPtr ctxt,
/**
* xmlSchematronValidateDoc:
* @ctxt: the schema validation context
* @instance: the document instace tree
* @instance: the document instace tree
*
* Validate a tree instance against the schematron
*
@ -1697,7 +1697,7 @@ xmlSchematronValidateDoc(xmlSchematronValidCtxtPtr ctxt, xmlDocPtr instance)
}
rule = rule->next;
}
cur = xmlSchematronNextNode(cur);
}
} else {
@ -1705,14 +1705,14 @@ xmlSchematronValidateDoc(xmlSchematronValidCtxtPtr ctxt, xmlDocPtr instance)
* Process all contexts one at a time
*/
pattern = ctxt->schema->patterns;
while (pattern != NULL) {
xmlSchematronReportPattern(ctxt, pattern);
/*
* TODO convert the pattern rule to a direct XPath and
* compute directly instead of using the pattern matching
* over the full document...
* over the full document...
* Check the exact semantic
*/
cur = root;
@ -1728,7 +1728,7 @@ xmlSchematronValidateDoc(xmlSchematronValidCtxtPtr ctxt, xmlDocPtr instance)
}
rule = rule->patnext;
}
cur = xmlSchematronNextNode(cur);
}
pattern = pattern->next;

View File

@ -70,10 +70,10 @@ testRegexpFile(const char *filename) {
continue;
len = strlen(expr);
len--;
while ((len >= 0) &&
while ((len >= 0) &&
((expr[len] == '\n') || (expr[len] == '\t') ||
(expr[len] == '\r') || (expr[len] == ' '))) len--;
expr[len + 1] = 0;
expr[len + 1] = 0;
if (len >= 0) {
if ((am != NULL) && (expr[0] == 't') && (expr[1] == ' ')) {
char *ptr = &expr[2];

View File

@ -3,7 +3,7 @@
* (http://www.w3.org/TR/2001/REC-xml-c14n-20010315)
*
* See Copyright for the status of this software.
*
*
* Author: Aleksey Sanin <aleksey@aleksey.com>
*/
#include "libxml.h"
@ -56,11 +56,11 @@ static xmlChar **parse_list(xmlChar *str);
/* static void print_xpath_nodes(xmlNodeSetPtr nodes); */
static int
static int
test_c14n(const char* xml_filename, int with_comments, int mode,
const char* xpath_filename, xmlChar **inclusive_namespaces) {
xmlDocPtr doc;
xmlXPathObjectPtr xpath = NULL;
xmlXPathObjectPtr xpath = NULL;
xmlChar *result = NULL;
int ret;
@ -76,34 +76,34 @@ test_c14n(const char* xml_filename, int with_comments, int mode,
fprintf(stderr, "Error: unable to parse file \"%s\"\n", xml_filename);
return(-1);
}
/*
* Check the document is of the right kind
*/
*/
if(xmlDocGetRootElement(doc) == NULL) {
fprintf(stderr,"Error: empty document for file \"%s\"\n", xml_filename);
xmlFreeDoc(doc);
return(-1);
}
/*
* load xpath file if specified
/*
* load xpath file if specified
*/
if(xpath_filename) {
xpath = load_xpath_expr(doc, xpath_filename);
if(xpath == NULL) {
fprintf(stderr,"Error: unable to evaluate xpath expression\n");
xmlFreeDoc(doc);
xmlFreeDoc(doc);
return(-1);
}
}
/*
* Canonical form
*/
*/
/* fprintf(stderr,"File \"%s\" loaded: start canonization\n", xml_filename); */
ret = xmlC14NDocDumpMemory(doc,
(xpath) ? xpath->nodesetval : NULL,
ret = xmlC14NDocDumpMemory(doc,
(xpath) ? xpath->nodesetval : NULL,
mode, inclusive_namespaces,
with_comments, &result);
if(ret >= 0) {
@ -116,25 +116,25 @@ test_c14n(const char* xml_filename, int with_comments, int mode,
} else {
fprintf(stderr,"Error: failed to canonicalize XML file \"%s\" (ret=%d)\n", xml_filename, ret);
if(result != NULL) xmlFree(result);
xmlFreeDoc(doc);
xmlFreeDoc(doc);
return(-1);
}
/*
* Cleanup
*/
*/
if(xpath != NULL) xmlXPathFreeObject(xpath);
xmlFreeDoc(doc);
xmlFreeDoc(doc);
return(ret);
}
int main(int argc, char **argv) {
int ret = -1;
/*
* Init libxml
*/
*/
xmlInitParser();
LIBXML_TEST_VERSION
@ -154,14 +154,14 @@ int main(int argc, char **argv) {
ret = test_c14n(argv[2], 0, XML_C14N_1_1, (argc > 3) ? argv[3] : NULL, NULL);
} else if(strcmp(argv[1], "--exc-with-comments") == 0) {
xmlChar **list;
/* load exclusive namespace from command line */
list = (argc > 4) ? parse_list((xmlChar *)argv[4]) : NULL;
ret = test_c14n(argv[2], 1, XML_C14N_EXCLUSIVE_1_0, (argc > 3) ? argv[3] : NULL, list);
if(list != NULL) xmlFree(list);
} else if(strcmp(argv[1], "--exc-without-comments") == 0) {
xmlChar **list;
/* load exclusive namespace from command line */
list = (argc > 4) ? parse_list((xmlChar *)argv[4]) : NULL;
ret = test_c14n(argv[2], 0, XML_C14N_EXCLUSIVE_1_0, (argc > 3) ? argv[3] : NULL, list);
@ -171,7 +171,7 @@ int main(int argc, char **argv) {
usage(argv[0]);
}
/*
/*
* Shutdown libxml
*/
xmlCleanupParser();
@ -237,13 +237,13 @@ parse_list(xmlChar *str) {
static xmlXPathObjectPtr
load_xpath_expr (xmlDocPtr parent_doc, const char* filename) {
xmlXPathObjectPtr xpath;
xmlXPathObjectPtr xpath;
xmlDocPtr doc;
xmlChar *expr;
xmlXPathContextPtr ctx;
xmlXPathContextPtr ctx;
xmlNodePtr node;
xmlNsPtr ns;
/*
* load XPath expr as a file
*/
@ -255,10 +255,10 @@ load_xpath_expr (xmlDocPtr parent_doc, const char* filename) {
fprintf(stderr, "Error: unable to parse file \"%s\"\n", filename);
return(NULL);
}
/*
* Check the document is of the right kind
*/
*/
if(xmlDocGetRootElement(doc) == NULL) {
fprintf(stderr,"Error: empty document for file \"%s\"\n", filename);
xmlFreeDoc(doc);
@ -269,8 +269,8 @@ load_xpath_expr (xmlDocPtr parent_doc, const char* filename) {
while(node != NULL && !xmlStrEqual(node->name, (const xmlChar *)"XPath")) {
node = node->next;
}
if(node == NULL) {
if(node == NULL) {
fprintf(stderr,"Error: XPath element expected in the file \"%s\"\n", filename);
xmlFreeDoc(doc);
return(NULL);
@ -286,8 +286,8 @@ load_xpath_expr (xmlDocPtr parent_doc, const char* filename) {
ctx = xmlXPathNewContext(parent_doc);
if(ctx == NULL) {
fprintf(stderr,"Error: unable to create new context\n");
xmlFree(expr);
xmlFreeDoc(doc);
xmlFree(expr);
xmlFreeDoc(doc);
return(NULL);
}
@ -298,31 +298,31 @@ load_xpath_expr (xmlDocPtr parent_doc, const char* filename) {
while(ns != NULL) {
if(xmlXPathRegisterNs(ctx, ns->prefix, ns->href) != 0) {
fprintf(stderr,"Error: unable to register NS with prefix=\"%s\" and href=\"%s\"\n", ns->prefix, ns->href);
xmlFree(expr);
xmlXPathFreeContext(ctx);
xmlFreeDoc(doc);
xmlFree(expr);
xmlXPathFreeContext(ctx);
xmlFreeDoc(doc);
return(NULL);
}
ns = ns->next;
}
/*
/*
* Evaluate xpath
*/
xpath = xmlXPathEvalExpression(expr, ctx);
if(xpath == NULL) {
fprintf(stderr,"Error: unable to evaluate xpath expression\n");
xmlFree(expr);
xmlXPathFreeContext(ctx);
xmlFreeDoc(doc);
xmlFree(expr);
xmlXPathFreeContext(ctx);
xmlFreeDoc(doc);
return(NULL);
}
/* print_xpath_nodes(xpath->nodesetval); */
xmlFree(expr);
xmlXPathFreeContext(ctx);
xmlFreeDoc(doc);
xmlFree(expr);
xmlXPathFreeContext(ctx);
xmlFreeDoc(doc);
return(xpath);
}
@ -331,28 +331,28 @@ static void
print_xpath_nodes(xmlNodeSetPtr nodes) {
xmlNodePtr cur;
int i;
if(nodes == NULL ){
if(nodes == NULL ){
fprintf(stderr, "Error: no nodes set defined\n");
return;
}
fprintf(stderr, "Nodes Set:\n-----\n");
for(i = 0; i < nodes->nodeNr; ++i) {
if(nodes->nodeTab[i]->type == XML_NAMESPACE_DECL) {
xmlNsPtr ns;
ns = (xmlNsPtr)nodes->nodeTab[i];
cur = (xmlNodePtr)ns->next;
fprintf(stderr, "namespace \"%s\"=\"%s\" for node %s:%s\n",
fprintf(stderr, "namespace \"%s\"=\"%s\" for node %s:%s\n",
ns->prefix, ns->href,
(cur->ns) ? cur->ns->prefix : BAD_CAST "", cur->name);
} else if(nodes->nodeTab[i]->type == XML_ELEMENT_NODE) {
cur = nodes->nodeTab[i];
fprintf(stderr, "element node \"%s:%s\"\n",
cur = nodes->nodeTab[i];
fprintf(stderr, "element node \"%s:%s\"\n",
(cur->ns) ? cur->ns->prefix : BAD_CAST "", cur->name);
} else {
cur = nodes->nodeTab[i];
cur = nodes->nodeTab[i];
fprintf(stderr, "node \"%s\": type %d\n", cur->name, cur->type);
}
}

View File

@ -179,7 +179,7 @@ resolveEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *publicId, const xm
{
/* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
fprintf(stdout, "SAX.resolveEntity(");
if (publicId != NULL)
fprintf(stdout, "%s", (char *)publicId);
@ -233,8 +233,8 @@ getParameterEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
/**
* entityDeclDebug:
* @ctxt: An XML parser context
* @name: the entity name
* @type: the entity type
* @name: the entity name
* @type: the entity type
* @publicId: The public ID of the entity
* @systemId: The system ID of the entity
* @content: the entity value (without processing).
@ -252,8 +252,8 @@ entityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type,
/**
* attributeDeclDebug:
* @ctxt: An XML parser context
* @name: the attribute name
* @type: the attribute type
* @name: the attribute name
* @type: the attribute type
*
* An attribute definition has been parsed
*/
@ -269,8 +269,8 @@ attributeDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *elem, const xmlCha
/**
* elementDeclDebug:
* @ctxt: An XML parser context
* @name: the element name
* @type: the element type
* @name: the element name
* @type: the element type
* @content: the element value (without processing).
*
* An element definition has been parsed
@ -453,7 +453,7 @@ cdataDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
* @ctxt: An XML parser context
* @name: The entity name
*
* called when an entity reference is detected.
* called when an entity reference is detected.
*/
static void
referenceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
@ -687,7 +687,7 @@ parseSAXFile(char *filename) {
fclose(f);
}
}
} else {
} else {
#endif /* LIBXML_PUSH_ENABLED */
doc = htmlSAXParseFile(filename, NULL, emptySAXHandler, NULL);
if (doc != NULL) {
@ -746,7 +746,7 @@ parseAndPrintFile(char *filename) {
}
fclose(f);
}
} else {
} else {
doc = htmlReadFile(filename, NULL, options);
}
#else
@ -774,7 +774,7 @@ parseAndPrintFile(char *filename) {
/*
* print it.
*/
if (!noout) {
if (!noout) {
#ifdef LIBXML_DEBUG_ENABLED
if (!debug) {
if (encoding)
@ -789,7 +789,7 @@ parseAndPrintFile(char *filename) {
else
htmlDocDump(stdout, doc);
#endif
}
}
#endif /* LIBXML_OUTPUT_ENABLED */
/*
@ -838,13 +838,13 @@ int main(int argc, char **argv) {
for (count = 0;count < 100 * repeat;count++) {
if (sax)
parseSAXFile(argv[i]);
else
else
parseAndPrintFile(argv[i]);
}
}
} else {
if (sax)
parseSAXFile(argv[i]);
else
else
parseAndPrintFile(argv[i]);
}
files ++;

View File

@ -39,7 +39,7 @@
#endif
typedef int (*hello_world_t)(void);
int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
xmlChar filename[PATH_MAX];
xmlModulePtr module = NULL;
@ -62,7 +62,7 @@ int main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
fprintf(stderr, "Lookup returned NULL\n");
return(1);
}
(*hello_world)();
xmlModuleClose(module);

View File

@ -69,7 +69,7 @@ const char *elementNames[] = {
"XML_READER_TYPE_END_ENTITY",
"XML_READER_TYPE_XML_DECLARATION"};
/* not using xmlBuff here because I don't want those
/* not using xmlBuff here because I don't want those
* mallocs to interfere */
struct buffer {
char *str;
@ -205,7 +205,7 @@ static int processNode (xmlTextReaderPtr reader, void *data)
buffer_add_char (buff, '=');
s = (const char *)xmlTextReaderConstValue (reader);
if (s == NULL) return FALSE;
buffer_add_string (buff, s);
buffer_add_string (buff, s);
}
if (ret == -1) return FALSE;
}
@ -271,7 +271,7 @@ check_load_file_memory_func (void *data)
if (xmlTextReaderSetParserProp(reader, XML_PARSER_VALIDATE, 1) == -1)
goto out;
}
/*
* Process all nodes in sequence
*/
@ -297,7 +297,7 @@ check_load_file_memory_func (void *data)
buffer_dump (b, ".OOM.buff");
}
}
if (count)
{
fprintf (stdout, "# %s: %u elems, %u attrs, %u chars %s\n",
@ -323,7 +323,7 @@ int main(int argc, char **argv) {
usage(argv[0]);
return(1);
}
LIBXML_TEST_VERSION;
LIBXML_TEST_VERSION;
xmlMemSetup (test_free,
test_malloc,
@ -367,7 +367,7 @@ int main(int argc, char **argv) {
xmlMemoryDump();
return 1;
}
files ++;
}
}

View File

@ -40,7 +40,7 @@ static int n_blocks_outstanding = 0;
* Sets the number of allocations until we simulate a failed
* allocation. If set to 0, the next allocation to run
* fails; if set to 1, one succeeds then the next fails; etc.
* Set to _TEST_INT_MAX to not fail anything.
* Set to _TEST_INT_MAX to not fail anything.
*/
static void
set_fail_alloc_counter (int until_next_fail)
@ -96,7 +96,7 @@ decrement_fail_alloc_counter (void)
n_failures_this_failure = 0;
}
return TRUE;
}
else
@ -121,13 +121,13 @@ test_get_malloc_blocks_outstanding (void)
void*
test_malloc (size_t bytes)
{
{
if (decrement_fail_alloc_counter ())
{
/* FAIL the malloc */
return NULL;
}
if (bytes == 0) /* some system mallocs handle this, some don't */
return NULL;
else
@ -151,7 +151,7 @@ test_realloc (void *memory,
/* FAIL */
return NULL;
}
if (bytes == 0) /* guarantee this is safe */
{
test_free (memory);
@ -185,10 +185,10 @@ test_strdup (const char *str)
{
int len;
char *copy;
if (str == NULL)
return NULL;
len = strlen (str);
copy = test_malloc (len + 1);
@ -196,7 +196,7 @@ test_strdup (const char *str)
return NULL;
memcpy (copy, str, len + 1);
return copy;
}
@ -206,14 +206,14 @@ run_failing_each_malloc (int n_mallocs,
void *data)
{
n_mallocs += 10; /* fudge factor to ensure reallocs etc. are covered */
while (n_mallocs >= 0)
{
{
set_fail_alloc_counter (n_mallocs);
if (!(* func) (data))
return FALSE;
n_mallocs -= 1;
}
@ -243,7 +243,7 @@ test_oom_handling (TestMemoryFunction func,
int approx_mallocs;
/* Run once to see about how many mallocs are involved */
set_fail_alloc_counter (_TEST_INT_MAX);
if (!(* func) (data))
@ -254,7 +254,7 @@ test_oom_handling (TestMemoryFunction func,
set_fail_alloc_failures (1);
if (!run_failing_each_malloc (approx_mallocs, func, data))
return FALSE;
set_fail_alloc_failures (2);
if (!run_failing_each_malloc (approx_mallocs, func, data))
return FALSE;
@ -264,6 +264,6 @@ test_oom_handling (TestMemoryFunction func,
return FALSE;
set_fail_alloc_counter (_TEST_INT_MAX);
return TRUE;
}

View File

@ -49,10 +49,10 @@ testRegexpFile(const char *filename) {
while (fgets(expression, 4500, input) != NULL) {
len = strlen(expression);
len--;
while ((len >= 0) &&
while ((len >= 0) &&
((expression[len] == '\n') || (expression[len] == '\t') ||
(expression[len] == '\r') || (expression[len] == ' '))) len--;
expression[len + 1] = 0;
expression[len + 1] = 0;
if (len >= 0) {
if (expression[0] == '#')
continue;
@ -103,10 +103,10 @@ runFileTest(xmlExpCtxtPtr ctxt, const char *filename) {
while (fgets(expression, 4500, input) != NULL) {
len = strlen(expression);
len--;
while ((len >= 0) &&
while ((len >= 0) &&
((expression[len] == '\n') || (expression[len] == '\t') ||
(expression[len] == '\r') || (expression[len] == ' '))) len--;
expression[len + 1] = 0;
expression[len + 1] = 0;
if (len >= 0) {
if (expression[0] == '#')
continue;
@ -115,7 +115,7 @@ runFileTest(xmlExpCtxtPtr ctxt, const char *filename) {
if (expr != NULL) {
xmlExpFree(ctxt, expr);
if (xmlExpCtxtNbNodes(ctxt) != 0)
if (xmlExpCtxtNbNodes(ctxt) != 0)
printf(" Parse/free of Expression leaked %d\n",
xmlExpCtxtNbNodes(ctxt));
expr = NULL;
@ -142,7 +142,7 @@ runFileTest(xmlExpCtxtPtr ctxt, const char *filename) {
break;
} else {
int ret;
nodes2 = xmlExpCtxtNbNodes(ctxt);
ret = xmlExpSubsume(ctxt, expr, sub);
@ -174,14 +174,14 @@ runFileTest(xmlExpCtxtPtr ctxt, const char *filename) {
}
if (expr != NULL) {
xmlExpFree(ctxt, expr);
if (xmlExpCtxtNbNodes(ctxt) != 0)
if (xmlExpCtxtNbNodes(ctxt) != 0)
printf(" Parse/free of Expression leaked %d\n",
xmlExpCtxtNbNodes(ctxt));
}
fclose(input);
}
static void
static void
testReduce(xmlExpCtxtPtr ctxt, xmlExpNodePtr expr, const char *tst) {
xmlBufferPtr xmlExpBuf;
xmlExpNodePtr sub, deriv;
@ -213,7 +213,7 @@ testReduce(xmlExpCtxtPtr ctxt, xmlExpNodePtr expr, const char *tst) {
xmlExpFree(ctxt, sub);
}
static void
static void
exprDebug(xmlExpCtxtPtr ctxt, xmlExpNodePtr expr) {
xmlBufferPtr xmlExpBuf;
xmlExpNodePtr deriv;

View File

@ -89,7 +89,7 @@ int main(int argc, char **argv) {
int fd;
struct stat info;
const char *base;
if (stat(argv[i], &info) < 0)
if (stat(argv[i], &info) < 0)
break;
if ((fd = open(argv[i], O_RDONLY)) < 0)
break;

View File

@ -71,7 +71,7 @@ static int timing = 0;
* function calls
*/
#ifndef HAVE_GETTIMEOFDAY
#ifndef HAVE_GETTIMEOFDAY
#ifdef HAVE_SYS_TIMEB_H
#ifdef HAVE_SYS_TIME_H
#ifdef HAVE_FTIME
@ -368,7 +368,7 @@ resolveEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *publicId, const xm
return(NULL);
/* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */
fprintf(stdout, "SAX.resolveEntity(");
if (publicId != NULL)
fprintf(stdout, "%s", (char *)publicId);
@ -428,8 +428,8 @@ getParameterEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
/**
* entityDeclDebug:
* @ctxt: An XML parser context
* @name: the entity name
* @type: the entity type
* @name: the entity name
* @type: the entity type
* @publicId: The public ID of the entity
* @systemId: The system ID of the entity
* @content: the entity value (without processing).
@ -458,8 +458,8 @@ const xmlChar *nullstr = BAD_CAST "(null)";
/**
* attributeDeclDebug:
* @ctxt: An XML parser context
* @name: the attribute name
* @type: the attribute type
* @name: the attribute name
* @type: the attribute type
*
* An attribute definition has been parsed
*/
@ -483,8 +483,8 @@ attributeDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar * elem,
/**
* elementDeclDebug:
* @ctxt: An XML parser context
* @name: the element name
* @type: the element type
* @name: the element name
* @type: the element type
* @content: the element value (without processing).
*
* An element definition has been parsed
@ -670,7 +670,7 @@ charactersDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)
* @ctxt: An XML parser context
* @name: The entity name
*
* called when an entity reference is detected.
* called when an entity reference is detected.
*/
static void
referenceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)
@ -906,7 +906,7 @@ startElementNsDebug(void *ctx ATTRIBUTE_UNUSED,
else
fprintf(stdout, ", '%s'", (char *) URI);
fprintf(stdout, ", %d", nb_namespaces);
if (namespaces != NULL) {
for (i = 0;i < nb_namespaces * 2;i++) {
fprintf(stdout, ", xmlns");
@ -1131,7 +1131,7 @@ int main(int argc, char **argv) {
int files = 0;
LIBXML_TEST_VERSION /* be safe, plus calls xmlInitParser */
for (i = 1; i < argc ; i++) {
if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug")))
debug++;

View File

@ -85,7 +85,7 @@ int main(int argc, char **argv) {
int fd;
struct stat info;
const char *base;
if (stat(argv[i], &info) < 0)
if (stat(argv[i], &info) < 0)
break;
if ((fd = open(argv[i], O_RDONLY)) < 0)
break;

View File

@ -104,7 +104,7 @@ main()
for (i = 0; i < num_threads; i++)
{
DWORD useless;
tid[i] = CreateThread(NULL, 0,
tid[i] = CreateThread(NULL, 0,
thread_specific_data, testfiles[i], 0, &useless);
if (tid[i] == NULL)
{
@ -113,7 +113,7 @@ main()
}
}
if (WaitForMultipleObjects (num_threads, tid, TRUE, INFINITE) == WAIT_FAILED)
if (WaitForMultipleObjects (num_threads, tid, TRUE, INFINITE) == WAIT_FAILED)
perror ("WaitForMultipleObjects failed");
for (i = 0; i < num_threads; i++)
@ -129,7 +129,7 @@ main()
xmlCatalogCleanup();
for (i = 0; i < num_threads; i++) {
if (results[i] != (DWORD) Okay)
if (results[i] != (DWORD) Okay)
printf("Thread %d handling %s failed\n", i, testfiles[i]);
}
}

View File

@ -51,7 +51,7 @@ static xmlDocPtr document = NULL;
/*
* Default document
*/
static xmlChar buffer[] =
static xmlChar buffer[] =
"<?xml version=\"1.0\"?>\n\
<EXAMPLE prop1=\"gnome is great\" prop2=\"&amp; linux too\">\n\
<head>\n\
@ -79,7 +79,7 @@ static void
testXPath(const char *str) {
xmlXPathObjectPtr res;
xmlXPathContextPtr ctxt;
#if defined(LIBXML_XPTR_ENABLED)
if (xptr) {
ctxt = xmlXPtrNewContext(document, NULL, NULL);
@ -96,7 +96,7 @@ testXPath(const char *str) {
comp = xmlXPathCompile(BAD_CAST str);
if (comp != NULL) {
if (tree)
if (tree)
xmlXPathDebugDumpCompExpr(stdout, comp, 0);
res = xmlXPathCompiledEval(comp, ctxt);
@ -127,10 +127,10 @@ testXPathFile(const char *filename) {
while (fgets(expression, 4500, input) != NULL) {
len = strlen(expression);
len--;
while ((len >= 0) &&
while ((len >= 0) &&
((expression[len] == '\n') || (expression[len] == '\t') ||
(expression[len] == '\r') || (expression[len] == ' '))) len--;
expression[len + 1] = 0;
expression[len + 1] = 0;
if (len >= 0) {
printf("\n========================\nExpression: %s\n", expression) ;
testXPath(expression);
@ -150,7 +150,7 @@ int main(int argc, char **argv) {
#if defined(LIBXML_XPTR_ENABLED)
if ((!strcmp(argv[i], "-xptr")) || (!strcmp(argv[i], "--xptr")))
xptr++;
else
else
#endif
if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug")))
debug++;
@ -213,7 +213,7 @@ int main(int argc, char **argv) {
printf("\t--file : or\n");
printf("\t-f : read queries from files, args\n");
}
if (document != NULL)
if (document != NULL)
xmlFreeDoc(document);
xmlCleanupParser();
xmlMemoryDump();

View File

@ -101,7 +101,7 @@ get_api_attr(void) {
if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {
get_api_root();
}
if (api_root == NULL)
if (api_root == NULL)
return(NULL);
if (api_root->properties != NULL) {
api_attr = api_root->properties;
@ -197,7 +197,7 @@ int main(int argc, char **argv) {
#include <libxml/xpointer.h>
#include <libxml/debugXML.h>
/*
/*
We manually define xmlErrMemory because it's normal declaration
is "hidden" by #ifdef IN_LIBXML
*/
@ -539,7 +539,7 @@ static void des_xmlNodePtr(int no, xmlNodePtr val, int nr ATTRIBUTE_UNUSED) {
#define gen_nb_xmlDtdPtr 3
static xmlDtdPtr gen_xmlDtdPtr(int no, int nr ATTRIBUTE_UNUSED) {
if (no == 0)
if (no == 0)
return(xmlNewDtd(NULL, BAD_CAST "dtd", BAD_CAST"foo", BAD_CAST"bar"));
if (no == 1) return(get_api_dtd());
return(NULL);
@ -736,7 +736,7 @@ static void des_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchemaValidCtx
#endif /* LIBXML_SCHEMAS_ENABLED */
#define gen_nb_xmlHashDeallocator 2
static void
static void
test_xmlHashDeallocator(void *payload ATTRIBUTE_UNUSED, xmlChar *name ATTRIBUTE_UNUSED) {
}
@ -13552,7 +13552,7 @@ test_xmlParseBalancedChunkMemory(void) {
depth = gen_int(n_depth, 3);
string = gen_const_xmlChar_ptr(n_string, 4);
lst = gen_xmlNodePtr_ptr(n_lst, 5);
#ifdef LIBXML_SAX1_ENABLED
if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
#endif
@ -13632,7 +13632,7 @@ test_xmlParseBalancedChunkMemoryRecover(void) {
string = gen_const_xmlChar_ptr(n_string, 4);
lst = gen_xmlNodePtr_ptr(n_lst, 5);
recover = gen_int(n_recover, 6);
#ifdef LIBXML_SAX1_ENABLED
if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
#endif
@ -15111,7 +15111,7 @@ test_xmlSAXUserParseFile(void) {
sax = gen_xmlSAXHandlerPtr(n_sax, 0);
user_data = gen_userdata(n_user_data, 1);
filename = gen_filepath(n_filename, 2);
#ifdef LIBXML_SAX1_ENABLED
if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
#endif
@ -15170,7 +15170,7 @@ test_xmlSAXUserParseMemory(void) {
user_data = gen_userdata(n_user_data, 1);
buffer = gen_const_char_ptr(n_buffer, 2);
size = gen_int(n_size, 3);
#ifdef LIBXML_SAX1_ENABLED
if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;
#endif

View File

@ -123,7 +123,7 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
* We should see no error in remaning cases
*/
else if ((lastError != 0) || (res == NULL)) {
fprintf(stderr,
fprintf(stderr,
"Failed to parse document for Bytes 0x%02X 0x%02X\n", i, j);
}
if (res != NULL)
@ -411,7 +411,7 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
* We should see no error in remaining cases
*/
else if ((lastError != 0) || (len != 3)) {
fprintf(stderr,
fprintf(stderr,
"Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n",
i, j, K);
}
@ -420,7 +420,7 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
* Finally check the value is right
*/
else if (c != value) {
fprintf(stderr,
fprintf(stderr,
"Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X: expect %d got %d\n",
i, j, data[2], value, c);
}
@ -491,7 +491,7 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
* There are values in that range that are not allowed in XML-1.0
*/
else if (((value > 0xD7FF) && (value <0xE000)) ||
((value > 0xFFFD) && (value <0x10000)) ||
((value > 0xFFFD) && (value <0x10000)) ||
(value > 0x10FFFF)) {
if (lastError != XML_ERR_INVALID_CHAR)
fprintf(stderr,
@ -503,7 +503,7 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
* We should see no error in remaining cases
*/
else if ((lastError != 0) || (len != 4)) {
fprintf(stderr,
fprintf(stderr,
"Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n",
i, j, K);
}
@ -512,7 +512,7 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
* Finally check the value is right
*/
else if (c != value) {
fprintf(stderr,
fprintf(stderr,
"Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X: expect %d got %d\n",
i, j, data[2], value, c);
}

View File

@ -835,8 +835,8 @@ getParameterEntityCallback(void *ctx ATTRIBUTE_UNUSED,
/**
* entityDeclCallback:
* @ctxt: An XML parser context
* @name: the entity name
* @type: the entity type
* @name: the entity name
* @type: the entity type
* @publicId: The public ID of the entity
* @systemId: The system ID of the entity
* @content: the entity value (without processing).
@ -858,8 +858,8 @@ entityDeclCallback(void *ctx ATTRIBUTE_UNUSED,
/**
* attributeDeclCallback:
* @ctxt: An XML parser context
* @name: the attribute name
* @type: the attribute type
* @name: the attribute name
* @type: the attribute type
*
* An attribute definition has been parsed
*/
@ -878,8 +878,8 @@ attributeDeclCallback(void *ctx ATTRIBUTE_UNUSED,
/**
* elementDeclCallback:
* @ctxt: An XML parser context
* @name: the element name
* @type: the element type
* @name: the element name
* @type: the element type
* @content: the element value (without processing).
*
* An element definition has been parsed
@ -1032,7 +1032,7 @@ charactersCallback(void *ctx ATTRIBUTE_UNUSED,
* @ctxt: An XML parser context
* @name: The entity name
*
* called when an entity reference is detected.
* called when an entity reference is detected.
*/
static void
referenceCallback(void *ctx ATTRIBUTE_UNUSED,
@ -1337,7 +1337,7 @@ readerTest(const char *filename, size_t limit, int options, int fail) {
if (fail)
res = 0;
else {
if (strncmp(filename, "crazy:", 6) == 0)
if (strncmp(filename, "crazy:", 6) == 0)
fprintf(stderr, "Failed to parse '%s' %u\n",
filename, crazy_indx);
else
@ -1347,7 +1347,7 @@ readerTest(const char *filename, size_t limit, int options, int fail) {
}
} else {
if (fail) {
if (strncmp(filename, "crazy:", 6) == 0)
if (strncmp(filename, "crazy:", 6) == 0)
fprintf(stderr, "Failed to get failure for '%s' %u\n",
filename, crazy_indx);
else

296
trio.c

File diff suppressed because it is too large Load Diff

View File

@ -261,7 +261,7 @@ trio_pinf(TRIO_NOARGS)
static double result = 0.0;
if (result == 0.0) {
#if defined(INFINITY) && defined(__STDC_IEC_559__)
result = (double)INFINITY;
@ -283,7 +283,7 @@ trio_pinf(TRIO_NOARGS)
/* Force overflow */
result += HUGE_VAL;
}
# if defined(TRIO_PLATFORM_UNIX)
signal(SIGFPE, signal_handler);
# endif
@ -326,13 +326,13 @@ trio_nan(TRIO_NOARGS)
static double result = 0.0;
if (result == 0.0) {
#if defined(TRIO_COMPILER_SUPPORTS_C99)
result = nan("");
#elif defined(NAN) && defined(__STDC_IEC_559__)
result = (double)NAN;
#elif defined(USE_IEEE_754)
result = trio_make_double(ieee_754_qnan_array);
@ -349,13 +349,13 @@ trio_nan(TRIO_NOARGS)
# if defined(TRIO_PLATFORM_UNIX)
void (*signal_handler)(int) = signal(SIGFPE, SIG_IGN);
# endif
result = trio_pinf() / trio_pinf();
# if defined(TRIO_PLATFORM_UNIX)
signal(SIGFPE, signal_handler);
# endif
#endif
}
return result;
@ -381,7 +381,7 @@ TRIO_ARGS1((number),
* the conservative approach and only use it for UNIX95.
*/
return isnan(number);
#elif defined(TRIO_COMPILER_MSVC) || defined(TRIO_COMPILER_BCB)
/*
* Microsoft Visual C++ and Borland C++ Builder have an _isnan()
@ -398,20 +398,20 @@ TRIO_ARGS1((number),
int is_special_quantity;
is_special_quantity = trio_is_special_quantity(number, &has_mantissa);
return (is_special_quantity && has_mantissa);
#else
/*
* Fallback solution
*/
int status;
double integral, fraction;
# if defined(TRIO_PLATFORM_UNIX)
void (*signal_handler)(int) = signal(SIGFPE, SIG_IGN);
# endif
status = (/*
* NaN is the only number which does not compare to itself
*/
@ -422,13 +422,13 @@ TRIO_ARGS1((number),
((number != 0.0) &&
(fraction = modf(number, &integral),
integral == fraction)));
# if defined(TRIO_PLATFORM_UNIX)
signal(SIGFPE, signal_handler);
# endif
return status;
#endif
}
@ -459,7 +459,7 @@ TRIO_ARGS1((number),
return isinf(number)
? ((number > 0.0) ? 1 : -1)
: 0;
#elif defined(TRIO_COMPILER_MSVC) || defined(TRIO_COMPILER_BCB)
/*
* Microsoft Visual C++ and Borland C++ Builder have an _fpclass()
@ -478,7 +478,7 @@ TRIO_ARGS1((number),
int is_special_quantity;
is_special_quantity = trio_is_special_quantity(number, &has_mantissa);
return (is_special_quantity && !has_mantissa)
? ((number < 0.0) ? -1 : 1)
: 0;
@ -488,23 +488,23 @@ TRIO_ARGS1((number),
* Fallback solution.
*/
int status;
# if defined(TRIO_PLATFORM_UNIX)
void (*signal_handler)(int) = signal(SIGFPE, SIG_IGN);
# endif
double infinity = trio_pinf();
status = ((number == infinity)
? 1
: ((number == -infinity) ? -1 : 0));
# if defined(TRIO_PLATFORM_UNIX)
signal(SIGFPE, signal_handler);
# endif
return status;
#endif
}
@ -526,7 +526,7 @@ TRIO_ARGS1((number),
* C99 defines isfinite() as a macro.
*/
return isfinite(number);
#elif defined(TRIO_COMPILER_MSVC) || defined(TRIO_COMPILER_BCB)
/*
* Microsoft Visual C++ and Borland C++ Builder use _finite().
@ -547,7 +547,7 @@ TRIO_ARGS1((number),
* Fallback solution.
*/
return ((trio_isinf(number) == 0) && (trio_isnan(number) == 0));
#endif
}
@ -596,7 +596,7 @@ TRIO_ARGS2((number, is_negative),
# define TRIO_NEGATIVE_ZERO FP_NEG_ZERO
# define TRIO_POSITIVE_NORMAL FP_POS_NORM
# define TRIO_NEGATIVE_NORMAL FP_NEG_NORM
# elif defined(TRIO_COMPILER_MSVC) || defined(TRIO_COMPILER_BCB)
/*
* Microsoft Visual C++ and Borland C++ Builder have an _fpclass()
@ -613,7 +613,7 @@ TRIO_ARGS2((number, is_negative),
# define TRIO_NEGATIVE_ZERO _FPCLASS_NZ
# define TRIO_POSITIVE_NORMAL _FPCLASS_PN
# define TRIO_NEGATIVE_NORMAL _FPCLASS_NN
# elif defined(FP_PLUS_NORM)
/*
* HP-UX 9.x and 10.x have an fpclassify() function, that is different
@ -678,13 +678,13 @@ TRIO_ARGS2((number, is_negative),
*is_negative = (number < 0.0);
return TRIO_FP_NORMAL;
}
# else
/*
* Fallback solution.
*/
int rc;
if (number == 0.0) {
/*
* In IEEE 754 the sign of zero is ignored in comparisons, so we
@ -716,7 +716,7 @@ TRIO_ARGS2((number, is_negative),
}
*is_negative = (number < 0.0);
return TRIO_FP_NORMAL;
# endif
#endif
}
@ -734,7 +734,7 @@ TRIO_ARGS1((number),
double number)
{
int is_negative;
(void)trio_fpclassify_and_signbit(number, &is_negative);
return is_negative;
}
@ -753,7 +753,7 @@ TRIO_ARGS1((number),
double number)
{
int dummy;
return trio_fpclassify_and_signbit(number, &dummy);
}
@ -828,7 +828,7 @@ int main(TRIO_NOARGS)
print_class("NNorm", -1.0);
print_class("PSub", 1.01e-307 - 1.00e-307);
print_class("NSub", 1.00e-307 - 1.01e-307);
printf("NaN : %4g 0x%02x%02x%02x%02x%02x%02x%02x%02x (%2d, %2d)\n",
my_nan,
((unsigned char *)&my_nan)[0],
@ -862,11 +862,11 @@ int main(TRIO_NOARGS)
((unsigned char *)&my_ninf)[6],
((unsigned char *)&my_ninf)[7],
trio_isnan(my_ninf), trio_isinf(my_ninf));
# if defined(TRIO_PLATFORM_UNIX)
signal_handler = signal(SIGFPE, SIG_IGN);
# endif
my_pinf = DBL_MAX + DBL_MAX;
my_ninf = -my_pinf;
my_nan = my_pinf / my_pinf;
@ -874,7 +874,7 @@ int main(TRIO_NOARGS)
# if defined(TRIO_PLATFORM_UNIX)
signal(SIGFPE, signal_handler);
# endif
printf("NaN : %4g 0x%02x%02x%02x%02x%02x%02x%02x%02x (%2d, %2d)\n",
my_nan,
((unsigned char *)&my_nan)[0],
@ -908,7 +908,7 @@ int main(TRIO_NOARGS)
((unsigned char *)&my_ninf)[6],
((unsigned char *)&my_ninf)[7],
trio_isnan(my_ninf), trio_isinf(my_ninf));
return 0;
}
#endif

View File

@ -46,7 +46,7 @@ TRIO_PUBLIC double trio_pinf TRIO_PROTO((void));
* Return negative infinity.
*/
TRIO_PUBLIC double trio_ninf TRIO_PROTO((void));
/*
* Return negative zero.
*/

146
triostr.c
View File

@ -165,11 +165,11 @@ TRIO_ARGS1((string),
#if !defined(TRIO_MINIMAL)
/**
Append @p source at the end of @p target.
@param target Target string.
@param source Source string.
@return Boolean value indicating success or failure.
@pre @p target must point to a memory chunk with sufficient room to
contain the @p target string and @p source string.
@pre No boundary checking is performed, so insufficient memory will
@ -184,7 +184,7 @@ TRIO_ARGS2((target, source),
{
assert(target);
assert(source);
return (strcat(target, source) != NULL);
}
#endif /* !defined(TRIO_MINIMAL) */
@ -192,12 +192,12 @@ TRIO_ARGS2((target, source),
#if !defined(TRIO_MINIMAL)
/**
Append at most @p max characters from @p source to @p target.
@param target Target string.
@param max Maximum number of characters to append.
@param source Source string.
@return Boolean value indicating success or failure.
@pre @p target must point to a memory chuck with sufficient room to
contain the @p target string and the @p source string (at most @p max
characters).
@ -213,12 +213,12 @@ TRIO_ARGS3((target, max, source),
TRIO_CONST char *source)
{
size_t length;
assert(target);
assert(source);
length = trio_length(target);
if (max > length)
{
strncat(target, source, max - length - 1);
@ -244,7 +244,7 @@ TRIO_ARGS2((string, substring),
{
assert(string);
assert(substring);
return (0 != strstr(string, substring));
}
#endif /* !defined(TRIO_MINIMAL) */
@ -253,11 +253,11 @@ TRIO_ARGS2((string, substring),
#if !defined(TRIO_MINIMAL)
/**
Copy @p source to @p target.
@param target Target string.
@param source Source string.
@return Boolean value indicating success or failure.
@pre @p target must point to a memory chunk with sufficient room to
contain the @p source string.
@pre No boundary checking is performed, so insufficient memory will
@ -272,7 +272,7 @@ TRIO_ARGS2((target, source),
{
assert(target);
assert(source);
(void)strcpy(target, source);
return TRUE;
}
@ -281,12 +281,12 @@ TRIO_ARGS2((target, source),
/**
Copy at most @p max characters from @p source to @p target.
@param target Target string.
@param max Maximum number of characters to append.
@param source Source string.
@return Boolean value indicating success or failure.
@pre @p target must point to a memory chunk with sufficient room to
contain the @p source string (at most @p max characters).
@pre No boundary checking is performed, so insufficient memory will
@ -336,10 +336,10 @@ TRIO_ARGS2((source, size),
/**
Duplicate @p source.
@param source Source string.
@return A copy of the @p source string.
@post @p target will be zero terminated.
*/
TRIO_STRING_PUBLIC char *
@ -354,11 +354,11 @@ TRIO_ARGS1((source),
#if !defined(TRIO_MINIMAL)
/**
Duplicate at most @p max characters of @p source.
@param source Source string.
@param max Maximum number of characters to duplicate.
@return A copy of the @p source string.
@post @p target will be zero terminated.
*/
TRIO_STRING_PUBLIC char *
@ -383,11 +383,11 @@ trio_duplicate_max TRIO_ARGS2((source, max),
/**
Compare if two strings are equal.
@param first First string.
@param second Second string.
@return Boolean indicating whether the two strings are equal or not.
Case-insensitive comparison.
*/
TRIO_STRING_PUBLIC int
@ -422,11 +422,11 @@ TRIO_ARGS2((first, second),
/**
Compare if two strings are equal.
@param first First string.
@param second Second string.
@return Boolean indicating whether the two strings are equal or not.
Case-sensitive comparison.
*/
TRIO_STRING_PUBLIC int
@ -449,12 +449,12 @@ TRIO_ARGS2((first, second),
#if !defined(TRIO_MINIMAL)
/**
Compare if two strings up until the first @p max characters are equal.
@param first First string.
@param max Maximum number of characters to compare.
@param second Second string.
@return Boolean indicating whether the two strings are equal or not.
Case-sensitive comparison.
*/
TRIO_STRING_PUBLIC int
@ -478,7 +478,7 @@ TRIO_ARGS3((first, max, second),
/**
Compare if two strings are equal.
@param first First string.
@param second Second string.
@return Boolean indicating whether the two strings are equal or not.
@ -504,12 +504,12 @@ TRIO_ARGS2((first, second),
/**
Compare if two strings up until the first @p max characters are equal.
@param first First string.
@param max Maximum number of characters to compare.
@param second Second string.
@return Boolean indicating whether the two strings are equal or not.
Case-insensitive comparison.
*/
TRIO_STRING_PUBLIC int
@ -558,7 +558,7 @@ TRIO_ARGS1((error_number),
int error_number)
{
#if defined(USE_STRERROR)
return strerror(error_number);
#elif defined(USE_SYS_ERRLIST)
@ -569,11 +569,11 @@ TRIO_ARGS1((error_number),
return ((error_number < 0) || (error_number >= sys_nerr))
? "unknown"
: sys_errlist[error_number];
#else
return "unknown";
#endif
}
@ -603,7 +603,7 @@ TRIO_ARGS4((target, max, format, datetime),
assert(format);
assert(datetime);
assert(max > 0);
return strftime(target, max, format, datetime);
}
#endif /* !defined(TRIO_MINIMAL) */
@ -630,7 +630,7 @@ TRIO_ARGS2((string, type),
char ch;
assert(string);
switch (type)
{
case TRIO_HASH_PLAIN:
@ -719,7 +719,7 @@ TRIO_ARGS1((target),
@return Boolean value indicating success or failure.
Case-insensitive comparison.
The following wildcards can be used
@li @c * Match any number of characters.
@li @c ? Match a single character.
@ -732,7 +732,7 @@ TRIO_ARGS2((string, pattern),
{
assert(string);
assert(pattern);
for (; ('*' != *pattern); ++pattern, ++string)
{
if (NIL == *string)
@ -757,7 +757,7 @@ TRIO_ARGS2((string, pattern),
}
}
while (*string++);
return FALSE;
}
#endif /* !defined(TRIO_MINIMAL) */
@ -772,7 +772,7 @@ TRIO_ARGS2((string, pattern),
@return Boolean value indicating success or failure.
Case-sensitive comparison.
The following wildcards can be used
@li @c * Match any number of characters.
@li @c ? Match a single character.
@ -785,7 +785,7 @@ TRIO_ARGS2((string, pattern),
{
assert(string);
assert(pattern);
for (; ('*' != *pattern); ++pattern, ++string)
{
if (NIL == *string)
@ -810,7 +810,7 @@ TRIO_ARGS2((string, pattern),
}
}
while (*string++);
return FALSE;
}
#endif /* !defined(TRIO_MINIMAL) */
@ -837,7 +837,7 @@ TRIO_ARGS3((target, source, Function),
assert(target);
assert(source);
assert(Function);
while (*source != NIL)
{
*target++ = Function(*source++);
@ -894,7 +894,7 @@ TRIO_ARGS3((string, max, substring),
assert(string);
assert(substring);
size = trio_length(substring);
if (size <= max)
{
@ -929,7 +929,7 @@ TRIO_ARGS2((string, delimiters),
TRIO_CONST char *delimiters)
{
assert(delimiters);
return strtok(string, delimiters);
}
#endif /* !defined(TRIO_MINIMAL) */
@ -1064,7 +1064,7 @@ TRIO_ARGS2((source, endp),
}
}
}
value = integer + fraction;
if (exponent != 0)
{
@ -1146,7 +1146,7 @@ TRIO_ARGS3((string, endp, base),
{
assert(string);
assert((base >= 2) && (base <= 36));
return strtol(string, endp, base);
}
@ -1164,16 +1164,16 @@ TRIO_ARGS1((source),
int source)
{
#if defined(USE_TOLOWER)
return tolower(source);
#else
/* Does not handle locales or non-contiguous alphabetic characters */
return ((source >= (int)'A') && (source <= (int)'Z'))
? source - 'A' + 'a'
: source;
#endif
}
#endif /* !defined(TRIO_MINIMAL) */
@ -1195,7 +1195,7 @@ TRIO_ARGS3((string, endp, base),
{
assert(string);
assert((base >= 2) && (base <= 36));
return strtoul(string, endp, base);
}
#endif /* !defined(TRIO_MINIMAL) */
@ -1213,16 +1213,16 @@ TRIO_ARGS1((source),
int source)
{
#if defined(USE_TOUPPER)
return toupper(source);
#else
/* Does not handle locales or non-contiguous alphabetic characters */
return ((source >= (int)'a') && (source <= (int)'z'))
? source - 'a' + 'A'
: source;
#endif
}
@ -1266,7 +1266,7 @@ TRIO_STRING_PRIVATE trio_string_t *
TrioStringAlloc(TRIO_NOARGS)
{
trio_string_t *self;
self = (trio_string_t *)TRIO_MALLOC(sizeof(trio_string_t));
if (self)
{
@ -1297,7 +1297,7 @@ TRIO_ARGS2((self, delta),
new_size = (delta == 0)
? ( (self->allocated == 0) ? 1 : self->allocated * 2 )
: self->allocated + delta;
new_content = (char *)TRIO_REALLOC(self->content, new_size);
if (new_content)
{
@ -1334,7 +1334,7 @@ TRIO_ARGS2((self, length),
#if !defined(TRIO_MINIMAL)
/**
Create a new dynamic string.
@param initial_size Initial size of the buffer.
@return Newly allocated dynamic string, or NULL if memory allocation failed.
*/
@ -1367,7 +1367,7 @@ TRIO_ARGS1((initial_size),
/**
Deallocate the dynamic string and its contents.
@param self Dynamic string
*/
TRIO_STRING_PUBLIC void
@ -1376,7 +1376,7 @@ TRIO_ARGS1((self),
trio_string_t *self)
{
assert(self);
if (self)
{
trio_destroy(self->content);
@ -1388,11 +1388,11 @@ TRIO_ARGS1((self),
#if !defined(TRIO_MINIMAL)
/**
Get a pointer to the content.
@param self Dynamic string.
@param offset Offset into content.
@return Pointer to the content.
@p Offset can be zero, positive, or negative. If @p offset is zero,
then the start of the content will be returned. If @p offset is positive,
then a pointer to @p offset number of characters from the beginning of the
@ -1407,7 +1407,7 @@ TRIO_ARGS2((self, offset),
int offset)
{
char *result = NULL;
assert(self);
if (self->content != NULL)
@ -1440,10 +1440,10 @@ TRIO_ARGS2((self, offset),
/**
Extract the content.
@param self Dynamic String
@return Content of dynamic string.
The content is removed from the dynamic string. This enables destruction
of the dynamic string without deallocation of the content.
*/
@ -1453,7 +1453,7 @@ TRIO_ARGS1((self),
trio_string_t *self)
{
char *result;
assert(self);
result = self->content;
@ -1467,13 +1467,13 @@ TRIO_ARGS1((self),
#if !defined(TRIO_MINIMAL)
/**
Set the content of the dynamic string.
@param self Dynamic String
@param buffer The new content.
Sets the content of the dynamic string to a copy @p buffer.
An existing content will be deallocated first, if necessary.
@remark
This function will make a copy of @p buffer.
You are responsible for deallocating @p buffer yourself.
@ -1521,7 +1521,7 @@ TRIO_ARGS1((self),
#if !defined(TRIO_MINIMAL)
/**
Append the second string to the first.
@param self Dynamic string to be modified.
@param other Dynamic string to copy from.
@return Boolean value indicating success or failure.
@ -1533,7 +1533,7 @@ TRIO_ARGS2((self, other),
trio_string_t *other)
{
size_t length;
assert(self);
assert(other);
@ -1543,7 +1543,7 @@ TRIO_ARGS2((self, other),
trio_copy(&self->content[self->length], other->content);
self->length = length;
return TRUE;
error:
return FALSE;
}
@ -1561,7 +1561,7 @@ TRIO_ARGS2((self, other),
TRIO_CONST char *other)
{
size_t length;
assert(self);
assert(other);
@ -1571,7 +1571,7 @@ TRIO_ARGS2((self, other),
trio_copy(&self->content[self->length], other);
self->length = length;
return TRUE;
error:
return FALSE;
}
@ -1597,7 +1597,7 @@ TRIO_ARGS2((self, character),
self->content[self->length] = character;
self->length++;
return TRUE;
error:
return FALSE;
}
@ -1606,7 +1606,7 @@ TRIO_ARGS2((self, character),
#if !defined(TRIO_MINIMAL)
/**
Search for the first occurrence of second parameter in the first.
@param self Dynamic string to be modified.
@param other Dynamic string to copy from.
@return Boolean value indicating success or failure.
@ -1691,7 +1691,7 @@ TRIO_ARGS1((other),
trio_string_t *other)
{
trio_string_t *self;
assert(other);
self = TrioStringAlloc();
@ -1722,7 +1722,7 @@ TRIO_ARGS1((other),
TRIO_CONST char *other)
{
trio_string_t *self;
assert(other);
self = TrioStringAlloc();

190
valid.c
View File

@ -31,7 +31,7 @@ static xmlElementPtr xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name,
/* #define DEBUG_VALID_ALGO */
/* #define DEBUG_REGEXP_ALGO */
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
@ -301,7 +301,7 @@ vstateVPush(xmlValidCtxtPtr ctxt, xmlElementPtr elemDecl, xmlNodePtr node) {
if (elemDecl->contModel == NULL)
xmlValidBuildContentModel(ctxt, elemDecl);
if (elemDecl->contModel != NULL) {
ctxt->vstateTab[ctxt->vstateNr].exec =
ctxt->vstateTab[ctxt->vstateNr].exec =
xmlRegNewExecCtxt(elemDecl->contModel, NULL, NULL);
} else {
ctxt->vstateTab[ctxt->vstateNr].exec = NULL;
@ -623,7 +623,7 @@ xmlValidStateDebug(xmlValidCtxtPtr ctxt) {
#define DEBUG_VALID_STATE(n,c) xmlValidStateDebug(ctxt);
#define DEBUG_VALID_MSG(m) \
xmlGenericError(xmlGenericErrorContext, "%s\n", m);
#else
#define DEBUG_VALID_STATE(n,c)
#define DEBUG_VALID_MSG(m)
@ -676,7 +676,7 @@ xmlValidBuildAContentModel(xmlElementContentPtr content,
xmlAutomataStatePtr oldstate = ctxt->state;
xmlChar fn[50];
xmlChar *fullname;
fullname = xmlBuildQName(content->name, content->prefix, fn, 50);
if (fullname == NULL) {
xmlVErrMemory(ctxt, "Building content model");
@ -701,9 +701,9 @@ xmlValidBuildAContentModel(xmlElementContentPtr content,
break;
case XML_ELEMENT_CONTENT_MULT:
ctxt->state = xmlAutomataNewEpsilon(ctxt->am,
ctxt->state, NULL);
ctxt->state, NULL);
xmlAutomataNewTransition(ctxt->am,
ctxt->state, ctxt->state, fullname, NULL);
ctxt->state, ctxt->state, fullname, NULL);
break;
}
if ((fullname != fn) && (fullname != content->name))
@ -752,7 +752,7 @@ xmlValidBuildAContentModel(xmlElementContentPtr content,
xmlElementContentOccur ocur;
ocur = content->ocur;
if ((ocur == XML_ELEMENT_CONTENT_PLUS) ||
if ((ocur == XML_ELEMENT_CONTENT_PLUS) ||
(ocur == XML_ELEMENT_CONTENT_MULT)) {
ctxt->state = xmlAutomataNewEpsilon(ctxt->am,
ctxt->state, NULL);
@ -944,7 +944,7 @@ xmlNewDocElementContent(xmlDocPtr doc, const xmlChar *name,
}
break;
default:
xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
"Internal: ELEMENT content corrupted invalid type\n",
NULL);
return(NULL);
@ -1001,7 +1001,7 @@ xmlNewElementContent(const xmlChar *name, xmlElementContentType type) {
* @cur: An element content pointer.
*
* Build a copy of an element content description.
*
*
* Returns the new xmlElementContentPtr or NULL in case of error.
*/
xmlElementContentPtr
@ -1028,7 +1028,7 @@ xmlCopyDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) {
else
ret->name = xmlStrdup(cur->name);
}
if (cur->prefix != NULL) {
if (dict)
ret->prefix = xmlDictLookup(dict, cur->prefix, -1);
@ -1058,7 +1058,7 @@ xmlCopyDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) {
else
tmp->name = xmlStrdup(cur->name);
}
if (cur->prefix != NULL) {
if (dict)
tmp->prefix = xmlDictLookup(dict, cur->prefix, -1);
@ -1082,7 +1082,7 @@ xmlCopyDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) {
*
* Build a copy of an element content description.
* Deprecated, use xmlCopyDocElementContent instead
*
*
* Returns the new xmlElementContentPtr or NULL in case of error.
*/
xmlElementContentPtr
@ -1114,7 +1114,7 @@ xmlFreeDocElementContent(xmlDocPtr doc, xmlElementContentPtr cur) {
case XML_ELEMENT_CONTENT_OR:
break;
default:
xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
"Internal: ELEMENT content corrupted invalid type\n",
NULL);
return;
@ -1200,7 +1200,7 @@ xmlDumpElementContent(xmlBufferPtr buf, xmlElementContentPtr content, int glob)
xmlDumpElementContent(buf, content->c2, 0);
break;
default:
xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
"Internal: ELEMENT content corrupted invalid type\n",
NULL);
}
@ -1397,7 +1397,7 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt,
switch (type) {
case XML_ELEMENT_TYPE_EMPTY:
if (content != NULL) {
xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
"xmlAddElementDecl: content != NULL for EMPTY\n",
NULL);
return(NULL);
@ -1405,7 +1405,7 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt,
break;
case XML_ELEMENT_TYPE_ANY:
if (content != NULL) {
xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
"xmlAddElementDecl: content != NULL for ANY\n",
NULL);
return(NULL);
@ -1413,7 +1413,7 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt,
break;
case XML_ELEMENT_TYPE_MIXED:
if (content == NULL) {
xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
"xmlAddElementDecl: content == NULL for MIXED\n",
NULL);
return(NULL);
@ -1421,14 +1421,14 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt,
break;
case XML_ELEMENT_TYPE_ELEMENT:
if (content == NULL) {
xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
"xmlAddElementDecl: content == NULL for ELEMENT\n",
NULL);
return(NULL);
}
break;
default:
xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
"Internal: ELEMENT decl corrupted invalid type\n",
NULL);
return(NULL);
@ -1608,7 +1608,7 @@ xmlFreeElementTable(xmlElementTablePtr table) {
* @elem: An element
*
* Build a copy of an element.
*
*
* Returns the new xmlElementPtr or NULL in case of error.
*/
static xmlElementPtr
@ -1642,7 +1642,7 @@ xmlCopyElement(xmlElementPtr elem) {
* @table: An element table
*
* Build a copy of an element table.
*
*
* Returns the new xmlElementTablePtr or NULL in case of error.
*/
xmlElementTablePtr
@ -1707,7 +1707,7 @@ xmlDumpElementDecl(xmlBufferPtr buf, xmlElementPtr elem) {
xmlBufferWriteChar(buf, ">\n");
break;
default:
xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
"Internal: ELEMENT struct corrupted invalid type\n",
NULL);
}
@ -1818,7 +1818,7 @@ static void
xmlDumpEnumeration(xmlBufferPtr buf, xmlEnumerationPtr cur) {
if ((buf == NULL) || (cur == NULL))
return;
xmlBufferWriteCHAR(buf, cur->name);
if (cur->next == NULL)
xmlBufferWriteChar(buf, ")");
@ -1973,13 +1973,13 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt,
case XML_ATTRIBUTE_NOTATION:
break;
default:
xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
xmlErrValid(ctxt, XML_ERR_INTERNAL_ERROR,
"Internal: ATTRIBUTE struct corrupted invalid type\n",
NULL);
xmlFreeEnumeration(tree);
return(NULL);
}
if ((defaultValue != NULL) &&
if ((defaultValue != NULL) &&
(!xmlValidateAttributeValueInternal(dtd->doc, type, defaultValue))) {
xmlErrValidNode(ctxt, (xmlNodePtr) dtd, XML_DTD_ATTRIBUTE_DEFAULT,
"Attribute %s of %s: invalid default value\n",
@ -2153,7 +2153,7 @@ xmlFreeAttributeTable(xmlAttributeTablePtr table) {
* @attr: An attribute
*
* Build a copy of an attribute.
*
*
* Returns the new xmlAttributePtr or NULL in case of error.
*/
static xmlAttributePtr
@ -2186,7 +2186,7 @@ xmlCopyAttribute(xmlAttributePtr attr) {
* @table: An attribute table
*
* Build a copy of an attribute table.
*
*
* Returns the new xmlAttributeTablePtr or NULL in case of error.
*/
xmlAttributeTablePtr
@ -2251,7 +2251,7 @@ xmlDumpAttributeDecl(xmlBufferPtr buf, xmlAttributePtr attr) {
xmlDumpEnumeration(buf, attr->tree);
break;
default:
xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
"Internal: ATTRIBUTE struct corrupted invalid type\n",
NULL);
}
@ -2268,7 +2268,7 @@ xmlDumpAttributeDecl(xmlBufferPtr buf, xmlAttributePtr attr) {
xmlBufferWriteChar(buf, " #FIXED");
break;
default:
xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
xmlErrValid(NULL, XML_ERR_INTERNAL_ERROR,
"Internal: ATTRIBUTE struct corrupted invalid def\n",
NULL);
}
@ -2398,7 +2398,7 @@ xmlAddNotationDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd,
*/
if (xmlHashAddEntry(table, name, ret)) {
#ifdef LIBXML_VALID_ENABLED
xmlErrValid(NULL, XML_DTD_NOTATION_REDEFINED,
xmlErrValid(NULL, XML_DTD_NOTATION_REDEFINED,
"xmlAddNotationDecl: %s already defined\n",
(const char *) name);
#endif /* LIBXML_VALID_ENABLED */
@ -2425,7 +2425,7 @@ xmlFreeNotationTable(xmlNotationTablePtr table) {
* @nota: A notation
*
* Build a copy of a notation.
*
*
* Returns the new xmlNotationPtr or NULL in case of error.
*/
static xmlNotationPtr
@ -2457,7 +2457,7 @@ xmlCopyNotation(xmlNotationPtr nota) {
* @table: A notation table
*
* Build a copy of a notation table.
*
*
* Returns the new xmlNotationTablePtr or NULL in case of error.
*/
xmlNotationTablePtr
@ -2535,7 +2535,7 @@ xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table) {
* current scope
*/
#define DICT_FREE(str) \
if ((str) && ((!dict) || \
if ((str) && ((!dict) || \
(xmlDictOwns(dict, (const xmlChar *)(str)) == 0))) \
xmlFree((char *)(str));
@ -2573,7 +2573,7 @@ xmlFreeID(xmlIDPtr id) {
*
* Returns NULL if not, otherwise the new xmlIDPtr
*/
xmlIDPtr
xmlIDPtr
xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
xmlAttrPtr attr) {
xmlIDPtr ret;
@ -2687,7 +2687,7 @@ xmlIsID(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) {
((xmlStrEqual(BAD_CAST "name", attr->name)) &&
((elem == NULL) || (xmlStrEqual(elem->name, BAD_CAST "a")))))
return(1);
return(0);
return(0);
} else if (elem == NULL) {
return(0);
} else {
@ -2741,7 +2741,7 @@ xmlRemoveID(xmlDocPtr doc, xmlAttrPtr attr) {
if (doc == NULL) return(-1);
if (attr == NULL) return(-1);
table = (xmlIDTablePtr) doc->ids;
if (table == NULL)
if (table == NULL)
return(-1);
if (attr == NULL)
@ -2769,7 +2769,7 @@ xmlRemoveID(xmlDocPtr doc, xmlAttrPtr attr) {
*
* Returns NULL if not found, otherwise the xmlAttrPtr defining the ID
*/
xmlAttrPtr
xmlAttrPtr
xmlGetID(xmlDocPtr doc, const xmlChar *ID) {
xmlIDTablePtr table;
xmlIDPtr id;
@ -2783,7 +2783,7 @@ xmlGetID(xmlDocPtr doc, const xmlChar *ID) {
}
table = (xmlIDTablePtr) doc->ids;
if (table == NULL)
if (table == NULL)
return(NULL);
id = xmlHashLookup(table, ID);
@ -2804,7 +2804,7 @@ xmlGetID(xmlDocPtr doc, const xmlChar *ID) {
* Refs *
* *
************************************************************************/
typedef struct xmlRemoveMemo_t
typedef struct xmlRemoveMemo_t
{
xmlListPtr l;
xmlAttrPtr ap;
@ -2812,7 +2812,7 @@ typedef struct xmlRemoveMemo_t
typedef xmlRemoveMemo *xmlRemoveMemoPtr;
typedef struct xmlValidateMemo_t
typedef struct xmlValidateMemo_t
{
xmlValidCtxtPtr ctxt;
const xmlChar *name;
@ -2895,7 +2895,7 @@ xmlDummyCompare(const void *data0 ATTRIBUTE_UNUSED,
*
* Returns NULL if not, otherwise the new xmlRefPtr
*/
xmlRefPtr
xmlRefPtr
xmlAddRef(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
xmlAttrPtr attr) {
xmlRefPtr ret;
@ -3023,7 +3023,7 @@ xmlIsRef(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) {
return(0);
} else if (doc->type == XML_HTML_DOCUMENT_NODE) {
/* TODO @@@ */
return(0);
return(0);
} else {
xmlAttributePtr attrDecl;
@ -3060,7 +3060,7 @@ xmlRemoveRef(xmlDocPtr doc, xmlAttrPtr attr) {
if (doc == NULL) return(-1);
if (attr == NULL) return(-1);
table = (xmlRefTablePtr) doc->refs;
if (table == NULL)
if (table == NULL)
return(-1);
if (attr == NULL)
@ -3086,7 +3086,7 @@ xmlRemoveRef(xmlDocPtr doc, xmlAttrPtr attr) {
*/
target.l = ref_list;
target.ap = attr;
/* Remove the supplied attr from our list */
xmlListWalk(ref_list, xmlWalkRemoveRef, &target);
@ -3103,11 +3103,11 @@ xmlRemoveRef(xmlDocPtr doc, xmlAttrPtr attr) {
* @doc: pointer to the document
* @ID: the ID value
*
* Find the set of references for the supplied ID.
* Find the set of references for the supplied ID.
*
* Returns NULL if not found, otherwise node set for the ID.
*/
xmlListPtr
xmlListPtr
xmlGetRefs(xmlDocPtr doc, const xmlChar *ID) {
xmlRefTablePtr table;
@ -3120,7 +3120,7 @@ xmlGetRefs(xmlDocPtr doc, const xmlChar *ID) {
}
table = (xmlRefTablePtr) doc->refs;
if (table == NULL)
if (table == NULL)
return(NULL);
return (xmlHashLookup(table, ID));
@ -3185,7 +3185,7 @@ xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name, int create) {
if (dtd->doc != NULL)
dict = dtd->doc->dict;
if (!create)
if (!create)
return(NULL);
/*
* Create the Element table if needed.
@ -3798,7 +3798,7 @@ xmlValidateAttributeValueInternal(xmlDocPtr doc, xmlAttributeType type,
*
* [ VC: Name Token ]
* Values of type NMTOKEN must match the Nmtoken production; values
* of type NMTOKENS must match Nmtokens.
* of type NMTOKENS must match Nmtokens.
*
* returns 1 if valid or 0 otherwise
*/
@ -3857,7 +3857,7 @@ xmlValidateAttributeValue2(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
if ((ent == NULL) && (doc->standalone == 1)) {
doc->standalone = 0;
ent = xmlGetDocEntity(doc, value);
}
}
if (ent == NULL) {
xmlErrValidNode(ctxt, (xmlNodePtr) doc,
XML_DTD_UNKNOWN_ENTITY,
@ -3968,7 +3968,7 @@ xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
if ((elem->ns != NULL) && (elem->ns->prefix != NULL)) {
xmlChar fn[50];
xmlChar *fullname;
fullname = xmlBuildQName(elem->name, elem->ns->prefix, fn, 50);
if (fullname == NULL)
return(NULL);
@ -4167,7 +4167,7 @@ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
}
}
if (nbId > 1) {
xmlErrValidNodeNr(ctxt, (xmlNodePtr) attr, XML_DTD_ID_SUBSET,
"Element %s has %d ID attribute defined in the internal subset : %s\n",
attr->elem, nbId, attr->name);
@ -4230,7 +4230,7 @@ xmlValidateElementDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
xmlElementPtr tst;
CHECK_DTD;
if (elem == NULL) return(1);
#if 0
@ -4347,7 +4347,7 @@ xmlValidateElementDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
int
xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
xmlNodePtr elem, xmlAttrPtr attr, const xmlChar *value)
xmlNodePtr elem, xmlAttrPtr attr, const xmlChar *value)
{
xmlAttributePtr attrDecl = NULL;
int val;
@ -4360,7 +4360,7 @@ xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
if ((elem->ns != NULL) && (elem->ns->prefix != NULL)) {
xmlChar fn[50];
xmlChar *fullname;
fullname = xmlBuildQName(elem->name, elem->ns->prefix, fn, 50);
if (fullname == NULL)
return(0);
@ -4444,7 +4444,7 @@ xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
nota = xmlGetDtdNotationDesc(doc->intSubset, value);
if (nota == NULL)
nota = xmlGetDtdNotationDesc(doc->extSubset, value);
if (nota == NULL) {
xmlErrValidNode(ctxt, elem, XML_DTD_UNKNOWN_NOTATION,
"Value \"%s\" for attribute %s of %s is not a declared Notation\n",
@ -4537,7 +4537,7 @@ xmlNodePtr elem, const xmlChar *prefix, xmlNsPtr ns, const xmlChar *value) {
if (prefix != NULL) {
xmlChar fn[50];
xmlChar *fullname;
fullname = xmlBuildQName(elem->name, prefix, fn, 50);
if (fullname == NULL) {
xmlVErrMemory(ctxt, "Validating namespace");
@ -4641,7 +4641,7 @@ xmlNodePtr elem, const xmlChar *prefix, xmlNsPtr ns, const xmlChar *value) {
nota = xmlGetDtdNotationDesc(doc->intSubset, value);
if (nota == NULL)
nota = xmlGetDtdNotationDesc(doc->extSubset, value);
if (nota == NULL) {
if (ns->prefix != NULL) {
xmlErrValidNode(ctxt, elem, XML_DTD_UNKNOWN_NOTATION,
@ -4777,7 +4777,7 @@ xmlValidateElementType(xmlValidCtxtPtr ctxt) {
NODE = xmlValidateSkipIgnorable(NODE);
if ((NODE == NULL) && (CONT == NULL))
return(1);
if ((NODE == NULL) &&
if ((NODE == NULL) &&
((CONT->ocur == XML_ELEMENT_CONTENT_MULT) ||
(CONT->ocur == XML_ELEMENT_CONTENT_OPT))) {
return(1);
@ -5286,7 +5286,7 @@ xmlValidateElementContent(xmlValidCtxtPtr ctxt, xmlNodePtr child,
if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
xmlChar fn[50];
xmlChar *fullname;
fullname = xmlBuildQName(cur->name,
cur->ns->prefix, fn, 50);
if (fullname == NULL) {
@ -5400,7 +5400,7 @@ fail:
last = tmp;
}
if (cur->type == XML_CDATA_SECTION_NODE) {
/*
/*
* E59 spaces in CDATA does not match the
* nonterminal S
*/
@ -5599,7 +5599,7 @@ xmlValidateCheckMixed(xmlValidCtxtPtr ctxt,
} else if ((cont->type != XML_ELEMENT_CONTENT_OR) ||
(cont->c1 == NULL) ||
(cont->c1->type != XML_ELEMENT_CONTENT_PCDATA)){
xmlErrValid(NULL, XML_DTD_MIXED_CORRUPT,
xmlErrValid(NULL, XML_DTD_MIXED_CORRUPT,
"Internal: MIXED struct corrupted\n",
NULL);
break;
@ -5623,7 +5623,7 @@ xmlValidateCheckMixed(xmlValidCtxtPtr ctxt,
} else if ((cont->type != XML_ELEMENT_CONTENT_OR) ||
(cont->c1 == NULL) ||
(cont->c1->type != XML_ELEMENT_CONTENT_PCDATA)){
xmlErrValid(ctxt, XML_DTD_MIXED_CORRUPT,
xmlErrValid(ctxt, XML_DTD_MIXED_CORRUPT,
"Internal: MIXED struct corrupted\n",
NULL);
break;
@ -5652,7 +5652,7 @@ xmlValidGetElemDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
xmlElementPtr elemDecl = NULL;
const xmlChar *prefix = NULL;
if ((ctxt == NULL) || (doc == NULL) ||
if ((ctxt == NULL) || (doc == NULL) ||
(elem == NULL) || (elem->name == NULL))
return(NULL);
if (extsubset != NULL)
@ -6018,7 +6018,7 @@ xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
return(0);
/*
* If vstateNr is not zero that means continuous validation is
* If vstateNr is not zero that means continuous validation is
* activated, do not try to check the content model at that level.
*/
if (ctxt->vstateNr == 0) {
@ -6061,7 +6061,7 @@ xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
if ((child->ns != NULL) && (child->ns->prefix != NULL)) {
xmlChar fn[50];
xmlChar *fullname;
fullname = xmlBuildQName(child->name, child->ns->prefix,
fn, 50);
if (fullname == NULL)
@ -6079,7 +6079,7 @@ xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
} else if ((cont->type != XML_ELEMENT_CONTENT_OR) ||
(cont->c1 == NULL) ||
(cont->c1->type != XML_ELEMENT_CONTENT_PCDATA)){
xmlErrValid(NULL, XML_DTD_MIXED_CORRUPT,
xmlErrValid(NULL, XML_DTD_MIXED_CORRUPT,
"Internal: MIXED struct corrupted\n",
NULL);
break;
@ -6102,7 +6102,7 @@ xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
} else if ((cont->type != XML_ELEMENT_CONTENT_OR) ||
(cont->c1 == NULL) ||
(cont->c1->type != XML_ELEMENT_CONTENT_PCDATA)) {
xmlErrValid(ctxt, XML_DTD_MIXED_CORRUPT,
xmlErrValid(ctxt, XML_DTD_MIXED_CORRUPT,
"Internal: MIXED struct corrupted\n",
NULL);
break;
@ -6182,7 +6182,7 @@ child_ok:
}
} else {
xmlAttrPtr attrib;
attrib = elem->properties;
while (attrib != NULL) {
if (xmlStrEqual(attrib->name, attr->name)) {
@ -6197,18 +6197,18 @@ child_ok:
* allow to define the URI instead of the prefix :-(
*/
if (nameSpace == NULL) {
if (qualified < 0)
if (qualified < 0)
qualified = 0;
} else if (!xmlStrEqual(nameSpace->prefix,
attr->prefix)) {
if (qualified < 1)
if (qualified < 1)
qualified = 1;
} else
goto found;
} else {
/*
* We should allow applications to define namespaces
* for their application even if the DTD doesn't
* for their application even if the DTD doesn't
* carry one, otherwise, basically we would always
* break.
*/
@ -6281,7 +6281,7 @@ child_ok:
}
}
}
found:
found:
attr = attr->nexth;
}
return(ret);
@ -6328,7 +6328,7 @@ xmlValidateRoot(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
if ((root->ns != NULL) && (root->ns->prefix != NULL)) {
xmlChar fn[50];
xmlChar *fullname;
fullname = xmlBuildQName(root->name, root->ns->prefix, fn, 50);
if (fullname == NULL) {
xmlVErrMemory(ctxt, NULL);
@ -6339,7 +6339,7 @@ xmlValidateRoot(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
xmlFree(fullname);
if (ret == 1)
goto name_ok;
}
}
if ((xmlStrEqual(doc->intSubset->name, BAD_CAST "HTML")) &&
(xmlStrEqual(root->name, BAD_CAST "html")))
goto name_ok;
@ -6360,7 +6360,7 @@ name_ok:
* @doc: a document instance
* @elem: an element instance
*
* Try to validate the subtree under an element
* Try to validate the subtree under an element
*
* returns 1 if valid or 0 otherwise
*/
@ -6540,7 +6540,7 @@ xmlValidateCheckRefCallback(xmlListPtr ref_list, xmlValidCtxtPtr ctxt,
memo.name = name;
xmlListWalk(ref_list, xmlWalkValidateList, &memo);
}
/**
@ -6552,7 +6552,7 @@ xmlValidateCheckRefCallback(xmlListPtr ref_list, xmlValidCtxtPtr ctxt,
* incremental validation steps have been completed
*
* basically it does the following checks described by the XML Rec
*
*
* Check all the IDREF/IDREFS attributes definition for validity
*
* returns 1 if valid or 0 otherwise
@ -6566,7 +6566,7 @@ xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
if (ctxt == NULL)
return(0);
if (doc == NULL) {
xmlErrValid(ctxt, XML_DTD_NO_DOC,
xmlErrValid(ctxt, XML_DTD_NO_DOC,
"xmlValidateDocumentFinal: doc == NULL\n", NULL);
return(0);
}
@ -6684,7 +6684,7 @@ xmlValidateAttributeCallback(xmlAttributePtr cur, xmlValidCtxtPtr ctxt,
case XML_ATTRIBUTE_ENTITIES:
case XML_ATTRIBUTE_NOTATION:
if (cur->defaultValue != NULL) {
ret = xmlValidateAttributeValue2(ctxt, ctxt->doc, cur->name,
cur->atype, cur->defaultValue);
if ((ret == 0) && (ctxt->valid == 1))
@ -6741,9 +6741,9 @@ xmlValidateAttributeCallback(xmlAttributePtr cur, xmlValidCtxtPtr ctxt,
* subsets have been parsed
*
* basically it does the following checks described by the XML Rec
* - check that ENTITY and ENTITIES type attributes default or
* - check that ENTITY and ENTITIES type attributes default or
* possible values matches one of the defined entities.
* - check that NOTATION type attributes default or
* - check that NOTATION type attributes default or
* possible values matches one of the defined notations.
*
* returns 1 if valid or 0 if invalid and -1 if not well-formed
@ -6814,7 +6814,7 @@ xmlValidateDocument(xmlValidCtxtPtr ctxt, xmlDocPtr doc) {
xmlChar *sysID;
if (doc->intSubset->SystemID != NULL) {
sysID = xmlBuildURI(doc->intSubset->SystemID,
doc->URL);
doc->URL);
if (sysID == NULL) {
xmlErrValid(ctxt, XML_DTD_LOAD_ERROR,
"Could not build URI for external subset \"%s\"\n",
@ -6887,17 +6887,17 @@ xmlValidGetPotentialChildren(xmlElementContent *ctree,
if (*len >= max) return(*len);
switch (ctree->type) {
case XML_ELEMENT_CONTENT_PCDATA:
case XML_ELEMENT_CONTENT_PCDATA:
for (i = 0; i < *len;i++)
if (xmlStrEqual(BAD_CAST "#PCDATA", names[i])) return(*len);
names[(*len)++] = BAD_CAST "#PCDATA";
break;
case XML_ELEMENT_CONTENT_ELEMENT:
case XML_ELEMENT_CONTENT_ELEMENT:
for (i = 0; i < *len;i++)
if (xmlStrEqual(ctree->name, names[i])) return(*len);
names[(*len)++] = ctree->name;
break;
case XML_ELEMENT_CONTENT_SEQ:
case XML_ELEMENT_CONTENT_SEQ:
xmlValidGetPotentialChildren(ctree->c1, names, len, max);
xmlValidGetPotentialChildren(ctree->c2, names, len, max);
break;
@ -6906,7 +6906,7 @@ xmlValidGetPotentialChildren(xmlElementContent *ctree,
xmlValidGetPotentialChildren(ctree->c2, names, len, max);
break;
}
return(*len);
}
@ -6951,16 +6951,16 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **names,
const xmlChar *elements[256];
int nb_elements = 0, i;
const xmlChar *name;
xmlNode *ref_node;
xmlNode *parent;
xmlNode *test_node;
xmlNode *prev_next;
xmlNode *next_prev;
xmlNode *parent_childs;
xmlNode *parent_last;
xmlElement *element_desc;
if (prev == NULL && next == NULL)
@ -6985,7 +6985,7 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **names,
element_desc = xmlGetDtdElementDesc(parent->doc->extSubset,
parent->name);
if (element_desc == NULL) return(-1);
/*
* Do a backup of the current tree structure
*/
@ -6996,16 +6996,16 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **names,
/*
* Creates a dummy node and insert it into the tree
*/
*/
test_node = xmlNewDocNode (ref_node->doc, NULL, BAD_CAST "<!dummy?>", NULL);
test_node->parent = parent;
test_node->prev = prev;
test_node->next = next;
name = test_node->name;
if (prev) prev->next = test_node;
else parent->children = test_node;
if (next) next->prev = test_node;
else parent->last = test_node;
@ -7015,7 +7015,7 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **names,
*/
nb_elements = xmlValidGetPotentialChildren(element_desc->content,
elements, &nb_elements, 256);
for (i = 0;i < nb_elements;i++) {
test_node->name = elements[i];
if (xmlValidateOneElement(&vctxt, parent->doc, parent)) {

View File

@ -93,7 +93,7 @@ xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree);
/************************************************************************
* *
* XInclude error handler *
* XInclude error handler *
* *
************************************************************************/
@ -413,7 +413,7 @@ xmlXIncludeFreeContext(xmlXIncludeCtxtPtr ctxt) {
* xmlXIncludeParseFile:
* @ctxt: the XInclude context
* @URL: the URL or file path
*
*
* parse a document for XInclude
*/
static xmlDocPtr
@ -434,7 +434,7 @@ xmlXIncludeParseFile(xmlXIncludeCtxtPtr ctxt, const char *URL) {
* pass in the application data to the parser context.
*/
pctxt->_private = ctxt->_private;
/*
* try to ensure that new documents included are actually
* built with the same dictionary as the including document.
@ -447,7 +447,7 @@ xmlXIncludeParseFile(xmlXIncludeCtxtPtr ctxt, const char *URL) {
}
xmlCtxtUseOptions(pctxt, ctxt->parseFlags | XML_PARSE_DTDLOAD);
inputStream = xmlLoadExternalEntity(URL, NULL, pctxt);
if (inputStream == NULL) {
xmlFreeParserCtxt(pctxt);
@ -473,7 +473,7 @@ xmlXIncludeParseFile(xmlXIncludeCtxtPtr ctxt, const char *URL) {
pctxt->myDoc = NULL;
}
xmlFreeParserCtxt(pctxt);
return(ret);
}
@ -481,7 +481,7 @@ xmlXIncludeParseFile(xmlXIncludeCtxtPtr ctxt, const char *URL) {
* xmlXIncludeAddNode:
* @ctxt: the XInclude context
* @cur: the new node
*
*
* Add a new node to process to an XInclude context
*/
static int
@ -512,7 +512,7 @@ xmlXIncludeAddNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr cur) {
href = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_HREF);
if (href == NULL) {
href = xmlStrdup(BAD_CAST ""); /* @@@@ href is now optional */
if (href == NULL)
if (href == NULL)
return(-1);
}
if ((href[0] == '#') || (href[0] == 0))
@ -656,7 +656,7 @@ xmlXIncludeAddNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr cur) {
* @ctxt: the XInclude context
* @doc: the new document
* @url: the associated URL
*
*
* The XInclude recursive nature is handled at this point.
*/
static void
@ -685,7 +685,7 @@ xmlXIncludeRecurseDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc,
/*
* Copy the private user data
*/
newctxt->_private = ctxt->_private;
newctxt->_private = ctxt->_private;
/*
* Copy the existing document set
*/
@ -750,7 +750,7 @@ xmlXIncludeRecurseDoc(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc,
* @ctxt: the XInclude context
* @txt: the new text node
* @url: the associated URL
*
*
* Add a new txtument to the list
*/
static void
@ -809,7 +809,7 @@ xmlXIncludeCopyNodeList(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target,
* @target: the document target
* @source: the document source
* @elem: the element
*
*
* Make a copy of the node while preserving the XInclude semantic
* of the Infoset copy
*/
@ -836,7 +836,7 @@ xmlXIncludeCopyNode(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target,
* @target: the document target
* @source: the document source
* @elem: the element list
*
*
* Make a copy of the node list while preserving the XInclude semantic
* of the Infoset copy
*/
@ -879,7 +879,7 @@ xmlXIncludeGetNthChild(xmlNodePtr cur, int no) {
return(NULL);
cur = cur->children;
for (i = 0;i <= no;cur = cur->next) {
if (cur == NULL)
if (cur == NULL)
return(cur);
if ((cur->type == XML_ELEMENT_NODE) ||
(cur->type == XML_DOCUMENT_NODE) ||
@ -988,7 +988,7 @@ xmlXIncludeCopyRange(xmlXIncludeCtxtPtr ctxt, xmlDocPtr target,
/* prune and return full set */
if (level == lastLevel)
xmlAddNextSibling(last, tmp);
else
else
xmlAddChild(last, tmp);
return(list);
} else { /* ending node not a text node */
@ -1292,7 +1292,7 @@ xmlXIncludeMergeEntity(xmlEntityPtr ent, xmlXIncludeMergeDataPtr data,
if (prev != NULL) {
if (ent->etype != prev->etype)
goto error;
if ((ent->SystemID != NULL) && (prev->SystemID != NULL)) {
if (!xmlStrEqual(ent->SystemID, prev->SystemID))
goto error;
@ -1392,7 +1392,7 @@ xmlXIncludeMergeEntities(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc,
* @ctxt: the XInclude context
* @url: the associated URL
* @nr: the xinclude node number
*
*
* Load the document, and store the result in the XInclude context
*
* Returns 0 in case of success, -1 in case of failure
@ -1416,7 +1416,7 @@ xmlXIncludeLoadDoc(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
*/
uri = xmlParseURI((const char *)url);
if (uri == NULL) {
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
XML_XINCLUDE_HREF_URI,
"invalid value URI %s\n", url);
return(-1);
@ -1434,7 +1434,7 @@ xmlXIncludeLoadDoc(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
xmlFreeURI(uri);
if (URL == NULL) {
if (ctxt->incTab != NULL)
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
XML_XINCLUDE_HREF_URI,
"invalid value URI %s\n", url);
else
@ -1553,7 +1553,7 @@ loaded:
ctxt->incTab[nr]->inc = xmlXIncludeCopyNodeList(ctxt, ctxt->doc,
doc, doc->children);
}
}
}
#ifdef LIBXML_XPTR_ENABLED
else {
/*
@ -1571,7 +1571,7 @@ loaded:
xptrctxt = xmlXPtrNewContext(doc, NULL, NULL);
}
if (xptrctxt == NULL) {
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
XML_XINCLUDE_XPTR_FAILED,
"could not create XPointer context\n", NULL);
xmlFree(URL);
@ -1597,7 +1597,7 @@ loaded:
case XPATH_POINT:
case XPATH_USERS:
case XPATH_XSLT_TREE:
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
XML_XINCLUDE_XPTR_RESULT,
"XPointer is not a range: #%s\n",
fragment);
@ -1639,14 +1639,14 @@ loaded:
continue;
case XML_ATTRIBUTE_NODE:
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
XML_XINCLUDE_XPTR_RESULT,
"XPointer selects an attribute: #%s\n",
fragment);
set->nodeTab[i] = NULL;
continue;
case XML_NAMESPACE_DECL:
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
XML_XINCLUDE_XPTR_RESULT,
"XPointer selects a namespace: #%s\n",
fragment);
@ -1661,7 +1661,7 @@ loaded:
case XML_ENTITY_DECL:
case XML_XINCLUDE_START:
case XML_XINCLUDE_END:
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
XML_XINCLUDE_XPTR_RESULT,
"XPointer selects unexpected nodes: #%s\n",
fragment);
@ -1707,7 +1707,7 @@ loaded:
*/
curBase = xmlBuildRelativeURI(URL, ctxt->base);
if (curBase == NULL) { /* Error return */
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
XML_XINCLUDE_HREF_URI,
"trying to build relative URI from %s\n", URL);
} else {
@ -1748,7 +1748,7 @@ loaded:
xmlChar *relBase;
relBase = xmlBuildURI(xmlBase, base);
if (relBase == NULL) { /* error */
xmlXIncludeErr(ctxt,
xmlXIncludeErr(ctxt,
ctxt->incTab[nr]->ref,
XML_XINCLUDE_HREF_URI,
"trying to rebuild base from %s\n",
@ -1785,7 +1785,7 @@ loaded:
* @ctxt: the XInclude context
* @url: the associated URL
* @nr: the xinclude node number
*
*
* Load the content, and store the result in the XInclude context
*
* Returns 0 in case of success, -1 in case of failure
@ -1832,7 +1832,7 @@ xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
* directly through ctxt->doc.
*/
if (URL[0] == 0) {
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
XML_XINCLUDE_TEXT_DOCUMENT,
"text serialization of document not available\n", NULL);
xmlFree(URL);
@ -1950,7 +1950,7 @@ loaded:
* @ctxt: the XInclude context
* @fallback: the fallback node
* @nr: the xinclude node number
*
*
* Load the content of the fallback node, and store the result
* in the XInclude context
*
@ -2047,7 +2047,7 @@ xmlXIncludeLoadNode(xmlXIncludeCtxtPtr ctxt, int nr) {
href = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_HREF);
if (href == NULL) {
href = xmlStrdup(BAD_CAST ""); /* @@@@ href is now optional */
if (href == NULL)
if (href == NULL)
return(-1);
}
parse = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_PARSE);
@ -2092,7 +2092,7 @@ xmlXIncludeLoadNode(xmlXIncludeCtxtPtr ctxt, int nr) {
xmlFree(eschref);
}
if (URI == NULL) {
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
XML_XINCLUDE_HREF_URI, "failed build URL\n", NULL);
if (parse != NULL)
xmlFree(parse);
@ -2125,7 +2125,7 @@ xmlXIncludeLoadNode(xmlXIncludeCtxtPtr ctxt, int nr) {
* Restore the original base before checking for fallback
*/
ctxt->base = oldBase;
if (ret < 0) {
xmlNodePtr children;
@ -2143,14 +2143,14 @@ xmlXIncludeLoadNode(xmlXIncludeCtxtPtr ctxt, int nr) {
((xmlStrEqual(children->ns->href, XINCLUDE_NS)) ||
(xmlStrEqual(children->ns->href, XINCLUDE_OLD_NS)))) {
ret = xmlXIncludeLoadFallback(ctxt, children, nr);
if (ret == 0)
if (ret == 0)
break;
}
children = children->next;
}
}
if (ret < 0) {
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
XML_XINCLUDE_NO_FALLBACK,
"could not load %s, and no fallback was found\n",
URI);
@ -2219,7 +2219,7 @@ xmlXIncludeIncludeNode(xmlXIncludeCtxtPtr ctxt, int nr) {
tmp = tmp->next;
}
if (nb_elem > 1) {
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
XML_XINCLUDE_MULTIPLE_ROOT,
"XInclude error: would result in multiple root nodes\n",
NULL);
@ -2266,7 +2266,7 @@ xmlXIncludeIncludeNode(xmlXIncludeCtxtPtr ctxt, int nr) {
}
}
return(0);
}

10
xlink.c
View File

@ -47,7 +47,7 @@
* Default setting and related functions *
* *
****************************************************************/
static xlinkHandlerPtr xlinkDefaultHandler = NULL;
static xlinkNodeDetectFunc xlinkDefaultDetect = NULL;
@ -93,7 +93,7 @@ xlinkGetDefaultDetect (void) {
*
* Set the default xlink detection routine
*/
void
void
xlinkSetDefaultDetect (xlinkNodeDetectFunc func) {
xlinkDefaultDetect = func;
}
@ -104,7 +104,7 @@ xlinkSetDefaultDetect (xlinkNodeDetectFunc func) {
* *
****************************************************************/
/**
* xlinkIsLink:
* @doc: the document containing the node
@ -119,7 +119,7 @@ xlinkSetDefaultDetect (xlinkNodeDetectFunc func) {
* Returns the xlinkType of the node (XLINK_TYPE_NONE if there is no
* link detected.
*/
xlinkType
xlinkType
xlinkIsLink (xmlDocPtr doc, xmlNodePtr node) {
xmlChar *type = NULL, *role = NULL;
xlinkType ret = XLINK_TYPE_NONE;
@ -157,7 +157,7 @@ xlinkIsLink (xmlDocPtr doc, xmlNodePtr node) {
xlink = xmlSearchNs(doc, node, XLINK_NAMESPACE);
if (xlink == NULL) {
/* Humm, fallback method */
if (xmlStrEqual(role, BAD_CAST"xlink:external-linkset"))
if (xmlStrEqual(role, BAD_CAST"xlink:external-linkset"))
ret = XLINK_TYPE_EXTENDED_SET;
} else {
xmlChar buf[200];

View File

@ -1001,7 +1001,7 @@ xmlFileOpenW (const char *filename) {
#if defined(_WIN32) || defined (__DJGPP__) && !defined (__CYGWIN__)
fd = xmlWrapOpen(path, 1);
#else
fd = fopen(path, "wb");
fd = fopen(path, "wb");
#endif /* WIN32 */
if (fd == NULL) xmlIOErr(0, path);
@ -3512,7 +3512,7 @@ xmlEscapeContent(unsigned char* out, int *outlen,
inend = in + (*inlen);
while ((in < inend) && (out < outend)) {
if (*in == '<') {
if (*in == '<') {
if (outend - out < 4) break;
*out++ = '&';
*out++ = 'l';

View File

@ -47,16 +47,16 @@ static char *filename = NULL;
#endif
/************************************************************************
* *
* Shell Interface *
* *
* *
* Shell Interface *
* *
************************************************************************/
/**
* xmlShellReadline:
* @prompt: the prompt value
*
* Read a string
*
*
* Returns a pointer to it or NULL on EOF the caller is expected to
* free the returned string.
*/
@ -157,7 +157,7 @@ static void usershell(void) {
i++;
cur++;
}
} else if (*cur == '"') {
} else if (*cur == '"') {
cur++;
argv[i] = cur;
while ((*cur != 0) && (*cur != '"')) cur++;
@ -296,15 +296,15 @@ static void usershell(void) {
printf("\tdebug: increase the verbosity level\n");
printf("\tquiet: decrease the verbosity level\n");
printf("\texit: quit the shell\n");
}
}
free(cmdline); /* not xmlFree here ! */
}
}
/************************************************************************
* *
* Main *
* *
* *
* Main *
* *
************************************************************************/
static void usage(const char *name) {
/* split into 2 printf's to avoid overly long string (gcc warning) */
@ -507,7 +507,7 @@ int main(int argc, char **argv) {
exit_value = 2;
noout = 0;
} else {
xmlACatalogDump(super, out);
fclose(out);
}
@ -544,14 +544,14 @@ int main(int argc, char **argv) {
}
}
}
} else if (shell) {
usershell();
} else {
for (i++; i < argc; i++) {
xmlURIPtr uri;
xmlChar *ans;
uri = xmlParseURI(argv[i]);
if (uri == NULL) {
ans = xmlCatalogResolvePublic((const xmlChar *) argv[i]);

View File

@ -58,7 +58,7 @@ void xmlMallocBreakpoint(void);
/************************************************************************
* *
* Macros, variables and associated types *
* Macros, variables and associated types *
* *
************************************************************************/

View File

@ -30,7 +30,7 @@ static int xmlModulePlatformSymbol(void *handle, const char *name, void **result
/************************************************************************
* *
* module memory error handler *
* module memory error handler *
* *
************************************************************************/
@ -114,7 +114,7 @@ int
xmlModuleSymbol(xmlModulePtr module, const char *name, void **symbol)
{
int rc = -1;
if ((NULL == module) || (symbol == NULL)) {
__xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_MODULE,
XML_MODULE_OPEN, XML_ERR_FATAL, NULL, 0, 0,

View File

@ -1726,8 +1726,8 @@ xmlTextReaderReadInnerXml(xmlTextReaderPtr reader ATTRIBUTE_UNUSED)
*
* Reads the contents of the current node, including child nodes and markup.
*
* Returns a string containing the node and any XML content, or NULL if the
* current node cannot be serialized. The string must be deallocated
* Returns a string containing the node and any XML content, or NULL if the
* current node cannot be serialized. The string must be deallocated
* by the caller.
*/
xmlChar *

View File

@ -1,7 +1,7 @@
/*
* regexp.c: generic and extensible Regular Expression engine
*
* Basically designed with the purpose of compiling regexps for
* Basically designed with the purpose of compiling regexps for
* the variety of validation/shemas mechanisms now available in
* XML related specifications these include:
* - XML-1.0 DTD validation
@ -68,15 +68,15 @@
*
* macro to flag unimplemented blocks
*/
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
/************************************************************************
* *
* Datatypes and structures *
* *
* *
* Datatypes and structures *
* *
************************************************************************/
/*
@ -365,7 +365,7 @@ void xmlAutomataSetFlags(xmlAutomataPtr am, int flags);
/************************************************************************
* *
* Regexp memory error handler *
* Regexp memory error handler *
* *
************************************************************************/
/**
@ -412,9 +412,9 @@ xmlRegexpErrCompile(xmlRegParserCtxtPtr ctxt, const char *extra)
}
/************************************************************************
* *
* Allocation/Deallocation *
* *
* *
* Allocation/Deallocation *
* *
************************************************************************/
static int xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt);
@ -935,9 +935,9 @@ xmlRegFreeParserCtxt(xmlRegParserCtxtPtr ctxt) {
}
/************************************************************************
* *
* Display of Data structures *
* *
* *
* Display of Data structures *
* *
************************************************************************/
static void
@ -1144,7 +1144,7 @@ xmlRegPrintTrans(FILE *output, xmlRegTransPtr trans) {
fprintf(output, "char %c ", trans->atom->codepoint);
fprintf(output, "atom %d, to %d\n", trans->atom->no, trans->to);
}
static void
xmlRegPrintState(FILE *output, xmlRegStatePtr state) {
int i;
@ -1158,7 +1158,7 @@ xmlRegPrintState(FILE *output, xmlRegStatePtr state) {
fprintf(output, "START ");
if (state->type == XML_REGEXP_FINAL_STATE)
fprintf(output, "FINAL ");
fprintf(output, "%d, %d transitions:\n", state->no, state->nbTrans);
for (i = 0;i < state->nbTrans; i++) {
xmlRegPrintTrans(output, &(state->trans[i]));
@ -1208,12 +1208,12 @@ xmlRegPrintCtxt(FILE *output, xmlRegParserCtxtPtr ctxt) {
#endif
/************************************************************************
* *
* *
* Finite Automata structures manipulations *
* *
* *
************************************************************************/
static void
static void
xmlRegAtomAddRange(xmlRegParserCtxtPtr ctxt, xmlRegAtomPtr atom,
int neg, xmlRegAtomType type, int start, int end,
xmlChar *blockName) {
@ -1253,7 +1253,7 @@ xmlRegAtomAddRange(xmlRegParserCtxtPtr ctxt, xmlRegAtomPtr atom,
return;
range->blockName = blockName;
atom->ranges[atom->nbRanges++] = range;
}
static int
@ -1284,7 +1284,7 @@ xmlRegGetCounter(xmlRegParserCtxtPtr ctxt) {
return(ctxt->nbCounters++);
}
static int
static int
xmlRegAtomPush(xmlRegParserCtxtPtr ctxt, xmlRegAtomPtr atom) {
if (atom == NULL) {
ERROR("atom push: atom is NULL");
@ -1316,7 +1316,7 @@ xmlRegAtomPush(xmlRegParserCtxtPtr ctxt, xmlRegAtomPtr atom) {
return(0);
}
static void
static void
xmlRegStateAddTransTo(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr target,
int from) {
if (target->maxTransTo == 0) {
@ -1344,7 +1344,7 @@ xmlRegStateAddTransTo(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr target,
target->nbTransTo++;
}
static void
static void
xmlRegStateAddTrans(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state,
xmlRegAtomPtr atom, xmlRegStatePtr target,
int counter, int count) {
@ -1410,7 +1410,7 @@ xmlRegStateAddTrans(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr state,
printf("counted %d\n", counter);
else if (atom == NULL)
printf("epsilon transition\n");
else if (atom != NULL)
else if (atom != NULL)
xmlRegPrintAtom(stdout, atom);
#endif
@ -1564,7 +1564,7 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
*/
xmlFAGenerateEpsilonTransition(ctxt, atom->stop, to);
#ifdef DV
} else if ((to == NULL) && (atom->quant != XML_REGEXP_QUANT_RANGE) &&
} else if ((to == NULL) && (atom->quant != XML_REGEXP_QUANT_RANGE) &&
(atom->quant != XML_REGEXP_QUANT_ONCE)) {
to = xmlRegNewState(ctxt);
xmlRegStatePush(ctxt, to);
@ -1578,7 +1578,7 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
/*
* transition done to the state after end of atom.
* 1. set transition from atom start to new state
* 2. set transition from atom end to this state.
* 2. set transition from atom end to this state.
*/
if (to == NULL) {
xmlFAGenerateEpsilonTransition(ctxt, atom->start, 0);
@ -1622,7 +1622,7 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
/*
* duplicate a transition based on atom to count next
* occurences after 1. We cannot loop to atom->start
* directly because we need an epsilon transition to
* directly because we need an epsilon transition to
* newstate.
*/
/* ???? For some reason it seems we never reach that
@ -1681,7 +1681,7 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
break;
}
return(0);
}
}
if ((atom->min == 0) && (atom->max == 0) &&
(atom->quant == XML_REGEXP_QUANT_RANGE)) {
/*
@ -1707,9 +1707,9 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
else {
return(-1);
}
}
}
end = to;
if ((atom->quant == XML_REGEXP_QUANT_MULT) ||
if ((atom->quant == XML_REGEXP_QUANT_MULT) ||
(atom->quant == XML_REGEXP_QUANT_PLUS)) {
/*
* Do not pollute the target state by adding transitions from
@ -1717,7 +1717,7 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
* So isolate with an epsilon transition.
*/
xmlRegStatePtr tmp;
tmp = xmlRegNewState(ctxt);
if (tmp != NULL)
xmlRegStatePush(ctxt, tmp);
@ -1746,7 +1746,7 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
atom->quant = XML_REGEXP_QUANT_ONCE;
xmlRegStateAddTrans(ctxt, to, atom, to, -1, -1);
break;
case XML_REGEXP_QUANT_RANGE:
case XML_REGEXP_QUANT_RANGE:
#if DV_test
if (atom->min == 0) {
xmlFAGenerateEpsilonTransition(ctxt, from, to);
@ -1763,7 +1763,7 @@ xmlFAGenerateTransitions(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from,
* xmlFAReduceEpsilonTransitions:
* @ctxt: a regexp parser context
* @fromnr: the from state
* @tonr: the to state
* @tonr: the to state
* @counter: should that transition be associated to a counted
*
*/
@ -1807,7 +1807,7 @@ xmlFAReduceEpsilonTransitions(xmlRegParserCtxtPtr ctxt, int fromnr,
int newto = to->trans[transnr].to;
xmlRegStateAddTrans(ctxt, from, NULL,
ctxt->states[newto],
ctxt->states[newto],
-1, to->trans[transnr].count);
} else {
#ifdef DEBUG_REGEXP_GRAPH
@ -1829,11 +1829,11 @@ xmlFAReduceEpsilonTransitions(xmlRegParserCtxtPtr ctxt, int fromnr,
int newto = to->trans[transnr].to;
if (to->trans[transnr].counter >= 0) {
xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom,
ctxt->states[newto],
xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom,
ctxt->states[newto],
to->trans[transnr].counter, -1);
} else {
xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom,
xmlRegStateAddTrans(ctxt, from, to->trans[transnr].atom,
ctxt->states[newto], counter, -1);
}
}
@ -1845,7 +1845,7 @@ xmlFAReduceEpsilonTransitions(xmlRegParserCtxtPtr ctxt, int fromnr,
* xmlFAEliminateSimpleEpsilonTransitions:
* @ctxt: a regexp parser context
*
* Eliminating general epsilon transitions can get costly in the general
* Eliminating general epsilon transitions can get costly in the general
* algorithm due to the large amount of generated new transitions and
* associated comparisons. However for simple epsilon transition used just
* to separate building blocks when generating the automata this can be
@ -1881,12 +1881,12 @@ xmlFAEliminateSimpleEpsilonTransitions(xmlRegParserCtxtPtr ctxt) {
#ifdef DEBUG_REGEXP_GRAPH
printf("Found simple epsilon trans from start %d to %d\n",
statenr, newto);
#endif
#endif
} else {
#ifdef DEBUG_REGEXP_GRAPH
printf("Found simple epsilon trans from %d to %d\n",
statenr, newto);
#endif
#endif
for (i = 0;i < state->nbTransTo;i++) {
tmp = ctxt->states[state->transTo[i]];
for (j = 0;j < tmp->nbTrans;j++) {
@ -1894,10 +1894,10 @@ xmlFAEliminateSimpleEpsilonTransitions(xmlRegParserCtxtPtr ctxt) {
#ifdef DEBUG_REGEXP_GRAPH
printf("Changed transition %d on %d to go to %d\n",
j, tmp->no, newto);
#endif
#endif
tmp->trans[j].to = -1;
xmlRegStateAddTrans(ctxt, tmp, tmp->trans[j].atom,
ctxt->states[newto],
ctxt->states[newto],
tmp->trans[j].counter,
tmp->trans[j].count);
}
@ -1911,7 +1911,7 @@ xmlFAEliminateSimpleEpsilonTransitions(xmlRegParserCtxtPtr ctxt) {
state->type = XML_REGEXP_UNREACH_STATE;
}
}
}
}
@ -2113,7 +2113,7 @@ xmlFACompareRanges(xmlRegRangePtr range1, xmlRegRangePtr range2) {
/*
* just check all codepoints in the range for acceptance,
* this is usually way cheaper since done only once at
* compilation than testing over and over at runtime or
* compilation than testing over and over at runtime or
* pushing too many states when evaluating.
*/
if (((range1->neg == 0) && (range2->neg != 0)) ||
@ -2781,9 +2781,9 @@ xmlFAComputesDeterminism(xmlRegParserCtxtPtr ctxt) {
}
/************************************************************************
* *
* *
* Routines to check input against transition atoms *
* *
* *
************************************************************************/
static int
@ -2812,7 +2812,7 @@ xmlRegCheckCharacterRange(xmlRegAtomType type, int codepoint, int neg,
case XML_REGEXP_NOTINITNAME:
neg = !neg;
case XML_REGEXP_INITNAME:
ret = (IS_LETTER(codepoint) ||
ret = (IS_LETTER(codepoint) ||
(codepoint == '_') || (codepoint == ':'));
break;
case XML_REGEXP_NOTNAMECHAR:
@ -3060,9 +3060,9 @@ xmlRegCheckCharacter(xmlRegAtomPtr atom, int codepoint) {
}
/************************************************************************
* *
* *
* Saving and restoring state of an execution context *
* *
* *
************************************************************************/
#ifdef DEBUG_REGEXP_EXEC
@ -3173,9 +3173,9 @@ xmlFARegExecRollBack(xmlRegExecCtxtPtr exec) {
}
/************************************************************************
* *
* *
* Verifier, running an input against a compiled regexp *
* *
* *
************************************************************************/
static int
@ -3476,9 +3476,9 @@ error:
}
/************************************************************************
* *
* *
* Progressive interface to the verifier one atom at a time *
* *
* *
************************************************************************/
#ifdef DEBUG_ERR
static void testerr(xmlRegExecCtxtPtr exec);
@ -3595,7 +3595,7 @@ xmlFARegExecSaveInputString(xmlRegExecCtxtPtr exec, const xmlChar *value,
#endif
if (exec->inputStackMax == 0) {
exec->inputStackMax = 4;
exec->inputStack = (xmlRegInputTokenPtr)
exec->inputStack = (xmlRegInputTokenPtr)
xmlMalloc(exec->inputStackMax * sizeof(xmlRegInputToken));
if (exec->inputStack == NULL) {
xmlRegexpErrMemory(NULL, "pushing input string");
@ -3624,11 +3624,11 @@ xmlFARegExecSaveInputString(xmlRegExecCtxtPtr exec, const xmlChar *value,
/**
* xmlRegStrEqualWildcard:
* @expStr: the string to be evaluated
* @expStr: the string to be evaluated
* @valStr: the validation string
*
* Checks if both strings are equal or have the same content. "*"
* can be used as a wildcard in @valStr; "|" is used as a seperator of
* can be used as a wildcard in @valStr; "|" is used as a seperator of
* substrings in both @expStr and @valStr.
*
* Returns 1 if the comparison is satisfied and the number of substrings
@ -3694,7 +3694,7 @@ xmlRegCompactPushString(xmlRegExecCtxtPtr exec,
if ((comp == NULL) || (comp->compact == NULL) || (comp->stringMap == NULL))
return(-1);
if (value == NULL) {
/*
* are we at a final state ?
@ -3715,9 +3715,9 @@ xmlRegCompactPushString(xmlRegExecCtxtPtr exec,
for (i = 0;i < comp->nbstrings;i++) {
target = comp->compact[state * (comp->nbstrings + 1) + i + 1];
if ((target > 0) && (target <= comp->nbstates)) {
target--; /* to avoid 0 */
target--; /* to avoid 0 */
if (xmlRegStrEqualWildcard(comp->stringMap[i], value)) {
exec->index = target;
exec->index = target;
if ((exec->callback != NULL) && (comp->transdata != NULL)) {
exec->callback(exec->data, value,
comp->transdata[state * comp->nbstrings + i], data);
@ -3851,7 +3851,7 @@ xmlRegExecPushStringInternal(xmlRegExecCtxtPtr exec, const xmlChar *value,
continue;
counter = &exec->comp->counters[t->counter];
count = exec->counts[t->counter];
if ((count < counter->max) &&
if ((count < counter->max) &&
(t->atom != NULL) &&
(xmlStrEqual(value, t->atom->valuep))) {
ret = 0;
@ -4209,7 +4209,7 @@ xmlRegExecGetValues(xmlRegExecCtxtPtr exec, int err,
int maxval;
int nb = 0;
if ((exec == NULL) || (nbval == NULL) || (nbneg == NULL) ||
if ((exec == NULL) || (nbval == NULL) || (nbneg == NULL) ||
(values == NULL) || (*nbval <= 0))
return(-1);
@ -4315,7 +4315,7 @@ xmlRegExecGetValues(xmlRegExecCtxtPtr exec, int err,
values[nb++] = (xmlChar *) atom->valuep;
(*nbval)++;
}
}
}
}
for (transno = 0;
(transno < state->nbTrans) && (nb < maxval);
@ -4342,7 +4342,7 @@ xmlRegExecGetValues(xmlRegExecCtxtPtr exec, int err,
values[nb++] = (xmlChar *) atom->valuep;
(*nbneg)++;
}
}
}
}
}
return(0);
@ -4573,10 +4573,10 @@ progress:
}
#endif
/************************************************************************
* *
* *
* Parser for the Schemas Datatype Regular Expressions *
* http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#regexs *
* *
* *
************************************************************************/
/**
@ -4605,7 +4605,7 @@ xmlFAIsChar(xmlRegParserCtxtPtr ctxt) {
*
* [27] charProp ::= IsCategory | IsBlock
* [28] IsCategory ::= Letters | Marks | Numbers | Punctuation |
* Separators | Symbols | Others
* Separators | Symbols | Others
* [29] Letters ::= 'L' [ultmo]?
* [30] Marks ::= 'M' [nce]?
* [31] Numbers ::= 'N' [dlo]?
@ -4620,7 +4620,7 @@ xmlFAParseCharProp(xmlRegParserCtxtPtr ctxt) {
int cur;
xmlRegAtomType type = (xmlRegAtomType) 0;
xmlChar *blockName = NULL;
cur = CUR;
if (cur == 'L') {
NEXT;
@ -4792,15 +4792,15 @@ xmlFAParseCharProp(xmlRegParserCtxtPtr ctxt) {
NEXT;
start = ctxt->cur;
cur = CUR;
if (((cur >= 'a') && (cur <= 'z')) ||
((cur >= 'A') && (cur <= 'Z')) ||
((cur >= '0') && (cur <= '9')) ||
if (((cur >= 'a') && (cur <= 'z')) ||
((cur >= 'A') && (cur <= 'Z')) ||
((cur >= '0') && (cur <= '9')) ||
(cur == 0x2D)) {
NEXT;
cur = CUR;
while (((cur >= 'a') && (cur <= 'z')) ||
((cur >= 'A') && (cur <= 'Z')) ||
((cur >= '0') && (cur <= '9')) ||
while (((cur >= 'a') && (cur <= 'z')) ||
((cur >= 'A') && (cur <= 'Z')) ||
((cur >= '0') && (cur <= '9')) ||
(cur == 0x2D)) {
NEXT;
cur = CUR;
@ -4826,7 +4826,7 @@ xmlFAParseCharProp(xmlRegParserCtxtPtr ctxt) {
* xmlFAParseCharClassEsc:
* @ctxt: a regexp parser context
*
* [23] charClassEsc ::= ( SingleCharEsc | MultiCharEsc | catEsc | complEsc )
* [23] charClassEsc ::= ( SingleCharEsc | MultiCharEsc | catEsc | complEsc )
* [24] SingleCharEsc ::= '\' [nrt\|.?*+(){}#x2D#x5B#x5D#x5E]
* [25] catEsc ::= '\p{' charProp '}'
* [26] complEsc ::= '\P{' charProp '}'
@ -4923,34 +4923,34 @@ xmlFAParseCharClassEsc(xmlRegParserCtxtPtr ctxt) {
xmlRegAtomType type = XML_REGEXP_ANYSPACE;
switch (cur) {
case 's':
case 's':
type = XML_REGEXP_ANYSPACE;
break;
case 'S':
case 'S':
type = XML_REGEXP_NOTSPACE;
break;
case 'i':
case 'i':
type = XML_REGEXP_INITNAME;
break;
case 'I':
case 'I':
type = XML_REGEXP_NOTINITNAME;
break;
case 'c':
case 'c':
type = XML_REGEXP_NAMECHAR;
break;
case 'C':
case 'C':
type = XML_REGEXP_NOTNAMECHAR;
break;
case 'd':
case 'd':
type = XML_REGEXP_DECIMAL;
break;
case 'D':
case 'D':
type = XML_REGEXP_NOTDECIMAL;
break;
case 'w':
case 'w':
type = XML_REGEXP_REALCHAR;
break;
case 'W':
case 'W':
type = XML_REGEXP_NOTREALCHAR;
break;
}
@ -4970,7 +4970,7 @@ xmlFAParseCharClassEsc(xmlRegParserCtxtPtr ctxt) {
* xmlFAParseCharRange:
* @ctxt: a regexp parser context
*
* [17] charRange ::= seRange | XmlCharRef | XmlCharIncDash
* [17] charRange ::= seRange | XmlCharRef | XmlCharIncDash
* [18] seRange ::= charOrEsc '-' charOrEsc
* [20] charOrEsc ::= XmlChar | SingleCharEsc
* [21] XmlChar ::= [^\#x2D#x5B#x5D]
@ -5085,7 +5085,7 @@ xmlFAParsePosCharGroup(xmlRegParserCtxtPtr ctxt) {
*
* [13] charGroup ::= posCharGroup | negCharGroup | charClassSub
* [15] negCharGroup ::= '^' posCharGroup
* [16] charClassSub ::= ( posCharGroup | negCharGroup ) '-' charClassExpr
* [16] charClassSub ::= ( posCharGroup | negCharGroup ) '-' charClassExpr
* [12] charClassExpr ::= '[' charGroup ']'
*/
static void
@ -5333,7 +5333,7 @@ xmlFAParseBranch(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr to) {
previous = ctxt->state;
ret = xmlFAParsePiece(ctxt);
if (ret != 0) {
if (xmlFAGenerateTransitions(ctxt, previous,
if (xmlFAGenerateTransitions(ctxt, previous,
(CUR=='|' || CUR==')') ? to : NULL, ctxt->atom) < 0)
return(-1);
previous = ctxt->state;
@ -5342,7 +5342,7 @@ xmlFAParseBranch(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr to) {
while ((ret != 0) && (ctxt->error == 0)) {
ret = xmlFAParsePiece(ctxt);
if (ret != 0) {
if (xmlFAGenerateTransitions(ctxt, previous,
if (xmlFAGenerateTransitions(ctxt, previous,
(CUR=='|' || CUR==')') ? to : NULL, ctxt->atom) < 0)
return(-1);
previous = ctxt->state;
@ -5395,9 +5395,9 @@ xmlFAParseRegExp(xmlRegParserCtxtPtr ctxt, int top) {
}
/************************************************************************
* *
* The basic API *
* *
* *
* The basic API *
* *
************************************************************************/
/**
@ -5584,9 +5584,9 @@ xmlRegFreeRegexp(xmlRegexpPtr regexp) {
#ifdef LIBXML_AUTOMATA_ENABLED
/************************************************************************
* *
* The Automata interface *
* *
* *
* The Automata interface *
* *
************************************************************************/
/**
@ -5857,7 +5857,7 @@ xmlAutomataNewNegTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
*
* If @to is NULL, this creates first a new target state in the automata
* and then adds a transition from the @from state to the target state
* activated by a succession of input of value @token and @token2 and
* activated by a succession of input of value @token and @token2 and
* whose number is between @min and @max
*
* Returns the target state or NULL in case of error
@ -6011,8 +6011,8 @@ xmlAutomataNewCountTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
*
* If @to is NULL, this creates first a new target state in the automata
* and then adds a transition from the @from state to the target state
* activated by a succession of input of value @token and @token2 and whose
* number is between @min and @max, moreover that transition can only be
* activated by a succession of input of value @token and @token2 and whose
* number is between @min and @max, moreover that transition can only be
* crossed once.
*
* Returns the target state or NULL in case of error
@ -6054,7 +6054,7 @@ xmlAutomataNewOnceTrans2(xmlAutomataPtr am, xmlAutomataStatePtr from,
str[lenn + lenp + 1] = 0;
atom->valuep = str;
}
}
atom->data = data;
atom->quant = XML_REGEXP_QUANT_ONCEONLY;
atom->min = min;
@ -6077,7 +6077,7 @@ xmlAutomataNewOnceTrans2(xmlAutomataPtr am, xmlAutomataStatePtr from,
return(to);
}
/**
* xmlAutomataNewOnceTrans:
@ -6146,7 +6146,7 @@ xmlAutomataNewOnceTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
*/
xmlAutomataStatePtr
xmlAutomataNewState(xmlAutomataPtr am) {
xmlAutomataStatePtr to;
xmlAutomataStatePtr to;
if (am == NULL)
return(NULL);
@ -6213,7 +6213,7 @@ xmlAutomataNewAllTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
*
* Returns the counter number or -1 in case of error
*/
int
int
xmlAutomataNewCounter(xmlAutomataPtr am, int min, int max) {
int ret;
@ -6285,7 +6285,7 @@ xmlAutomataNewCounterTrans(xmlAutomataPtr am, xmlAutomataStatePtr from,
*
* Returns the compiled regexp or NULL in case of error
*/
xmlRegexpPtr
xmlRegexpPtr
xmlAutomataCompile(xmlAutomataPtr am) {
xmlRegexpPtr ret;
@ -6305,7 +6305,7 @@ xmlAutomataCompile(xmlAutomataPtr am) {
*
* Returns 1 if true, 0 if not, and -1 in case of error
*/
int
int
xmlAutomataIsDeterminist(xmlAutomataPtr am) {
int ret;
@ -6358,7 +6358,7 @@ xmlExpNewCtxt(int maxNodes, xmlDictPtr dict) {
if (maxNodes <= 4096)
maxNodes = 4096;
ret = (xmlExpCtxtPtr) xmlMalloc(sizeof(xmlExpCtxt));
if (ret == NULL)
return(NULL);
@ -6412,7 +6412,7 @@ xmlExpFreeCtxt(xmlExpCtxtPtr ctxt) {
/* #define DEBUG_DERIV */
/*
* TODO:
* TODO:
* - Wildcards
* - public API for creation
*
@ -6480,7 +6480,7 @@ static unsigned short
xmlExpHashNameComputeKey(const xmlChar *name) {
unsigned short value = 0L;
char ch;
if (name != NULL) {
value += 30 * (*name);
while ((ch = *name++) != 0) {
@ -6499,7 +6499,7 @@ xmlExpHashComputeKey(xmlExpNodeType type, xmlExpNodePtr left,
xmlExpNodePtr right) {
unsigned long value;
unsigned short ret;
switch (type) {
case XML_EXP_SEQ:
value = left->key;
@ -6640,7 +6640,7 @@ xmlExpHashGetEntry(xmlExpCtxtPtr ctxt, xmlExpNodeType type,
left->exp_left->ref++;
tmp = xmlExpHashGetEntry(ctxt, XML_EXP_OR, left->exp_left, tmp,
NULL, 0, 0);
xmlExpFree(ctxt, left);
return(tmp);
}
@ -6697,7 +6697,7 @@ xmlExpHashGetEntry(xmlExpCtxtPtr ctxt, xmlExpNodeType type,
return(right);
}
kbase = xmlExpHashComputeKey(type, left, right);
} else
} else
return(NULL);
key = kbase % ctxt->size;
@ -6938,7 +6938,7 @@ xmlExpNewRange(xmlExpCtxtPtr ctxt, xmlExpNodePtr subset, int min, int max) {
************************************************************************/
static int
xmlExpGetLanguageInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
xmlExpGetLanguageInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
const xmlChar**list, int len, int nb) {
int tmp, tmp2;
tail:
@ -6983,7 +6983,7 @@ tail:
* -2 if there is more than @len strings
*/
int
xmlExpGetLanguage(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
xmlExpGetLanguage(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
const xmlChar**langList, int len) {
if ((ctxt == NULL) || (exp == NULL) || (langList == NULL) || (len <= 0))
return(-1);
@ -6991,7 +6991,7 @@ xmlExpGetLanguage(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
}
static int
xmlExpGetStartInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
xmlExpGetStartInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
const xmlChar**list, int len, int nb) {
int tmp, tmp2;
tail:
@ -7051,7 +7051,7 @@ tail:
* -2 if there is more than @len strings
*/
int
xmlExpGetStart(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
xmlExpGetStart(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp,
const xmlChar**tokList, int len) {
if ((ctxt == NULL) || (exp == NULL) || (tokList == NULL) || (len <= 0))
return(-1);
@ -7748,7 +7748,7 @@ xmlExpExpDeriveInt(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) {
xmlFree((xmlChar **) tab);
return(ret);
}
/**
* xmlExpExpDerive:
* @ctxt: the expressions context
@ -7800,7 +7800,7 @@ xmlExpExpDerive(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) {
int
xmlExpSubsume(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) {
xmlExpNodePtr tmp;
if ((exp == NULL) || (ctxt == NULL) || (sub == NULL))
return(-1);
@ -7844,7 +7844,7 @@ xmlExpSubsume(xmlExpCtxtPtr ctxt, xmlExpNodePtr exp, xmlExpNodePtr sub) {
/************************************************************************
* *
* Parsing expression *
* Parsing expression *
* *
************************************************************************/
@ -7948,7 +7948,7 @@ parse_quantifier:
ret = xmlExpHashGetEntry(ctxt, XML_EXP_COUNT, ret, NULL, NULL,
0, -1);
SKIP_BLANKS
}
}
return(ret);
}
@ -8070,7 +8070,7 @@ xmlExpDumpInt(xmlBufferPtr buf, xmlExpNodePtr expr, int glob) {
break;
case XML_EXP_COUNT: {
char rep[40];
c = expr->exp_left;
if ((c->type == XML_EXP_SEQ) || (c->type == XML_EXP_OR))
xmlExpDumpInt(buf, c, 1);

View File

@ -70,7 +70,7 @@ xmlIsXHTML(const xmlChar *systemID, const xmlChar *publicID) {
#ifdef LIBXML_OUTPUT_ENABLED
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
@ -96,7 +96,7 @@ struct _xmlSaveCtxt {
/************************************************************************
* *
* Output error handlers *
* Output error handlers *
* *
************************************************************************/
/**
@ -214,9 +214,9 @@ xmlEscapeEntities(unsigned char* out, int *outlen,
int val;
inend = in + (*inlen);
while ((in < inend) && (out < outend)) {
if (*in == '<') {
if (*in == '<') {
if (outend - out < 4) break;
*out++ = '&';
*out++ = 'l';
@ -420,7 +420,7 @@ xmlNewSaveCtxt(const char *encoding, int options)
/************************************************************************
* *
* Dumping XML tree content to a simple buffer *
* Dumping XML tree content to a simple buffer *
* *
************************************************************************/
/**
@ -549,7 +549,7 @@ xmlBufDumpEntityDecl(xmlBufPtr buf, xmlEntityPtr ent) {
/************************************************************************
* *
* Dumping XML tree content to an I/O output buffer *
* Dumping XML tree content to an I/O output buffer *
* *
************************************************************************/
@ -700,7 +700,7 @@ xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur) {
* xmlDtdDumpOutput:
* @buf: the XML buffer output
* @dtd: the pointer to the DTD
*
*
* Dump the XML document DTD, if any.
*/
static void
@ -819,7 +819,7 @@ xmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
(cur->type == XML_COMMENT_NODE) ||
(cur->type == XML_PI_NODE)))
xmlOutputBufferWrite(buf, ctxt->indent_size *
(ctxt->level > ctxt->indent_nr ?
(ctxt->level > ctxt->indent_nr ?
ctxt->indent_nr : ctxt->level),
ctxt->indent);
xmlNodeDumpOutputInternal(ctxt, cur);
@ -1075,7 +1075,7 @@ xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
if (ctxt->level > 0) ctxt->level--;
if ((xmlIndentTreeOutput) && (ctxt->format == 1))
xmlOutputBufferWrite(buf, ctxt->indent_size *
(ctxt->level > ctxt->indent_nr ?
(ctxt->level > ctxt->indent_nr ?
ctxt->indent_nr : ctxt->level),
ctxt->indent);
}
@ -1191,7 +1191,7 @@ xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur) {
*/
if ((ctxt->options & XML_SAVE_NO_DECL) == 0) {
xmlOutputBufferWrite(buf, 14, "<?xml version=");
if (cur->version != NULL)
if (cur->version != NULL)
xmlBufWriteQuotedString(buf->buffer, cur->version);
else
xmlOutputBufferWrite(buf, 5, "\"1.0\"");
@ -1355,7 +1355,7 @@ xhtmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) {
if ((cur->ns != NULL) && (xmlStrEqual(cur->name, BAD_CAST "lang")) &&
(xmlStrEqual(cur->ns->prefix, BAD_CAST "xml")))
xml_lang = cur;
else if ((cur->ns == NULL) &&
else if ((cur->ns == NULL) &&
((cur->children == NULL) ||
(cur->children->content == NULL) ||
(cur->children->content[0] == 0)) &&
@ -1395,7 +1395,7 @@ xhtmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) {
xmlOutputBufferWrite(buf, 11, " xml:lang=\"");
xmlAttrSerializeContent(buf, lang);
xmlOutputBufferWrite(buf, 1, "\"");
} else
} else
if ((xml_lang != NULL) && (lang == NULL)) {
xmlOutputBufferWrite(buf, 7, " lang=\"");
xmlAttrSerializeContent(buf, xml_lang);
@ -1426,7 +1426,7 @@ xhtmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
if ((ctxt->format == 1) && (xmlIndentTreeOutput) &&
(cur->type == XML_ELEMENT_NODE))
xmlOutputBufferWrite(buf, ctxt->indent_size *
(ctxt->level > ctxt->indent_nr ?
(ctxt->level > ctxt->indent_nr ?
ctxt->indent_nr : ctxt->level),
ctxt->indent);
xhtmlNodeDumpOutput(ctxt, cur);
@ -1567,7 +1567,7 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
if (format == 1) {
tmp = cur->children;
while (tmp != NULL) {
if ((tmp->type == XML_TEXT_NODE) ||
if ((tmp->type == XML_TEXT_NODE) ||
(tmp->type == XML_ENTITY_REF_NODE)) {
format = 0;
break;
@ -1595,10 +1595,10 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
if (cur->properties != NULL)
xhtmlAttrListDumpOutput(ctxt, cur->properties);
if ((cur->type == XML_ELEMENT_NODE) &&
(cur->parent != NULL) &&
(cur->parent->parent == (xmlNodePtr) cur->doc) &&
xmlStrEqual(cur->name, BAD_CAST"head") &&
if ((cur->type == XML_ELEMENT_NODE) &&
(cur->parent != NULL) &&
(cur->parent->parent == (xmlNodePtr) cur->doc) &&
xmlStrEqual(cur->name, BAD_CAST"head") &&
xmlStrEqual(cur->parent->name, BAD_CAST"html")) {
tmp = cur->children;
@ -1635,7 +1635,7 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
xmlOutputBufferWrite(buf, 1, "\n");
if (xmlIndentTreeOutput)
xmlOutputBufferWrite(buf, ctxt->indent_size *
(ctxt->level + 1 > ctxt->indent_nr ?
(ctxt->level + 1 > ctxt->indent_nr ?
ctxt->indent_nr : ctxt->level + 1), ctxt->indent);
}
xmlOutputBufferWriteString(buf,
@ -1670,7 +1670,7 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
xmlOutputBufferWrite(buf, 1, "\n");
if (xmlIndentTreeOutput)
xmlOutputBufferWrite(buf, ctxt->indent_size *
(ctxt->level + 1 > ctxt->indent_nr ?
(ctxt->level + 1 > ctxt->indent_nr ?
ctxt->indent_nr : ctxt->level + 1), ctxt->indent);
}
xmlOutputBufferWriteString(buf,
@ -1760,7 +1760,7 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
if (cur->children != NULL) {
int indent = ctxt->format;
if (format == 1) xmlOutputBufferWrite(buf, 1, "\n");
if (ctxt->level >= 0) ctxt->level++;
ctxt->format = format;
@ -1769,7 +1769,7 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
ctxt->format = indent;
if ((xmlIndentTreeOutput) && (format == 1))
xmlOutputBufferWrite(buf, ctxt->indent_size *
(ctxt->level > ctxt->indent_nr ?
(ctxt->level > ctxt->indent_nr ?
ctxt->indent_nr : ctxt->level),
ctxt->indent);
}
@ -2708,7 +2708,7 @@ xmlSaveFormatFileEnc( const char * filename, xmlDocPtr cur,
#ifdef HAVE_ZLIB_H
if (cur->compression < 0) cur->compression = xmlGetCompressMode();
#endif
/*
/*
* save the content to a temp buffer.
*/
buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression);

View File

@ -107,7 +107,7 @@
#endif
#define UNBOUNDED (1 << 30)
#define TODO \
#define TODO \
xmlGenericError(xmlGenericErrorContext, \
"Unimplemented block at %s:%d\n", \
__FILE__, __LINE__);
@ -1048,9 +1048,9 @@ struct _xmlSchemaSubstGroup {
};
/************************************************************************
* *
* Some predeclarations *
* *
* *
* Some predeclarations *
* *
************************************************************************/
static int xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt,
@ -1103,7 +1103,7 @@ xmlSchemaParseAttributeGroupRef(xmlSchemaParserCtxtPtr pctxt,
/************************************************************************
* *
* Helper functions *
* Helper functions *
* *
************************************************************************/
@ -1841,7 +1841,7 @@ xmlSchemaFormatFacetEnumSet(xmlSchemaAbstractCtxtPtr actxt,
/************************************************************************
* *
* Error functions *
* Error functions *
* *
************************************************************************/
@ -1979,7 +1979,7 @@ xmlSchemaPErrExt(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, int error,
/************************************************************************
* *
* Allround error functions *
* Allround error functions *
* *
************************************************************************/
@ -3218,25 +3218,25 @@ xmlSchemaPContentErr(xmlSchemaParserCtxtPtr ctxt,
}
/************************************************************************
* *
* Streamable error functions *
* *
* *
* Streamable error functions *
* *
************************************************************************/
/************************************************************************
* *
* Validation helper functions *
* *
* *
* Validation helper functions *
* *
************************************************************************/
/************************************************************************
* *
* Allocation functions *
* *
* *
* Allocation functions *
* *
************************************************************************/
/**
@ -4154,9 +4154,9 @@ xmlSchemaFree(xmlSchemaPtr schema)
}
/************************************************************************
* *
* Debug functions *
* *
* *
* Debug functions *
* *
************************************************************************/
#ifdef LIBXML_OUTPUT_ENABLED
@ -4606,7 +4606,7 @@ xmlSchemaDebugDumpIDCTable(FILE * output,
/************************************************************************
* *
* Utilities *
* Utilities *
* *
************************************************************************/
@ -4711,9 +4711,9 @@ xmlSchemaGetProp(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node,
}
/************************************************************************
* *
* Parsing functions *
* *
* *
* Parsing functions *
* *
************************************************************************/
#define WXS_FIND_GLOBAL_ITEM(slot) \
@ -4985,9 +4985,9 @@ xmlSchemaGetNamedComponent(xmlSchemaPtr schema,
}
/************************************************************************
* *
* Parsing functions *
* *
* *
* Parsing functions *
* *
************************************************************************/
#define IS_BLANK_NODE(n) \
@ -5762,9 +5762,9 @@ xmlSchemaAddElementSubstitutionMember(xmlSchemaParserCtxtPtr pctxt,
}
/************************************************************************
* *
* *
* Utilities for parsing *
* *
* *
************************************************************************/
/**
@ -5958,7 +5958,7 @@ xmlSchemaPValAttrNodeID(xmlSchemaParserCtxtPtr ctxt, xmlAttrPtr attr)
xmlFree((xmlChar *) value);
value = strip;
}
res = xmlAddID(NULL, attr->doc, value, attr);
res = xmlAddID(NULL, attr->doc, value, attr);
if (res == NULL) {
ret = XML_SCHEMAP_S4S_ATTR_INVALID_VALUE;
xmlSchemaPSimpleTypeErr(ctxt,
@ -6210,9 +6210,9 @@ xmlGetBooleanProp(xmlSchemaParserCtxtPtr ctxt,
}
/************************************************************************
* *
* *
* Shema extraction from an Infoset *
* *
* *
************************************************************************/
static xmlSchemaTypePtr xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr
ctxt, xmlSchemaPtr schema,
@ -8246,7 +8246,7 @@ xmlSchemaParseIDCSelectorAndField(xmlSchemaParserCtxtPtr ctxt,
*/
attr = xmlSchemaGetPropNode(node, "xpath");
if (attr == NULL) {
xmlSchemaPMissingAttrErr(ctxt,
xmlSchemaPMissingAttrErr(ctxt,
XML_SCHEMAP_S4S_ATTR_MISSING,
NULL, node,
"name", NULL);
@ -12372,15 +12372,15 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
}
/************************************************************************
* *
* Validating using Schemas *
* *
* *
* Validating using Schemas *
* *
************************************************************************/
/************************************************************************
* *
* Reading/Writing Schemas *
* *
* *
* Reading/Writing Schemas *
* *
************************************************************************/
#if 0 /* Will be enabled if it is clear what options are needed. */
@ -20181,7 +20181,7 @@ xmlSchemaResolveAttrUseReferences(xmlSchemaAttributeUsePtr ause,
ref->name, ref->targetNamespace);
if (ause->attrDecl == NULL) {
xmlSchemaPResCompAttrErr(ctxt,
XML_SCHEMAP_SRC_RESOLVE,
XML_SCHEMAP_SRC_RESOLVE,
WXS_BASIC_CAST ause, ause->node,
"ref", ref->name, ref->targetNamespace,
XML_SCHEMA_TYPE_ATTRIBUTE, NULL);
@ -21561,16 +21561,16 @@ xmlSchemaGetWhiteSpaceFacetValue(xmlSchemaTypePtr type)
}
/************************************************************************
* *
* Simple type validation *
* *
* *
* Simple type validation *
* *
************************************************************************/
/************************************************************************
* *
* DOM Validation code *
* *
* *
* DOM Validation code *
* *
************************************************************************/
/**
@ -21964,9 +21964,9 @@ xmlSchemaVAddNodeQName(xmlSchemaValidCtxtPtr vctxt,
}
/************************************************************************
* *
* *
* Validation of identity-constraints (IDC) *
* *
* *
************************************************************************/
/**
@ -23894,9 +23894,9 @@ xmlSchemaCheckCVCIDCKeyRef(xmlSchemaValidCtxtPtr vctxt)
}
/************************************************************************
* *
* XML Reader validation code *
* *
* *
* XML Reader validation code *
* *
************************************************************************/
static xmlSchemaAttrInfoPtr
@ -25016,9 +25016,9 @@ xmlSchemaValidateElemDecl(xmlSchemaValidCtxtPtr vctxt)
return (vctxt->err);
}
if (actualType == NULL) {
VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
"The type definition is absent");
return (XML_SCHEMAV_CVC_TYPE_1);
VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
"The type definition is absent");
return (XML_SCHEMAV_CVC_TYPE_1);
}
if (vctxt->nbAttrInfos != 0) {
int ret;
@ -25108,9 +25108,9 @@ xmlSchemaValidateElemDecl(xmlSchemaValidCtxtPtr vctxt)
* No actual type definition.
*/
if (actualType == NULL) {
VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
"The type definition is absent");
return (XML_SCHEMAV_CVC_TYPE_1);
VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
"The type definition is absent");
return (XML_SCHEMAV_CVC_TYPE_1);
}
/*
* Remember the actual type definition.
@ -26938,15 +26938,15 @@ type_validation:
if (vctxt->inode->typeDef == NULL) {
vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_ERR_BAD_TYPE;
ret = XML_SCHEMAV_CVC_TYPE_1;
VERROR(ret, NULL,
"The type definition is absent");
VERROR(ret, NULL,
"The type definition is absent");
goto exit;
}
if (vctxt->inode->typeDef->flags & XML_SCHEMAS_TYPE_ABSTRACT) {
vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_ERR_BAD_TYPE;
ret = XML_SCHEMAV_CVC_TYPE_2;
VERROR(ret, NULL,
"The type definition is abstract");
VERROR(ret, NULL,
"The type definition is abstract");
goto exit;
}
/*
@ -27193,9 +27193,9 @@ internal_error:
#endif
/************************************************************************
* *
* SAX validation handlers *
* *
* *
* SAX validation handlers *
* *
************************************************************************/
/*
@ -27446,9 +27446,9 @@ internal_error:
}
/************************************************************************
* *
* Validation interfaces *
* *
* *
* Validation interfaces *
* *
************************************************************************/
/**
@ -28167,9 +28167,9 @@ xmlSchemaValidateDoc(xmlSchemaValidCtxtPtr ctxt, xmlDocPtr doc)
/************************************************************************
* *
* Function and data for SAX streaming API *
* *
* *
* Function and data for SAX streaming API *
* *
************************************************************************/
typedef struct _xmlSchemaSplitSAXData xmlSchemaSplitSAXData;
typedef xmlSchemaSplitSAXData *xmlSchemaSplitSAXDataPtr;

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
*
* This module provides various utility functions for manipulating
* the xmlChar* type. All functions named xmlStr* have been moved here
* from the parser.c file (their original home).
* from the parser.c file (their original home).
*
* See Copyright for the status of this software.
*
@ -40,7 +40,7 @@
xmlChar *
xmlStrndup(const xmlChar *cur, int len) {
xmlChar *ret;
if ((cur == NULL) || (len < 0)) return(NULL);
ret = (xmlChar *) xmlMallocAtomic((len + 1) * sizeof(xmlChar));
if (ret == NULL) {
@ -85,7 +85,7 @@ xmlChar *
xmlCharStrndup(const char *cur, int len) {
int i;
xmlChar *ret;
if ((cur == NULL) || (len < 0)) return(NULL);
ret = (xmlChar *) xmlMallocAtomic((len + 1) * sizeof(xmlChar));
if (ret == NULL) {
@ -170,7 +170,7 @@ xmlStrEqual(const xmlChar *str1, const xmlChar *str2) {
* @name: the localname of the QName
* @str: the second xmlChar *
*
* Check if a QName is Equal to a given string
* Check if a QName is Equal to a given string
*
* Returns 1 if they are equal, 0 if they are different
*/
@ -340,7 +340,7 @@ xmlStrchr(const xmlChar *str, xmlChar val) {
const xmlChar *
xmlStrstr(const xmlChar *str, const xmlChar *val) {
int n;
if (str == NULL) return(NULL);
if (val == NULL) return(NULL);
n = xmlStrlen(val);
@ -368,7 +368,7 @@ xmlStrstr(const xmlChar *str, const xmlChar *val) {
const xmlChar *
xmlStrcasestr(const xmlChar *str, const xmlChar *val) {
int n;
if (str == NULL) return(NULL);
if (val == NULL) return(NULL);
n = xmlStrlen(val);
@ -396,7 +396,7 @@ xmlStrcasestr(const xmlChar *str, const xmlChar *val) {
xmlChar *
xmlStrsub(const xmlChar *str, int start, int len) {
int i;
if (str == NULL) return(NULL);
if (start < 0) return(NULL);
if (len < 0) return(NULL);
@ -519,7 +519,7 @@ xmlStrcat(xmlChar *cur, const xmlChar *add) {
const xmlChar *p = add;
if (add == NULL) return(cur);
if (cur == NULL)
if (cur == NULL)
return(xmlStrdup(add));
while (*p != 0) p++; /* non input consuming */
@ -537,20 +537,20 @@ xmlStrcat(xmlChar *cur, const xmlChar *add) {
*
* Returns the number of characters written to @buf or -1 if an error occurs.
*/
int XMLCDECL
int XMLCDECL
xmlStrPrintf(xmlChar *buf, int len, const xmlChar *msg, ...) {
va_list args;
int ret;
if((buf == NULL) || (msg == NULL)) {
return(-1);
}
va_start(args, msg);
ret = vsnprintf((char *) buf, len, (const char *) msg, args);
va_end(args);
buf[len - 1] = 0; /* be safe ! */
return(ret);
}
@ -565,17 +565,17 @@ xmlStrPrintf(xmlChar *buf, int len, const xmlChar *msg, ...) {
*
* Returns the number of characters written to @buf or -1 if an error occurs.
*/
int
int
xmlStrVPrintf(xmlChar *buf, int len, const xmlChar *msg, va_list ap) {
int ret;
if((buf == NULL) || (msg == NULL)) {
return(-1);
}
ret = vsnprintf((char *) buf, len, (const char *) msg, ap);
buf[len - 1] = 0; /* be safe ! */
return(ret);
}
@ -858,7 +858,7 @@ xmlChar *
xmlUTF8Strndup(const xmlChar *utf, int len) {
xmlChar *ret;
int i;
if ((utf == NULL) || (len < 0)) return(NULL);
i = xmlUTF8Strsize(utf, len);
ret = (xmlChar *) xmlMallocAtomic((i + 1) * sizeof(xmlChar));

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More