summaryrefslogtreecommitdiff
path: root/xmlwf
diff options
context:
space:
mode:
authorfdrake <fdrake>2002-08-26 17:20:48 +0000
committerfdrake <fdrake>2002-08-26 17:20:48 +0000
commit73f5d5719cc519c8635b317a12555606a0c075b5 (patch)
treeb8564dee5370e2955e4d23874bc8538f0a13b151 /xmlwf
parent2c3061dd9e22d9498a507de5c838b060093e06b7 (diff)
downloadlibexpat-73f5d5719cc519c8635b317a12555606a0c075b5.tar.gz
showVersion(): Use the new XML_GetFeatureList() function to list the
compile-time features as part of the "xmlwf -v" output.
Diffstat (limited to 'xmlwf')
-rwxr-xr-xxmlwf/xmlwf.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/xmlwf/xmlwf.c b/xmlwf/xmlwf.c
index 443624c..f88d2ac 100755
--- a/xmlwf/xmlwf.c
+++ b/xmlwf/xmlwf.c
@@ -586,6 +586,7 @@ showVersion(XML_Char *prog)
{
XML_Char *s = prog;
XML_Char ch;
+ const char **features = XML_GetFeatureList();
while ((ch = *s) != 0) {
if (ch == '/'
#ifdef WIN32
@@ -595,7 +596,18 @@ showVersion(XML_Char *prog)
prog = s + 1;
++s;
}
- ftprintf(stdout, T("%s using %s\n"), prog, XML_ExpatVersion());
+ ftprintf(stdout, T("%s using %s"), prog, XML_ExpatVersion());
+ if (features[0] == NULL)
+ ftprintf(stdout, T("\n"));
+ else {
+ int i = 1;
+ ftprintf(stdout, T(" (%s"), features[0]);
+ while (features[i] != NULL) {
+ ftprintf(stdout, T(", %s"), features[i]);
+ ++i;
+ }
+ ftprintf(stdout, T(")\n"));
+ }
}
static void