[Expat-checkins] expat/lib xmlparse.c,1.55,1.56

fdrake@users.sourceforge.net fdrake@users.sourceforge.net
Thu Jul 25 07:48:05 2002


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

Modified Files:
	xmlparse.c 
Log Message:
Add a whine about the C preprocessor abuse used in this file.
Wrap most of the longer lines so fit in less than 80 columns (required
for OS/400 support).


Index: xmlparse.c
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- xmlparse.c	22 Jul 2002 13:32:37 -0000	1.55
+++ xmlparse.c	25 Jul 2002 14:47:45 -0000	1.56
@@ -832,6 +832,11 @@
 #endif
   int oldns_triplets = ns_triplets;
 
+  /* Note that the magical uses of the pre-processor to make field
+     access look more like C++ require that `parser' be overwritten
+     here.  This makes this function more painful to follow than it
+     would be otherwise.
+  */
   if (ns) {
     XML_Char tmp[2];
 
@@ -2769,9 +2774,9 @@
 
 static enum XML_Error
 externalParEntInitProcessor(XML_Parser parser,
-                    const char *s,
-                    const char *end,
-                    const char **nextPtr)
+                            const char *s,
+                            const char *end,
+                            const char **nextPtr)
 {
   enum XML_Error result = initializeEncoding(parser);
   if (result != XML_ERROR_NONE)
@@ -2794,9 +2799,9 @@
 
 static enum XML_Error
 entityValueInitProcessor(XML_Parser parser,
-                const char *s,
-                const char *end,
-                const char **nextPtr)
+                         const char *s,
+                         const char *end,
+                         const char **nextPtr)
 {
   const char *start = s;
   const char *next = s;
@@ -2848,9 +2853,9 @@
 
 static enum XML_Error
 externalParEntProcessor(XML_Parser parser,
-                const char *s,
-                const char *end,
-                const char **nextPtr)
+                        const char *s,
+                        const char *end,
+                        const char **nextPtr)
 {
   const char *start = s;
   const char *next = s;
@@ -2889,9 +2894,9 @@
 
 static enum XML_Error
 entityValueProcessor(XML_Parser parser,
-                const char *s,
-                const char *end,
-                const char **nextPtr)
+                     const char *s,
+                     const char *end,
+                     const char **nextPtr)
 {
   const char *start = s;
   const char *next = s;
@@ -2952,10 +2957,14 @@
   static const XML_Char atypeIDREF[] = { 'I', 'D', 'R', 'E', 'F', '\0' };
   static const XML_Char atypeIDREFS[] = { 'I', 'D', 'R', 'E', 'F', 'S', '\0' };
   static const XML_Char atypeENTITY[] = { 'E', 'N', 'T', 'I', 'T', 'Y', '\0' };
-  static const XML_Char atypeENTITIES[] = { 'E', 'N', 'T', 'I', 'T', 'I', 'E', 'S', '\0' };
-  static const XML_Char atypeNMTOKEN[] = { 'N', 'M', 'T', 'O', 'K', 'E', 'N', '\0' };
-  static const XML_Char atypeNMTOKENS[] = { 'N', 'M', 'T', 'O', 'K', 'E', 'N', 'S', '\0' };
-  static const XML_Char notationPrefix[] = { 'N', 'O', 'T', 'A', 'T', 'I', 'O', 'N', '(', '\0' };
+  static const XML_Char atypeENTITIES[] =
+      { 'E', 'N', 'T', 'I', 'T', 'I', 'E', 'S', '\0' };
+  static const XML_Char atypeNMTOKEN[] = {
+      'N', 'M', 'T', 'O', 'K', 'E', 'N', '\0' };
+  static const XML_Char atypeNMTOKENS[] = {
+      'N', 'M', 'T', 'O', 'K', 'E', 'N', 'S', '\0' };
+  static const XML_Char notationPrefix[] = {
+      'N', 'O', 'T', 'A', 'T', 'I', 'O', 'N', '(', '\0' };
   static const XML_Char enumValueSep[] = { '|', '\0' };
   static const XML_Char enumValueStart[] = { '(', '\0' };