From 9c44f500a8305ba6603875e49bc682f721fafa1d Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 15 Jan 2019 15:04:24 +0100 Subject: issue #6764 Incorrect parsing of C enum comments defined using a macro When in a `/*` comment skip till end of the comment so a `,` won't be seen as the argument separator. --- src/pre.l | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/pre.l b/src/pre.l index 5eb0c5c..b18984e 100644 --- a/src/pre.l +++ b/src/pre.l @@ -882,6 +882,21 @@ static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int arg+=c; } } + else if (c=='/') // possible start of a comment + { + char prevChar = '\0'; + arg+=c; + if ((cc=getCurrentChar(expr,rest,j)) == '*') // we have a comment + { + while ((cc=getNextChar(expr,rest,j))!=EOF && cc!=0) + { + c=(char)cc; + arg+=c; + if (c == '/' && prevChar == '*') break; // we have an end of comment + prevChar = c; + } + } + } else // append other characters { arg+=c; @@ -1110,7 +1125,6 @@ static void expandExpression(QCString &expr,QCString *rest,int pos) if (replaced) // expand the macro and rescan the expression { - //printf("replacing `%s'->`%s'\n",expr.mid(p,len).data(),expMacro.data()); QCString resultExpr=expMacro; QCString restExpr=expr.right(expr.length()-len-p); -- cgit v0.12 From ca5ad4a50ba0c55ef22cd58dd8040fb4602f69cf Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 20 Jan 2019 11:29:23 +0100 Subject: issue #6775 LaTex package newunicodechar: "package won't work " Some older distributions with newunicode package 1.1 need this option `\usepackage[utf8]{inputenc}`. Option was already present in the main LaTeX output i.e. refman.tex --- src/formula.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/formula.cpp b/src/formula.cpp index c252e07..1c5042e 100644 --- a/src/formula.cpp +++ b/src/formula.cpp @@ -71,6 +71,7 @@ void FormulaList::generateBitmaps(const char *path) t << "\\documentclass{article}" << endl; t << "\\usepackage{ifthen}" << endl; t << "\\usepackage{epsfig}" << endl; // for those who want to include images + t << "\\usepackage[utf8]{inputenc}" << endl; // looks like some older distributions with newunicode package 1.1 need this option. writeExtraLatexPackages(t); writeLatexSpecialFormulaChars(t); t << "\\pagestyle{empty}" << endl; -- cgit v0.12 From a1a8e495d218f3774035d9cc6cafab79d74aee5d Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 23 Feb 2019 12:20:05 +0100 Subject: Remove superfluous paragraph tags Removed some superfluous paragraph tags in HTML (`

