Commit 12d37ab6 authored by William M. Brack's avatar William M. Brack
Browse files

fixed problem when XMLLINT_INDENT was empty (bug 168033). fixed

* xmlsave.c: fixed problem when XMLLINT_INDENT was empty (bug 168033).
* xpath.c: fixed compilation warning, no change to logic.
* xmlschemastypes.c: fixed compilation warning, no change to logic.
parent bd8fb0ad
Mon Feb 21 21:51:03 HKT 2005 William Brack <wbrack@mmm.com.hk>
* xmlsave.c: fixed problem when XMLLINT_INDENT was empty (bug 168033).
* xpath.c: fixed compilation warning, no change to logic.
* xmlschemastypes.c: fixed compilation warning, no change to logic.
Mon Feb 21 14:48:27 CET 2005 Daniel Veillard <daniel@veillard.com>
 
* xmlwriter.c: applied patch from Rob Richards to fix a problem with
......
......@@ -327,14 +327,16 @@ static void
xmlSaveCtxtInit(xmlSaveCtxtPtr ctxt)
{
int i;
int len;
if (ctxt == NULL) return;
if ((ctxt->encoding == NULL) && (ctxt->escape == NULL))
ctxt->escape = xmlEscapeEntities;
if (xmlTreeIndentString == NULL) {
len = xmlStrlen((xmlChar *)xmlTreeIndentString);
if ((xmlTreeIndentString == NULL) || (len == 0)) {
memset(&ctxt->indent[0], 0, MAX_INDENT + 1);
} else {
ctxt->indent_size = xmlStrlen((const xmlChar *) xmlTreeIndentString);
ctxt->indent_size = len;
ctxt->indent_nr = MAX_INDENT / ctxt->indent_size;
for (i = 0;i < ctxt->indent_nr;i++)
memcpy(&ctxt->indent[i * ctxt->indent_size], xmlTreeIndentString,
......
......@@ -728,9 +728,9 @@ xmlSchemaNewNOTATIONValue(const xmlChar *name,
if (val == NULL)
return (NULL);
val->value.qname.name = name;
val->value.qname.name = (xmlChar *)name;
if (ns != NULL)
val->value.qname.uri = ns;
val->value.qname.uri = (xmlChar *)ns;
return(val);
}
......
......@@ -10938,7 +10938,7 @@ xmlXPathRunStreamEval(xmlXPathContextPtr ctxt, xmlPatternPtr comp) {
int max_depth;
int from_root;
int ret, depth;
xmlNodePtr cur, limit;
xmlNodePtr cur = NULL, limit = NULL;
xmlXPathObjectPtr retval;
xmlStreamCtxtPtr patstream;
......@@ -10970,8 +10970,7 @@ xmlXPathRunStreamEval(xmlXPathContextPtr ctxt, xmlPatternPtr comp) {
return(retval);
}
if (from_root) {
cur = ctxt->doc;
limit = NULL;
cur = (xmlNodePtr)ctxt->doc;
} else if (ctxt->node != NULL) {
switch (ctxt->node->type) {
case XML_ELEMENT_NODE:
......@@ -10999,7 +10998,6 @@ xmlXPathRunStreamEval(xmlXPathContextPtr ctxt, xmlPatternPtr comp) {
case XML_NAMESPACE_DECL:
case XML_XINCLUDE_START:
case XML_XINCLUDE_END:
cur = NULL;
break;
}
limit = cur;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment