summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/clangparser.cpp26
-rw-r--r--src/classdef.cpp11
-rw-r--r--src/classdef.h3
-rw-r--r--src/code.l13
-rw-r--r--src/commentcnv.l20
-rw-r--r--src/commentscan.l459
-rw-r--r--src/condparser.cpp7
-rw-r--r--src/config.xml30
-rwxr-xr-xsrc/configgen.py4
-rw-r--r--src/definition.cpp117
-rw-r--r--src/definition.h5
-rw-r--r--src/docparser.cpp37
-rw-r--r--src/doctokenizer.h1
-rw-r--r--src/doctokenizer.l17
-rw-r--r--src/dot.cpp21
-rw-r--r--src/dot.h5
-rw-r--r--src/doxygen.cpp67
-rw-r--r--src/entry.cpp1
-rw-r--r--src/entry.h16
-rw-r--r--src/formula.cpp2
-rw-r--r--src/fortrancode.l21
-rw-r--r--src/fortranscanner.l8
-rw-r--r--src/ftvhelp.cpp2
-rw-r--r--src/htmlgen.cpp12
-rw-r--r--src/index.cpp13
-rw-r--r--src/latexdocvisitor.cpp8
-rw-r--r--src/latexgen.cpp74
-rw-r--r--src/markdown.cpp8
-rw-r--r--src/marshal.cpp32
-rw-r--r--src/pagedef.cpp19
-rw-r--r--src/pagedef.h9
-rw-r--r--src/perlmodgen.cpp2
-rw-r--r--src/plantuml.cpp4
-rw-r--r--src/portable.cpp24
-rw-r--r--src/pre.l34
-rw-r--r--src/qhp.cpp12
-rw-r--r--src/reflist.cpp6
-rw-r--r--src/scanner.l60
-rw-r--r--src/tagreader.cpp58
-rw-r--r--src/tclscanner.l119
-rw-r--r--src/textdocvisitor.cpp5
-rw-r--r--src/translator_hu.h646
-rw-r--r--src/types.h45
-rw-r--r--src/util.cpp66
-rw-r--r--src/util.h2
-rw-r--r--src/vhdlcode.l31
-rw-r--r--src/vhdldocgen.cpp68
-rw-r--r--src/vhdljjparser.cpp14
-rw-r--r--src/vhdljjparser.h3
-rw-r--r--src/xmlgen.cpp59
50 files changed, 1699 insertions, 627 deletions
diff --git a/src/clangparser.cpp b/src/clangparser.cpp
index 2ea15ee..78b8faa 100644
--- a/src/clangparser.cpp
+++ b/src/clangparser.cpp
@@ -197,32 +197,32 @@ void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit)
std::vector<std::string> options = command[command.size()-1].CommandLine;
// copy each compiler option used from the database. Skip the first which is compiler exe.
for (auto option = options.begin()+1; option != options.end(); option++) {
- argv[argc++] = strdup(option->c_str());
+ argv[argc++] = qstrdup(option->c_str());
}
// this extra addition to argv is accounted for as we are skipping the first entry in
- argv[argc++]=strdup("-w"); // finally, turn off warnings.
+ argv[argc++]=qstrdup("-w"); // finally, turn off warnings.
} else {
// add include paths for input files
for (di.toFirst();di.current();++di,++argc)
{
QCString inc = QCString("-I")+di.currentKey();
- argv[argc]=strdup(inc.data());
+ argv[argc]=qstrdup(inc.data());
//printf("argv[%d]=%s\n",argc,argv[argc]);
}
// add external include paths
for (uint i=0;i<includePath.count();i++)
{
QCString inc = QCString("-I")+includePath.at(i);
- argv[argc++]=strdup(inc.data());
+ argv[argc++]=qstrdup(inc.data());
}
// user specified options
for (uint i=0;i<clangOptions.count();i++)
{
- argv[argc++]=strdup(clangOptions.at(i));
+ argv[argc++]=qstrdup(clangOptions.at(i));
}
// extra options
- argv[argc++]=strdup("-ferror-limit=0");
- argv[argc++]=strdup("-x");
+ argv[argc++]=qstrdup("-ferror-limit=0");
+ argv[argc++]=qstrdup("-x");
// Since we can be presented with a .h file that can contain C/C++ or
// Objective C code and we need to configure the parser before knowing this,
@@ -250,19 +250,19 @@ void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit)
switch(p->detectedLang)
{
case ClangParser::Private::Detected_Cpp:
- argv[argc++]=strdup("c++");
+ argv[argc++]=qstrdup("c++");
break;
case ClangParser::Private::Detected_ObjC:
- argv[argc++]=strdup("objective-c");
+ argv[argc++]=qstrdup("objective-c");
break;
case ClangParser::Private::Detected_ObjCpp:
- argv[argc++]=strdup("objective-c++");
+ argv[argc++]=qstrdup("objective-c++");
break;
}
// provide the input and and its dependencies as unsaved files so we can
// pass the filtered versions
- argv[argc++]=strdup(fileName);
+ argv[argc++]=qstrdup(fileName);
}
static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES);
//printf("source %s ----------\n%s\n-------------\n\n",
@@ -272,7 +272,7 @@ void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit)
p->sources = new QCString[numUnsavedFiles];
p->ufs = new CXUnsavedFile[numUnsavedFiles];
p->sources[0] = detab(fileToString(fileName,filterSourceFiles,TRUE));
- p->ufs[0].Filename = strdup(fileName);
+ p->ufs[0].Filename = qstrdup(fileName);
p->ufs[0].Contents = p->sources[0].data();
p->ufs[0].Length = p->sources[0].length();
QStrListIterator it(filesInTranslationUnit);
@@ -281,7 +281,7 @@ void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit)
{
p->fileMapping.insert(it.current(),new uint(i));
p->sources[i] = detab(fileToString(it.current(),filterSourceFiles,TRUE));
- p->ufs[i].Filename = strdup(it.current());
+ p->ufs[i].Filename = qstrdup(it.current());
p->ufs[i].Contents = p->sources[i].data();
p->ufs[i].Length = p->sources[i].length();
}
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 8a1bff1..83a29ed 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/commentcnv.l b/src/commentcnv.l
index 10dab28..88236ed 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -591,7 +591,15 @@ void replaceComment(int offset);
copyToOutput(yytext,(int)yyleng);
}
<SkipString>\\. { /* escaped character in string */
- copyToOutput(yytext,(int)yyleng);
+ if (g_lang==SrcLangExt_Fortran)
+ {
+ unput(yytext[1]);
+ copyToOutput(yytext,1);
+ }
+ else
+ {
+ copyToOutput(yytext,(int)yyleng);
+ }
}
<SkipString>"\"" { /* end of string */
copyToOutput(yytext,(int)yyleng);
@@ -604,7 +612,15 @@ void replaceComment(int offset);
copyToOutput(yytext,(int)yyleng);
}
<SkipChar>\\. { /* escaped character */
- copyToOutput(yytext,(int)yyleng);
+ if (g_lang==SrcLangExt_Fortran)
+ {
+ unput(yytext[1]);
+ copyToOutput(yytext,1);
+ }
+ else
+ {
+ copyToOutput(yytext,(int)yyleng);
+ }
}
<SkipChar>' { /* end of character literal */
copyToOutput(yytext,(int)yyleng);
diff --git a/src/commentscan.l b/src/commentscan.l
index 55c55a7..39b0edc 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -30,7 +30,7 @@
#include <qstack.h>
#include <qregexp.h>
#include <qfile.h>
-
+#include <qcstringlist.h>
#include "scanner.h"
#include "entry.h"
#include "doxygen.h"
@@ -54,81 +54,81 @@
#define YY_NO_UNISTD_H 1
// forward declarations
-static bool handleBrief(const QCString &);
-static bool handleFn(const QCString &);
-static bool handleDef(const QCString &);
-static bool handleOverload(const QCString &);
-static bool handleEnum(const QCString &);
-static bool handleDefGroup(const QCString &);
-static bool handleAddToGroup(const QCString &);
-static bool handleWeakGroup(const QCString &);
-static bool handleNamespace(const QCString &);
-static bool handlePackage(const QCString &);
-static bool handleClass(const QCString &);
-static bool handleHeaderFile(const QCString &);
-static bool handleProtocol(const QCString &);
-static bool handleCategory(const QCString &);
-static bool handleUnion(const QCString &);
-static bool handleStruct(const QCString &);
-static bool handleInterface(const QCString &);
-static bool handleIdlException(const QCString &);
-static bool handlePage(const QCString &);
-static bool handleMainpage(const QCString &);
-static bool handleFile(const QCString &);
-static bool handleDir(const QCString &);
-static bool handleExample(const QCString &);
-static bool handleDetails(const QCString &);
-static bool handleName(const QCString &);
-static bool handleTodo(const QCString &);
-static bool handleTest(const QCString &);
-static bool handleBug(const QCString &);
-static bool handleSubpage(const QCString &s);
-static bool handleDeprecated(const QCString &);
-static bool handleXRefItem(const QCString &);
-static bool handleRelated(const QCString &);
-static bool handleRelatedAlso(const QCString &);
-static bool handleMemberOf(const QCString &);
-static bool handleRefItem(const QCString &);
-static bool handleSection(const QCString &);
-static bool handleAnchor(const QCString &);
-static bool handleCite(const QCString &);
-static bool handleFormatBlock(const QCString &);
-static bool handleAddIndex(const QCString &);
-static bool handleIf(const QCString &);
-static bool handleIfNot(const QCString &);
-static bool handleElseIf(const QCString &);
-static bool handleElse(const QCString &);
-static bool handleEndIf(const QCString &);
-static bool handleIngroup(const QCString &);
-static bool handleNoSubGrouping(const QCString &);
-static bool handleShowInitializer(const QCString &);
-static bool handleHideInitializer(const QCString &);
-static bool handleCallgraph(const QCString &);
-static bool handleHideCallgraph(const QCString &);
-static bool handleCallergraph(const QCString &);
-static bool handleHideCallergraph(const QCString &);
-static bool handleInternal(const QCString &);
-static bool handleLineBr(const QCString &);
-static bool handleStatic(const QCString &);
-static bool handlePure(const QCString &);
-static bool handlePrivate(const QCString &);
-static bool handlePrivateSection(const QCString &);
-static bool handleProtected(const QCString &);
-static bool handleProtectedSection(const QCString &);
-static bool handlePublic(const QCString &s);
-static bool handlePublicSection(const QCString &s);
-static bool handleToc(const QCString &s);
-static bool handleInherit(const QCString &);
-static bool handleExtends(const QCString &);
-static bool handleCopyDoc(const QCString &);
-static bool handleCopyBrief(const QCString &);
-static bool handleCopyDetails(const QCString &);
-static bool handleParBlock(const QCString &);
-static bool handleEndParBlock(const QCString &);
-static bool handleParam(const QCString &);
-static bool handleRetval(const QCString &);
-
-typedef bool (*DocCmdFunc)(const QCString &name);
+static bool handleBrief(const QCString &, const QCStringList &);
+static bool handleFn(const QCString &, const QCStringList &);
+static bool handleDef(const QCString &, const QCStringList &);
+static bool handleOverload(const QCString &, const QCStringList &);
+static bool handleEnum(const QCString &, const QCStringList &);
+static bool handleDefGroup(const QCString &, const QCStringList &);
+static bool handleAddToGroup(const QCString &, const QCStringList &);
+static bool handleWeakGroup(const QCString &, const QCStringList &);
+static bool handleNamespace(const QCString &, const QCStringList &);
+static bool handlePackage(const QCString &, const QCStringList &);
+static bool handleClass(const QCString &, const QCStringList &);
+static bool handleHeaderFile(const QCString &, const QCStringList &);
+static bool handleProtocol(const QCString &, const QCStringList &);
+static bool handleCategory(const QCString &, const QCStringList &);
+static bool handleUnion(const QCString &, const QCStringList &);
+static bool handleStruct(const QCString &, const QCStringList &);
+static bool handleInterface(const QCString &, const QCStringList &);
+static bool handleIdlException(const QCString &, const QCStringList &);
+static bool handlePage(const QCString &, const QCStringList &);
+static bool handleMainpage(const QCString &, const QCStringList &);
+static bool handleFile(const QCString &, const QCStringList &);
+static bool handleDir(const QCString &, const QCStringList &);
+static bool handleExample(const QCString &, const QCStringList &);
+static bool handleDetails(const QCString &, const QCStringList &);
+static bool handleName(const QCString &, const QCStringList &);
+static bool handleTodo(const QCString &, const QCStringList &);
+static bool handleTest(const QCString &, const QCStringList &);
+static bool handleBug(const QCString &, const QCStringList &);
+static bool handleSubpage(const QCString &s, const QCStringList &);
+static bool handleDeprecated(const QCString &, const QCStringList &);
+static bool handleXRefItem(const QCString &, const QCStringList &);
+static bool handleRelated(const QCString &, const QCStringList &);
+static bool handleRelatedAlso(const QCString &, const QCStringList &);
+static bool handleMemberOf(const QCString &, const QCStringList &);
+static bool handleRefItem(const QCString &, const QCStringList &);
+static bool handleSection(const QCString &, const QCStringList &);
+static bool handleAnchor(const QCString &, const QCStringList &);
+static bool handleCite(const QCString &, const QCStringList &);
+static bool handleFormatBlock(const QCString &, const QCStringList &);
+static bool handleAddIndex(const QCString &, const QCStringList &);
+static bool handleIf(const QCString &, const QCStringList &);
+static bool handleIfNot(const QCString &, const QCStringList &);
+static bool handleElseIf(const QCString &, const QCStringList &);
+static bool handleElse(const QCString &, const QCStringList &);
+static bool handleEndIf(const QCString &, const QCStringList &);
+static bool handleIngroup(const QCString &, const QCStringList &);
+static bool handleNoSubGrouping(const QCString &, const QCStringList &);
+static bool handleShowInitializer(const QCString &, const QCStringList &);
+static bool handleHideInitializer(const QCString &, const QCStringList &);
+static bool handleCallgraph(const QCString &, const QCStringList &);
+static bool handleHideCallgraph(const QCString &, const QCStringList &);
+static bool handleCallergraph(const QCString &, const QCStringList &);
+static bool handleHideCallergraph(const QCString &, const QCStringList &);
+static bool handleInternal(const QCString &, const QCStringList &);
+static bool handleLineBr(const QCString &, const QCStringList &);
+static bool handleStatic(const QCString &, const QCStringList &);
+static bool handlePure(const QCString &, const QCStringList &);
+static bool handlePrivate(const QCString &, const QCStringList &);
+static bool handlePrivateSection(const QCString &, const QCStringList &);
+static bool handleProtected(const QCString &, const QCStringList &);
+static bool handleProtectedSection(const QCString &, const QCStringList &);
+static bool handlePublic(const QCString &s, const QCStringList &);
+static bool handlePublicSection(const QCString &s, const QCStringList &);
+static bool handleToc(const QCString &s, const QCStringList &);
+static bool handleInherit(const QCString &, const QCStringList &);
+static bool handleExtends(const QCString &, const QCStringList &);
+static bool handleCopyDoc(const QCString &, const QCStringList &);
+static bool handleCopyBrief(const QCString &, const QCStringList &);
+static bool handleCopyDetails(const QCString &, const QCStringList &);
+static bool handleParBlock(const QCString &, const QCStringList &);
+static bool handleEndParBlock(const QCString &, const QCStringList &);
+static bool handleParam(const QCString &, const QCStringList &);
+static bool handleRetval(const QCString &, const QCStringList &);
+
+typedef bool (*DocCmdFunc)(const QCString &name, const QCStringList &optList);
struct DocCmdMap
{
@@ -582,7 +582,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,
item->listAnchor = anchorLabel;
docEntry->addSpecialListItem(listName,itemId);
QCString cmdString;
- cmdString.sprintf("\\xrefitem %s %d.",listName,itemId);
+ cmdString.sprintf(" \\xrefitem %s %d.",listName,itemId);
if (inBody)
{
docEntry->inbodyDocs += cmdString;
@@ -989,6 +989,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
%x CiteLabel
%x CopyDoc
%x GuardExpr
+%x CdataSection
%%
@@ -1046,10 +1047,13 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
addOutput(yytext);
}
<Comment>"</summary>" { // start of a .NET XML style detailed description
+ setOutput(OutputBrief);
addOutput(yytext);
setOutput(OutputDoc);
}
<Comment>"</remarks>" { // end of a brief or detailed description
+
+ setOutput(OutputDoc);
addOutput(yytext);
}
<Comment>"<"{CAPTION}{ATTR}">" {
@@ -1078,24 +1082,42 @@ 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 ");
+ addOutput(" \\endinternal ");
if (!inInternalDocs)
warn(yyFileName,yyLineNr,
"found \\endinternal without matching \\internal"
);
inInternalDocs = FALSE;
}
+<Comment>{B}*{CMD}[a-z_A-Z]+"{"[a-zA-Z_,:0-9\. ]*"}"{B}* |
<Comment>{B}*{CMD}[a-z_A-Z]+{B}* { // potentially interesting command
// the {B}* in the front was added for bug620924
- QCString cmdName = QCString(yytext).stripWhiteSpace().data()+1;
+ QCString fullMatch = QCString(yytext);
+ int idx = fullMatch.find('{');
+ int idxEnd = fullMatch.find("}",idx+1);
+ QCString cmdName;
+ QCStringList optList;
+ if (idx == -1) // no options
+ {
+ cmdName = QCString(yytext).stripWhiteSpace().data()+1; // to remove {CMD}
+ }
+ else // options present
+ {
+ cmdName = fullMatch.left(idx).stripWhiteSpace().data()+1; // to remove {CMD}
+ QCString optStr = fullMatch.mid(idx+1,idxEnd-idx-1).stripWhiteSpace();
+ optList = QCStringList::split(',',optStr);
+ }
DocCmdMapper::Cmd *cmdPtr = DocCmdMapper::map(cmdName);
if (cmdPtr) // special action is required
{
@@ -1109,7 +1131,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
setOutput(OutputDoc);
}
//if (i>0) addOutput(QCString(yytext).left(i)); // removed for bug 689341
- if (cmdPtr->func && cmdPtr->func(cmdName))
+ if (cmdPtr->func && cmdPtr->func(cmdName, optList))
{
// implicit split of the comment block into two
// entries. Restart the next block at the start
@@ -1315,6 +1337,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
@@ -1341,7 +1381,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
formulaText+=*yytext;
yyLineNr++;
}
-<ReadFormulaLong,ReadFormulaShort>. { // any othe character
+<ReadFormulaLong,ReadFormulaShort>. { // any other character
formulaText+=*yytext;
}
@@ -1704,7 +1744,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle arguments of the section/subsection/.. commands ------- */
-<SectionLabel>{LABELID} { // first argyment
+<SectionLabel>{LABELID} { // first argument
g_sectionLabel=yytext;
addOutput(yytext);
g_sectionTitle.resize(0);
@@ -2038,7 +2078,6 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
}
<SkipInternal>[@\\]"endinternal"[ \t]* {
- addOutput("\\endinternal ");
BEGIN(Comment);
}
<SkipInternal>[^ \\@\n]+ { // skip non-special characters
@@ -2209,7 +2248,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle arguments of the cite command ------- */
-<CiteLabel>{CITEID} { // found argyment
+<CiteLabel>{CITEID} { // found argument
addCite();
addOutput(yytext);
BEGIN(Comment);
@@ -2255,14 +2294,14 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
//----------------------------------------------------------------------------
-static bool handleBrief(const QCString &)
+static bool handleBrief(const QCString &, const QCStringList &)
{
//printf("handleBrief\n");
setOutput(OutputBrief);
return FALSE;
}
-static bool handleFn(const QCString &)
+static bool handleFn(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::MEMBERDOC_SEC);
functionProto.resize(0);
@@ -2271,7 +2310,7 @@ static bool handleFn(const QCString &)
return stop;
}
-static bool handleDef(const QCString &)
+static bool handleDef(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::DEFINEDOC_SEC);
functionProto.resize(0);
@@ -2279,21 +2318,21 @@ static bool handleDef(const QCString &)
return stop;
}
-static bool handleOverload(const QCString &)
+static bool handleOverload(const QCString &, const QCStringList &)
{
functionProto.resize(0);
BEGIN(OverloadParam);
return FALSE;
}
-static bool handleEnum(const QCString &)
+static bool handleEnum(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::ENUMDOC_SEC);
BEGIN(EnumDocArg1);
return stop;
}
-static bool handleDefGroup(const QCString &)
+static bool handleDefGroup(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::GROUPDOC_SEC);
current->groupDocType = Entry::GROUPDOC_NORMAL;
@@ -2301,7 +2340,7 @@ static bool handleDefGroup(const QCString &)
return stop;
}
-static bool handleAddToGroup(const QCString &)
+static bool handleAddToGroup(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::GROUPDOC_SEC);
current->groupDocType = Entry::GROUPDOC_ADD;
@@ -2309,7 +2348,7 @@ static bool handleAddToGroup(const QCString &)
return stop;
}
-static bool handleWeakGroup(const QCString &)
+static bool handleWeakGroup(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::GROUPDOC_SEC);
current->groupDocType = Entry::GROUPDOC_WEAK;
@@ -2317,83 +2356,83 @@ static bool handleWeakGroup(const QCString &)
return stop;
}
-static bool handleNamespace(const QCString &)
+static bool handleNamespace(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::NAMESPACEDOC_SEC);
BEGIN( NameSpaceDocArg1 );
return stop;
}
-static bool handlePackage(const QCString &)
+static bool handlePackage(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::PACKAGEDOC_SEC);
BEGIN( PackageDocArg1 );
return stop;
}
-static bool handleClass(const QCString &)
+static bool handleClass(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::CLASSDOC_SEC);
BEGIN( ClassDocArg1 );
return stop;
}
-static bool handleHeaderFile(const QCString &)
+static bool handleHeaderFile(const QCString &, const QCStringList &)
{
BEGIN( ClassDocArg2 );
return FALSE;
}
-static bool handleProtocol(const QCString &)
+static bool handleProtocol(const QCString &, const QCStringList &)
{ // Obj-C protocol
bool stop=makeStructuralIndicator(Entry::PROTOCOLDOC_SEC);
BEGIN( ClassDocArg1 );
return stop;
}
-static bool handleCategory(const QCString &)
+static bool handleCategory(const QCString &, const QCStringList &)
{ // Obj-C category
bool stop=makeStructuralIndicator(Entry::CATEGORYDOC_SEC);
BEGIN( CategoryDocArg1 );
return stop;
}
-static bool handleUnion(const QCString &)
+static bool handleUnion(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::UNIONDOC_SEC);
BEGIN( ClassDocArg1 );
return stop;
}
-static bool handleStruct(const QCString &)
+static bool handleStruct(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::STRUCTDOC_SEC);
BEGIN( ClassDocArg1 );
return stop;
}
-static bool handleInterface(const QCString &)
+static bool handleInterface(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::INTERFACEDOC_SEC);
BEGIN( ClassDocArg1 );
return stop;
}
-static bool handleIdlException(const QCString &)
+static bool handleIdlException(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::EXCEPTIONDOC_SEC);
BEGIN( ClassDocArg1 );
return stop;
}
-static bool handlePage(const QCString &)
+static bool handlePage(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::PAGEDOC_SEC);
BEGIN( PageDocArg1 );
return stop;
}
-static bool handleMainpage(const QCString &)
+static bool handleMainpage(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::MAINPAGEDOC_SEC);
if (!stop)
@@ -2404,7 +2443,7 @@ static bool handleMainpage(const QCString &)
return stop;
}
-static bool handleFile(const QCString &)
+static bool handleFile(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::FILEDOC_SEC);
if (!stop)
@@ -2415,7 +2454,7 @@ static bool handleFile(const QCString &)
return stop;
}
-static bool handleParam(const QCString &)
+static bool handleParam(const QCString &, const QCStringList &)
{
// we need process param and retval arguments to escape leading underscores in case of
// markdown processing, see bug775493
@@ -2424,14 +2463,14 @@ static bool handleParam(const QCString &)
return FALSE;
}
-static bool handleRetval(const QCString &)
+static bool handleRetval(const QCString &, const QCStringList &)
{
addOutput("@retval ");
BEGIN( ParamArg1 );
return FALSE;
}
-static bool handleDir(const QCString &)
+static bool handleDir(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::DIRDOC_SEC);
if (!stop) current->name = yyFileName;
@@ -2439,15 +2478,30 @@ static bool handleDir(const QCString &)
return stop;
}
-static bool handleExample(const QCString &)
+static bool handleExample(const QCString &cmd, const QCStringList &optList)
{
- bool stop=makeStructuralIndicator(Entry::EXAMPLE_SEC);
+ Entry::Sections section=Entry::EXAMPLE_SEC;
+ QCStringList::ConstIterator it;
+ for ( it = optList.begin(); it != optList.end(); ++it )
+ {
+ QCString opt = (*it).stripWhiteSpace().lower();
+ if (opt=="lineno")
+ {
+ section=Entry::EXAMPLE_LINENO_SEC;
+ }
+ else
+ {
+ warn(yyFileName,yyLineNr,
+ "unsupported option '%s' for command '\\%s'",qPrint(opt),qPrint(cmd));
+ }
+ }
+ bool stop=makeStructuralIndicator(section);
if (!stop) current->name = yyFileName;
BEGIN( FileDocArg1 );
return stop;
}
-static bool handleDetails(const QCString &)
+static bool handleDetails(const QCString &, const QCStringList &)
{
if (inContext!=OutputBrief)
{
@@ -2458,7 +2512,7 @@ static bool handleDetails(const QCString &)
return FALSE;
}
-static bool handleName(const QCString &)
+static bool handleName(const QCString &, const QCStringList &)
{
bool stop=makeStructuralIndicator(Entry::MEMBERGRP_SEC);
if (!stop)
@@ -2473,7 +2527,7 @@ static bool handleName(const QCString &)
return stop;
}
-static bool handleTodo(const QCString &)
+static bool handleTodo(const QCString &, const QCStringList &)
{
newXRefKind = XRef_Todo;
setOutput(OutputXRef);
@@ -2481,7 +2535,7 @@ static bool handleTodo(const QCString &)
return FALSE;
}
-static bool handleTest(const QCString &)
+static bool handleTest(const QCString &, const QCStringList &)
{
newXRefKind = XRef_Test;
setOutput(OutputXRef);
@@ -2489,7 +2543,7 @@ static bool handleTest(const QCString &)
return FALSE;
}
-static bool handleBug(const QCString &)
+static bool handleBug(const QCString &, const QCStringList &)
{
newXRefKind = XRef_Bug;
setOutput(OutputXRef);
@@ -2497,7 +2551,7 @@ static bool handleBug(const QCString &)
return FALSE;
}
-static bool handleDeprecated(const QCString &)
+static bool handleDeprecated(const QCString &, const QCStringList &)
{
newXRefKind = XRef_Deprecated;
setOutput(OutputXRef);
@@ -2505,14 +2559,14 @@ static bool handleDeprecated(const QCString &)
return FALSE;
}
-static bool handleXRefItem(const QCString &)
+static bool handleXRefItem(const QCString &, const QCStringList &)
{
newXRefKind = XRef_Item;
BEGIN(XRefItemParam1);
return FALSE;
}
-static bool handleParBlock(const QCString &)
+static bool handleParBlock(const QCString &, const QCStringList &)
{
if (g_insideParBlock)
{
@@ -2529,7 +2583,7 @@ static bool handleParBlock(const QCString &)
return FALSE;
}
-static bool handleEndParBlock(const QCString &)
+static bool handleEndParBlock(const QCString &, const QCStringList &)
{
if (!g_insideParBlock)
{
@@ -2542,34 +2596,50 @@ static bool handleEndParBlock(const QCString &)
return FALSE;
}
-static bool handleRelated(const QCString &)
+static bool handleRelated(const QCString &, const QCStringList &)
{
+ if (!current->relates.isEmpty())
+ {
+ warn(yyFileName,yyLineNr,
+ "found multiple \\relates, \\relatesalso or \\memberof commands in a comment block, using last definition");
+ }
+ current->relatesType = Simple;
BEGIN(RelatesParam1);
return FALSE;
}
-static bool handleRelatedAlso(const QCString &)
+static bool handleRelatedAlso(const QCString &, const QCStringList &)
{
+ if (!current->relates.isEmpty())
+ {
+ warn(yyFileName,yyLineNr,
+ "found multiple \\relates, \\relatesalso or \\memberof commands in a comment block, using last definition");
+ }
current->relatesType = Duplicate;
BEGIN(RelatesParam1);
return FALSE;
}
-static bool handleMemberOf(const QCString &)
+static bool handleMemberOf(const QCString &, const QCStringList &)
{
+ if (!current->relates.isEmpty())
+ {
+ warn(yyFileName,yyLineNr,
+ "found multiple \\relates, \\relatesalso or \\memberof commands in a comment block, using last definition");
+ }
current->relatesType = MemberOf;
BEGIN(RelatesParam1);
return FALSE;
}
-static bool handleRefItem(const QCString &)
+static bool handleRefItem(const QCString &, const QCStringList &)
{
addOutput("@refitem ");
BEGIN(LineParam);
return FALSE;
}
-static bool handleSection(const QCString &s)
+static bool handleSection(const QCString &s, const QCStringList &)
{
setOutput(OutputDoc);
addOutput("@"+s+" ");
@@ -2581,7 +2651,7 @@ static bool handleSection(const QCString &s)
return FALSE;
}
-static bool handleSubpage(const QCString &s)
+static bool handleSubpage(const QCString &s, const QCStringList &)
{
if (current->section!=Entry::EMPTY_SEC &&
current->section!=Entry::PAGEDOC_SEC &&
@@ -2601,14 +2671,14 @@ static bool handleSubpage(const QCString &s)
return FALSE;
}
-static bool handleAnchor(const QCString &s)
+static bool handleAnchor(const QCString &s, const QCStringList &)
{
addOutput("@"+s+" ");
BEGIN(AnchorLabel);
return FALSE;
}
-static bool handleCite(const QCString &s)
+static bool handleCite(const QCString &s, const QCStringList &)
{
if (!g_spaceBeforeCmd.isEmpty())
{
@@ -2620,24 +2690,31 @@ static bool handleCite(const QCString &s)
return FALSE;
}
-static bool handleFormatBlock(const QCString &s)
+static bool handleFormatBlock(const QCString &s, const QCStringList &optList)
{
- addOutput("@"+s+" ");
- //printf("handleFormatBlock(%s)\n",s.data());
+ if (optList.isEmpty())
+ {
+ addOutput("@"+s+" ");
+ }
+ else
+ {
+ addOutput("@"+s+"{"+optList.join(",")+"} ");
+ }
+ //printf("handleFormatBlock(%s) with option(%s)\n",s.data(),opt.data());
blockName=s;
g_commentCount=0;
BEGIN(FormatBlock);
return FALSE;
}
-static bool handleAddIndex(const QCString &)
+static bool handleAddIndex(const QCString &, const QCStringList &)
{
addOutput("@addindex ");
BEGIN(LineParam);
return FALSE;
}
-static bool handleIf(const QCString &)
+static bool handleIf(const QCString &, const QCStringList &)
{
enabledSectionFound=FALSE;
guardType = Guard_If;
@@ -2646,7 +2723,7 @@ static bool handleIf(const QCString &)
return FALSE;
}
-static bool handleIfNot(const QCString &)
+static bool handleIfNot(const QCString &, const QCStringList &)
{
enabledSectionFound=FALSE;
guardType = Guard_IfNot;
@@ -2655,7 +2732,7 @@ static bool handleIfNot(const QCString &)
return FALSE;
}
-static bool handleElseIf(const QCString &)
+static bool handleElseIf(const QCString &, const QCStringList &)
{
if (guards.isEmpty())
{
@@ -2670,7 +2747,7 @@ static bool handleElseIf(const QCString &)
return FALSE;
}
-static bool handleElse(const QCString &)
+static bool handleElse(const QCString &, const QCStringList &)
{
if (guards.isEmpty())
{
@@ -2684,7 +2761,7 @@ static bool handleElse(const QCString &)
return FALSE;
}
-static bool handleEndIf(const QCString &)
+static bool handleEndIf(const QCString &, const QCStringList &)
{
if (guards.isEmpty())
{
@@ -2705,56 +2782,56 @@ static bool handleEndIf(const QCString &)
return FALSE;
}
-static bool handleIngroup(const QCString &)
+static bool handleIngroup(const QCString &, const QCStringList &)
{
inGroupParamFound=FALSE;
BEGIN( InGroupParam );
return FALSE;
}
-static bool handleNoSubGrouping(const QCString &)
+static bool handleNoSubGrouping(const QCString &, const QCStringList &)
{
current->subGrouping = FALSE;
return FALSE;
}
-static bool handleShowInitializer(const QCString &)
+static bool handleShowInitializer(const QCString &, const QCStringList &)
{
current->initLines = 100000; // ON
return FALSE;
}
-static bool handleHideInitializer(const QCString &)
+static bool handleHideInitializer(const QCString &, const QCStringList &)
{
current->initLines = 0; // OFF
return FALSE;
}
-static bool handleCallgraph(const QCString &)
+static bool handleCallgraph(const QCString &, const QCStringList &)
{
current->callGraph = TRUE; // ON
return FALSE;
}
-static bool handleHideCallgraph(const QCString &)
+static bool handleHideCallgraph(const QCString &, const QCStringList &)
{
current->callGraph = FALSE; // OFF
return FALSE;
}
-static bool handleCallergraph(const QCString &)
+static bool handleCallergraph(const QCString &, const QCStringList &)
{
current->callerGraph = TRUE; // ON
return FALSE;
}
-static bool handleHideCallergraph(const QCString &)
+static bool handleHideCallergraph(const QCString &, const QCStringList &)
{
current->callerGraph = FALSE; // OFF
return FALSE;
}
-static bool handleInternal(const QCString &)
+static bool handleInternal(const QCString &, const QCStringList &)
{
if (!Config_getBool(INTERNAL_DOCS))
{
@@ -2770,91 +2847,135 @@ static bool handleInternal(const QCString &)
else
{
// re-enabled for bug640828
- addOutput("\\internal ");
+ addOutput(" \\internal ");
inInternalDocs = TRUE;
}
return FALSE;
}
-static bool handleLineBr(const QCString &)
+static bool handleLineBr(const QCString &, const QCStringList &)
{
addOutput('\n');
return FALSE;
}
-static bool handleStatic(const QCString &)
+static bool handleStatic(const QCString &, const QCStringList &)
{
endBrief();
current->stat = TRUE;
return FALSE;
}
-static bool handlePure(const QCString &)
+static bool handlePure(const QCString &, const QCStringList &)
{
endBrief();
current->virt = Pure;
return FALSE;
}
-static bool handlePrivate(const QCString &)
+static bool handlePrivate(const QCString &, const QCStringList &)
{
current->protection = Private;
return FALSE;
}
-static bool handlePrivateSection(const QCString &)
+static bool handlePrivateSection(const QCString &, const QCStringList &)
{
current->protection = protection = Private;
return FALSE;
}
-static bool handleProtected(const QCString &)
+static bool handleProtected(const QCString &, const QCStringList &)
{
current->protection = Protected;
return FALSE;
}
-static bool handleProtectedSection(const QCString &)
+static bool handleProtectedSection(const QCString &, const QCStringList &)
{
current->protection = protection = Protected ;
return FALSE;
}
-static bool handlePublic(const QCString &)
+static bool handlePublic(const QCString &, const QCStringList &)
{
current->protection = Public;
return FALSE;
}
-static bool handlePublicSection(const QCString &)
+static bool handlePublicSection(const QCString &, const QCStringList &)
{
current->protection = protection = Public;
return FALSE;
}
-static bool handleToc(const QCString &)
+static bool handleToc(const QCString &, const QCStringList &optList)
{
if (current->section==Entry::PAGEDOC_SEC ||
current->section==Entry::MAINPAGEDOC_SEC)
{
- current->stat=TRUE; // we 'abuse' stat to pass whether or the TOC is enabled
+ QCStringList::ConstIterator it;
+ for ( it = optList.begin(); it != optList.end(); ++it )
+ {
+ QCString opt = (*it).stripWhiteSpace().lower();
+ char dum;
+ int level = 5;
+ int i = opt.find(':');
+ if (i>0) // found ':' but not on position 0 what would mean just a level
+ {
+ if (sscanf(opt.right(opt.length() - i - 1).data(),"%d%c",&level,&dum) != 1)
+ {
+ warn(yyFileName,yyLineNr,"Unknown option:level specified with \\tableofcontents: `%s'", (*it).stripWhiteSpace().data());
+ opt = "";
+ }
+ else
+ {
+ level = (level > 5 ? 5 : level);
+ level = (level <= 0 ? 5 : level);
+ opt = opt.left(i).stripWhiteSpace();
+ }
+ }
+ if (!opt.isEmpty())
+ {
+ if (opt == "html")
+ {
+ current->localToc.enableHtml(level);
+ }
+ else if (opt == "latex")
+ {
+ current->localToc.enableLatex(level);
+ }
+ else if (opt == "xml")
+ {
+ current->localToc.enableXml(level);
+ }
+ else
+ {
+ warn(yyFileName,yyLineNr,"Unknown option specified with \\tableofcontents: `%s'", (*it).stripWhiteSpace().data());
+ }
+ }
+ }
+ if (current->localToc.nothingEnabled())
+ {
+ current->localToc.enableHtml(5); // for backward compatibility
+ }
}
return FALSE;
}
-static bool handleInherit(const QCString &)
+static bool handleInherit(const QCString &, const QCStringList &)
{
BEGIN(InheritParam);
return FALSE;
}
-static bool handleExtends(const QCString &)
+static bool handleExtends(const QCString &, const QCStringList &)
{
BEGIN(ExtendsParam);
return FALSE;
}
-static bool handleCopyBrief(const QCString &)
+static bool handleCopyBrief(const QCString &, const QCStringList &)
{
if (current->brief.isEmpty() && current->doc.isEmpty())
{ // if we don't have a brief or detailed description yet,
@@ -2871,7 +2992,7 @@ static bool handleCopyBrief(const QCString &)
return FALSE;
}
-static bool handleCopyDetails(const QCString &)
+static bool handleCopyDetails(const QCString &, const QCStringList &)
{
setOutput(OutputDoc);
if (!g_spaceBeforeCmd.isEmpty())
@@ -2883,7 +3004,7 @@ static bool handleCopyDetails(const QCString &)
return FALSE;
}
-static bool handleCopyDoc(const QCString &)
+static bool handleCopyDoc(const QCString &, const QCStringList &)
{
setOutput(OutputBrief);
if (!g_spaceBeforeCmd.isEmpty())
diff --git a/src/condparser.cpp b/src/condparser.cpp
index ab33ae3..74e26bc 100644
--- a/src/condparser.cpp
+++ b/src/condparser.cpp
@@ -100,9 +100,10 @@ static bool isAlpha(const char c)
return (c>='A' && c<='Z') || (c>='a' && c<='z') || c=='_';
}
-static bool isAlphaNum(const char c)
+static bool isAlphaNumSpec(const char c)
{
- return isAlpha(c) || (c>='0' && c<='9');
+ return isAlpha(c) || (c>='0' && c<='9') || c=='-' || c=='.' ||
+ (((unsigned char)c)>=0x80 && ((unsigned char)c)<=0xFF);
}
/**
@@ -170,7 +171,7 @@ void CondParser::getToken()
if (isAlpha(*m_e))
{
m_tokenType = VARIABLE;
- while (isAlphaNum(*m_e))
+ while (isAlphaNumSpec(*m_e))
{
m_token += *m_e++;
}
diff --git a/src/config.xml b/src/config.xml
index 2dcc0f4..2e0f430 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -605,11 +605,11 @@ Go to the <a href="commands.html">next</a> section or return to the
With this tag you can assign which parser to use for a given extension.
Doxygen has a built-in mapping, but you can override or extend it using this tag.
The format is <code>ext=language</code>, where \c ext is a file extension, and language is one of
- the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
- Objective-C, Python, Fortran (fixed format Fortran: FortranFixed,
+ the parsers supported by doxygen: IDL, Java, Javascript, Csharp (C#), C, C++, D, PHP,
+ md (Markdown), Objective-C, Python, Fortran (fixed format Fortran: FortranFixed,
free formatted Fortran: FortranFree, unknown formatted Fortran: Fortran. In
the later case the parser tries to guess whether the code is fixed or free
- formatted code, this is the default for Fortran type files), VHDL.
+ formatted code, this is the default for Fortran type files), VHDL, tcl.
For instance to make doxygen treat
<code>.inc</code> files as Fortran files (default is PHP), and <code>.f</code> files as C (default is Fortran),
@@ -1138,6 +1138,8 @@ Go to the <a href="commands.html">next</a> section or return to the
</docs>
<docs doxywizard='0' doxyfile='0'>
<![CDATA[
+<br>
+<br>
Example of using a shell script as a filter for Unix:
\verbatim
FILE_VERSION_FILTER = "/bin/sh versionfilter.sh"
@@ -1157,7 +1159,7 @@ svn stat -v $1 | sed -n 's/^[ A-Z?\*|!]\{1,15\}/r/;s/ \{1,15\}/\/r/;s/ .*//p'
<br>
Example filter for ClearCase:
\verbatim
-FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
+FILE_VERSION_FILTER = "cleartool desc -fmt \%Vn"
\endverbatim
]]>
</docs>
@@ -1244,6 +1246,8 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
or return value. If set to \c NO, doxygen will only warn about
wrong or incomplete parameter documentation, but not about the absence of
documentation.
+ If \ref cfg_extract_all "EXTRACT_ALL" is set to \c YES then this flag will
+ automatically be disabled.
]]>
</docs>
</option>
@@ -1639,7 +1643,7 @@ to disable this feature.
necessary type information.
@note The availability of this option depends on whether or not doxygen
- was generated with the `-Duse-libclang=ON` option for CMake.
+ was generated with the `-Duse_libclang=ON` option for CMake.
]]>
</docs>
</option>
@@ -1663,7 +1667,7 @@ to disable this feature.
will then be passed to the parser.
@note The availability of this option depends on whether or not doxygen
- was generated with the `-Duse-libclang=ON` option for CMake.
+ was generated with the `-Duse_libclang=ON` option for CMake.
]]>
</docs>
</option>
@@ -2549,6 +2553,20 @@ EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
<![CDATA[
The \c MAKEINDEX_CMD_NAME tag can be used to specify the command name to
generate index for \f$\mbox{\LaTeX}\f$.
+
+ @note This tag is used in the `Makefile` / `make.bat`.
+ \sa \ref cfg_latex_makeindex_cmd "LATEX_MAKEINDEX_CMD" for the part in the generated output file (`.tex`).
+]]>
+ </docs>
+ </option>
+ <option type='string' id='LATEX_MAKEINDEX_CMD' defval='\makeindex' depends='GENERATE_LATEX'>
+ <docs>
+<![CDATA[
+ The \c LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
+ generate index for \f$\mbox{\LaTeX}\f$.
+
+ @note This tag is used in the generated output file (`.tex`).
+ \sa \ref cfg_makeindex_cmd_name "MAKEINDEX_CMD_NAME" for the part in the `Makefile` / `make.bat`.
]]>
</docs>
</option>
diff --git a/src/configgen.py b/src/configgen.py
index 33857b7..ca2a5d1 100755
--- a/src/configgen.py
+++ b/src/configgen.py
@@ -272,7 +272,7 @@ def parseOption(node):
print(" \"%s\"" % (line))
print(" );")
if defval != '':
- print(" cs->setDefaultValue(\"%s\");" % (defval))
+ print(" cs->setDefaultValue(\"%s\");" % (defval.replace('\\','\\\\')))
if format == 'file':
print(" cs->setWidgetType(ConfigString::File);")
elif format == 'image':
@@ -529,7 +529,7 @@ def parseOptionDoc(node, first):
if defval != '':
print("")
print("The default value is: <code>%s</code>." % (
- defval))
+ defval.replace('\\','\\\\')))
print("")
# depends handling
if (node.hasAttribute('depends')):
diff --git a/src/definition.cpp b/src/definition.cpp
index 92baf0c..cbfad94 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -41,6 +41,7 @@
#include "namespacedef.h"
#include "filedef.h"
#include "dirdef.h"
+#include "pagedef.h"
#define START_MARKER 0x4445465B // DEF[
#define END_MARKER 0x4445465D // DEF]
@@ -1613,72 +1614,92 @@ void Definition::writeNavigationPath(OutputList &ol) const
}
// TODO: move to htmlgen
-void Definition::writeToc(OutputList &ol)
+void Definition::writeToc(OutputList &ol, const LocalToc &localToc)
{
SectionDict *sectionDict = m_impl->sectionDict;
if (sectionDict==0) return;
- ol.pushGeneratorState();
- ol.disableAllBut(OutputGenerator::Html);
- ol.writeString("<div class=\"toc\">");
- ol.writeString("<h3>");
- ol.writeString(theTranslator->trRTFTableOfContents());
- ol.writeString("</h3>\n");
- ol.writeString("<ul>");
- SDict<SectionInfo>::Iterator li(*sectionDict);
- SectionInfo *si;
- int level=1,l;
- char cs[2];
- cs[1]='\0';
- bool inLi[5]={ FALSE, FALSE, FALSE, FALSE };
- for (li.toFirst();(si=li.current());++li)
- {
- if (si->type==SectionInfo::Section ||
- si->type==SectionInfo::Subsection ||
- si->type==SectionInfo::Subsubsection ||
- si->type==SectionInfo::Paragraph)
+ if (localToc.isHtmlEnabled())
+ {
+ int maxLevel = localToc.htmlLevel();
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Html);
+ ol.writeString("<div class=\"toc\">");
+ ol.writeString("<h3>");
+ ol.writeString(theTranslator->trRTFTableOfContents());
+ ol.writeString("</h3>\n");
+ ol.writeString("<ul>");
+ SDict<SectionInfo>::Iterator li(*sectionDict);
+ SectionInfo *si;
+ int level=1,l;
+ char cs[2];
+ cs[1]='\0';
+ bool inLi[5]={ FALSE, FALSE, FALSE, FALSE };
+ for (li.toFirst();(si=li.current());++li)
{
- //printf(" level=%d title=%s\n",level,si->title.data());
- int nextLevel = (int)si->type;
- if (nextLevel>level)
+ if (si->type==SectionInfo::Section ||
+ si->type==SectionInfo::Subsection ||
+ si->type==SectionInfo::Subsubsection ||
+ si->type==SectionInfo::Paragraph)
{
- for (l=level;l<nextLevel;l++)
+ //printf(" level=%d title=%s\n",level,si->title.data());
+ int nextLevel = (int)si->type;
+ if (nextLevel>level)
{
- ol.writeString("<ul>");
+ for (l=level;l<nextLevel;l++)
+ {
+ if (l < maxLevel) ol.writeString("<ul>");
+ }
}
- }
- else if (nextLevel<level)
- {
- for (l=level;l>nextLevel;l--)
+ else if (nextLevel<level)
{
- if (inLi[l]) ol.writeString("</li>\n");
- inLi[l]=FALSE;
- ol.writeString("</ul>\n");
+ for (l=level;l>nextLevel;l--)
+ {
+ if (l <= maxLevel && inLi[l]) ol.writeString("</li>\n");
+ inLi[l]=FALSE;
+ if (l <= maxLevel) ol.writeString("</ul>\n");
+ }
}
+ cs[0]='0'+nextLevel;
+ if (nextLevel <= maxLevel && inLi[nextLevel]) ol.writeString("</li>\n");
+ QCString titleDoc = convertToHtml(si->title);
+ if (nextLevel <= maxLevel) ol.writeString("<li class=\"level"+QCString(cs)+"\"><a href=\"#"+si->label+"\">"+(si->title.isEmpty()?si->label:titleDoc)+"</a>");
+ inLi[nextLevel]=TRUE;
+ level = nextLevel;
}
- cs[0]='0'+nextLevel;
- if (inLi[nextLevel]) ol.writeString("</li>\n");
- QCString titleDoc = convertToHtml(si->title);
- ol.writeString("<li class=\"level"+QCString(cs)+"\"><a href=\"#"+si->label+"\">"+(si->title.isEmpty()?si->label:titleDoc)+"</a>");
- inLi[nextLevel]=TRUE;
- level = nextLevel;
}
- }
- while (level>1)
- {
- if (inLi[level]) ol.writeString("</li>\n");
+ while (level>1 && level <= maxLevel)
+ {
+ if (inLi[level]) ol.writeString("</li>\n");
+ inLi[level]=FALSE;
+ ol.writeString("</ul>\n");
+ level--;
+ }
+ if (level <= maxLevel && inLi[level]) ol.writeString("</li>\n");
inLi[level]=FALSE;
ol.writeString("</ul>\n");
- level--;
+ ol.writeString("</div>\n");
+ ol.popGeneratorState();
+ }
+
+ if (localToc.isLatexEnabled())
+ {
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Latex);
+ int maxLevel = localToc.latexLevel();
+
+ ol.writeString("\\etocsetnexttocdepth{"+QCString().setNum(maxLevel)+"}\n");
+
+ ol.writeString("\\localtableofcontents\n");
+ ol.popGeneratorState();
}
- if (inLi[level]) ol.writeString("</li>\n");
- inLi[level]=FALSE;
- ol.writeString("</ul>\n");
- ol.writeString("</div>\n");
- ol.popGeneratorState();
}
//----------------------------------------------------------------------------------------
+SectionDict * Definition::getSectionDict(void)
+{
+ return m_impl->sectionDict;
+}
QCString Definition::symbolName() const
{
diff --git a/src/definition.h b/src/definition.h
index d16c6b9..c0428a0 100644
--- a/src/definition.h
+++ b/src/definition.h
@@ -275,6 +275,9 @@ class Definition : public DefinitionIntf
QCString id() const;
+ /** returns the section dictionary, only of importance for pagedef */
+ SectionDict * getSectionDict(void);
+
//-----------------------------------------------------------------------------------
// ---- setters -----
//-----------------------------------------------------------------------------------
@@ -346,7 +349,7 @@ class Definition : public DefinitionIntf
void setLocalName(const QCString name);
void addSectionsToIndex();
- void writeToc(OutputList &ol);
+ void writeToc(OutputList &ol, const LocalToc &lt);
void setCookie(Cookie *cookie) { delete m_cookie; m_cookie = cookie; }
Cookie *cookie() const { return m_cookie; }
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 205e818..8efe8fa 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -26,6 +26,7 @@
#include <qdict.h>
#include <qregexp.h>
#include <ctype.h>
+#include <qcstringlist.h>
#include "doxygen.h"
#include "debug.h"
@@ -146,6 +147,9 @@ struct DocParserContext
static QStack<DocParserContext> g_parserStack;
//---------------------------------------------------------------------------
+static void handleImg(DocNode *parent,QList<DocNode> &children,const HtmlAttribList &tagHtmlAttribs);
+
+//---------------------------------------------------------------------------
static void docParserPushContext(bool saveParamInfo=TRUE)
{
//QCString indent;
@@ -1643,6 +1647,10 @@ reparsetoken:
handleStyleLeave(parent,children,DocStyleChange::Small,tokenName);
}
break;
+ case HTML_IMG:
+ if (!g_token->endTag)
+ handleImg(parent,children,g_token->attribs);
+ break;
default:
return FALSE;
break;
@@ -5197,7 +5205,31 @@ void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t)
{
DBG(("handleInclude(%s)\n",qPrint(cmdName)));
int tok=doctokenizerYYlex();
- if (tok!=TK_WHITESPACE)
+ if (tok==TK_WORD && g_token->name=="{")
+ {
+ doctokenizerYYsetStateOptions();
+ tok=doctokenizerYYlex();
+ doctokenizerYYsetStatePara();
+ QCStringList optList=QCStringList::split(",",g_token->name);
+ if (t==DocInclude::Include && optList.contains("lineno"))
+ {
+ t = DocInclude::IncWithLines;
+ }
+ else if (t==DocInclude::Snippet && optList.contains("lineno"))
+ {
+ t = DocInclude::SnipWithLines;
+ }
+ else if (t==DocInclude::Include && optList.contains("doc"))
+ {
+ t = DocInclude::IncludeDoc;
+ }
+ else if (t==DocInclude::Snippet && optList.contains("doc"))
+ {
+ t = DocInclude::SnippetDoc;
+ }
+ tok=doctokenizerYYlex();
+ }
+ else if (tok!=TK_WHITESPACE)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
qPrint(cmdName));
@@ -5635,7 +5667,8 @@ int DocPara::handleCommand(const QCString &cmdName)
defaultHandleTitleAndSize(CMD_STARTUML,dv,dv->children(),width,height);
doctokenizerYYsetStatePlantUML();
retval = doctokenizerYYlex();
- dv->setText(g_token->verb);
+ int line=0;
+ dv->setText(stripLeadingAndTrailingEmptyLines(g_token->verb,line));
dv->setWidth(width);
dv->setHeight(height);
if (jarPath.isEmpty())
diff --git a/src/doctokenizer.h b/src/doctokenizer.h
index eb39906..b3b9fa5 100644
--- a/src/doctokenizer.h
+++ b/src/doctokenizer.h
@@ -163,5 +163,6 @@ void doctokenizerYYendAutoList();
void doctokenizerYYsetStatePlantUML();
void doctokenizerYYsetStateSetScope();
void doctokenizerYYsetStatePlantUMLOpt();
+void doctokenizerYYsetStateOptions();
#endif
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index e6b8865..a162fb3 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -447,6 +447,7 @@ REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
%x St_Snippet
%x St_SetScope
%x St_SetScopeEnd
+%x St_Options
%x St_Sections
%s St_SecLabel1
@@ -1147,6 +1148,16 @@ REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
g_token->chars=yytext;
return TK_WHITESPACE;
}
+<St_Options>{ID} {
+ g_token->name+=yytext;
+ }
+<St_Options>{WS}*","{WS}*
+<St_Options>{WS} { /* option separator */
+ g_token->name+=",";
+ }
+<St_Options>"}" {
+ return TK_WORD;
+ }
<St_File>{FILEMASK} {
g_token->name = yytext;
return TK_WORD;
@@ -1509,6 +1520,12 @@ void doctokenizerYYsetStateSetScope()
BEGIN(St_SetScope);
}
+void doctokenizerYYsetStateOptions()
+{
+ g_token->name="";
+ BEGIN(St_Options);
+}
+
void doctokenizerYYcleanup()
{
yy_delete_buffer( YY_CURRENT_BUFFER );
diff --git a/src/dot.cpp b/src/dot.cpp
index 5adc2ab..7b29569 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -1883,6 +1883,10 @@ void DotNode::writeBox(FTextStream &t,
{
t << ",tooltip=\"" << escapeTooltip(m_tooltip) << "\"";
}
+ else
+ {
+ t << ",tooltip=\" \""; // space in tooltip is required otherwise still something like 'Node0' is used
+ }
t << "];" << endl;
}
@@ -3067,7 +3071,7 @@ DotClassGraph::~DotClassGraph()
QCString computeMd5Signature(DotNode *root,
DotNode::GraphType gt,
GraphOutputFormat format,
- bool lrRank,
+ const QCString &rank, // either "LR", "RL", or ""
bool renderParents,
bool backArrows,
const QCString &title,
@@ -3078,9 +3082,9 @@ QCString computeMd5Signature(DotNode *root,
QGString buf;
FTextStream md5stream(&buf);
writeGraphHeader(md5stream,title);
- if (lrRank)
+ if (!rank.isEmpty())
{
- md5stream << " rankdir=\"LR\";" << endl;
+ md5stream << " rankdir=\"" << rank << "\";" << endl;
}
root->clearWriteFlag();
root->write(md5stream,
@@ -3129,7 +3133,7 @@ static bool updateDotGraph(DotNode *root,
DotNode::GraphType gt,
const QCString &baseName,
GraphOutputFormat format,
- bool lrRank,
+ const QCString &rank,
bool renderParents,
bool backArrows,
const QCString &title=QCString()
@@ -3138,7 +3142,7 @@ static bool updateDotGraph(DotNode *root,
QCString theGraph;
// TODO: write graph to theGraph, then compute md5 checksum
QCString md5 = computeMd5Signature(
- root,gt,format,lrRank,renderParents,
+ root,gt,format,rank,renderParents,
backArrows,title,theGraph);
QFile f(baseName+".dot");
if (f.open(IO_WriteOnly))
@@ -3199,7 +3203,7 @@ QCString DotClassGraph::writeGraph(FTextStream &out,
m_graphType,
absBaseName,
graphFormat,
- m_lrRank,
+ m_lrRank ? "LR" : "",
m_graphType==DotNode::Inheritance,
TRUE,
m_startNode->label()
@@ -3559,7 +3563,7 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out,
DotNode::Dependency,
absBaseName,
graphFormat,
- FALSE, // lrRank
+ "", // lrRank
FALSE, // renderParents
m_inverse, // backArrows
m_startNode->label()
@@ -3872,11 +3876,12 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat graphForma
QCString absImgName = absBaseName+"."+imgExt;
bool regenerate = FALSE;
+
if (updateDotGraph(m_startNode,
DotNode::CallGraph,
absBaseName,
graphFormat,
- TRUE, // lrRank
+ m_inverse ? "RL" : "LR", // lrRank
FALSE, // renderParents
m_inverse, // backArrows
m_startNode->label()
diff --git a/src/dot.h b/src/dot.h
index ab6a316..3a70d8b 100644
--- a/src/dot.h
+++ b/src/dot.h
@@ -133,8 +133,9 @@ class DotNode
friend QCString computeMd5Signature(
DotNode *root, GraphType gt,
- GraphOutputFormat f,
- bool lrRank, bool renderParents,
+ GraphOutputFormat f,
+ const QCString &rank,
+ bool renderParents,
bool backArrows,
const QCString &title,
QCString &graphStr
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 7ad8c52..bf93a9b 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -13,6 +13,10 @@
*
*/
+#if !defined(_WIN32) || defined(__CYGWIN__)
+#define _DEFAULT_SOURCE 1
+#endif
+
#include <locale.h>
#include <qfileinfo.h>
@@ -605,7 +609,7 @@ static void addRelatedPage(EntryNav *rootNav)
{
pd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
pd->addSectionsToDefinition(root->anchors);
- pd->setShowToc(root->stat);
+ pd->setLocalToc(root->localToc);
addPageToContext(pd,rootNav);
}
}
@@ -8712,7 +8716,7 @@ static void findMainPage(EntryNav *rootNav)
//setFileNameForSections(root->anchors,"index",Doxygen::mainPage);
Doxygen::mainPage->setBriefDescription(root->brief,root->briefFile,root->briefLine);
Doxygen::mainPage->setFileName(indexName);
- Doxygen::mainPage->setShowToc(root->stat);
+ Doxygen::mainPage->setLocalToc(root->localToc);
addPageToContext(Doxygen::mainPage,rootNav);
SectionInfo *si = Doxygen::sectionDict->find(Doxygen::mainPage->name());
@@ -8922,7 +8926,7 @@ static void generatePageDocs()
static void buildExampleList(EntryNav *rootNav)
{
- if (rootNav->section()==Entry::EXAMPLE_SEC && !rootNav->name().isEmpty())
+ if ((rootNav->section()==Entry::EXAMPLE_SEC || rootNav->section()==Entry::EXAMPLE_LINENO_SEC) && !rootNav->name().isEmpty())
{
rootNav->loadEntry(g_storage);
Entry *root = rootNav->entry();
@@ -8943,7 +8947,7 @@ static void buildExampleList(EntryNav *rootNav)
pd->setFileName(convertNameToFile(pd->name()+"-example",FALSE,TRUE));
pd->addSectionsToDefinition(root->anchors);
pd->setLanguage(root->lang);
- //pi->addSections(root->anchors);
+ pd->setShowLineNo(rootNav->section()==Entry::EXAMPLE_LINENO_SEC);
Doxygen::exampleSDict->inSort(root->name,pd);
//we don't add example to groups
@@ -8992,11 +8996,16 @@ static void generateExampleDocs()
g_outputList->docify(pd->name());
endTitle(*g_outputList,n,0);
g_outputList->startContents();
+ QCString lineNoOptStr;
+ if (pd->showLineNo())
+ {
+ lineNoOptStr="{lineno}";
+ }
g_outputList->generateDoc(pd->docFile(), // file
pd->docLine(), // startLine
pd, // context
0, // memberDef
- pd->documentation()+"\n\n\\include "+pd->name(), // docs
+ pd->documentation()+"\n\n\\include"+lineNoOptStr+" "+pd->name(), // docs
TRUE, // index words
TRUE, // is example
pd->name()
@@ -10203,7 +10212,6 @@ void readConfiguration(int argc, char **argv)
bool genConfig=FALSE;
bool shortList=FALSE;
bool updateConfig=FALSE;
- bool genLayout=FALSE;
int retVal;
while (optind<argc && argv[optind][0]=='-' &&
(isalpha(argv[optind][1]) || argv[optind][1]=='?' ||
@@ -10214,17 +10222,14 @@ 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;
layoutName=getArg(argc,argv,optind);
if (!layoutName)
{ layoutName="DoxygenLayout.xml"; }
+ writeDefaultLayoutFile(layoutName);
+ cleanUpDoxygen();
+ exit(0);
break;
case 'd':
debugLabel=getArg(argc,argv,optind);
@@ -10457,26 +10462,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)
{
@@ -10488,6 +10473,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");
@@ -10498,7 +10487,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];
}
@@ -10509,7 +10498,19 @@ 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 (!Config::parse(configName,updateConfig))
{
diff --git a/src/entry.cpp b/src/entry.cpp
index 9d15ec8..a0460da 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -73,6 +73,7 @@ Entry::Entry(const Entry &e)
spec = e.spec;
initLines = e.initLines;
stat = e.stat;
+ localToc = e.localToc;
explicitExternal = e.explicitExternal;
proto = e.proto;
subGrouping = e.subGrouping;
diff --git a/src/entry.h b/src/entry.h
index f1b81ef..739b128 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -91,14 +91,14 @@ class Entry
ENUMDOC_SEC = 0x01000000,
ENUM_SEC = 0x02000000,
- EMPTY_SEC = 0x03000000,
- PAGEDOC_SEC = 0x04000000,
+ EMPTY_SEC = 0x03000000,
+ PAGEDOC_SEC = 0x04000000,
VARIABLE_SEC = 0x05000000,
FUNCTION_SEC = 0x06000000,
TYPEDEF_SEC = 0x07000000,
- MEMBERDOC_SEC = 0x08000000,
+ MEMBERDOC_SEC = 0x08000000,
OVERLOADDOC_SEC = 0x09000000,
- EXAMPLE_SEC = 0x0a000000,
+ EXAMPLE_SEC = 0x0a000000,
VARIABLEDOC_SEC = 0x0b000000,
FILEDOC_SEC = 0x0c000000,
DEFINEDOC_SEC = 0x0d000000,
@@ -112,9 +112,10 @@ class Entry
PACKAGE_SEC = 0x15000000,
PACKAGEDOC_SEC = 0x16000000,
OBJCIMPL_SEC = 0x17000000,
- DIRDOC_SEC = 0x18000000
- ,EXPORTED_INTERFACE_SEC = 0x19000000
- ,INCLUDED_SERVICE_SEC = 0x1A000000
+ DIRDOC_SEC = 0x18000000,
+ EXPORTED_INTERFACE_SEC = 0x19000000,
+ INCLUDED_SERVICE_SEC = 0x1A000000,
+ EXAMPLE_LINENO_SEC = 0x1B000000,
};
// class specifiers (add new items to the end)
@@ -288,6 +289,7 @@ class Entry
bool artificial; //!< Artificially introduced item
GroupDocType groupDocType;
QCString id; //!< libclang id
+ LocalToc localToc;
static int num; //!< counts the total number of entries
diff --git a/src/formula.cpp b/src/formula.cpp
index 46e2075..c252e07 100644
--- a/src/formula.cpp
+++ b/src/formula.cpp
@@ -69,8 +69,10 @@ void FormulaList::generateBitmaps(const char *path)
FTextStream t(&f);
if (Config_getBool(LATEX_BATCHMODE)) t << "\\batchmode" << endl;
t << "\\documentclass{article}" << endl;
+ t << "\\usepackage{ifthen}" << endl;
t << "\\usepackage{epsfig}" << endl; // for those who want to include images
writeExtraLatexPackages(t);
+ writeLatexSpecialFormulaChars(t);
t << "\\pagestyle{empty}" << endl;
t << "\\begin{document}" << endl;
int page=0;
diff --git a/src/fortrancode.l b/src/fortrancode.l
index e64c38e..3014dc3 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -37,7 +37,7 @@
#include <ctype.h>
#include <qregexp.h>
#include <qdir.h>
-#include <qstringlist.h>
+#include <qcstringlist.h>
#include "entry.h"
#include "doxygen.h"
#include "message.h"
@@ -86,7 +86,7 @@ class UseEntry
{
public:
QCString module; // just for debug
- QStringList onlyNames; /* entries of the ONLY-part */
+ QCStringList onlyNames; /* entries of the ONLY-part */
};
/**
@@ -105,7 +105,7 @@ class UseSDict : public SDict<UseEntry>
class Scope
{
public:
- QStringList useNames; //!< contains names of used modules
+ QCStringList useNames; //!< contains names of used modules
QDict<void> localVars; //!< contains names of local variables
Scope() : localVars(7, FALSE /*caseSensitive*/) {}
@@ -122,7 +122,7 @@ static QCString currentClass=0; //!< name of the current enclosing
static UseSDict *useMembers= new UseSDict; //!< info about used modules
static UseEntry *useEntry = 0; //!< current use statement info
static QList<Scope> scopeStack;
-// static QStringList *currentUseNames= new QStringList; //! contains names of used modules of current program unit
+// static QCStringList *currentUseNames= new QCStringList; //! contains names of used modules of current program unit
static QCString str=""; //!> contents of fortran string
static CodeOutputInterface * g_code;
@@ -478,7 +478,7 @@ static bool getFortranDefs(const QCString &memberName, const QCString &moduleNam
if (ue)
{
// check if only-list exists and if current entry exists is this list
- QStringList &only= ue->onlyNames;
+ QCStringList &only= ue->onlyNames;
if (only.isEmpty())
{
//cout << " found in module " << moduleName << " entry " << memberName << endl;
@@ -486,10 +486,10 @@ static bool getFortranDefs(const QCString &memberName, const QCString &moduleNam
}
else
{
- for ( QStringList::Iterator it = only.begin(); it != only.end(); ++it)
+ for ( QCStringList::Iterator it = only.begin(); it != only.end(); ++it)
{
//cout << " search in only: " << moduleName << ":: " << memberName << "==" << (*it)<< endl;
- if (memberName == (*it).utf8())
+ if (memberName == *it)
{
return TRUE; // found in ONLY-part of use list
}
@@ -632,9 +632,9 @@ static void endScope()
Scope *scope = scopeStack.getLast();
scopeStack.removeLast();
- for ( QStringList::Iterator it = scope->useNames.begin(); it != scope->useNames.end(); ++it)
+ for ( QCStringList::Iterator it = scope->useNames.begin(); it != scope->useNames.end(); ++it)
{
- useMembers->remove((*it).utf8());
+ useMembers->remove(*it);
}
delete scope;
}
@@ -1194,9 +1194,6 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
g_insideBody=FALSE;
}
/*------ strings --------------------------------------------------*/
-<*>"\\\\" { str+=yytext; /* ignore \\ */}
-<*>"\\\""|\\\' { str+=yytext; /* ignore \" */}
-
<String>\n { // string with \n inside
g_contLineNr++;
str+=yytext;
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index d0503c2..884c86e 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -383,14 +383,6 @@ SCOPENAME ({ID}{BS}"::"{BS})*
/*------ ignore strings that are not initialization strings */
-<*>"\\\\" { if (yy_top_state() == Initialization
- || yy_top_state() == ArrayInitializer)
- initializer+=yytext;
- }
-<*>"\\\""|\\\' { if (yy_top_state() == Initialization
- || yy_top_state() == ArrayInitializer)
- initializer+=yytext;
- }
<String>\"|\' { // string ends with next quote without previous backspace
if (yytext[0]!=stringStartSymbol) { yyColNr -= (int)yyleng; REJECT; } // single vs double quote
if (yy_top_state() == Initialization
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 8f2f415..3f60ade 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -606,7 +606,7 @@ void HtmlCodeGenerator::writeTooltip(const char *id, const DocLinkInfo &docInfo,
if (desc)
{
m_t << "<div class=\"ttdoc\">";
- docify(desc); // desc is already HTML escaped; but there are still < and > signs
+ docify(desc);
m_t << "</div>";
}
if (!defInfo.file.isEmpty())
@@ -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
{
@@ -2732,13 +2733,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/index.cpp b/src/index.cpp
index 3706bbf..8e5f266 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -1579,8 +1579,8 @@ static void writeAnnotatedClassList(OutputList &ol)
{
//LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::ClassList);
//bool addToIndex = lne==0 || lne->visible();
+ bool first=TRUE;
- ol.startIndexList();
ClassSDict::Iterator cli(*Doxygen::classSDict);
ClassDef *cd;
@@ -1593,6 +1593,11 @@ static void writeAnnotatedClassList(OutputList &ol)
{
continue;
}
+ if (first)
+ {
+ ol.startIndexList();
+ first=FALSE;
+ }
ol.pushGeneratorState();
if (cd->isEmbeddedInOuterScope())
@@ -1635,7 +1640,7 @@ static void writeAnnotatedClassList(OutputList &ol)
}
ol.popGeneratorState();
}
- ol.endIndexList();
+ if (!first) ol.endIndexList();
}
inline bool isId1(int c)
@@ -3883,9 +3888,9 @@ static void writeIndex(OutputList &ol)
if (Doxygen::mainPage)
{
Doxygen::insideMainPage=TRUE;
- if (Doxygen::mainPage->showToc() && Doxygen::mainPage->hasSections())
+ if (Doxygen::mainPage->localToc().isHtmlEnabled() && Doxygen::mainPage->hasSections())
{
- Doxygen::mainPage->writeToc(ol);
+ Doxygen::mainPage->writeToc(ol,Doxygen::mainPage->localToc());
}
ol.startTextBlock();
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 7fd27bb..d2c4c5d 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -219,7 +219,7 @@ void LatexDocVisitor::visit(DocURL *u)
if (u->isEmail()) m_t << "mailto:";
m_t << u->url() << "}";
}
- m_t << "{\\tt ";
+ m_t << "\\texttt{ ";
filter(u->url());
m_t << "}";
}
@@ -1249,7 +1249,7 @@ void LatexDocVisitor::visitPre(DocHRef *href)
m_t << href->url();
m_t << "}";
}
- m_t << "{\\tt ";
+ m_t << "\\texttt{ ";
}
void LatexDocVisitor::visitPost(DocHRef *)
@@ -1496,7 +1496,7 @@ void LatexDocVisitor::visitPre(DocParamList *pl)
{
if (pl->direction()!=DocParamSect::Unspecified)
{
- m_t << "\\mbox{\\tt ";
+ m_t << "\\mbox{\\texttt{ ";
if (pl->direction()==DocParamSect::In)
{
m_t << "in";
@@ -1509,7 +1509,7 @@ void LatexDocVisitor::visitPre(DocParamList *pl)
{
m_t << "in,out";
}
- m_t << "} ";
+ m_t << "}} ";
}
if (useTable) m_t << " & ";
}
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 60c2d0c..a0390be 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -182,7 +182,7 @@ void LatexCodeGenerator::writeCodeLink(const char *ref,const char *f,
}
else
{
- m_t << name;
+ codify(name);
}
m_col+=l;
}
@@ -583,7 +583,9 @@ static void writeDefaultHeaderPart1(FTextStream &t)
"\\hbadness=750\n"
"\\setlength{\\emergencystretch}{15pt}\n"
"\\setlength{\\parindent}{0cm}\n"
- "\\setlength{\\parskip}{3ex plus 2ex minus 2ex}\n";
+ "\\newcommand{\\doxynormalparskip}{\\setlength{\\parskip}{3ex plus 2ex minus 2ex}}\n"
+ "\\newcommand{\\doxytocparskip}{\\setlength{\\parskip}{1ex plus 0ex minus 0ex}}\n"
+ "\\doxynormalparskip\n";
// Redefine paragraph/subparagraph environments, using sectsty fonts
t << "\\makeatletter\n"
"\\renewcommand{\\paragraph}{%\n"
@@ -645,33 +647,29 @@ static void writeDefaultHeaderPart1(FTextStream &t)
"\\usepackage{natbib}\n"
"\\usepackage[titles]{tocloft}\n"
"\\setcounter{tocdepth}{3}\n"
- "\\setcounter{secnumdepth}{5}\n"
- "\\makeindex\n"
- "\n";
+ "\\setcounter{secnumdepth}{5}\n";
+
+ QCString latex_mkidx_command = Config_getString(LATEX_MAKEINDEX_CMD);
+ if (!latex_mkidx_command.isEmpty())
+ {
+ if (latex_mkidx_command[0] == '\\')
+ t << latex_mkidx_command << "\n";
+ else
+ t << '\\' << latex_mkidx_command << "\n";
+ }
+ else
+ {
+ t << "\\makeindex\n";
+ }
+ t << "\n";
writeExtraLatexPackages(t);
+ writeLatexSpecialFormulaChars(t);
// Hyperlinks
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
if (pdfHyperlinks)
{
- unsigned char minus[4]; // Superscript minus
- char *pminus = (char *)minus;
- unsigned char sup2[3]; // Superscript two
- char *psup2 = (char *)sup2;
- unsigned char sup3[3];
- char *psup3 = (char *)sup3; // Superscript three
- minus[0]= 0xE2;
- minus[1]= 0x81;
- minus[2]= 0xBB;
- minus[3]= 0;
- sup2[0]= 0xC2;
- sup2[1]= 0xB2;
- sup2[2]= 0;
- sup3[0]= 0xC2;
- sup3[1]= 0xB3;
- sup3[2]= 0;
-
t << "% Hyperlinks (required, but should be loaded last)\n"
"\\ifpdf\n"
" \\usepackage[pdftex,pagebackref=true]{hyperref}\n"
@@ -682,18 +680,6 @@ static void writeDefaultHeaderPart1(FTextStream &t)
" \\usepackage[ps2pdf,pagebackref=true]{hyperref}\n"
" \\fi\n"
"\\fi\n"
- "\\ifpdf\n"
- " \\DeclareUnicodeCharacter{207B}{${}^{-}$}% Superscript minus\n"
- " \\DeclareUnicodeCharacter{C2B2}{${}^{2}$}% Superscript two\n"
- " \\DeclareUnicodeCharacter{C2B3}{${}^{3}$}% Superscript three\n"
- "\\else\n"
- " \\catcode`\\" << pminus << "=13% Superscript minus\n"
- " \\def" << pminus << "{${}^{-}$}\n"
- " \\catcode`\\" << psup2 << "=13% Superscript two\n"
- " \\def" << psup2 << "{${}^{2}$}\n"
- " \\catcode`\\"<<psup3<<"=13% Superscript three\n"
- " \\def"<<psup3<<"{${}^{3}$}\n"
- "\\fi\n"
"\n"
"\\hypersetup{%\n"
" colorlinks=true,%\n"
@@ -715,6 +701,11 @@ static void writeDefaultHeaderPart1(FTextStream &t)
t << "\\usepackage{caption}\n"
<< "\\captionsetup{labelsep=space,justification=centering,font={bf},singlelinecheck=off,skip=4pt,position=top}\n\n";
+
+ // in page table of contents
+ t << "\\usepackage{etoc}\n"
+ "\\etocsettocstyle{\\doxytocparskip}{\\doxynormalparskip}\n";
+
// prevent numbers overlap the titles in toc
t << "\\renewcommand{\\numberline}[1]{#1~}\n";
@@ -1378,7 +1369,7 @@ void LatexGenerator::startHtmlLink(const char *url)
t << url;
t << "}";
}
- t << "{\\tt ";
+ t << "\\texttt{ ";
}
void LatexGenerator::endHtmlLink()
@@ -1394,7 +1385,7 @@ void LatexGenerator::endHtmlLink()
// t << url;
// t << "}";
// }
-// t << "{\\tt ";
+// t << "\\texttt{ ";
// docify(url);
// t << "}";
//}
@@ -1402,7 +1393,7 @@ void LatexGenerator::endHtmlLink()
void LatexGenerator::writeStartAnnoItem(const char *,const char *,
const char *path,const char *name)
{
- t << "\\item\\contentsline{section}{\\bf ";
+ t << "\\item\\contentsline{section}\\textbf{ ";
if (path) docify(path);
docify(name);
t << "} ";
@@ -1437,7 +1428,7 @@ void LatexGenerator::endIndexValue(const char *name,bool /*hasBrief*/)
//void LatexGenerator::writeClassLink(const char *,const char *,
// const char *,const char *name)
//{
-// t << "{\\bf ";
+// t << "\\textbf{ ";
// docify(name);
// t << "}";
//}
@@ -2150,7 +2141,7 @@ void LatexGenerator::endParameterList()
void LatexGenerator::startParameterType(bool first,const char *key)
{
t << "\\item[{";
- if (!first && key) t << key;
+ if (!first && key) docify(key);
}
void LatexGenerator::endParameterType()
@@ -2239,6 +2230,11 @@ void LatexGenerator::startCodeFragment()
void LatexGenerator::endCodeFragment()
{
+ //if (DoxyCodeOpen)
+ //{
+ // t << "}\n";
+ // DoxyCodeOpen = FALSE;
+ //}
t << "\\end{DoxyCode}\n";
DoxyCodeOpen = FALSE;
}
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 0ca95a4..dff64ff 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -1780,22 +1780,20 @@ static int writeTableBlock(GrowBuf &out,const char *data,int size)
QCString cellTag("th"), cellClass("class=\"markdownTableHead");
for (unsigned row = 0; row < tableContents.size(); row++)
{
- out.addStr(" <tr class=\"markdownTable");
if (row)
{
- out.addStr("Body\"");
if (row % 2)
{
- out.addStr(" class=\"markdownTableRowOdd\">\n");
+ out.addStr("<tr class=\"markdownTableRowOdd\">\n");
}
else
{
- out.addStr(" class=\"markdownTableRowEven\">\n");
+ out.addStr("<tr class=\"markdownTableRowEven\">\n");
}
}
else
{
- out.addStr("Head\">\n");
+ out.addStr(" <tr class=\"markdownTableHead\">\n");
}
for (int c = 0; c < columns; c++)
{
diff --git a/src/marshal.cpp b/src/marshal.cpp
index af14978..fa29aed 100644
--- a/src/marshal.cpp
+++ b/src/marshal.cpp
@@ -344,6 +344,14 @@ void marshalMemberLists(StorageIntf *s,SDict<MemberList> *mls)
}
}
+void marshalLocalToc(StorageIntf *s,const LocalToc &lt)
+{
+ marshalInt(s,lt.mask());
+ marshalInt(s,lt.htmlLevel());
+ marshalInt(s,lt.latexLevel());
+ marshalInt(s,lt.xmlLevel());
+}
+
void marshalEntry(StorageIntf *s,Entry *e)
{
marshalUInt(s,HEADER);
@@ -355,6 +363,7 @@ void marshalEntry(StorageIntf *s,Entry *e)
marshalUInt64(s,e->spec);
marshalInt(s,e->initLines);
marshalBool(s,e->stat);
+ marshalLocalToc(s,e->localToc);
marshalBool(s,e->explicitExternal);
marshalBool(s,e->proto);
marshalBool(s,e->subGrouping);
@@ -724,6 +733,28 @@ SDict<MemberList> *unmarshalMemberLists(StorageIntf *s)
return result;
}
+LocalToc unmarshalLocalToc(StorageIntf *s)
+{
+ LocalToc result;
+ int mask = unmarshalInt(s);
+ int htmlLevel = unmarshalInt(s);
+ int latexLevel = unmarshalInt(s);
+ int xmlLevel = unmarshalInt(s);
+ if ((mask & (1<<LocalToc::Html))!=0)
+ {
+ result.enableHtml(htmlLevel);
+ }
+ if ((mask & (1<<LocalToc::Latex))!=0)
+ {
+ result.enableLatex(latexLevel);
+ }
+ if ((mask & (1<<LocalToc::Xml))!=0)
+ {
+ result.enableXml(xmlLevel);
+ }
+ return result;
+}
+
Entry * unmarshalEntry(StorageIntf *s)
{
Entry *e = new Entry;
@@ -737,6 +768,7 @@ Entry * unmarshalEntry(StorageIntf *s)
e->spec = unmarshalUInt64(s);
e->initLines = unmarshalInt(s);
e->stat = unmarshalBool(s);
+ e->localToc = unmarshalLocalToc(s);
e->explicitExternal = unmarshalBool(s);
e->proto = unmarshalBool(s);
e->subGrouping = unmarshalBool(s);
diff --git a/src/pagedef.cpp b/src/pagedef.cpp
index b2b7dc8..d2c3f68 100644
--- a/src/pagedef.cpp
+++ b/src/pagedef.cpp
@@ -35,7 +35,7 @@ PageDef::PageDef(const char *f,int l,const char *n,
m_pageScope = 0;
m_nestingLevel = 0;
m_fileName = ::convertNameToFile(n,FALSE,TRUE);
- m_showToc = FALSE;
+ m_showLineNo = FALSE;
}
PageDef::~PageDef()
@@ -207,9 +207,9 @@ void PageDef::writeDocumentation(OutputList &ol)
ol.popGeneratorState();
//2.}
- if (m_showToc && hasSections())
+ if ((m_localToc.isHtmlEnabled() || m_localToc.isLatexEnabled()) && hasSections())
{
- writeToc(ol);
+ writeToc(ol, m_localToc);
}
writePageDocumentation(ol);
@@ -326,8 +326,17 @@ void PageDef::setNestingLevel(int l)
m_nestingLevel = l;
}
-void PageDef::setShowToc(bool b)
+void PageDef::setLocalToc(const LocalToc &lt)
{
- m_showToc |= b;
+ m_localToc = lt;
}
+void PageDef::setShowLineNo(bool b)
+{
+ m_showLineNo = b;
+}
+
+bool PageDef::showLineNo() const
+{
+ return m_showLineNo;
+}
diff --git a/src/pagedef.h b/src/pagedef.h
index 41b84cb..a0c3acb 100644
--- a/src/pagedef.h
+++ b/src/pagedef.h
@@ -34,7 +34,8 @@ class PageDef : public Definition
// setters
void setFileName(const char *name);
- void setShowToc(bool b);
+ void setLocalToc(const LocalToc &tl);
+ void setShowLineNo(bool);
// getters
DefType definitionType() const { return TypePage; }
@@ -59,10 +60,11 @@ class PageDef : public Definition
bool documentedPage() const;
bool hasSubPages() const;
bool hasParentPage() const;
- bool showToc() const { return m_showToc; }
+ LocalToc localToc() const { return m_localToc; }
void setPageScope(Definition *d){ m_pageScope = d; }
Definition *getPageScope() const { return m_pageScope; }
QCString displayName(bool=TRUE) const { return !m_title.isEmpty() ? m_title : Definition::name(); }
+ bool showLineNo() const;
void writeDocumentation(OutputList &ol);
void writeTagFile(FTextStream &);
@@ -75,7 +77,8 @@ class PageDef : public Definition
PageSDict *m_subPageDict; // list of pages in the group
Definition *m_pageScope;
int m_nestingLevel;
- bool m_showToc;
+ LocalToc m_localToc;
+ bool m_showLineNo;
};
class PageSDict : public SDict<PageDef>
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp
index ef5cbc2..7bf0b82 100644
--- a/src/perlmodgen.cpp
+++ b/src/perlmodgen.cpp
@@ -1254,6 +1254,7 @@ void PerlModDocVisitor::visitPre(DocParamSect *s)
err("unknown parameter section found\n");
break;
}
+ m_output.openHash();
openOther();
openSubBlock(type);
}
@@ -1262,6 +1263,7 @@ void PerlModDocVisitor::visitPost(DocParamSect *)
{
closeSubBlock();
closeOther();
+ m_output.closeHash();
}
void PerlModDocVisitor::visitPre(DocParamList *pl)
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/portable.cpp b/src/portable.cpp
index 4ad88a4..08691b2 100644
--- a/src/portable.cpp
+++ b/src/portable.cpp
@@ -22,10 +22,10 @@ extern char **environ;
#endif
#include "portable.h"
+#include "util.h"
#ifndef NODEBUG
#include "debug.h"
#endif
-//#include "doxygen.h"
static double g_sysElapsedTime;
static QTime g_time;
@@ -35,7 +35,12 @@ int portable_system(const char *command,const char *args,bool commandHasConsole)
if (command==0) return 1;
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ QCString commandCorrectedPath = substitute(command,'/','\\');
+ QCString fullCmd=commandCorrectedPath;
+#else
QCString fullCmd=command;
+#endif
fullCmd=fullCmd.stripWhiteSpace();
if (fullCmd.at(0)!='"' && fullCmd.find(' ')!=-1)
{
@@ -134,7 +139,7 @@ int portable_system(const char *command,const char *args,bool commandHasConsole)
// For that case COM is initialized as follows
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
- QString commandw = QString::fromUtf8( command );
+ QString commandw = QString::fromUtf8( commandCorrectedPath );
QString argsw = QString::fromUtf8( args );
// gswin32 is a GUI api which will pop up a window and run
@@ -458,18 +463,7 @@ void portable_correct_path(void)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
const char *p = portable_getenv("PATH");
- char *q = (char *)malloc(strlen(p) + 1);
- strcpy(q, p);
- bool found = false;
- for (int i = 0 ; i < strlen(q); i++)
- {
- if (q[i] == '/')
- {
- q[i] = '\\';
- found = true;
- }
- }
- if (found) portable_setenv("PATH",q);
- free(q);
+ QCString result = substitute(p,'/','\\');
+ if (result!=p) portable_setenv("PATH",result.data());
#endif
}
diff --git a/src/pre.l b/src/pre.l
index 37f7115..b6ebbf8 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -1739,7 +1739,9 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
%x SkipString
%x CopyLine
%x CopyString
+%x CopyStringCs
%x CopyStringFtn
+%x CopyStringFtnDouble
%x Include
%x IncludeID
%x EndImport
@@ -1849,9 +1851,21 @@ 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);
- BEGIN( CopyString );
+ if (getLanguageFromFileName(g_yyFileName)!=SrcLangExt_Fortran)
+ {
+ BEGIN( CopyString );
+ }
+ else
+ {
+ BEGIN( CopyStringFtnDouble );
+ }
}
<CopyLine>\' {
if (getLanguageFromFileName(g_yyFileName)!=SrcLangExt_Fortran) REJECT;
@@ -1859,17 +1873,30 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN( CopyStringFtn );
}
<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 );
+ }
+<CopyStringFtnDouble>[^\"\\\r\n]+ {
+ outputArray(yytext,(int)yyleng);
+ }
+<CopyStringFtnDouble>\\. {
+ outputArray(yytext,(int)yyleng);
+ }
+<CopyStringFtnDouble>\" {
outputChar(*yytext);
BEGIN( CopyLine );
}
<CopyStringFtn>[^\'\\\r\n]+ {
- outputArray(yytext,(int)yyleng);
+ outputArray(yytext,(int)yyleng);
}
<CopyStringFtn>\\. {
outputArray(yytext,(int)yyleng);
@@ -1934,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);
diff --git a/src/qhp.cpp b/src/qhp.cpp
index e7c8d10..6ce6b06 100644
--- a/src/qhp.cpp
+++ b/src/qhp.cpp
@@ -23,7 +23,7 @@
#include "doxygen.h"
#include "filedef.h"
-#include <qstringlist.h>
+#include <qcstringlist.h>
#include <string.h>
#include <qfile.h>
@@ -101,10 +101,10 @@ void Qhp::initialize()
{ "name", filterName, 0 };
m_doc.open("customFilter", tagAttributes);
- QStringList customFilterAttributes = QStringList::split(QChar(' '), Config_getString(QHP_CUST_FILTER_ATTRS));
+ QCStringList customFilterAttributes = QCStringList::split(' ', Config_getString(QHP_CUST_FILTER_ATTRS));
for (int i = 0; i < (int)customFilterAttributes.count(); i++)
{
- m_doc.openCloseContent("filterAttribute", customFilterAttributes[i].utf8());
+ m_doc.openCloseContent("filterAttribute", customFilterAttributes[i]);
}
m_doc.close("customFilter");
}
@@ -112,15 +112,15 @@ void Qhp::initialize()
m_doc.open("filterSection");
// Add section attributes
- QStringList sectionFilterAttributes = QStringList::split(QChar(' '),
+ QCStringList sectionFilterAttributes = QCStringList::split(' ',
Config_getString(QHP_SECT_FILTER_ATTRS));
- if (!sectionFilterAttributes.contains(QString("doxygen")))
+ if (!sectionFilterAttributes.contains("doxygen"))
{
sectionFilterAttributes << "doxygen";
}
for (int i = 0; i < (int)sectionFilterAttributes.count(); i++)
{
- m_doc.openCloseContent("filterAttribute", sectionFilterAttributes[i].utf8());
+ m_doc.openCloseContent("filterAttribute", sectionFilterAttributes[i]);
}
m_toc.open("toc");
diff --git a/src/reflist.cpp b/src/reflist.cpp
index 5a80b19..1da603e 100644
--- a/src/reflist.cpp
+++ b/src/reflist.cpp
@@ -164,12 +164,14 @@ void RefList::generatePage()
doc += " \\_internalref ";
doc += item->name;
doc += " \"";
- doc += item->title;
+ // escape \'s in title, see issue #5901
+ doc += substitute(item->title,"\\","\\\\");
doc += "\" ";
// write declaration in case a function with arguments
if (!item->args.isEmpty())
{
- doc += item->args;
+ // escape @'s in argument list, needed for Java annotations (see issue #6208)
+ doc += substitute(item->args,"@","@@");
}
doc += "</dt><dd> ";
doc += item->text;
diff --git a/src/scanner.l b/src/scanner.l
index 21b845f..4846132 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -149,6 +149,7 @@ static QCString *pCopyRawString;
static QGString *pCopyCurlyGString;
static QGString *pCopyRoundGString;
+static QGString *pCopySquareGString;
static QGString *pCopyQuotedGString;
static QGString *pCopyHereDocGString;
static QGString *pCopyRawGString;
@@ -734,6 +735,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
%x CopyRound
%x CopyCurly
%x GCopyRound
+%x GCopySquare
%x GCopyCurly
%x SkipUnionSwitch
%x Specialization
@@ -2838,6 +2840,14 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
current->initializer+=*yytext;
BEGIN(GCopyRound);
}
+<ReadInitializer>"[" {
+ if (!insidePHP) REJECT;
+ lastSquareContext=YY_START;
+ pCopySquareGString=&current->initializer;
+ squareCount=0;
+ current->initializer+=*yytext;
+ BEGIN(GCopySquare);
+ }
<ReadInitializer>"{" {
lastCurlyContext=YY_START;
pCopyCurlyGString=&current->initializer;
@@ -3180,6 +3190,56 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
*pCopyRoundGString+=*yytext;
}
+ /* generic square bracket list copy rules for growable strings, we should only enter here in case of php, left the test part as in GCopyRound to keep it compatible with te round bracket version */
+<GCopySquare>\" {
+ *pCopySquareGString+=*yytext;
+ pCopyQuotedGString=pCopySquareGString;
+ lastStringContext=YY_START;
+ BEGIN(CopyGString);
+ }
+<GCopySquare>"[" {
+ *pCopySquareGString+=*yytext;
+ squareCount++;
+ }
+<GCopySquare>"]" {
+ *pCopySquareGString+=*yytext;
+ if (--squareCount<0)
+ BEGIN(lastSquareContext);
+ }
+<GCopySquare>\n {
+ lineCount();
+ *pCopySquareGString+=*yytext;
+ }
+<GCopySquare>\' {
+ if (insidePHP)
+ {
+ current->initializer+=yytext;
+ pCopyQuotedGString = pCopySquareGString;
+ lastStringContext=YY_START;
+ BEGIN(CopyPHPGString);
+ }
+ else
+ {
+ *pCopySquareGString+=yytext;
+ }
+ }
+<GCopySquare>{CHARLIT} {
+ if (insidePHP)
+ {
+ REJECT;
+ }
+ else
+ {
+ *pCopySquareGString+=yytext;
+ }
+ }
+<GCopySquare>[^"\[\]\n/]+ {
+ *pCopySquareGString+=yytext;
+ }
+<GCopySquare>. {
+ *pCopySquareGString+=*yytext;
+ }
+
/* generic curly bracket list copy rules */
<CopyCurly>\" {
*pCopyCurlyString+=*yytext;
diff --git a/src/tagreader.cpp b/src/tagreader.cpp
index dfa8511..cf64a35 100644
--- a/src/tagreader.cpp
+++ b/src/tagreader.cpp
@@ -27,7 +27,7 @@
#include <qfileinfo.h>
#include <qlist.h>
#include <qstring.h>
-#include <qstringlist.h>
+#include <qcstringlist.h>
#include "entry.h"
#include "classdef.h"
@@ -105,7 +105,7 @@ class TagClassInfo
QList<BaseInfo> *bases;
QList<TagMemberInfo> members;
QList<QCString> *templateArguments;
- QStringList classList;
+ QCStringList classList;
Kind kind;
bool isObjC;
};
@@ -118,8 +118,8 @@ class TagNamespaceInfo
QCString name;
QCString filename;
QCString clangId;
- QStringList classList;
- QStringList namespaceList;
+ QCStringList classList;
+ QCStringList namespaceList;
TagAnchorInfoList docAnchors;
QList<TagMemberInfo> members;
};
@@ -133,7 +133,7 @@ class TagPackageInfo
QCString filename;
TagAnchorInfoList docAnchors;
QList<TagMemberInfo> members;
- QStringList classList;
+ QCStringList classList;
};
/** Container for include info that can be read from a tagfile */
@@ -157,8 +157,8 @@ class TagFileInfo
QCString filename;
TagAnchorInfoList docAnchors;
QList<TagMemberInfo> members;
- QStringList classList;
- QStringList namespaceList;
+ QCStringList classList;
+ QCStringList namespaceList;
QList<TagIncludeInfo> includes;
};
@@ -172,12 +172,12 @@ class TagGroupInfo
QCString filename;
TagAnchorInfoList docAnchors;
QList<TagMemberInfo> members;
- QStringList subgroupList;
- QStringList classList;
- QStringList namespaceList;
- QStringList fileList;
- QStringList pageList;
- QStringList dirList;
+ QCStringList subgroupList;
+ QCStringList classList;
+ QCStringList namespaceList;
+ QCStringList fileList;
+ QCStringList pageList;
+ QCStringList dirList;
};
/** Container for page specific info that can be read from a tagfile */
@@ -197,8 +197,8 @@ class TagDirInfo
QCString name;
QCString filename;
QCString path;
- QStringList subdirList;
- QStringList fileList;
+ QCStringList subdirList;
+ QCStringList fileList;
TagAnchorInfoList docAnchors;
};
@@ -1009,11 +1009,11 @@ void TagFileParser::dump()
{
msg("namespace `%s'\n",nd->name.data());
msg(" filename `%s'\n",nd->filename.data());
- QStringList::Iterator it;
+ QCStringList::Iterator it;
for ( it = nd->classList.begin();
it != nd->classList.end(); ++it )
{
- msg( " class: %s \n", (*it).latin1() );
+ msg( " class: %s \n", (*it).data() );
}
QListIterator<TagMemberInfo> mci(nd->members);
@@ -1034,16 +1034,16 @@ void TagFileParser::dump()
{
msg("file `%s'\n",fd->name.data());
msg(" filename `%s'\n",fd->filename.data());
- QStringList::Iterator it;
+ QCStringList::Iterator it;
for ( it = fd->namespaceList.begin();
it != fd->namespaceList.end(); ++it )
{
- msg( " namespace: %s \n", (*it).latin1() );
+ msg( " namespace: %s \n", (*it).data() );
}
for ( it = fd->classList.begin();
it != fd->classList.end(); ++it )
{
- msg( " class: %s \n", (*it).latin1() );
+ msg( " class: %s \n", (*it).data() );
}
QListIterator<TagMemberInfo> mci(fd->members);
@@ -1072,31 +1072,31 @@ void TagFileParser::dump()
{
msg("group `%s'\n",gd->name.data());
msg(" filename `%s'\n",gd->filename.data());
- QStringList::Iterator it;
+ QCStringList::Iterator it;
for ( it = gd->namespaceList.begin();
it != gd->namespaceList.end(); ++it )
{
- msg( " namespace: %s \n", (*it).latin1() );
+ msg( " namespace: %s \n", (*it).data() );
}
for ( it = gd->classList.begin();
it != gd->classList.end(); ++it )
{
- msg( " class: %s \n", (*it).latin1() );
+ msg( " class: %s \n", (*it).data() );
}
for ( it = gd->fileList.begin();
it != gd->fileList.end(); ++it )
{
- msg( " file: %s \n", (*it).latin1() );
+ msg( " file: %s \n", (*it).data() );
}
for ( it = gd->subgroupList.begin();
it != gd->subgroupList.end(); ++it )
{
- msg( " subgroup: %s \n", (*it).latin1() );
+ msg( " subgroup: %s \n", (*it).data() );
}
for ( it = gd->pageList.begin();
it != gd->pageList.end(); ++it )
{
- msg( " page: %s \n", (*it).latin1() );
+ msg( " page: %s \n", (*it).data() );
}
QListIterator<TagMemberInfo> mci(gd->members);
@@ -1126,16 +1126,16 @@ void TagFileParser::dump()
{
msg("dir `%s'\n",dd->name.data());
msg(" path `%s'\n",dd->path.data());
- QStringList::Iterator it;
+ QCStringList::Iterator it;
for ( it = dd->fileList.begin();
it != dd->fileList.end(); ++it )
{
- msg( " file: %s \n", (*it).latin1() );
+ msg( " file: %s \n", (*it).data() );
}
for ( it = dd->subdirList.begin();
it != dd->subdirList.end(); ++it )
{
- msg( " subdir: %s \n", (*it).latin1() );
+ msg( " subdir: %s \n", (*it).data() );
}
}
}
diff --git a/src/tclscanner.l b/src/tclscanner.l
index 56d2e3d..7ca5ade 100644
--- a/src/tclscanner.l
+++ b/src/tclscanner.l
@@ -25,7 +25,7 @@
#include <ctype.h>
#include <qstring.h>
-#include <qstringlist.h>
+#include <qcstringlist.h>
#include <qlist.h>
#include <qmap.h>
#include <qarray.h>
@@ -369,7 +369,7 @@ int Tcl_SplitList(
}
// END of tclUtil.c
-void tcl_split_list(QString &str, QStringList &list)
+void tcl_split_list(QCString &str, QCStringList &list)
{
int argc;
const char **argv;
@@ -383,17 +383,20 @@ void tcl_split_list(QString &str, QStringList &list)
{
str=str.mid(1,str.length()-2);
}
- if (Tcl_SplitList(str.ascii(),&argc,&argv) != TCL_OK)
+ if (!str.isEmpty())
{
- list.append(str);
- }
- else
- {
- for (int i = 0; i < argc; i++)
+ if (Tcl_SplitList(str,&argc,&argv) != TCL_OK)
{
- list.append(argv[i]);
+ list.append(str);
+ }
+ else
+ {
+ for (int i = 0; i < argc; i++)
+ {
+ list.append(argv[i]);
+ }
+ ckfree((char *) argv);
}
- ckfree((char *) argv);
}
}
@@ -409,7 +412,7 @@ typedef struct
Entry *entry_cl; // if set contain the current class
Entry *entry_scan; // current scan entry
Protection protection; // current protections state
- QStringList after; // option/value list (options: NULL comment keyword script)
+ QCStringList after; // option/value list (options: NULL comment keyword script)
} tcl_scan;
//* Structure containing all internal global variables.
@@ -446,7 +449,7 @@ static struct
Entry* entry_file; // entry of current file
Entry* entry_current; // currently used entry
Entry* entry_inside; // contain entry of current scan context
- QStringList list_commandwords; // list of command words
+ QCStringList list_commandwords; // list of command words
QList<tcl_scan> scan; // stack of scan contexts
QAsciiDict<Entry> ns; // all read namespace entries
QAsciiDict<Entry> cl; // all read class entries
@@ -602,7 +605,7 @@ Entry* tcl_entry_class(const QCString cl)
// @return 1 if keyword and 0 otherwise
static int tcl_keyword(QCString str)
{
- static QStringList myList;
+ static QCStringList myList;
static int myInit=1;
if (myInit)
{
@@ -639,7 +642,7 @@ static int tcl_keyword(QCString str)
myList <<"tkerror"<<"tkwait"<<"tk_bisque"<<"tk_focusNext"<<"tk_focusPrev"<<"tk_focusFollowsMouse"<<"tk_popup"<<"tk_setPalette"<<"tk_textCut"<<"tk_TextCopy"<<"tk_textPaste"<<"chooseColor"<<"tk_chooseColor"<<"tk_chooseDirectory"<<"tk_dialog"<<"tk_getOpenFile"<<"tkDialog"<<"tk_getSaveFile"<<"tk_messageBox";
myList <<"winfo"<<"wm";
myList <<"button"<<"canvas"<<"checkbutton"<<"entry"<<"frame"<<"image"<<"label"<<"labelframe"<<"listbox"<<"menu"<<"menubutton"<<"message"<<"panedwindow"<<"radiobutton"<<"scale"<<"scrollbar"<<"spinbox"<<"toplevel";
- myList.sort();
+ //myList.sort();
myInit=0;
}
str=str.stripWhiteSpace();
@@ -727,7 +730,7 @@ static void tcl_codify(const char *s,const char *str)
static void tcl_codify(const char *s,const QString &str)
{
if (tcl.code==NULL) return;
- tcl_codify(s,str.utf8());
+ tcl_codify(s,str);
}
//! Codify 'str' with special font class 's'.
@@ -740,7 +743,7 @@ static void tcl_codify(const char *s,const QCString &str)
static void tcl_codify_cmd(const char *s,int i)
{
- tcl_codify(s,(*tcl.list_commandwords.at(i)).utf8());
+ tcl_codify(s,(*tcl.list_commandwords.at(i)));
}
//! codify a string token
//
@@ -1193,7 +1196,7 @@ tcl_inf("line=%d\n",myScan->line1);
myStart=i;
break;
}
- tcl_codify(myScan->after[i].utf8(),myScan->after[i+1].utf8());
+ tcl_codify(myScan->after[i],myScan->after[i+1]);
}
yy_delete_buffer(myScan->buffer_state);
yy_pop_state();
@@ -1608,12 +1611,12 @@ tcl_inf("-> %s\n",(const char *)tcl.string_comment);
}
//! Parse given \c arglist .
-static void tcl_command_ARGLIST(QString &arglist)
+static void tcl_command_ARGLIST(QCString &arglist)
{
D
Argument *myArg;
- QStringList myArgs;
- QString myArglist="";
+ QCStringList myArgs;
+ QCString myArglist="";
if (!tcl.entry_current->argList)
{
@@ -1622,14 +1625,14 @@ D
tcl_split_list(arglist,myArgs);
for (uint i=0;i<myArgs.count();i++)
{
- QStringList myArgs1;
+ QCStringList myArgs1;
myArg=new Argument;
tcl_split_list(*myArgs.at(i),myArgs1);
if (myArgs1.count()==2)
{
- myArg->name= (*myArgs1.at(0)).utf8();
- myArg->defval= (*myArgs1.at(1)).utf8();
+ myArg->name= (*myArgs1.at(0));
+ myArg->defval= (*myArgs1.at(1));
if (myArg->defval.isEmpty())
{
myArg->defval = " ";
@@ -1638,13 +1641,13 @@ D
}
else
{
- myArg->name= (*myArgs.at(i)).utf8();
- myArglist += QString(myArg->name) + " ";
+ myArg->name= (*myArgs.at(i));
+ myArglist += myArg->name + " ";
}
tcl.entry_current->argList->append(myArg);
}
arglist = myArglist;
- tcl.entry_current->args = arglist.utf8();
+ tcl.entry_current->args = arglist;
}
//! Create link.
@@ -1763,7 +1766,7 @@ static void tcl_codify_link(QCString name)
//! scan general argument for brackets
//
-// parses (*tcl.list_commandwords.at(i)).utf8() and checks for brackets.
+// parses (*tcl.list_commandwords.at(i)) and checks for brackets.
// Starts a new scan context if needed (*myScan==0 and brackets found).
// Returns NULL or the created scan context.
//
@@ -1773,7 +1776,7 @@ static tcl_scan *tcl_command_ARG(tcl_scan *myScan, unsigned int i, bool ignoreOu
bool insideQuotes=false;
unsigned int insideBrackets=0;
unsigned int insideBraces=0;
- myName = (*tcl.list_commandwords.at(i)).utf8();
+ myName = (*tcl.list_commandwords.at(i));
if (i%2 != 0)
{
// handle white space
@@ -1861,7 +1864,7 @@ D
// Example: eval [list set] [list NotInvoked] [Invoked NotInvoked]
for (unsigned int i = 1; i < tcl.list_commandwords.count(); i++)
{
- myString += (*tcl.list_commandwords.at(i)).utf8();
+ myString += (*tcl.list_commandwords.at(i));
}
myScan = tcl_scan_start('?', myString,
myScan->ns, myScan->entry_cl, myScan->entry_fn);
@@ -1882,7 +1885,7 @@ D
unsigned int lastOptionIndex = 0;
for (i = 2; i<tcl.list_commandwords.count(); i += 2)
{
- token = (*tcl.list_commandwords.at(i)).utf8();
+ token = (*tcl.list_commandwords.at(i));
if (token == "--")
{
lastOptionIndex = i;
@@ -1913,7 +1916,7 @@ D
int size;
const char *elem;
const char *next;
- token = (*tcl.list_commandwords.at(lastOptionIndex + 4)).utf8();
+ token = (*tcl.list_commandwords.at(lastOptionIndex + 4));
if (token[0] == '{')
{
inBraces = true;
@@ -1966,15 +1969,15 @@ D
//printf("detected: switch ?options? string pattern body ?pattern body ...?\n");
myScan = tcl_command_ARG(myScan, lastOptionIndex + 1, false);
myScan = tcl_command_ARG(myScan, lastOptionIndex + 2, false);
- //printf("value=%s\n",(const char*) (*tcl.list_commandwords.at(lastOptionIndex + 2)).utf8());
+ //printf("value=%s\n",(const char*) (*tcl.list_commandwords.at(lastOptionIndex + 2)));
for (i = lastOptionIndex + 3; i < tcl.list_commandwords.count(); i += 4)
{
myScan = tcl_command_ARG(myScan, i + 0, false); // whitespace
myScan = tcl_command_ARG(myScan, i + 1, false); // pattern
myScan = tcl_command_ARG(myScan, i + 2, false); // whitespace
- myScan = tcl_codify_token(myScan, "script", (*tcl.list_commandwords.at(i+3)).utf8()); // script
- //printf("pattern=%s\n",(const char*) (*tcl.list_commandwords.at(i+1)).utf8());
- //printf("script=%s\n",(const char*) (*tcl.list_commandwords.at(i+3)).utf8());
+ myScan = tcl_codify_token(myScan, "script", (*tcl.list_commandwords.at(i+3))); // script
+ //printf("pattern=%s\n",(const char*) (*tcl.list_commandwords.at(i+1))));
+ //printf("script=%s\n",(const char*) (*tcl.list_commandwords.at(i+3)));
}
}
else
@@ -2007,7 +2010,7 @@ D
//! Handle internal tcl commands.
// "if expr1 ?then? body1 elseif expr2 ?then? body2 elseif ... ?else? ?bodyN?"
-static void tcl_command_IF(QStringList type)
+static void tcl_command_IF(QCStringList type)
{
D
tcl_codify_cmd("keyword",0);
@@ -2126,7 +2129,7 @@ D
tcl_codify_cmd(NULL,3);
tcl_codify_cmd(NULL,4);
tcl_codify_cmd(NULL,5);
- tcl_name_SnippetAware(myScan->ns,(*tcl.list_commandwords.at(2)).utf8(),myNs,myName);
+ tcl_name_SnippetAware(myScan->ns,(*tcl.list_commandwords.at(2)),myNs,myName);
if (myNs.length())
{
myEntryNs = tcl_entry_namespace(myNs);
@@ -2165,7 +2168,7 @@ D
tcl_codify_cmd(NULL,3);
tcl_codify_cmd(NULL,4);
tcl_codify_cmd(NULL,5);
- tcl_name(myScan->ns,(*tcl.list_commandwords.at(2)).utf8(),myNs,myName);
+ tcl_name(myScan->ns,(*tcl.list_commandwords.at(2)),myNs,myName);
if (myNs.length())
{
myEntryCl = tcl_entry_class(myNs);
@@ -2205,7 +2208,7 @@ D
tcl_codify_cmd(NULL,1);
tcl_codify_cmd(NULL,2);
tcl_codify_cmd(NULL,3);
- tcl_name(myScan->ns,(*tcl.list_commandwords.at(0)).utf8(),myNs,myName);
+ tcl_name(myScan->ns,(*tcl.list_commandwords.at(0)),myNs,myName);
if (myNs.length())
{
myEntryCl = tcl_entry_class(myNs);
@@ -2240,7 +2243,7 @@ D
tcl_codify_cmd("keyword",0);
tcl_codify_cmd(NULL,1);
- tcl_name(myScan->ns,(*tcl.list_commandwords.at(0)).utf8(),myNs,myName);
+ tcl_name(myScan->ns,(*tcl.list_commandwords.at(0)),myNs,myName);
if (myNs.length())
{
myEntryCl = tcl_entry_class(myNs);
@@ -2278,7 +2281,7 @@ D
tcl_codify_cmd(NULL,3);
tcl_codify_cmd(NULL,4);
tcl_codify_cmd(NULL,5);
- tcl_name(myScan->ns,(*tcl.list_commandwords.at(4)).utf8(),myNs,myName);
+ tcl_name(myScan->ns,(*tcl.list_commandwords.at(4)),myNs,myName);
if (myNs.length())
{
myName = myNs+"::"+myName;
@@ -2291,12 +2294,12 @@ D
tcl.entry_main->addSubEntry(tcl.entry_current);
tcl.ns.insert(myName,tcl.entry_current);
//myEntryNs = tcl.entry_current;
- myStr = (*tcl.list_commandwords.at(6)).utf8();
+ myStr = (*tcl.list_commandwords.at(6));
if (tcl.list_commandwords.count() > 7)
{
for (uint i=7;i<tcl.list_commandwords.count();i++)
{
- myStr.append((*tcl.list_commandwords.at(i)).utf8());
+ myStr.append((*tcl.list_commandwords.at(i)));
}
tcl.word_is=' ';
}
@@ -2315,7 +2318,7 @@ D
tcl_codify_cmd(NULL,1);
tcl_codify_cmd("NULL",2);
tcl_codify_cmd("NULL",3);
- tcl_name(myScan->ns,(*tcl.list_commandwords.at(2)).utf8(),myNs,myName);
+ tcl_name(myScan->ns,(*tcl.list_commandwords.at(2)),myNs,myName);
if (myNs.length())
{
myName = myNs+"::"+myName;
@@ -2347,7 +2350,7 @@ D
tcl_codify_cmd("NULL",3);
tcl_codify_cmd("NULL",4);
tcl_codify_cmd("NULL",5);
- tcl_name(myScan->ns,(*tcl.list_commandwords.at(4)).utf8(),myNs,myName);
+ tcl_name(myScan->ns,(*tcl.list_commandwords.at(4)),myNs,myName);
if (myNs.length())
{
myName = myNs+"::"+myName;
@@ -2377,13 +2380,13 @@ D
tcl_codify_cmd(NULL,1);
tcl_codify_cmd("NULL",2);
tcl_codify_cmd("NULL",3);
- tcl_name(myScan->ns,(*tcl.list_commandwords.at(2)).utf8(),myNs,myName);
+ tcl_name(myScan->ns,(*tcl.list_commandwords.at(2)),myNs,myName);
if (myNs.length())
{
myName = myNs+"::"+myName;
}
myEntryCl = tcl_entry_class(myName);
- myStr = (*tcl.list_commandwords.at(4)).utf8();
+ myStr = (*tcl.list_commandwords.at(4));
//
// special cases first
// oo::define classname method methodname args script
@@ -2400,7 +2403,7 @@ D
}
Entry *myEntry;
QCString myMethod;
- tcl_name(myScan->ns,(*tcl.list_commandwords.at(n==11?6:4)).utf8(),myNs,myMethod);
+ tcl_name(myScan->ns,(*tcl.list_commandwords.at(n==11?6:4)),myNs,myMethod);
// code snippet taken from tcl_command_METHOD()/tcl_command_CONSTRUCTOR
tcl.fn.remove(myMethod);
tcl.entry_current->section = Entry::FUNCTION_SEC;
@@ -2434,7 +2437,7 @@ D
{
for (uint i=5;i<tcl.list_commandwords.count();i++)
{
- myStr.append((*tcl.list_commandwords.at(i)).utf8());
+ myStr.append((*tcl.list_commandwords.at(i)));
}
tcl.word_is=' ';
}
@@ -2455,7 +2458,7 @@ D
{
tcl_codify_cmd(NULL,i);
}
- tcl_name(myScan->ns,(*tcl.list_commandwords.at(2)).utf8(),myNs,myName);
+ tcl_name(myScan->ns,(*tcl.list_commandwords.at(2)),myNs,myName);
if (myNs.length())
{// qualified variables go into namespace
myEntry = tcl_entry_namespace(myNs);
@@ -2535,7 +2538,7 @@ tcl_inf("->\n");
yy_pop_state();
// check command
- QCString myStr = (*tcl.list_commandwords.at(0)).utf8();
+ QCString myStr = (*tcl.list_commandwords.at(0));
tcl_scan *myScanBackup=tcl.scan.at(0);
int myLevel = 0;
Protection myProt = tcl.protection;
@@ -2580,7 +2583,7 @@ tcl_inf("->\n");
myProt = tcl.protection;
goto command_end;
}
- myStr = (*tcl.list_commandwords.at(0)).utf8();
+ myStr = (*tcl.list_commandwords.at(0));
// remove leading "::" and apply TCL_SUBST
if (myStr.left(2)=="::") myStr = myStr.mid(2);
if (tcl.config_subst.contains(myStr))
@@ -2624,7 +2627,7 @@ tcl_inf("->\n");
}
if (myStr=="namespace")
{
- if ((*tcl.list_commandwords.at(2)).utf8()=="eval")
+ if ((*tcl.list_commandwords.at(2))=="eval")
{
if (tcl.list_commandwords.count() < 7) {myLine=__LINE__;goto command_warn;}
tcl_command_NAMESPACE();
@@ -2647,7 +2650,7 @@ tcl_inf("->\n");
}
if (myStr=="oo::class")
{
- if ((*tcl.list_commandwords.at(2)).utf8()=="create")
+ if ((*tcl.list_commandwords.at(2))=="create")
{
if (tcl.list_commandwords.count() != 7) {myLine=__LINE__;goto command_warn;}
tcl_command_OO_CLASS();
@@ -2687,7 +2690,7 @@ tcl_inf("->\n");
{
for (unsigned int i = 2; i < tcl.list_commandwords.count(); i = i + 2)
{
- tcl.scan.at(0)->entry_cl->extends->append(new BaseInfo((*tcl.list_commandwords.at(i)).utf8(),Public,Normal));
+ tcl.scan.at(0)->entry_cl->extends->append(new BaseInfo((*tcl.list_commandwords.at(i)),Public,Normal));
}
}
goto command_end;
@@ -2731,12 +2734,12 @@ if expr1 ?then? body1 elseif expr2 ?then? body2 elseif ... ?else? ?bodyN?
*/
if (myStr=="if" && tcl.list_commandwords.count() > 4)
{
- QStringList myType;
+ QCStringList myType;
myType << "keyword" << "NULL" << "expr" << "NULL";
char myState='x';// last word: e'x'pr 't'hen 'b'ody 'e'lse else'i'f..
for (unsigned int i = 4; i < tcl.list_commandwords.count(); i = i + 2)
{
- QCString myStr=(*tcl.list_commandwords.at(i)).utf8();
+ QCString myStr=(*tcl.list_commandwords.at(i));
if (myState=='x')
{
if (myStr=="then")
@@ -2797,7 +2800,7 @@ if expr1 ?then? body1 elseif expr2 ?then? body2 elseif ... ?else? ?bodyN?
tcl_command_OTHER();
goto command_end;
command_warn:// print warning message because of wrong used syntax
- tcl_war("%d count=%d: %s\n",myLine,tcl.list_commandwords.count(),tcl.list_commandwords.join(" ").ascii());
+ tcl_war("%d count=%d: %s\n",myLine,tcl.list_commandwords.count(),tcl.list_commandwords.join(" ").data());
tcl_command_OTHER();
command_end:// add remaining text to current context
if (!myText.isEmpty())
diff --git a/src/textdocvisitor.cpp b/src/textdocvisitor.cpp
index 8c8ecad..c899232 100644
--- a/src/textdocvisitor.cpp
+++ b/src/textdocvisitor.cpp
@@ -50,11 +50,6 @@ void TextDocVisitor::filter(const char *str)
switch(c)
{
case '\n': m_t << " "; break;
- case '"': m_t << "&quot;"; break;
- case '\'': m_t << "&#39;"; break;
- case '<': m_t << "&lt;"; break;
- case '>': m_t << "&gt;"; break;
- case '&': m_t << "&amp;"; break;
default: m_t << c;
}
}
diff --git a/src/translator_hu.h b/src/translator_hu.h
index 17f0d44..44363c9 100644
--- a/src/translator_hu.h
+++ b/src/translator_hu.h
@@ -13,21 +13,46 @@
*
*/
- /*
- * Original Hungarian translation by
- * György Földvári <foldvari@diatronltd.com>
- *
- * Extended, revised and updated by
- * Ákos Kiss <akiss@users.sourceforge.net>
- *
- * Further extended, revised and updated by
- * Tamási Ferenc <tf551@hszk.bme.hu>
- */
+/*
+ * Original Hungarian translation by
+ * György Földvári <foldvari@diatronltd.com>
+ *
+ * Extended, revised and updated by
+ * Ákos Kiss <akiss@users.sourceforge.net>
+ *
+ * Further extended, revised and updated by
+ * Ferenc Tamási <tf551@hszk.bme.hu>
+ *
+ * Further extended, since 1.4.6 to 1.8.4
+ * László Kmety <silverkml@gmail.com>
+ */
#ifndef TRANSLATOR_HU_H
#define TRANSLATOR_HU_H
-class TranslatorHungarian : public TranslatorAdapter_1_4_6
+/*!
+ When defining a translator class for the new language, follow
+ the description in the documentation. One of the steps says
+ that you should copy the translator_en.h (this) file to your
+ translator_xx.h new file. Your new language should use the
+ Translator class as the base class. This means that you need to
+ implement exactly the same (pure virtual) methods as the
+ TranslatorEnglish does. Because of this, it is a good idea to
+ start with the copy of TranslatorEnglish and replace the strings
+ one by one.
+
+ It is not necessary to include "translator.h" or
+ "translator_adapter.h" here. The files are included in the
+ language.cpp correctly. Not including any of the mentioned
+ files frees the maintainer from thinking about whether the
+ first, the second, or both files should be included or not, and
+ why. This holds namely for localized translators because their
+ base class is changed occasionally to adapter classes when the
+ Translator class changes the interface, or back to the
+ Translator class (by the local maintainer) when the localized
+ translator is made up-to-date again.
+*/
+class TranslatorHungarian : public TranslatorAdapter_1_8_15
{
private:
const char * zed(char c)
@@ -45,12 +70,29 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
public:
// --- Language control methods -------------------
+
+ /*! Used for identification of the language. The identification
+ * should not be translated. It should be replaced by the name
+ * of the language in English using lower-case characters only
+ * (e.g. "czech", "japanese", "russian", etc.). It should be equal to
+ * the identification used in language.cpp.
+ */
virtual QCString idLanguage()
{ return "hungarian"; }
- /*! Used to get the command(s) for the language support. This method
- * was designed for languages which do not prefer babel package.
- * If this methods returns empty string, then the latexBabelPackage()
- * method is used to generate the command for using the babel package.
+
+ /*! Used to get the LaTeX command(s) for the language support.
+ * This method should return string with commands that switch
+ * LaTeX to the desired language. For example
+ * <pre>"\\usepackage[german]{babel}\n"
+ * </pre>
+ * or
+ * <pre>"\\usepackage{polski}\n"
+ * "\\usepackage[latin2]{inputenc}\n"
+ * "\\usepackage[T1]{fontenc}\n"
+ * </pre>
+ *
+ * The English LaTeX does not use such commands. Because of this
+ * the empty string is returned in this implementation.
*/
virtual QCString latexLanguageSupportCommand()
{
@@ -117,6 +159,9 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
virtual QCString trIncludingInheritedMembers()
{ return " osztály tagjainak teljes listája, az örökölt tagokkal együtt."; }
+ /*! this is put at the author sections at the bottom of man pages.
+ * parameter s is name of the project name.
+ */
virtual QCString trGeneratedAutomatically(const char *s)
{ QCString result="Ezt a dokumentációt a Doxygen készítette ";
if (s) result+=(QCString)" a" + zed(s[0])+s+(QCString)" projekthez";
@@ -243,7 +288,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
}
if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
- result+="struktúra- és úniómező";
+ result+="struktúra- és uniómező";
}
else
{
@@ -254,7 +299,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
{
if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
- result+="a megfelelő struktúra-/úniódokumentációra minden mezőnél:";
+ result+="a megfelelő struktúra/unió dokumentációra minden mezőnél:";
}
else
{
@@ -265,7 +310,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
{
if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
- result+="a struktúrákra/úniókra, amikhez tartoznak:";
+ result+="a struktúrákra/uniókra, amikhez tartoznak:";
}
else
{
@@ -575,8 +620,8 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
case ClassDef::Struct: result+=" struktúra"; break;
case ClassDef::Union: result+=" unió"; break;
case ClassDef::Interface: result+=" interfész"; break;
- case ClassDef::Protocol: result+=" protocol"; break; // translate me!
- case ClassDef::Category: result+=" category"; break; // translate me!
+ case ClassDef::Protocol: result+=" protokoll"; break;
+ case ClassDef::Category: result+=" kategória"; break;
case ClassDef::Exception: result+=" kivétel"; break;
default: break;
}
@@ -726,8 +771,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
*/
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
bool single)
- { // here s is one of " Class", " Struct" or " Union"
- // single is true implies a single file
+ { // single is true implies a single file
QCString result=(QCString)"Ez a dokumentáció ";
switch(compType)
{
@@ -735,8 +779,8 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
case ClassDef::Struct: result+="a struktúráról"; break;
case ClassDef::Union: result+="az unióról"; break;
case ClassDef::Interface: result+="az interfészről"; break;
- case ClassDef::Protocol: result+="protocol"; break; // translate me!
- case ClassDef::Category: result+="category"; break; // translate me!
+ case ClassDef::Protocol: result+="a protokollról"; break;
+ case ClassDef::Category: result+="a kategóriáról"; break;
case ClassDef::Exception: result+="a kivételről"; break;
default: break;
}
@@ -960,7 +1004,9 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
{
return "Jelmagyarázat";
}
- /*! page explaining how the dot graph's should be interpreted */
+ /*! page explaining how the dot graph's should be interpreted
+ * The %A in the text below are to prevent link to classes called "A".
+ */
virtual QCString trLegendDocs()
{
return
@@ -995,29 +1041,31 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
" Used *m_usedClass;\n"
"};\n"
"\\endcode\n"
- "Ha a konfigurációs fájl \\c MAX_DOT_GRAPH_HEIGHT elemének értékét "
- "240-re állítjuk, az eredmény a következő ábra lesz:"
- "<p><center><img src=\"graph_legend."+getDotImageExtension()+"\"></center>\n"
+ "Az eredmény a következő ábra lesz:"
+ "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n"
"<p>\n"
- "Az ábrán levő dobozok jelentése:\n"
+ "A fenti ábrán levő dobozok jelentése a következő:\n"
"<ul>\n"
"<li>Kitöltött fekete doboz jelzi azt az osztályt vagy struktúrát,"
- "amelyről az ábra szól.\n"
- "<li>Fekete keret jelzi a dokumentált osztályokat és struktúrákat.\n"
- "<li>Szürke keret jelzi a nem dokumentált osztályokat és struktúrákat.\n"
+ "amelyről az ábra szól.</li>\n"
+ "<li>Fekete keret jelzi a dokumentált osztályokat és struktúrákat.</li>\n"
+ "<li>Szürke keret jelzi a nem dokumentált osztályokat és struktúrákat.</li>\n"
"<li>Piros keret jelzi azokat az osztályokat és struktúrákat, amelyeknél vágás miatt nem látható "
"az összes leszármaztatási kapcsolat. Egy ábra vágásra kerül, ha nem fér bele "
- "a megadott tartományba."
+ "a megadott tartományba.</li>\n"
"</ul>\n"
- "A nyilak jelentése:\n"
+ "<p>\n"
+ "A nyilak jelentése a következő:\n"
+ "</p>\n"
"<ul>\n"
- "<li>Sötétkék nyíl jelzi a publikus származtatást.\n"
- "<li>Sötétzöld nyíl jelzi a védett származtatást.\n"
- "<li>Sötétvörös nyíl jelzi a privát származtatást.\n"
+ "<li>Sötétkék nyíl jelzi a publikus származtatás "
+ "kapcsolatát két osztály között.</li>\n"
+ "<li>Sötétzöld nyíl jelzi a védett származtatást.</li>\n"
+ "<li>Sötétvörös nyíl jelzi a privát származtatást.</li>\n"
"<li>Lila szaggatott nyíl jelzi, ha az osztály egy másikat használ vagy tartalmaz. "
- "A nyíl felirata jelzi a változó(k) nevét, amelyeken keresztül a másik osztály kapcsolódik.\n"
+ "A nyíl felirata jelzi a változó(k) nevét, amelyeken keresztül a másik osztály kapcsolódik.</li>\n"
"<li>Sárga szaggatott nyíl jelzi a kapcsolatot a sablonpéldány és a példányosított "
- "osztálysablon között. A nyíl felirata jelzi a pélány sablonparamétereit.\n"
+ "osztálysablon között. A nyíl felirata jelzi a pélány sablonparamétereit.</li>\n"
"</ul>\n";
}
@@ -1086,7 +1134,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
/*! The description of the package index page */
virtual QCString trPackageListDescription()
{
- return "A csomagok rövid leírásai (amennyiben léteznek):";
+ return "A csomagok rövid leírásai (ha léteznek):";
}
/*! The link name in the Quick links header for each page */
virtual QCString trPackages()
@@ -1167,10 +1215,10 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trClass(bool first_capital, bool /*singular*/)
+ virtual QCString trClass(bool first_capital, bool singular)
{
QCString result((first_capital ? "Osztály" : "osztály"));
- //if (!singular) result+="es";
+ //if (!singular) result+="ok";
return result;
}
@@ -1178,10 +1226,10 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trFile(bool first_capital, bool /*singular*/)
+ virtual QCString trFile(bool first_capital, bool singular)
{
QCString result((first_capital ? "Fájl" : "fájl"));
- //if (!singular) result+="s";
+ if (!singular) result+="ok";
return result;
}
@@ -1189,10 +1237,11 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trNamespace(bool first_capital, bool /*singular*/)
+ virtual QCString trNamespace(bool first_capital, bool singular)
{
- QCString result((first_capital ? "Névtér" : "névtér"));
- //if (!singular) result+="s";
+ QCString result("");
+ if (!singular) result+=first_capital ? "Névterek" : "névterek";
+ else result+=first_capital ? "Névtér" : "névtér";
return result;
}
@@ -1200,10 +1249,10 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trGroup(bool first_capital, bool /*singular*/)
+ virtual QCString trGroup(bool first_capital, bool singular)
{
- QCString result((first_capital ? "Csoport" : "csoport"));
- //if (!singular) result+="s";
+ QCString result((first_capital ? "Modul" : "modul"));
+ if (!singular) result+="ok";
return result;
}
@@ -1211,10 +1260,10 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trPage(bool first_capital, bool /*singular*/)
+ virtual QCString trPage(bool first_capital, bool singular)
{
QCString result((first_capital ? "Oldal" : "oldal"));
- //if (!singular) result+="s";
+ if (!singular) result+="ak";
return result;
}
@@ -1222,10 +1271,10 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trMember(bool first_capital, bool /*singular*/)
+ virtual QCString trMember(bool first_capital, bool singular)
{
QCString result((first_capital ? "Tag" : "tag"));
- //if (!singular) result+="s";
+ if (!singular) result+="ok";
return result;
}
@@ -1233,10 +1282,10 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trGlobal(bool first_capital, bool /*singular*/)
+ virtual QCString trGlobal(bool first_capital, bool singular)
{
QCString result((first_capital ? "Globális elem" : "globális elem"));
- //if (!singular) result+="s";
+ if (!singular) result+="ek";
return result;
}
@@ -1490,9 +1539,490 @@ class TranslatorHungarian : public TranslatorAdapter_1_4_6
*/
virtual QCString trOverloadText()
{
- return "Ez egy túlterhelt tagfüggvény."
- "A fenti függvénytől csak argumentumaiban különbözik.";
+ return "Ez egy túlterhelt tagfüggvény, "
+ "a kényelem érdekében. A fenti függvénytől csak abban különbözik, "
+ "hogy milyen argumentumokat fogad el.";
+ }
+
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.4.6
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This is used to introduce a caller (or called-by) graph */
+ virtual QCString trCallerGraph()
+ {
+ return "A függvény hívó gráfja:";
+ }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for enumeration values
+ */
+ virtual QCString trEnumerationValueDocumentation()
+ { return "Enumerációs-érték dokumentáció"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.5.4 (mainly for Fortran)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! header that is put before the list of member subprograms (Fortran). */
+ virtual QCString trMemberFunctionDocumentationFortran()
+ { return "Tagfüggvény/Alprogram dokumentáció"; }
+
+ /*! This is put above each page as a link to the list of annotated data types (Fortran). */
+ virtual QCString trCompoundListFortran()
+ { return "Adattípusok listája"; }
+
+ /*! This is put above each page as a link to all members of compounds (Fortran). */
+ virtual QCString trCompoundMembersFortran()
+ { return "Adatmezők"; }
+
+ /*! This is an introduction to the annotated compound list (Fortran). */
+ virtual QCString trCompoundListDescriptionFortran()
+ { return "Rövid leírással ellátott adattípusok:"; }
+
+ /*! This is an introduction to the page with all data types (Fortran). */
+ virtual QCString trCompoundMembersDescriptionFortran(bool extractAll)
+ {
+ QCString result="Az összes ";
+ if (!extractAll)
+ {
+ result+="dokumentált ";
+ }
+ result+="adattípusú tagváltozó";
+ result+=" hivatkozásokkal ellátva ";
+ if (!extractAll)
+ {
+ result+="az egyes adattagok adatszerkezetének dokumentációjára";
+ }
+ else
+ {
+ result+="azokhoz az adattípusokhoz, amelyekhez tartoznak:";
+ }
+ return result;
+ }
+ /*! This is used in LaTeX as the title of the chapter with the
+ * annotated compound index (Fortran).
+ */
+ virtual QCString trCompoundIndexFortran()
+ { return "Adattípus index"; }
+
+ /*! This is used in LaTeX as the title of the chapter containing
+ * the documentation of all data types (Fortran).
+ */
+ virtual QCString trTypeDocumentation()
+ { return "Adattípus dokumentáció"; }
+ /*! This is used in the documentation of a file as a header before the
+ * list of (global) subprograms (Fortran).
+ */
+ virtual QCString trSubprograms()
+ { return "Függvények/Alprogramok"; }
+
+ /*! This is used in the documentation of a file/namespace before the list
+ * of documentation blocks for subprograms (Fortran)
+ */
+ virtual QCString trSubprogramDocumentation()
+ { return "Függvény/Alprogram dokumentáció"; }
+
+ /*! This is used in the documentation of a file/namespace/group before
+ * the list of links to documented compounds (Fortran)
+ */
+ virtual QCString trDataTypes()
+ { return "Adattípusok"; }
+
+ /*! used as the title of page containing all the index of all modules (Fortran). */
+ virtual QCString trModulesList()
+ { return "Modulok listája"; }
+
+ /*! used as an introduction to the modules list (Fortran) */
+ virtual QCString trModulesListDescription(bool extractAll)
+ {
+ QCString result="Az összes ";
+ if (!extractAll) result+="dokumentált ";
+ result+="rövid leírással ellátott modul:";
+ return result;
+ }
+
+ /*! used as the title of the HTML page of a module/type (Fortran) */
+ virtual QCString trCompoundReferenceFortran(const char *clName,
+ ClassDef::CompoundType compType,
+ bool isTemplate)
+ {
+ QCString result=(QCString)clName;
+ switch(compType)
+ {
+ case ClassDef::Class: result+=" modul"; break;
+ case ClassDef::Struct: result+=" típus"; break;
+ case ClassDef::Union: result+=" unió"; break;
+ case ClassDef::Interface: result+=" interfész"; break;
+ case ClassDef::Protocol: result+=" protokoll"; break;
+ case ClassDef::Category: result+=" kategória"; break;
+ case ClassDef::Exception: result+=" kivétel"; break;
+ default: break;
+ }
+ if (isTemplate) result+=" sablon";
+ result+=" hivatkozás";
+ return result;
+ }
+ /*! used as the title of the HTML page of a module (Fortran) */
+ virtual QCString trModuleReference(const char *namespaceName)
+ {
+ QCString result=namespaceName;
+ result+=" modul hivatkozás";
+ return result;
+ }
+
+ /*! This is put above each page as a link to all members of modules. (Fortran) */
+ virtual QCString trModulesMembers()
+ { return "Modul adattagok"; }
+
+ /*! This is an introduction to the page with all modules members (Fortran) */
+ virtual QCString trModulesMemberDescription(bool extractAll)
+ {
+ QCString result="Az összes ";
+ if (!extractAll) result+="dokumentált ";
+ result+="modul adattagja hivatkozásokkal ellátva ";
+ if (extractAll)
+ {
+ result+="az egyes adattagok moduljainak dokumentációjára:";
+ }
+ else
+ {
+ result+="azokhoz a modulokhoz, amelyekhez tartoznak:";
+ }
+ return result;
+ }
+
+ /*! This is used in LaTeX as the title of the chapter with the
+ * index of all modules (Fortran).
+ */
+ virtual QCString trModulesIndex()
+ { return "Modulok indexe"; }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trModule(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Modul" : "modul"));
+ if (!singular) result+="s";
+ return result;
+ }
+
+ /*! This is put at the bottom of a module documentation page and is
+ * followed by a list of files that were used to generate the page.
+ */
+ virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType,
+ bool single)
+ {
+ // single is true implies a single file
+ QCString result=(QCString)"Ez a dokumentáció ";
+ switch(compType)
+ {
+ case ClassDef::Class: result+="a modulról"; break;
+ case ClassDef::Struct: result+="a típusról"; break;
+ case ClassDef::Union: result+="az unióról"; break;
+ case ClassDef::Interface: result+="az interfészról"; break;
+ case ClassDef::Protocol: result+="a protokollról"; break;
+ case ClassDef::Category: result+="a kategóriáról"; break;
+ case ClassDef::Exception: result+="a kivételről"; break;
+ default: break;
+ }
+ result+=" a következő fájl";
+ if (!single) result+="ok";
+ result+=" alapján készült:";
+ return result;
+ }
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trType(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Típus" : "típus"));
+ if (!singular) result+="ok";
+ return result;
}
+
+ /*! This is used for translation of the word that will possibly
+ * be followed by a single name or by a list of names
+ * of the category.
+ */
+ virtual QCString trSubprogram(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Alprogram" : "alprogram"));
+ if (!singular) result+="ok";
+ return result;
+ }
+
+ /*! C# Type Constraint list */
+ virtual QCString trTypeConstraints()
+ {
+ return "Típuskorlátozások";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.6.0 (mainly for the new search engine)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! directory relation for \a name */
+ virtual QCString trDirRelation(const char *name)
+ {
+ return QCString(name)+" kapcsolat";
+ }
+
+ /*! Loading message shown when loading search results */
+ virtual QCString trLoading()
+ {
+ return "Betöltés...";
+ }
+
+ /*! Label used for search results in the global namespace */
+ virtual QCString trGlobalNamespace()
+ {
+ return "Globális névtér";
+ }
+
+ /*! Message shown while searching */
+ virtual QCString trSearching()
+ {
+ return "Keresés...";
+ }
+
+ /*! Text shown when no search results are found */
+ virtual QCString trNoMatches()
+ {
+ return "Nincs egyezés";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.6.3 (missing items for the directory pages)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! when clicking a directory dependency label, a page with a
+ * table is shown. The heading for the first column mentions the
+ * source file that has a relation to another file.
+ */
+ virtual QCString trFileIn(const char *name)
+ {
+ return (QCString)"Fájl a(z) "+name+" könyvtárban";
+ }
+
+ /*! when clicking a directory dependency label, a page with a
+ * table is shown. The heading for the second column mentions the
+ * destination file that is included.
+ */
+ virtual QCString trIncludesFileIn(const char *name)
+ {
+ return (QCString)"Tartalmazott fájl a(z) "+name+" könyvtárban";
+ }
+
+ /** Compiles a date string.
+ * @param year Year in 4 digits
+ * @param month Month of the year: 1=January
+ * @param day Day of the Month: 1..31
+ * @param dayOfWeek Day of the week: 1=Monday..7=Sunday
+ * @param hour Hour of the day: 0..23
+ * @param minutes Minutes in the hour: 0..59
+ * @param seconds Seconds within the minute: 0..59
+ * @param includeTime Include time in the result string?
+ */
+ virtual QCString trDateTime(int year,int month,int day,int dayOfWeek,
+ int hour,int minutes,int seconds,
+ bool includeTime)
+ {
+ static const char *days[] = { "Hétfő","Kedd","Szerda","Csütörtök","Péntek","Szombat","Vasárnap" };
+ static const char *months[] = { "Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December" };
+ QCString sdate;
+ sdate.sprintf("%s %s %d %d",days[dayOfWeek-1],months[month-1],day,year);
+ if (includeTime)
+ {
+ QCString stime;
+ stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds);
+ sdate+=stime;
+ }
+ return sdate;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.7.5
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Header for the page with bibliographic citations */
+ virtual QCString trCiteReferences()
+ { return "Bibliográfia"; }
+
+ /*! Text for copyright paragraph */
+ virtual QCString trCopyright()
+ { return "Szerzői jog"; }
+
+ /*! Header for the graph showing the directory dependencies */
+ virtual QCString trDirDepGraph(const char *name)
+ { return QCString("Könyvtár függőségi gráf a(z) ")+name+"-könyvtárhoz:"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.0
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Detail level selector shown for hierarchical indices */
+ virtual QCString trDetailLevel()
+ { return "részletességi szint"; }
+
+ /*! Section header for list of template parameters */
+ virtual QCString trTemplateParameters()
+ { return "Sablon paraméterek"; }
+
+ /*! Used in dot graph when UML_LOOK is enabled and there are many fields */
+ virtual QCString trAndMore(const QCString &number)
+ { return "és "+number+" elemmel több..."; }
+
+ /*! Used file list for a Java enum */
+ virtual QCString trEnumGeneratedFromFiles(bool single)
+ { QCString result = "A dokumentáció ehhez az enum-hoz a következő fájl";
+ if (!single) result+="ok";
+ result+=" alapján készült:";
+ return result;
+ }
+
+ /*! Header of a Java enum page (Java enums are represented as classes). */
+ virtual QCString trEnumReference(const char *name)
+ { return QCString(name)+" felsoroló referencia"; }
+
+ /*! Used for a section containing inherited members */
+ virtual QCString trInheritedFrom(const char *members,const char *what)
+ { return QCString(members)+" a(z) "+what+" osztályból származnak"; }
+
+ /*! Header of the sections with inherited members specific for the
+ * base class(es)
+ */
+ virtual QCString trAdditionalInheritedMembers()
+ { return "További örökölt tagok"; }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.2
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a tooltip for the toggle button that appears in the
+ * navigation tree in the HTML output when GENERATE_TREEVIEW is
+ * enabled. This tooltip explains the meaning of the button.
+ */
+ virtual QCString trPanelSynchronisationTooltip(bool enable)
+ {
+ QCString opt = enable ? "engedélyez" : "letilt";
+ return "Kattintson a(z) "+opt+" panel synchronisation";
+ }
+
+ /*! Used in a method of an Objective-C class that is declared in a
+ * a category. Note that the @1 marker is required and is replaced
+ * by a link.
+ */
+ virtual QCString trProvidedByCategory()
+ {
+ return "@0 kategória szerint.";
+ }
+
+ /*! Used in a method of an Objective-C category that extends a class.
+ * Note that the @1 marker is required and is replaced by a link to
+ * the class method.
+ */
+ virtual QCString trExtendsClass()
+ {
+ return "@0 kiterjesztett osztály.";
+ }
+
+ /*! Used as the header of a list of class methods in Objective-C.
+ * These are similar to static public member functions in C++.
+ */
+ virtual QCString trClassMethods()
+ {
+ return "Osztály metódusok";
+ }
+
+ /*! Used as the header of a list of instance methods in Objective-C.
+ * These are similar to public member functions in C++.
+ */
+ virtual QCString trInstanceMethods()
+ {
+ return "Példány metódusok";
+ }
+
+ /*! Used as the header of the member functions of an Objective-C class.
+ */
+ virtual QCString trMethodDocumentation()
+ {
+ return "Metódus dokumentáció";
+ }
+
+ /*! Used as the title of the design overview picture created for the
+ * VHDL output.
+ */
+ virtual QCString trDesignOverview()
+ {
+ return "Dizájn áttekintés";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.4
+//////////////////////////////////////////////////////////////////////////
+
+ /** old style UNO IDL services: implemented interfaces */
+ virtual QCString trInterfaces()
+ { return "Exportált interfészek"; }
+
+ /** old style UNO IDL services: inherited services */
+ virtual QCString trServices()
+ { return "Mellékelt szolgáltatások"; }
+
+ /** UNO IDL constant groups */
+ virtual QCString trConstantGroups()
+ { return "Konstans csoportok"; }
+
+ /** UNO IDL constant groups */
+ virtual QCString trConstantGroupReference(const char *namespaceName)
+ {
+ QCString result=namespaceName;
+ result+=" konstans csoport referencia";
+ return result;
+ }
+ /** UNO IDL service page title */
+ virtual QCString trServiceReference(const char *sName)
+ {
+ QCString result=(QCString)sName;
+ result+=" szolgáltatás referencia";
+ return result;
+ }
+ /** UNO IDL singleton page title */
+ virtual QCString trSingletonReference(const char *sName)
+ {
+ QCString result=(QCString)sName;
+ result+=" egyke példány referencia";
+ return result;
+ }
+ /** UNO IDL service page */
+ virtual QCString trServiceGeneratedFromFiles(bool single)
+ {
+ // single is true implies a single file
+ QCString result=(QCString)"A szolgáltatás dokumentációja "
+ "a következő fájl";
+ if (single) result+="ból"; else result+="okból";
+ result+="lett létrehozva:";
+ return result;
+ }
+ /** UNO IDL singleton page */
+ virtual QCString trSingletonGeneratedFromFiles(bool single)
+ {
+ // single is true implies a single file
+ QCString result=(QCString)"Az egyke példány dokomentációja "
+ "a következő fájl";
+ if (single) result+="ból"; else result+="okból";
+ result+="lett létrehozva:";
+ return result;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+
};
#endif
diff --git a/src/types.h b/src/types.h
index 806e6fc..e58c8fc 100644
--- a/src/types.h
+++ b/src/types.h
@@ -16,6 +16,7 @@
#ifndef TYPES_H
#define TYPES_H
+#include <string.h>
#include <qcstring.h>
/** @file
@@ -218,4 +219,48 @@ enum FortranFormat
FortranFormat_Fixed
};
+class LocalToc
+{
+ public:
+ enum Type {
+ None = 0, // initial value
+ Html = 0, // index / also to be used as bit position in mask (1 << Html)
+ Latex = 1, // ...
+ Xml = 2, // ...
+ numTocTypes = 3 // number of enum values
+ };
+ LocalToc() : m_mask(None) { memset(m_level,0,sizeof(m_level)); }
+
+ // setters
+ void enableHtml(int level)
+ {
+ m_mask|=(1<<Html);
+ m_level[Html]=level;
+ }
+ void enableLatex(int level)
+ {
+ m_mask|=(1<<Latex);
+ m_level[Latex]=level;
+ }
+ void enableXml(int level)
+ {
+ m_mask|=(1<<Xml);
+ m_level[Xml]=level;
+ }
+
+ // getters
+ bool isHtmlEnabled() const { return (m_mask & (1<<Html))!=0; }
+ bool isLatexEnabled() const { return (m_mask & (1<<Latex))!=0; }
+ bool isXmlEnabled() const { return (m_mask & (1<<Xml))!=0; }
+ bool nothingEnabled() const { return m_mask == None; }
+ int htmlLevel() const { return m_level[Html]; }
+ int latexLevel() const { return m_level[Latex]; }
+ int xmlLevel() const { return m_level[Xml]; }
+ int mask() const { return m_mask; }
+
+ private:
+ int m_mask;
+ int m_level[numTocTypes];
+};
+
#endif
diff --git a/src/util.cpp b/src/util.cpp
index ea68cd7..b387a84 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -5290,6 +5290,22 @@ QCString substitute(const QCString &s,const QCString &src,const QCString &dst,in
return result;
}
+/// substitute all occurrences of \a srcChar in \a s by \a dstChar
+QCString substitute(const QCString &s,char srcChar,char dstChar)
+{
+ int l=s.length();
+ QCString result(l+1);
+ char *q=result.rawData();
+ if (l>0)
+ {
+ const char *p=s.data();
+ char c;
+ while ((c=*p++)) *q++ = (c==srcChar) ? dstChar : c;
+ }
+ *q='\0';
+ return result;
+}
+
//----------------------------------------------------------------------
QCString substituteKeywords(const QCString &s,const char *title,
@@ -6725,6 +6741,16 @@ void filterLatexString(FTextStream &t,const char *str,
{
switch(c)
{
+ case 0xef: // handle U+FFFD i.e. "Replacement character" caused by octal: 357 277 275 / hexadecimal 0xef 0xbf 0xbd
+ // the LaTeX command \ucr has been defined in doxygen.sty
+ if ((unsigned char)*(p) == 0xbf && (unsigned char)*(p+1) == 0xbd)
+ {
+ t << "{\\ucr}";
+ p += 2;
+ }
+ else
+ t << (char)c;
+ break;
case '\\': t << "\\(\\backslash\\)"; break;
case '{': t << "\\{"; break;
case '}': t << "\\}"; break;
@@ -6746,6 +6772,16 @@ void filterLatexString(FTextStream &t,const char *str,
{
switch(c)
{
+ case 0xef: // handle U+FFFD i.e. "Replacement character" caused by octal: 357 277 275 / hexadecimal 0xef 0xbf 0xbd
+ // the LaTeX command \ucr has been defined in doxygen.sty
+ if ((unsigned char)*(p) == 0xbf && (unsigned char)*(p+1) == 0xbd)
+ {
+ t << "{\\ucr}";
+ p += 2;
+ }
+ else
+ t << (char)c;
+ break;
case '#': t << "\\#"; break;
case '$': t << "\\$"; break;
case '%': t << "\\%"; break;
@@ -7913,8 +7949,8 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC
int start=0;
if (size>=2 &&
- ((inBuf.at(0)==-1 && inBuf.at(1)==-2) || // Little endian BOM
- (inBuf.at(0)==-2 && inBuf.at(1)==-1) // big endian BOM
+ (((uchar)inBuf.at(0)==0xFF && (uchar)inBuf.at(1)==0xFE) || // Little endian BOM
+ ((uchar)inBuf.at(0)==0xFE && (uchar)inBuf.at(1)==0xFF) // big endian BOM
)
) // UCS-2 encoded file
{
@@ -8830,6 +8866,32 @@ void writeExtraLatexPackages(FTextStream &t)
}
}
+void writeLatexSpecialFormulaChars(FTextStream &t)
+{
+ unsigned char minus[4]; // Superscript minus
+ char *pminus = (char *)minus;
+ unsigned char sup2[3]; // Superscript two
+ char *psup2 = (char *)sup2;
+ unsigned char sup3[3];
+ char *psup3 = (char *)sup3; // Superscript three
+ minus[0]= 0xE2;
+ minus[1]= 0x81;
+ minus[2]= 0xBB;
+ minus[3]= 0;
+ sup2[0]= 0xC2;
+ sup2[1]= 0xB2;
+ sup2[2]= 0;
+ sup3[0]= 0xC2;
+ sup3[1]= 0xB3;
+ sup3[2]= 0;
+
+ t << "\\usepackage{newunicodechar}\n"
+ " \\newunicodechar{" << pminus << "}{${}^{-}$}% Superscript minus\n"
+ " \\newunicodechar{" << psup2 << "}{${}^{2}$}% Superscript two\n"
+ " \\newunicodechar{" << psup3 << "}{${}^{3}$}% Superscript three\n"
+ "\n";
+}
+
//------------------------------------------------------
static int g_usedTableLevels = 0;
diff --git a/src/util.h b/src/util.h
index 7cbe5e3..a9eee67 100644
--- a/src/util.h
+++ b/src/util.h
@@ -194,6 +194,7 @@ QCString substituteClassNames(const QCString &s);
QCString substitute(const QCString &s,const QCString &src,const QCString &dst);
QCString substitute(const QCString &s,const QCString &src,const QCString &dst,int skip_seq);
+QCString substitute(const QCString &s,char srcChar,char dstChar);
QCString clearBlock(const char *s,const char *begin,const char *end);
@@ -477,6 +478,7 @@ void convertProtectionLevel(
bool mainPageHasTitle();
bool openOutputFile(const char *outFile,QFile &f);
void writeExtraLatexPackages(FTextStream &t);
+void writeLatexSpecialFormulaChars(FTextStream &t);
int usedTableLevels();
void incUsedTableLevels();
diff --git a/src/vhdlcode.l b/src/vhdlcode.l
index 618258f..68dcafb 100644
--- a/src/vhdlcode.l
+++ b/src/vhdlcode.l
@@ -31,7 +31,7 @@
#include <ctype.h>
#include <qregexp.h>
#include <qdir.h>
-#include <qstringlist.h>
+#include <qcstringlist.h>
#include "entry.h"
#include "doxygen.h"
@@ -138,8 +138,8 @@ static bool checkVhdlString(QCString &name)
int len=name.length();
if (name.at(0)=='"' && name.at(len-1)=='"' && len > 2)
{
- QStringList qrl=QStringList::split(regg,name,FALSE);
- if (VhdlDocGen::isNumber(qrl[0].utf8()))
+ QCStringList qrl=QCStringList::split(regg,name);
+ if (VhdlDocGen::isNumber(qrl[0]))
{
g_code->codify("\"");
startFontClass("vhdllogic");
@@ -691,8 +691,8 @@ static void writeFuncProto()
codifyLines(g_FuncProto.data(),g_CurrClass.data());
return;
}
- QStringList qlist=QStringList::split(name,g_FuncProto,FALSE);
- QCString temp=qlist[0].utf8();
+ QCStringList qlist=QCStringList::split(name,g_FuncProto);
+ QCString temp=qlist[0];
codifyLines(temp.data(),g_CurrClass.data());
g_FuncProto.stripPrefix(temp.data());
temp.resize(0);
@@ -831,11 +831,11 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
QCString tt(vhdlcodeYYtext);
VhdlDocGen::deleteAllChars(tt,',');
QRegExp r("=>");
- QStringList ql=QStringList::split(r,tt,FALSE);
+ QCStringList ql=QCStringList::split(r,tt);
if (ql.count()>=2)
{
unsigned int index=0;
- QCString t1=ql[0].utf8();
+ QCString t1=ql[0];
char cc=t1.at(index);
while (cc==' ' || cc=='\t')
{
@@ -866,7 +866,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
}
codifyLines("=>");
index=0;
- QCString s2=ql[1].utf8();
+ QCString s2=ql[1];
t1=s2;
cc=t1.at(index);
while (cc==' ' || cc=='\t')
@@ -959,7 +959,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
tt=tt.lower();
VhdlDocGen::deleteAllChars(tt,';');
tt.stripWhiteSpace();
- QStringList ql=QStringList::split(regg,tt,FALSE);
+ QCStringList ql=QCStringList::split(regg,tt);
int index=ql.findIndex(QCString("if"))+1;
index+=ql.findIndex(QCString("case"))+1;
index+=ql.findIndex(QCString("loop"))+1;
@@ -1168,13 +1168,12 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
<ParsePackage>[^:;]* { //found package
QCString temp(vhdlcodeYYtext);
- QStringList strl=QStringList::split(".",temp,FALSE);
-
+ QCStringList strl=QCStringList::split(".",temp);
if (strl.count()>2)
{
- QCString s1=strl[0].utf8();
- QCString s2=strl[1].utf8();
- QCString s3=strl[2].utf8();
+ QCString s1=strl[0];
+ QCString s2=strl[1];
+ QCString s3=strl[2];
s1.append(".");
s3.prepend(".");
codifyLines(s1.data(),g_CurrClass.data());
@@ -1297,8 +1296,8 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
<Bases>^{B}*("package "){BN}*("body"){BN}*{FUNCNAME} { // found package body
QCString ss(vhdlcodeYYtext);
QCString temp=VhdlDocGen::getIndexWord(vhdlcodeYYtext,2);
- QStringList ql=QStringList::split(temp,ss,FALSE);
- QCString ll=ql[0].utf8();
+ QCStringList ql=QCStringList::split(temp,ss);
+ QCString ll=ql[0];
codifyLines(ll.data(),g_CurrClass.data());
temp=temp.stripWhiteSpace();
temp.prepend("_");
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index 007c45f..287565b 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -26,7 +26,7 @@
#include <string.h>
#include <qcstring.h>
#include <qfileinfo.h>
-#include <qstringlist.h>
+#include <qcstringlist.h>
#include <qmap.h>
/* --------------------------------------------------------------- */
@@ -299,10 +299,10 @@ static QCString formatBriefNote(const QCString &brief,ClassDef * cd)
int k=cd->briefLine();
- QStringList qsl=QStringList::split(ep,brief);
+ QCStringList qsl=QCStringList::split(ep,brief);
for(uint j=0;j<qsl.count();j++)
{
- QCString qcs=qsl[j].data();
+ QCString qcs=qsl[j];
vForm+=parseCommentAsText(cd,NULL,qcs,file,k);
k++;
vForm+='\n';
@@ -1028,8 +1028,8 @@ void VhdlDocGen::writeInlineClassLink(const ClassDef* cd ,OutputList& ol)
}
else if (ii==VhdlDocGen::ARCHITECTURE)
{
- QStringList qlist=QStringList::split("-",nn,FALSE);
- nn=qlist[1].utf8();
+ QCStringList qlist=QCStringList::split("-",nn);
+ nn=qlist[1];
cd=VhdlDocGen::getClass(nn.data());
}
@@ -1041,9 +1041,9 @@ void VhdlDocGen::writeInlineClassLink(const ClassDef* cd ,OutputList& ol)
for (int i=0;i<j;i++)
{
QCString *temp=ql.at(i);
- QStringList qlist=QStringList::split("-",*temp,FALSE);
- QCString s1=qlist[0].utf8();
- QCString s2=qlist[1].utf8();
+ QCStringList qlist=QCStringList::split("-",*temp);
+ QCString s1=qlist[0];
+ QCString s2=qlist[1];
s1.stripPrefix("_");
if (j==1) s1.resize(0);
ClassDef*cc = getClass(temp->data());
@@ -1075,8 +1075,8 @@ void VhdlDocGen::findAllArchitectures(QList<QCString>& qll,const ClassDef *cd)
QCString jj=citer->className();
if (cd != citer && jj.contains('-')!=-1)
{
- QStringList ql=QStringList::split("-",jj,FALSE);
- QCString temp=ql[1].utf8();
+ QCStringList ql=QCStringList::split("-",jj);
+ QCString temp=ql[1];
if (qstricmp(cd->className(),temp)==0)
{
QCString *cl=new QCString(jj);
@@ -1095,10 +1095,10 @@ ClassDef* VhdlDocGen::findArchitecture(const ClassDef *cd)
for ( ; (citer=cli.current()) ; ++cli )
{
QCString jj=citer->name();
- QStringList ql=QStringList::split(":",jj,FALSE);
+ QCStringList ql=QCStringList::split(":",jj);
if (ql.count()>1)
{
- if (ql[0].utf8()==nn )
+ if (ql[0]==nn )
{
return citer;
}
@@ -1211,15 +1211,15 @@ void VhdlDocGen::parseFuncProto(const char* text,QList<Argument>& qlist,
QCString VhdlDocGen::getIndexWord(const char* c,int index)
{
- QStringList ql;
+ QCStringList ql;
QCString temp(c);
QRegExp reg("[\\s:|]");
- ql=QStringList::split(reg,temp,FALSE);
+ ql=QCStringList::split(reg,temp);
if (ql.count() > (unsigned int)index)
{
- return ql[index].utf8();
+ return ql[index];
}
return "";
@@ -2678,11 +2678,11 @@ QCString VhdlDocGen::parseForConfig(QCString & entity,QCString & arch)
if (!entity.contains(":")) return "";
QRegExp exp("[:()\\s]");
- QStringList ql=QStringList::split(exp,entity,FALSE);
+ QCStringList ql=QCStringList::split(exp,entity);
//int ii=ql.findIndex(ent);
assert(ql.count()>=2);
- label = ql[0].utf8();
- entity = ql[1].utf8();
+ label = ql[0];
+ entity = ql[1];
if ((index=entity.findRev("."))>=0)
{
entity.remove(0,index+1);
@@ -2690,8 +2690,8 @@ QCString VhdlDocGen::parseForConfig(QCString & entity,QCString & arch)
if (ql.count()==3)
{
- arch= ql[2].utf8();
- ql=QStringList::split(exp,arch,FALSE);
+ arch= ql[2];
+ ql=QCStringList::split(exp,arch);
if (ql.count()>1) // expression
{
arch="";
@@ -2708,16 +2708,16 @@ QCString VhdlDocGen::parseForBinding(QCString & entity,QCString & arch)
QRegExp exp("[()\\s]");
QCString label="";
- QStringList ql=QStringList::split(exp,entity,FALSE);
+ QCStringList ql=QCStringList::split(exp,entity);
if (ql.contains("open"))
{
return "open";
}
- label=ql[0].utf8();
+ label=ql[0];
- entity = ql[1].utf8();
+ entity = ql[1];
if ((index=entity.findRev("."))>=0)
{
entity.remove(0,index+1);
@@ -2725,7 +2725,7 @@ QCString VhdlDocGen::parseForBinding(QCString & entity,QCString & arch)
if (ql.count()==3)
{
- arch=ql[2].utf8();
+ arch=ql[2];
}
return label;
}
@@ -2843,7 +2843,7 @@ void assignBinding(VhdlConfNode * conf)
QCString inst1=VhdlDocGen::getIndexWord(archy.data(),0).lower();
QCString comp=VhdlDocGen::getIndexWord(archy.data(),1).lower();
- QStringList ql=QStringList::split(",",inst1);
+ QCStringList ql=QCStringList::split(",",inst1);
for (uint j=0;j<ql.count();j++)
{
@@ -2855,7 +2855,7 @@ void assignBinding(VhdlConfNode * conf)
}
else
{
- archy1=comp+":"+ql[j].utf8();
+ archy1=comp+":"+ql[j];
sign1=cur->type+":"+cur->name;
}
@@ -3029,11 +3029,11 @@ ferr:
void VhdlDocGen::writeRecorUnit(QCString & largs,OutputList& ol ,const MemberDef *mdef)
{
- QStringList ql=QStringList::split("#",largs,FALSE);
+ QCStringList ql=QCStringList::split("#",largs,FALSE);
uint len=ql.count();
for(uint i=0;i<len;i++)
{
- QCString n=ql[i].utf8();
+ QCString n=ql[i];
VhdlDocGen::formatString(n,ol,mdef);
if ((len-i)>1) ol.lineBreak();
}
@@ -3046,14 +3046,14 @@ void VhdlDocGen::writeRecUnitDocu(
QCString largs)
{
- QStringList ql=QStringList::split("#",largs,FALSE);
+ QCStringList ql=QCStringList::split("#",largs);
uint len=ql.count();
ol.startParameterList(TRUE);
bool first=TRUE;
for(uint i=0;i<len;i++)
{
- QCString n=ql[i].utf8();
+ QCString n=ql[i];
ol.startParameterType(first,"");
ol.endParameterType();
ol.startParameterName(TRUE);
@@ -3486,14 +3486,14 @@ void FlowChart::alignCommentNode(FTextStream &t,QCString com)
{
uint max=0;
QCString s;
- QStringList ql=QStringList::split("\n",com);
+ QCStringList ql=QCStringList::split("\n",com);
for (uint j=0;j<ql.count();j++)
{
- s=(QCString)ql[j].utf8();
+ s=(QCString)ql[j];
if (max<s.length()) max=s.length();
}
- s=ql.last().utf8();
+ s=ql.last();
int diff=max-s.length();
QCString n(1);
@@ -3508,7 +3508,7 @@ void FlowChart::alignCommentNode(FTextStream &t,QCString com)
for (uint j=0;j<ql.count();j++)
{
- s=(QCString)ql[j].utf8();
+ s=ql[j];
if (j<ql.count()-1)
{
s+="\n";
diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp
index 706e8db..81a7ca1 100644
--- a/src/vhdljjparser.cpp
+++ b/src/vhdljjparser.cpp
@@ -12,7 +12,7 @@
#include <qcstring.h>
#include <qfileinfo.h>
-#include <qstringlist.h>
+#include <qcstringlist.h>
#include "vhdljjparser.h"
#include "vhdlcode.h"
#include "vhdldocgen.h"
@@ -381,11 +381,11 @@ void VhdlParser::addVhdlType(const char *n,int startLine,int section,
spec= VhdlDocGen::GENERIC;
}
- QStringList ql=QStringList::split(",",name,FALSE);
+ QCStringList ql=QCStringList::split(",",name);
for (uint u=0;u<ql.count();u++)
{
- current->name=ql[u].utf8();
+ current->name=ql[u];
current->startLine=startLine;
current->bodyLine=startLine;
current->section=section;
@@ -442,11 +442,11 @@ void VhdlParser::createFunction(const char *imp,uint64 spec,const char *fn)
VhdlDocGen::deleteAllChars(current->args,' ');
if (!fname.isEmpty())
{
- QStringList q1=QStringList::split(",",fname);
+ QCStringList q1=QCStringList::split(",",fname);
for (uint ii=0;ii<q1.count();ii++)
{
Argument *arg=new Argument;
- arg->name=q1[ii].utf8();
+ arg->name=q1[ii];
current->argList->append(arg);
}
}
@@ -540,12 +540,12 @@ void VhdlParser::addProto(const char *s1,const char *s2,const char *s3,
{
(void)s5; // avoid unused warning
QCString name=s2;
- QStringList ql=QStringList::split(",",name,FALSE);
+ QCStringList ql=QCStringList::split(",",name);
for (uint u=0;u<ql.count();u++)
{
Argument *arg=new Argument;
- arg->name=ql[u].utf8();
+ arg->name=ql[u];
if (s3)
{
arg->type=s3;
diff --git a/src/vhdljjparser.h b/src/vhdljjparser.h
index a0851d7..3a2ed61 100644
--- a/src/vhdljjparser.h
+++ b/src/vhdljjparser.h
@@ -7,6 +7,7 @@
#include <assert.h>
#include <ctype.h>
#include <qarray.h>
+#include <qcstringlist.h>
#include <qfile.h>
#include <qdict.h>
@@ -14,7 +15,6 @@
#include "types.h"
#include "entry.h"
#include "vhdldocgen.h"
-#include "qstringlist.h"
#include "vhdlcode.h"
#include "memberlist.h"
#include "config.h"
@@ -30,7 +30,6 @@ class ClassSDict;
class FileStorage;
class ClassDef;
class MemberDef;
-class QStringList;
struct VhdlConfNode;
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 63fc8ad..e68c454 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -1838,9 +1838,62 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
}
}
writeInnerPages(pd->getSubPages(),t);
- if(pd->showToc())
- {
- t << " <tableofcontents/>" << endl;
+ if (pd->localToc().isXmlEnabled())
+ {
+ t << " <tableofcontents>" << endl;
+ SectionDict *sectionDict = pd->getSectionDict();
+ SDict<SectionInfo>::Iterator li(*sectionDict);
+ SectionInfo *si;
+ int level=1,l;
+ bool inLi[5]={ FALSE, FALSE, FALSE, FALSE };
+ int maxLevel = pd->localToc().xmlLevel();
+ for (li.toFirst();(si=li.current());++li)
+ {
+ if (si->type==SectionInfo::Section ||
+ si->type==SectionInfo::Subsection ||
+ si->type==SectionInfo::Subsubsection ||
+ si->type==SectionInfo::Paragraph)
+ {
+ //printf(" level=%d title=%s\n",level,si->title.data());
+ int nextLevel = (int)si->type;
+ if (nextLevel>level)
+ {
+ for (l=level;l<nextLevel;l++)
+ {
+ if (l < maxLevel) t << " <tableofcontents>" << endl;
+ }
+ }
+ else if (nextLevel<level)
+ {
+ for (l=level;l>nextLevel;l--)
+ {
+ if (l <= maxLevel && inLi[l]) t << " </tocsect>" << endl;
+ inLi[l]=FALSE;
+ if (l <= maxLevel) t << " </tableofcontents>" << endl;
+ }
+ }
+ if (l <= maxLevel && inLi[nextLevel]) t << " </tocsect>" << endl;
+ if (nextLevel <= maxLevel)
+ {
+ QCString titleDoc = convertToXML(si->title);
+ t << " <tocsect>" << endl;
+ t << " <name>" << (si->title.isEmpty()?si->label:titleDoc) << "</name>" << endl;
+ t << " <reference>" << convertToXML(pageName) << "_1" << convertToXML(si -> label) << "</reference>" << endl;
+ }
+ inLi[nextLevel]=TRUE;
+ level = nextLevel;
+ }
+ }
+ while (level>1 && level <= maxLevel)
+ {
+ if (inLi[level]) t << " </tocsect>" << endl;
+ inLi[level]=FALSE;
+ t << " </tableofcontents>" << endl;
+ level--;
+ }
+ if (level <= maxLevel && inLi[level]) t << " </tocsect>" << endl;
+ inLi[level]=FALSE;
+ t << " </tableofcontents>" << endl;
}
t << " <briefdescription>" << endl;
writeXMLDocBlock(t,pd->briefFile(),pd->briefLine(),pd,0,pd->briefDescription());