enhanced macros to avoid breaking ABI from previous versions. modified to

* genChRanges.py, chvalid.c, include/libxml/chvalid.h,
  include/libxml/parserInternals.h: enhanced macros to avoid
  breaking ABI from previous versions.
* catalog.c, parser.c, tree.c: modified to use IS_* macros
  defined in parserInternals.h.  Makes maintenance much easier.
* testHTML.c, testSAX.c, python/libxml.c: minor fixes to avoid
  compilation warnings
* configuration.in: fixed pushHTML test error; enhanced for
  better devel (me) testing
diff --git a/ChangeLog b/ChangeLog
index 4994201..d22e1ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Sat Oct 18 12:46:02 HKT 2003 William Brack <wbrack@mmm.com.hk>
+
+	* genChRanges.py, chvalid.c, include/libxml/chvalid.h,
+	  include/libxml/parserInternals.h: enhanced macros to avoid
+	  breaking ABI from previous versions.
+	* catalog.c, parser.c, tree.c: modified to use IS_* macros
+	  defined in parserInternals.h.  Makes maintenance much easier.
+	* testHTML.c, testSAX.c, python/libxml.c: minor fixes to avoid
+	  compilation warnings
+	* configuration.in: fixed pushHTML test error; enhanced for
+	  better devel (me) testing
+
 Fri Oct 17 14:38:54 CEST 2003 Daniel Veillard <daniel@veillard.com>
 
 	* legacy.c: remove the warning for startDocument(), as it is used by
diff --git a/catalog.c b/catalog.c
index 4375ebb..89cb4cf 100644
--- a/catalog.c
+++ b/catalog.c
@@ -2029,7 +2029,7 @@
         xmlCatalogErrMemory("allocating public ID");
 	return(NULL);
     }
-    while (xmlIsPubidChar(*cur) || (*cur == '?')) {
+    while (xmlIsPubidCharQ(*cur) || (*cur == '?')) {
 	if ((*cur == stop) && (stop != ' '))
 	    break;
 	if ((stop == ' ') && (IS_BLANK(*cur)))
diff --git a/chvalid.c b/chvalid.c
index 212d052..8ffcb73 100755
--- a/chvalid.c
+++ b/chvalid.c
@@ -5,7 +5,7 @@
  * This file is automatically generated from the cvs source
  * definition files using the genChRanges.py Python script
  *
- * Generation date: Sun Oct 12 18:17:45 2003
+ * Generation date: Sat Oct 18 09:01:24 2003
  * Sources: chvalid.def
  * William Brack <wbrack@mmm.com.hk>
  */
@@ -195,3 +195,43 @@
     return 0;
 }
 
+int
+xmlIsBaseChar(unsigned int ch) {
+    return(xmlIsBaseCharQ(ch));
+}
+
+int
+xmlIsBlank(unsigned int ch) {
+    return(xmlIsBlankQ(ch));
+}
+
+int
+xmlIsChar(unsigned int ch) {
+    return(xmlIsCharQ(ch));
+}
+
+int
+xmlIsCombining(unsigned int ch) {
+    return(xmlIsCombiningQ(ch));
+}
+
+int
+xmlIsDigit(unsigned int ch) {
+    return(xmlIsDigitQ(ch));
+}
+
+int
+xmlIsExtender(unsigned int ch) {
+    return(xmlIsExtenderQ(ch));
+}
+
+int
+xmlIsIdeographic(unsigned int ch) {
+    return(xmlIsIdeographicQ(ch));
+}
+
+int
+xmlIsPubidChar(unsigned int ch) {
+    return(xmlIsPubidCharQ(ch));
+}
+
diff --git a/configure.in b/configure.in
index c8483ff..6f23db6 100644
--- a/configure.in
+++ b/configure.in
@@ -416,7 +416,9 @@
 dnl specific tests to setup DV's devel environment with debug etc ...
 dnl (-Wunreachable-code)
 dnl
-if test "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ; then
+if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ]] || \
+   [[ "${LOGNAME}" = "bill" -a "`pwd`" = "/home/bill/gnomecvs/xmltest" ]]
+   then
     if test "$with_minimum" != "yes"
     then
 	if test "${with_mem_debug}" = "" ; then
