mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-14 16:20:45 +00:00
showVersion(): Use the new XML_GetFeatureList() function to list the
compile-time features as part of the "xmlwf -v" output.
This commit is contained in:
parent
bb761420b6
commit
ce60dcf034
1 changed files with 13 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue