summaryrefslogtreecommitdiff
path: root/xmlIO.c
diff options
context:
space:
mode:
authorMike Hommey <glandium@debian.org>2007-06-13 20:47:19 +0200
committerMike Hommey <glandium@debian.org>2007-06-13 20:47:19 +0200
commit58f9d16e3a77d5207d9ccc413b61e2cb45190018 (patch)
treef190471ceb2bc35c076cc65159141813da73c8ee /xmlIO.c
parent789259a1b6850d30acffbb62b11456b9ed7a8f59 (diff)
downloadlibxml2-58f9d16e3a77d5207d9ccc413b61e2cb45190018.tar.gz
Load /tmp/libxml2-2.6.29 intoupstream/2.6.29.dfsg
libxml2/branches/upstream/current.
Diffstat (limited to 'xmlIO.c')
-rw-r--r--xmlIO.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/xmlIO.c b/xmlIO.c
index f576d76..685ce26 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -844,18 +844,25 @@ 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;