summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-02-15 14:45:01 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-02-15 14:45:01 (GMT)
commit80bcbbb8702634d0078a37e44a1ab263b8f8336f (patch)
tree60157d29326b557c7f4805fd793e5b2d660524fe
parente2157cd6d65297339419e73b53e01a7d2cd25d2c (diff)
parent776af03711c9caa1b3ce2b586ed1e8283402907d (diff)
downloadDoxygen-80bcbbb8702634d0078a37e44a1ab263b8f8336f.zip
Doxygen-80bcbbb8702634d0078a37e44a1ab263b8f8336f.tar.gz
Doxygen-80bcbbb8702634d0078a37e44a1ab263b8f8336f.tar.bz2
Merge branch 'master' of github.com:doxygen/doxygen
-rw-r--r--addon/doxywizard/config_doxyw.l35
-rw-r--r--addon/doxywizard/inputstring.cpp12
-rw-r--r--addon/doxywizard/inputstring.h2
-rw-r--r--addon/doxywizard/wizard.h5
-rw-r--r--doc/starting.doc18
-rw-r--r--src/config.xml1
-rw-r--r--src/plantuml.cpp44
-rw-r--r--src/plantuml.h18
-rw-r--r--src/util.cpp1
9 files changed, 89 insertions, 47 deletions
diff --git a/addon/doxywizard/config_doxyw.l b/addon/doxywizard/config_doxyw.l
index 59fa427..4018af7 100644
--- a/addon/doxywizard/config_doxyw.l
+++ b/addon/doxywizard/config_doxyw.l
@@ -12,6 +12,10 @@
%option never-interactive
%option prefix="config_doxywYY"
+%top{
+#include <stdint.h>
+}
+
%{
/*
@@ -19,6 +23,7 @@
*/
#include "config.h"
#include "input.h"
+#include "inputstring.h"
#include <QString>
#include <QVariant>
@@ -29,6 +34,7 @@
#include <QStringList>
#include <QRegExp>
#include <QTextStream>
+#include <QMessageBox>
#define YY_NO_UNISTD_H 1
@@ -216,6 +222,7 @@ static void readIncludeFile(const QString &incName)
%x SkipComment
%x SkipInvalid
%x GetString
+%x GetEnum
%x GetStrList
%x GetQuotedString
%x GetEnvVar
@@ -224,7 +231,7 @@ static void readIncludeFile(const QString &incName)
%%
<*>\0x0d
-<Start,GetString,GetStrList,SkipInvalid>"#" { BEGIN(SkipComment); }
+<Start,GetString,GetEnum,GetStrList,SkipInvalid>"#" { BEGIN(SkipComment); }
<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"=" { QString cmd = g_codec->toUnicode(yytext);
cmd=cmd.left(cmd.length()-1).trimmed();
g_curOption = g_options->value(cmd);
@@ -246,7 +253,14 @@ static void readIncludeFile(const QString &incName)
BEGIN(GetStrList);
break;
case Input::String:
- BEGIN(GetString);
+ if (dynamic_cast<InputString *>(g_curOption)->stringMode() == InputString::StringFixed)
+ {
+ BEGIN(GetEnum);
+ }
+ else
+ {
+ BEGIN(GetString);
+ }
break;
case Input::Int:
BEGIN(GetString);
@@ -328,7 +342,7 @@ static void readIncludeFile(const QString &incName)
}
<Start>[a-z_A-Z0-9]+ { config_warn("ignoring unknown tag '%s' at line %d, file %s\n",yytext,yylineno,qPrintable(g_yyFileName)); }
-<GetString,SkipInvalid>\n { BEGIN(Start); }
+<GetString,GetEnum,SkipInvalid>\n { BEGIN(Start); }
<GetStrList>\n {
if (!g_elemStr.isEmpty())
{
@@ -345,11 +359,15 @@ static void readIncludeFile(const QString &incName)
}
g_elemStr = QString();
}
-<GetString>[^ \"\t\r\n]+ {
+<GetString>[^ \"\t\r\n]+ {
*g_arg = QVariant(g_codec->toUnicode(yytext));
checkEncoding();
}
-<GetString,GetStrList,SkipInvalid>"\"" { g_lastState=YY_START;
+<GetEnum>[^ \"\t\r\n]+ {
+ InputString *cur = dynamic_cast<InputString *>(g_curOption);
+ *g_arg = cur->checkEnumVal(g_codec->toUnicode(yytext));
+ }
+<GetString,GetEnum,GetStrList,SkipInvalid>"\"" { g_lastState=YY_START;
BEGIN(GetQuotedString);
g_tmpString="";
}
@@ -357,11 +375,16 @@ static void readIncludeFile(const QString &incName)
// we add a bogus space to signal that the string was quoted. This space will be stripped later on.
g_tmpString+=" ";
//printf("Quoted String = '%s'\n",qPrintable(tmpString));
- if (g_lastState==GetString)
+ if (g_lastState==GetString)
{
*g_arg = g_codec->toUnicode(g_tmpString);
checkEncoding();
}
+ else if (g_lastState==GetEnum)
+ {
+ InputString *cur = dynamic_cast<InputString *>(g_curOption);
+ *g_arg = cur->checkEnumVal(g_codec->toUnicode(g_tmpString));
+ }
else
{
g_elemStr+=g_codec->toUnicode(g_tmpString);
diff --git a/addon/doxywizard/inputstring.cpp b/addon/doxywizard/inputstring.cpp
index 5c0f2c9..2f81b5b 100644
--- a/addon/doxywizard/inputstring.cpp
+++ b/addon/doxywizard/inputstring.cpp
@@ -253,3 +253,15 @@ void InputString::writeValue(QTextStream &t,QTextCodec *codec)
writeStringValue(t,codec,m_str);
}
+QString InputString::checkEnumVal(const QString &value)
+{
+ QString val = value.trimmed().toLower();
+ QStringList::Iterator it;
+ for ( it= m_values.begin(); it != m_values.end(); ++it )
+ {
+ QString enumVal = *it;
+ if (enumVal.toLower() == val) return enumVal;
+ }
+
+ return m_default;
+}
diff --git a/addon/doxywizard/inputstring.h b/addon/doxywizard/inputstring.h
index 4f4a7f7..1520584 100644
--- a/addon/doxywizard/inputstring.h
+++ b/addon/doxywizard/inputstring.h
@@ -50,6 +50,7 @@ class InputString : public QObject, public Input
QVariant &value();
void update();
Kind kind() const { return String; }
+ StringMode stringMode() const { return m_sm; }
QString docs() const { return m_docs; }
QString id() const { return m_id; }
QString templateDocs() const { return m_tdocs; }
@@ -59,6 +60,7 @@ class InputString : public QObject, public Input
void writeValue(QTextStream &t,QTextCodec *codec);
void setTemplateDocs(const QString &docs) { m_tdocs = docs; }
bool isEmpty() { return m_str.isEmpty(); }
+ QString checkEnumVal(const QString &value);
public slots:
void reset();
diff --git a/addon/doxywizard/wizard.h b/addon/doxywizard/wizard.h
index 810ab95..8b877e1 100644
--- a/addon/doxywizard/wizard.h
+++ b/addon/doxywizard/wizard.h
@@ -31,11 +31,6 @@ class Wizard;
class QImage;
class QLabel;
-enum OptLang { Lang_Cpp, Lang_C, Lang_Java, Lang_CS };
-enum HtmlStyle { HS_Plain, HS_TreeView, HS_CHM };
-enum TexStyle { TS_PDFHyper, TS_PDF, TS_PS };
-enum DiagramMode { DM_None, DM_Builtin, DM_Dot };
-
class TuneColorDialog : public QDialog
{
Q_OBJECT
diff --git a/doc/starting.doc b/doc/starting.doc
index 045f66c..d419e92 100644
--- a/doc/starting.doc
+++ b/doc/starting.doc
@@ -114,15 +114,15 @@ Extension | Language | Extension | Language | Extension | Language
.cc |C / C++ | .java |Java | .f95 |Fortran
.cxx |C / C++ | .cs |C# | .f03 |Fortran
.cpp |C / C++ | .d |D | .f08 |Fortran
-.c++ |C / C++ | .php |PHP | .vhd |VHDL
-.ii |C / C++ | .php4 |PHP | .vhdl |VHDL
-.ixx |C / C++ | .php5 |PHP | .ucf |VHDL
-.ipp |C / C++ | .inc |PHP | .qsf |VHDL
-.i++ |C / C++ | .phtml |PHP | .tcl |TCL
-.inl |C / C++ | .m |Objective-C | .md |Markdown
-.h |C / C++ | .M |Objective-C | .markdown |Markdown
-.H |C / C++ | .py |Python | .ice |Slice
-.hh |C / C++ | .pyw |Python | | |
+.c++ |C / C++ | .php |PHP | .f18 |Fortran
+.ii |C / C++ | .php4 |PHP | .vhd |VHDL
+.ixx |C / C++ | .php5 |PHP | .vhdl |VHDL
+.ipp |C / C++ | .inc |PHP | .ucf |VHDL
+.i++ |C / C++ | .phtml |PHP | .qsf |VHDL
+.inl |C / C++ | .m |Objective-C | .tcl |TCL
+.h |C / C++ | .M |Objective-C | .md |Markdown
+.H |C / C++ | .py |Python | .markdown |Markdown
+.hh |C / C++ | .pyw |Python | .ice |Slice
.HH |C / C++ | | | | |
.hxx |C / C++ | | | | |
.hpp |C / C++ | | | | |
diff --git a/src/config.xml b/src/config.xml
index de5efdc..4e28961 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -1413,6 +1413,7 @@ FILE_VERSION_FILTER = "cleartool desc -fmt \%Vn"
<value name='*.f95'/>
<value name='*.f03'/>
<value name='*.f08'/>
+ <value name='*.f18'/>
<value name='*.f'/>
<value name='*.for'/>
<value name='*.tcl'/>
diff --git a/src/plantuml.cpp b/src/plantuml.cpp
index fa50f2d..7d60e32 100644
--- a/src/plantuml.cpp
+++ b/src/plantuml.cpp
@@ -76,7 +76,7 @@ QCString PlantumlManager::writePlantUMLSource(const QCString &outDir,const QCStr
uint pos = qcOutDir.findRev("/");
QCString generateType(qcOutDir.right(qcOutDir.length() - (pos + 1)) );
Debug::print(Debug::Plantuml,0,"*** %s generateType: %s\n","writePlantUMLSource",qPrint(generateType));
- PlantumlManager::instance()->insert(generateType,puName,format,text);
+ PlantumlManager::instance()->insert(generateType,puName,outDir,format,text);
Debug::print(Debug::Plantuml,0,"*** %s generateType: %s\n","writePlantUMLSource",qPrint(generateType));
return baseName;
@@ -178,7 +178,7 @@ PlantumlManager::~PlantumlManager()
}
static void runPlantumlContent(const QDict< QList <QCString> > &plantumlFiles,
- const QDict< QCString > &plantumlContent,
+ const QDict< PlantumlContent > &plantumlContent,
PlantumlManager::OutputFormat format)
{
/* example : running: java -Djava.awt.headless=true
@@ -244,25 +244,21 @@ static void runPlantumlContent(const QDict< QList <QCString> > &plantumlFiles,
}
{
- QDictIterator< QCString > it( plantumlContent); // See QDictIterator
- QCString *nb;
+ QDictIterator< PlantumlContent > it( plantumlContent); // See QDictIterator
+ PlantumlContent *nb;
for (it.toFirst();(nb=it.current());++it)
{
QCString pumlArguments(pumlArgs);
msg("Generating PlantUML %s Files in %s\n",qPrint(pumlType),qPrint(it.currentKey()));
pumlArguments+="-o \"";
- pumlArguments+=Config_getString(OUTPUT_DIRECTORY);
- pumlArguments+="/";
- pumlArguments+=it.currentKey();
+ pumlArguments+=nb->outDir.data();
pumlArguments+="\" ";
pumlArguments+="-charset UTF-8 -t";
pumlArguments+=pumlType;
pumlArguments+=" ";
QCString puFileName("");
- puFileName+=Config_getString(OUTPUT_DIRECTORY);
- puFileName+="/";
- puFileName+=it.currentKey();
+ puFileName+=nb->outDir.data();
puFileName+="/";
pumlOutDir=puFileName;
puFileName+="inline_umlgraph_";
@@ -279,7 +275,7 @@ static void runPlantumlContent(const QDict< QList <QCString> > &plantumlFiles,
{
err("Could not open file %s for writing\n",puFileName.data());
}
- file.writeBlock( *nb, nb->length() );
+ file.writeBlock( nb->content, nb->content.length() );
file.close();
Debug::print(Debug::Plantuml,0,"*** %s Running Plantuml arguments:%s\n","PlantumlManager::runPlantumlContent",qPrint(pumlArguments));
@@ -358,16 +354,16 @@ static void print(const QDict< QList <QCString> > &plantumlFiles)
}
}
-static void print(const QDict<QCString> &plantumlContent)
+static void print(const QDict<PlantumlContent> &plantumlContent)
{
if (Debug::isFlagSet(Debug::Plantuml))
{
- QDictIterator< QCString > it( plantumlContent); // See QDictIterator
- QCString *nb;
+ QDictIterator< PlantumlContent > it( plantumlContent); // See QDictIterator
+ PlantumlContent *nb;
for (it.toFirst();(nb=it.current());++it)
{
Debug::print(Debug::Plantuml,0,"*** %s PlantumlContent key:%s\n","PlantumlManager::print Content",qPrint(it.currentKey()));
- Debug::print(Debug::Plantuml,0,"*** %s Content :%s\n","PlantumlManager::print",qPrint(*nb));
+ Debug::print(Debug::Plantuml,0,"*** %s Content :%s\n","PlantumlManager::print",qPrint(nb->content));
}
}
}
@@ -384,22 +380,22 @@ static void addPlantumlFiles(QDict< QList<QCString> > &plantumlFiles,
list->append(new QCString(value));
}
-static void addPlantumlContent(QDict< QCString > &plantumlContent,
- const QCString &key, const QCString &puContent)
+static void addPlantumlContent(QDict< PlantumlContent > &plantumlContent,
+ const QCString &key, const QCString &outDir, const QCString &puContent)
{
- QCString* content = plantumlContent.find(key);
+ PlantumlContent* content = plantumlContent.find(key);
if (content == 0)
{
- content = new QCString("");
+ content = new PlantumlContent("",outDir);
plantumlContent.insert(key,content);
}
- (*content)+=puContent;
+ (content->content)+=puContent;
}
void PlantumlManager::insert(const QCString &key, const QCString &value,
- OutputFormat format,const QCString &puContent)
+ const QCString &outDir,OutputFormat format,const QCString &puContent)
{
int find;
@@ -419,19 +415,19 @@ void PlantumlManager::insert(const QCString &key, const QCString &value,
case PUML_BITMAP:
addPlantumlFiles(m_pngPlantumlFiles,key,value);
print(m_pngPlantumlFiles);
- addPlantumlContent(m_pngPlantumlContent,key,puContent);
+ addPlantumlContent(m_pngPlantumlContent,key,outDir,puContent);
print(m_pngPlantumlContent);
break;
case PUML_EPS:
addPlantumlFiles(m_epsPlantumlFiles,key,value);
print(m_epsPlantumlFiles);
- addPlantumlContent(m_epsPlantumlContent,key,puContent);
+ addPlantumlContent(m_epsPlantumlContent,key,outDir,puContent);
print(m_epsPlantumlContent);
break;
case PUML_SVG:
addPlantumlFiles(m_svgPlantumlFiles,key,value);
print(m_svgPlantumlFiles);
- addPlantumlContent(m_svgPlantumlContent,key,puContent);
+ addPlantumlContent(m_svgPlantumlContent,key,outDir,puContent);
print(m_svgPlantumlContent);
break;
}
diff --git a/src/plantuml.h b/src/plantuml.h
index d3a01f5..f2e9dec 100644
--- a/src/plantuml.h
+++ b/src/plantuml.h
@@ -24,6 +24,17 @@
#define MIN_PLANTUML_COUNT 8
class QCString;
+struct PlantumlContent
+{
+ QCString outDir;
+ QCString content;
+ PlantumlContent(const QCString Content, const QCString OutDir)
+ {
+ outDir = OutDir;
+ content = Content;
+ };
+ ~PlantumlContent(){};
+};
/** Singleton that manages plantuml relation actions */
class PlantumlManager
@@ -58,15 +69,16 @@ class PlantumlManager
~PlantumlManager();
void insert(const QCString &key,
const QCString &value,
+ const QCString &outDir,
OutputFormat format,
const QCString &puContent);
static PlantumlManager *m_theInstance;
QDict< QList<QCString> > m_pngPlantumlFiles;
QDict< QList<QCString> > m_svgPlantumlFiles;
QDict< QList<QCString> > m_epsPlantumlFiles;
- QDict< QCString > m_pngPlantumlContent; // use circular queue for using multi-processor (multi threading)
- QDict< QCString > m_svgPlantumlContent;
- QDict< QCString > m_epsPlantumlContent;
+ QDict< PlantumlContent > m_pngPlantumlContent; // use circular queue for using multi-processor (multi threading)
+ QDict< PlantumlContent > m_svgPlantumlContent;
+ QDict< PlantumlContent > m_epsPlantumlContent;
QCString m_cachedPlantumlAllContent; // read from CACHE_FILENAME file
QCString m_currentPlantumlAllContent; // processing plantuml then write it into CACHE_FILENAME to reuse the next time as cache information
};
diff --git a/src/util.cpp b/src/util.cpp
index 9309b63..38d7cdf 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -7343,6 +7343,7 @@ void initDefaultExtensionMapping()
updateLanguageMapping(".f95", "fortran");
updateLanguageMapping(".f03", "fortran");
updateLanguageMapping(".f08", "fortran");
+ updateLanguageMapping(".f18", "fortran");
updateLanguageMapping(".vhd", "vhdl");
updateLanguageMapping(".vhdl", "vhdl");
updateLanguageMapping(".tcl", "tcl");