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

Fred L. Drake fdrake@users.sourceforge.net
Wed, 28 Aug 2002 21:54:06 -0700


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

Modified Files:
	xmlwf.c 
Log Message:
Revise the XML_GetFeatureList() function signature so that we maintain the
behavior that all strings returned from Expat are affected by the XML_UNICODE
and XML_UNICODE_WCHAR_T feature-test macros, and ensure that an application
that needs to determine what type of character data is returned can do so
with reasonable ease.


Index: xmlwf.c
===================================================================
RCS file: /cvsroot/expat/expat/xmlwf/xmlwf.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- xmlwf.c	27 Aug 2002 05:49:52 -0000	1.63
+++ xmlwf.c	29 Aug 2002 04:54:04 -0000	1.64
@@ -599,7 +599,7 @@
 {
   XML_Char *s = prog;
   XML_Char ch;
-  const char **features = XML_GetFeatureList();
+  const XML_Feature *features = XML_GetFeatureList();
   while ((ch = *s) != 0) {
     if (ch == '/'
 #ifdef WIN32
@@ -610,13 +610,13 @@
     ++s;
   }
   ftprintf(stdout, T("%s using %s"), prog, XML_ExpatVersion());
-  if (features[0] == NULL)
+  if (features == NULL || features[0].feature == XML_FEATURE_END)
     ftprintf(stdout, T("\n"));
   else {
     int i = 1;
-    ftprintf(stdout, T(" (%s"), features[0]);
-    while (features[i] != NULL) {
-      ftprintf(stdout, T(", %s"), features[i]);
+    ftprintf(stdout, T(" (%s"), features[0].name);
+    while (features[i].feature != XML_FEATURE_END) {
+      ftprintf(stdout, T(", %s"), features[i].name);
       ++i;
     }
     ftprintf(stdout, T(")\n"));