[Expat-checkins] expat/lib expat.h,1.28,1.29

Fred L. Drake fdrake@users.sourceforge.net
Wed Jul 31 15:11:05 2002


Update of /cvsroot/expat/expat/lib
In directory usw-pr-cvs1:/tmp/cvs-serv20847

Modified Files:
	expat.h 
Log Message:
Add definitions to support Boolean values in the Expat API.


Index: expat.h
===================================================================
RCS file: /cvsroot/expat/expat/lib/expat.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- expat.h	15 Jul 2002 19:57:34 -0000	1.28
+++ expat.h	31 Jul 2002 22:10:42 -0000	1.29
@@ -47,6 +47,11 @@
 typedef char XML_LChar;
 #endif /* XML_UNICODE */
 
+/* Should this be defined using stdbool.h when C99 is available? */
+typedef unsigned char XML_Bool;
+#define XML_TRUE   ((XML_Bool) 1)
+#define XML_FALSE  ((XML_Bool) 0)
+
 enum XML_Content_Type {
   XML_CTYPE_EMPTY = 1,
   XML_CTYPE_ANY,
@@ -265,6 +270,9 @@
    non-NULL. The publicId argument will be NULL unless a public
    identifier was provided. The notationName argument will have a
    non-NULL value only for unparsed entity declarations.
+
+   Note that is_parameter_entity can't be changed to XML_Bool, since
+   that would break binary compatibility.
 */
 typedef void (*XML_EntityDeclHandler) (void *userData,
                                        const XML_Char *entityName,