summaryrefslogtreecommitdiffstats
path: root/addon/doxyparse
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-12-21 14:00:28 (GMT)
committerGitHub <noreply@github.com>2020-12-21 14:00:28 (GMT)
commit7af8870a020ad2f85dccd041c04b83d6310337f1 (patch)
tree47701abdb00a4b3a8b7717364db009be3e2ac9bd /addon/doxyparse
parent0b220e70216bd68900019ecf175986d503922624 (diff)
parentb320b14cdfee48a90a732304d6398eb388b1c975 (diff)
downloadDoxygen-7af8870a020ad2f85dccd041c04b83d6310337f1.zip
Doxygen-7af8870a020ad2f85dccd041c04b83d6310337f1.tar.gz
Doxygen-7af8870a020ad2f85dccd041c04b83d6310337f1.tar.bz2
Merge pull request #8263 from albert-github/feature/bug_addon_version
Usage of version and help 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 b5fbcb3..df9069b 100644
--- a/addon/doxyparse/doxyparse.cpp
+++ b/addon/doxyparse/doxyparse.cpp
@@ -426,15 +426,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();