`). --- doc/commands.doc | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/doc/commands.doc b/doc/commands.doc index ec207f1..8619cba 100644 --- a/doc/commands.doc +++ b/doc/commands.doc @@ -445,7 +445,7 @@ Structural indicators for the corresponding \mbox{\LaTeX} documentation that is generated by doxygen. \endlatexonly -


+
\section cmddef \\def \addindex \\def @@ -463,7 +463,7 @@ Structural indicators for the corresponding \mbox{\LaTeX} documentation that is generated by doxygen. \endlatexonly -


+
\section cmddefgroup \\defgroup (group title) \addindex \\defgroup @@ -515,7 +515,7 @@ Structural indicators for the corresponding \mbox{\LaTeX} documentation that is generated by doxygen. \endlatexonly -


+
\section cmdexample \\example[{lineno}] \addindex \\example @@ -553,7 +553,7 @@ Structural indicators \sa section \ref cmdinclude "\\include". -


+
\section cmdendinternal \\endinternal \addindex \\endinternal @@ -612,7 +612,7 @@ Structural indicators \note In the above example \ref cfg_javadoc_autobrief "JAVADOC_AUTOBRIEF" has been set to \c YES in the configuration file. -


+
\section cmdfn \\fn (function declaration) \addindex \\fn @@ -650,7 +650,7 @@ Structural indicators \sa sections \ref cmdvar "\\var", \ref cmdproperty "\\property", and \ref cmdtypedef "\\typedef". -


+
\section cmdheaderfile \\headerfile [] \addindex \\headerfile @@ -836,7 +836,7 @@ Structural indicators \ref cmdpublic "\\public", \ref cmdprotected "\\protected" and \ref cmdprivate "\\private". -


+
\section cmdname \\name [(header)] \addindex \\name @@ -904,7 +904,7 @@ Structural indicators for the corresponding \mbox{\LaTeX} documentation that is generated by doxygen. \endlatexonly -


+
\section cmdpackage \\package \addindex \\package @@ -945,7 +945,7 @@ Structural indicators \ref cmdsubsection "\\subsection", and section \ref cmdref "\\ref". -


+
\section cmdprivate \\private \addindex \\private @@ -1092,7 +1092,7 @@ Structural indicators for the corresponding \mbox{\LaTeX} documentation that is generated by doxygen. \endlatexonly -


+
\section cmdrelated \\related \addindex \\related @@ -1255,7 +1255,7 @@ Section indicators for the corresponding \mbox{\LaTeX} documentation that is generated by doxygen. \endlatexonly -


+
\section cmdauthors \\authors { list of authors } \addindex \\authors @@ -1606,7 +1606,7 @@ ALIASES = "english=\if english" \ for the corresponding \mbox{\LaTeX} documentation that is generated by doxygen. \endlatexonly -


+
\section cmdparam \\param [(dir)] { parameter description } \addindex \\param @@ -2228,7 +2228,7 @@ Commands for displaying examples \ref cmdskipline "\\skipline", \ref cmduntil "\\until", and \ref cmdinclude "\\include". -


+
\section cmdinclude \\include[{lineno|doc}] \addindex \\include @@ -3526,10 +3526,8 @@ browser generator. Do \e not use these commands in your own documentation. \htmlonly -

Go to the next section or return to the index. -

\endhtmlonly */ -- cgit v0.12 From be1cceffdb3d8487f10fe7a354d360c52979edd3 Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 25 Feb 2019 10:21:41 +0100 Subject: Bug 645910 - Segfault on recursion while parsing "\subpage A" in "\page A" In version 1.7.3 (till 1.8.7) the problem of direct recursion (i.e. in a page is a subpage to itself) we got a segmentation fault, as of 1.8.8 the problem went into an endless loop. The direct recursion is now detected. --- src/doxygen.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/doxygen.cpp b/src/doxygen.cpp index caa13a6..47b16eb 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -8727,7 +8727,14 @@ static void computePageRelations(Entry *root) for (bii.toFirst();(bi=bii.current());++bii) { PageDef *subPd = Doxygen::pageSDict->find(bi->name); - if (subPd) + if (pd==subPd) + { + err("page defined at line %d of file %s with label %s is a direct " + "subpage of itself! Please remove this cyclic dependency.\n", + pd->docLine(),pd->docFile().data(),pd->name().data()); + exit(1); + } + else if (subPd) { pd->addInnerCompound(subPd); //printf("*** Added subpage relation: %s->%s\n", -- cgit v0.12 From a735007427439b73327af0c8cfa003423bcdef6e Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 28 Feb 2019 13:14:10 +0100 Subject: Multiple use of HTML attributes In case an attribute is used multiple times the XHTML validator gives (here for the style attribute): parser error : Attribute style redefined Created routine to merge these types of attributes. --- src/htmldocvisitor.cpp | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index ee8aab3..0c31dbc 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -211,6 +211,34 @@ static bool isInvisibleNode(DocNode *node) ; } +static void mergeHtmlAttributes(const HtmlAttribList &attribs, HtmlAttribList *mergeInto) +{ + HtmlAttribListIterator li(attribs); + HtmlAttrib *att; + for (li.toFirst();(att=li.current());++li) + { + HtmlAttribListIterator ml(*mergeInto); + HtmlAttrib *opt; + bool found = false; + for (ml.toFirst();(opt=ml.current());++ml) + { + if (opt->name == att -> name) + { + found = true; + break; + } + } + if (found) + { + opt->value = opt->value + " " + att->value; + } + else + { + mergeInto->append(att); + } + } +} + static QCString htmlAttribsToString(const HtmlAttribList &attribs, QCString *pAltValue = 0) { QCString result; @@ -1651,8 +1679,18 @@ void HtmlDocVisitor::visitPre(DocImage *img) sizeAttribs+=" height=\""+img->height()+"\""; } // 16 cases: url.isEmpty() | typeSVG | inlineImage | img->hasCaption() + + HtmlAttribList extraAttribs; + if (typeSVG) + { + HtmlAttrib opt; + opt.name = "style"; + opt.value = "pointer-events: none;"; + extraAttribs.append(&opt); + } QCString alt; - QCString attrs = htmlAttribsToString(img->attribs(),&alt); + mergeHtmlAttributes(img->attribs(),&extraAttribs); + QCString attrs = htmlAttribsToString(extraAttribs,&alt); QCString src; if (url.isEmpty()) { @@ -1664,7 +1702,7 @@ void HtmlDocVisitor::visitPre(DocImage *img) } if (typeSVG) { - m_t << " Date: Thu, 7 Mar 2019 17:03:12 +0100 Subject: Possibility to show converted fixed form Create an easy possibility to show the Fortran source as converted from fixed form to free form. --- src/debug.cpp | 1 + src/debug.h | 3 ++- src/fortranscanner.l | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/debug.cpp b/src/debug.cpp index 2f343ac..4c7afb3 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -49,6 +49,7 @@ static LabelMap s_labels[] = { "filteroutput", Debug::FilterOutput }, { "lex", Debug::Lex }, { "plantuml", Debug::Plantuml }, + { "fortranfixed2free", Debug::FortranFixed2Free }, { 0, (Debug::DebugMask)0 } }; diff --git a/src/debug.h b/src/debug.h index 9a2070c..79bc3d8 100644 --- a/src/debug.h +++ b/src/debug.h @@ -38,7 +38,8 @@ class Debug Markdown = 0x00000800, FilterOutput = 0x00001000, Lex = 0x00002000, - Plantuml = 0x00004000 + Plantuml = 0x00004000, + FortranFixed2Free = 0x00008000 }; static void print(DebugMask mask,int prio,const char *fmt,...); static int setFlag(const char *label); diff --git a/src/fortranscanner.l b/src/fortranscanner.l index 1f0c356..e5dc5ca 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -66,6 +66,7 @@ #include "fortrancode.h" #include "pre.h" #include "arguments.h" +#include "debug.h" // Toggle for some debugging info //#define DBG_CTX(x) fprintf x @@ -2640,6 +2641,8 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt, Fortra //printf("Input fixed form string:\n%s\n", fileBuf); //printf("===========================\n"); inputString = prepassFixedForm(fileBuf, NULL); + Debug::print(Debug::FortranFixed2Free,0,"======== Fixed to Free format =========\n---- Input fixed form string ------- \n%s\n", fileBuf); + Debug::print(Debug::FortranFixed2Free,0,"---- Resulting free form string ------- \n%s\n", inputString); //printf("Resulting free form string:\n%s\n", inputString); //printf("===========================\n"); -- cgit v0.12 From 50fcec52571ad447c814377a7f5ac0454d60c5c9 Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 12 Mar 2019 10:06:33 +0100 Subject: issue #6882 1.8.15 regression: caller graph created even though CALLER_GRAPH = NO the enabling of the caller graph was set by the references relation (regression on issue #6562) --- src/memberdef.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/memberdef.cpp b/src/memberdef.cpp index a73975d..995901a 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -5572,9 +5572,9 @@ void combineDeclarationAndDefinition(MemberDef *mdec,MemberDef *mdef) mdec->enableCallerGraph(mdec->hasCallerGraph() || mdef->hasCallerGraph()); mdef->enableReferencedByRelation(mdec->hasReferencedByRelation() || mdef->hasReferencedByRelation()); - mdef->enableCallerGraph(mdec->hasReferencesRelation() || mdef->hasReferencesRelation()); + mdef->enableReferencesRelation(mdec->hasReferencesRelation() || mdef->hasReferencesRelation()); mdec->enableReferencedByRelation(mdec->hasReferencedByRelation() || mdef->hasReferencedByRelation()); - mdec->enableCallerGraph(mdec->hasReferencesRelation() || mdef->hasReferencesRelation()); + mdec->enableReferencesRelation(mdec->hasReferencesRelation() || mdef->hasReferencesRelation()); } } } -- cgit v0.12