@@ -686,7 +688,7 @@
     WITH_HTML=1
     HTML_OBJ="HTMLparser.o HTMLtree.o"
     TEST_HTML=HTMLtests
-    if "$with_push" != "no" ; then
+    if test "$with_push" != "no" ; then
         TEST_PHTML=HTMLPushtests
     else
         TEST_PHTML=
diff --git a/genChRanges.py b/genChRanges.py
index 07f46f8..9f940f3 100755
--- a/genChRanges.py
+++ b/genChRanges.py
@@ -8,6 +8,12 @@
 # William Brack
 # October 2003
 #
+# 18 October 2003
+# Modified to maintain binary compatibility with previous library versions
+# by adding a suffix 'Q' ('quick') to the macro generated for the original,
+# function, and adding generation of a function (with the original name) which
+# instantiates the macro.
+#
 
 import sys
 import string
@@ -215,6 +221,8 @@
 #ifndef __XML_CHVALID_H__
 #define __XML_CHVALID_H__
 
+#include <libxml/xmlversion.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -247,7 +255,8 @@
 };
 
 /* Range checking routine */
-int xmlCharInRange(unsigned int val, const xmlChRangeGroupPtr group);
+XMLPUBFUN int XMLCALL
+		xmlCharInRange(unsigned int val, const xmlChRangeGroupPtr group);
 
 """ % (date, sources));
 output.write(
@@ -297,7 +306,7 @@
         rangeTable = makeRange(Functs[f][0])
 	numRanges = len(rangeTable)
 	if numRanges >= minTableSize:	# table is worthwhile
-	    header.write("extern unsigned char %s_tab[256];\n" % f)
+	    header.write("XMLPUBVAR unsigned char %s_tab[256];\n" % f)
 	    header.write("#define %s_ch(c)\t(%s_tab[(c)])\n" % (f, f))
 
 	    # write the constant data to the code file
@@ -342,7 +351,7 @@
 	    pline += ")\n"
 	    header.write(pline)
 
-    pline = "#define %s(c)" % f
+    pline = "#define %sQ(c)" % f
     ntab = 4 - (len(pline)) / 8
     if ntab < 0:
 	ntab = 0
@@ -380,7 +389,7 @@
 
 
     if len(Functs[f][1]) > 0:
-	header.write("extern xmlChRangeGroup %sGroup;\n" % f)
+	header.write("XMLPUBVAR xmlChRangeGroup %sGroup;\n" % f)
 
 
 #
@@ -429,18 +438,6 @@
 	    pline += ", (xmlChLRangePtr)0"
 	
 	output.write(pline + "};\n\n")
-#
-# Run complete - write trailers and close the output files
-#
-
-header.write("""
-#ifdef __cplusplus
-}
-#endif
-#endif /* __XML_CHVALID_H__ */
-""");
-
-header.close()
 
 output.write(
 """
