summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2014-02-06 18:31:22 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2014-02-06 18:31:22 (GMT)
commit28914ebf0a00ad5d52ad9fd9d233d905bb257d8c (patch)
treec5e4adb4500d17b9d24f86bfd679b178c4a49744
parentb548260d5d50da112e64045d8c1b2cb6df3cda3a (diff)
parentcfd8c2415e7d0744a00bf1990f26aab538940f20 (diff)
downloadDoxygen-28914ebf0a00ad5d52ad9fd9d233d905bb257d8c.zip
Doxygen-28914ebf0a00ad5d52ad9fd9d233d905bb257d8c.tar.gz
Doxygen-28914ebf0a00ad5d52ad9fd9d233d905bb257d8c.tar.bz2
Merge pull request #109 from albert-github/feature/bug_update_msg
Better message in case doxygen -u is used
-rw-r--r--src/config.h5
-rw-r--r--src/config.l37
-rw-r--r--src/doxygen.cpp2
3 files changed, 32 insertions, 12 deletions
diff --git a/src/config.h b/src/config.h
index 3dcf8de..bb5d733 100644
--- a/src/config.h
+++ b/src/config.h
@@ -493,13 +493,14 @@ class Config
* \returns TRUE if successful, or FALSE if the string could not be
* parsed.
*/
- bool parseString(const char *fn,const char *str);
+ //bool parseString(const char *fn,const char *str);
+ bool parseString(const char *fn,const char *str,bool upd = FALSE);
/*! Parse a configuration file with name \a fn.
* \returns TRUE if successful, FALSE if the file could not be
* opened or read.
*/
- bool parse(const char *fn);
+ bool parse(const char *fn,bool upd = FALSE);
/*! Called from the constructor, will add doxygen's default options
* to the configuration object
diff --git a/src/config.l b/src/config.l
index 22deb4f..7d451b0 100644
--- a/src/config.l
+++ b/src/config.l
@@ -435,6 +435,7 @@ static QCString includeName;
static QStrList includePathList;
static QStack<ConfigFileState> includeStack;
static int includeDepth;
+static bool config_upd = FALSE;
static QCString tabSizeString;
static QCString maxInitLinesString;
@@ -672,15 +673,31 @@ static void readIncludeFile(const char *incName)
BEGIN(GetString);
break;
case ConfigOption::O_Obsolete:
- config_err("Warning: Tag `%s' at line %d of file %s has become obsolete.\n"
- "To avoid this warning please remove this line from your configuration "
- "file or upgrade it using \"doxygen -u\"\n", cmd.data(),yyLineNr,yyFileName.data());
+ if (config_upd)
+ {
+ config_err("Warning: Tag `%s' at line %d of file `%s' has become obsolete.\n"
+ " This tag has been removed.\n", cmd.data(),yyLineNr,yyFileName.data());
+ }
+ else
+ {
+ config_err("Warning: Tag `%s' at line %d of file `%s' has become obsolete.\n"
+ " To avoid this warning please remove this line from your configuration "
+ "file or upgrade it using \"doxygen -u\"\n", cmd.data(),yyLineNr,yyFileName.data());
+ }
BEGIN(SkipInvalid);
break;
case ConfigOption::O_Disabled:
- config_err("Warning: Tag `%s' at line %d of file %s belongs to an option that was not enabled at compile time.\n"
- "To avoid this warning please remove this line from your configuration "
- "file, upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", cmd.data(),yyLineNr,yyFileName.data());
+ if (config_upd)
+ {
+ config_err("Warning: Tag `%s' at line %d of file `%s' belongs to an option that was not enabled at compile time.\n"
+ " This tag has been removed.\n", cmd.data(),yyLineNr,yyFileName.data());
+ }
+ else
+ {
+ config_err("Warning: Tag `%s' at line %d of file `%s' belongs to an option that was not enabled at compile time.\n"
+ " To avoid this warning please remove this line from your configuration "
+ "file or upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", cmd.data(),yyLineNr,yyFileName.data());
+ }
BEGIN(SkipInvalid);
break;
}
@@ -1666,7 +1683,7 @@ static QCString configFileToString(const char *name)
return "";
}
-bool Config::parseString(const char *fn,const char *str)
+bool Config::parseString(const char *fn,const char *str,bool update)
{
config = Config::instance();
inputString = str;
@@ -1678,17 +1695,19 @@ bool Config::parseString(const char *fn,const char *str)
includeDepth = 0;
configYYrestart( configYYin );
BEGIN( Start );
+ config_upd = update;
configYYlex();
+ config_upd = FALSE;
inputString = 0;
return TRUE;
}
-bool Config::parse(const char *fn)
+bool Config::parse(const char *fn,bool update)
{
int retval;
encoding = "UTF-8";
printlex(yy_flex_debug, TRUE, __FILE__, fn);
- retval = parseString(fn,configFileToString(fn));
+ retval = parseString(fn,configFileToString(fn), update);
printlex(yy_flex_debug, FALSE, __FILE__, fn);
return retval;
}
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 1eac506..3f05396 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -10349,7 +10349,7 @@ void readConfiguration(int argc, char **argv)
}
- if (!Config::instance()->parse(configName))
+ if (!Config::instance()->parse(configName,updateConfig))
{
err("could not open or read configuration file %s!\n",configName);
cleanUpDoxygen();