diff options
author | Daniel Veillard <veillard@redhat.com> | 2012-07-16 16:28:47 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2012-07-23 14:24:27 +0800 |
commit | 61551a1eb75bacb32e5209635c0f3459595af54a (patch) | |
tree | 9846870885ca48e74af34a72112c5c4f272f3628 /catalog.c | |
parent | 145477d8ab5d6802529b1213220f108ad23d3827 (diff) | |
download | libxml2-61551a1eb75bacb32e5209635c0f3459595af54a.tar.gz |
Cleanup function xmlBufResetInput() to set input from Buffer
This was scattered in a number of modules, xmlParserInputPtr
have usually their base, cur and end pointer set from an
xmlBuf used as input.
* buf.c buf.h: add a new function implementing this setup
* parser.c HTMLparser.c catalog.c parserInternals.c xmlreader.c
use the new function instead of digging into the buffer in
all those modules
Diffstat (limited to 'catalog.c')
-rw-r--r-- | catalog.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -914,9 +914,7 @@ xmlParseCatalogFile(const char *filename) { inputStream->filename = (char *) xmlCanonicPath((const xmlChar *)filename); inputStream->buf = buf; - inputStream->cur = - inputStream->base = xmlBufContent(buf->buffer); - inputStream->end = xmlBufEnd(buf->buffer); + xmlBufResetInput(buf->buffer, inputStream); inputPush(ctxt, inputStream); if ((ctxt->directory == NULL) && (directory == NULL)) |