summaryrefslogtreecommitdiffstats
path: root/src/config.l
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2014-02-05 12:45:42 (GMT)
committeralbert-github <albert.tests@gmail.com>2014-02-05 12:45:42 (GMT)
commitcfd8c2415e7d0744a00bf1990f26aab538940f20 (patch)
treeb346cfeaa18fe906fdb0635fe9468a3a982bc7cd /src/config.l
parent317c26a66f142e8f2322c6b0556dba80d679e6b9 (diff)
downloadDoxygen-cfd8c2415e7d0744a00bf1990f26aab538940f20.zip
Doxygen-cfd8c2415e7d0744a00bf1990f26aab538940f20.tar.gz
Doxygen-cfd8c2415e7d0744a00bf1990f26aab538940f20.tar.bz2
Better message in case doxygen -u is used
In case of obsolete or not configured entries in the Doxyfile and the option -u is used a message like: Warning: Tag `XML_DTD' at line 1821 of file Doxyfile has become obsolete. To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u" appears, but the item is removed from the Doxyfile. This patch updates the message (and improves layout) to: Warning: Tag `XML_DTD' at line 1821 of file `Doxyfile' has become obsolete. This tag has been removed.
Diffstat (limited to 'src/config.l')
-rw-r--r--src/config.l37
1 files changed, 28 insertions, 9 deletions
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;
}