12%option never-interactive
13%option prefix="configimplYY"
50#define YY_NO_UNISTD_H 1
53#define SHOW_INCLUDES 0
74 fprintf(stderr,
"%s\n",
"Exiting...");
93#define MAX_INCLUDE_DEPTH 10
94#define YY_NEVER_INTERACTIVE 1
105 const char *p=tmp.
data();
131 if (!result.
isEmpty()) result+=
'\n';
139 if (initSpace) t <<
" ";
140 if (v) t <<
"YES";
else t <<
"NO";
145 if (initSpace) t <<
" ";
152 bool needsEscaping=wasQuoted;
156 const char *p=se.
data();
159 if (initSpace) t <<
" ";
160 while ((c=*p++)!=0 && !needsEscaping)
161 needsEscaping = (c==
' ' || c==
',' || c==
'\n' || c==
'\t' || c==
'"' || c==
'#');
168 if (*p==
' ' && *(p+1)==
'\0')
break;
169 if (*p==
'"') t <<
"\\";
184 for (
const auto &p : l)
186 if (!first) t <<
" \\\n";
190 bool wasQuoted = ((s.
at(0)==
'"') && (s.
at(s.
length()-1)==
'"'));
215 if (!ok || val<m_minVal || val>
m_maxVal)
233 if (val==
"yes" || val==
"true" || val==
"1" || val==
"all")
238 else if (val==
"no" || val==
"false" || val==
"0" || val==
"none")
283 if (s.lower() == val)
297 auto it =
m_dict.find(name);
300 config_term(
"%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
304 config_term(
"%s<%d>: Internal error: Requested option %s not of string type!\n",fileName,num,name);
306 return *(
dynamic_cast<ConfigString *
>(it->second))->valueRef();
311 auto it =
m_dict.find(name);
314 config_term(
"%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
318 config_term(
"%s<%d>: Internal error: Requested option %s not of list type!\n",fileName,num,name);
320 return *(
dynamic_cast<ConfigList *
>(it->second))->valueRef();
325 auto it =
m_dict.find(name);
328 config_term(
"%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
332 config_term(
"%s<%d>: Internal error: Requested option %s not of enum type!\n",fileName,num,name);
334 return *(
dynamic_cast<ConfigEnum *
>(it->second))->valueRef();
339 auto it =
m_dict.find(name);
342 config_term(
"%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
346 config_term(
"%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name);
348 return *(
dynamic_cast<ConfigInt *
>(it->second))->valueRef();
353 auto it =
m_dict.find(name);
356 config_term(
"%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
360 config_term(
"%s<%d>: Internal error: Requested option %s not of boolean type!\n",fileName,num,name);
362 return *(
dynamic_cast<ConfigBool *
>(it->second))->valueRef();
373 t <<
"#---------------------------------------------------------------------------\n";
374 t <<
"# " <<
m_doc <<
"\n";
375 t <<
"#---------------------------------------------------------------------------\n";
398 auto is_not_empty = [get_stripped](
const std::string &s) {
return !get_stripped(s).isEmpty(); };
399 size_t defCnt = std::count_if(
m_value.begin(),
m_value.end(),is_not_empty);
401 if ( valCnt != defCnt)
410 while (it1!=
m_value.end() && !is_not_empty(*it1))
416 if (get_stripped(*it1) != get_stripped(*it2))
434 t <<
" <option id='" <<
m_name <<
"'";
435 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
436 t <<
" type='stringlist'";
453 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
480 t <<
" <option id='" <<
m_name <<
"'";
481 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
482 t <<
" type='string'";
492 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
519 t <<
" <option id='" <<
m_name <<
"'";
520 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
521 t <<
" type='string'";
533 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
567 t <<
" <option id='" <<
m_name <<
"'";
568 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
579 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
595 t <<
m_name << spaces <<
"=";
614 t <<
" <option id='" <<
m_name <<
"'";
615 t <<
" default='" << (
isDefault() ?
"yes" :
"no") <<
"'";
626 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
634 t <<
" <xsd:enumeration value=\"" <<
m_name <<
"\"/>\n";
667#define unput_string(yytext,yyleng) do { for (int i=(int)yyleng-1;i>=0;i--) unput(yytext[i]); } while(0)
671#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
675#define LEX_NO_REENTRANT
695 return static_cast<int>(fread(buf,1,max_size,
g_includeStack.back()->filePtr));
705 if (inputEncoding.
isEmpty() || outputEncoding.
isEmpty() || inputEncoding==outputEncoding)
return str;
706 size_t inputSize=str.
length();
707 size_t outputSize=inputSize*4;
710 if (cd==
reinterpret_cast<void *
>(-1))
713 "Check the 'DOXYFILE_ENCODING' setting in the config file!\n",
716 size_t iLeft=inputSize;
717 size_t oLeft=outputSize;
718 const char *inputPtr = str.
data();
719 char *outputPtr = output.
rawData();
723 output.
resize(outputSize);
724 output.
at(outputSize)=
'\0';
730 qPrint(inputEncoding),
qPrint(outputEncoding),strerror(errno));
745 bool insideQuote=
false;
747 for (
size_t i=0;i<l;i++)
756 insideQuote=!insideQuote;
758 else if (!insideQuote && c==
'#')
760 if (i<l-1 && s.
at(i+1)==
'#')
785 if (l>=2 && s.
at(0)==
'"' && s.
at(l-1)==
'"' &&
786 (s.
at(l-2)!=
'\\' || (s.
at(l-2)==
'\\' && s.
at(l-3)==
'\\')))
795 for (
size_t i=0;i<l;i++)
800 if (i<l-1 && s.
at(i+1)==
'"')
840 bool allowCommaAsSeparator =
g_cmd!=
"PREDEFINED";
849 auto addElem = [&elemStr,&wasQuote]()
855 if (wasQuote) e =
"\""+e+
"\"";
862 bool needsSeparator=
false;
863 bool insideQuote=
false;
865 for (
size_t i=0;i<l;i++)
868 if (!needsSeparator && c==
'\\')
870 if (i<l-1 && s.
at(i+1)==
'"')
884 else if (!needsSeparator && c==
'"')
897 else if (!insideQuote && ((c==
',' && allowCommaAsSeparator) || isspace(c)))
899 needsSeparator=
false;
908 ConfigImpl::config_warn(
"Invalid value for '%s' tag at line %d, file %s: Values in list '%s' are not properly space %sseparated\n",
912 needsSeparator=
false;
926 ConfigImpl::config_warn(
"Invalid value for '%s' tag at line %d, file %s: Values in list '%s' are not properly quoted\n",
960 FILE *f =
tryPath(s.c_str(),fileName);
977 size_t incLen = inc.
length();
978 if (incLen>0 && inc.
at(0)==
'"' && inc.
at(incLen-1)==
'"')
980 inc=inc.
mid(1,incLen-2);
990 msg(
"@INCLUDE = %s: parsing...\n",
qPrint(inc));
1002 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(const char *fmt,...)
static void config_warn(const char *fmt,...)
QCString & getEnum(const char *fileName, int num, const char *name) const
static void config_err(const char *fmt,...)
StringVector & getList(const char *fileName, int num, const char *name) const
static std::unique_ptr< ConfigImpl > m_instance
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
void msg(const char *fmt,...)
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)
const char * qPrint(const char *s)
1017REGEX_a [a-z_A-Z\x80-\xFF]
1018REGEX_w [a-z_A-Z0-9\x80-\xFF]
1034 g_config->appendUserComment(yytext);
1043<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"=" {
g_cmd=yytext;
1056 switch(option->
kind())
1097 " To avoid this warning please remove this line from your configuration "
1118 ConfigImpl::config_warn(
"Tag '%s' at line %d of file '%s' belongs to an option that was not enabled at compile time.\n"
1123 ConfigImpl::config_warn(
"Tag '%s' at line %d of file '%s' belongs to an option that was not enabled at compile time.\n"
1124 " 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.
1132<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"+=" {
g_cmd=yytext;
1144 switch(option->
kind())
1165 "To avoid this warning please update your configuration "
1179 ConfigImpl::config_warn(
"Tag '%s' at line %d of file %s belongs to an option that was not enabled at compile time.\n"
1180 "To avoid this warning please remove this line from your configuration "
1192<Start>"@INCLUDE"[ \t]*"=" { BEGIN(Include);}
1193<Start>"$("{REGEX_a}({REGEX_w}|[.-])*")" |
1194<Start>"$("{REGEX_a}({REGEX_w}|[.-])*"("{REGEX_a}({REGEX_w}|[.-])*"))" {
1206<Start>"@"{REGEX_a}{REGEX_w}*"@" {
1218<Include>([^ \"\t\r\n]+)|("\""[^\n\"]+"\"") {
1234 YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER;
1235 yy_switch_to_buffer( fs->oldState );
1236 yy_delete_buffer( oldBuf );
1260<StoreRepl>[^\n\\]+ {
1275<GetString>[^\n\\]+ {
1291<GetStrList>[^\n\\]+ {
1304<SkipInvalid>[^\n\\]+ {
1326 t <<
"# Doxyfile " << getDoxygenVersion() <<
"\n\n";
1345 t <<
"# Difference with default Doxyfile " << getFullVersion();
1361 t <<
"<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n";
1362 t <<
"<doxyfile xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"doxyfile.xsd\" version=\"" << getDoxygenVersion() <<
"\" xml:lang=\"" <<
theTranslator->trISOLang() <<
"\">\n";
1367 t <<
"</doxyfile>\n";
1404 std::string s = str.
str();
1411 auto replace = [](
const std::string &s,
const reg::Ex &re) -> std::string
1417 for (; it!=
end ; ++it)
1419 const auto &match = *it;
1420 size_t i = match.position();
1421 size_t l = match.length();
1422 result+=s.substr(p,i-p);
1423 std::string matchContents = match[1].str();
1429 result+=s.substr(p);
1439 for (
const auto &s : sl)
1442 bool wasQuoted = ((result.
at(0)==
'"') && (result.
at(result.
length()-1)==
'"'));
1445 result = result.
mid(1,result.
length()-2);
1449 wasQuoted = (result.
find(
' ')!=-1) || (result.
find(
'\t')!=-1) || (result.
find(
'"')!=-1);
1462 int l =
static_cast<int>(result.
length());
1466 for (
int i=0;i<l;i++)
1470 while (i<l && ((c=result.
at(i))==
' ' || c==
'\t')) i++;
1473 while (i<l && ((c=result.
at(i))!=
' ' && c!=
'\t' && c!=
'"')) i++;
1484 results.push_back(result.
mid(p,i-p).
str());
1494 else if (c==
' ' || c==
'\t')
1496 if (i>p) results.push_back(result.
mid(p,i-p).
str());
1503 results.push_back(result.
right(l-p).
str());
1508 if (!result.
isEmpty()) results.push_back(result.
str());
1565 config_term(
"Config option '%s' has invalid depends relation on unknown option '%s'\n",
1581 auto stream2string = [](std::istream &in) -> std::string
1585 while (in.read(buffer,
sizeof(buffer))) ret.append(buffer,
sizeof(buffer));
1586 ret.append(buffer,
static_cast<uint32_t
>(in.gcount()));
1587 if (!ret.empty() && ret[ret.length()-1]!=
'\n') ret+=
'\n';
1594 return stream2string(std::cin);
1604 return stream2string(f);
1619 configimplYYrestart( configimplYYin );
1640 for (
size_t i=0;i<str.size();i++)
1642 std::string path = str[i];
1643 std::replace(path.begin(),path.end(),
'\\',
'/');
1644 if ((path[0]!=
'/' && (path.size()<=2 || path[1]!=
':')) || path[path.size()-1]!=
'/')
1650 if (path[path.size()-1]!=
'/') path+=
'/';
1660 if ((val==
"yes" || val==
"true" || val==
"1" || val==
"all") ||
1661 (val==
"no" || val==
"false" || val==
"0" || val==
"none"))
1663 err(
"file name expected for option %s, got %s instead. Ignoring...\n",optionName,
qPrint(s));
1677 for (
const auto &s: list)
1681 int i=item.
find(
'=');
1682 if (i==-1 && equalRequired)
1684 err(
"Illegal format for option %s, no equal sign ('=') specified for item '%s'\n",name,
qPrint(item));
1691 err(
"Illegal format for option %s, no name specified for item '%s'\n",name,
qPrint(item));
1693 else if (valueRequired)
1698 err(
"Illegal format for option %s, no value specified for item '%s'\n",name,
qPrint(item));
1708 const ConfigValues::Info *option = ConfigValues::instance().get(optionName);
1709 if (option && option->type==ConfigValues::Info::Bool)
1711 if (ConfigValues::instance().*(option->value.b)!=expectedValue)
1713 err(
"When enabling %s the %s option should be %s. I'll adjust it for you.\n",depOption,optionName,expectedValue?
"enabled" :
"disabled");
1714 ConfigValues::instance().*(option->value.b)=expectedValue;
1722 const ConfigValues::Info *option = ConfigValues::instance().get(optionName);
1723 if (option && option->type==ConfigValues::Info::String)
1725 if (ConfigValues::instance().*(option->value.s)!=expectedValue)
1727 err(
"When enabling %s the %s option should have value '%s'. I'll adjust it for you.\n",depOption,optionName,
qPrint(expectedValue));
1728 ConfigValues::instance().*(option->value.s)=expectedValue;
1735 auto updateColorStyle = [&depOption](HTML_COLORSTYLE_t curStyle,HTML_COLORSTYLE_t newStyle)
1737 err(
"When enabling '%s' the 'HTML_COLORSTYLE' option should be either 'LIGHT' or 'DARK' but has value '%s'. I'll adjust it for you to '%s'.\n",
1739 qPrint(HTML_COLORSTYLE_enum2str(curStyle)),
1740 qPrint(HTML_COLORSTYLE_enum2str(newStyle)));
1746 case HTML_COLORSTYLE_t::LIGHT:
1747 case HTML_COLORSTYLE_t::DARK:
1750 case HTML_COLORSTYLE_t::AUTO_LIGHT:
1751 case HTML_COLORSTYLE_t::TOGGLE:
1752 updateColorStyle(colorStyle,HTML_COLORSTYLE_t::LIGHT);
1754 case HTML_COLORSTYLE_t::AUTO_DARK:
1755 updateColorStyle(colorStyle,HTML_COLORSTYLE_t::DARK);
1763 ConfigValues::instance().init();
1769 if (warnFormat.
find(
"$file")==-1)
1771 warn_uncond(
"warning format does not contain a $file tag!\n");
1773 if (warnFormat.
find(
"$line")==-1)
1775 warn_uncond(
"warning format does not contain a $line tag!\n");
1777 if (warnFormat.
find(
"$text")==-1)
1779 warn_uncond(
"warning format does not contain a $text tag!\n");
1786 if (paperType.
isEmpty() || paperType==
"a4wide")
1791 else if (paperType!=
"a4" && paperType!=
"letter" &&
1792 paperType!=
"legal" && paperType!=
"executive")
1794 err(
"Unknown page type '%s' specified\n",
qPrint(paperType));
1821 if (check && !headerFile.
isEmpty())
1827 "does not exist\n",
qPrint(headerFile));
1834 if (check && !footerFile.
isEmpty())
1840 "does not exist\n",
qPrint(footerFile));
1850 if (mathjaxVersion == MATHJAX_VERSION_t::MathJax_2)
1852 if (mathJaxFormat==MATHJAX_FORMAT_t::chtml)
1859 if (mathJaxFormat==MATHJAX_FORMAT_t::HTML_CSS || mathJaxFormat==MATHJAX_FORMAT_t::NativeMML)
1866 if (check && !mathJaxCodefile.
isEmpty())
1872 "does not exist\n",
qPrint(mathJaxCodefile));
1878 path =
"https://cdn.jsdelivr.net/npm/mathjax@";
1879 switch (mathjaxVersion)
1881 case MATHJAX_VERSION_t::MathJax_2: path +=
"2";
break;
1882 case MATHJAX_VERSION_t::MathJax_3: path +=
"3";
break;
1896 if (check && !latexHeaderFile.
isEmpty())
1902 "does not exist\n",
qPrint(latexHeaderFile));
1909 if (check && !latexFooterFile.
isEmpty())
1915 "does not exist\n",
qPrint(latexFooterFile));
1922 for (
const auto &s : includePath)
1926 "does not exist\n",s.c_str());
1934 for (
const auto &s : predefList)
1938 int i_equals=predef.
find(
'=');
1939 int i_obrace=predef.
find(
'(');
1940 if ((i_obrace==0) || (i_equals==0) || (i_equals==1 && predef.
at(i_equals-1)==
':'))
1942 err(
"Illegal PREDEFINED format '%s', no define name specified\n",
qPrint(predef));
1977 numThreads =
static_cast<int>(std::thread::hardware_concurrency());
1986 const char *depOption =
"GENERATE_HTMLHELP";
1996 for (
const auto &s : tagFileList)
1998 bool validUrl =
false;
1999 size_t eqPos = s.find(
'=');
2000 if (eqPos!=std::string::npos)
2007 filteredTagFileList.push_back(s);
2011 err(
"When enabling GENERATE_HTMLHELP the TAGFILES option should only contain destinations "
2012 "with https / http addresses (not: %s). I'll adjust it for you.\n",s.c_str());
2021 const char *depOption =
"INLINE_GROUPED_CLASSES";
2028 if (dotNumThreads>32)
2032 else if (dotNumThreads<=0)
2034 dotNumThreads=std::max(2u,std::thread::hardware_concurrency()+1);
2041 if (!plantumlJarPath.
isEmpty())
2050 plantumlJarPath = plantumlJar;
2054 err(
"Jar file 'plantuml.jar' not found at location "
2055 "specified via PLANTUML_JAR_PATH: '%s'\n",
qPrint(plantumlJarPath));
2065 err(
"PLANTUML_JAR_PATH is not a directory with a 'plantuml.jar' file or is not an existing file: %s\n",
2066 qPrint(plantumlJarPath));
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 '%s' does not exist\n",s.c_str());
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 const char *depOption =
"OPTIMIZE_OUTPUT_VHDL";
2212 for (
const auto &option : m_options)
2223 printf(
"disabling option %s\n",
qPrint(option->
name()));
2246 haveDotOpt && classGraphOpt)
2251 if (classDiagramsOpt_ && haveDotOpt_ && classGraphOpt_ &&
2257 bool isValid1=
true, isValid2=
true;
2260 if (isValid1 && isValid2 && !bClassDiagrams && !bHaveDot && classGraphValue.
lower()==
"yes")
2262 warn_uncond(
"Changing CLASS_GRAPH option to TEXT because obsolete option CLASS_DIAGRAM was found and set to NO.\n");
2263 classGraphValue=
"TEXT";
2276 if (htmlTimestamp_ && timestampOpt_ &&
2283 if (isValid && bTimestamp)
2286 timestampValue =
"YES";
2295 if (latexTimestamp_ && timestampOpt_ &&
2302 if (isValid && bTimestamp) timestampValue =
"YES";
2311 (*fontname->valueStringRef() ==
"FreeSans"
2312 || *fontname->valueStringRef() ==
"FreeSans.ttf"))
2313 warn_uncond(
"doxygen no longer ships with the FreeSans font.\n"
2314 " You may want to clear or change DOT_FONTNAME.\n"
2315 " Otherwise you run the risk that the wrong font is being used for dot generated graphs.\n");
2320 QCString& commonAttrStr = *commonAttrOpt->valueRef();
2324 commonAttrStr = commonAttr.
str();
2330 QCString& edgeAttrStr = *edgeAttrOpt->valueRef();
2334 edgeAttrStr = edgeAttr.
str();
2363 if (!parseRes)
return parseRes;
2378 configInst->convertStrToVal(compareMode);
2382 if (clearHeaderAndFooter)
2396#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)
update a given attribute with a new value.
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.
Iterator class to iterator 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 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.
static QCString stripFromPath(const QCString &p, const StringVector &l)