mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-28 00:21:53 +03:00
preparing for a 2.4.3 release even if it may not be ready yet redirected
* Makefile.am configure.in include/libxml/xmlwin32version.h: preparing for a 2.4.3 release even if it may not be ready yet * catalog.c parser.c xmlIO.c include/libxml/catalog.h: redirected all file parsing lookup to go through the entity resolver, add to add an API to bypass it (needed to load catalogs themselves), some cleanup on the catalog code too. * nanoftp.c: small cleanup * doc/catalog.html: small update Daniel
This commit is contained in:
15
parser.c
15
parser.c
@ -9674,14 +9674,8 @@ xmlCreateFileParserCtxt(const char *filename)
|
||||
{
|
||||
xmlParserCtxtPtr ctxt;
|
||||
xmlParserInputPtr inputStream;
|
||||
xmlParserInputBufferPtr buf;
|
||||
char *directory = NULL;
|
||||
|
||||
buf = xmlParserInputBufferCreateFilename(filename, XML_CHAR_ENCODING_NONE);
|
||||
if (buf == NULL) {
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
ctxt = xmlNewParserCtxt();
|
||||
if (ctxt == NULL) {
|
||||
if (xmlDefaultSAXHandler.error != NULL) {
|
||||
@ -9690,19 +9684,12 @@ xmlCreateFileParserCtxt(const char *filename)
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
inputStream = xmlNewInputStream(ctxt);
|
||||
inputStream = xmlLoadExternalEntity(filename, NULL, ctxt);
|
||||
if (inputStream == NULL) {
|
||||
xmlFreeParserCtxt(ctxt);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
inputStream->filename = xmlMemStrdup(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 ((ctxt->directory == NULL) && (directory == NULL))
|
||||
directory = xmlParserGetDirectory(filename);
|
||||
|
Reference in New Issue
Block a user