diff options
author | albert-github <albert.tests@gmail.com> | 2020-12-19 17:42:18 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2020-12-19 17:42:18 (GMT) |
commit | b320b14cdfee48a90a732304d6398eb388b1c975 (patch) | |
tree | 39c1e152ef11f0885cae4193da40ebc64981fec7 /addon/doxyapp | |
parent | 77a37d141d3603c0089bc4a231c9381c1bb7d707 (diff) | |
download | Doxygen-b320b14cdfee48a90a732304d6398eb388b1c975.zip Doxygen-b320b14cdfee48a90a732304d6398eb388b1c975.tar.gz Doxygen-b320b14cdfee48a90a732304d6398eb388b1c975.tar.bz2 |
Usage of version and help in addons
More consequent and consistent usage of help and version in addons.
Diffstat (limited to 'addon/doxyapp')
-rw-r--r-- | addon/doxyapp/doxyapp.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/addon/doxyapp/doxyapp.cpp b/addon/doxyapp/doxyapp.cpp index 3ec8fb2..2ee6566 100644 --- a/addon/doxyapp/doxyapp.cpp +++ b/addon/doxyapp/doxyapp.cpp @@ -38,6 +38,7 @@ #include "classlist.h" #include "config.h" #include "filename.h" +#include "version.h" class XRefDummyCodeGenerator : public CodeOutputInterface { @@ -225,7 +226,23 @@ int main(int argc,char **argv) { char cmd[256]; - if (argc<2) + int locArgc = argc; + + if (locArgc == 2) + { + if (!strcmp(argv[1],"--help")) + { + printf("Usage: %s [source_file | source_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 [source_file | source_dir]\n",argv[0]); exit(1); |