summaryrefslogtreecommitdiffstats
path: root/addon/doxyparse
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2020-12-19 17:42:18 (GMT)
committeralbert-github <albert.tests@gmail.com>2020-12-19 17:42:18 (GMT)
commitb320b14cdfee48a90a732304d6398eb388b1c975 (patch)
tree39c1e152ef11f0885cae4193da40ebc64981fec7 /addon/doxyparse
parent77a37d141d3603c0089bc4a231c9381c1bb7d707 (diff)
downloadDoxygen-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/doxyparse')
-rw-r--r--addon/doxyparse/doxyparse.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/addon/doxyparse/doxyparse.cpp b/addon/doxyparse/doxyparse.cpp
index 4235bf3..9a99549 100644
--- a/addon/doxyparse/doxyparse.cpp
+++ b/addon/doxyparse/doxyparse.cpp
@@ -431,15 +431,27 @@ static void listSymbols() {
}
int main(int argc,char **argv) {
- 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);
}
- if (qstrcmp(&argv[1][2], "version") == 0) {
- QCString versionString = getDoxygenVersion();
- printf("%s\n", versionString.data());
- exit(0);
- }
// initialize data structures
initDoxygen();