made powten array static it should not be exported fix bug #107361 by
* xmlschemastype.c: made powten array static it should not be exported
* HTMLparser.c: fix bug #107361 by reusing the code from the XML
parser function.
* testHTML.c: get rid of valgrind messages on the HTML SAX tests
Daniel
diff --git a/HTMLparser.c b/HTMLparser.c
index 75e9229..38a442c 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -5231,16 +5231,27 @@
if (filename == NULL)
inputStream->filename = NULL;
else
- inputStream->filename = xmlMemStrdup(filename);
+ inputStream->filename = (char *)
+ xmlCanonicPath((const xmlChar *) filename);
inputStream->buf = buf;
inputStream->base = inputStream->buf->buffer->content;
inputStream->cur = inputStream->buf->buffer->content;
+ inputStream->end =
+ &inputStream->buf->buffer->content[inputStream->buf->buffer->use];
inputPush(ctxt, inputStream);
if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) &&
(ctxt->input->buf != NULL)) {
+ int base = ctxt->input->base - ctxt->input->buf->buffer->content;
+ int cur = ctxt->input->cur - ctxt->input->base;
+
xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
+
+ ctxt->input->base = ctxt->input->buf->buffer->content + base;
+ ctxt->input->cur = ctxt->input->base + cur;
+ ctxt->input->end =
+ &ctxt->input->buf->buffer->content[ctxt->input->buf->buffer->use];
#ifdef DEBUG_PUSH
xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size);
#endif