Add a -v option to cause xmlwf to report the version of Expat (hence the
version of xmlwf).
This commit is contained in:
parent
f762a852d9
commit
5ca5c566a6
@ -560,6 +560,19 @@ int notStandalone(void *userData)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
void showVersion(XML_Char *prog)
|
||||||
|
{
|
||||||
|
XML_Char *s = prog;
|
||||||
|
XML_Char ch;
|
||||||
|
while ((ch = *s) != 0) {
|
||||||
|
if (ch == '/' || ch == '\\')
|
||||||
|
prog = s + 1;
|
||||||
|
++s;
|
||||||
|
}
|
||||||
|
ftprintf(stdout, T("%s using %s\n"), prog, XML_ExpatVersion());
|
||||||
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
void usage(const XML_Char *prog)
|
void usage(const XML_Char *prog)
|
||||||
{
|
{
|
||||||
@ -654,6 +667,9 @@ int tmain(int argc, XML_Char **argv)
|
|||||||
i++;
|
i++;
|
||||||
j = 0;
|
j = 0;
|
||||||
break;
|
break;
|
||||||
|
case T('v'):
|
||||||
|
showVersion(argv[0]);
|
||||||
|
return 0;
|
||||||
case T('\0'):
|
case T('\0'):
|
||||||
if (j > 1) {
|
if (j > 1) {
|
||||||
i++;
|
i++;
|
||||||
|
Loading…
Reference in New Issue
Block a user