summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2018-09-23 10:55:10 (GMT)
committerGitHub <noreply@github.com>2018-09-23 10:55:10 (GMT)
commitaef431d2e34fbd738fe5eb8d1d14a88fae9d536d (patch)
treeede77599b0123c05ce4fc5388dd5629e9b3d38fc
parent9b13cfe86e26c7282cea0e0ad5d253a507e1645b (diff)
parentc6ec3a813f61b1a5c15d959b923c4f26dd2f62c5 (diff)
downloadDoxygen-aef431d2e34fbd738fe5eb8d1d14a88fae9d536d.zip
Doxygen-aef431d2e34fbd738fe5eb8d1d14a88fae9d536d.tar.gz
Doxygen-aef431d2e34fbd738fe5eb8d1d14a88fae9d536d.tar.bz2
Merge pull request #6521 from albert-github/feature/bug_doxyfile_diff_2
Difference between standard and used Doxyfile (list)
-rw-r--r--src/configimpl.l65
1 files changed, 57 insertions, 8 deletions
diff --git a/src/configimpl.l b/src/configimpl.l
index 72584d7..3fb1360 100644
--- a/src/configimpl.l
+++ b/src/configimpl.l
@@ -317,22 +317,71 @@ void ConfigList::writeTemplate(FTextStream &t,bool sl,bool)
void ConfigList::compareDoxyfile(FTextStream &t)
{
- if ( m_value.count() != m_defaultValue.count())
+ const char *p = m_value.first();
+ const char *q = m_defaultValue.first();
+ int defCnt = 0;
+ int valCnt = 0;
+
+ // count non empty elements
+ while (p)
+ {
+ QCString s=p;
+ if (!s.stripWhiteSpace().isEmpty()) valCnt += 1;
+ p = m_value.next();
+ }
+
+ while (q)
+ {
+ QCString s=q;
+ if (!s.stripWhiteSpace().isEmpty()) defCnt += 1;
+ q = m_defaultValue.next();
+ }
+ if ( valCnt != defCnt)
{
writeTemplate(t,TRUE,TRUE);
return;
}
- const char *p = m_value.first();
- const char *q = m_defaultValue.first();
- while (p)
+ // get first non empry element
+ q = m_defaultValue.first();
+ p = m_value.first();
+ QCString sp = p;
+ while (p && sp.stripWhiteSpace().isEmpty())
{
p = m_value.next();
- q = m_defaultValue.next();
- if (QCString(p).stripWhiteSpace() != QCString(q).stripWhiteSpace())
+ sp = p;
+ }
+ QCString sq = q;
+ while (q && sq.stripWhiteSpace().isEmpty())
+ {
+ q = m_value.next();
+ sq = q;
+ }
+ while (p)
+ {
+ // skip empty elements
+ sp = p;
+ while (p && sp.stripWhiteSpace().isEmpty())
{
- writeTemplate(t,TRUE,TRUE);
- return;
+ p = m_value.next();
+ sp = p;
+ }
+ sq = q;
+ while (q && sq.stripWhiteSpace().isEmpty())
+ {
+ q = m_value.next();
+ sq = q;
+ }
+ // be sure we have still an element (p and q have same number of 'filled' elements)
+ if (p)
+ {
+ if (sp.stripWhiteSpace() != sq.stripWhiteSpace())
+ {
+ writeTemplate(t,TRUE,TRUE);
+ return;
+ }
+ p = m_value.next();
+ q = m_defaultValue.next();
}
}
}