@@ -492,4 +489,23 @@
 
 """);
 
+#
+# finally, generate the ABI compatibility functions
+#
+for f in fkeys:
+    output.write("int\n%s(unsigned int ch) {\n    return(%sQ(ch));\n}\n\n" % (f,f))
+    header.write("XMLPUBFUN int XMLCALL\n\t\t%s(unsigned int ch);\n" % f);
+#
+# Run complete - write trailers and close the output files
+#
+
+header.write("""
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_CHVALID_H__ */
+""");
+
+header.close()
 output.close()
+
diff --git a/include/libxml/chvalid.h b/include/libxml/chvalid.h
index e9e5c67..79362ab 100644
--- a/include/libxml/chvalid.h
+++ b/include/libxml/chvalid.h
@@ -5,7 +5,7 @@
  * This file is automatically generated from the cvs source
  * definition files using the genChRanges.py Python script
  *
- * Generation date: Sun Oct 12 18:17:45 2003
+ * Generation date: Sat Oct 18 09:01:24 2003
  * Sources: chvalid.def
  * William Brack <wbrack@mmm.com.hk>
  */
@@ -13,6 +13,8 @@
 #ifndef __XML_CHVALID_H__
 #define __XML_CHVALID_H__
 
+#include <libxml/xmlversion.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -45,63 +47,80 @@
 };
 
 /* Range checking routine */
-int xmlCharInRange(unsigned int val, const xmlChRangeGroupPtr group);
+XMLPUBFUN int XMLCALL
+		xmlCharInRange(unsigned int val, const xmlChRangeGroupPtr group);
 
 #define xmlIsBaseChar_ch(c)	(((0x41 <= (c)) && ((c) <= 0x5a)) || \
 				 ((0x61 <= (c)) && ((c) <= 0x7a)) || \
 				 ((0xc0 <= (c)) && ((c) <= 0xd6)) || \
 				 ((0xd8 <= (c)) && ((c) <= 0xf6)) || \
 				 ((0xf8 <= (c)) && ((c) <= 0xff)))
-#define xmlIsBaseChar(c)	(((c) < 0x100) ? \
+#define xmlIsBaseCharQ(c)	(((c) < 0x100) ? \
 				 xmlIsBaseChar_ch((c)) : \
 				 xmlCharInRange((c), &xmlIsBaseCharGroup))
 
-extern xmlChRangeGroup xmlIsBaseCharGroup;
+XMLPUBVAR xmlChRangeGroup xmlIsBaseCharGroup;
 #define xmlIsBlank_ch(c)	(((c) == 0x20) || \
 				 ((0x9 <= (c)) && ((c) <= 0xa)) || \
 				 ((c) == 0xd))
-#define xmlIsBlank(c)		(((c) < 0x100) ? \
+#define xmlIsBlankQ(c)		(((c) < 0x100) ? \
 				 xmlIsBlank_ch((c)) : 0)
 
 #define xmlIsChar_ch(c)		(((0x9 <= (c)) && ((c) <= 0xa)) || \
 				 ((c) == 0xd) || \
 				 ((0x20 <= (c)) && ((c) <= 0xff)))
-#define xmlIsChar(c)		(((c) < 0x100) ? \
+#define xmlIsCharQ(c)		(((c) < 0x100) ? \
 				 xmlIsChar_ch((c)) :\
 				(((0x100 <= (c)) && ((c) <= 0xd7ff)) || \
 				 ((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
 				 ((0x10000 <= (c)) && ((c) <= 0x10ffff))))
 
-extern xmlChRangeGroup xmlIsCharGroup;
-#define xmlIsCombining(c)	(((c) < 0x100) ? \
+XMLPUBVAR xmlChRangeGroup xmlIsCharGroup;
+#define xmlIsCombiningQ(c)	(((c) < 0x100) ? \
 				 0 : \
 				 xmlCharInRange((c), &xmlIsCombiningGroup))
 
-extern xmlChRangeGroup xmlIsCombiningGroup;
+XMLPUBVAR xmlChRangeGroup xmlIsCombiningGroup;
 #define xmlIsDigit_ch(c)	(((0x30 <= (c)) && ((c) <= 0x39)))
-#define xmlIsDigit(c)		(((c) < 0x100) ? \
+#define xmlIsDigitQ(c)		(((c) < 0x100) ? \
 				 xmlIsDigit_ch((c)) : \
 				 xmlCharInRange((c), &xmlIsDigitGroup))
 
-extern xmlChRangeGroup xmlIsDigitGroup;
+XMLPUBVAR xmlChRangeGroup xmlIsDigitGroup;
 #define xmlIsExtender_ch(c)	(((c) == 0xb7))
-#define xmlIsExtender(c)	(((c) < 0x100) ? \
+#define xmlIsExtenderQ(c)	(((c) < 0x100) ? \
 				 xmlIsExtender_ch((c)) : \
 				 xmlCharInRange((c), &xmlIsExtenderGroup))
 
-extern xmlChRangeGroup xmlIsExtenderGroup;
-#define xmlIsIdeographic(c)	(((c) < 0x100) ? \
+XMLPUBVAR xmlChRangeGroup xmlIsExtenderGroup;
+#define xmlIsIdeographicQ(c)	(((c) < 0x100) ? \
 				 0 :\
 				(((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \
 				 ((c) == 0x3007) || \
 				 ((0x3021 <= (c)) && ((c) <= 0x3029))))
 
-extern xmlChRangeGroup xmlIsIdeographicGroup;
-extern unsigned char xmlIsPubidChar_tab[256];
+XMLPUBVAR xmlChRangeGroup xmlIsIdeographicGroup;
+XMLPUBVAR unsigned char xmlIsPubidChar_tab[256];
 #define xmlIsPubidChar_ch(c)	(xmlIsPubidChar_tab[(c)])
-#define xmlIsPubidChar(c)	(((c) < 0x100) ? \
+#define xmlIsPubidCharQ(c)	(((c) < 0x100) ? \
 				 xmlIsPubidChar_ch((c)) : 0)
 
+XMLPUBFUN int XMLCALL
+		xmlIsBaseChar(unsigned int ch);
+XMLPUBFUN int XMLCALL
+		xmlIsBlank(unsigned int ch);
+XMLPUBFUN int XMLCALL
+		xmlIsChar(unsigned int ch);
+XMLPUBFUN int XMLCALL
+		xmlIsCombining(unsigned int ch);
+XMLPUBFUN int XMLCALL
+		xmlIsDigit(unsigned int ch);
+XMLPUBFUN int XMLCALL
+		xmlIsExtender(unsigned int ch);
+XMLPUBFUN int XMLCALL
+		xmlIsIdeographic(unsigned int ch);
+XMLPUBFUN int XMLCALL
+		xmlIsPubidChar(unsigned int ch);
 
 #ifdef __cplusplus
 }
diff --git a/include/libxml/parserInternals.h b/include/libxml/parserInternals.h
index e66863b..f158531 100644
--- a/include/libxml/parserInternals.h
+++ b/include/libxml/parserInternals.h
@@ -70,7 +70,7 @@
  *                  | [#x10000-#x10FFFF]
  * any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
  */
-#define IS_CHAR(c)   xmlIsChar(c)
+#define IS_CHAR(c)   xmlIsCharQ(c)
 
 /**
  * IS_BLANK:
@@ -80,7 +80,7 @@
  *
  * [3] S ::= (#x20 | #x9 | #xD | #xA)+
  */
-#define IS_BLANK(c)  xmlIsBlank(c)
+#define IS_BLANK(c)  xmlIsBlankQ(c)
 
 /**
  * IS_BASECHAR:
@@ -90,7 +90,7 @@
  *
  * [85] BaseChar ::= ... long list see REC ...
  */
-#define IS_BASECHAR(c) xmlIsBaseChar(c)
+#define IS_BASECHAR(c) xmlIsBaseCharQ(c)
 
 /**
  * IS_DIGIT:
@@ -100,7 +100,7 @@
  *
  * [88] Digit ::= ... long list see REC ...
  */
-#define IS_DIGIT(c) xmlIsDigit(c)
+#define IS_DIGIT(c) xmlIsDigitQ(c)
 
 /**
  * IS_COMBINING:
@@ -110,7 +110,7 @@
  *
  * [87] CombiningChar ::= ... long list see REC ...
  */
-#define IS_COMBINING(c) xmlIsCombining(c)
+#define IS_COMBINING(c) xmlIsCombiningQ(c)
 
 /**
  * IS_EXTENDER:
@@ -123,7 +123,7 @@
  *                   #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] |
  *                   [#x309D-#x309E] | [#x30FC-#x30FE]
  */
-#define IS_EXTENDER(c) xmlIsExtender(c)
+#define IS_EXTENDER(c) xmlIsExtenderQ(c)
 
 /**
  * IS_IDEOGRAPHIC:
@@ -134,7 +134,7 @@
  *
  * [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
  */
-#define IS_IDEOGRAPHIC(c) xmlIsIdeographic(c)
+#define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c)
 
 /**
  * IS_LETTER:
@@ -157,7 +157,7 @@
  *
  * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
  */
-#define IS_PUBIDCHAR(c)	xmlIsPubidChar(c)
+#define IS_PUBIDCHAR(c)	xmlIsPubidCharQ(c)
 
 /**
  * SKIP_EOL:
diff --git a/parser.c b/parser.c
index 9c51cdc..17b8b1c 100644
--- a/parser.c
+++ b/parser.c
@@ -1457,7 +1457,7 @@
      * Characters referred to using character references must match the
      * production for Char. 
      */
-    if (xmlIsChar(val)) {
+    if (IS_CHAR(val)) {
         return(val);
     } else {
         xmlFatalErrMsgInt(ctxt, XML_ERR_INVALID_CHAR,
@@ -1541,7 +1541,7 @@
      * Characters referred to using character references must match the
      * production for Char. 
      */
-    if (xmlIsChar(val)) {
+    if (IS_CHAR(val)) {
         return(val);
     } else {
         xmlFatalErrMsgInt(ctxt, XML_ERR_INVALID_CHAR,
@@ -2817,11 +2817,11 @@
     }
 
     while ((c != ' ') && (c != '>') && (c != '/') && /* test bigname.xml */
-	   ((xmlIsLetter(c)) || (xmlIsDigit(c)) ||
+	   ((IS_LETTER(c)) || (IS_DIGIT(c)) ||
             (c == '.') || (c == '-') ||
 	    (c == '_') || (c == ':') || 
-	    (xmlIsCombining(c)) ||
-	    (xmlIsExtender(c)))) {
+	    (IS_COMBINING(c)) ||
+	    (IS_EXTENDER(c)))) {
 	if (count++ > 100) {
 	    count = 0;
 	    GROW;
@@ -2859,16 +2859,16 @@
     int c;
 
     c = CUR_SCHAR(cur, l);
-    if (!xmlIsLetter(c) && (c != '_') &&
+    if (!IS_LETTER(c) && (c != '_') &&
         (c != ':')) {
 	return(NULL);
     }
 
-    while ((xmlIsLetter(c)) || (xmlIsDigit(c)) || /* test bigentname.xml */
+    while ((IS_LETTER(c)) || (IS_DIGIT(c)) || /* test bigentname.xml */
            (c == '.') || (c == '-') ||
 	   (c == '_') || (c == ':') || 
-	   (xmlIsCombining(c)) ||
-	   (xmlIsExtender(c))) {
+	   (IS_COMBINING(c)) ||
+	   (IS_EXTENDER(c))) {
 	COPY_BUF(l,buf,len,c);
 	cur += l;
 	c = CUR_SCHAR(cur, l);
@@ -2886,12 +2886,12 @@
 		return(NULL);
 	    }
 	    memcpy(buffer, buf, len);
-	    while ((xmlIsLetter(c)) || (xmlIsDigit(c)) ||
+	    while ((IS_LETTER(c)) || (IS_DIGIT(c)) ||
 	             /* test bigentname.xml */
 		   (c == '.') || (c == '-') ||
 		   (c == '_') || (c == ':') || 
-		   (xmlIsCombining(c)) ||
-		   (xmlIsExtender(c))) {
+		   (IS_COMBINING(c)) ||
+		   (IS_EXTENDER(c))) {
 		if (len + 10 > max) {
 		    max *= 2;
 		    buffer = (xmlChar *) xmlRealloc(buffer,
@@ -2937,11 +2937,11 @@
     GROW;
     c = CUR_CHAR(l);
 
-    while ((xmlIsLetter(c)) || (xmlIsDigit(c)) || /* test bigtoken.xml */
+    while ((IS_LETTER(c)) || (IS_DIGIT(c)) || /* test bigtoken.xml */
            (c == '.') || (c == '-') ||
 	   (c == '_') || (c == ':') || 
-	   (xmlIsCombining(c)) ||
-	   (xmlIsExtender(c))) {
+	   (IS_COMBINING(c)) ||
+	   (IS_EXTENDER(c))) {
 	if (count++ > 100) {
 	    count = 0;
 	    GROW;
@@ -2963,11 +2963,11 @@
 		return(NULL);
 	    }
 	    memcpy(buffer, buf, len);
-	    while ((xmlIsLetter(c)) || (xmlIsDigit(c)) || /* test bigtoken.xml */
+	    while ((IS_LETTER(c)) || (IS_DIGIT(c)) || /* test bigtoken.xml */
 		   (c == '.') || (c == '-') ||
 		   (c == '_') || (c == ':') || 
-		   (xmlIsCombining(c)) ||
-		   (xmlIsExtender(c))) {
+		   (IS_COMBINING(c)) ||
+		   (IS_EXTENDER(c))) {
 		if (count++ > 100) {
 		    count = 0;
 		    GROW;
@@ -3048,7 +3048,7 @@
      * In practice it means we stop the loop only when back at parsing
      * the initial entity and the quote is found
      */
-    while ((xmlIsChar(c)) && ((c != stop) || /* checked */
+    while ((IS_CHAR(c)) && ((c != stop) || /* checked */
 	   (ctxt->input != input))) {
 	if (len + 5 >= size) {
 	    size *= 2;
@@ -3402,7 +3402,7 @@
     }
     ctxt->instate = XML_PARSER_SYSTEM_LITERAL;
     cur = CUR_CHAR(l);
-    while ((xmlIsChar(cur)) && (cur != stop)) { /* checked */
+    while ((IS_CHAR(cur)) && (cur != stop)) { /* checked */
 	if (len + 5 >= size) {
 	    size *= 2;
 	    buf = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar));
@@ -3428,7 +3428,7 @@
     }
     buf[len] = 0;
     ctxt->instate = (xmlParserInputState) state;
-    if (!xmlIsChar(cur)) {
+    if (!IS_CHAR(cur)) {
 	xmlFatalErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED, NULL);
     } else {
 	NEXT;
@@ -3636,7 +3636,7 @@
     cur = CUR_CHAR(l);
     while ((cur != '<') && /* checked */
            (cur != '&') && 
-	   (xmlIsChar(cur))) /* test also done in xmlCurrentChar() */ {
+	   (IS_CHAR(cur))) /* test also done in xmlCurrentChar() */ {
 	if ((cur == ']') && (NXT(1) == ']') &&
 	    (NXT(2) == '>')) {
 	    if (cdata) break;
@@ -3821,7 +3821,7 @@
     if (cur == 0)
         goto not_terminated;
     len = 0;
-    while (xmlIsChar(cur) && /* checked */
+    while (IS_CHAR(cur) && /* checked */
            ((cur != '>') ||
 	    (r != '-') || (q != '-'))) {
 	if ((r == '-') && (q == '-')) {
@@ -3856,7 +3856,7 @@
 	}
     }
     buf[len] = 0;
-    if (!xmlIsChar(cur)) {
+    if (!IS_CHAR(cur)) {
 	xmlFatalErrMsgStr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
 	                     "Comment not terminated \n<!--%.50s\n", buf);
 	xmlFree(buf);
@@ -4050,7 +4050,7 @@
 	    }
             SKIP_BLANKS;
 	    cur = CUR_CHAR(l);
-	    while (xmlIsChar(cur) && /* checked */
+	    while (IS_CHAR(cur) && /* checked */
 		   ((cur != '?') || (NXT(1) != '>'))) {
 		if (len + 5 >= size) {
 		    size *= 2;
@@ -7076,10 +7076,10 @@
     }
 
     while ((c != ' ') && (c != '>') && (c != '/') && /* test bigname.xml */
-	   ((xmlIsLetter(c)) || (xmlIsDigit(c)) ||
+	   ((IS_LETTER(c)) || (IS_DIGIT(c)) ||
             (c == '.') || (c == '-') || (c == '_') ||
-	    (xmlIsCombining(c)) ||
-	    (xmlIsExtender(c)))) {
+	    (IS_COMBINING(c)) ||
+	    (IS_EXTENDER(c)))) {
 	if (count++ > 100) {
 	    count = 0;
 	    GROW;
@@ -8016,14 +8016,14 @@
 
     ctxt->instate = XML_PARSER_CDATA_SECTION;
     r = CUR_CHAR(rl);
-    if (!xmlIsChar(r)) {
+    if (!IS_CHAR(r)) {
 	xmlFatalErr(ctxt, XML_ERR_CDATA_NOT_FINISHED, NULL);
 	ctxt->instate = XML_PARSER_CONTENT;
         return;
     }
     NEXTL(rl);
     s = CUR_CHAR(sl);
-    if (!xmlIsChar(s)) {
+    if (!IS_CHAR(s)) {
 	xmlFatalErr(ctxt, XML_ERR_CDATA_NOT_FINISHED, NULL);
 	ctxt->instate = XML_PARSER_CONTENT;
         return;
@@ -8035,7 +8035,7 @@
 	xmlErrMemory(ctxt, NULL);
 	return;
     }
-    while (xmlIsChar(cur) &&
+    while (IS_CHAR(cur) &&
            ((r != ']') || (s != ']') || (cur != '>'))) {
 	if (len + 5 >= size) {
 	    size *= 2;
diff --git a/python/libxml.c b/python/libxml.c
index 6f3ca8b..2860bca 100644
--- a/python/libxml.c
+++ b/python/libxml.c
@@ -1061,6 +1061,7 @@
     1,
     NULL,			/* TODO mograte to SAX2 */
     NULL,
+    NULL,
     NULL
 };
 
diff --git a/testHTML.c b/testHTML.c
index 4a6074a..5df5bb4 100644
--- a/testHTML.c
+++ b/testHTML.c
@@ -78,10 +78,11 @@
     NULL, /* getParameterEntity */
     NULL, /* cdataBlock */
     NULL, /* externalSubset */
-    1,
-    NULL,
-    NULL,
-    NULL
+    1,    /* initialized */
+    NULL, /* private */
+    NULL, /* startElementNsSAX2Func */
+    NULL, /* endElementNsSAX2Func */
+    NULL  /* xmlStructuredErrorFunc */
 };
 
 xmlSAXHandlerPtr emptySAXHandler = &emptySAXHandlerStruct;
@@ -604,6 +605,7 @@
     1,
     NULL,
     NULL,
+    NULL,
     NULL
 };
 
diff --git a/testSAX.c b/testSAX.c
index edd6d6a..8634b51 100644
--- a/testSAX.c
+++ b/testSAX.c
@@ -82,7 +82,8 @@
     1,
     NULL,
     NULL, /* startElementNs */
-    NULL /* endElementNs */
+    NULL, /* endElementNs */
+    NULL  /* xmlStructuredErrorFunc */
 };
 
 xmlSAXHandlerPtr emptySAXHandler = &emptySAXHandlerStruct;
@@ -694,6 +695,7 @@
     1,
     NULL,
     NULL,
+    NULL,
     NULL
 };
 
@@ -817,7 +819,8 @@
     XML_SAX2_MAGIC,
     NULL,
     startElementNsDebug,
-    endElementNsDebug
+    endElementNsDebug,
+    NULL
 };
 
 xmlSAXHandlerPtr debugSAX2Handler = &debugSAX2HandlerStruct;
diff --git a/tree.c b/tree.c
index bea5dfe..0eccfbd 100644
--- a/tree.c
+++ b/tree.c
@@ -377,13 +377,13 @@
 	    c = CUR_SCHAR(cur, l);
 	}
     }
-    if ((!xmlIsLetter(c)) && (c != '_'))
+    if ((!IS_LETTER(c)) && (c != '_'))
 	return(1);
     cur += l;
     c = CUR_SCHAR(cur, l);
-    while (xmlIsLetter(c) || xmlIsDigit(c) || (c == '.') ||
-	   (c == '-') || (c == '_') || xmlIsCombining(c) ||
-	   xmlIsExtender(c)) {
+    while (IS_LETTER(c) || IS_DIGIT(c) || (c == '.') ||
+	   (c == '-') || (c == '_') || IS_COMBINING(c) ||
+	   IS_EXTENDER(c)) {
 	cur += l;
 	c = CUR_SCHAR(cur, l);
     }
@@ -460,26 +460,26 @@
 	    c = CUR_SCHAR(cur, l);
 	}
     }
-    if ((!xmlIsLetter(c)) && (c != '_'))
+    if ((!IS_LETTER(c)) && (c != '_'))
 	return(1);
     cur += l;
     c = CUR_SCHAR(cur, l);
-    while (xmlIsLetter(c) || xmlIsDigit(c) || (c == '.') ||
-	   (c == '-') || (c == '_') || xmlIsCombining(c) ||
-	   xmlIsExtender(c)) {
+    while (IS_LETTER(c) || IS_DIGIT(c) || (c == '.') ||
+	   (c == '-') || (c == '_') || IS_COMBINING(c) ||
+	   IS_EXTENDER(c)) {
 	cur += l;
 	c = CUR_SCHAR(cur, l);
     }
     if (c == ':') {
 	cur += l;
 	c = CUR_SCHAR(cur, l);
-	if ((!xmlIsLetter(c)) && (c != '_'))
+	if ((!IS_LETTER(c)) && (c != '_'))
 	    return(1);
 	cur += l;
 	c = CUR_SCHAR(cur, l);
-	while (xmlIsLetter(c) || xmlIsDigit(c) || (c == '.') ||
-	       (c == '-') || (c == '_') || xmlIsCombining(c) ||
-	       xmlIsExtender(c)) {
+	while (IS_LETTER(c) || IS_DIGIT(c) || (c == '.') ||
+	       (c == '-') || (c == '_') || IS_COMBINING(c) ||
+	       IS_EXTENDER(c)) {
 	    cur += l;
 	    c = CUR_SCHAR(cur, l);
 	}
@@ -542,12 +542,12 @@
 	    c = CUR_SCHAR(cur, l);
 	}
     }
-    if ((!xmlIsLetter(c)) && (c != '_') && (c != ':'))
+    if ((!IS_LETTER(c)) && (c != '_') && (c != ':'))
 	return(1);
     cur += l;
     c = CUR_SCHAR(cur, l);
-    while (xmlIsLetter(c) || xmlIsDigit(c) || (c == '.') || (c == ':') ||
-	   (c == '-') || (c == '_') || xmlIsCombining(c) || xmlIsExtender(c)) {
+    while (IS_LETTER(c) || IS_DIGIT(c) || (c == '.') || (c == ':') ||
+	   (c == '-') || (c == '_') || IS_COMBINING(c) || IS_EXTENDER(c)) {
 	cur += l;
 	c = CUR_SCHAR(cur, l);
     }
@@ -611,13 +611,13 @@
 	    c = CUR_SCHAR(cur, l);
 	}
     }
-    if (!(xmlIsLetter(c) || xmlIsDigit(c) || (c == '.') || (c == ':') ||
-        (c == '-') || (c == '_') || xmlIsCombining(c) || xmlIsExtender(c)))
+    if (!(IS_LETTER(c) || IS_DIGIT(c) || (c == '.') || (c == ':') ||
+        (c == '-') || (c == '_') || IS_COMBINING(c) || IS_EXTENDER(c)))
 	return(1);
     cur += l;
     c = CUR_SCHAR(cur, l);
-    while (xmlIsLetter(c) || xmlIsDigit(c) || (c == '.') || (c == ':') ||
-	   (c == '-') || (c == '_') || xmlIsCombining(c) || xmlIsExtender(c)) {
+    while (IS_LETTER(c) || IS_DIGIT(c) || (c == '.') || (c == ':') ||
+	   (c == '-') || (c == '_') || IS_COMBINING(c) || IS_EXTENDER(c)) {
 	cur += l;
 	c = CUR_SCHAR(cur, l);
     }
diff --git a/xmlregexp.c b/xmlregexp.c
index 76635fe..0af5a7a 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -1832,16 +1832,16 @@
         case XML_REGEXP_NOTINITNAME:
 	    neg = !neg;
         case XML_REGEXP_INITNAME:
-	    ret = (xmlIsLetter(codepoint) || 
+	    ret = (IS_LETTER(codepoint) || 
 		   (codepoint == '_') || (codepoint == ':'));
 	    break;
         case XML_REGEXP_NOTNAMECHAR:
 	    neg = !neg;
         case XML_REGEXP_NAMECHAR:
-	    ret = (xmlIsLetter(codepoint) || xmlIsDigit(codepoint) ||
+	    ret = (IS_LETTER(codepoint) || IS_DIGIT(codepoint) ||
 		   (codepoint == '.') || (codepoint == '-') ||
 		   (codepoint == '_') || (codepoint == ':') ||
-		   xmlIsCombining(codepoint) || xmlIsExtender(codepoint));
+		   IS_COMBINING(codepoint) || IS_EXTENDER(codepoint));
 	    break;
         case XML_REGEXP_NOTDECIMAL:
 	    neg = !neg;
@@ -1981,7 +1981,7 @@
     int i, ret = 0;
     xmlRegRangePtr range;
 
-    if ((atom == NULL) || (!xmlIsChar(codepoint)))
+    if ((atom == NULL) || (!IS_CHAR(codepoint)))
 	return(-1);
 
     switch (atom->type) {