diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2004-02-11 13:25:26 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2004-02-11 13:25:26 +0000 |
commit | 3671190b546760a9e10d2e683257c3a86c680816 (patch) | |
tree | ce15fac5cbe6b2db5c36f2d6035e65fb66a98d97 /parserInternals.c | |
parent | 6f108a1d0b388bbe26b2b169bce1434c15efca49 (diff) | |
download | libxml2-3671190b546760a9e10d2e683257c3a86c680816.tar.gz |
added xmlByteConsumed() interface updated the benchmark rebuilt the docs
* parserInternals.c xmlIO.c encoding.c include/libxml/parser.h
include/libxml/xmlIO.h: added xmlByteConsumed() interface
* doc/*: updated the benchmark rebuilt the docs
* python/tests/Makefile.am python/tests/indexes.py: added a
specific regression test for xmlByteConsumed()
* include/libxml/encoding.h rngparser.c tree.c: small cleanups
Daniel
Diffstat (limited to 'parserInternals.c')
-rw-r--r-- | parserInternals.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/parserInternals.c b/parserInternals.c index b6601d38..d03e3d4f 100644 --- a/parserInternals.c +++ b/parserInternals.c @@ -1110,6 +1110,7 @@ xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input, */ if ((input->buf->buffer != NULL) && (input->buf->buffer->use > 0)) { int processed; + unsigned int use; /* * Specific handling of the Byte Order Mark for @@ -1145,6 +1146,8 @@ xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input, xmlBufferShrink(input->buf->buffer, processed); input->buf->raw = input->buf->buffer; input->buf->buffer = xmlBufferCreate(); + input->buf->rawconsumed = processed; + use = input->buf->raw->use; if (ctxt->html) { /* @@ -1170,6 +1173,7 @@ xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input, NULL); return (-1); } + input->buf->rawconsumed += use - input->buf->raw->use; input->base = input->cur = input->buf->buffer->content; input->end = &input->base[input->buf->buffer->use]; |