12%option never-interactive
13%option prefix="configimplYY"
45#define YY_NO_UNISTD_H 1
48#define SHOW_INCLUDES 0
57 fmt::print(stderr,
"{}{}",
error_str,fmt::vformat(
fmt,args));
62 fmt::print(stderr,
"{}{}",
error_str,fmt::vformat(
fmt,args));
63 fmt::print(stderr,
"{}\n",
"Exiting...");
79#define MAX_INCLUDE_DEPTH 10
80#define YY_NEVER_INTERACTIVE 1
91 const char *p=tmp.
data();
117 if (!result.
empty()) result+=
'\n';
125 if (initSpace) t <<
" ";
126 if (v) t <<
"YES";
else t <<
"NO";
131 if (initSpace) t <<
" ";
138 bool needsEscaping=wasQuoted;
141 if (se.
empty())
return;
142 const char *p=se.
data();
145 if (initSpace) t <<
" ";
146 while ((c=*p++)!=0 && !needsEscaping)
147 needsEscaping = (c==
' ' || c==
',' || c==
'\n' || c==
'\t' || c==
'"' || c==
'#');
154 if (*p==
' ' && *(p+1)==
'\0')
break;
155 if (*p==
'"') t <<
"\\";
170 for (
const auto &p : l)
172 if (!first) t <<
" \\\n";
176 bool wasQuoted = ((s.
at(0)==
'"') && (s.
at(s.
length()-1)==
'"'));
201 if (!ok || val<m_minVal || val>
m_maxVal)
219 if (val==
"yes" || val==
"true" || val==
"1" || val==
"all")
224 else if (val==
"no" || val==
"false" || val==
"0" || val==
"none")
269 if (s.lower() == val)
283 auto it =
m_dict.find(name);
286 config_term(
"{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
290 config_term(
"{}<{}>: Internal error: Requested option {} not of string type!\n",fileName,num,name);
292 return *(
dynamic_cast<ConfigString *
>(it->second))->valueRef();
297 auto it =
m_dict.find(name);
300 config_term(
"{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
304 config_term(
"{}<{}>: Internal error: Requested option {} not of list type!\n",fileName,num,name);
306 return *(
dynamic_cast<ConfigList *
>(it->second))->valueRef();
311 auto it =
m_dict.find(name);
314 config_term(
"{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
318 config_term(
"{}<{}>: Internal error: Requested option {} not of enum type!\n",fileName,num,name);
320 return *(
dynamic_cast<ConfigEnum *
>(it->second))->valueRef();
325 auto it =
m_dict.find(name);
328 config_term(
"{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
332 config_term(
"{}<{}>: Internal error: Requested option {} not of integer type!\n",fileName,num,name);
334 return *(
dynamic_cast<ConfigInt *
>(it->second))->valueRef();
339 auto it =
m_dict.find(name);
342 config_term(
"{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
346 config_term(
"{}<{}>: Internal error: Requested option {} not of boolean type!\n",fileName,num,name);
348 return *(
dynamic_cast<ConfigBool *
>(it->second))->valueRef();
359 t <<
"#---------------------------------------------------------------------------\n";
360 t <<
"# " <<
m_doc <<
"\n";
361 t <<
"#---------------------------------------------------------------------------\n";
384 auto is_not_empty = [get_stripped](
const std::string &s) {
return !get_stripped(s).empty(); };
385 size_t defCnt = std::count_if(
m_value.begin(),
m_value.end(),is_not_empty);
387 if ( valCnt != defCnt)
396 while (it1!=
m_value.end() && !is_not_empty(*it1))
402 if (get_stripped(*it1) != get_stripped(*it2))
420 t <<
" <option id='" <<
m_name <<
"'";
421 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
422 t <<
" type='stringlist'";
439 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
466 t <<
" <option id='" <<
m_name <<
"'";
467 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
468 t <<
" type='string'";
478 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
505 t <<
" <option id='" <<
m_name <<
"'";
506 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
507 t <<
" type='string'";
519 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
553 t <<
" <option id='" <<
m_name <<
"'";
554 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
565 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
581 t <<
m_name << spaces <<
"=";
600 t <<
" <option id='" <<
m_name <<
"'";
601 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
612 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
620 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
653#define unput_string(yytext,yyleng) do { for (int i=(int)yyleng-1;i>=0;i--) unput(yytext[i]); } while(0)
657#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
661#define LEX_NO_REENTRANT
680 return static_cast<int>(fread(buf,1,max_size,
g_includeStack.back()->filePtr));
690 if (inputEncoding.
empty() || outputEncoding.
empty() || inputEncoding==outputEncoding)
return str;
691 size_t inputSize=str.
length();
692 size_t outputSize=inputSize*4;
695 if (cd==
reinterpret_cast<void *
>(-1))
698 "Check the 'DOXYFILE_ENCODING' setting in the config file!\n",
699 inputEncoding,outputEncoding);
701 size_t iLeft=inputSize;
702 size_t oLeft=outputSize;
703 const char *inputPtr = str.
data();
704 char *outputPtr = output.
rawData();
708 output.
resize(outputSize);
709 output.
at(outputSize)=
'\0';
715 inputEncoding,outputEncoding,strerror(errno));
730 bool insideQuote=
false;
732 for (
size_t i=0;i<l;i++)
741 insideQuote=!insideQuote;
743 else if (!insideQuote && c==
'#')
745 if (i<l-1 && s.
at(i+1)==
'#')
770 if (l>=2 && s.
at(0)==
'"' && s.
at(l-1)==
'"' &&
771 (s.
at(l-2)!=
'\\' || (s.
at(l-2)==
'\\' && s.
at(l-3)==
'\\')))
780 for (
size_t i=0;i<l;i++)
785 if (i<l-1 && s.
at(i+1)==
'"')
825 bool allowCommaAsSeparator =
g_cmd!=
"PREDEFINED";
834 auto addElem = [&elemStr,&wasQuote]()
836 if (!elemStr.
empty())
840 if (wasQuote) e =
"\""+e+
"\"";
847 bool needsSeparator=
false;
848 bool insideQuote=
false;
850 for (
size_t i=0;i<l;i++)
853 if (!needsSeparator && c==
'\\')
855 if (i<l-1 && s.
at(i+1)==
'"')
859 else if (insideQuote && i<l-2 && s.
at(i+1)==
'\\' && s.
at(i+2)==
'"')
873 else if (!needsSeparator && c==
'"')
886 else if (!insideQuote && ((c==
',' && allowCommaAsSeparator) || isspace(c)))
888 needsSeparator=
false;
897 ConfigImpl::config_warn(
"Invalid value for '{}' tag at line {}, file {}: Values in list '{}' are not properly space {}separated\n",
901 needsSeparator=
false;
915 ConfigImpl::config_warn(
"Invalid value for '{}' tag at line {}, file {}: Values in list '{}' are not properly quoted\n",
922 DString absName=(!path.
empty() ? path+
"/"+fileName : fileName);
938 if (fileName.
empty())
966 size_t incLen = inc.
length();
967 if (incLen>0 && inc.
at(0)==
'"' && inc.
at(incLen-1)==
'"')
969 inc=inc.
mid(1,incLen-2);
979 msg(
"@INCLUDE = {}: parsing...\n",inc);
991 yy_switch_to_buffer(yy_create_buffer(f,
YY_BUF_SIZE));
Class representing a Boolean type option.
void writeTemplate(TextStream &t, bool sl, bool upd) override
bool isDefault() override
void writeXMLDoxyfile(TextStream &t) override
void writeXSDDoxyfile(TextStream &t) override
void compareDoxyfile(TextStream &t, Config::CompareMode compareMode) override
void convertStrToVal(Config::CompareMode compareMode) override
void writeXSDDoxyfile(TextStream &) override
void writeTemplate(TextStream &, bool, bool) override
Class representing an enum type option.
void writeTemplate(TextStream &t, bool sl, bool) override
void writeXSDDoxyfile(TextStream &t) override
void compareDoxyfile(TextStream &t, Config::CompareMode compareMode) override
bool isDefault() override
void writeXMLDoxyfile(TextStream &t) override
std::vector< DString > m_valueRange
void convertStrToVal(Config::CompareMode compareMode) override
Singleton for configuration variables.
static void config_term(fmt::format_string< Args... > fmt, Args &&... args)
static void config_err(fmt::format_string< Args... > fmt, Args &&... args)
static void config_term_(fmt::string_view fmt, fmt::format_args args)
DString & getEnum(const char *fileName, int num, const char *name) const
StringVector & getList(const char *fileName, int num, const char *name) const
static void config_err_(fmt::string_view fmt, fmt::format_args args)
static void config_warn(fmt::format_string< Args... > fmt, Args &&... args)
DString & getString(const char *fileName, int num, const char *name) const
static std::unique_ptr< ConfigImpl > m_instance
static void config_warn_(fmt::string_view fmt, fmt::format_args args)
bool & getBool(const char *fileName, int num, const char *name) const
int & getInt(const char *fileName, int num, const char *name) const
ConfigOption * get(const DString &name) const
void appendUserComment(const DString &u)
void writeTemplate(TextStream &t, bool sl, bool) override
Class representing an integer type option.
bool isDefault() override
void writeXMLDoxyfile(TextStream &t) override
void convertStrToVal(Config::CompareMode compareMode) override
void writeXSDDoxyfile(TextStream &t) override
void compareDoxyfile(TextStream &t, Config::CompareMode compareMode) override
void writeTemplate(TextStream &t, bool sl, bool upd) override
Class representing a list type option.
void writeTemplate(TextStream &t, bool sl, bool) override
bool isDefault() override
StringVector m_defaultValue
void writeXMLDoxyfile(TextStream &t) override
void writeXSDDoxyfile(TextStream &t) override
void compareDoxyfile(TextStream &t, Config::CompareMode compareMode) override
void writeTemplate(TextStream &, bool, bool) override
void writeIntValue(TextStream &t, int i, bool initSpace=true)
void writeStringList(TextStream &t, const StringVector &l)
void writeStringValue(TextStream &t, const DString &s, bool initSpace=true, bool wasQuoted=false)
@ O_Enum
A fixed set of items.
void writeBoolValue(TextStream &t, bool v, bool initSpace=true)
Class representing a string type option.
bool isDefault() override
void writeXSDDoxyfile(TextStream &t) override
void writeXMLDoxyfile(TextStream &t) override
void writeTemplate(TextStream &t, bool sl, bool) override
void compareDoxyfile(TextStream &t, Config::CompareMode compareMode) override
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
void resize(size_t newlen)
DString mid(size_t index, size_t len=npos) const
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
char * rawData()
Returns a writable pointer to the data.
char & at(size_t i)
Returns a reference to the character at index i.
int toInt(bool *ok=nullptr, int base=10) const
DString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
DString left(size_t len) const
const std::string & str() const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Minimal replacement for QFileInfo.
Text streaming class that buffers data.
static void processList()
static FILE * tryPath(const DString &path, const DString &fileName)
static void substEnvVarsInString(DString &s)
static void checkEncoding()
static const char * g_inputString
static DString stripComment(const DString &s)
static const char * warning_str
static void readIncludeFile(const DString &incName)
static std::vector< std::unique_ptr< ConfigFileState > > g_includeStack
static void processString()
static void processStoreRepl(DString &storeReplStr)
static int g_inputPosition
#define MAX_INCLUDE_DEPTH
static const char * stateToString(int state)
static bool containsEnvVar(DString &str)
static StringVector * g_list
static FILE * findFile(const DString &fileName)
static bool g_configUpdate
static StringVector g_includePathList
static void substEnvVarsInStrList(StringVector &sl)
static DString g_localStoreRepl
static DString configStringRecode(const DString &str, const DString &fromEncoding, const DString &toEncoding)
static bool convertStringToBool(const DString &str, bool &isValid)
static Config::CompareMode g_compareMode
static DString g_yyFileName
static DString * g_string
static ConfigImpl * g_config
static const char * getLexerFILE()
static DString convertToComment(const DString &s, const DString &u)
static int yyread(char *buf, int max_size)
static const char * error_str
static DString g_encoding
std::vector< std::string > StringVector
bool isAbsolutePath(const DString &fileName)
FILE * fopen(const DString &fileName, const DString &mode)
Portable versions of functions that are platform dependent.
int portable_iconv_close(void *cd)
size_t portable_iconv(void *cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
void * portable_iconv_open(const char *tocode, const char *fromcode)
1006REGEX_a [a-z_A-Z\x80-\xFF]
1007REGEX_w [a-z_A-Z0-9\x80-\xFF]
1032<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"=" {
g_cmd=yytext;
1045 switch(option->
kind())
1086 " To avoid this warning please remove this line from your configuration "
1107 ConfigImpl::config_warn(
"Tag '{}' at line {} of file '{}' belongs to an option that was not enabled at compile time.\n"
1112 ConfigImpl::config_warn(
"Tag '{}' at line {} of file '{}' belongs to an option that was not enabled at compile time.\n"
1113 " To avoid this warning please remove this line from your configuration "
DString takeUserComment()
Section marker for obsolete options.
Abstract base class for any configuration option.
void setEncoding(const DString &e)
void setUserComment(const DString &u)
@ O_Disabled
Disabled compile time option.
@ O_Obsolete
An obsolete option.
@ O_Info
A section header.
1121<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"+=" {
g_cmd=yytext;
1133 switch(option->
kind())
1154 "To avoid this warning please update your configuration "
1168 ConfigImpl::config_warn(
"Tag '{}' at line {} of file {} belongs to an option that was not enabled at compile time.\n"
1169 "To avoid this warning please remove this line from your configuration "
1170 "file, upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n",
1182<Start>"@INCLUDE"[ \t]*"=" { BEGIN(Include);}
1183<Start>"$("{REGEX_a}({REGEX_w}|[.-])*")" |
1184<Start>"$("{REGEX_a}({REGEX_w}|[.-])*"("{REGEX_a}({REGEX_w}|[.-])*"))" {
1196<Start>"@"{REGEX_a}{REGEX_w}*"@" {
1208<Include>([^ \"\t\r\n]+)|("\""[^\n\"]+"\"") {
1224 YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER;
1225 yy_switch_to_buffer( fs->oldState );
1226 yy_delete_buffer( oldBuf );
void appendStoreRepl(const DString &u)
1250<StoreRepl>[^\n\\]+ {
1265<GetString>[^\n\\]+ {
1281<GetStrList>[^\n\\]+ {
1294<SkipInvalid>[^\n\\]+ {
1303 if (isprint(yytext[0]))
1321 t <<
"# Doxyfile " << getDoxygenVersion() <<
"\n\n";
1340 t <<
"# Difference with default Doxyfile " << getFullVersion();
1356 t <<
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
1357 t <<
"<doxyfile xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"doxyfile.xsd\" version=\"" << getDoxygenVersion() <<
"\" xml:lang=\"" <<
theTranslator->
trISOLang() <<
"\">\n";
1362 t <<
"</doxyfile>\n";
1400 std::string s = str.
str();
1406 if (str.
empty())
return;
1407 auto replace = [](
const std::string &s,
const reg::Ex &re) -> std::string
1413 for (; it!=
end ; ++it)
1415 const auto &match = *it;
1416 size_t i = match.position();
1417 size_t l = match.length();
1418 result+=s.substr(p,i-p);
1419 std::string matchContents = match[1].str();
1425 result+=s.substr(p);
1435 for (
const auto &s : sl)
1438 bool wasQuoted = ((result.
at(0)==
'"') && (result.
at(result.
length()-1)==
'"'));
1441 result = result.
mid(1,result.
length()-2);
1458 int l =
static_cast<int>(result.
length());
1462 for (
int i=0;i<l;i++)
1466 while (i<l && ((c=result.
at(i))==
' ' || c==
'\t')) i++;
1469 while (i<l && ((c=result.
at(i))!=
' ' && c!=
'\t' && c!=
'"')) i++;
1480 results.push_back(result.
mid(p,i-p).
str());
1490 else if (c==
' ' || c==
'\t')
1492 if (i>p) results.push_back(result.
mid(p,i-p).
str());
1499 results.push_back(result.
right(l-p).
str());
1504 if (!result.
empty()) results.push_back(result.
str());
1556 if (!depName.
empty())
1561 config_term(
"Config option '{}' has invalid depends relation on unknown option '{}'\n",
1562 option->
name(),depName);
1577 auto stream2string = [](std::istream &in) -> std::string
1581 while (in.read(buffer,
sizeof(buffer))) ret.append(buffer,
sizeof(buffer));
1582 ret.append(buffer,
static_cast<uint32_t
>(in.gcount()));
1583 if (!ret.empty() && ret[ret.length()-1]!=
'\n') ret+=
'\n';
1590 return stream2string(std::cin);
1600 return stream2string(f);
1615 configimplYYrestart( configimplYYin );
1636 for (
size_t i=0;i<str.size();i++)
1638 std::string path = str[i];
1639 std::replace(path.begin(),path.end(),
'\\',
'/');
1640 if ((path[0]!=
'/' && (path.size()<=2 || path[1]!=
':')) || path[path.size()-1]!=
'/')
1646 if (path[path.size()-1]!=
'/') path+=
'/';
1656 if ((val==
"yes" || val==
"true" || val==
"1" || val==
"all") ||
1657 (val==
"no" || val==
"false" || val==
"0" || val==
"none"))
1659 err(
"file name expected for option {}, got {} instead. Ignoring...\n",optionName,s);
1673 for (
const auto &s: list)
1677 size_t i=item.
find(
'=');
1680 err(
"Illegal format for option {}, no equal sign ('=') specified for item '{}'\n",name,item);
1687 err(
"Illegal format for option {}, no name specified for item '{}'\n",name,item);
1689 else if (valueRequired)
1692 if (myValue.
empty())
1694 err(
"Illegal format for option {}, no value specified for item '{}'\n",name,item);
1704 const ConfigValues::Info *option = ConfigValues::instance().get(optionName);
1705 if (option && option->type==ConfigValues::Info::Bool)
1707 if (ConfigValues::instance().*(option->value.b)!=expectedValue)
1709 err(
"When enabling {} the {} option should be {}. I'll adjust it for you.\n",depOption,optionName,expectedValue?
"enabled" :
"disabled");
1710 ConfigValues::instance().*(option->value.b)=expectedValue;
1718 const ConfigValues::Info *option = ConfigValues::instance().get(optionName);
1719 if (option && option->type==ConfigValues::Info::String)
1721 if (ConfigValues::instance().*(option->value.s)!=expectedValue)
1723 err(
"When enabling {} the {} option should have value '{}'. I'll adjust it for you.\n",depOption,optionName,expectedValue);
1724 ConfigValues::instance().*(option->value.s)=expectedValue;
1731 auto updateColorStyle = [&depOption](HTML_COLORSTYLE_t curStyle,HTML_COLORSTYLE_t newStyle)
1733 err(
"When enabling '{}' the 'HTML_COLORSTYLE' option should be either 'LIGHT' or 'DARK' but has value '{}'. I'll adjust it for you to '{}'.\n",
1735 HTML_COLORSTYLE_enum2str(curStyle),
1736 HTML_COLORSTYLE_enum2str(newStyle));
1742 case HTML_COLORSTYLE_t::LIGHT:
1743 case HTML_COLORSTYLE_t::DARK:
1746 case HTML_COLORSTYLE_t::AUTO_LIGHT:
1747 case HTML_COLORSTYLE_t::TOGGLE:
1748 updateColorStyle(colorStyle,HTML_COLORSTYLE_t::LIGHT);
1750 case HTML_COLORSTYLE_t::AUTO_DARK:
1751 updateColorStyle(colorStyle,HTML_COLORSTYLE_t::DARK);
1759 ConfigValues::instance().init();
1767 warn_uncond(
"warning format does not contain a $file tag!\n");
1771 warn_uncond(
"warning format does not contain a $line tag!\n");
1775 warn_uncond(
"warning format does not contain a $text tag!\n");
1782 if (paperType.
empty() || paperType==
"a4wide")
1787 else if (paperType!=
"a4" && paperType!=
"letter" &&
1788 paperType!=
"legal" && paperType!=
"executive")
1790 err(
"Unknown page type '{}' specified\n",paperType);
1817 if (check && !headerFile.
empty())
1823 "does not exist\n",headerFile);
1830 if (check && !footerFile.
empty())
1836 "does not exist\n",footerFile);
1846 switch (mathjaxVersion)
1848 case MATHJAX_VERSION_t::MathJax_2:
1849 if (mathJaxFormat==MATHJAX_FORMAT_t::chtml)
1854 case MATHJAX_VERSION_t::MathJax_3:
1855 if (mathJaxFormat==MATHJAX_FORMAT_t::HTML_CSS || mathJaxFormat==MATHJAX_FORMAT_t::NativeMML)
1860 case MATHJAX_VERSION_t::MathJax_4:
1861 if (mathJaxFormat==MATHJAX_FORMAT_t::HTML_CSS || mathJaxFormat==MATHJAX_FORMAT_t::NativeMML)
1869 if (check && !mathJaxCodefile.
empty())
1875 "does not exist\n",mathJaxCodefile);
1881 path =
"https://cdn.jsdelivr.net/npm/mathjax@";
1882 switch (mathjaxVersion)
1884 case MATHJAX_VERSION_t::MathJax_2: path +=
"2";
break;
1885 case MATHJAX_VERSION_t::MathJax_3: path +=
"3";
break;
1886 case MATHJAX_VERSION_t::MathJax_4: path +=
"4";
break;
1900 if (check && !latexHeaderFile.
empty())
1906 "does not exist\n",latexHeaderFile);
1913 if (check && !latexFooterFile.
empty())
1919 "does not exist\n",latexFooterFile);
1926 for (
const auto &s : includePath)
1931 warn_uncond(
"tag INCLUDE_PATH: include path '{}' does not exist\n",s);
1940 for (
const auto &s : predefList)
1944 size_t i_equals=predef.
find(
'=');
1945 size_t i_obrace=predef.
find(
'(');
1946 if ((i_obrace==0) || (i_equals==0) || (i_equals==1 && predef.
at(i_equals-1)==
':'))
1948 err(
"Illegal PREDEFINED format '{}', no define name specified\n",predef);
1983 numThreads =
static_cast<int>(std::thread::hardware_concurrency());
1992 const char *depOption =
"GENERATE_HTMLHELP";
2005 for (
const auto &s : tagFileList)
2007 bool validUrl =
false;
2008 size_t eqPos = s.find(
'=');
2009 if (eqPos!=std::string::npos)
2017 filteredTagFileList.push_back(s);
2021 err(
"When enabling GENERATE_HTMLHELP the TAGFILES option should only contain destinations "
2022 "with https / http addresses (not: {}). I'll adjust it for you.\n",s);
2031 const char *depOption =
"INLINE_GROUPED_CLASSES";
2037 if (dotNumThreads<=0)
2039 dotNumThreads=std::max(2u,std::thread::hardware_concurrency()+1);
2046 if (!plantumlJarPath.
empty())
2055 plantumlJarPath = plantumlJar;
2059 err(
"Jar file 'plantuml.jar' not found at location specified via PLANTUML_JAR_PATH: '{}'\n",plantumlJarPath);
2069 err(
"PLANTUML_JAR_PATH is not a directory with a 'plantuml.jar' file or is not an existing file: {}\n",plantumlJarPath);
2078 if (!diaPath.
empty())
2084 warn_uncond(
"dia could not be found at {}\n",diaPath);
2091 size_t i=0,l=diaPath.
length();
2092 for (i=0;i<l;i++)
if (diaPath.
at(i)==
'/') diaPath.
at(i)=
'\\';
2101 if (inputSources.empty())
2108 for (
const auto &s : inputSources)
2113 warn_uncond(
"tag INPUT: input source '{}' does not exist\n",s);
2133 warn_uncond(
"No output formats selected! Set at least one of the main GENERATE_* options to YES.\n");
2141 warn_uncond(
"GENERATE_HTMLHELP=YES requires GENERATE_HTML=YES.\n");
2149 warn_uncond(
"Setting SITEMAP_URL requires GENERATE_HTML=YES.\n");
2158 warn_uncond(
"GENERATE_QHP=YES requires GENERATE_HTML=YES.\n");
2162 err(
"GENERATE_QHP=YES requires QHP_NAMESPACE to be set. Using 'org.doxygen.doc' as default!.\n");
2168 err(
"GENERATE_QHP=YES requires QHP_VIRTUAL_FOLDER to be set. Using 'doc' as default!\n");
2172 if (!tagFileList.empty())
2174 err(
"When enabling GENERATE_QHP the TAGFILES option should be empty. I'll adjust it for you.\n");
2198 if ((
Config_getEnum(DOT_IMAGE_FORMAT) == DOT_IMAGE_FORMAT_t::svg_cairo) ||
2199 (
Config_getEnum(DOT_IMAGE_FORMAT) == DOT_IMAGE_FORMAT_t::svg_cairo_cairo))
2201 err(
"When using DOT_IMAGE_FORMAT with {} the INTERACTIVE_SVG option should be disabled. I'll adjust it for you.\n",
2211 const char *depOption =
"OPTIMIZE_OUTPUT_VHDL";
2228 for (
const auto &option : m_options)
2231 if (!depName.
empty())
2239 printf(
"disabling option %s\n",
qPrint(option->
name()));
2262 haveDotOpt && classGraphOpt)
2267 if (classDiagramsOpt_ && haveDotOpt_ && classGraphOpt_ &&
2273 bool isValid1=
true, isValid2=
true;
2276 if (isValid1 && isValid2 && !bClassDiagrams && !bHaveDot && classGraphValue.
lower()==
"yes")
2278 warn_uncond(
"Changing CLASS_GRAPH option to TEXT because obsolete option CLASS_DIAGRAM was found and set to NO.\n");
2279 classGraphValue=
"TEXT";
2292 if (htmlTimestamp_ && timestampOpt_ &&
2299 if (isValid && bTimestamp)
2302 timestampValue =
"YES";
2311 if (latexTimestamp_ && timestampOpt_ &&
2318 if (isValid && bTimestamp) timestampValue =
"YES";
2327 (*fontname->valueStringRef() ==
"FreeSans"
2328 || *fontname->valueStringRef() ==
"FreeSans.ttf"))
2329 warn_uncond(
"doxygen no longer ships with the FreeSans font.\n"
2330 " You may want to clear or change DOT_FONTNAME.\n"
2331 " Otherwise you run the risk that the wrong font is being used for dot generated graphs.\n");
2336 DString& commonAttrStr = *commonAttrOpt->valueRef();
2340 commonAttrStr = commonAttr.
str();
2346 DString& edgeAttrStr = *edgeAttrOpt->valueRef();
2350 edgeAttrStr = edgeAttr.
str();
2379 if (!parseRes)
return parseRes;
2384 if (option) option->
init();
2394 configInst->convertStrToVal(compareMode);
2398 if (clearHeaderAndFooter)
2412#include "configimpl.l.h"
void substEnvVars() override
DString * valueStringRef()
void substEnvVars() override
ConfigOptionList m_options
static void deleteInstance()
bool parseString(const DString &fn, const DString &str, bool upd=false)
void compareDoxyfile(TextStream &t, Config::CompareMode compareMode)
void convertStrToVal(Config::CompareMode compareMode)
DString takeStartComment()
static ConfigImpl * instance()
void substituteEnvironmentVars()
void writeXMLDoxyfile(TextStream &t)
void writeXSDDoxyfile(TextStream &t)
void writeTemplate(TextStream &t, bool shortIndex, bool updateOnly)
bool parse(const DString &fn, bool upd=false)
ConfigOptionList m_disabled
void emptyValueToDefault()
void substEnvVars() override
void substEnvVars() override
OptionType orgType() const
DString * valueStringRef()
virtual void convertStrToVal(Config::CompareMode)
DString dependsOn() const
virtual void writeXMLDoxyfile(TextStream &t)=0
virtual void writeTemplate(TextStream &t, bool sl, bool upd)=0
virtual void writeXSDDoxyfile(TextStream &t)=0
virtual void emptyValueToDefault()
virtual void compareDoxyfile(TextStream &t, Config::CompareMode compareMode)=0
virtual void substEnvVars()=0
void substEnvVars() override
static constexpr size_t npos
value used to indicate 'not found' or 'to the end of the string', matching std::string::npos
DString right(size_t len) const
size_t find(char c, size_t pos=0) const
bool startsWith(const char *s) const
static bool isFlagSet(const DebugMask mask)
static std::string currentDirPath()
Class representing an attribute list of a dot graph object.
void updateValue(const DString &key, const DString &inpValue)
DString str() const
Return the string representation of the attribute list.
std::string dirPath(bool absPath=true) const
std::string absFilePath() const
virtual DString trISOLang()=0
Class representing a regular expression.
Class to iterate through matches.
Object representing the matching results.
#define Config_getInt(name)
#define Config_getList(name)
#define Config_updateString(name, value)
#define Config_updateInt(name, value)
#define Config_getEnumAsString(name)
#define Config_updateBool(name, value)
#define Config_getBool(name)
#define Config_getString(name)
#define Config_updateList(name,...)
#define Config_updateEnum(name, value)
#define Config_getEnum(name)
#define ConfigImpl_getBool(val)
static void adjustStringSetting(const char *depOption, const char *optionName, const DString &expectedValue)
static DString configFileToString(const DString &name)
static void adjustColorStyleSetting(const char *depOption)
static void updateAttribute(DotAttributes &attr, DString name, ConfigObsolete *value)
static const reg::Ex reEnvVarExt(R"(\$\((\a[\w.-]*\(\a[\w.-]*\))\))")
static const reg::Ex reEnvVar(R"(\$\((\a[\w.-]*)\))")
static void cleanUpPaths(StringVector &str)
static bool checkFileName(const DString &s, const char *optionName)
static void checkList(StringVector list, const char *name, bool equalRequired, bool valueRequired)
static const reg::Ex reEnvVar1CMake(R"(\${\a\w*})")
static const reg::Ex reEnvVarCMake(R"(@\a\w*@)")
static void adjustBoolSetting(const char *depOption, const char *optionName, bool expectedValue)
void addConfigOptions(ConfigImpl *cfg)
DirIterator end(const DirIterator &) noexcept
const char * qPrint(const char *s)
Translator * theTranslator
#define warn_uncond(fmt,...)
void postProcess(bool clearHeaderAndFooter, CompareMode compareMode=CompareMode::Full)
void checkAndCorrect(bool quiet, const bool check)
void writeXMLDoxyfile(TextStream &t)
void compareDoxyfile(TextStream &t, CompareMode compareMode)
void writeTemplate(TextStream &t, bool shortList, bool updateOnly=false)
void writeXSDDoxyfile(TextStream &t)
bool parse(const DString &fileName, bool update=false, CompareMode compareMode=CompareMode::Full)
std::ifstream openInputStream(const DString &name, bool binary=false, bool openAtEnd=false)
DString getenv(const DString &variable)
const char * commandExtension()
bool search(std::string_view str, Match &match, const Ex &re, size_t pos)
Search in a given string str starting at position pos for a match against regular expression re.
DString stripFromPath(const DString &path)