10%option never-interactive
11%option prefix="configimplYY"
47#define YY_NO_UNISTD_H 1
50#define SHOW_INCLUDES 0
65 fmt::print(stderr,
"{}\n",
"Exiting...");
81#define MAX_INCLUDE_DEPTH 10
82#define YY_NEVER_INTERACTIVE 1
93 const char *p=tmp.
data();
119 if (!result.
isEmpty()) result+=
'\n';
127 if (initSpace) t <<
" ";
128 if (v) t <<
"YES";
else t <<
"NO";
133 if (initSpace) t <<
" ";
140 bool needsEscaping=wasQuoted;
144 const char *p=se.
data();
147 if (initSpace) t <<
" ";
148 while ((c=*p++)!=0 && !needsEscaping)
149 needsEscaping = (c==
' ' || c==
',' || c==
'\n' || c==
'\t' || c==
'"' || c==
'#');
156 if (*p==
' ' && *(p+1)==
'\0')
break;
157 if (*p==
'"') t <<
"\\";
172 for (
const auto &p : l)
174 if (!first) t <<
" \\\n";
178 bool wasQuoted = ((s.
at(0)==
'"') && (s.
at(s.
length()-1)==
'"'));
203 if (!ok || val<m_minVal || val>
m_maxVal)
221 if (val==
"yes" || val==
"true" || val==
"1" || val==
"all")
226 else if (val==
"no" || val==
"false" || val==
"0" || val==
"none")
268 QCString val =
m_value.stripWhiteSpace().lower();
271 if (s.
lower() == val)
288 config_term(
"{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
292 config_term(
"{}<{}>: Internal error: Requested option {} not of string type!\n",fileName,num,name);
294 return *(
dynamic_cast<ConfigString *
>(it->second))->valueRef();
302 config_term(
"{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
306 config_term(
"{}<{}>: Internal error: Requested option {} not of list type!\n",fileName,num,name);
308 return *(
dynamic_cast<ConfigList *
>(it->second))->valueRef();
316 config_term(
"{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
320 config_term(
"{}<{}>: Internal error: Requested option {} not of enum type!\n",fileName,num,name);
322 return *(
dynamic_cast<ConfigEnum *
>(it->second))->valueRef();
330 config_term(
"{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
334 config_term(
"{}<{}>: Internal error: Requested option {} not of integer type!\n",fileName,num,name);
336 return *(
dynamic_cast<ConfigInt *
>(it->second))->valueRef();
344 config_term(
"{}<{}>: Internal error: Requested unknown option {}!\n",fileName,num,name);
348 config_term(
"{}<{}>: Internal error: Requested option {} not of boolean type!\n",fileName,num,name);
350 return *(
dynamic_cast<ConfigBool *
>(it->second))->valueRef();
361 t <<
"#---------------------------------------------------------------------------\n";
362 t <<
"# " <<
m_doc <<
"\n";
363 t <<
"#---------------------------------------------------------------------------\n";
386 auto is_not_empty = [get_stripped](
const std::string &s) {
return !get_stripped(s).isEmpty(); };
387 size_t defCnt = std::count_if(
m_value.begin(),
m_value.end(),is_not_empty);
389 if ( valCnt != defCnt)
398 while (it1!=
m_value.end() && !is_not_empty(*it1))
404 if (get_stripped(*it1) != get_stripped(*it2))
423 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
424 t <<
" type='stringlist'";
441 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
469 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
470 t <<
" type='string'";
480 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
508 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
509 t <<
" type='string'";
521 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
556 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
567 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
583 t <<
m_name << spaces <<
"=";
603 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
614 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
622 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
655#define unput_string(yytext,yyleng) do { for (int i=(int)yyleng-1;i>=0;i--) unput(yytext[i]); } while(0)
659#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
662static inline const char *
getLexerFILE() {
return __FILE__;}
663#define LEX_NO_REENTRANT
666static int yyread(
char *buf,
int max_size)
683 return static_cast<int>(fread(buf,1,max_size,
g_includeStack.back()->filePtr));
693 if (inputEncoding.
isEmpty() || outputEncoding.
isEmpty() || inputEncoding==outputEncoding)
return str;
694 size_t inputSize=str.
length();
695 size_t outputSize=inputSize*4;
698 if (cd==
reinterpret_cast<void *
>(-1))
701 "Check the 'DOXYFILE_ENCODING' setting in the config file!\n",
702 inputEncoding,outputEncoding);
704 size_t iLeft=inputSize;
705 size_t oLeft=outputSize;
706 const char *inputPtr = str.
data();
707 char *outputPtr = output.
rawData();
711 output.
resize(outputSize);
712 output.
at(outputSize)=
'\0';
718 inputEncoding,outputEncoding,strerror(errno));
733 bool insideQuote=
false;
735 for (
size_t i=0;i<l;i++)
744 insideQuote=!insideQuote;
746 else if (!insideQuote && c==
'#')
748 if (i<l-1 && s.
at(i+1)==
'#')
773 if (l>=2 && s.
at(0)==
'"' && s.
at(l-1)==
'"' &&
774 (s.
at(l-2)!=
'\\' || (s.
at(l-2)==
'\\' && s.
at(l-3)==
'\\')))
783 for (
size_t i=0;i<l;i++)
788 if (i<l-1 && s.
at(i+1)==
'"')
828 bool allowCommaAsSeparator =
g_cmd!=
"PREDEFINED";
837 auto addElem = [&elemStr,&wasQuote]()
843 if (wasQuote) e =
"\""+e+
"\"";
850 bool needsSeparator=
false;
851 bool insideQuote=
false;
853 for (
size_t i=0;i<l;i++)
856 if (!needsSeparator && c==
'\\')
858 if (i<l-1 && s.
at(i+1)==
'"')
862 else if (insideQuote && i<l-2 && s.
at(i+1)==
'\\' && s.
at(i+2)==
'"')
876 else if (!needsSeparator && c==
'"')
889 else if (!insideQuote && ((c==
',' && allowCommaAsSeparator) || isspace(c)))
891 needsSeparator=
false;
900 ConfigImpl::config_warn(
"Invalid value for '{}' tag at line {}, file {}: Values in list '{}' are not properly space {}separated\n",
904 needsSeparator=
false;
918 ConfigImpl::config_warn(
"Invalid value for '{}' tag at line {}, file {}: Values in list '{}' are not properly quoted\n",
927 if (fi.exists() && fi.isFile())
969 size_t incLen = inc.
length();
970 if (incLen>0 && inc.
at(0)==
'"' && inc.
at(incLen-1)==
'"')
972 inc=inc.
mid(1,incLen-2);
982 msg(
"@INCLUDE = {}: parsing...\n",inc);
994 yy_switch_to_buffer(yy_create_buffer(f,
YY_BUF_SIZE));
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
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
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
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)
1009REGEX_a [a-z_A-Z\x80-\xFF]
1010REGEX_w [a-z_A-Z0-9\x80-\xFF]
1026 g_config->appendUserComment(yytext);
1035<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"=" {
g_cmd=yytext;
1048 switch(option->
kind())
1089 " To avoid this warning please remove this line from your configuration "
1110 ConfigImpl::config_warn(
"Tag '{}' at line {} of file '{}' belongs to an option that was not enabled at compile time.\n"
1115 ConfigImpl::config_warn(
"Tag '{}' at line {} of file '{}' belongs to an option that was not enabled at compile time.\n"
1116 " To avoid this warning please remove this line from your configuration "
Class representing a Boolean type option.
Class representing an enum type option.
Class representing an integer type option.
Class representing a list type option.
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.
1124<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"+=" {
g_cmd=yytext;
1136 switch(option->
kind())
1157 "To avoid this warning please update your configuration "
1171 ConfigImpl::config_warn(
"Tag '{}' at line {} of file {} belongs to an option that was not enabled at compile time.\n"
1172 "To avoid this warning please remove this line from your configuration "
1173 "file, upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n",
1185<Start>"@INCLUDE"[ \t]*"=" { BEGIN(Include);}
1186<Start>"$("{REGEX_a}({REGEX_w}|[.-])*")" |
1187<Start>"$("{REGEX_a}({REGEX_w}|[.-])*"("{REGEX_a}({REGEX_w}|[.-])*"))" {
1199<Start>"@"{REGEX_a}{REGEX_w}*"@" {
1211<Include>([^ \"\t\r\n]+)|("\""[^\n\"]+"\"") {
1227 YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER;
1228 yy_switch_to_buffer( fs->
oldState );
1229 yy_delete_buffer( oldBuf );
1253<StoreRepl>[^\n\\]+ {
1268<GetString>[^\n\\]+ {
1284<GetStrList>[^\n\\]+ {
1297<SkipInvalid>[^\n\\]+ {
1319 t <<
"# Doxyfile " << getDoxygenVersion() <<
"\n\n";
1338 t <<
"# Difference with default Doxyfile " << getFullVersion();
1354 t <<
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
1355 t <<
"<doxyfile xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"doxyfile.xsd\" version=\"" << getDoxygenVersion() <<
"\" xml:lang=\"" <<
theTranslator->trISOLang() <<
"\">\n";
1360 t <<
"</doxyfile>\n";
1398 std::string s = str.
str();
1405 auto replace = [](
const std::string &s,
const reg::Ex &re) -> std::string
1411 for (; it!=
end ; ++it)
1413 const auto &match = *it;
1414 size_t i = match.position();
1415 size_t l = match.length();
1416 result+=s.substr(p,i-p);
1417 std::string matchContents = match[1].str();
1423 result+=s.substr(p);
1433 for (
const auto &s : sl)
1436 bool wasQuoted = ((result.
at(0)==
'"') && (result.
at(result.
length()-1)==
'"'));
1439 result = result.
mid(1,result.
length()-2);
1443 wasQuoted = (result.
find(
' ')!=-1) || (result.
find(
'\t')!=-1) || (result.
find(
'"')!=-1);
1456 int l =
static_cast<int>(result.
length());
1460 for (
int i=0;i<l;i++)
1464 while (i<l && ((c=result.
at(i))==
' ' || c==
'\t')) i++;
1467 while (i<l && ((c=result.
at(i))!=
' ' && c!=
'\t' && c!=
'"')) i++;
1478 results.push_back(result.
mid(p,i-p).
str());
1488 else if (c==
' ' || c==
'\t')
1490 if (i>p) results.push_back(result.
mid(p,i-p).
str());
1497 results.push_back(result.
right(l-p).
str());
1502 if (!result.
isEmpty()) results.push_back(result.
str());
1559 config_term(
"Config option '{}' has invalid depends relation on unknown option '{}'\n",
1560 option->
name(),depName);
1575 auto stream2string = [](std::istream &in) -> std::string
1579 while (in.read(buffer,
sizeof(buffer))) ret.append(buffer,
sizeof(buffer));
1580 ret.append(buffer,
static_cast<uint32_t
>(in.gcount()));
1581 if (!ret.empty() && ret[ret.length()-1]!=
'\n') ret+=
'\n';
1588 return stream2string(std::cin);
1598 return stream2string(f);
1613 configimplYYrestart( configimplYYin );
1634 for (
size_t i=0;i<str.size();i++)
1636 std::string path = str[i];
1637 std::replace(path.begin(),path.end(),
'\\',
'/');
1638 if ((path[0]!=
'/' && (path.size()<=2 || path[1]!=
':')) || path[path.size()-1]!=
'/')
1644 if (path[path.size()-1]!=
'/') path+=
'/';
1654 if ((val==
"yes" || val==
"true" || val==
"1" || val==
"all") ||
1655 (val==
"no" || val==
"false" || val==
"0" || val==
"none"))
1657 err(
"file name expected for option {}, got {} instead. Ignoring...\n",optionName,s);
1669static void checkList(
const StringVector &list,
const char *name,
bool equalRequired,
bool valueRequired)
1671 for (
const auto &s: list)
1675 int i=item.
find(
'=');
1676 if (i==-1 && equalRequired)
1678 err(
"Illegal format for option {}, no equal sign ('=') specified for item '{}'\n",name,item);
1685 err(
"Illegal format for option {}, no name specified for item '{}'\n",name,item);
1687 else if (valueRequired)
1692 err(
"Illegal format for option {}, no value specified for item '{}'\n",name,item);
1699static void adjustBoolSetting(
const char *depOption,
const char *optionName,
bool expectedValue)
1702 const ConfigValues::Info *option = ConfigValues::instance().get(optionName);
1703 if (option && option->type==ConfigValues::Info::Bool)
1705 if (ConfigValues::instance().*(option->value.b)!=expectedValue)
1707 err(
"When enabling {} the {} option should be {}. I'll adjust it for you.\n",depOption,optionName,expectedValue?
"enabled" :
"disabled");
1708 ConfigValues::instance().*(option->value.b)=expectedValue;
1716 const ConfigValues::Info *option = ConfigValues::instance().get(optionName);
1717 if (option && option->type==ConfigValues::Info::String)
1719 if (ConfigValues::instance().*(option->value.s)!=expectedValue)
1721 err(
"When enabling {} the {} option should have value '{}'. I'll adjust it for you.\n",depOption,optionName,expectedValue);
1722 ConfigValues::instance().*(option->value.s)=expectedValue;
1729 auto updateColorStyle = [&depOption](HTML_COLORSTYLE_t curStyle,HTML_COLORSTYLE_t newStyle)
1731 err(
"When enabling '{}' the 'HTML_COLORSTYLE' option should be either 'LIGHT' or 'DARK' but has value '{}'. I'll adjust it for you to '{}'.\n",
1733 HTML_COLORSTYLE_enum2str(curStyle),
1734 HTML_COLORSTYLE_enum2str(newStyle));
1740 case HTML_COLORSTYLE_t::LIGHT:
1741 case HTML_COLORSTYLE_t::DARK:
1744 case HTML_COLORSTYLE_t::AUTO_LIGHT:
1745 case HTML_COLORSTYLE_t::TOGGLE:
1746 updateColorStyle(colorStyle,HTML_COLORSTYLE_t::LIGHT);
1748 case HTML_COLORSTYLE_t::AUTO_DARK:
1749 updateColorStyle(colorStyle,HTML_COLORSTYLE_t::DARK);
1757 ConfigValues::instance().init();
1763 if (warnFormat.
find(
"$file")==-1)
1765 warn_uncond(
"warning format does not contain a $file tag!\n");
1767 if (warnFormat.
find(
"$line")==-1)
1769 warn_uncond(
"warning format does not contain a $line tag!\n");
1771 if (warnFormat.
find(
"$text")==-1)
1773 warn_uncond(
"warning format does not contain a $text tag!\n");
1780 if (paperType.
isEmpty() || paperType==
"a4wide")
1785 else if (paperType!=
"a4" && paperType!=
"letter" &&
1786 paperType!=
"legal" && paperType!=
"executive")
1788 err(
"Unknown page type '{}' specified\n",paperType);
1815 if (check && !headerFile.
isEmpty())
1821 "does not exist\n",headerFile);
1828 if (check && !footerFile.
isEmpty())
1834 "does not exist\n",footerFile);
1844 switch (mathjaxVersion)
1846 case MATHJAX_VERSION_t::MathJax_2:
1847 if (mathJaxFormat==MATHJAX_FORMAT_t::chtml)
1852 case MATHJAX_VERSION_t::MathJax_3:
1853 if (mathJaxFormat==MATHJAX_FORMAT_t::HTML_CSS || mathJaxFormat==MATHJAX_FORMAT_t::NativeMML)
1858 case MATHJAX_VERSION_t::MathJax_4:
1859 if (mathJaxFormat==MATHJAX_FORMAT_t::HTML_CSS || mathJaxFormat==MATHJAX_FORMAT_t::NativeMML)
1867 if (check && !mathJaxCodefile.
isEmpty())
1873 "does not exist\n",mathJaxCodefile);
1879 path =
"https://cdn.jsdelivr.net/npm/mathjax@";
1880 switch (mathjaxVersion)
1882 case MATHJAX_VERSION_t::MathJax_2: path +=
"2";
break;
1883 case MATHJAX_VERSION_t::MathJax_3: path +=
"3";
break;
1884 case MATHJAX_VERSION_t::MathJax_4: path +=
"4";
break;
1898 if (check && !latexHeaderFile.
isEmpty())
1904 "does not exist\n",latexHeaderFile);
1911 if (check && !latexFooterFile.
isEmpty())
1917 "does not exist\n",latexFooterFile);
1924 for (
const auto &s : includePath)
1929 warn_uncond(
"tag INCLUDE_PATH: include path '{}' does not exist\n",s);
1938 for (
const auto &s : predefList)
1942 int i_equals=predef.
find(
'=');
1943 int i_obrace=predef.
find(
'(');
1944 if ((i_obrace==0) || (i_equals==0) || (i_equals==1 && predef.
at(i_equals-1)==
':'))
1946 err(
"Illegal PREDEFINED format '{}', no define name specified\n",predef);
1981 numThreads =
static_cast<int>(std::thread::hardware_concurrency());
1990 const char *depOption =
"GENERATE_HTMLHELP";
2000 for (
const auto &s : tagFileList)
2002 bool validUrl =
false;
2003 size_t eqPos = s.
find(
'=');
2004 if (eqPos!=std::string::npos)
2012 filteredTagFileList.push_back(s);
2016 err(
"When enabling GENERATE_HTMLHELP the TAGFILES option should only contain destinations "
2017 "with https / http addresses (not: {}). I'll adjust it for you.\n",s);
2026 const char *depOption =
"INLINE_GROUPED_CLASSES";
2032 if (dotNumThreads<=0)
2034 dotNumThreads=std::max(2u,std::thread::hardware_concurrency()+1);
2041 if (!plantumlJarPath.
isEmpty())
2044 if (pu.exists() && pu.isDir())
2048 if (jar.exists() && jar.isFile())
2050 plantumlJarPath = plantumlJar;
2054 err(
"Jar file 'plantuml.jar' not found at location specified via PLANTUML_JAR_PATH: '{}'\n",plantumlJarPath);
2058 else if (pu.exists() && pu.isFile())
2064 err(
"PLANTUML_JAR_PATH is not a directory with a 'plantuml.jar' file or is not an existing file: {}\n",plantumlJarPath);
2077 if (!dp.exists() || !dp.isFile())
2079 warn_uncond(
"dia could not be found at {}\n",diaPath);
2084 diaPath=dp.dirPath(
TRUE)+
"/";
2086 size_t i=0,l=diaPath.
length();
2087 for (i=0;i<l;i++)
if (diaPath.
at(i)==
'/') diaPath.
at(i)=
'\\';
2096 if (inputSources.empty())
2103 for (
const auto &s : inputSources)
2108 warn_uncond(
"tag INPUT: input source '{}' does not exist\n",s);
2128 warn_uncond(
"No output formats selected! Set at least one of the main GENERATE_* options to YES.\n");
2136 warn_uncond(
"GENERATE_HTMLHELP=YES requires GENERATE_HTML=YES.\n");
2144 warn_uncond(
"Setting SITEMAP_URL requires GENERATE_HTML=YES.\n");
2153 warn_uncond(
"GENERATE_QHP=YES requires GENERATE_HTML=YES.\n");
2157 err(
"GENERATE_QHP=YES requires QHP_NAMESPACE to be set. Using 'org.doxygen.doc' as default!.\n");
2163 err(
"GENERATE_QHP=YES requires QHP_VIRTUAL_FOLDER to be set. Using 'doc' as default!\n");
2167 if (!tagFileList.empty())
2169 err(
"When enabling GENERATE_QHP the TAGFILES option should be empty. I'll adjust it for you.\n");
2193 if ((
Config_getEnum(DOT_IMAGE_FORMAT) == DOT_IMAGE_FORMAT_t::svg_cairo) ||
2194 (
Config_getEnum(DOT_IMAGE_FORMAT) == DOT_IMAGE_FORMAT_t::svg_cairo_cairo))
2196 err(
"When using DOT_IMAGE_FORMAT with {} the INTERACTIVE_SVG option should be disabled. I'll adjust it for you.\n",
2206 const char *depOption =
"OPTIMIZE_OUTPUT_VHDL";
2223 for (
const auto &option : m_options)
2225 QCString depName = option->dependsOn();
2234 printf(
"disabling option %s\n",
qPrint(option->name()));
2257 haveDotOpt && classGraphOpt)
2262 if (classDiagramsOpt_ && haveDotOpt_ && classGraphOpt_ &&
2268 bool isValid1=
true, isValid2=
true;
2271 if (isValid1 && isValid2 && !bClassDiagrams && !bHaveDot && classGraphValue.
lower()==
"yes")
2273 warn_uncond(
"Changing CLASS_GRAPH option to TEXT because obsolete option CLASS_DIAGRAM was found and set to NO.\n");
2274 classGraphValue=
"TEXT";
2287 if (htmlTimestamp_ && timestampOpt_ &&
2294 if (isValid && bTimestamp)
2297 timestampValue =
"YES";
2306 if (latexTimestamp_ && timestampOpt_ &&
2313 if (isValid && bTimestamp) timestampValue =
"YES";
2322 (*fontname->valueStringRef() ==
"FreeSans"
2323 || *fontname->valueStringRef() ==
"FreeSans.ttf"))
2324 warn_uncond(
"doxygen no longer ships with the FreeSans font.\n"
2325 " You may want to clear or change DOT_FONTNAME.\n"
2326 " Otherwise you run the risk that the wrong font is being used for dot generated graphs.\n");
2331 QCString& commonAttrStr = *commonAttrOpt->valueRef();
2335 commonAttrStr = commonAttr.
str();
2341 QCString& edgeAttrStr = *edgeAttrOpt->valueRef();
2345 edgeAttrStr = edgeAttr.
str();
2374 if (!parseRes)
return parseRes;
2389 configInst->convertStrToVal(compareMode);
2393 if (clearHeaderAndFooter)
2407#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)
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.
std::string replace(std::string_view str, const Ex &re, std::string_view replacement)
Searching in a given input string for parts that match regular expression re and replaces those parts...
const char * qPrint(const char *s)
static QCString stripFromPath(const QCString &p, const StringVector &l)