libxml ANSI C patch



This is the patch against libxml 1.4.0. Changes in SAX.c just eliminate
some warnings. There are more things of that kind in the source, but
since most of them have TODO comments, I gave up on fixing that.
Changes to HTMLparser.c fix compiling errors. Newline in the string
doesn't satisfy Sun's compiler kerberos. There's one little thing not
present in the patch. File xmlConf.sh.in doesn't have newline at the end, so
Sun's /usr/xpg4/bin/sed doesn't like it. Utilities in xpg4 directory
are supposed to be POSIX conformant, but I don't have a copy of the standard,
so I don't know if this is a sed bug or POSIX says it's the correct
behaviour. Whichever it is, newline should be added, for the moment, at
least.


--- SAX.c.orig	Mon Sep 20 20:46:54 1999
+++ SAX.c	Mon Sep 20 20:49:11 1999
@@ -180,12 +180,12 @@
      * TODO : not 100% sure that the appropriate handling in that case.
      */
     if (systemId != NULL) {
-        if (!xmlStrncmp(systemId, "http://", 7)) {
+        if (!xmlStrncmp(systemId, (unsigned char *)"http://", 7)) {
 	    /* !!!!!!!!! TODO */
-	} else if (!xmlStrncmp(systemId, "ftp://", 6)) {
+	} else if (!xmlStrncmp(systemId, (unsigned char *)"ftp://", 6)) {
 	    /* !!!!!!!!! TODO */
 	} else {
-	    return(xmlNewInputFromFile(ctxt, systemId));
+	    return(xmlNewInputFromFile(ctxt, (char *)systemId));
 	}
     }
     return(NULL);
--- HTMLparser.c.orig	Mon Sep 20 20:53:18 1999
+++ HTMLparser.c	Mon Sep 20 20:54:40 1999
@@ -487,13 +487,13 @@
 { 180,	"acute","acute accent = spacing acute, U+00B4 ISOdia" },
 { 181,	"micro","micro sign, U+00B5 ISOnum" },
 { 182,	"para",	"pilcrow sign = paragraph sign, U+00B6 ISOnum" },
-{ 183,	"middot","middle dot = Georgian comma
-                                  = Greek middle dot, U+00B7 ISOnum" },
+{ 183,	"middot","middle dot = Georgian comma "
+                                  "= Greek middle dot, U+00B7 ISOnum" },
 { 184,	"cedil","cedilla = spacing cedilla, U+00B8 ISOdia" },
 { 185,	"sup1",	"superscript one = superscript digit one, U+00B9 ISOnum" },
 { 186,	"ordm",	"masculine ordinal indicator, U+00BA ISOnum" },
-{ 187,	"raquo","right-pointing double angle quotation mark
-                                  = right pointing guillemet, U+00BB ISOnum" },
+{ 187,	"raquo","right-pointing double angle quotation mark "
+                                  "= right pointing guillemet, U+00BB ISOnum" },
 { 188,	"frac14","vulgar fraction one quarter = fraction one quarter, U+00BC ISOnum" },
 { 189,	"frac12","vulgar fraction one half = fraction one half, U+00BD ISOnum" },
 { 190,	"frac34","vulgar fraction three quarters = fraction three quarters, U+00BE ISOnum" },
@@ -629,8 +629,8 @@
 { 8254,	"oline","overline = spacing overscore, U+203E NEW" },
 { 8260,	"frasl","fraction slash, U+2044 NEW" },
 
-{ 8472,	"weierp","script capital P = power set
-                                     = Weierstrass p, U+2118 ISOamso" },
+{ 8472,	"weierp","script capital P = power set "
+                                     "= Weierstrass p, U+2118 ISOamso" },
 { 8465,	"image","blackletter capital I = imaginary part, U+2111 ISOamso" },
 { 8476,	"real",	"blackletter capital R = real part symbol, U+211C ISOamso" },
 { 8482,	"trade","trade mark sign, U+2122 ISOnum" },
@@ -726,8 +726,8 @@
 { 8225,	"Dagger","double dagger, U+2021 ISOpub" },
 { 8240,	"permil","per mille sign, U+2030 ISOtech" },
 { 8249,	"lsaquo","single left-pointing angle quotation mark, U+2039 ISO proposed" },
-{ 8250,	"rsaquo","single right-pointing angle quotation mark,
-                                    U+203A ISO proposed" },
+{ 8250,	"rsaquo","single right-pointing angle quotation mark, "
+                                    "U+203A ISO proposed" },
 { 8364,	"euro",	"euro sign, U+20AC NEW" }
 };
 

-- 
 .-.   .-.    Life is a sexually transmitted disease.
(_  \ /  _)
     |        dave@srce.hr
     |        dave@fly.srk.fer.hr



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]