1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

obsoleted xmlNormalizeWindowsPath

This commit is contained in:
Igor Zlatkovic
2003-02-19 14:51:00 +00:00
parent f2238e6e55
commit 5f9fada355
5 changed files with 19 additions and 86 deletions

View File

@ -9154,7 +9154,7 @@ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
inputStream->filename = NULL;
else
inputStream->filename = (char *)
xmlNormalizeWindowsPath((const xmlChar *) filename);
xmlCanonicPath((const xmlChar *) filename);
inputStream->buf = buf;
inputStream->base = inputStream->buf->buffer->content;
inputStream->cur = inputStream->buf->buffer->content;
@ -10330,7 +10330,6 @@ xmlCreateFileParserCtxt(const char *filename)
xmlParserCtxtPtr ctxt;
xmlParserInputPtr inputStream;
char *directory = NULL;
xmlChar *normalized;
ctxt = xmlNewParserCtxt();
if (ctxt == NULL) {
@ -10340,26 +10339,18 @@ xmlCreateFileParserCtxt(const char *filename)
return(NULL);
}
normalized = xmlNormalizeWindowsPath((const xmlChar *) filename);
if (normalized == NULL) {
xmlFreeParserCtxt(ctxt);
return(NULL);
}
inputStream = xmlLoadExternalEntity((char *) normalized, NULL, ctxt);
inputStream = xmlLoadExternalEntity(filename, NULL, ctxt);
if (inputStream == NULL) {
xmlFreeParserCtxt(ctxt);
xmlFree(normalized);
return(NULL);
}
inputPush(ctxt, inputStream);
if ((ctxt->directory == NULL) && (directory == NULL))
directory = xmlParserGetDirectory((char *) normalized);
directory = xmlParserGetDirectory(filename);
if ((ctxt->directory == NULL) && (directory != NULL))
ctxt->directory = directory;
xmlFree(normalized);
return(ctxt);
}