diff options
Diffstat (limited to 'addon/doxmlparser/examples/metrics/main.cpp')
-rw-r--r-- | addon/doxmlparser/examples/metrics/main.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/addon/doxmlparser/examples/metrics/main.cpp b/addon/doxmlparser/examples/metrics/main.cpp index 1328abe..9e301b1 100644 --- a/addon/doxmlparser/examples/metrics/main.cpp +++ b/addon/doxmlparser/examples/metrics/main.cpp @@ -22,6 +22,7 @@ #include <stdlib.h> #include <string.h> #include <doxmlintf.h> +#include "version.h" bool isDocumented(IDocRoot *brief,IDocRoot *detailed) { @@ -49,9 +50,25 @@ bool isDocumented(IDocRoot *brief,IDocRoot *detailed) int main(int argc,char **argv) { - if (argc!=2) + int locArgc = argc; + + if (locArgc == 2) + { + if (!strcmp(argv[1],"--help")) + { + printf("Usage: %s xml_dir\n",argv[0]); + exit(0); + } + else if (!strcmp(argv[1],"--version")) + { + printf("%s version: %s\n",argv[0],getFullVersion()); + exit(0); + } + } + + if (locArgc!=2) { - printf("Usage: %s xml_output_dir\n",argv[0]); + printf("Usage: %s xml_dir\n",argv[0]); exit(1); } |