From 58f9d16e3a77d5207d9ccc413b61e2cb45190018 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Wed, 13 Jun 2007 20:47:19 +0200 Subject: Load /tmp/libxml2-2.6.29 into libxml2/branches/upstream/current. --- xmlIO.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'xmlIO.c') diff --git a/xmlIO.c b/xmlIO.c index f576d76..685ce26 100644 --- a/xmlIO.c +++ b/xmlIO.c @@ -844,17 +844,24 @@ xmlFileOpen_real (const char *filename) { return((void *) fd); } - if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17)) + if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17)) { #if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__) path = &filename[17]; #else path = &filename[16]; #endif - else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:///", 8)) { + } else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:///", 8)) { #if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__) path = &filename[8]; #else path = &filename[7]; +#endif + } else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:/", 6)) { + /* lots of generators seems to lazy to read RFC 1738 */ +#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__) + path = &filename[6]; +#else + path = &filename[5]; #endif } else path = filename; @@ -3638,7 +3645,7 @@ static int xmlNoNetExists(const char *URL) { * * Returns a new allocated URL, or NULL. */ -xmlChar * +static xmlChar * xmlResolveResourceFromCatalog(const char *URL, const char *ID, xmlParserCtxtPtr ctxt) { xmlChar *resource = NULL; -- cgit v1.2.3