mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-10-26 20:25:14 +03:00
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
This commit is contained in:
parent
710823bf6e
commit
5f704afe98
@ -1,3 +1,10 @@
|
|||||||
|
Wed Mar 5 10:57:09 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
Fri Feb 28 00:23:00 CET 2003 Daniel Veillard <daniel@veillard.com>
|
Fri Feb 28 00:23:00 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* tree.c: fixed a node dump crash on attributes
|
* tree.c: fixed a node dump crash on attributes
|
||||||
|
13
HTMLparser.c
13
HTMLparser.c
@ -5231,16 +5231,27 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data,
|
|||||||
if (filename == NULL)
|
if (filename == NULL)
|
||||||
inputStream->filename = NULL;
|
inputStream->filename = NULL;
|
||||||
else
|
else
|
||||||
inputStream->filename = xmlMemStrdup(filename);
|
inputStream->filename = (char *)
|
||||||
|
xmlCanonicPath((const xmlChar *) filename);
|
||||||
inputStream->buf = buf;
|
inputStream->buf = buf;
|
||||||
inputStream->base = inputStream->buf->buffer->content;
|
inputStream->base = inputStream->buf->buffer->content;
|
||||||
inputStream->cur = inputStream->buf->buffer->content;
|
inputStream->cur = inputStream->buf->buffer->content;
|
||||||
|
inputStream->end =
|
||||||
|
&inputStream->buf->buffer->content[inputStream->buf->buffer->use];
|
||||||
|
|
||||||
inputPush(ctxt, inputStream);
|
inputPush(ctxt, inputStream);
|
||||||
|
|
||||||
if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) &&
|
if ((size > 0) && (chunk != NULL) && (ctxt->input != NULL) &&
|
||||||
(ctxt->input->buf != 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);
|
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
|
#ifdef DEBUG_PUSH
|
||||||
xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size);
|
xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size);
|
||||||
#endif
|
#endif
|
||||||
|
@ -375,7 +375,8 @@ startElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar
|
|||||||
while ((attlen = strlen((char*)att)) > 0) {
|
while ((attlen = strlen((char*)att)) > 0) {
|
||||||
outlen = sizeof output - 1;
|
outlen = sizeof output - 1;
|
||||||
htmlEncodeEntities(output, &outlen, att, &attlen, '\'');
|
htmlEncodeEntities(output, &outlen, att, &attlen, '\'');
|
||||||
fprintf(stdout, "%.*s", outlen, output);
|
output[outlen] = 0;
|
||||||
|
fprintf(stdout, "%s", output);
|
||||||
att += attlen;
|
att += attlen;
|
||||||
}
|
}
|
||||||
fprintf(stdout, "'");
|
fprintf(stdout, "'");
|
||||||
|
@ -85,7 +85,7 @@ typedef enum {
|
|||||||
XML_SCHEMAS_UBYTE
|
XML_SCHEMAS_UBYTE
|
||||||
} xmlSchemaValType;
|
} xmlSchemaValType;
|
||||||
|
|
||||||
unsigned long powten[10] = {
|
static unsigned long powten[10] = {
|
||||||
1, 10, 100, 1000, 10000, 100000, 1000000, 10000000L,
|
1, 10, 100, 1000, 10000, 100000, 1000000, 10000000L,
|
||||||
100000000L, 1000000000L
|
100000000L, 1000000000L
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user