summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2018-07-30 08:14:55 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2018-07-30 08:14:55 (GMT)
commit96283747149da8a7b401b737bb88baffa82ca15b (patch)
treefc9db822f73771d1fdd7f689474bc51a40f5962c
parent8032111d5e1baf0d4c017be6f6eea2aaa10ad26b (diff)
parent2b6fd3bd70795c1c1cf0accb1a991015ad6b2ba9 (diff)
downloadDoxygen-96283747149da8a7b401b737bb88baffa82ca15b.zip
Doxygen-96283747149da8a7b401b737bb88baffa82ca15b.tar.gz
Doxygen-96283747149da8a7b401b737bb88baffa82ca15b.tar.bz2
Merge branch 'albert-github-feature/bug_734820'
-rw-r--r--doc/xmlcmds.doc3
-rw-r--r--qtools/qglist.cpp2
-rw-r--r--qtools/qlist.doc2
-rw-r--r--src/classdef.cpp11
-rw-r--r--src/classdef.h3
-rw-r--r--src/code.l13
-rw-r--r--src/commentscan.l38
-rw-r--r--src/doxygen.cpp49
-rw-r--r--src/ftvhelp.cpp2
-rw-r--r--src/htmlgen.cpp10
-rw-r--r--src/plantuml.cpp4
-rw-r--r--src/pre.l12
12 files changed, 102 insertions, 47 deletions
diff --git a/doc/xmlcmds.doc b/doc/xmlcmds.doc
index 501bf91..848858d 100644
--- a/doc/xmlcmds.doc
+++ b/doc/xmlcmds.doc
@@ -70,6 +70,9 @@ Here is the list of tags supported by doxygen:
<li><tt>\<typeparamref name="paramName"\></tt> Refers to a parameter with name
"paramName". Similar to using \ref cmda "\\a".
<li><tt>\<value\></tt> Identifies a property. Ignored by doxygen.
+<li><tt>\<![CDATA[...]]\></tt> The text inside this tag (on the ...) is handled as normal
+ doxygen comment except for the XML special characters `<`, `>` and
+ `&` that are used as if they were escaped.
</ul>
Here is an example of a typical piece of code using some of the above commands:
diff --git a/qtools/qglist.cpp b/qtools/qglist.cpp
index f464a73..731d9fd 100644
--- a/qtools/qglist.cpp
+++ b/qtools/qglist.cpp
@@ -235,7 +235,7 @@ QGList& QGList::operator=( const QGList &list )
}
/*!
- Compares this list with \a list. Retruns TRUE if the lists
+ Compares this list with \a list. Returns TRUE if the lists
contain the same data, else FALSE.
*/
diff --git a/qtools/qlist.doc b/qtools/qlist.doc
index 6b4278c..59cc971 100644
--- a/qtools/qlist.doc
+++ b/qtools/qlist.doc
@@ -168,7 +168,7 @@
/*!
\fn bool QList::operator==(const QList<type> &list ) const
- Compares this list with \a list. Retruns TRUE if the lists
+ Compares this list with \a list. Returns TRUE if the lists
contain the same data, else FALSE.
*/
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 4977760..657968e 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -1582,7 +1582,11 @@ void ClassDef::writeSummaryLinks(OutputList &ol)
void ClassDef::writeTagFile(FTextStream &tagFile)
{
if (!isLinkableInProject()) return;
- tagFile << " <compound kind=\"" << compoundTypeString();
+ tagFile << " <compound kind=\"";
+ if (isFortran() && (compoundTypeString() == "type"))
+ tagFile << "struct";
+ else
+ tagFile << compoundTypeString();
tagFile << "\"";
if (isObjectiveC()) { tagFile << " objc=\"yes\""; }
tagFile << ">" << endl;
@@ -4500,6 +4504,11 @@ bool ClassDef::isObjectiveC() const
return getLanguage()==SrcLangExt_ObjC;
}
+bool ClassDef::isFortran() const
+{
+ return getLanguage()==SrcLangExt_Fortran;
+}
+
bool ClassDef::isCSharp() const
{
return getLanguage()==SrcLangExt_CSharp;
diff --git a/src/classdef.h b/src/classdef.h
index b169221..12fcd93 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -266,6 +266,9 @@ class ClassDef : public Definition
/** Returns TRUE if this class is implemented in Objective-C */
bool isObjectiveC() const;
+ /** Returns TRUE if this class is implemented in Fortran */
+ bool isFortran() const;
+
/** Returns TRUE if this class is implemented in C# */
bool isCSharp() const;
diff --git a/src/code.l b/src/code.l
index 5c9e289..2c9b0ae 100644
--- a/src/code.l
+++ b/src/code.l
@@ -1797,6 +1797,11 @@ static QCString escapeComment(const char *s)
return result;
}
+static bool skipLanguageSpecificKeyword(const QCString &kw)
+{
+ return g_insideCpp && (kw == "remove" || kw == "set" || kw == "get");
+}
+
/* -----------------------------------------------------------------
*/
#undef YY_INPUT
@@ -2417,7 +2422,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
<Body>{KEYWORD}/([^a-z_A-Z0-9]) {
if (g_insideJava && qstrcmp("internal",yytext) ==0) REJECT;
- if (g_insideCpp && (QCString(yytext) =="set" ||QCString(yytext) =="get")) REJECT;
+ if (skipLanguageSpecificKeyword(yytext)) REJECT;
startFontClass("keyword");
codifyLines(yytext);
if (QCString(yytext)=="typedef")
@@ -2428,13 +2433,13 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
endFontClass();
}
<Body>{KEYWORD}/{B}* {
- if (g_insideCpp && (QCString(yytext) =="set" ||QCString(yytext) =="get")) REJECT;
+ if (skipLanguageSpecificKeyword(yytext)) REJECT;
startFontClass("keyword");
codifyLines(yytext);
endFontClass();
}
<Body>{KEYWORD}/{BN}*"(" {
- if (g_insideCpp && (QCString(yytext) =="set" ||QCString(yytext) =="get")) REJECT;
+ if (skipLanguageSpecificKeyword(yytext)) REJECT;
startFontClass("keyword");
codifyLines(yytext);
endFontClass();
@@ -2989,7 +2994,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
<MemberCall2,FuncCall>{KEYWORD}/([^a-z_A-Z0-9]) {
//addParmType();
//g_parmName=yytext;
- if (g_insideCpp && (QCString(yytext) =="set" ||QCString(yytext) =="get")) REJECT;
+ if (skipLanguageSpecificKeyword(yytext)) REJECT;
startFontClass("keyword");
g_code->codify(yytext);
endFontClass();
diff --git a/src/commentscan.l b/src/commentscan.l
index c364312..e40d80f 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -990,6 +990,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
%x CiteLabel
%x CopyDoc
%x GuardExpr
+%x CdataSection
%%
@@ -1082,13 +1083,16 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
insidePre=FALSE;
addOutput(yytext);
}
-<Comment>{RCSTAG} { // RCS tag which end a brief description
- setOutput(OutputDoc);
- REJECT;
- }
-<Comment>"<!--" {
- BEGIN(HtmlComment);
- }
+<Comment>{RCSTAG} { // RCS tag which end a brief description
+ setOutput(OutputDoc);
+ REJECT;
+ }
+<Comment>"<!--" {
+ BEGIN(HtmlComment);
+ }
+<Comment>"<!\[CDATA\[" {
+ BEGIN(CdataSection);
+ }
<Comment>{B}*{CMD}"endinternal"{B}* {
addOutput(" \\endinternal ");
if (!inInternalDocs)
@@ -1332,6 +1336,24 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
<HtmlComment>. { // ignore every else
}
+<CdataSection>"\]\]>" {
+ BEGIN( Comment );
+ }
+<CdataSection>{DOCNL} {
+ addOutput('\n');
+ if (*yytext=='\n') yyLineNr++;
+ }
+<CdataSection>[<>&] { // the special XML characters for iwhich the CDATA section is especially used
+ addOutput('\\');
+ addOutput(*yytext);
+ }
+<CdataSection>[^\\\n\]<>&]+ {
+ addOutput(yytext);
+ }
+<CdataSection>. {
+ addOutput(*yytext);
+ }
+
/* -------------- Rules for handling formulas ---------------- */
<ReadFormulaShort>{CMD}"f$" { // end of inline formula
@@ -1358,7 +1380,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
formulaText+=*yytext;
yyLineNr++;
}
-<ReadFormulaLong,ReadFormulaShort>. { // any othe character
+<ReadFormulaLong,ReadFormulaShort>. { // any other character
formulaText+=*yytext;
}
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 7353516..68b49c2 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -10218,11 +10218,6 @@ void readConfiguration(int argc, char **argv)
{
case 'g':
genConfig=TRUE;
- configName=getArg(argc,argv,optind);
- if (optind+1<argc && qstrcmp(argv[optind+1],"-")==0)
- { configName="-"; optind++; }
- if (!configName)
- { configName="Doxyfile"; }
break;
case 'l':
genLayout=TRUE;
@@ -10461,26 +10456,6 @@ void readConfiguration(int argc, char **argv)
Config::init();
- if (genConfig && g_useOutputTemplate)
- {
- generateTemplateFiles("templates");
- cleanUpDoxygen();
- exit(0);
- }
-
- if (genConfig)
- {
- generateConfigFile(configName,shortList);
- cleanUpDoxygen();
- exit(0);
- }
- if (genLayout)
- {
- writeDefaultLayoutFile(layoutName);
- cleanUpDoxygen();
- exit(0);
- }
-
QFileInfo configFileInfo1("Doxyfile"),configFileInfo2("doxyfile");
if (optind>=argc)
{
@@ -10492,6 +10467,10 @@ void readConfiguration(int argc, char **argv)
{
configName="doxyfile";
}
+ else if (genConfig)
+ {
+ configName="Doxyfile";
+ }
else
{
err("Doxyfile not found and no input file specified!\n");
@@ -10502,7 +10481,7 @@ void readConfiguration(int argc, char **argv)
else
{
QFileInfo fi(argv[optind]);
- if (fi.exists() || qstrcmp(argv[optind],"-")==0)
+ if (fi.exists() || qstrcmp(argv[optind],"-")==0 || genConfig)
{
configName=argv[optind];
}
@@ -10513,7 +10492,25 @@ void readConfiguration(int argc, char **argv)
exit(1);
}
}
+ if (genConfig && g_useOutputTemplate)
+ {
+ generateTemplateFiles("templates");
+ cleanUpDoxygen();
+ exit(0);
+ }
+ if (genConfig)
+ {
+ generateConfigFile(configName,shortList);
+ cleanUpDoxygen();
+ exit(0);
+ }
+ if (genLayout)
+ {
+ writeDefaultLayoutFile(layoutName);
+ cleanUpDoxygen();
+ exit(0);
+ }
if (!Config::parse(configName,updateConfig))
{
diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp
index d71c48f..cee39f2 100644
--- a/src/ftvhelp.cpp
+++ b/src/ftvhelp.cpp
@@ -304,7 +304,7 @@ void FTVHelp::generateLink(FTextStream &t,FTVNode *n)
}
else
{
- t << ">";
+ t << "\">";
}
t << convertToHtml(n->name);
t << "</a>";
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 32eaff6..87bc10a 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -1117,7 +1117,8 @@ void HtmlGenerator::startIndexItem(const char *ref,const char *f)
}
t << "href=\"";
t << externalRef(relPath,ref,TRUE);
- if (f) t << f << Doxygen::htmlFileExtension << "\">";
+ if (f) t << f << Doxygen::htmlFileExtension;
+ t << "\">";
}
else
{
@@ -2717,13 +2718,16 @@ void HtmlGenerator::writeInheritedSectionTitle(
DBG_HTML(t << "<!-- writeInheritedSectionTitle -->" << endl;)
QCString a = anchor;
if (!a.isEmpty()) a.prepend("#");
- QCString classLink = QCString("<a class=\"el\" href=\"");
+ QCString classLink = QCString("<a class=\"el\" ");
if (ref)
{
- classLink+= externalLinkTarget() + externalRef(relPath,ref,TRUE);
+ classLink+= externalLinkTarget();
+ classLink += " href=\"";
+ classLink+= externalRef(relPath,ref,TRUE);
}
else
{
+ classLink += "href=\"";
classLink+=relPath;
}
classLink+=file+Doxygen::htmlFileExtension+a;
diff --git a/src/plantuml.cpp b/src/plantuml.cpp
index 609d5fd..89e6e9e 100644
--- a/src/plantuml.cpp
+++ b/src/plantuml.cpp
@@ -88,7 +88,9 @@ void generatePlantUMLOutput(const char *baseName,const char *outDir,PlantUMLOutp
{
pumlArgs += "-graphvizdot \"";
pumlArgs += dotPath;
- pumlArgs += "dot\" ";
+ pumlArgs += "dot";
+ pumlArgs += portable_commandExtension();
+ pumlArgs += "\" ";
}
pumlArgs+="-o \"";
pumlArgs+=outDir;
diff --git a/src/pre.l b/src/pre.l
index 2cc66c1..b6ebbf8 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -1739,6 +1739,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
%x SkipString
%x CopyLine
%x CopyString
+%x CopyStringCs
%x CopyStringFtn
%x CopyStringFtnDouble
%x Include
@@ -1850,6 +1851,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<CopyLine>"'"."'" {
outputArray(yytext,(int)yyleng);
}
+<CopyLine>@\" {
+ if (getLanguageFromFileName(g_yyFileName)!=SrcLangExt_CSharp) REJECT;
+ outputArray(yytext,(int)yyleng);
+ BEGIN( CopyStringCs );
+ }
<CopyLine>\" {
outputChar(*yytext);
if (getLanguageFromFileName(g_yyFileName)!=SrcLangExt_Fortran)
@@ -1869,10 +1875,13 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<CopyString>[^\"\\\r\n]+ {
outputArray(yytext,(int)yyleng);
}
+<CopyStringCs>[^\"\r\n]+ {
+ outputArray(yytext,(int)yyleng);
+ }
<CopyString>\\. {
outputArray(yytext,(int)yyleng);
}
-<CopyString>\" {
+<CopyString,CopyStringCs>\" {
outputChar(*yytext);
BEGIN( CopyLine );
}
@@ -1952,6 +1961,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
}
<CopyLine>"\\"\r?/\n { // strip line continuation characters
+ if (getLanguageFromFileName(g_yyFileName)==SrcLangExt_Fortran) outputChar(*yytext);
}
<CopyLine>. {
outputChar(*yytext);