[Expat-checkins] expat/xmlwf xmlwf.c,1.64,1.65

Fred L. Drake fdrake@users.sourceforge.net
Wed, 04 Sep 2002 18:48:28 -0700


Update of /cvsroot/expat/expat/xmlwf
In directory usw-pr-cvs1:/tmp/cvs-serv24507/xmlwf

Modified Files:
	xmlwf.c 
Log Message:
Elaborate the XML_GetFeatureList() API a bit, and add additional info
that may be needed by a hughly flexible client.  (Or at least used to check
that the Expat that it links to matches client expectations.)


Index: xmlwf.c
===================================================================
RCS file: /cvsroot/expat/expat/xmlwf/xmlwf.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- xmlwf.c	29 Aug 2002 04:54:04 -0000	1.64
+++ xmlwf.c	5 Sep 2002 01:48:26 -0000	1.65
@@ -609,17 +609,19 @@
       prog = s + 1;
     ++s;
   }
-  ftprintf(stdout, T("%s using %s"), prog, XML_ExpatVersion());
-  if (features == NULL || features[0].feature == XML_FEATURE_END)
-    ftprintf(stdout, T("\n"));
-  else {
+  ftprintf(stdout, T("%s using %s\n"), prog, XML_ExpatVersion());
+  if (features != NULL && features[0].feature != XML_FEATURE_END) {
     int i = 1;
-    ftprintf(stdout, T(" (%s"), features[0].name);
+    ftprintf(stdout, T("%s"), features[0].name);
+    if (features[0].value)
+      ftprintf(stdout, T("=%ld"), features[0].value);
     while (features[i].feature != XML_FEATURE_END) {
       ftprintf(stdout, T(", %s"), features[i].name);
+      if (features[i].value)
+        ftprintf(stdout, T("=%ld"), features[i].value);
       ++i;
     }
-    ftprintf(stdout, T(")\n"));
+    ftprintf(stdout, T("\n"));
   }
 }