12%option never-interactive
13%option prefix="configimplYY"
49#define YY_NO_UNISTD_H 1
52#define SHOW_INCLUDES 0
61 fmt::print(stderr,
"{}{}",
error_str,fmt::vformat(
fmt,args));
66 fmt::print(stderr,
"{}{}",
error_str,fmt::vformat(
fmt,args));
67 fmt::print(stderr,
"{}\n",
"Exiting...");
83#define MAX_INCLUDE_DEPTH 10
84#define YY_NEVER_INTERACTIVE 1
95 const char *p=tmp.
data();
121 if (!result.
isEmpty()) result+=
'\n';
129 if (initSpace) t <<
" ";
130 if (v) t <<
"YES";
else t <<
"NO";
135 if (initSpace) t <<
" ";
142 bool needsEscaping=wasQuoted;
146 const char *p=se.
data();
149 if (initSpace) t <<
" ";
150 while ((c=*p++)!=0 && !needsEscaping)
151 needsEscaping = (c==
' ' || c==
',' || c==
'\n' || c==
'\t' || c==
'"' || c==
'#');
158 if (*p==
' ' && *(p+1)==
'\0')
break;
159 if (*p==
'"') t <<
"\\";
174 for (
const auto &p : l)
176 if (!first) t <<
" \\\n";
180 bool wasQuoted = ((s.
at(0)==
'"') && (s.
at(s.
length()-1)==
'"'));
205 if (!ok || val<m_minVal || val>
m_maxVal)
223 if (val==
"yes" || val==
"true" || val==
"1" || val==
"all")
228 else if (val==
"no" || val==
"false" || val==
"0" || val==
"none")
273 if (s.lower() == val)
287 auto it =
m_dict.find(name);
290 config_term(
"{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
294 config_term(
"{}<{}>: Internal error: Requested option {} not of string type!\n",fileName,num,name);
296 return *(
dynamic_cast<ConfigString *
>(it->second))->valueRef();
301 auto it =
m_dict.find(name);
304 config_term(
"{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
308 config_term(
"{}<{}>: Internal error: Requested option {} not of list type!\n",fileName,num,name);
310 return *(
dynamic_cast<ConfigList *
>(it->second))->valueRef();
315 auto it =
m_dict.find(name);
318 config_term(
"{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
322 config_term(
"{}<{}>: Internal error: Requested option {} not of enum type!\n",fileName,num,name);
324 return *(
dynamic_cast<ConfigEnum *
>(it->second))->valueRef();
329 auto it =
m_dict.find(name);
332 config_term(
"{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
336 config_term(
"{}<{}>: Internal error: Requested option {} not of integer type!\n",fileName,num,name);
338 return *(
dynamic_cast<ConfigInt *
>(it->second))->valueRef();
343 auto it =
m_dict.find(name);
346 config_term(
"{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
350 config_term(
"{}<{}>: Internal error: Requested option {} not of boolean type!\n",fileName,num,name);
352 return *(
dynamic_cast<ConfigBool *
>(it->second))->valueRef();
363 t <<
"#---------------------------------------------------------------------------\n";
364 t <<
"# " <<
m_doc <<
"\n";
365 t <<
"#---------------------------------------------------------------------------\n";
388 auto is_not_empty = [get_stripped](
const std::string &s) {
return !get_stripped(s).isEmpty(); };
389 size_t defCnt = std::count_if(
m_value.begin(),
m_value.end(),is_not_empty);
391 if ( valCnt != defCnt)
400 while (it1!=
m_value.end() && !is_not_empty(*it1))
406 if (get_stripped(*it1) != get_stripped(*it2))
424 t <<
" <option id='" <<
m_name <<
"'";
425 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
426 t <<
" type='stringlist'";
443 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
470 t <<
" <option id='" <<
m_name <<
"'";
471 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
472 t <<
" type='string'";
482 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
509 t <<
" <option id='" <<
m_name <<
"'";
510 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
511 t <<
" type='string'";
523 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
557 t <<
" <option id='" <<
m_name <<
"'";
558 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
569 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
585 t <<
m_name << spaces <<
"=";
604 t <<
" <option id='" <<
m_name <<
"'";
605 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
616 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
624 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
657#define unput_string(yytext,yyleng) do { for (int i=(int)yyleng-1;i>=0;i--) unput(yytext[i]); } while(0)
661#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
665#define LEX_NO_REENTRANT
685 return static_cast<int>(fread(buf,1,max_size,
g_includeStack.back()->filePtr));
695 if (inputEncoding.
isEmpty() || outputEncoding.
isEmpty() || inputEncoding==outputEncoding)
return str;
696 size_t inputSize=str.
length();
697 size_t outputSize=inputSize*4;
700 if (cd==
reinterpret_cast<void *
>(-1))
703 "Check the 'DOXYFILE_ENCODING' setting in the config file!\n",
704 inputEncoding,outputEncoding);
706 size_t iLeft=inputSize;
707 size_t oLeft=outputSize;
708 const char *inputPtr = str.
data();
709 char *outputPtr = output.
rawData();
713 output.
resize(outputSize);
714 output.
at(outputSize)=
'\0';
720 inputEncoding,outputEncoding,strerror(errno));
735 bool insideQuote=
false;
737 for (
size_t i=0;i<l;i++)
746 insideQuote=!insideQuote;
748 else if (!insideQuote && c==
'#')
750 if (i<l-1 && s.
at(i+1)==
'#')
775 if (l>=2 && s.
at(0)==
'"' && s.
at(l-1)==
'"' &&
776 (s.
at(l-2)!=
'\\' || (s.
at(l-2)==
'\\' && s.
at(l-3)==
'\\')))
785 for (
size_t i=0;i<l;i++)
790 if (i<l-1 && s.
at(i+1)==
'"')
830 bool allowCommaAsSeparator =
g_cmd!=
"PREDEFINED";
839 auto addElem = [&elemStr,&wasQuote]()
845 if (wasQuote) e =
"\""+e+
"\"";
852 bool needsSeparator=
false;
853 bool insideQuote=
false;
855 for (
size_t i=0;i<l;i++)
858 if (!needsSeparator && c==
'\\')
860 if (i<l-1 && s.
at(i+1)==
'"')
864 else if (insideQuote && i<l-2 && s.
at(i+1)==
'\\' && s.
at(i+2)==
'"')
878 else if (!needsSeparator && c==
'"')
891 else if (!insideQuote && ((c==
',' && allowCommaAsSeparator) || isspace(c)))
893 needsSeparator=
false;
902 ConfigImpl::config_warn(
"Invalid value for '{}' tag at line {}, file {}: Values in list '{}' are not properly space {}separated\n",
906 needsSeparator=
false;
920 ConfigImpl::config_warn(
"Invalid value for '{}' tag at line {}, file {}: Values in list '{}' are not properly quoted\n",
971 size_t incLen = inc.
length();
972 if (incLen>0 && inc.
at(0)==
'"' && inc.
at(incLen-1)==
'"')
974 inc=inc.
mid(1,incLen-2);
984 msg(
"@INCLUDE = {}: parsing...\n",inc);
996 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< QCString > 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)
QCString & 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)
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
QCString & getString(const char *fileName, int num, const char *name) const
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 writeStringValue(TextStream &t, const QCString &s, bool initSpace=true, bool wasQuoted=false)
void writeIntValue(TextStream &t, int i, bool initSpace=true)
void writeStringList(TextStream &t, const StringVector &l)
@ 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
Minimal replacement for QFileInfo.
This is an alternative implementation of QCString.
size_t length() const
Returns the length of the string, not counting the 0-terminator.
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
char & at(size_t i)
Returns a reference to the character at index i.
char * rawData()
Returns a writable pointer to the data.
bool isEmpty() const
Returns TRUE iff the string is empty.
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
void resize(size_t newlen)
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.
QCString left(size_t len) const
Text streaming class that buffers data.
static QCString * g_string
static void processList()
static QCString g_encoding
static QCString g_localStoreRepl
static void checkEncoding()
static QCString convertToComment(const QCString &s, const QCString &u)
static const char * g_inputString
static void processStoreRepl(QCString &storeReplStr)
static const char * warning_str
static bool containsEnvVar(QCString &str)
static std::vector< std::unique_ptr< ConfigFileState > > g_includeStack
static void processString()
static int g_inputPosition
static FILE * findFile(const QCString &fileName)
#define MAX_INCLUDE_DEPTH
static const char * stateToString(int state)
static void readIncludeFile(const QCString &incName)
static QCString configStringRecode(const QCString &str, const QCString &fromEncoding, const QCString &toEncoding)
static StringVector * g_list
static bool g_configUpdate
static bool convertStringToBool(const QCString &str, bool &isValid)
static StringVector g_includePathList
static QCString stripComment(const QCString &s)
static void substEnvVarsInStrList(StringVector &sl)
static FILE * tryPath(const QCString &path, const QCString &fileName)
static Config::CompareMode g_compareMode
static ConfigImpl * g_config
static const char * getLexerFILE()
static QCString g_listStr
static int yyread(char *buf, int max_size)
static const char * error_str
static void substEnvVarsInString(QCString &s)
static QCString g_yyFileName
std::vector< std::string > StringVector
bool isAbsolutePath(const QCString &fileName)
FILE * fopen(const QCString &fileName, const QCString &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)
1011REGEX_a [a-z_A-Z\x80-\xFF]
1012REGEX_w [a-z_A-Z0-9\x80-\xFF]
1028 g_config->appendUserComment(yytext);
1037<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"=" {
g_cmd=yytext;
1050 switch(option->
kind())
1091 " To avoid this warning please remove this line from your configuration "
1112 ConfigImpl::config_warn(
"Tag '{}' at line {} of file '{}' belongs to an option that was not enabled at compile time.\n"
1117 ConfigImpl::config_warn(
"Tag '{}' at line {} of file '{}' belongs to an option that was not enabled at compile time.\n"
1118 " To avoid this warning please remove this line from your configuration "
Section marker for obsolete options.
Abstract base class for any configuration option.
void setEncoding(const QCString &e)
void setUserComment(const QCString &u)
@ O_Disabled
Disabled compile time option.
@ O_Obsolete
An obsolete option.
@ O_Info
A section header.
1126<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"+=" {
g_cmd=yytext;
1138 switch(option->
kind())
1159 "To avoid this warning please update your configuration "
1173 ConfigImpl::config_warn(
"Tag '{}' at line {} of file {} belongs to an option that was not enabled at compile time.\n"
1174 "To avoid this warning please remove this line from your configuration "
1175 "file, upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n",
1187<Start>"@INCLUDE"[ \t]*"=" { BEGIN(Include);}
1188<Start>"$("{REGEX_a}({REGEX_w}|[.-])*")" |
1189<Start>"$("{REGEX_a}({REGEX_w}|[.-])*"("{REGEX_a}({REGEX_w}|[.-])*"))" {
1201<Start>"@"{REGEX_a}{REGEX_w}*"@" {
1213<Include>([^ \"\t\r\n]+)|("\""[^\n\"]+"\"") {
1229 YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER;
1230 yy_switch_to_buffer( fs->oldState );
1231 yy_delete_buffer( oldBuf );
1255<StoreRepl>[^\n\\]+ {
1270<GetString>[^\n\\]+ {
1286<GetStrList>[^\n\\]+ {
1299<SkipInvalid>[^\n\\]+ {
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();
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);
1445 wasQuoted = (result.
find(
' ')!=-1) || (result.
find(
'\t')!=-1) || (result.
find(
'"')!=-1);
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.
isEmpty()) results.push_back(result.
str());
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 int i=item.
find(
'=');
1678 if (i==-1 && equalRequired)
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)
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();
1765 if (warnFormat.
find(
"$file")==-1)
1767 warn_uncond(
"warning format does not contain a $file tag!\n");
1769 if (warnFormat.
find(
"$line")==-1)
1771 warn_uncond(
"warning format does not contain a $line tag!\n");
1773 if (warnFormat.
find(
"$text")==-1)
1775 warn_uncond(
"warning format does not contain a $text tag!\n");
1782 if (paperType.
isEmpty() || 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.
isEmpty())
1823 "does not exist\n",headerFile);
1830 if (check && !footerFile.
isEmpty())
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.
isEmpty())
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.
isEmpty())
1906 "does not exist\n",latexHeaderFile);
1913 if (check && !latexFooterFile.
isEmpty())
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 int i_equals=predef.
find(
'=');
1945 int 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";
2002 for (
const auto &s : tagFileList)
2004 bool validUrl =
false;
2005 size_t eqPos = s.find(
'=');
2006 if (eqPos!=std::string::npos)
2014 filteredTagFileList.push_back(s);
2018 err(
"When enabling GENERATE_HTMLHELP the TAGFILES option should only contain destinations "
2019 "with https / http addresses (not: {}). I'll adjust it for you.\n",s);
2028 const char *depOption =
"INLINE_GROUPED_CLASSES";
2034 if (dotNumThreads<=0)
2036 dotNumThreads=std::max(2u,std::thread::hardware_concurrency()+1);
2043 if (!plantumlJarPath.
isEmpty())
2052 plantumlJarPath = plantumlJar;
2056 err(
"Jar file 'plantuml.jar' not found at location specified via PLANTUML_JAR_PATH: '{}'\n",plantumlJarPath);
2066 err(
"PLANTUML_JAR_PATH is not a directory with a 'plantuml.jar' file or is not an existing file: {}\n",plantumlJarPath);
2081 warn_uncond(
"dia could not be found at {}\n",diaPath);
2088 size_t i=0,l=diaPath.
length();
2089 for (i=0;i<l;i++)
if (diaPath.
at(i)==
'/') diaPath.
at(i)=
'\\';
2098 if (inputSources.empty())
2105 for (
const auto &s : inputSources)
2110 warn_uncond(
"tag INPUT: input source '{}' does not exist\n",s);
2130 warn_uncond(
"No output formats selected! Set at least one of the main GENERATE_* options to YES.\n");
2138 warn_uncond(
"GENERATE_HTMLHELP=YES requires GENERATE_HTML=YES.\n");
2146 warn_uncond(
"Setting SITEMAP_URL requires GENERATE_HTML=YES.\n");
2155 warn_uncond(
"GENERATE_QHP=YES requires GENERATE_HTML=YES.\n");
2159 err(
"GENERATE_QHP=YES requires QHP_NAMESPACE to be set. Using 'org.doxygen.doc' as default!.\n");
2165 err(
"GENERATE_QHP=YES requires QHP_VIRTUAL_FOLDER to be set. Using 'doc' as default!\n");
2169 if (!tagFileList.empty())
2171 err(
"When enabling GENERATE_QHP the TAGFILES option should be empty. I'll adjust it for you.\n");
2195 if ((
Config_getEnum(DOT_IMAGE_FORMAT) == DOT_IMAGE_FORMAT_t::svg_cairo) ||
2196 (
Config_getEnum(DOT_IMAGE_FORMAT) == DOT_IMAGE_FORMAT_t::svg_cairo_cairo))
2198 err(
"When using DOT_IMAGE_FORMAT with {} the INTERACTIVE_SVG option should be disabled. I'll adjust it for you.\n",
2208 const char *depOption =
"OPTIMIZE_OUTPUT_VHDL";
2225 for (
const auto &option : m_options)
2236 printf(
"disabling option %s\n",
qPrint(option->
name()));
2259 haveDotOpt && classGraphOpt)
2264 if (classDiagramsOpt_ && haveDotOpt_ && classGraphOpt_ &&
2270 bool isValid1=
true, isValid2=
true;
2273 if (isValid1 && isValid2 && !bClassDiagrams && !bHaveDot && classGraphValue.
lower()==
"yes")
2275 warn_uncond(
"Changing CLASS_GRAPH option to TEXT because obsolete option CLASS_DIAGRAM was found and set to NO.\n");
2276 classGraphValue=
"TEXT";
2289 if (htmlTimestamp_ && timestampOpt_ &&
2296 if (isValid && bTimestamp)
2299 timestampValue =
"YES";
2308 if (latexTimestamp_ && timestampOpt_ &&
2315 if (isValid && bTimestamp) timestampValue =
"YES";
2324 (*fontname->valueStringRef() ==
"FreeSans"
2325 || *fontname->valueStringRef() ==
"FreeSans.ttf"))
2326 warn_uncond(
"doxygen no longer ships with the FreeSans font.\n"
2327 " You may want to clear or change DOT_FONTNAME.\n"
2328 " Otherwise you run the risk that the wrong font is being used for dot generated graphs.\n");
2333 QCString& commonAttrStr = *commonAttrOpt->valueRef();
2337 commonAttrStr = commonAttr.
str();
2343 QCString& edgeAttrStr = *edgeAttrOpt->valueRef();
2347 edgeAttrStr = edgeAttr.
str();
2376 if (!parseRes)
return parseRes;
2391 configInst->convertStrToVal(compareMode);
2395 if (clearHeaderAndFooter)
2409#include "configimpl.l.h"
void substEnvVars() override
QCString * valueStringRef()
void substEnvVars() override
ConfigOptionList m_options
static void deleteInstance()
void compareDoxyfile(TextStream &t, Config::CompareMode compareMode)
void convertStrToVal(Config::CompareMode compareMode)
static ConfigImpl * instance()
void substituteEnvironmentVars()
bool parseString(const QCString &fn, const QCString &str, bool upd=FALSE)
bool parse(const QCString &fn, bool upd=FALSE)
QCString takeStartComment()
ConfigOption * get(const QCString &name) const
void writeXMLDoxyfile(TextStream &t)
void writeXSDDoxyfile(TextStream &t)
QCString takeUserComment()
void writeTemplate(TextStream &t, bool shortIndex, bool updateOnly)
ConfigOptionList m_disabled
void emptyValueToDefault()
void substEnvVars() override
void substEnvVars() override
QCString * valueStringRef()
OptionType orgType() const
virtual void convertStrToVal(Config::CompareMode)
virtual void writeXMLDoxyfile(TextStream &t)=0
virtual void writeTemplate(TextStream &t, bool sl, bool upd)=0
virtual void writeXSDDoxyfile(TextStream &t)=0
QCString dependsOn() const
virtual void emptyValueToDefault()
virtual void compareDoxyfile(TextStream &t, Config::CompareMode compareMode)=0
virtual void substEnvVars()=0
void substEnvVars() override
static bool isFlagSet(const DebugMask mask)
static std::string currentDirPath()
Class representing an attribute list of a dot graph object.
void updateValue(const QCString &key, const QCString &inpValue)
QCString str() const
Return the string representation of the attribute list.
std::string dirPath(bool absPath=true) const
std::string absFilePath() const
int find(char c, int index=0, bool cs=TRUE) const
bool startsWith(const char *s) const
QCString right(size_t len) const
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 QCString &expectedValue)
static void adjustColorStyleSetting(const char *depOption)
static void updateAttribute(DotAttributes &attr, QCString name, ConfigObsolete *value)
static QCString configFileToString(const QCString &name)
static const reg::Ex reEnvVarExt(R"(\$\((\a[\w.-]*\(\a[\w.-]*\))\))")
static const reg::Ex reEnvVar(R"(\$\((\a[\w.-]*)\))")
static void cleanUpPaths(StringVector &str)
static void checkList(const StringVector &list, const char *name, bool equalRequired, bool valueRequired)
static bool checkFileName(const QCString &s, const char *optionName)
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
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)
bool parse(const QCString &fileName, bool update=FALSE, CompareMode compareMode=CompareMode::Full)
void writeXSDDoxyfile(TextStream &t)
void writeTemplate(TextStream &t, bool shortList, bool updateOnly=FALSE)
std::ifstream openInputStream(const QCString &name, bool binary=false, bool openAtEnd=false)
const char * commandExtension()
QCString getenv(const QCString &variable)
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.
const char * qPrint(const char *s)
static QCString stripFromPath(const QCString &p, const StringVector &l)