From b0572abe0c3e8dc47551638da45b31ee37153ea6 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 15 Sep 2013 19:50:40 +0200 Subject: Usage of the -d opion corrected Giving an error when a wrong -d option is given. Made some error mesages more consistent. Corrected usage of the exit call, in case of an error: exit(1) otherwise exit(0). A closer look should be made on exitDoxygen as it does not contain any exit statements and it is unclear (to me) when it is used. --- src/debug.cpp | 4 +++- src/debug.h | 2 +- src/doxygen.cpp | 34 ++++++++++++++++++++++++++-------- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/src/debug.cpp b/src/debug.cpp index c962214..c67ce22 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -97,9 +97,11 @@ static int labelToEnumValue(const char *l) if (event) return *event; else return 0; } -void Debug::setFlag(const char *lab) +int Debug::setFlag(const char *lab) { + int retVal = labelToEnumValue(lab); curMask = (DebugMask)(curMask | labelToEnumValue(lab)); + return retVal; } void Debug::clearFlag(const char *lab) diff --git a/src/debug.h b/src/debug.h index bcac588..0893278 100644 --- a/src/debug.h +++ b/src/debug.h @@ -39,7 +39,7 @@ class Debug FilterOutput = 0x00001000 }; static void print(DebugMask mask,int prio,const char *fmt,...); - static void setFlag(const char *label); + static int setFlag(const char *label); static void clearFlag(const char *label); static bool isFlagSet(DebugMask mask); static void setPriority(int p); diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 972d758..dff1882 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -9784,7 +9784,6 @@ static void usage(const char *name) msg(" RTF: %s -e rtf extensionsFile\n\n",name); msg("If -s is specified the comments of the configuration items in the config file will be omitted.\n"); msg("If configName is omitted `Doxyfile' will be used as a default.\n\n"); - exit(1); } //---------------------------------------------------------------------------- @@ -9977,6 +9976,7 @@ void readConfiguration(int argc, char **argv) bool shortList=FALSE; bool updateConfig=FALSE; bool genLayout=FALSE; + int retVal; while (optind