added the routine xmlNanoHTTPContentLength to the external API
* nanohttp.c, include/libxml/nanohttp.h: added the routine
xmlNanoHTTPContentLength to the external API (bug151968).
* parser.c: fixed unnecessary internal error message (bug152060);
also changed call to strncmp over to xmlStrncmp.
* encoding.c: fixed compilation warning (bug152307).
* tree.c: fixed segfault in xmlCopyPropList (bug152368); fixed
a couple of compilation warnings.
* HTMLtree.c, debugXML.c, xmlmemory.c: fixed a few compilation
warnings; no change to logic.
diff --git a/ChangeLog b/ChangeLog
index 877c493..357379a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Fri Sep 17 21:25:33 PDT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * nanohttp.c, include/libxml/nanohttp.h: added the routine
+ xmlNanoHTTPContentLength to the external API (bug151968).
+ * parser.c: fixed unnecessary internal error message (bug152060);
+ also changed call to strncmp over to xmlStrncmp.
+ * encoding.c: fixed compilation warning (bug152307).
+ * tree.c: fixed segfault in xmlCopyPropList (bug152368); fixed
+ a couple of compilation warnings.
+ * HTMLtree.c, debugXML.c, xmlmemory.c: fixed a few compilation
+ warnings; no change to logic.
+
Fri Sep 17 10:40:23 CEST 2004 Daniel Veillard <daniel@veillard.com>
* parser.c: removed some extern before function code reported by
diff --git a/HTMLtree.c b/HTMLtree.c
index 5724540..9a5d35f 100644
--- a/HTMLtree.c
+++ b/HTMLtree.c
@@ -170,7 +170,7 @@
if (encoding != NULL) {
snprintf(newcontent, sizeof(newcontent), "text/html; charset=%s",
- encoding);
+ (char *)encoding);
newcontent[sizeof(newcontent) - 1] = 0;
}
diff --git a/debugXML.c b/debugXML.c
index 71a8712..bb6560a 100644
--- a/debugXML.c
+++ b/debugXML.c
@@ -85,13 +85,13 @@
return;
}
if (dtd->name != NULL)
- fprintf(output, "DTD(%s)", dtd->name);
+ fprintf(output, "DTD(%s)", (char *)dtd->name);
else
fprintf(output, "DTD");
if (dtd->ExternalID != NULL)
- fprintf(output, ", PUBLIC %s", dtd->ExternalID);
+ fprintf(output, ", PUBLIC %s", (char *)dtd->ExternalID);
if (dtd->SystemID != NULL)
- fprintf(output, ", SYSTEM %s", dtd->SystemID);
+ fprintf(output, ", SYSTEM %s", (char *)dtd->SystemID);
fprintf(output, "\n");
/*
* Do a bit of checking
@@ -138,11 +138,11 @@
return;
}
if (attr->name != NULL)
- fprintf(output, "ATTRDECL(%s)", attr->name);
+ fprintf(output, "ATTRDECL(%s)", (char *)attr->name);
else
fprintf(output, "PBM ATTRDECL noname!!!");
if (attr->elem != NULL)
- fprintf(output, " for %s", attr->elem);
+ fprintf(output, " for %s", (char *)attr->elem);
else
fprintf(output, " PBM noelem!!!");
switch (attr->atype) {
@@ -183,9 +183,9 @@
for (indx = 0;indx < 5; indx++) {
if (indx != 0)
- fprintf(output, "|%s", cur->name);
+ fprintf(output, "|%s", (char *)cur->name);
else
- fprintf(output, " (%s", cur->name);
+ fprintf(output, " (%s", (char *)cur->name);
cur = cur->next;
if (cur == NULL) break;
}
@@ -364,15 +364,15 @@
}
if (ent->ExternalID) {
fprintf(output, shift);
- fprintf(output, " ExternalID=%s\n", ent->ExternalID);
+ fprintf(output, " ExternalID=%s\n", (char *)ent->ExternalID);
}
if (ent->SystemID) {
fprintf(output, shift);
- fprintf(output, " SystemID=%s\n", ent->SystemID);
+ fprintf(output, " SystemID=%s\n", (char *)ent->SystemID);
}
if (ent->URI != NULL) {
fprintf(output, shift);
- fprintf(output, " URI=%s\n", ent->URI);
+ fprintf(output, " URI=%s\n", (char *)ent->URI);
}
if (ent->content) {
fprintf(output, shift);
@@ -422,17 +422,18 @@
return;
}
if (ns->type != XML_NAMESPACE_DECL) {
- fprintf(output, "invalid namespace node %d\n", ns->type);
+ fprintf(output, "invalid namespace node %d\n", (char *)ns->type);
return;
}
if (ns->href == NULL) {
if (ns->prefix != NULL)
- fprintf(output, "incomplete namespace %s href=NULL\n", ns->prefix);
+ fprintf(output, "incomplete namespace %s href=NULL\n",
+ (char *)ns->prefix);
else
fprintf(output, "incomplete default namespace href=NULL\n");
} else {
if (ns->prefix != NULL)
- fprintf(output, "namespace %s href=", ns->prefix);
+ fprintf(output, "namespace %s href=", (char *)ns->prefix);
else
fprintf(output, "default namespace href=");
@@ -481,20 +482,20 @@
fprintf(output, "EXTERNAL_PARAMETER_ENTITY ");
break;
default:
- fprintf(output, "ENTITY_%d ! ", ent->etype);
+ fprintf(output, "ENTITY_%d ! ", (char *)ent->etype);
}
fprintf(output, "%s\n", ent->name);
if (ent->ExternalID) {
fprintf(output, shift);
- fprintf(output, "ExternalID=%s\n", ent->ExternalID);
+ fprintf(output, "ExternalID=%s\n", (char *)ent->ExternalID);
}
if (ent->SystemID) {
fprintf(output, shift);
- fprintf(output, "SystemID=%s\n", ent->SystemID);
+ fprintf(output, "SystemID=%s\n", (char *)ent->SystemID);
}
if (ent->URI) {
fprintf(output, shift);
- fprintf(output, "URI=%s\n", ent->URI);
+ fprintf(output, "URI=%s\n", (char *)ent->URI);
}
if (ent->content) {
fprintf(output, shift);
@@ -627,7 +628,7 @@
break;
case XML_ENTITY_REF_NODE:
fprintf(output, shift);
- fprintf(output, "ENTITY_REF(%s)\n", node->name);
+ fprintf(output, "ENTITY_REF(%s)\n", (char *)node->name);
break;
case XML_ENTITY_NODE:
fprintf(output, shift);
@@ -635,7 +636,7 @@
break;
case XML_PI_NODE:
fprintf(output, shift);
- fprintf(output, "PI %s\n", node->name);
+ fprintf(output, "PI %s\n", (char *)node->name);
break;
case XML_COMMENT_NODE:
fprintf(output, shift);
@@ -683,7 +684,7 @@
return;
default:
fprintf(output, shift);
- fprintf(output, "NODE_%d !!!\n", node->type);
+ fprintf(output, "NODE_%d !!!\n", (char *)node->type);
return;
}
if (node->doc == NULL) {
@@ -845,7 +846,7 @@
fprintf(output, "Error, NOTATION\n");
break;
default:
- fprintf(output, "NODE_%d\n", doc->type);
+ fprintf(output, "NODE_%d\n", (char *)doc->type);
}
if (doc->name != NULL) {
fprintf(output, "name=");
@@ -916,13 +917,13 @@
return;
}
if (dtd->name != NULL)
- fprintf(output, "DTD(%s)", dtd->name);
+ fprintf(output, "DTD(%s)", (char *)dtd->name);
else
fprintf(output, "DTD");
if (dtd->ExternalID != NULL)
- fprintf(output, ", PUBLIC %s", dtd->ExternalID);
+ fprintf(output, ", PUBLIC %s", (char *)dtd->ExternalID);
if (dtd->SystemID != NULL)
- fprintf(output, ", SYSTEM %s", dtd->SystemID);
+ fprintf(output, ", SYSTEM %s", (char *)dtd->SystemID);
fprintf(output, "\n");
/*
* Do a bit of checking
@@ -958,7 +959,7 @@
fprintf(output, "Entity is NULL");
return;
}
- fprintf(output, "%s : ", cur->name);
+ fprintf(output, "%s : ", (char *)cur->name);
switch (cur->etype) {
case XML_INTERNAL_GENERAL_ENTITY:
fprintf(output, "INTERNAL GENERAL, ");
@@ -977,17 +978,17 @@
break;
default:
fprintf(output, "UNKNOWN TYPE %d",
- cur->etype);
+ (char *)cur->etype);
}
if (cur->ExternalID != NULL)
- fprintf(output, "ID \"%s\"", cur->ExternalID);
+ fprintf(output, "ID \"%s\"", (char *)cur->ExternalID);
if (cur->SystemID != NULL)
- fprintf(output, "SYSTEM \"%s\"", cur->SystemID);
+ fprintf(output, "SYSTEM \"%s\"", (char *)cur->SystemID);
if (cur->orig != NULL)
- fprintf(output, "\n orig \"%s\"", cur->orig);
+ fprintf(output, "\n orig \"%s\"", (char *)cur->orig);
if ((cur->type != XML_ELEMENT_NODE) &&
(cur->content != NULL))
- fprintf(output, "\n content \"%s\"", cur->content);
+ fprintf(output, "\n content \"%s\"", (char *)cur->content);
fprintf(output, "\n");
}
@@ -1049,7 +1050,7 @@
fprintf(output, "Error, NOTATION\n");
break;
default:
- fprintf(output, "NODE_%d\n", doc->type);
+ fprintf(output, "NODE_%d\n", (char *)doc->type);
}
if ((doc->intSubset != NULL) && (doc->intSubset->entities != NULL)) {
xmlEntitiesTablePtr table = (xmlEntitiesTablePtr)
@@ -1245,9 +1246,10 @@
xmlNsPtr ns = (xmlNsPtr) node;
if (ns->prefix == NULL)
- fprintf(output, "default -> %s", ns->href);
+ fprintf(output, "default -> %s", (char *)ns->href);
else
- fprintf(output, "%s -> %s", ns->prefix, ns->href);
+ fprintf(output, "%s -> %s", (char *)ns->prefix,
+ (char *)ns->href);
break;
}
default:
diff --git a/encoding.c b/encoding.c
index e3ca7d8..e05c375 100644
--- a/encoding.c
+++ b/encoding.c
@@ -2132,7 +2132,7 @@
*/
if (in->end - in->cur > 0) {
static unsigned char convbuf[32000];
- unsigned const char *cur = (unsigned const char *)in->cur;
+ const unsigned char *cur = (const unsigned char *)in->cur;
int toconv = in->end - in->cur, written = 32000;
int ret;
diff --git a/include/libxml/nanohttp.h b/include/libxml/nanohttp.h
index 2853184..1d8ac24 100644
--- a/include/libxml/nanohttp.h
+++ b/include/libxml/nanohttp.h
@@ -56,6 +56,8 @@
xmlNanoHTTPAuthHeader (void *ctx);
XMLPUBFUN const char * XMLCALL
xmlNanoHTTPRedir (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoHTTPContentLength( void * ctx );
XMLPUBFUN const char * XMLCALL
xmlNanoHTTPEncoding (void *ctx);
XMLPUBFUN const char * XMLCALL
diff --git a/nanohttp.c b/nanohttp.c
index ad46b8d..8dbd9fc 100644
--- a/nanohttp.c
+++ b/nanohttp.c
@@ -159,7 +159,6 @@
static unsigned int timeout = 60;/* the select() timeout in seconds */
static int xmlNanoHTTPFetchContent( void * ctx, char ** ptr, int * len );
-int xmlNanoHTTPContentLength( void * ctx );
/**
* xmlHTTPErrMemory:
diff --git a/parser.c b/parser.c
index 63f0a59..ba9e2bd 100644
--- a/parser.c
+++ b/parser.c
@@ -7437,6 +7437,7 @@
if (!IS_BLANK_CH(RAW)) {
xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED,
"attributes construct error\n");
+ break;
}
SKIP_BLANKS;
if ((cons == ctxt->input->consumed) && (q == CUR_PTR) &&
@@ -7635,8 +7636,7 @@
}
SKIP(2);
- if ((tlen > 0) && (strncmp(ctxt->input->cur,
- (const char *)ctxt->name, tlen) == 0)) {
+ if ((tlen > 0) && (xmlStrncmp(ctxt->input->cur, ctxt->name, tlen) == 0)) {
if (ctxt->input->cur[tlen] == '>') {
ctxt->input->cur += tlen + 1;
goto done;
diff --git a/python/libxml2class.txt b/python/libxml2class.txt
index 9e2496e..661ed01 100644
--- a/python/libxml2class.txt
+++ b/python/libxml2class.txt
@@ -644,56 +644,6 @@
# functions from module xpointer
xpointerNewContext()
-Class xpathContext()
- # accessors
- contextDoc()
- contextNode()
- contextPosition()
- contextSize()
- function()
- functionURI()
- setContextDoc()
- setContextNode()
-
- # functions from module python
- registerXPathFunction()
-
- # functions from module xpath
- xpathEval()
- xpathEvalExpression()
- xpathFreeContext()
-
- # functions from module xpathInternals
- xpathNewParserContext()
- xpathNsLookup()
- xpathRegisterAllFunctions()
- xpathRegisterNs()
- xpathRegisteredFuncsCleanup()
- xpathRegisteredNsCleanup()
- xpathRegisteredVariablesCleanup()
- xpathVariableLookup()
- xpathVariableLookupNS()
-
- # functions from module xpointer
- xpointerEval()
-
-
-Class xmlAttribute(xmlNode)
-Class catalog()
-
- # functions from module catalog
- add()
- catalogIsEmpty()
- convertSGMLCatalog()
- dump()
- remove()
- resolve()
- resolvePublic()
- resolveSystem()
- resolveURI()
-
-
-Class xmlElement(xmlNode)
Class xmlAttr(xmlNode)
@@ -712,100 +662,12 @@
# functions from module valid
removeID()
removeRef()
-
-
-Class xmlTextReader(xmlTextReaderCore)
-
- # functions from module xmlreader
- AttributeCount()
- BaseUri()
- Close()
- CurrentDoc()
- CurrentNode()
- Depth()
- Expand()
- GetAttribute()
- GetAttributeNo()
- GetAttributeNs()
- GetParserProp()
- GetRemainder()
- HasAttributes()
- HasValue()
- IsDefault()
- IsEmptyElement()
- IsValid()
- LocalName()
- LookupNamespace()
- MoveToAttribute()
- MoveToAttributeNo()
- MoveToAttributeNs()
- MoveToElement()
- MoveToFirstAttribute()
- MoveToNextAttribute()
- Name()
- NamespaceUri()
- NewDoc()
- NewFd()
- NewFile()
- NewMemory()
- NewWalker()
- Next()
- NextSibling()
- NodeType()
- Normalization()
- Prefix()
- Preserve()
- QuoteChar()
- Read()
- ReadAttributeValue()
- ReadInnerXml()
- ReadOuterXml()
- ReadState()
- ReadString()
- RelaxNGSetSchema()
- RelaxNGValidate()
- SetParserProp()
- String()
- Value()
- XmlLang()
Class xmlReg()
# functions from module xmlregexp
regexpExec()
regexpIsDeterminist()
regexpPrint()
-
-
-Class xmlEntity(xmlNode)
-
- # functions from module parserInternals
- handleEntity()
-Class relaxNgSchema()
-
- # functions from module relaxng
- relaxNGDump()
- relaxNGDumpTree()
- relaxNGNewValidCtxt()
-
- # functions from module xmlreader
- RelaxNGSetSchema()
-Class Schema()
-
- # functions from module xmlschemas
- schemaDump()
- schemaNewValidCtxt()
-Class Error()
- # accessors
- code()
- domain()
- file()
- level()
- line()
- message()
-
- # functions from module xmlerror
- copyError()
- resetError()
Class relaxNgValidCtxt()
# functions from module relaxng
@@ -814,73 +676,6 @@
relaxNGValidatePopElement()
relaxNGValidatePushCData()
relaxNGValidatePushElement()
-Class xpathParserContext()
- # accessors
- context()
-
- # functions from module xpathInternals
- xpathAddValues()
- xpathBooleanFunction()
- xpathCeilingFunction()
- xpathCompareValues()
- xpathConcatFunction()
- xpathContainsFunction()
- xpathCountFunction()
- xpathDivValues()
- xpathEqualValues()
- xpathErr()
- xpathEvalExpr()
- xpathFalseFunction()
- xpathFloorFunction()
- xpathFreeParserContext()
- xpathIdFunction()
- xpathLangFunction()
- xpathLastFunction()
- xpathLocalNameFunction()
- xpathModValues()
- xpathMultValues()
- xpathNamespaceURIFunction()
- xpathNextAncestor()
- xpathNextAncestorOrSelf()
- xpathNextAttribute()
- xpathNextChild()
- xpathNextDescendant()
- xpathNextDescendantOrSelf()
- xpathNextFollowing()
- xpathNextFollowingSibling()
- xpathNextNamespace()
- xpathNextParent()
- xpathNextPreceding()
- xpathNextPrecedingSibling()
- xpathNextSelf()
- xpathNormalizeFunction()
- xpathNotEqualValues()
- xpathNotFunction()
- xpathNumberFunction()
- xpathParseNCName()
- xpathParseName()
- xpathPopBoolean()
- xpathPopNumber()
- xpathPopString()
- xpathPositionFunction()
- xpathRoot()
- xpathRoundFunction()
- xpathStartsWithFunction()
- xpathStringFunction()
- xpathStringLengthFunction()
- xpathSubValues()
- xpathSubstringAfterFunction()
- xpathSubstringBeforeFunction()
- xpathSubstringFunction()
- xpathSumFunction()
- xpathTranslateFunction()
- xpathTrueFunction()
- xpathValueFlipSign()
- xpatherror()
-
- # functions from module xpointer
- xpointerEvalRangePredicate()
- xpointerRangeToFunction()
Class parserCtxt(parserCtxtCore)
@@ -988,6 +783,94 @@
dtdElementDesc()
dtdQAttrDesc()
dtdQElementDesc()
+Class relaxNgParserCtxt()
+
+ # functions from module relaxng
+ relaxNGParse()
+ relaxParserSetFlag()
+Class xpathParserContext()
+ # accessors
+ context()
+
+ # functions from module xpathInternals
+ xpathAddValues()
+ xpathBooleanFunction()
+ xpathCeilingFunction()
+ xpathCompareValues()
+ xpathConcatFunction()
+ xpathContainsFunction()
+ xpathCountFunction()
+ xpathDivValues()
+ xpathEqualValues()
+ xpathErr()
+ xpathEvalExpr()
+ xpathFalseFunction()
+ xpathFloorFunction()
+ xpathFreeParserContext()
+ xpathIdFunction()
+ xpathLangFunction()
+ xpathLastFunction()
+ xpathLocalNameFunction()
+ xpathModValues()
+ xpathMultValues()
+ xpathNamespaceURIFunction()
+ xpathNextAncestor()
+ xpathNextAncestorOrSelf()
+ xpathNextAttribute()
+ xpathNextChild()
+ xpathNextDescendant()
+ xpathNextDescendantOrSelf()
+ xpathNextFollowing()
+ xpathNextFollowingSibling()
+ xpathNextNamespace()
+ xpathNextParent()
+ xpathNextPreceding()
+ xpathNextPrecedingSibling()
+ xpathNextSelf()
+ xpathNormalizeFunction()
+ xpathNotEqualValues()
+ xpathNotFunction()
+ xpathNumberFunction()
+ xpathParseNCName()
+ xpathParseName()
+ xpathPopBoolean()
+ xpathPopNumber()
+ xpathPopString()
+ xpathPositionFunction()
+ xpathRoot()
+ xpathRoundFunction()
+ xpathStartsWithFunction()
+ xpathStringFunction()
+ xpathStringLengthFunction()
+ xpathSubValues()
+ xpathSubstringAfterFunction()
+ xpathSubstringBeforeFunction()
+ xpathSubstringFunction()
+ xpathSumFunction()
+ xpathTranslateFunction()
+ xpathTrueFunction()
+ xpathValueFlipSign()
+ xpatherror()
+
+ # functions from module xpointer
+ xpointerEvalRangePredicate()
+ xpointerRangeToFunction()
+Class SchemaParserCtxt()
+
+ # functions from module xmlschemas
+ schemaParse()
+Class catalog()
+
+ # functions from module catalog
+ add()
+ catalogIsEmpty()
+ convertSGMLCatalog()
+ dump()
+ remove()
+ resolve()
+ resolvePublic()
+ resolveSystem()
+ resolveURI()
Class xmlNs(xmlNode)
@@ -1011,48 +894,6 @@
# functions from module xpathInternals
xpathNodeSetFreeNs()
-
-
-Class inputBuffer(ioReadWrapper)
-
- # functions from module xmlIO
- grow()
- push()
- read()
-
- # functions from module xmlreader
- newTextReader()
-Class relaxNgParserCtxt()
-
- # functions from module relaxng
- relaxNGParse()
- relaxParserSetFlag()
-
-
-Class outputBuffer(ioWriteWrapper)
-
- # functions from module HTMLtree
- htmlDocContentDumpFormatOutput()
- htmlDocContentDumpOutput()
- htmlNodeDumpFormatOutput()
- htmlNodeDumpOutput()
-
- # functions from module tree
- nodeDumpOutput()
- saveFileTo()
- saveFormatFileTo()
-
- # functions from module xmlIO
- write()
- writeString()
-Class SchemaParserCtxt()
-
- # functions from module xmlschemas
- schemaParse()
-Class SchemaValidCtxt()
-
- # functions from module xmlschemas
- schemaValidateDoc()
Class xmlTextReaderLocator()
# functions from module xmlreader
@@ -1083,3 +924,162 @@
parseURIReference()
printURI()
saveUri()
+
+
+Class xmlAttribute(xmlNode)
+Class xpathContext()
+ # accessors
+ contextDoc()
+ contextNode()
+ contextPosition()
+ contextSize()
+ function()
+ functionURI()
+ setContextDoc()
+ setContextNode()
+
+ # functions from module python
+ registerXPathFunction()
+
+ # functions from module xpath
+ xpathEval()
+ xpathEvalExpression()
+ xpathFreeContext()
+
+ # functions from module xpathInternals
+ xpathNewParserContext()
+ xpathNsLookup()
+ xpathRegisterAllFunctions()
+ xpathRegisterNs()
+ xpathRegisteredFuncsCleanup()
+ xpathRegisteredNsCleanup()
+ xpathRegisteredVariablesCleanup()
+ xpathVariableLookup()
+ xpathVariableLookupNS()
+
+ # functions from module xpointer
+ xpointerEval()
+
+
+Class xmlElement(xmlNode)
+
+
+Class xmlTextReader(xmlTextReaderCore)
+
+ # functions from module xmlreader
+ AttributeCount()
+ BaseUri()
+ Close()
+ CurrentDoc()
+ CurrentNode()
+ Depth()
+ Expand()
+ GetAttribute()
+ GetAttributeNo()
+ GetAttributeNs()
+ GetParserProp()
+ GetRemainder()
+ HasAttributes()
+ HasValue()
+ IsDefault()
+ IsEmptyElement()
+ IsValid()
+ LocalName()
+ LookupNamespace()
+ MoveToAttribute()
+ MoveToAttributeNo()
+ MoveToAttributeNs()
+ MoveToElement()
+ MoveToFirstAttribute()
+ MoveToNextAttribute()
+ Name()
+ NamespaceUri()
+ NewDoc()
+ NewFd()
+ NewFile()
+ NewMemory()
+ NewWalker()
+ Next()
+ NextSibling()
+ NodeType()
+ Normalization()
+ Prefix()
+ Preserve()
+ QuoteChar()
+ Read()
+ ReadAttributeValue()
+ ReadInnerXml()
+ ReadOuterXml()
+ ReadState()
+ ReadString()
+ RelaxNGSetSchema()
+ RelaxNGValidate()
+ SetParserProp()
+ String()
+ Value()
+ XmlLang()
+
+
+Class xmlEntity(xmlNode)
+
+ # functions from module parserInternals
+ handleEntity()
+Class Schema()
+
+ # functions from module xmlschemas
+ schemaDump()
+ schemaNewValidCtxt()
+Class Error()
+ # accessors
+ code()
+ domain()
+ file()
+ level()
+ line()
+ message()
+
+ # functions from module xmlerror
+ copyError()
+ resetError()
+Class relaxNgSchema()
+
+ # functions from module relaxng
+ relaxNGDump()
+ relaxNGDumpTree()
+ relaxNGNewValidCtxt()
+
+ # functions from module xmlreader
+ RelaxNGSetSchema()
+
+
+Class inputBuffer(ioReadWrapper)
+
+ # functions from module xmlIO
+ grow()
+ push()
+ read()
+
+ # functions from module xmlreader
+ newTextReader()
+Class SchemaValidCtxt()
+
+ # functions from module xmlschemas
+ schemaValidateDoc()
+
+
+Class outputBuffer(ioWriteWrapper)
+
+ # functions from module HTMLtree
+ htmlDocContentDumpFormatOutput()
+ htmlDocContentDumpOutput()
+ htmlNodeDumpFormatOutput()
+ htmlNodeDumpOutput()
+
+ # functions from module tree
+ nodeDumpOutput()
+ saveFileTo()
+ saveFormatFileTo()
+
+ # functions from module xmlIO
+ write()
+ writeString()
diff --git a/tree.c b/tree.c
index 5150bd2..6c2e2cb 100644
--- a/tree.c
+++ b/tree.c
@@ -3707,6 +3707,8 @@
while (cur != NULL) {
q = xmlCopyProp(target, cur);
+ if (q == NULL)
+ return(NULL);
if (p == NULL) {
ret = p = q;
} else {
@@ -4207,11 +4209,11 @@
name = (const char *) cur->name;
if (cur->ns) {
if (cur->ns->prefix != NULL)
- snprintf(nametemp, sizeof(nametemp) - 1,
- "%s:%s", cur->ns->prefix, cur->name);
+ snprintf(nametemp, sizeof(nametemp) - 1, "%s:%s",
+ (char *)cur->ns->prefix, (char *)cur->name);
else
- snprintf(nametemp, sizeof(nametemp) - 1,
- "%s", cur->name);
+ snprintf(nametemp, sizeof(nametemp) - 1, "%s",
+ (char *)cur->name);
nametemp[sizeof(nametemp) - 1] = 0;
name = nametemp;
}
@@ -4296,7 +4298,7 @@
} else if (cur->type == XML_PI_NODE) {
sep = "/";
snprintf(nametemp, sizeof(nametemp) - 1,
- "processing-instruction('%s')", cur->name);
+ "processing-instruction('%s')", (char *)cur->name);
nametemp[sizeof(nametemp) - 1] = 0;
name = nametemp;
@@ -4362,7 +4364,7 @@
else
snprintf((char *) buf, buf_len, "%s%s[%d]%s",
sep, name, occur, (char *) buffer);
- snprintf((char *) buffer, buf_len, "%s", buf);
+ snprintf((char *) buffer, buf_len, "%s", (char *)buf);
cur = next;
} while (cur != NULL);
xmlFree(buf);
@@ -5637,7 +5639,7 @@
if (ns->prefix == NULL)
snprintf((char *) prefix, sizeof(prefix), "default");
else
- snprintf((char *) prefix, sizeof(prefix), "%.20s", ns->prefix);
+ snprintf((char *) prefix, sizeof(prefix), "%.20s", (char *)ns->prefix);
def = xmlSearchNs(doc, tree, prefix);
while (def != NULL) {
@@ -5645,7 +5647,8 @@
if (ns->prefix == NULL)
snprintf((char *) prefix, sizeof(prefix), "default%d", counter++);
else
- snprintf((char *) prefix, sizeof(prefix), "%.20s%d", ns->prefix, counter++);
+ snprintf((char *) prefix, sizeof(prefix), "%.20s%d",
+ (char *)ns->prefix, counter++);
def = xmlSearchNs(doc, tree, prefix);
}
diff --git a/xmlmemory.c b/xmlmemory.c
index 88d191b..821e3b9 100644
--- a/xmlmemory.c
+++ b/xmlmemory.c
@@ -644,11 +644,11 @@
case MALLOC_ATOMIC_TYPE:fprintf(fp,"atomicmalloc() in ");break;
case REALLOC_ATOMIC_TYPE:fprintf(fp,"atomicrealloc() in ");break;
default:
- fprintf(fp,"Unknow memory block, corruped maybe");
+ fprintf(fp,"Unknown memory block, may be corrupted");
xmlMutexUnlock(xmlMemMutex);
return;
}
- if (p->mh_file != NULL) fprintf(fp,"%s(%d)", p->mh_file, p->mh_line);
+ if (p->mh_file != NULL) fprintf(fp,"%s(%u)", p->mh_file, p->mh_line);
if (p->mh_tag != MEMTAG)
fprintf(fp," INVALID");
nb++;
@@ -750,7 +750,7 @@
default:fprintf(fp," ??? in ");break;
}
if (p->mh_file != NULL)
- fprintf(fp,"%s(%d)", p->mh_file, p->mh_line);
+ fprintf(fp,"%s(%u)", p->mh_file, p->mh_line);
if (p->mh_tag != MEMTAG)
fprintf(fp," INVALID");
xmlMemContentShow(fp, p);