summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-08-06 14:12:24 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-08-06 14:12:24 (GMT)
commita5c248364478e289dc2173bce8d9b2e26d98177a (patch)
treea72721a4a696eaf0cdbdb37d50d8473d7837e619
parentf554f9e4e4d06002e65aa49afc4560671348a42b (diff)
parentf14ac330d5110ad9fa13f2c0ae732f3a31638efa (diff)
downloadDoxygen-a5c248364478e289dc2173bce8d9b2e26d98177a.zip
Doxygen-a5c248364478e289dc2173bce8d9b2e26d98177a.tar.gz
Doxygen-a5c248364478e289dc2173bce8d9b2e26d98177a.tar.bz2
Merge branch 'master' of github.com:doxygen/doxygen
-rw-r--r--src/configimpl.l161
-rw-r--r--src/markdown.cpp2
2 files changed, 82 insertions, 81 deletions
diff --git a/src/configimpl.l b/src/configimpl.l
index 832f95e..bcb5a8c 100644
--- a/src/configimpl.l
+++ b/src/configimpl.l
@@ -1321,7 +1321,9 @@ void Config::init()
void Config::checkAndCorrect()
{
- QCString &warnFormat = ConfigImpl_getString("WARN_FORMAT");
+ ConfigValues::instance().init();
+
+ QCString &warnFormat = Config_getString(WARN_FORMAT);
if (warnFormat.stripWhiteSpace().isEmpty())
{
warnFormat="$file:$line $text";
@@ -1343,7 +1345,7 @@ void Config::checkAndCorrect()
}
}
- QCString &manExtension = ConfigImpl_getString("MAN_EXTENSION");
+ QCString &manExtension = Config_getString(MAN_EXTENSION);
// set default man page extension if non is given by the user
if (manExtension.isEmpty())
@@ -1351,7 +1353,7 @@ void Config::checkAndCorrect()
manExtension=".3";
}
- QCString &paperType = ConfigImpl_getEnum("PAPER_TYPE");
+ QCString &paperType = Config_getEnum(PAPER_TYPE);
paperType=paperType.lower().stripWhiteSpace();
if (paperType.isEmpty() || paperType=="a4wide")
{
@@ -1364,14 +1366,14 @@ void Config::checkAndCorrect()
paperType="a4";
}
- QCString &outputLanguage=ConfigImpl_getEnum("OUTPUT_LANGUAGE");
+ QCString &outputLanguage=Config_getEnum(OUTPUT_LANGUAGE);
outputLanguage=outputLanguage.stripWhiteSpace();
if (outputLanguage.isEmpty())
{
outputLanguage = "English";
}
- QCString &htmlFileExtension=ConfigImpl_getString("HTML_FILE_EXTENSION");
+ QCString &htmlFileExtension=Config_getString(HTML_FILE_EXTENSION);
htmlFileExtension=htmlFileExtension.stripWhiteSpace();
if (htmlFileExtension.isEmpty())
{
@@ -1379,7 +1381,7 @@ void Config::checkAndCorrect()
}
// expand the relative stripFromPath values
- QStrList &stripFromPath = ConfigImpl_getList("STRIP_FROM_PATH");
+ QStrList &stripFromPath = Config_getList(STRIP_FROM_PATH);
char *sfp = stripFromPath.first();
if (sfp==0) // by default use the current path
{
@@ -1394,11 +1396,11 @@ void Config::checkAndCorrect()
}
// expand the relative stripFromPath values
- QStrList &stripFromIncPath = ConfigImpl_getList("STRIP_FROM_INC_PATH");
+ QStrList &stripFromIncPath = Config_getList(STRIP_FROM_INC_PATH);
cleanUpPaths(stripFromIncPath);
// Test to see if HTML header is valid
- QCString &headerFile = ConfigImpl_getString("HTML_HEADER");
+ QCString &headerFile = Config_getString(HTML_HEADER);
if (!headerFile.isEmpty())
{
QFileInfo fi(headerFile);
@@ -1410,7 +1412,7 @@ void Config::checkAndCorrect()
}
}
// Test to see if HTML footer is valid
- QCString &footerFile = ConfigImpl_getString("HTML_FOOTER");
+ QCString &footerFile = Config_getString(HTML_FOOTER);
if (!footerFile.isEmpty())
{
QFileInfo fi(footerFile);
@@ -1423,9 +1425,9 @@ void Config::checkAndCorrect()
}
// Test to see if MathJax code file is valid
- if (ConfigImpl_getBool("USE_MATHJAX"))
+ if (Config_getBool(USE_MATHJAX))
{
- QCString &MathJaxCodefile = ConfigImpl_getString("MATHJAX_CODEFILE");
+ QCString &MathJaxCodefile = Config_getString(MATHJAX_CODEFILE);
if (!MathJaxCodefile.isEmpty())
{
QFileInfo fi(MathJaxCodefile);
@@ -1436,7 +1438,7 @@ void Config::checkAndCorrect()
exit(1);
}
}
- QCString &path = ConfigImpl_getString("MATHJAX_RELPATH");
+ QCString &path = Config_getString(MATHJAX_RELPATH);
if (!path.isEmpty() && path.at(path.length()-1)!='/')
{
path+="/";
@@ -1445,7 +1447,7 @@ void Config::checkAndCorrect()
}
// Test to see if LaTeX header is valid
- QCString &latexHeaderFile = ConfigImpl_getString("LATEX_HEADER");
+ QCString &latexHeaderFile = Config_getString(LATEX_HEADER);
if (!latexHeaderFile.isEmpty())
{
QFileInfo fi(latexHeaderFile);
@@ -1457,7 +1459,7 @@ void Config::checkAndCorrect()
}
}
// Test to see if LaTeX footer is valid
- QCString &latexFooterFile = ConfigImpl_getString("LATEX_FOOTER");
+ QCString &latexFooterFile = Config_getString(LATEX_FOOTER);
if (!latexFooterFile.isEmpty())
{
QFileInfo fi(latexFooterFile);
@@ -1470,7 +1472,7 @@ void Config::checkAndCorrect()
}
// check include path
- QStrList &includePath = ConfigImpl_getList("INCLUDE_PATH");
+ QStrList &includePath = Config_getList(INCLUDE_PATH);
char *s=includePath.first();
while (s)
{
@@ -1481,7 +1483,7 @@ void Config::checkAndCorrect()
}
// check aliases
- QStrList &aliasList = ConfigImpl_getList("ALIASES");
+ QStrList &aliasList = Config_getList(ALIASES);
s=aliasList.first();
while (s)
{
@@ -1498,26 +1500,26 @@ void Config::checkAndCorrect()
}
// check if GENERATE_TREEVIEW and GENERATE_HTMLHELP are both enabled
- if (ConfigImpl_getBool("GENERATE_TREEVIEW") && ConfigImpl_getBool("GENERATE_HTMLHELP"))
+ if (Config_getBool(GENERATE_TREEVIEW) && Config_getBool(GENERATE_HTMLHELP))
{
err("When enabling GENERATE_HTMLHELP the tree view (GENERATE_TREEVIEW) should be disabled. I'll do it for you.\n");
- ConfigImpl_getBool("GENERATE_TREEVIEW")=FALSE;
+ Config_getBool(GENERATE_TREEVIEW)=FALSE;
}
- if (ConfigImpl_getBool("SEARCHENGINE") && ConfigImpl_getBool("GENERATE_HTMLHELP"))
+ if (Config_getBool(SEARCHENGINE) && Config_getBool(GENERATE_HTMLHELP))
{
err("When enabling GENERATE_HTMLHELP the search engine (SEARCHENGINE) should be disabled. I'll do it for you.\n");
- ConfigImpl_getBool("SEARCHENGINE")=FALSE;
+ Config_getBool(SEARCHENGINE)=FALSE;
}
// check if SEPARATE_MEMBER_PAGES and INLINE_GROUPED_CLASSES are both enabled
- if (ConfigImpl_getBool("SEPARATE_MEMBER_PAGES") && ConfigImpl_getBool("INLINE_GROUPED_CLASSES"))
+ if (Config_getBool(SEPARATE_MEMBER_PAGES) && Config_getBool(INLINE_GROUPED_CLASSES))
{
err("When enabling INLINE_GROUPED_CLASSES the SEPARATE_MEMBER_PAGES option should be disabled. I'll do it for you.\n");
- ConfigImpl_getBool("SEPARATE_MEMBER_PAGES")=FALSE;
+ Config_getBool(SEPARATE_MEMBER_PAGES)=FALSE;
}
// check dot image format
- QCString &dotImageFormat=ConfigImpl_getEnum("DOT_IMAGE_FORMAT");
+ QCString &dotImageFormat=Config_getEnum(DOT_IMAGE_FORMAT);
dotImageFormat=dotImageFormat.stripWhiteSpace();
if (dotImageFormat.isEmpty())
{
@@ -1529,7 +1531,7 @@ void Config::checkAndCorrect()
// dotImageFormat = "png";
//}
- QCString &dotFontName=ConfigImpl_getString("DOT_FONTNAME");
+ QCString &dotFontName=Config_getString(DOT_FONTNAME);
if (dotFontName=="FreeSans" || dotFontName=="FreeSans.ttf")
{
warn_uncond("doxygen no longer ships with the FreeSans font.\n"
@@ -1539,7 +1541,7 @@ void Config::checkAndCorrect()
// check dot path
- QCString &dotPath = ConfigImpl_getString("DOT_PATH");
+ QCString &dotPath = Config_getString(DOT_PATH);
if (!dotPath.isEmpty())
{
QFileInfo fi(dotPath);
@@ -1571,7 +1573,7 @@ void Config::checkAndCorrect()
}
// check plantuml path
- QCString &plantumlJarPath = ConfigImpl_getString("PLANTUML_JAR_PATH");
+ QCString &plantumlJarPath = Config_getString(PLANTUML_JAR_PATH);
if (!plantumlJarPath.isEmpty())
{
QFileInfo pu(plantumlJarPath);
@@ -1602,7 +1604,7 @@ void Config::checkAndCorrect()
}
// check dia path
- QCString &diaPath = ConfigImpl_getString("DIA_PATH");
+ QCString &diaPath = Config_getString(DIA_PATH);
if (!diaPath.isEmpty())
{
QFileInfo dp(diaPath+"/dia"+portable_commandExtension());
@@ -1626,7 +1628,7 @@ void Config::checkAndCorrect()
}
// check input
- QStrList &inputSources=ConfigImpl_getList("INPUT");
+ QStrList &inputSources=Config_getList(INPUT);
if (inputSources.count()==0)
{
// use current dir as the default
@@ -1647,7 +1649,7 @@ void Config::checkAndCorrect()
}
// add default file patterns if needed
- QStrList &filePatternList = ConfigImpl_getList("FILE_PATTERNS");
+ QStrList &filePatternList = Config_getList(FILE_PATTERNS);
if (filePatternList.isEmpty())
{
ConfigOption * opt = ConfigImpl::instance()->get("FILE_PATTERNS");
@@ -1658,65 +1660,65 @@ void Config::checkAndCorrect()
}
// add default pattern if needed
- QStrList &examplePatternList = ConfigImpl_getList("EXAMPLE_PATTERNS");
+ QStrList &examplePatternList = Config_getList(EXAMPLE_PATTERNS);
if (examplePatternList.isEmpty())
{
examplePatternList.append("*");
}
// if no output format is enabled, warn the user
- if (!ConfigImpl_getBool("GENERATE_HTML") &&
- !ConfigImpl_getBool("GENERATE_LATEX") &&
- !ConfigImpl_getBool("GENERATE_MAN") &&
- !ConfigImpl_getBool("GENERATE_RTF") &&
- !ConfigImpl_getBool("GENERATE_XML") &&
- !ConfigImpl_getBool("GENERATE_PERLMOD") &&
- !ConfigImpl_getBool("GENERATE_RTF") &&
- !ConfigImpl_getBool("GENERATE_DOCBOOK") &&
- !ConfigImpl_getBool("GENERATE_AUTOGEN_DEF") &&
- ConfigImpl_getString("GENERATE_TAGFILE").isEmpty()
+ if (!Config_getBool(GENERATE_HTML) &&
+ !Config_getBool(GENERATE_LATEX) &&
+ !Config_getBool(GENERATE_MAN) &&
+ !Config_getBool(GENERATE_RTF) &&
+ !Config_getBool(GENERATE_XML) &&
+ !Config_getBool(GENERATE_PERLMOD) &&
+ !Config_getBool(GENERATE_RTF) &&
+ !Config_getBool(GENERATE_DOCBOOK) &&
+ !Config_getBool(GENERATE_AUTOGEN_DEF) &&
+ Config_getString(GENERATE_TAGFILE).isEmpty()
)
{
warn_uncond("No output formats selected! Set at least one of the main GENERATE_* options to YES.\n");
}
// check HTMLHELP creation requirements
- if (!ConfigImpl_getBool("GENERATE_HTML") &&
- ConfigImpl_getBool("GENERATE_HTMLHELP"))
+ if (!Config_getBool(GENERATE_HTML) &&
+ Config_getBool(GENERATE_HTMLHELP))
{
warn_uncond("GENERATE_HTMLHELP=YES requires GENERATE_HTML=YES.\n");
}
// check QHP creation requirements
- if (ConfigImpl_getBool("GENERATE_QHP"))
+ if (Config_getBool(GENERATE_QHP))
{
- if (ConfigImpl_getString("QHP_NAMESPACE").isEmpty())
+ if (Config_getString(QHP_NAMESPACE).isEmpty())
{
err("GENERATE_QHP=YES requires QHP_NAMESPACE to be set. Using 'org.doxygen.doc' as default!.\n");
- ConfigImpl_getString("QHP_NAMESPACE")="org.doxygen.doc";
+ Config_getString(QHP_NAMESPACE)="org.doxygen.doc";
}
- if (ConfigImpl_getString("QHP_VIRTUAL_FOLDER").isEmpty())
+ if (Config_getString(QHP_VIRTUAL_FOLDER).isEmpty())
{
err("GENERATE_QHP=YES requires QHP_VIRTUAL_FOLDER to be set. Using 'doc' as default!\n");
- ConfigImpl_getString("QHP_VIRTUAL_FOLDER")="doc";
+ Config_getString(QHP_VIRTUAL_FOLDER)="doc";
}
}
- if (ConfigImpl_getBool("OPTIMIZE_OUTPUT_JAVA") && ConfigImpl_getBool("INLINE_INFO"))
+ if (Config_getBool(OPTIMIZE_OUTPUT_JAVA) && Config_getBool(INLINE_INFO))
{
// don't show inline info for Java output, since Java has no inline
// concept.
- ConfigImpl_getBool("INLINE_INFO")=FALSE;
+ Config_getBool(INLINE_INFO)=FALSE;
}
- int &depth = ConfigImpl_getInt("MAX_DOT_GRAPH_DEPTH");
+ int &depth = Config_getInt(MAX_DOT_GRAPH_DEPTH);
if (depth==0)
{
depth=1000;
}
- int &hue = ConfigImpl_getInt("HTML_COLORSTYLE_HUE");
+ int &hue = Config_getInt(HTML_COLORSTYLE_HUE);
if (hue<0)
{
hue=0;
@@ -1726,7 +1728,7 @@ void Config::checkAndCorrect()
hue=hue%360;
}
- int &sat = ConfigImpl_getInt("HTML_COLORSTYLE_SAT");
+ int &sat = Config_getInt(HTML_COLORSTYLE_SAT);
if (sat<0)
{
sat=0;
@@ -1735,7 +1737,7 @@ void Config::checkAndCorrect()
{
sat=255;
}
- int &gamma = ConfigImpl_getInt("HTML_COLORSTYLE_GAMMA");
+ int &gamma = Config_getInt(HTML_COLORSTYLE_GAMMA);
if (gamma<40)
{
gamma=40;
@@ -1745,16 +1747,16 @@ void Config::checkAndCorrect()
gamma=240;
}
- QCString mathJaxFormat = ConfigImpl_getEnum("MATHJAX_FORMAT");
+ QCString mathJaxFormat = Config_getEnum(MATHJAX_FORMAT);
if (!mathJaxFormat.isEmpty() && mathJaxFormat!="HTML-CSS" &&
mathJaxFormat!="NativeMML" && mathJaxFormat!="SVG")
{
err("Unsupported value for MATHJAX_FORMAT: Should be one of HTML-CSS, NativeMML, or SVG\n");
- ConfigImpl_getEnum("MATHJAX_FORMAT")="HTML-CSS";
+ Config_getEnum(MATHJAX_FORMAT)="HTML-CSS";
}
// add default words if needed
- QStrList &annotationFromBrief = ConfigImpl_getList("ABBREVIATE_BRIEF");
+ QStrList &annotationFromBrief = Config_getList(ABBREVIATE_BRIEF);
if (annotationFromBrief.isEmpty())
{
annotationFromBrief.append("The $name class");
@@ -1771,21 +1773,21 @@ void Config::checkAndCorrect()
}
// some default settings for vhdl
- if (ConfigImpl_getBool("OPTIMIZE_OUTPUT_VHDL") &&
- (ConfigImpl_getBool("INLINE_INHERITED_MEMB") ||
- ConfigImpl_getBool("INHERIT_DOCS") ||
- !ConfigImpl_getBool("HIDE_SCOPE_NAMES") ||
- !ConfigImpl_getBool("EXTRACT_PRIVATE") ||
- !ConfigImpl_getBool("EXTRACT_PACKAGE")
+ if (Config_getBool(OPTIMIZE_OUTPUT_VHDL) &&
+ (Config_getBool(INLINE_INHERITED_MEMB) ||
+ Config_getBool(INHERIT_DOCS) ||
+ !Config_getBool(HIDE_SCOPE_NAMES) ||
+ !Config_getBool(EXTRACT_PRIVATE) ||
+ !Config_getBool(EXTRACT_PACKAGE)
)
)
{
- bool b1 = ConfigImpl_getBool("INLINE_INHERITED_MEMB");
- bool b2 = ConfigImpl_getBool("INHERIT_DOCS");
- bool b3 = ConfigImpl_getBool("HIDE_SCOPE_NAMES");
- bool b4 = ConfigImpl_getBool("EXTRACT_PRIVATE");
- bool b5 = ConfigImpl_getBool("SKIP_FUNCTION_MACROS");
- bool b6 = ConfigImpl_getBool("EXTRACT_PACKAGE");
+ bool b1 = Config_getBool(INLINE_INHERITED_MEMB);
+ bool b2 = Config_getBool(INHERIT_DOCS);
+ bool b3 = Config_getBool(HIDE_SCOPE_NAMES);
+ bool b4 = Config_getBool(EXTRACT_PRIVATE);
+ bool b5 = Config_getBool(SKIP_FUNCTION_MACROS);
+ bool b6 = Config_getBool(EXTRACT_PACKAGE);
const char *s1,*s2,*s3,*s4,*s5,*s6;
if (b1) s1=" INLINE_INHERITED_MEMB = NO (was YES)\n"; else s1="";
if (b2) s2=" INHERIT_DOCS = NO (was YES)\n"; else s2="";
@@ -1799,15 +1801,15 @@ void Config::checkAndCorrect()
"%s%s%s%s%s%s",s1,s2,s3,s4,s5,s6
);
- ConfigImpl_getBool("INLINE_INHERITED_MEMB") = FALSE;
- ConfigImpl_getBool("INHERIT_DOCS") = FALSE;
- ConfigImpl_getBool("HIDE_SCOPE_NAMES") = TRUE;
- ConfigImpl_getBool("EXTRACT_PRIVATE") = TRUE;
- ConfigImpl_getBool("ENABLE_PREPROCESSING") = FALSE;
- ConfigImpl_getBool("EXTRACT_PACKAGE") = TRUE;
+ Config_getBool(INLINE_INHERITED_MEMB) = FALSE;
+ Config_getBool(INHERIT_DOCS) = FALSE;
+ Config_getBool(HIDE_SCOPE_NAMES) = TRUE;
+ Config_getBool(EXTRACT_PRIVATE) = TRUE;
+ Config_getBool(ENABLE_PREPROCESSING) = FALSE;
+ Config_getBool(EXTRACT_PACKAGE) = TRUE;
}
- checkFileName(ConfigImpl_getString("GENERATE_TAGFILE"),"GENERATE_TAGFILE");
+ checkFileName(Config_getString(GENERATE_TAGFILE),"GENERATE_TAGFILE");
#if 0 // TODO: this breaks test 25; SOURCEBROWSER = NO and SOURCE_TOOLTIPS = YES.
// So this and other regressions should be analysed and fixed before this can be enabled
@@ -1833,7 +1835,6 @@ void Config::checkAndCorrect()
}
#endif
- ConfigValues::instance().init();
}
@@ -1863,10 +1864,10 @@ void Config::postProcess(bool clearHeaderAndFooter, bool compare)
// refers to the files that we are supposed to parse.
if (clearHeaderAndFooter)
{
- ConfigImpl_getString("HTML_HEADER")="";
- ConfigImpl_getString("HTML_FOOTER")="";
- ConfigImpl_getString("LATEX_HEADER")="";
- ConfigImpl_getString("LATEX_FOOTER")="";
+ Config_getString(HTML_HEADER)="";
+ Config_getString(HTML_FOOTER)="";
+ Config_getString(LATEX_HEADER)="";
+ Config_getString(LATEX_FOOTER)="";
}
}
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 141b736..2cbdcb5 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -1982,7 +1982,7 @@ void writeOneLineHeaderOrRuler(GrowBuf &out,const char *data,int size)
out.addStr(data,size);
if (hasLineBreak(data,size))
{
- out.addStr("<br>");
+ out.addStr("<br>\n");
}
}
}