summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-11-28 20:38:57 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-11-28 20:38:57 (GMT)
commitf3e7209fed9703e8be668753d1083ba335121a6e (patch)
tree229ba1f0bd2e721f4cc81307b63d8c79051d1bc4 /src
parente952dab58265a6f21867e51f72d7d81ffe39e082 (diff)
downloadDoxygen-f3e7209fed9703e8be668753d1083ba335121a6e.zip
Doxygen-f3e7209fed9703e8be668753d1083ba335121a6e.tar.gz
Doxygen-f3e7209fed9703e8be668753d1083ba335121a6e.tar.bz2
Release-1.3-rc1-20021128
Diffstat (limited to 'src')
-rw-r--r--src/classdef.cpp38
-rw-r--r--src/classdef.h1
-rw-r--r--src/classlist.cpp2
-rw-r--r--src/cmdmapper.cpp3
-rw-r--r--src/cmdmapper.h57
-rw-r--r--src/docparser.cpp553
-rw-r--r--src/docparser.h13
-rw-r--r--src/doctokenizer.h44
-rw-r--r--src/doctokenizer.l165
-rw-r--r--src/doxygen.cpp97
-rw-r--r--src/filedef.cpp20
-rw-r--r--src/filedef.h1
-rw-r--r--src/groupdef.cpp23
-rw-r--r--src/groupdef.h1
-rw-r--r--src/htmldocvisitor.cpp6
-rw-r--r--src/htmlgen.cpp2
-rw-r--r--src/htmlgen.h4
-rw-r--r--src/latexdocvisitor.cpp4
-rw-r--r--src/latexgen.cpp197
-rw-r--r--src/latexgen.h4
-rw-r--r--src/mangen.cpp28
-rw-r--r--src/mangen.h4
-rw-r--r--src/memberdef.cpp37
-rw-r--r--src/memberdef.h9
-rw-r--r--src/membergroup.cpp26
-rw-r--r--src/membergroup.h5
-rw-r--r--src/memberlist.cpp21
-rw-r--r--src/memberlist.h1
-rw-r--r--src/namespacedef.cpp19
-rw-r--r--src/namespacedef.h1
-rw-r--r--src/outputgen.h4
-rw-r--r--src/outputlist.h8
-rw-r--r--src/page.h6
-rw-r--r--src/rtfdocvisitor.cpp1
-rw-r--r--src/rtfgen.cpp2
-rw-r--r--src/rtfgen.h4
-rw-r--r--src/scanner.l171
-rw-r--r--src/section.h12
-rw-r--r--src/tagreader.cpp41
-rw-r--r--src/translator_de.h506
-rw-r--r--src/util.cpp22
-rw-r--r--src/xmldocvisitor.cpp4
-rw-r--r--src/xmlgen.cpp10
43 files changed, 1321 insertions, 856 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index bfe7cac..70efe0d 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -34,6 +34,7 @@
#include "dot.h"
#include "defargs.h"
#include "debug.h"
+#include "docparser.h"
static QCString stripExtension(const char *fName)
{
@@ -553,6 +554,41 @@ void ClassDef::distributeMemberGroupDocumentation()
}
}
+void ClassDef::findSectionsInDocumentation()
+{
+ docFindSections(documentation(),0,this,0);
+ MemberGroupSDict::Iterator mgli(*memberGroupSDict);
+ MemberGroup *mg;
+ for (;(mg=mgli.current());++mgli)
+ {
+ mg->findSectionsInDocumentation();
+ }
+ pubTypes.findSectionsInDocumentation();
+ pubMethods.findSectionsInDocumentation();
+ pubAttribs.findSectionsInDocumentation();
+ pubSlots.findSectionsInDocumentation();
+ signals.findSectionsInDocumentation();
+ dcopMethods.findSectionsInDocumentation();
+ pubStaticMethods.findSectionsInDocumentation();
+ pubStaticAttribs.findSectionsInDocumentation();
+ proTypes.findSectionsInDocumentation();
+ proMethods.findSectionsInDocumentation();
+ proAttribs.findSectionsInDocumentation();
+ proSlots.findSectionsInDocumentation();
+ proStaticMethods.findSectionsInDocumentation();
+ proStaticAttribs.findSectionsInDocumentation();
+ priTypes.findSectionsInDocumentation();
+ priMethods.findSectionsInDocumentation();
+ priAttribs.findSectionsInDocumentation();
+ priSlots.findSectionsInDocumentation();
+ priStaticMethods.findSectionsInDocumentation();
+ priStaticAttribs.findSectionsInDocumentation();
+ friends.findSectionsInDocumentation();
+ related.findSectionsInDocumentation();
+ properties.findSectionsInDocumentation();
+ events.findSectionsInDocumentation();
+}
+
// add a file name to the used files set
void ClassDef::insertUsedFile(const char *f)
@@ -1558,7 +1594,7 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup)
}
}
ol.docify(" {");
- ol.endMemberItem(FALSE);
+ ol.endMemberItem();
// write user defined member groups
MemberGroupSDict::Iterator mgli(*memberGroupSDict);
diff --git a/src/classdef.h b/src/classdef.h
index 1af7edd..95997f7 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -259,6 +259,7 @@ class ClassDef : public Definition
bool addExample(const char *anchor,const char *name, const char *file);
void addMembersToMemberGroup();
void distributeMemberGroupDocumentation();
+ void findSectionsInDocumentation();
void setNamespace(NamespaceDef *nd) { m_nspace = nd; }
void setTemplateArguments(ArgumentList *al);
void mergeMembers();
diff --git a/src/classlist.cpp b/src/classlist.cpp
index 7adacd8..9483329 100644
--- a/src/classlist.cpp
+++ b/src/classlist.cpp
@@ -112,7 +112,7 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f
ol.docify(cd->localName());
ol.endBold();
}
- ol.endMemberItem(FALSE);
+ ol.endMemberItem();
if (!cd->briefDescription().isEmpty())
{
ol.startMemberDescription();
diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp
index 0f9cb76..57dceef 100644
--- a/src/cmdmapper.cpp
+++ b/src/cmdmapper.cpp
@@ -74,6 +74,9 @@ CommandMap cmdMap[] =
{ "sa", CMD_SA },
{ "secreflist", CMD_SECREFLIST },
{ "section", CMD_SECTION },
+ { "subsection", CMD_SUBSECTION },
+ { "subsubsection", CMD_SUBSUBSECTION },
+ { "paragraph", CMD_PARAGRAPH },
{ "see", CMD_SA },
{ "since", CMD_SINCE },
{ "skip", CMD_SKIP },
diff --git a/src/cmdmapper.h b/src/cmdmapper.h
index ea765d4..dbb9624 100644
--- a/src/cmdmapper.h
+++ b/src/cmdmapper.h
@@ -73,33 +73,36 @@ enum CommandType
CMD_RETVAL = 39 | SIMPLESECT_BIT,
CMD_SA = 40 | SIMPLESECT_BIT ,
CMD_SECTION = 41,
- CMD_SINCE = 42 | SIMPLESECT_BIT,
- CMD_SKIP = 43,
- CMD_SKIPLINE = 44,
- CMD_STARTCODE = 45,
- CMD_JAVALINK = 46,
- CMD_TEST = 47 | SIMPLESECT_BIT,
- CMD_TODO = 48 | SIMPLESECT_BIT,
- CMD_UNTIL = 49,
- CMD_VERBATIM = 50,
- CMD_VERBINCLUDE = 51,
- CMD_VERSION = 52 | SIMPLESECT_BIT,
- CMD_WARNING = 53 | SIMPLESECT_BIT ,
- CMD_BSLASH = 54,
- CMD_AT = 55,
- CMD_LESS = 56,
- CMD_GREATER = 57,
- CMD_AMP = 58,
- CMD_DOLLAR = 59,
- CMD_HASH = 60,
- CMD_PERCENT = 61,
- CMD_LINEBREAK = 62,
- CMD_FORMULA = 63,
- CMD_SECREFLIST = 64,
- CMD_ENDSECREFLIST= 65,
- CMD_LANGSWITCH = 66,
- CMD_AUTHORS = 67 | SIMPLESECT_BIT,
- CMD_INTERNALREF = 68
+ CMD_SUBSECTION = 42,
+ CMD_SUBSUBSECTION= 43,
+ CMD_PARAGRAPH = 44,
+ CMD_SINCE = 45 | SIMPLESECT_BIT,
+ CMD_SKIP = 46,
+ CMD_SKIPLINE = 47,
+ CMD_STARTCODE = 48,
+ CMD_JAVALINK = 49,
+ CMD_TEST = 50 | SIMPLESECT_BIT,
+ CMD_TODO = 51 | SIMPLESECT_BIT,
+ CMD_UNTIL = 52,
+ CMD_VERBATIM = 53,
+ CMD_VERBINCLUDE = 54,
+ CMD_VERSION = 55 | SIMPLESECT_BIT,
+ CMD_WARNING = 56 | SIMPLESECT_BIT ,
+ CMD_BSLASH = 57,
+ CMD_AT = 58,
+ CMD_LESS = 59,
+ CMD_GREATER = 60,
+ CMD_AMP = 61,
+ CMD_DOLLAR = 62,
+ CMD_HASH = 63,
+ CMD_PERCENT = 64,
+ CMD_LINEBREAK = 65,
+ CMD_FORMULA = 66,
+ CMD_SECREFLIST = 67,
+ CMD_ENDSECREFLIST= 68,
+ CMD_LANGSWITCH = 69,
+ CMD_AUTHORS = 70 | SIMPLESECT_BIT,
+ CMD_INTERNALREF = 71
};
enum HtmlTagType
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 53f58bc..f5c17d0 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -46,6 +46,15 @@
//---------------------------------------------------------------------------
+static const char *sectionLevelToName[] =
+{
+ "page",
+ "section",
+ "subsection",
+ "subsubsection",
+ "paragraph"
+};
+
//---------------------------------------------------------------------------
// global variables during a call to validatingParseDoc
@@ -513,7 +522,7 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command",
cmdName.data());
return tok;
}
@@ -526,15 +535,15 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
switch (tok)
{
case TK_COMMAND:
- warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command \\%s as the argument of a \\%s command",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command \\%s as the argument of a \\%s command",
tokenName.data(),cmdName.data());
break;
case TK_SYMBOL:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
tokenName.data());
break;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok));
break;
}
@@ -561,7 +570,7 @@ static void handleStyleLeave(DocNode *parent,QList<DocNode> &children,
g_styleStack.top()->position()!=g_nodeStack.count() // wrong position
)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: found </%s> tag without matching <%s> in the same paragraph",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: found </%s> tag without matching <%s> in the same paragraph",
tagName,tagName);
}
else // end the section
@@ -589,9 +598,9 @@ static void handlePendingStyleCommands(DocNode *parent,QList<DocNode> &children)
case DocStyleChange::Small: cmd = "small"; break;
case DocStyleChange::Subscript: cmd = "subscript"; break;
case DocStyleChange::Superscript: cmd = "superscript"; break;
- case DocStyleChange::Preformatted: cmd = "preformatted"; break;
+ case DocStyleChange::Preformatted: cmd = "pre"; break;
}
- warn(g_fileName,doctokenizerYYlineno,"Error: end of paragraph without end of style "
+ warn(g_fileName,doctokenizerYYlineno,"Warning: end of paragraph without end of style "
"command </%s>",cmd);
children.append(new DocStyleChange(parent,g_nodeStack.count(),sc->style(),FALSE));
g_styleStack.pop();
@@ -719,7 +728,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
doctokenizerYYsetStateHtmlOnly();
int retval = doctokenizerYYlex();
children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::HtmlOnly,g_isExample,g_fileName));
- if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: htmlonly section ended without end marker");
+ if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Warning: htmlonly section ended without end marker");
doctokenizerYYsetStatePara();
}
break;
@@ -728,7 +737,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
doctokenizerYYsetStateLatexOnly();
int retval = doctokenizerYYlex();
children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::LatexOnly,g_isExample,g_fileName));
- if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: latexonly section ended without end marker",doctokenizerYYlineno);
+ if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Warning: latexonly section ended without end marker",doctokenizerYYlineno);
doctokenizerYYsetStatePara();
}
break;
@@ -743,20 +752,20 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command",
tokenName.data());
break;
}
tok=doctokenizerYYlex();
if (tok==0)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment block while parsing the "
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the "
"argument of command %s",tokenName.data());
break;
}
else if (tok!=TK_WORD && tok!=TK_LNKWORD)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s",
tokToString(tok),tokenName.data());
break;
}
@@ -769,7 +778,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command",
tokenName.data());
break;
}
@@ -778,7 +787,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
DocInternalRef *ref=0;
if (tok!=TK_WORD && tok!=TK_LNKWORD)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s",
tokToString(tok),tokenName.data());
doctokenizerYYsetStatePara();
break;
@@ -812,11 +821,13 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
{
handleStyleEnter(parent,children,DocStyleChange::Preformatted,&g_token->attribs);
parent->setInsidePreformatted(TRUE);
+ doctokenizerYYsetInsidePre(TRUE);
}
else
{
handleStyleLeave(parent,children,DocStyleChange::Preformatted,tokenName);
parent->setInsidePreformatted(FALSE);
+ doctokenizerYYsetInsidePre(FALSE);
}
break;
case HTML_CODE:
@@ -924,7 +935,7 @@ handlepara:
return FALSE;
break;
case TK_URL:
- children.append(new DocURL(parent,g_token->name));
+ children.append(new DocURL(parent,g_token->name,g_token->isEMailAddr));
break;
default:
return FALSE;
@@ -1029,14 +1040,14 @@ static void readTextFileByName(const QString &file,QString &text)
}
else if (ambig)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: included file name %s is ambigious"
+ warn(g_fileName,doctokenizerYYlineno,"Warning: included file name %s is ambigious"
"Possible candidates:\n%s",file.data(),
showFileDefMatches(Doxygen::exampleNameDict,file).data()
);
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error: included file %s is not found"
+ warn(g_fileName,doctokenizerYYlineno,"Warning: included file %s is not found"
"Check you EXAMPLE_PATH",file.data());
}
}
@@ -1048,7 +1059,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor)
{
if (id.isEmpty())
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Empty anchor label");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Empty anchor label");
}
if (newAnchor) // found <a name="label">
{
@@ -1064,7 +1075,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor)
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Invalid anchor id `%s'",id.data());
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Invalid anchor id `%s'",id.data());
}
}
}
@@ -1231,13 +1242,13 @@ void DocCopy::parse()
}
else // oops, recursion
{
- warn(g_fileName,doctokenizerYYlineno,"Error: recursive call chain of \\copydoc commands detected at %d\n",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: recursive call chain of \\copydoc commands detected at %d\n",
doctokenizerYYlineno);
}
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error: target %s of \\copydoc command not found",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: target %s of \\copydoc command not found",
m_link.data());
}
}
@@ -1264,9 +1275,12 @@ void DocXRefItem::parse()
m_anchor = item->listAnchor;
m_title = refList->sectionTitle();
- docParserPushContext();
- internalValidatingParseDoc(this,m_children,item->text);
- docParserPopContext();
+ if (!item->text.isEmpty())
+ {
+ docParserPushContext();
+ internalValidatingParseDoc(this,m_children,item->text);
+ docParserPopContext();
+ }
}
}
@@ -1329,15 +1343,15 @@ void DocSecRefItem::parse()
switch (tok)
{
case TK_COMMAND:
- warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a \\refitem",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\refitem",
g_token->name.data());
break;
case TK_SYMBOL:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
g_token->name.data());
break;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok));
break;
}
@@ -1357,13 +1371,13 @@ void DocSecRefItem::parse()
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error reference to unknown section %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning reference to unknown section %s",
m_target.data());
}
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error reference to empty target");
+ warn(g_fileName,doctokenizerYYlineno,"Warning reference to empty target");
}
DBG(("DocSecRefItem::parse() end\n"));
@@ -1393,13 +1407,13 @@ void DocSecRefList::parse()
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after \\refitem command");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after \\refitem command");
break;
}
tok=doctokenizerYYlex();
if (tok!=TK_WORD && tok!=TK_LNKWORD)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of \\refitem",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of \\refitem",
tokToString(tok));
break;
}
@@ -1412,7 +1426,7 @@ void DocSecRefList::parse()
case CMD_ENDSECREFLIST:
goto endsecreflist;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a \\secreflist",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\secreflist",
g_token->name.data());
goto endsecreflist;
}
@@ -1423,7 +1437,7 @@ void DocSecRefList::parse()
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s inside section reference list",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s inside section reference list",
tokToString(tok));
goto endsecreflist;
}
@@ -1466,15 +1480,15 @@ void DocInternalRef::parse()
switch (tok)
{
case TK_COMMAND:
- warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a \\ref",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\ref",
g_token->name.data());
break;
case TK_SYMBOL:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
g_token->name.data());
break;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok));
break;
}
@@ -1504,7 +1518,7 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
m_ref = sec->ref;
m_file = stripKnownExtensions(sec->fileName);
- m_anchor = sec->label;
+ if (sec->type!=SectionInfo::Page) m_anchor = sec->label;
m_refToAnchor = sec->type==SectionInfo::Anchor;
m_refToSection = sec->type!=SectionInfo::Anchor;
}
@@ -1537,7 +1551,7 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
}
else // oops, bogus target
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unable to resolve reference to `%s' for \\ref command",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unable to resolve reference to `%s' for \\ref command",
target.data());
}
}
@@ -1555,15 +1569,15 @@ void DocRef::parse()
switch (tok)
{
case TK_COMMAND:
- warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a \\ref",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\ref",
g_token->name.data());
break;
case TK_SYMBOL:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
g_token->name.data());
break;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok));
break;
}
@@ -1606,7 +1620,7 @@ DocLink::DocLink(DocNode *parent,const QString &target) :
}
else // oops, bogus target
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unable to resolve link to `%s' for \\link command",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unable to resolve link to `%s' for \\link command",
target.data());
}
}
@@ -1631,17 +1645,17 @@ QString DocLink::parse(bool isJavaLink)
case CMD_ENDLINK:
if (isJavaLink)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: {@link.. ended with @endlink command");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: {@link.. ended with @endlink command");
}
goto endlink;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a \\link",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\link",
g_token->name.data());
break;
}
break;
case TK_SYMBOL:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
g_token->name.data());
break;
case TK_LNKWORD:
@@ -1668,7 +1682,7 @@ QString DocLink::parse(bool isJavaLink)
m_children.append(new DocWord(this,g_token->name));
break;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok));
break;
}
@@ -1676,7 +1690,7 @@ QString DocLink::parse(bool isJavaLink)
}
if (tok==0)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected end of comment while inside"
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected end of comment while inside"
" link command\n");
}
endlink:
@@ -1713,15 +1727,15 @@ void DocDotFile::parse()
switch (tok)
{
case TK_COMMAND:
- warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a \\dotfile",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\dotfile",
g_token->name.data());
break;
case TK_SYMBOL:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
g_token->name.data());
break;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok));
break;
}
@@ -1740,7 +1754,7 @@ void DocDotFile::parse()
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Unknown option %s after image title",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unknown option %s after image title",
g_token->name.data());
}
tok=doctokenizerYYlex();
@@ -1757,14 +1771,14 @@ void DocDotFile::parse()
}
else if (ambig)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: included dot file name %s is ambigious.\n"
+ warn(g_fileName,doctokenizerYYlineno,"Warning: included dot file name %s is ambigious.\n"
"Possible candidates:\n%s",m_name.data(),
showFileDefMatches(Doxygen::exampleNameDict,m_name).data()
);
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error: included dot file %s is not found "
+ warn(g_fileName,doctokenizerYYlineno,"Warning: included dot file %s is not found "
"in any of the paths specified via DOTFILE_DIRS!",m_name.data());
}
@@ -1790,15 +1804,15 @@ void DocImage::parse()
switch (tok)
{
case TK_COMMAND:
- warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a \\image",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\image",
g_token->name.data());
break;
case TK_SYMBOL:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
g_token->name.data());
break;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok));
break;
}
@@ -1817,7 +1831,7 @@ void DocImage::parse()
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Unknown option %s after image title",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unknown option %s after image title",
g_token->name.data());
}
tok=doctokenizerYYlex();
@@ -1848,7 +1862,7 @@ int DocHtmlHeader::parse()
switch (tok)
{
case TK_COMMAND:
- warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a <h%d> tag",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a <h%d> tag",
g_token->name.data(),m_level);
break;
case TK_HTMLTAG:
@@ -1858,7 +1872,7 @@ int DocHtmlHeader::parse()
{
if (m_level!=1)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: <h%d> ended with </h1>",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: <h%d> ended with </h1>",
m_level);
}
goto endheader;
@@ -1867,7 +1881,7 @@ int DocHtmlHeader::parse()
{
if (m_level!=2)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: <h%d> ended with </h2>",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: <h%d> ended with </h2>",
m_level);
}
goto endheader;
@@ -1876,7 +1890,7 @@ int DocHtmlHeader::parse()
{
if (m_level!=3)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: <h%d> ended with </h3>",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: <h%d> ended with </h3>",
m_level);
}
goto endheader;
@@ -1885,7 +1899,7 @@ int DocHtmlHeader::parse()
{
if (m_level!=4)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: <h%d> ended with </h4>",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: <h%d> ended with </h4>",
m_level);
}
goto endheader;
@@ -1894,7 +1908,7 @@ int DocHtmlHeader::parse()
{
if (m_level!=5)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: <h%d> ended with </h5>",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: <h%d> ended with </h5>",
m_level);
}
goto endheader;
@@ -1903,24 +1917,24 @@ int DocHtmlHeader::parse()
{
if (m_level!=6)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: <h%d> ended with </h6>",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: <h%d> ended with </h6>",
m_level);
}
goto endheader;
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected html tag <%s%s> found within <h%d> context",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected html tag <%s%s> found within <h%d> context",
g_token->endTag?"/":"",g_token->name.data(),m_level);
}
}
break;
case TK_SYMBOL:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
g_token->name.data());
break;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok));
break;
}
@@ -1928,7 +1942,7 @@ int DocHtmlHeader::parse()
}
if (tok==0)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected end of comment while inside"
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected end of comment while inside"
" <h%d> tag\n",m_level);
}
endheader:
@@ -1955,11 +1969,11 @@ int DocHRef::parse()
switch (tok)
{
case TK_COMMAND:
- warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a <a>..</a> block",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a <a>..</a> block",
g_token->name.data());
break;
case TK_SYMBOL:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
g_token->name.data());
break;
case TK_HTMLTAG:
@@ -1971,13 +1985,13 @@ int DocHRef::parse()
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected html tag <%s%s> found within <a href=...> context",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected html tag <%s%s> found within <a href=...> context",
g_token->endTag?"/":"",g_token->name.data(),doctokenizerYYlineno);
}
}
break;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok),doctokenizerYYlineno);
break;
}
@@ -1985,7 +1999,7 @@ int DocHRef::parse()
}
if (tok==0)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected end of comment while inside"
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected end of comment while inside"
" <a href=...> tag",doctokenizerYYlineno);
}
endhref:
@@ -2023,7 +2037,7 @@ int DocInternal::parse()
}
if (retval==TK_LISTITEM)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Invalid list item found",doctokenizerYYlineno);
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Invalid list item found",doctokenizerYYlineno);
}
} while (retval!=0 && retval!=RetVal_Section);
if (lastPar) lastPar->markLast();
@@ -2031,24 +2045,24 @@ int DocInternal::parse()
// then parse any number of level1 sections
while (retval==RetVal_Section)
{
- SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
- int secLev = sec->type==SectionInfo::Subsection ? 2 : 1;
- if (secLev!=1) // wrong level
- {
- warn(g_fileName,doctokenizerYYlineno,"Error: Expected level 1 section, found a section with level %d.",secLev);
- break;
- }
- else
- {
- DocSection *s=new DocSection(this,secLev,g_token->sectionId);
+ //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
+ //int secLev = sec->type==SectionInfo::Subsection ? 2 : 1;
+ //if (secLev!=1) // wrong level
+ //{
+ // warn(g_fileName,doctokenizerYYlineno,"Warning: Expected level 1 section, found a section with level %d.",secLev);
+ // break;
+ //}
+ //else
+ //{
+ DocSection *s=new DocSection(this,1,g_token->sectionId);
m_children.append(s);
retval = s->parse();
- }
+ //}
}
if (retval==RetVal_Internal)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: \\internal command found inside internal section");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: \\internal command found inside internal section");
}
DBG(("DocInternal::parse() end\n"));
@@ -2067,7 +2081,7 @@ int DocIndexEntry::parse()
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after \\addindex command");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after \\addindex command");
goto endindexentry;
}
m_entry="";
@@ -2096,7 +2110,7 @@ int DocIndexEntry::parse()
case DocSymbol::Apos: m_entry+='\''; break;
case DocSymbol::Quot: m_entry+='"'; break;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected symbol found as argument of \\addindex");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected symbol found as argument of \\addindex");
break;
}
}
@@ -2113,13 +2127,13 @@ int DocIndexEntry::parse()
case CMD_HASH: m_entry+='#'; break;
case CMD_PERCENT: m_entry+='%'; break;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected command %s found as argument of \\addindex",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected command %s found as argument of \\addindex",
g_token->name.data());
break;
}
break;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok));
break;
}
@@ -2147,11 +2161,11 @@ int DocHtmlCaption::parse()
switch (tok)
{
case TK_COMMAND:
- warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a <caption> tag",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a <caption> tag",
g_token->name.data());
break;
case TK_SYMBOL:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
g_token->name.data());
break;
case TK_HTMLTAG:
@@ -2164,13 +2178,13 @@ int DocHtmlCaption::parse()
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected html tag <%s%s> found within <caption> context",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected html tag <%s%s> found within <caption> context",
g_token->endTag?"/":"",g_token->name.data());
}
}
break;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok));
break;
}
@@ -2178,7 +2192,7 @@ int DocHtmlCaption::parse()
}
if (tok==0)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected end of comment while inside"
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected end of comment while inside"
" <caption> tag",doctokenizerYYlineno);
}
endcaption:
@@ -2245,20 +2259,20 @@ int DocHtmlRow::parse()
}
else // found some other tag
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected <td> or <th> tag but "
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected <td> or <th> tag but "
"found <%s> instead!",g_token->name.data());
goto endrow;
}
}
else if (tok==0) // premature end of comment
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment while looking"
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while looking"
" for a html description title");
goto endrow;
}
else // token other than html token
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected <td> or <th> tag but found %s token instead!",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected <td> or <th> tag but found %s token instead!",
tokToString(tok));
goto endrow;
}
@@ -2309,7 +2323,7 @@ getrow:
{
if (m_caption)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: table already has a caption, found another one");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: table already has a caption, found another one");
}
else
{
@@ -2324,18 +2338,18 @@ getrow:
}
else // found wrong token
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected <tr> or <caption> tag but "
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected <tr> or <caption> tag but "
"found <%s%s> instead!", g_token->endTag ? "/" : "", g_token->name.data());
}
}
else if (tok==0) // premature end of comment
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment while looking"
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while looking"
" for a <tr> or <caption> tag");
}
else // token other than html token
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected <tr> tag but found %s token instead!",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected <tr> tag but found %s token instead!",
tokToString(tok));
}
@@ -2369,11 +2383,11 @@ int DocHtmlDescTitle::parse()
switch (tok)
{
case TK_COMMAND:
- warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a <dt> tag",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a <dt> tag",
g_token->name.data());
break;
case TK_SYMBOL:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
g_token->name.data());
break;
case TK_HTMLTAG:
@@ -2390,13 +2404,13 @@ int DocHtmlDescTitle::parse()
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected html tag <%s%s> found within <dt> context",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected html tag <%s%s> found within <dt> context",
g_token->endTag?"/":"",g_token->name.data());
}
}
break;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok));
break;
}
@@ -2404,7 +2418,7 @@ int DocHtmlDescTitle::parse()
}
if (tok==0)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected end of comment while inside"
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected end of comment while inside"
" <dt> tag");
}
endtitle:
@@ -2464,20 +2478,20 @@ int DocHtmlDescList::parse()
}
else // found some other tag
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected <dt> tag but "
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected <dt> tag but "
"found <%s> instead!",g_token->name.data());
goto enddesclist;
}
}
else if (tok==0) // premature end of comment
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment while looking"
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while looking"
" for a html description title");
goto enddesclist;
}
else // token other than html token
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected <dt> tag but found %s token instead!",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected <dt> tag but found %s token instead!",
tokToString(tok));
goto enddesclist;
}
@@ -2502,7 +2516,7 @@ int DocHtmlDescList::parse()
if (retval==0)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment while inside <dl> block");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while inside <dl> block");
}
enddesclist:
@@ -2589,20 +2603,20 @@ int DocHtmlList::parse()
}
else // found some other tag
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected <li> tag but "
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected <li> tag but "
"found <%s> instead!",g_token->name.data());
goto endlist;
}
}
else if (tok==0) // premature end of comment
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment while looking"
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while looking"
" for a html list item");
goto endlist;
}
else // token other than html token
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected <li> tag but found %s token instead!",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected <li> tag but found %s token instead!",
tokToString(tok));
goto endlist;
}
@@ -2616,7 +2630,7 @@ int DocHtmlList::parse()
if (retval==0)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment while inside <%cl> block",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while inside <%cl> block",
m_type==Unordered ? 'u' : 'o');
}
@@ -2710,15 +2724,15 @@ void DocTitle::parse()
switch (tok)
{
case TK_COMMAND:
- warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a title section",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a title section",
g_token->name.data());
break;
case TK_SYMBOL:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
g_token->name.data());
break;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok));
break;
}
@@ -2800,7 +2814,7 @@ int DocParamList::parse(const QString &cmdName)
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command",
cmdName.data());
}
doctokenizerYYsetStateParam();
@@ -2823,7 +2837,7 @@ int DocParamList::parse(const QString &cmdName)
doctokenizerYYsetStatePara();
if (tok==0) /* premature end of comment block */
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment block while parsing the "
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the "
"argument of command %s",cmdName.data());
return 0;
}
@@ -2874,9 +2888,10 @@ int DocParamSect::parse(const QString &cmdName)
int DocPara::handleSimpleSection(DocSimpleSect::Type t)
{
DocSimpleSect *ss=0;
- if (!m_children.isEmpty() && // previous element
- m_children.last()->kind()==Kind_SimpleSect && // was a simple sect
- ((DocSimpleSect *)m_children.last())->type()==t) // of same type
+ if (!m_children.isEmpty() && // previous element
+ m_children.last()->kind()==Kind_SimpleSect && // was a simple sect
+ ((DocSimpleSect *)m_children.last())->type()==t && // of same type
+ t!=DocSimpleSect::User) // but not user defined
{
// append to previous section
ss=(DocSimpleSect *)m_children.last();
@@ -2930,7 +2945,7 @@ void DocPara::handleIncludeOperator(const QString &cmdName,DocIncOperator::Type
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command",
cmdName.data());
return;
}
@@ -2939,13 +2954,13 @@ void DocPara::handleIncludeOperator(const QString &cmdName,DocIncOperator::Type
doctokenizerYYsetStatePara();
if (tok==0)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment block while parsing the "
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the "
"argument of command %s", cmdName.data());
return;
}
else if (tok!=TK_WORD)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s",
tokToString(tok),cmdName.data());
return;
}
@@ -2980,21 +2995,21 @@ void DocPara::handleImage(const QString &cmdName)
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command",
cmdName.data());
return;
}
tok=doctokenizerYYlex();
if (tok!=TK_WORD && tok!=TK_LNKWORD)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s",
tokToString(tok),cmdName.data());
return;
}
tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command",
cmdName.data());
return;
}
@@ -3005,7 +3020,7 @@ void DocPara::handleImage(const QString &cmdName)
else if (imgType=="rtf") t=DocImage::Rtf;
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error: image type %s specified as the first argument of "
+ warn(g_fileName,doctokenizerYYlineno,"Warning: image type %s specified as the first argument of "
"%s is not valid",
imgType.data(),cmdName.data());
return;
@@ -3014,7 +3029,7 @@ void DocPara::handleImage(const QString &cmdName)
tok=doctokenizerYYlex();
if (tok!=TK_WORD)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s",
tokToString(tok),cmdName.data());
return;
}
@@ -3029,7 +3044,7 @@ void DocPara::handleDotFile(const QString &cmdName)
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command",
cmdName.data());
return;
}
@@ -3037,7 +3052,7 @@ void DocPara::handleDotFile(const QString &cmdName)
tok=doctokenizerYYlex();
if (tok!=TK_WORD)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s",
tokToString(tok),cmdName.data());
return;
}
@@ -3052,7 +3067,7 @@ void DocPara::handleLink(const QString &cmdName,bool isJavaLink)
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command",
cmdName.data());
return;
}
@@ -3060,7 +3075,7 @@ void DocPara::handleLink(const QString &cmdName,bool isJavaLink)
tok=doctokenizerYYlex();
if (tok!=TK_WORD)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s",
tokToString(tok),cmdName.data());
return;
}
@@ -3079,7 +3094,7 @@ void DocPara::handleRef(const QString &cmdName)
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command",
cmdName.data());
return;
}
@@ -3088,7 +3103,7 @@ void DocPara::handleRef(const QString &cmdName)
DocRef *ref=0;
if (tok!=TK_WORD)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s",
tokToString(tok),cmdName.data());
goto endref;
}
@@ -3129,7 +3144,7 @@ int DocPara::handleLanguageSwitch()
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s as parameter of \\~",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s as parameter of \\~",
tokToString(tok));
goto endlang;
}
@@ -3149,7 +3164,7 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t)
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command",
cmdName.data());
return;
}
@@ -3158,13 +3173,13 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t)
doctokenizerYYsetStatePara();
if (tok==0)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment block while parsing the "
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the "
"argument of command %s",cmdName.data());
return;
}
else if (tok!=TK_WORD)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s",
tokToString(tok),cmdName.data());
return;
}
@@ -3173,6 +3188,35 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t)
inc->parse();
}
+void DocPara::handleSection(const QString &cmdName)
+{
+ // get the argument of the section command.
+ int tok=doctokenizerYYlex();
+ if (tok!=TK_WHITESPACE)
+ {
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command",
+ cmdName.data());
+ return;
+ }
+ tok=doctokenizerYYlex();
+ if (tok==0)
+ {
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the "
+ "argument of command %s\n", cmdName.data());
+ return;
+ }
+ else if (tok!=TK_WORD && tok!=TK_LNKWORD)
+ {
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s",
+ tokToString(tok),cmdName.data());
+ return;
+ }
+ g_token->sectionId = g_token->name;
+ doctokenizerYYsetStateSkipTitle();
+ doctokenizerYYlex();
+ doctokenizerYYsetStatePara();
+}
+
int DocPara::handleCommand(const QString &cmdName)
{
@@ -3180,7 +3224,7 @@ int DocPara::handleCommand(const QString &cmdName)
switch (CmdMapper::map(cmdName))
{
case CMD_UNKNOWN:
- warn(g_fileName,doctokenizerYYlineno,"Error: Found unknown command `\\%s'",cmdName.data());
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Found unknown command `\\%s'",cmdName.data());
break;
case CMD_EMPHASIS:
m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Italic,TRUE));
@@ -3280,37 +3324,34 @@ int DocPara::handleCommand(const QString &cmdName)
break;
case CMD_SECTION:
{
- // get the argument of the section command.
- int tok=doctokenizerYYlex();
- if (tok!=TK_WHITESPACE)
- {
- warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command",
- cmdName.data());
- break;
- }
- tok=doctokenizerYYlex();
- if (tok==0)
- {
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment block while parsing the "
- "argument of command %s\n", cmdName.data());
- break;
- }
- else if (tok!=TK_WORD && tok!=TK_LNKWORD)
- {
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s",
- tokToString(tok),cmdName.data());
- break;
- }
- g_token->sectionId = g_token->name;
+ handleSection(cmdName);
retval = RetVal_Section;
}
break;
+ case CMD_SUBSECTION:
+ {
+ handleSection(cmdName);
+ retval = RetVal_Subsection;
+ }
+ break;
+ case CMD_SUBSUBSECTION:
+ {
+ handleSection(cmdName);
+ retval = RetVal_Subsubsection;
+ }
+ break;
+ case CMD_PARAGRAPH:
+ {
+ handleSection(cmdName);
+ retval = RetVal_Paragraph;
+ }
+ break;
case CMD_STARTCODE:
{
doctokenizerYYsetStateCode();
retval = doctokenizerYYlex();
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Code,g_isExample,g_fileName));
- if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: code section ended without end marker");
+ if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Warning: code section ended without end marker");
doctokenizerYYsetStatePara();
}
break;
@@ -3319,7 +3360,7 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStateHtmlOnly();
retval = doctokenizerYYlex();
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::HtmlOnly,g_isExample,g_fileName));
- if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: htmlonly section ended without end marker");
+ if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Warning: htmlonly section ended without end marker");
doctokenizerYYsetStatePara();
}
break;
@@ -3328,7 +3369,7 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStateLatexOnly();
retval = doctokenizerYYlex();
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::LatexOnly,g_isExample,g_fileName));
- if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: latexonly section ended without end marker");
+ if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Warning: latexonly section ended without end marker");
doctokenizerYYsetStatePara();
}
break;
@@ -3337,7 +3378,7 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStateVerbatim();
retval = doctokenizerYYlex();
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Verbatim,g_isExample,g_fileName));
- if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: verbatim section ended without end marker");
+ if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Warning: verbatim section ended without end marker");
doctokenizerYYsetStatePara();
}
break;
@@ -3346,7 +3387,7 @@ int DocPara::handleCommand(const QString &cmdName)
case CMD_ENDLATEXONLY:
case CMD_ENDLINK:
case CMD_ENDVERBATIM:
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected command %s",g_token->name.data());
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data());
break;
case CMD_PARAM:
retval = handleParamSection(cmdName,DocParamSect::Param);
@@ -3380,20 +3421,20 @@ int DocPara::handleCommand(const QString &cmdName)
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command",
cmdName.data());
break;
}
tok=doctokenizerYYlex();
if (tok==0)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment block while parsing the "
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the "
"argument of command %s",cmdName.data());
break;
}
else if (tok!=TK_WORD && tok!=TK_LNKWORD)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s",
tokToString(tok),cmdName.data());
break;
}
@@ -3416,20 +3457,20 @@ int DocPara::handleCommand(const QString &cmdName)
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command",
cmdName.data());
break;
}
tok=doctokenizerYYlex();
if (tok==0)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment block while parsing the "
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the "
"argument of command %s\n", cmdName.data());
break;
}
else if (tok!=TK_WORD && tok!=TK_LNKWORD)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s",
tokToString(tok),cmdName.data());
break;
}
@@ -3485,10 +3526,10 @@ int DocPara::handleCommand(const QString &cmdName)
}
break;
case CMD_SECREFITEM:
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected command %s",g_token->name.data());
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data());
break;
case CMD_ENDSECREFLIST:
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected command %s",g_token->name.data());
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data());
break;
case CMD_FORMULA:
{
@@ -3500,7 +3541,7 @@ int DocPara::handleCommand(const QString &cmdName)
retval = handleLanguageSwitch();
break;
case CMD_INTERNALREF:
- warn(g_fileName,doctokenizerYYlineno,"Error: unexpected command %s",g_token->name.data());
+ warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data());
break;
default:
// we should not get here!
@@ -3540,7 +3581,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
case HTML_LI:
if (!insideUL(this) && !insideOL(this))
{
- warn(g_fileName,doctokenizerYYlineno,"Error: lonely <li> tag found");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: lonely <li> tag found");
}
else
{
@@ -3578,6 +3619,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
case HTML_PRE:
handleStyleEnter(this,m_children,DocStyleChange::Preformatted,&g_token->attribs);
setInsidePreformatted(TRUE);
+ doctokenizerYYsetInsidePre(TRUE);
break;
case HTML_P:
retval=TK_NEWPARA;
@@ -3593,7 +3635,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
retval = RetVal_DescTitle;
break;
case HTML_DD:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag <dd> found");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag <dd> found");
break;
case HTML_TABLE:
{
@@ -3612,7 +3654,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
retval = RetVal_TableHCell;
break;
case HTML_CAPTION:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag <caption> found");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag <caption> found");
break;
case HTML_BR:
{
@@ -3642,7 +3684,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error: found <a> tag with name option but without value!");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: found <a> tag with name option but without value!");
}
}
else if (opt->name=="href") // <a href=url>..</a> tag
@@ -3717,7 +3759,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
}
break;
case HTML_UNKNOWN:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported html tag <%s> found", tagName.data());
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported html tag <%s> found", tagName.data());
break;
default:
// we should not get here!
@@ -3737,7 +3779,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
case HTML_UL:
if (!insideUL(this))
{
- warn(g_fileName,doctokenizerYYlineno,"Error: found </ul> tag without matching <ul>");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: found </ul> tag without matching <ul>");
}
else
{
@@ -3747,7 +3789,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
case HTML_OL:
if (!insideOL(this))
{
- warn(g_fileName,doctokenizerYYlineno,"Error: found </ol> tag without matching <ol>");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: found </ol> tag without matching <ol>");
}
else
{
@@ -3757,7 +3799,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
case HTML_LI:
if (!insideLI(this))
{
- warn(g_fileName,doctokenizerYYlineno,"Error: found </li> tag without matching <li>");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: found </li> tag without matching <li>");
}
else
{
@@ -3767,7 +3809,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
//case HTML_PRE:
// if (!insidePRE(this))
// {
- // warn(g_fileName,doctokenizerYYlineno,"Error: found </pre> tag without matching <pre>");
+ // warn(g_fileName,doctokenizerYYlineno,"Warning: found </pre> tag without matching <pre>");
// }
// else
// {
@@ -3798,6 +3840,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
case HTML_PRE:
handleStyleLeave(this,m_children,DocStyleChange::Preformatted,"preformatted");
setInsidePreformatted(FALSE);
+ doctokenizerYYsetInsidePre(FALSE);
break;
case HTML_P:
// ignore </p> tag
@@ -3824,32 +3867,32 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
// ignore </th> tag
break;
case HTML_CAPTION:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag </caption> found");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </caption> found");
break;
case HTML_BR:
- warn(g_fileName,doctokenizerYYlineno,"Error: Illegal </br> tag found\n");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal </br> tag found\n");
break;
case HTML_H1:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag </h1> found");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </h1> found");
break;
case HTML_H2:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag </h2> found");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </h2> found");
break;
case HTML_H3:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag </h3> found");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </h3> found");
break;
case HTML_IMG:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag </img> found");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </img> found");
break;
case HTML_HR:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag </hr> found");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </hr> found");
break;
case HTML_A:
- //warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag </a> found");
+ //warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </a> found");
// ignore </a> tag (can be part of <a name=...></a>
break;
case HTML_UNKNOWN:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported html tag </%s> found",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported html tag </%s> found",
tagName.data());
break;
default:
@@ -3886,7 +3929,7 @@ reparsetoken:
handleLinkedWord(this,m_children);
break;
case TK_URL:
- m_children.append(new DocURL(this,g_token->name));
+ m_children.append(new DocURL(this,g_token->name,g_token->isEMailAddr));
break;
case TK_WHITESPACE:
{
@@ -3982,13 +4025,13 @@ reparsetoken:
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error: End of list marker found "
+ warn(g_fileName,doctokenizerYYlineno,"Warning: End of list marker found "
"has invalid indent level");
}
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error: End of list marker found without any preceding "
+ warn(g_fileName,doctokenizerYYlineno,"Warning: End of list marker found without any preceding "
"list items");
}
break;
@@ -4089,7 +4132,7 @@ reparsetoken:
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
g_token->name.data());
}
break;
@@ -4115,7 +4158,7 @@ endparagraph:
int DocSection::parse()
{
- DBG(("DocSection::parse() start %s\n",g_token->sectionId.data()));
+ DBG(("DocSection::parse() start %s level=%d\n",g_token->sectionId.data(),m_level));
int retval=RetVal_OK;
g_nodeStack.push(this);
@@ -4151,44 +4194,73 @@ int DocSection::parse()
}
if (retval==TK_LISTITEM)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Invalid list item found");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Invalid list item found");
}
- } while (retval!=0 && retval!=RetVal_Section && retval!=RetVal_Internal);
+ } while (retval!=0 &&
+ retval!=RetVal_Internal &&
+ retval!=RetVal_Section &&
+ retval!=RetVal_Subsection &&
+ retval!=RetVal_Subsubsection &&
+ retval!=RetVal_Paragraph
+ );
+
if (lastPar) lastPar->markLast();
- // then parse any number of nested sections
- while (retval==RetVal_Section) // more sections follow
+ if (retval==RetVal_Subsection && m_level==1)
{
- SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
- ASSERT(sec!=0);
- int secLev = 1;
- switch (sec->type)
- {
- case SectionInfo::Section: secLev=1; break;
- case SectionInfo::Subsection: secLev=2; break;
- case SectionInfo::Subsubsection: secLev=3; break;
- case SectionInfo::Paragraph: secLev=4; break;
- default: ASSERT(0);
- }
- if (secLev<=level()) // new section at same or lower level
+ // then parse any number of nested sections
+ while (retval==RetVal_Subsection) // more sections follow
{
- break;
+ //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
+ DocSection *s=new DocSection(this,2,g_token->sectionId);
+ m_children.append(s);
+ retval = s->parse();
}
- if (secLev!=level()+1) // new section at wrong level
+ }
+ else if (retval==RetVal_Subsubsection && m_level==2)
+ {
+ // then parse any number of nested sections
+ while (retval==RetVal_Subsubsection) // more sections follow
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Expected level %d section, found a section "
- "with level %d",level()+1,secLev);
- retval=0; // stop parsing any further.
- break;
+ //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
+ DocSection *s=new DocSection(this,3,g_token->sectionId);
+ m_children.append(s);
+ retval = s->parse();
}
- else // nested section
+ }
+ else if (retval==RetVal_Paragraph && m_level==3)
+ {
+ // then parse any number of nested sections
+ while (retval==RetVal_Paragraph) // more sections follow
{
- DocSection *s=new DocSection(this,secLev,g_token->sectionId);
+ //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
+ DocSection *s=new DocSection(this,4,g_token->sectionId);
m_children.append(s);
retval = s->parse();
}
}
- INTERNAL_ASSERT(retval==0 || retval==RetVal_Section || retval==RetVal_Internal);
+ else if ((m_level<=1 && retval==RetVal_Subsubsection) ||
+ (m_level<=2 && retval==RetVal_Paragraph)
+ )
+ {
+ int level;
+ if (retval==RetVal_Subsection) level=2;
+ else if (retval==RetVal_Subsubsection) level=3;
+ else level=4;
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected %s "
+ "command found inside %s!",
+ sectionLevelToName[level],sectionLevelToName[m_level]);
+ retval=0; // stop parsing
+
+ }
+
+ INTERNAL_ASSERT(retval==0 ||
+ retval==RetVal_Section ||
+ retval==RetVal_Subsection ||
+ retval==RetVal_Subsubsection ||
+ retval==RetVal_Paragraph ||
+ retval==RetVal_Internal
+ );
DBG(("DocSection::parse() end\n"));
DocNode *n = g_nodeStack.pop();
@@ -4224,7 +4296,7 @@ void DocText::parse()
}
else
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
g_token->name.data());
}
}
@@ -4257,13 +4329,13 @@ void DocText::parse()
m_children.append(new DocSymbol(this,DocSymbol::Percent));
break;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected command `%s' found",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected command `%s' found",
g_token->name.data());
break;
}
break;
default:
- warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok));
break;
}
@@ -4301,7 +4373,7 @@ void DocRoot::parse()
}
if (retval==TK_LISTITEM)
{
- warn(g_fileName,doctokenizerYYlineno,"Error: Invalid list item found");
+ warn(g_fileName,doctokenizerYYlineno,"Warning: Invalid list item found");
}
} while (retval!=0 && retval!=RetVal_Section && retval!=RetVal_Internal);
if (lastPar) lastPar->markLast();
@@ -4311,19 +4383,9 @@ void DocRoot::parse()
{
SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
ASSERT(sec!=0);
- if (sec==0) break;
- int secLev = sec->type==SectionInfo::Subsection ? 2 : 1;
- if (secLev!=1) // wrong level
- {
- warn(g_fileName,doctokenizerYYlineno,"Error: Expected level 1 section, found a section with level %d",secLev);
- break;
- }
- else
- {
- DocSection *s=new DocSection(this,secLev,g_token->sectionId);
- m_children.append(s);
- retval = s->parse();
- }
+ DocSection *s=new DocSection(this,1,g_token->sectionId);
+ m_children.append(s);
+ retval = s->parse();
}
if (retval==RetVal_Internal)
@@ -4431,3 +4493,8 @@ DocNode *validatingParseText(const char *input)
return txt;
}
+void docFindSections(const char *input,PageInfo *pi,Definition *d,MemberGroup *mg)
+{
+ doctokenizerYYFindSections(input,pi,d,mg);
+}
+
diff --git a/src/docparser.h b/src/docparser.h
index 346623e..d7788db 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -30,6 +30,9 @@
class DocNode;
class MemberDef;
+class PageInfo;
+class Definition;
+class MemberGroup;
//---------------------------------------------------------------------------
@@ -55,6 +58,9 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
*/
DocNode *validatingParseText(const char *input);
+/*! Searches for section and anchor commands in the input */
+void docFindSections(const char *input,PageInfo *pi,Definition *d,MemberGroup *m);
+
//---------------------------------------------------------------------------
/*! @brief Abstract node interface with type information. */
@@ -200,16 +206,18 @@ class DocLinkedWord : public DocNode
class DocURL : public DocNode
{
public:
- DocURL(DocNode *parent,const QString &url) :
- m_parent(parent), m_url(url) {}
+ DocURL(DocNode *parent,const QString &url,bool isEmail) :
+ m_parent(parent), m_url(url), m_isEmail(isEmail) {}
QString url() const { return m_url; }
Kind kind() const { return Kind_URL; }
DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); }
+ bool isEmail() const { return m_isEmail; }
private:
DocNode *m_parent;
QString m_url;
+ bool m_isEmail;
};
/*! @brief Node representing a line break */
@@ -912,6 +920,7 @@ class DocPara : public CompAccept<DocPara>, public DocNode
void handleInclude(const QString &cmdName,DocInclude::Type t);
void handleLink(const QString &cmdName,bool isJavaLink);
void handleRef(const QString &cmdName);
+ void handleSection(const QString &cmdName);
int handleLanguageSwitch();
private:
diff --git a/src/doctokenizer.h b/src/doctokenizer.h
index cb0a823..74077f4 100644
--- a/src/doctokenizer.h
+++ b/src/doctokenizer.h
@@ -23,6 +23,10 @@
#include <qlist.h>
#include "htmlattrib.h"
+class Definition;
+class PageInfo;
+class MemberGroup;
+
enum Tokens
{
TK_WORD = 1,
@@ -37,21 +41,24 @@ enum Tokens
TK_RCSTAG = 10,
TK_URL = 11,
- RetVal_OK = 0x10000,
- RetVal_SimpleSec = 0x10001,
- RetVal_ListItem = 0x10002,
- RetVal_Section = 0x10003,
- RetVal_EndList = 0x10004,
- RetVal_EndPre = 0x10005,
- RetVal_DescData = 0x10006,
- RetVal_DescTitle = 0x10007,
- RetVal_EndDesc = 0x10008,
- RetVal_TableRow = 0x10009,
- RetVal_TableCell = 0x1000A,
- RetVal_TableHCell = 0x1000B,
- RetVal_EndTable = 0x1000C,
- RetVal_Internal = 0x1000D,
- RetVal_SwitchLang = 0x1000E
+ RetVal_OK = 0x10000,
+ RetVal_SimpleSec = 0x10001,
+ RetVal_ListItem = 0x10002,
+ RetVal_Section = 0x10003,
+ RetVal_Subsection = 0x10004,
+ RetVal_Subsubsection = 0x10005,
+ RetVal_Paragraph = 0x10006,
+ RetVal_EndList = 0x10007,
+ RetVal_EndPre = 0x10008,
+ RetVal_DescData = 0x10009,
+ RetVal_DescTitle = 0x1000A,
+ RetVal_EndDesc = 0x1000B,
+ RetVal_TableRow = 0x1000C,
+ RetVal_TableCell = 0x1000D,
+ RetVal_TableHCell = 0x1000E,
+ RetVal_EndTable = 0x1000F,
+ RetVal_Internal = 0x10010,
+ RetVal_SwitchLang = 0x10011
};
struct TokenInfo
@@ -89,6 +96,9 @@ struct TokenInfo
// whitespace
QString chars;
+
+ // url
+ bool isEMailAddr;
};
// globals
@@ -100,6 +110,8 @@ extern FILE *doctokenizerYYin;
const char *tokToString(int token);
// operations on the scanner
+void doctokenizerYYFindSections(const char *input,PageInfo *pi,Definition *d,
+ MemberGroup *mg);
void doctokenizerYYinit(const char *input,const char *fileName);
void doctokenizerYYcleanup();
void doctokenizerYYpushContext();
@@ -119,5 +131,7 @@ void doctokenizerYYsetStateLink();
void doctokenizerYYsetStateRef();
void doctokenizerYYsetStateInternalRef();
void doctokenizerYYsetStateText();
+void doctokenizerYYsetStateSkipTitle();
+void doctokenizerYYsetInsidePre(bool b);
#endif
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 879ca2c..be5db69 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -27,16 +27,30 @@
#include "cmdmapper.h"
#include "config.h"
#include "message.h"
+#include "section.h"
+#include "membergroup.h"
+#include "definition.h"
+#include "page.h"
#define YY_NEVER_INTERACTIVE 1
//--------------------------------------------------------------------------
+// context for tokenizer phase
static int g_commentState;
TokenInfo *g_token = 0;
static int g_inputPos = 0;
static const char *g_inputString;
static QString g_fileName;
+static bool g_insidePre;
+
+// context for section finding phase
+static PageInfo *g_pageInfo;
+static Definition *g_definition;
+static MemberGroup *g_memberGroup;
+static QCString g_secLabel;
+static QCString g_secTitle;
+static SectionInfo::SectionType g_secType;
struct DocLexerContext
{
@@ -189,6 +203,41 @@ static void parseHtmlAttribs(const char *att)
//--------------------------------------------------------------------------
+static void processSection()
+{
+ //printf("found section/anchor with name `%s'\n",g_secLabel.data());
+ QCString file;
+ if (g_memberGroup)
+ {
+ file = g_memberGroup->parent()->getOutputFileBase();
+ }
+ else if (g_definition)
+ {
+ file = g_definition->getOutputFileBase();
+ }
+ else if (g_pageInfo)
+ {
+ file = g_pageInfo->getOutputFileBase();
+ }
+ else
+ {
+ warn(g_fileName,yylineno,"Found section/anchor %s without context\n",g_secLabel.data());
+ }
+ SectionInfo *si=0;
+ if ((si=Doxygen::sectionDict.find(g_secLabel))==0)
+ {
+ si = new SectionInfo(file,g_secLabel,g_secTitle,g_secType);
+ Doxygen::sectionDict.insert(g_secLabel,si);
+ }
+ else if (!si->generated)
+ {
+ warn(g_fileName,yylineno,"Duplicate section/anchor label %s found!\n",
+ g_secLabel.data());
+ }
+}
+
+//--------------------------------------------------------------------------
+
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
@@ -237,14 +286,15 @@ OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG})
LNKWORD1 ("::"|"#")?{SCOPEMASK}
CVSPEC {BLANK}*("const"|"volatile")
LNKWORD2 {SCOPEPRE}*"operator"{OPMASK}
-WORD1 [^ \t\n\r\\@<>{}&$#,.]+|"{"|"}"
-WORD2 "."|","
-WORD1NQ [^ \t\n\r\\@<>{}&$#,."]+
-WORD2NQ "."|","
+WORD1 [^ \t\n\r\\@<>(){}&$#,.]+|"{"|"}"
+WORD2 "."|","|"("|")"
+WORD1NQ [^ \t\n\r\\@<>(){}&$#,."]+
+WORD2NQ "."|","|"("|")"
HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p"
HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P"
HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
+LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
%option noyywrap
%option yylineno
@@ -269,6 +319,12 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
%x St_Ref2
%x St_IntRef
%x St_Text
+%x St_SkipTitle
+
+%x St_Sections
+%s St_SecLabel1
+%s St_SecLabel2
+%s St_SecTitle
%%
<St_Para>\r /* skip carriage return */
@@ -315,12 +371,14 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
g_token->name = yytext+1;
return TK_COMMAND;
}
-<St_Para>("http:"|"https:"|"ftp:"|"file:"|"news:"){URLMASK} {
+<St_Para>("http:"|"https:"|"ftp:"|"file:"|"news:"){URLMASK} { // URL
g_token->name=yytext;
+ g_token->isEMailAddr=FALSE;
return TK_URL;
}
-<St_Para>[a-z_A-Z0-9.-]+"@"[a-z_A-Z0-9-]+"."[a-z_A-Z0-9.-]+ {
+<St_Para>[a-z_A-Z0-9.-]+"@"[a-z_A-Z0-9-]+"."[a-z_A-Z0-9.-]+ { // Mail address
g_token->name=yytext;
+ g_token->isEMailAddr=TRUE;
return TK_URL;
}
<St_Para>"$"{ID}":"[^\n$]+"$" { /* RCS tag */
@@ -408,8 +466,19 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
return TK_COMMAND;
}
<St_Para>({BLANK}*\n)+{BLANK}*\n {
- /* start of a new paragraph */
- return TK_NEWPARA;
+ if (g_insidePre)
+ {
+ /* Inside a <pre>..</pre> blank lines are treated
+ * as whitespace.
+ */
+ g_token->chars=yytext;
+ return TK_WHITESPACE;
+ }
+ else
+ {
+ /* start of a new paragraph */
+ return TK_NEWPARA;
+ }
}
<St_Code>{CMD}"endcode" {
return RetVal_OK;
@@ -621,6 +690,56 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
}
<St_Comment>[^-\n]+ /* inside html comment */
<St_Comment>. /* inside html comment */
+
+ /* State for skipping title (all chars until the end of the line) */
+
+<St_SkipTitle>.
+<St_SkipTitle>\n { return 0; }
+
+ /* State for the pass used to find the anchors and sections */
+
+<St_Sections>[^\n@\\]+
+<St_Sections>"@@"|"\\\\"
+<St_Sections>{CMD}"anchor"{BLANK}+ {
+ g_secType = SectionInfo::Anchor;
+ BEGIN(St_SecLabel1);
+ }
+<St_Sections>{CMD}"section"{BLANK}+ {
+ g_secType = SectionInfo::Section;
+ BEGIN(St_SecLabel2);
+ }
+<St_Sections>{CMD}"subsection"{BLANK}+ {
+ g_secType = SectionInfo::Subsection;
+ BEGIN(St_SecLabel2);
+ }
+<St_Sections>{CMD}"subsubsection"{BLANK}+ {
+ g_secType = SectionInfo::Subsubsection;
+ BEGIN(St_SecLabel2);
+ }
+<St_Sections>{CMD}"paragraph"{BLANK}+ {
+ g_secType = SectionInfo::Paragraph;
+ BEGIN(St_SecLabel2);
+ }
+<St_Sections>.
+<St_Sections>\n
+<St_SecLabel1>{LABELID} {
+ g_secLabel = yytext;
+ processSection();
+ BEGIN(St_Sections);
+ }
+<St_SecLabel2>{LABELID}{BLANK}+ {
+ g_secLabel = yytext;
+ g_secLabel = g_secLabel.stripWhiteSpace();
+ BEGIN(St_SecTitle);
+ }
+<St_SecTitle>[^\n]*\n {
+ g_secTitle = yytext;
+ g_secTitle = g_secTitle.stripWhiteSpace();
+ processSection();
+ BEGIN(St_Sections);
+ }
+
+ /* Generic rules that work for all states */
<*>\n {
warn(g_fileName,yylineno,"Error: Unexpected new line character");
}
@@ -636,11 +755,27 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
//--------------------------------------------------------------------------
+void doctokenizerYYFindSections(const char *input,PageInfo *pi,Definition *d,
+ MemberGroup *mg)
+{
+ if (input==0) return;
+ g_inputString = input;
+ //printf("parsing --->`%s'<---\n",input);
+ g_inputPos = 0;
+ g_pageInfo = pi;
+ g_definition = d;
+ g_memberGroup = mg;
+ BEGIN(St_Sections);
+ doctokenizerYYlineno = 1;
+ doctokenizerYYlex();
+}
+
void doctokenizerYYinit(const char *input,const char *fileName)
{
g_inputString = input;
- g_inputPos = 0;
- g_fileName = fileName;
+ g_inputPos = 0;
+ g_fileName = fileName;
+ g_insidePre = FALSE;
BEGIN(St_Para);
}
@@ -718,11 +853,21 @@ void doctokenizerYYsetStateText()
BEGIN(St_Text);
}
+void doctokenizerYYsetStateSkipTitle()
+{
+ BEGIN(St_SkipTitle);
+}
+
void doctokenizerYYcleanup()
{
yy_delete_buffer( YY_CURRENT_BUFFER );
}
+void doctokenizerYYsetInsidePre(bool b)
+{
+ g_insidePre = b;
+}
+
extern "C" { // some bogus code to keep the compiler happy
void doctokenizerYYdummy() { yy_flex_realloc(0,0); }
}
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index e32300c..a0476f4 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -1149,7 +1149,7 @@ static MemberDef *addVariableToClass(
/*const QCString &scope,*/
const QCString &name,
bool fromAnnScope,
- int indentDepth,
+ /*int indentDepth,*/
MemberDef *fromAnnMemb,
Protection prot)
{
@@ -1236,7 +1236,7 @@ static MemberDef *addVariableToClass(
md->addSectionsToDefinition(root->anchors);
md->setFromAnonymousScope(fromAnnScope);
md->setFromAnonymousMember(fromAnnMemb);
- md->setIndentDepth(indentDepth);
+ //md->setIndentDepth(indentDepth);
md->setBodySegment(root->bodyLine,root->endBodyLine);
md->setInitializer(root->initializer);
md->setMaxInitLines(root->initLines);
@@ -1284,7 +1284,7 @@ static MemberDef *addVariableToFile(
const QCString &scope,
const QCString &name,
bool fromAnnScope,
- int indentDepth,
+ /*int indentDepth,*/
MemberDef *fromAnnMemb)
{
Debug::print(Debug::Variables,0,
@@ -1403,7 +1403,7 @@ static MemberDef *addVariableToFile(
md->addSectionsToDefinition(root->anchors);
md->setFromAnonymousScope(fromAnnScope);
md->setFromAnonymousMember(fromAnnMemb);
- md->setIndentDepth(indentDepth);
+ //md->setIndentDepth(indentDepth);
md->setBodySegment(root->bodyLine,root->endBodyLine);
md->setInitializer(root->initializer);
md->setMaxInitLines(root->initLines);
@@ -1661,7 +1661,7 @@ void buildVarList(Entry *root)
if (cd)
{
addVariableToClass(root,cd,MemberDef::Friend,/*scope,*/
- root->name,FALSE,0,0,Public);
+ root->name,FALSE,/*0,*/0,Public);
}
}
goto nextMember;
@@ -1693,44 +1693,51 @@ void buildVarList(Entry *root)
scope=classScope;
if (!scope.isEmpty() && !name.isEmpty() && (cd=getClass(scope)))
{
+ // TODO: clean up this mess!
MemberDef *md=0;
// if cd is an annonymous scope we insert the member
// into a non-annonymous scope as well.
- int indentDepth=0;
+ //int indentDepth=0;
int si=scope.find('@');
+ //int anonyScopes = 0;
+ bool added=FALSE;
if (si!=-1)
{
- //printf("name=`%s' scope=%s\n",name.data(),scope.data());
QCString pScope;
ClassDef *pcd=0;
pScope = scope.left(QMAX(si-2,0));
- indentDepth = scope.right(scope.length()-si).contains("::")+1;
if (!pScope.isEmpty())
pScope.prepend(annScopePrefix);
else if (annScopePrefix.length()>2)
pScope=annScopePrefix.left(annScopePrefix.length()-2);
- //printf("pScope=`%s'\n",pScope.data());
if (name.at(0)!='@')
{
if (!pScope.isEmpty() && (pcd=getClass(pScope)))
{
//Protection p = (Protection)QMAX((int)root->protection,(int)cd->protection());
- md=addVariableToClass(root,pcd,mtype,/*pScope,*/name,TRUE,indentDepth,0,root->protection);
+ md=addVariableToClass(root,pcd,mtype,name,
+ TRUE,0,root->protection);
+ added=TRUE;
}
else // annonymous scope inside namespace or file => put variable in the global scope
{
- //printf("Inserting member in global scope %s!\n",pScope.data());
- //md=addVariableToFile(root,mtype,pScope,name,!pScope.isEmpty(),indentDepth,0);
- md=addVariableToFile(root,mtype,pScope,name,TRUE,indentDepth,0);
+ md=addVariableToFile(root,mtype,pScope,name,TRUE,0);
+ added=TRUE;
}
}
- }
- addVariableToClass(root,cd,mtype,/*scope,*/name,FALSE,indentDepth,md,root->protection);
+ }
+ //printf("name=`%s' scope=%s scope.right=%s indentDepth=%d anonyScopes=%d\n",
+ // name.data(),scope.data(),
+ // scope.right(scope.length()-si).data(),
+ // indentDepth,
+ // anonyScopes);
+ addVariableToClass(root,cd,mtype,name,
+ FALSE,md,root->protection);
}
else if (!name.isEmpty()) // global variable
{
//printf("Inserting member in global scope %s!\n",scope.data());
- addVariableToFile(root,mtype,scope,name,FALSE,0,0);
+ addVariableToFile(root,mtype,scope,name,FALSE,/*0,*/0);
}
//if (mtype==MemberDef::Typedef)
//{
@@ -5719,6 +5726,53 @@ static void distributeMemberGroupDocumentation()
//----------------------------------------------------------------------------
+static void findSectionsInDocumentation()
+{
+ // for each class
+ ClassSDict::Iterator cli(Doxygen::classSDict);
+ ClassDef *cd;
+ for ( ; (cd=cli.current()) ; ++cli )
+ {
+ cd->findSectionsInDocumentation();
+ }
+ // for each file
+ FileName *fn=Doxygen::inputNameList.first();
+ while (fn)
+ {
+ FileDef *fd=fn->first();
+ while (fd)
+ {
+ fd->findSectionsInDocumentation();
+ fd=fn->next();
+ }
+ fn=Doxygen::inputNameList.next();
+ }
+ // for each namespace
+ NamespaceSDict::Iterator nli(Doxygen::namespaceSDict);
+ NamespaceDef *nd;
+ for ( ; (nd=nli.current()) ; ++nli )
+ {
+ nd->findSectionsInDocumentation();
+ }
+ // for each group
+ GroupSDict::Iterator gli(Doxygen::groupSDict);
+ GroupDef *gd;
+ for (gli.toFirst();(gd=gli.current());++gli)
+ {
+ gd->findSectionsInDocumentation();
+ }
+ // for each page
+ PageSDict::Iterator pdi(*Doxygen::pageSDict);
+ PageInfo *pi=0;
+ for (pdi.toFirst();(pi=pdi.current());++pdi)
+ {
+ pi->findSectionsInDocumentation();
+ }
+ if (Doxygen::mainPage) Doxygen::mainPage->findSectionsInDocumentation();
+}
+
+//----------------------------------------------------------------------------
+
static void findDefineDocumentation(Entry *root)
{
if ((root->section==Entry::DEFINEDOC_SEC ||
@@ -5896,8 +5950,10 @@ static void findMainPage(Entry *root)
// a page name is a label as well!
SectionInfo *si=new SectionInfo(
- Doxygen::mainPage->name,Doxygen::mainPage->title,SectionInfo::Section);
- si->fileName=indexName;
+ indexName,
+ Doxygen::mainPage->name,
+ Doxygen::mainPage->title,
+ SectionInfo::Section);
Doxygen::sectionDict.insert(indexName,si);
}
else
@@ -7700,8 +7756,10 @@ void parseInput()
msg("Adding source references...\n");
addSourceReferences();
+
msg("Adding todo/test/bug list items...\n");
addListReferences();
+
}
void generateOutput()
@@ -7775,6 +7833,9 @@ void generateOutput()
msg("Resolving user defined references...\n");
resolveUserReferences();
+ msg("Finding anchor and section in the documentation...\n");
+ findSectionsInDocumentation();
+
msg("Generating index page...\n");
writeIndex(*outputList);
diff --git a/src/filedef.cpp b/src/filedef.cpp
index e2e6be0..00f8f2c 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -29,6 +29,7 @@
#include "dot.h"
#include "message.h"
#include "code.h"
+#include "docparser.h"
//#include "xml.h"
/*! create a new file definition, where \a p is the file path,
@@ -97,6 +98,23 @@ void FileDef::distributeMemberGroupDocumentation()
}
}
+void FileDef::findSectionsInDocumentation()
+{
+ docFindSections(documentation(),0,this,0);
+ MemberGroupSDict::Iterator mgli(*memberGroupSDict);
+ MemberGroup *mg;
+ for (;(mg=mgli.current());++mgli)
+ {
+ mg->findSectionsInDocumentation();
+ }
+ decDefineMembers.findSectionsInDocumentation();
+ decProtoMembers.findSectionsInDocumentation();
+ decTypedefMembers.findSectionsInDocumentation();
+ decEnumMembers.findSectionsInDocumentation();
+ decFuncMembers.findSectionsInDocumentation();
+ decVarMembers.findSectionsInDocumentation();
+}
+
void FileDef::writeDetailedDocumentation(OutputList &ol)
{
if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
@@ -369,7 +387,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.docify(nd->displayName());
ol.endBold();
}
- ol.endMemberItem(FALSE);
+ ol.endMemberItem();
}
}
if (found) ol.endMemberList();
diff --git a/src/filedef.h b/src/filedef.h
index acd39ed..d49cd8f 100644
--- a/src/filedef.h
+++ b/src/filedef.h
@@ -145,6 +145,7 @@ class FileDef : public Definition
void addMembersToMemberGroup();
void distributeMemberGroupDocumentation();
+ void findSectionsInDocumentation();
void addListReferences();
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index 804d948..bd527c9 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -104,6 +104,23 @@ void GroupDef::distributeMemberGroupDocumentation()
}
}
+void GroupDef::findSectionsInDocumentation()
+{
+ docFindSections(documentation(),0,this,0);
+ MemberGroupSDict::Iterator mgli(*memberGroupSDict);
+ MemberGroup *mg;
+ for (;(mg=mgli.current());++mgli)
+ {
+ mg->findSectionsInDocumentation();
+ }
+ decDefineMembers.findSectionsInDocumentation();
+ decProtoMembers.findSectionsInDocumentation();
+ decTypedefMembers.findSectionsInDocumentation();
+ decEnumMembers.findSectionsInDocumentation();
+ decFuncMembers.findSectionsInDocumentation();
+ decVarMembers.findSectionsInDocumentation();
+}
+
void GroupDef::addFile(const FileDef *def)
{
if (Config_getBool("SORT_MEMBER_DOCS"))
@@ -435,7 +452,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
{
Doxygen::tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl;
}
- ol.endMemberItem(FALSE);
+ ol.endMemberItem();
if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription();
@@ -466,7 +483,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
{
Doxygen::tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl;
}
- ol.endMemberItem(FALSE);
+ ol.endMemberItem();
if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription();
@@ -496,7 +513,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
{
Doxygen::tagFile << " <subgroup>" << convertToXML(gd->name()) << "</subgroup>" << endl;
}
- ol.endMemberItem(FALSE);
+ ol.endMemberItem();
if (!gd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription();
diff --git a/src/groupdef.h b/src/groupdef.h
index 60dcba3..9246c9f 100644
--- a/src/groupdef.h
+++ b/src/groupdef.h
@@ -74,6 +74,7 @@ class GroupDef : public Definition
void addMembersToMemberGroup();
void distributeMemberGroupDocumentation();
+ void findSectionsInDocumentation();
void addListReferences();
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 982dc39..6d127c6 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -110,7 +110,9 @@ void HtmlDocVisitor::visit(DocSymbol *s)
void HtmlDocVisitor::visit(DocURL *u)
{
if (m_hide) return;
- m_t << "<a href=\"" << u->url() << "\">";
+ m_t << "<a href=\"";
+ if (u->isEmail()) m_t << "mailto:";
+ m_t << u->url() << "\">";
filter(u->url());
m_t << "</a>";
}
@@ -156,7 +158,7 @@ void HtmlDocVisitor::visit(DocStyleChange *s)
case DocStyleChange::Preformatted:
if (s->enable())
{
- m_t << "<pre" << htmlAttribsToString(s->attribs()) << ">\n";
+ m_t << "<pre" << htmlAttribsToString(s->attribs()) << ">";
m_insidePre=TRUE;
}
else
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 02f2b91..7b24074 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -766,7 +766,7 @@ void HtmlGenerator::startMemberItem(int annoType)
}
}
-void HtmlGenerator::endMemberItem(bool)
+void HtmlGenerator::endMemberItem()
{
//DBG_HTML(t << "<!-- endMemberItem(" << (int)inGroup << "," << fileName << "," << headerName << " -->" << endl)
if (Config_getBool("HTML_ALIGN_MEMBERS"))
diff --git a/src/htmlgen.h b/src/htmlgen.h
index 5f8c13c..9e29d89 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -94,7 +94,10 @@ class HtmlGenerator : public OutputGenerator
void endMemberSubtitle();
void startMemberList();
void endMemberList();
+ void startAnonTypeScope(int) {}
+ void endAnonTypeScope(int) {}
void startMemberItem(int);
+ void endMemberItem();
void startMemberGroupHeader(bool);
void endMemberGroupHeader();
@@ -104,7 +107,6 @@ class HtmlGenerator : public OutputGenerator
void endMemberGroup(bool);
void insertMemberAlign();
- void endMemberItem(bool);
void startMemberDescription();
void endMemberDescription();
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index e226168..38e335b 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -158,7 +158,9 @@ void LatexDocVisitor::visit(DocURL *u)
if (m_hide) return;
if (Config_getBool("PDF_HYPERLINKS"))
{
- m_t << "\\href{" << u->url() << "}";
+ m_t << "\\href{";
+ if (u->isEmail()) m_t << "mailto:";
+ m_t << u->url() << "}";
}
m_t << "{\\tt ";
filter(u->url());
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 09ecae4..f95c174 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -1238,59 +1238,6 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType)
t << "}\\label{" << lab << "}" << endl;
}
-//void LatexGenerator::writeSectionRef(const char *ref,const char *,
-// const char *lab,const char *text)
-//{
-// if (ref) // external reference
-// {
-// docify(text);
-// }
-// else // local reference
-// {
-// if (text && Config_getBool("PDF_HYPERLINKS"))
-// {
-// t << "\\hyperlink{";
-// if (lab) t << lab;
-// t << "}{";
-// docify(text);
-// t << "}";
-// //t << " {\\rm (p.\\,\\pageref{" << lab << "})}";
-// }
-// else
-// {
-// if (strcmp(lab,text)!=0) // lab!=text
-// {
-// // todo: don't hardcode p. here!
-// t << "{\\bf ";
-// docify(text);
-// t << "} {\\rm (p.\\,\\pageref{" << lab << "})}";
-// }
-// else
-// {
-// t << "\\ref{" << lab << "}";
-// }
-// }
-// }
-//}
-//
-//void LatexGenerator::writeSectionRefItem(const char *,const char *lab,
-// const char *title)
-//{
-// t << "\\item \\contentsline{section}{";
-// docify(title);
-// t << "}{\\ref{" << lab << "}}{}" << endl;
-//}
-//
-// TODO: remove this function
-//void LatexGenerator::writeSectionRefAnchor(const char *,const char *lab,
-// const char *title)
-//{
-// startBold();
-// docify(title);
-// endBold();
-// t << " (p.\\,\\pageref{" << lab << "})" << endl;
-//}
-
//void LatexGenerator::docifyStatic(QTextStream &t,const char *str)
void LatexGenerator::docify(const char *str)
@@ -1364,42 +1311,42 @@ void LatexGenerator::endClassDiagram(ClassDiagram &d,
d.writeFigure(t,dir,fileName);
}
-//void LatexGenerator::writeFormula(const char *,const char *text)
-//{
-// t << text;
-//}
-void LatexGenerator::startMemberItem(int annType)
-{
- if (!insideTabbing)
+void LatexGenerator::startAnonTypeScope(int indent)
+{
+ if (indent==0)
{
- t << "\\item " << endl;
- switch(annType)
- {
- case 0: break;
- case 1:
- default:
- t << "\\begin{tabbing}" << endl;
- t << "xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=\\kill" << endl;
- //printf("LatexGenerator::startMemberItem() insideTabbing=TRUE\n");
- insideTabbing=TRUE;
- break;
- }
+ t << "\\begin{tabbing}" << endl;
+ t << "xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=\\kill" << endl;
+ //printf("LatexGenerator::startMemberItem() insideTabbing=TRUE\n");
+ insideTabbing=TRUE;
}
}
-void LatexGenerator::endMemberItem(bool endItem)
+void LatexGenerator::endAnonTypeScope(int indent)
{
- if (insideTabbing && endItem)
+ if (indent==0)
{
t << endl << "\\end{tabbing}";
- //printf("LatexGenerator::endMemberItem() insideTabbing=FALSE\n");
insideTabbing=FALSE;
}
+}
+
+void LatexGenerator::startMemberItem(int)
+{
+ //printf("LatexGenerator::startMemberItem(%d)\n",annType);
+ if (!insideTabbing)
+ {
+ t << "\\item " << endl;
+ }
+}
+
+void LatexGenerator::endMemberItem()
+{
if (insideTabbing)
{
t << "\\\\";
- }
+ }
t << endl;
}
@@ -1414,95 +1361,20 @@ void LatexGenerator::writeNonBreakableSpace(int)
void LatexGenerator::startMemberList()
{
if (!insideTabbing)
+ {
t << "\\begin{CompactItemize}" << endl;
+ }
}
void LatexGenerator::endMemberList()
{
+ //printf("LatexGenerator::endMemberList(%d)\n",insideTabbing);
if (!insideTabbing)
+ {
t << "\\end{CompactItemize}" << endl;
+ }
}
-//void LatexGenerator::startImage(const char *name,const char *size,bool hasCaption)
-//{
-// if (hasCaption)
-// {
-// t << "\\begin{figure}[H]" << endl;
-// t << "\\begin{center}" << endl;
-// }
-// else
-// {
-// t << "\\mbox{";
-// }
-// QCString gfxName = name;
-// if (gfxName.right(4)==".eps") gfxName.left(gfxName.length()-4);
-// // "\\epsfig{file=" << name;
-// t << "\\includegraphics";
-// if (size) t << "[" << size << "]";
-// t << "{" << gfxName << "}";
-// if (hasCaption)
-// {
-// t << "\\caption{";
-// }
-// else
-// {
-// t << "}" << endl;
-// }
-//}
-//
-//void LatexGenerator::endImage(bool hasCaption)
-//{
-// if (hasCaption)
-// {
-// t << "}" << endl;
-// t << "\\end{center}" << endl;
-// t << "\\end{figure}" << endl;
-// }
-//}
-//
-//void LatexGenerator::startDotFile(const char *name,bool hasCaption)
-//{
-// QCString baseName=name;
-// int i;
-// if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
-// {
-// baseName=baseName.right(baseName.length()-i-1);
-// }
-// QCString outDir = Config_getString("LATEX_OUTPUT");
-// writeDotGraphFromFile(name,outDir,baseName,EPS);
-// if (hasCaption)
-// {
-// t << "\\begin{figure}[H]" << endl;
-// t << "\\begin{center}" << endl;
-// }
-// else
-// t << "\\mbox{";
-// t << "\\includegraphics";
-// if( Config_getBool("USE_PDFLATEX") )
-// {
-// t << "{" << baseName << ".pdf}";
-// }
-// else
-// {
-// t << "{" << baseName << ".eps}";
-// }
-//
-// if (hasCaption)
-// t << "\\caption{";
-// else
-// t << "}" << endl;
-//}
-//
-//void LatexGenerator::endDotFile(bool hasCaption)
-//{
-// if (hasCaption)
-// {
-// t << "}" << endl;
-// t << "\\end{center}" << endl;
-// t << "\\end{figure}" << endl;
-// }
-//}
-//
void LatexGenerator::startMemberGroupHeader(bool hasHeader)
{
@@ -1615,19 +1487,6 @@ void LatexGenerator::endParamList()
t << "\\end{Desc}" << endl;
}
-//void LatexGenerator::startSectionRefList()
-//{
-// t << "\\footnotesize" << endl;
-// t << "\\begin{multicols}{2}" << endl;
-// t << "\\begin{CompactList}" << endl;
-//}
-
-//void LatexGenerator::endSectionRefList()
-//{
-// t << "\\end{CompactList}" << endl;
-// t << "\\end{multicols}" << endl;
-// t << "\\normalsize" << endl;
-//}
void LatexGenerator::printDoc(DocNode *n)
{
diff --git a/src/latexgen.h b/src/latexgen.h
index e03177b..7227daf 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -102,8 +102,10 @@ class LatexGenerator : public OutputGenerator
void endMemberSubtitle() {}
void startMemberList();
void endMemberList();
+ void startAnonTypeScope(int);
+ void endAnonTypeScope(int);
void startMemberItem(int);
- void endMemberItem(bool);
+ void endMemberItem();
void startMemberGroupHeader(bool);
void endMemberGroupHeader();
diff --git a/src/mangen.cpp b/src/mangen.cpp
index 06f0204..d6df66d 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -473,21 +473,32 @@ void ManGenerator::endDescItem()
firstCol=TRUE;
}
-void ManGenerator::startMemberItem(int annType)
+void ManGenerator::startAnonTypeScope(int indentLevel)
+{
+ if (indentLevel==0)
+ {
+ insideTabbing=TRUE;
+ }
+}
+
+void ManGenerator::endAnonTypeScope(int indentLevel)
+{
+ if (indentLevel==0)
+ {
+ insideTabbing=FALSE;
+ }
+}
+
+
+void ManGenerator::startMemberItem(int)
{
if (firstCol && !insideTabbing) t << ".in +1c\n";
t << "\n.ti -1c\n.RI \"";
firstCol=FALSE;
- if (annType!=0) insideTabbing=TRUE;
}
-void ManGenerator::endMemberItem(bool endItem)
+void ManGenerator::endMemberItem()
{
- if (endItem)
- {
- insideTabbing=FALSE;
- t << "\"\n.br\n.RI \"";
- }
t << "\"\n.br";
}
@@ -619,5 +630,6 @@ void ManGenerator::printDoc(DocNode *n)
ManDocVisitor *visitor = new ManDocVisitor(t,*this);
n->accept(visitor);
delete visitor;
+ firstCol=FALSE;
}
diff --git a/src/mangen.h b/src/mangen.h
index 12af60b..9c91102 100644
--- a/src/mangen.h
+++ b/src/mangen.h
@@ -100,8 +100,10 @@ class ManGenerator : public OutputGenerator
void writeListItem();
void startMemberList();
void endMemberList();
+ void startAnonTypeScope(int);
+ void endAnonTypeScope(int);
void startMemberItem(int);
- void endMemberItem(bool);
+ void endMemberItem();
void startMemberGroupHeader(bool);
void endMemberGroupHeader();
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index cc8e0f2..4450a8f 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -30,8 +30,14 @@
#include "membergroup.h"
#include "groupdef.h"
#include "defargs.h"
+#include "docparser.h"
//#include "xml.h"
+
+//-----------------------------------------------------------------------------
+
+int MemberDef::s_indentLevel = 0;
+
//-----------------------------------------------------------------------------
static QCString addTemplateNames(const QCString &s,const QCString &n,const QCString &t)
@@ -307,7 +313,7 @@ MemberDef::MemberDef(const char *df,int dl,
annUsed=FALSE;
annShown=FALSE;
annEnumType=0;
- indDepth=0;
+ //indDepth=0;
section=0;
bodyMemb=0;
explExt=FALSE;
@@ -560,9 +566,11 @@ bool MemberDef::isBriefSectionVisible() const
// 0,"", //grpId,grpId==-1?"<none>":Doxygen::memberDocDict[grpId]->data(),
// "", //getFileDef()->name().data(),
// argsString());
+
+ QCString *pMemGrp = Doxygen::memberDocDict[grpId];
bool hasDocs = hasDocumentation() ||
// part of a documented member group
- (grpId!=-1 && !Doxygen::memberDocDict[grpId]->isEmpty());
+ (grpId!=-1 && pMemGrp && !pMemGrp->isEmpty());
// only include static members with file/namespace scope if
// explicitly enabled in the config file
@@ -636,6 +644,7 @@ bool MemberDef::isBriefSectionVisible() const
return visible;
}
+
void MemberDef::writeDeclaration(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
bool inGroup
@@ -705,6 +714,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
ClassDef *annoClassDef=getClassDefOfAnonymousType();
// start a new member declaration
+ ///printf("startMemberItem for %s\n",name().data());
ol.startMemberItem((annoClassDef || annMemb || annEnumType) ? 1 : 0);
// If there is no detailed description we need to write the anchor here.
@@ -728,11 +738,10 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol.popGeneratorState();
}
- //printf("member name=%s indDepth=%d\n",name().data(),indDepth);
if (annoClassDef || annMemb)
{
int j;
- for (j=0;j<indDepth;j++)
+ for (j=0;j<s_indentLevel;j++)
{
ol.writeNonBreakableSpace(3);
}
@@ -752,6 +761,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (ltype.left(7)=="friend ") ltype=ltype.right(ltype.length()-7);
static QRegExp r("@[0-9]+");
+ bool endAnonScopeNeeded=FALSE;
int l,i=r.match(ltype,0,&l);
if (i!=-1) // member has an anonymous type
{
@@ -761,10 +771,13 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (annoClassDef) // type is an anonymous compound
{
int ir=i+l;
+ //printf("<<<<<<<<<<<<<<\n");
+ ol.startAnonTypeScope(s_indentLevel++);
annoClassDef->writeDeclaration(ol,annMemb,inGroup);
+ //printf(">>>>>>>>>>>>>> startMemberItem(2)\n");
ol.startMemberItem(2);
int j;
- for (j=0;j<indDepth;j++)
+ for (j=0;j< s_indentLevel-1;j++)
{
ol.writeNonBreakableSpace(3);
}
@@ -775,6 +788,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
{
ol.docify(";");
}
+ endAnonScopeNeeded=TRUE;
}
else
{
@@ -900,9 +914,11 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol.endDoxyAnchor(cfname,anchor());
}
- ol.endMemberItem((annoClassDef!=0 && indDepth==0) || annEnumType);
+ //printf("endMember %s annoClassDef=%p annEnumType=%p\n",
+ // name().data(),annoClassDef,annEnumType);
+ ol.endMemberItem();
+ if (endAnonScopeNeeded) ol.endAnonTypeScope(--s_indentLevel);
- //ol.endMemberItem(gId!=-1,gFile,gHeader,annoClassDef || annMemb);
// write brief description
if (!briefDescription().isEmpty() &&
Config_getBool("BRIEF_MEMBER_DESC") &&
@@ -1944,8 +1960,15 @@ void MemberDef::setArgumentList(ArgumentList *al)
if (defArgList) delete defArgList;
defArgList = al;
}
+
void MemberDef::setDeclArgumentList(ArgumentList *al)
{
if (declArgList) delete declArgList;
declArgList = al;
}
+
+void MemberDef::findSectionsInDocumentation()
+{
+ docFindSections(documentation(),0,this,0);
+}
+
diff --git a/src/memberdef.h b/src/memberdef.h
index 7a8aba3..360d382 100644
--- a/src/memberdef.h
+++ b/src/memberdef.h
@@ -21,6 +21,7 @@
#include "qtbc.h"
#include <qlist.h>
#include <qdict.h>
+#include <qstack.h>
#include "entry.h"
#include "definition.h"
@@ -221,8 +222,8 @@ class MemberDef : public Definition
void setFromAnonymousMember(MemberDef *m) { annMemb=m; }
bool fromAnonymousScope() const { return annScope; }
bool anonymousDeclShown() const { return annUsed; }
- void setIndentDepth( int i) { indDepth=i; }
- int indentDepth() { return indDepth; }
+ //void setIndentDepth( int i) { indDepth=i; }
+ //int indentDepth() { return indDepth; }
bool visibleMemberGroup(bool hideNoHeader);
MemberDef *templateMaster() const { return m_templateMaster; }
@@ -251,6 +252,7 @@ class MemberDef : public Definition
void writeEnumDeclaration(OutputList &typeDecl,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd);
+ void findSectionsInDocumentation();
bool visited;
@@ -290,7 +292,7 @@ class MemberDef : public Definition
bool annScope; // member is part of an annoymous scope
bool annUsed;
bool annShown;
- int indDepth; // indentation depth for this member if inside an annonymous scope
+ //int indDepth; // indentation depth for this member if inside an annonymous scope
int maxInitLines; // when the initializer will be displayed
int userInitLines; // result of explicit \hideinitializer or \showinitializer
MemberList *section; // declation list containing this member
@@ -323,6 +325,7 @@ class MemberDef : public Definition
// disable copying of member defs
MemberDef(const MemberDef &);
MemberDef &operator=(const MemberDef &);
+ static int s_indentLevel;
};
#endif
diff --git a/src/membergroup.cpp b/src/membergroup.cpp
index 9bb5f17..537d55d 100644
--- a/src/membergroup.cpp
+++ b/src/membergroup.cpp
@@ -27,6 +27,7 @@
#include "scanner.h"
#include "groupdef.h"
#include "doxygen.h"
+#include "docparser.h"
//static QCString idToName(int id)
//{
@@ -35,17 +36,19 @@
// return result;
//}
-MemberGroup::MemberGroup(int id,const char *hdr,const char *d) /* : Definition(idToName(id)) */
+MemberGroup::MemberGroup(Definition *parent,
+ int id,const char *hdr,const char *d) /* : Definition(idToName(id)) */
{
//printf("New member group id=%d header=%s desc=%s\n",id,hdr,d);
- memberList = new MemberList;
- grpId = id;
- grpHeader = hdr;
- doc = d;
- scope = 0;
- inSameSection = TRUE;
- inDeclSection = 0;
+ memberList = new MemberList;
+ grpId = id;
+ grpHeader = hdr;
+ doc = d;
+ scope = 0;
+ inSameSection = TRUE;
+ inDeclSection = 0;
m_numDecMembers = -1;
+ m_parent = parent;
//printf("Member group docs=`%s'\n",doc.data());
}
@@ -210,3 +213,10 @@ void MemberGroup::addListReferences(Definition *def)
{
memberList->addListReferences(def);
}
+
+void MemberGroup::findSectionsInDocumentation()
+{
+ docFindSections(doc,0,0,this);
+ memberList->findSectionsInDocumentation();
+}
+
diff --git a/src/membergroup.h b/src/membergroup.h
index ee15dea..d5f543e 100644
--- a/src/membergroup.h
+++ b/src/membergroup.h
@@ -36,7 +36,7 @@ class Definition;
class MemberGroup
{
public:
- MemberGroup(int id,const char *header,const char *docs);
+ MemberGroup(Definition *parent,int id,const char *header,const char *docs);
~MemberGroup();
QCString header() const { return grpHeader; }
int groupId() const { return grpId; }
@@ -54,6 +54,7 @@ class MemberGroup
void addToDeclarationSection();
int countDecMembers(/*bool sectionPerType*/);
void distributeMemberGroupDocumentation();
+ void findSectionsInDocumentation();
int varCount() const;
int funcCount() const;
int enumCount() const;
@@ -67,6 +68,7 @@ class MemberGroup
void setInGroup(bool b);
void addListReferences(Definition *d);
MemberList *members() const { return memberList; }
+ Definition *parent() const { return m_parent; }
private:
MemberList *memberList; // list of all members in the group
@@ -78,6 +80,7 @@ class MemberGroup
MemberList *inDeclSection;
bool inSameSection;
int m_numDecMembers;
+ Definition *m_parent;
};
class MemberGroupList : public QList<MemberGroup>
diff --git a/src/memberlist.cpp b/src/memberlist.cpp
index 8f748a0..f694159 100644
--- a/src/memberlist.cpp
+++ b/src/memberlist.cpp
@@ -344,7 +344,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
ol.insertMemberAlign();
//ol+=typeDecl; // append the enum values.
md->writeEnumDeclaration(ol,cd,nd,fd,gd);
- ol.endMemberItem(FALSE);
+ ol.endMemberItem();
if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{
ol.startMemberDescription();
@@ -537,6 +537,25 @@ void MemberList::addListReferences(Definition *def)
}
}
+void MemberList::findSectionsInDocumentation()
+{
+ MemberListIterator mli(*this);
+ MemberDef *md;
+ for ( ; (md=mli.current()) ; ++mli)
+ {
+ md->findSectionsInDocumentation();
+ }
+ if (memberGroupList)
+ {
+ MemberGroupListIterator mgli(*memberGroupList);
+ MemberGroup *mg;
+ for (;(mg=mgli.current());++mgli)
+ {
+ mg->findSectionsInDocumentation();
+ }
+ }
+}
+
//--------------------------------------------------------------------------
int MemberSDict::compareItems(GCI item1, GCI item2)
diff --git a/src/memberlist.h b/src/memberlist.h
index dc93cc7..8dba41b 100644
--- a/src/memberlist.h
+++ b/src/memberlist.h
@@ -57,6 +57,7 @@ class MemberList : public QList<MemberDef>
void addMemberGroup(MemberGroup *mg);
void setInGroup(bool group) { m_inGroup=group; }
void addListReferences(Definition *def);
+ void findSectionsInDocumentation();
private:
int m_varCnt,m_funcCnt,m_enumCnt,m_enumValCnt,m_typeCnt;
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index b0842f5..cac8dc9 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -25,6 +25,7 @@
#include "memberlist.h"
#include "doxygen.h"
#include "message.h"
+#include "docparser.h"
NamespaceDef::NamespaceDef(const char *df,int dl,
const char *name,const char *lref) :
@@ -61,6 +62,24 @@ void NamespaceDef::distributeMemberGroupDocumentation()
mg->distributeMemberGroupDocumentation();
}
}
+
+void NamespaceDef::findSectionsInDocumentation()
+{
+ docFindSections(documentation(),0,this,0);
+ MemberGroupSDict::Iterator mgli(*memberGroupSDict);
+ MemberGroup *mg;
+ for (;(mg=mgli.current());++mgli)
+ {
+ mg->findSectionsInDocumentation();
+ }
+ decDefineMembers.findSectionsInDocumentation();
+ decProtoMembers.findSectionsInDocumentation();
+ decTypedefMembers.findSectionsInDocumentation();
+ decEnumMembers.findSectionsInDocumentation();
+ decFuncMembers.findSectionsInDocumentation();
+ decVarMembers.findSectionsInDocumentation();
+}
+
void NamespaceDef::insertUsedFile(const char *f)
{
if (files.find(f)==-1)
diff --git a/src/namespacedef.h b/src/namespacedef.h
index 825242e..37c1e9b 100644
--- a/src/namespacedef.h
+++ b/src/namespacedef.h
@@ -72,6 +72,7 @@ class NamespaceDef : public Definition
}
void addMembersToMemberGroup();
void distributeMemberGroupDocumentation();
+ void findSectionsInDocumentation();
virtual Definition *findInnerCompound(const char *name);
void addInnerCompound(Definition *d);
diff --git a/src/outputgen.h b/src/outputgen.h
index f25bd8b..037eafc 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -302,8 +302,10 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endMemberSubtitle() = 0;
virtual void startMemberList() = 0;
virtual void endMemberList() = 0;
+ virtual void startAnonTypeScope(int) = 0;
+ virtual void endAnonTypeScope(int) = 0;
virtual void startMemberItem(int) = 0;
- virtual void endMemberItem(bool) = 0;
+ virtual void endMemberItem() = 0;
virtual void startMemberGroupHeader(bool) = 0;
virtual void endMemberGroupHeader() = 0;
virtual void startMemberGroupDocs() = 0;
diff --git a/src/outputlist.h b/src/outputlist.h
index fc49f1e..bd47bbe 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -161,10 +161,14 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startMemberList); }
void endMemberList()
{ forall(&OutputGenerator::endMemberList); }
+ void startAnonTypeScope(int i1)
+ { forall(&OutputGenerator::startAnonTypeScope,i1); }
+ void endAnonTypeScope(int i1)
+ { forall(&OutputGenerator::endAnonTypeScope,i1); }
void startMemberItem(int i1)
{ forall(&OutputGenerator::startMemberItem,i1); }
- void endMemberItem(bool b2)
- { forall(&OutputGenerator::endMemberItem,b2); }
+ void endMemberItem()
+ { forall(&OutputGenerator::endMemberItem); }
void startMemberGroupHeader(bool b)
{ forall(&OutputGenerator::startMemberGroupHeader,b); }
void endMemberGroupHeader()
diff --git a/src/page.h b/src/page.h
index 331fbc7..8df76cf 100644
--- a/src/page.h
+++ b/src/page.h
@@ -17,8 +17,10 @@
#include "sortdict.h"
#include "config.h"
+#include "docparser.h"
#include "section.h"
+#include "doxygen.h"
class PageInfo
{
@@ -76,6 +78,10 @@ class PageInfo
}
}
}
+ void findSectionsInDocumentation()
+ {
+ docFindSections(doc,this,0,0);
+ }
void writeDocAnchorsToTagFile()
{
diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp
index a11e857..1b975c8 100644
--- a/src/rtfdocvisitor.cpp
+++ b/src/rtfdocvisitor.cpp
@@ -202,6 +202,7 @@ void RTFDocVisitor::visit(DocURL *u)
m_t << "{\\field "
"{\\*\\fldinst "
"{ HYPERLINK \\\\l \"";
+ if (u->isEmail()) m_t << "mailto:";
m_t << u->url();
m_t << "\" }"
"{}";
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 7965c9c..d76d817 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -1722,7 +1722,7 @@ void RTFGenerator::startMemberItem(int)
t << rtf_Style_Reset << rtf_BList_DepthStyle() << endl; // set style to apropriate depth
}
-void RTFGenerator::endMemberItem(bool)
+void RTFGenerator::endMemberItem()
{
DBG_RTF(t <<"{\\comment endMemberItem }" << endl)
newParagraph();
diff --git a/src/rtfgen.h b/src/rtfgen.h
index 45ec1de..751622b 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -103,8 +103,10 @@ class RTFGenerator : public OutputGenerator
void endMemberSubtitle();
void startMemberList();
void endMemberList();
+ void startAnonTypeScope(int) {}
+ void endAnonTypeScope(int) {}
void startMemberItem(int);
- void endMemberItem(bool);
+ void endMemberItem();
//void memberGroupSpacing(bool) {}
//void memberGroupSeparator() {}
void insertMemberAlign() {}
diff --git a/src/scanner.l b/src/scanner.l
index 67ec602..a346085 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -111,8 +111,8 @@ static char afterDocTerminator;
static int tmpDocType;
static QCString sectionLabel;
static QCString sectionTitle;
-static SectionInfo::SectionType
- sectionType;
+//static SectionInfo::SectionType
+// sectionType;
static QCString funcPtrType;
static QCString templateStr;
static QCString aliasName;
@@ -279,6 +279,7 @@ static void newDocState();
//-----------------------------------------------------------------
+#if 0
static void addSection()
{
//printf("New section pageName=%s label=%s title=%s\n",
@@ -292,8 +293,7 @@ static void addSection()
if (sectionLabel.isEmpty()) return;
if (Doxygen::sectionDict.find(sectionLabel)==0)
{
- SectionInfo *si=new SectionInfo(sectionLabel,sectionTitle,sectionType);
- si->fileName = current->name;
+ SectionInfo *si=new SectionInfo(current->name,sectionLabel,sectionTitle,sectionType);
//printf("Adding section addr=%p label=`%s' sectionTitle=`%s' fileName=%s\n",si,sectionLabel.data(),sectionTitle.data(),si->fileName.data());
Doxygen::sectionDict.insert(sectionLabel,si);
current->anchors->append(new QCString(sectionLabel));
@@ -305,6 +305,61 @@ static void addSection()
}
sectionTitle.resize(0);
}
+#endif
+
+static void addSpecialItem(const char *listName)
+{
+ ListItemInfo *lii=0;
+ RefList *refList = Doxygen::specialLists->find(listName);
+ ASSERT(refList!=0);
+ if (current->sli)
+ {
+ QListIterator<ListItemInfo> slii(*current->sli);
+ for (slii.toFirst();(lii=slii.current());++slii)
+ {
+ if (strcmp(lii->type,listName)==0) break;
+ }
+ }
+ if (lii) // already found item of same type before
+ {
+ RefItem *item = refList->getRefItem(lii->itemId);
+ ASSERT(item!=0);
+ item->text += " <p>";
+ item->text += current->brief;
+ //printf("%s: text +=%s\n",listName,item->text.data());
+ }
+ else // new item
+ {
+ int itemId = refList->addRefItem();
+ char anchorLabel[1024];
+ sprintf(anchorLabel,"_%s%06d",listName,itemId);
+ RefItem *item = refList->getRefItem(itemId);
+ ASSERT(item!=0);
+ item->text = current->brief.copy();
+ item->listAnchor = anchorLabel;
+ current->addSpecialListItem(listName,itemId);
+ QCString cmdString;
+ cmdString.sprintf("\\%s %d\n",listName,itemId);
+ current->doc += cmdString;
+ //current->doc += (QCString)"\\anchor "+anchorLabel+"\n";
+
+ SectionInfo *si=new SectionInfo(listName,anchorLabel,
+ sectionTitle,SectionInfo::Anchor);
+ Doxygen::sectionDict.insert(anchorLabel,si);
+ current->anchors->append(new QCString(anchorLabel));
+
+ //QCString tmpName = current->name;
+ //current->name = listName;
+ //sectionType=SectionInfo::Anchor;
+ //sectionLabel=anchorLabel;
+ //addSection();
+ //current->name = tmpName;
+ //printf("%s: text %s doc %s\n",listName,item->text.data(),cmdString.data());
+ }
+ current->brief = slString.copy(); // restore orginial brief desc.
+}
+
+//-----------------------------------------------------------------------------
// Adds a formula text to the list/dictionary of formulas if it was
// not already added. Returns the label of the formula.
@@ -434,52 +489,6 @@ static void prependScope()
}
}
-//-----------------------------------------------------------------------------
-
-static void addSpecialItem(const char *listName)
-{
- ListItemInfo *lii=0;
- RefList *refList = Doxygen::specialLists->find(listName);
- ASSERT(refList!=0);
- if (current->sli)
- {
- QListIterator<ListItemInfo> slii(*current->sli);
- for (slii.toFirst();(lii=slii.current());++slii)
- {
- if (strcmp(lii->type,listName)==0) break;
- }
- }
- if (lii) // already found item of same type before
- {
- RefItem *item = refList->getRefItem(lii->itemId);
- ASSERT(item!=0);
- item->text += " <p>";
- item->text += current->brief;
- //printf("%s: text +=%s\n",listName,item->text.data());
- }
- else // new item
- {
- int itemId = refList->addRefItem();
- char anchorLabel[1024];
- sprintf(anchorLabel,"_%s%06d",listName,itemId);
- RefItem *item = refList->getRefItem(itemId);
- ASSERT(item!=0);
- item->text = current->brief.copy();
- item->listAnchor = anchorLabel;
- current->addSpecialListItem(listName,itemId);
- QCString cmdString;
- cmdString.sprintf("\\%s %d\n",listName,itemId);
- current->doc += cmdString;
- QCString tmpName = current->name;
- current->name = listName;
- sectionType=SectionInfo::Anchor;
- sectionLabel=anchorLabel;
- addSection();
- current->name = tmpName;
- //printf("%s: text %s doc %s\n",listName,item->text.data(),cmdString.data());
- }
- current->brief = slString.copy(); // restore orginial brief desc.
-}
/* ----------------------------------------------------------------- */
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
@@ -953,7 +962,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<FindMembers>{B}*((("disp")?"interface")|"valuetype"){BN}+ { // M$/Corba IDL interface
lineCount();
- if (insideIDL)
+ if (insideIDL || insideJava)
{
isTypedef=FALSE;
current->section = Entry::INTERFACE_SEC;
@@ -1948,6 +1957,20 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
initEntry();
BEGIN(MemberSpecSkip);
}
+<TypedefName>";" { /* typedef of anonymous type */
+ current->name.sprintf("@%d",anonCount++);
+ if (current->section == Entry::ENUM_SEC)
+ {
+ current->program+=','; // add field terminator
+ }
+ // add compound definition to the tree
+ current->args = current->args.simplifyWhiteSpace();
+ current->type = current->type.simplifyWhiteSpace();
+ current_root->addSubEntry( current ) ;
+ current = new Entry(*current);
+ unput(';');
+ BEGIN( MemberSpec ) ;
+ }
<MemberSpec>([*&]*{BN}*)*{ID}("["[a-z_A-Z0-9]*"]")* { // the [] part could be improved.
lineCount();
int i=0,l=yyleng,j;
@@ -1963,6 +1986,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
msType = yytext; msType=msType.left(i);
}
<MemberSpec>[,;] {
+ //printf("current->name=`%s' msName=`%s'\n",current->name.data(),msName.data());
if (msName.isEmpty() && !current->name.isEmpty())
/* && (current->section & Entry::COMPOUND_MASK)) */
{
@@ -2044,7 +2068,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
initEntry();
BEGIN( FindMembers );
}
- }
+ }
<MemberSpec>"=" {
lastInitializerContext=YY_START;
initializerSharpCount=0;
@@ -2607,6 +2631,17 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
previous->doc += current->doc;
current->doc.resize(0);
}
+ if (current->sli) // copy special list items
+ {
+ QListIterator<ListItemInfo> li(*current->sli);
+ ListItemInfo *lii;
+ for (li.toFirst();(lii=li.current());++li)
+ {
+ previous->addSpecialListItem(lii->type,lii->itemId);
+ }
+ delete current->sli;
+ current->sli = 0;
+ }
previous->endBodyLine=yyLineNr;
BEGIN( lastCurlyContext ) ;
}
@@ -3582,19 +3617,23 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->doc+=yytext;
}
<PageDoc>{CMD}"section"{B}+ {
- sectionType=SectionInfo::Section;
+ //sectionType=SectionInfo::Section;
+ current->doc+=yytext;
BEGIN(SectionLabel);
}
<PageDoc>{CMD}"subsection"{B}+ {
- sectionType=SectionInfo::Subsection;
+ //sectionType=SectionInfo::Subsection;
+ current->doc+=yytext;
BEGIN(SectionLabel);
}
<PageDoc>{CMD}"subsubsection"{B}+ {
- sectionType=SectionInfo::Subsubsection;
+ //sectionType=SectionInfo::Subsubsection;
+ current->doc+=yytext;
BEGIN(SectionLabel);
}
<PageDoc>{CMD}"paragraph"{B}+ {
- sectionType=SectionInfo::Paragraph;
+ //sectionType=SectionInfo::Paragraph;
+ current->doc+=yytext;
BEGIN(SectionLabel);
}
<GroupHeader>. { memberGroupHeader+=*yytext; }
@@ -3629,7 +3668,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<ExampleDoc,Doc,PageDoc,JavaDoc,ClassDoc>{CMD}"anchor"{B}+ {
lastAnchorContext = YY_START;
- sectionType=SectionInfo::Anchor;
+ //sectionType=SectionInfo::Anchor;
+ current->doc+=yytext;
BEGIN(AnchorLabel);
}
<Doc,PageDoc,ClassDoc>("\\\\"|"@@")"verbatim"/[^a-z_A-Z0-9] {
@@ -3742,28 +3782,33 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
*pSkipDoc+=*yytext;
}
<AnchorLabel>{LABELID} {
- sectionLabel=yytext;
- addSection();
- current->doc += "\\anchor "+sectionLabel+" ";
+ //sectionLabel=yytext;
+ //addSection();
+ //current->doc += "\\anchor "+sectionLabel+" ";
+ current->doc+=yytext;
BEGIN(lastAnchorContext);
}
<SectionLabel>{LABELID} {
- sectionLabel=yytext;
+ //sectionLabel=yytext;
sectionTitle.resize(0);
+ current->doc+=yytext;
BEGIN(SectionTitle);
}
<SectionTitle>[^\n*]*/"\n" {
sectionTitle+=yytext;
sectionTitle=sectionTitle.stripWhiteSpace();
- current->doc += "\\section "+sectionLabel+" ";
- addSection();
+ //current->doc += "\\section "+sectionLabel+" ";
+ //addSection();
+ current->doc+=yytext;
BEGIN(PageDoc);
}
<SectionTitle>[^\n*]* {
sectionTitle+=yytext;
+ current->doc+=yytext;
}
<SectionTitle>"*" {
sectionTitle+=yytext;
+ current->doc+=yytext;
}
<ExampleDoc,PageDoc,ClassDoc>"\n" { yyLineNr++ ; current->doc+=yytext; }
<ExampleDoc,PageDoc,ClassDoc>[a-z_A-Z0-9 \t]+ { current->doc += yytext; }
diff --git a/src/section.h b/src/section.h
index b1138b0..8210bfc 100644
--- a/src/section.h
+++ b/src/section.h
@@ -29,9 +29,15 @@ class PageInfo;
struct SectionInfo
{
- enum SectionType { Page, Section, Subsection, Subsubsection, Paragraph, Anchor };
- SectionInfo(const char *l,const char *t,SectionType st,const char *r=0)
- { label=l; title=t; type=st; ref=r; definition=0; pageRef=0; generated=FALSE; }
+ enum SectionType { Page, Section, Subsection,
+ Subsubsection, Paragraph, Anchor
+ };
+ SectionInfo(const char *f,const char *l,const char *t,
+ SectionType st,const char *r=0)
+ { label=l; title=t; type=st; ref=r;
+ definition=0; pageRef=0; generated=FALSE;
+ fileName=f;
+ }
~SectionInfo() {}
QCString label;
QCString title;
diff --git a/src/tagreader.cpp b/src/tagreader.cpp
index 3edb09f..1637044 100644
--- a/src/tagreader.cpp
+++ b/src/tagreader.cpp
@@ -857,36 +857,17 @@ void TagFileParser::addDocAnchors(Entry *e,QStrList &l)
while (s)
{
QCString *anchorName = new QCString(s);
- //if (anchorName->left(5)=="_todo")
- //{
- // int todoItemId = todoList.addRefItem();
- // char anchorLabel[12];
- // sprintf(anchorLabel,"_todo%06d",todoItemId);
- // RefItem *item = todoList.getRefItem(todoItemId);
- // item->listAnchor = anchorLabel;
- //}
- //else if (anchorName->left(5)=="_test")
- //{
- // int testItemId = testList.addRefItem();
- // char anchorLabel[12];
- // sprintf(anchorLabel,"_test%06d",testItemId);
- // RefItem *item = testList.getRefItem(testItemId);
- // item->listAnchor = anchorLabel;
- //}
- //else
- //{
- if (Doxygen::sectionDict.find(*anchorName)==0)
- {
- SectionInfo *si=new SectionInfo(*anchorName,*anchorName,
- SectionInfo::Anchor,m_tagName);
- Doxygen::sectionDict.insert(*anchorName,si);
- e->anchors->append(anchorName);
- }
- else
- {
- err("Duplicate anchor %s found\n",anchorName->data());
- }
- //}
+ if (Doxygen::sectionDict.find(*anchorName)==0)
+ {
+ SectionInfo *si=new SectionInfo(e->fileName,*anchorName,*anchorName,
+ SectionInfo::Anchor,m_tagName);
+ Doxygen::sectionDict.insert(*anchorName,si);
+ e->anchors->append(anchorName);
+ }
+ else
+ {
+ err("Duplicate anchor %s found\n",anchorName->data());
+ }
s=l.next();
}
}
diff --git a/src/translator_de.h b/src/translator_de.h
index 9a94ae4..6134aaf 100644
--- a/src/translator_de.h
+++ b/src/translator_de.h
@@ -52,49 +52,60 @@
// 2001/07/24 Jens Seidel (jensseidel@users.sourceforge.net)
// - trClassDocumentation() updated as in the English translator.
//
-// 2001/11/30 Oliver Brandt (o.brandt@tu-bs.de) and
-// Jens Seidel (jensseidel@users.sourceforge.net)
+// 2001/11/30 Oliver Brandt (o.brandt@tu-bs.de) and
+// Jens Seidel (jensseidel@users.sourceforge.net)
// - trReferences() implemented.
// - trCompoundReference(), trLegendDocs() updated
// - Removed some TODO's
//
-// 2001/02/13 Oliver Brandt (o.brandt@tu-bs.de)
+// 2001/02/13 Oliver Brandt (o.brandt@tu-bs.de)
// - Updated for "new since 1.2.13" version
// - Removed some TODO's
//
-// 2002-07-08 Oliver Brandt (o.brandt@tu-bs.de)
+// 2002/07/08 Oliver Brandt (o.brandt@tu-bs.de)
// - Updated for "new since 1.2.16" version
//
-// Todo:
-// - see FIXME
+// 2002/11/25 Jens Seidel (jensseidel@users.sourceforge.net)
+// - sync with english version 1.3
+// - TranslatorGerman doesn't inherit from TranslatorEnglish anymore,
+// so I changed "/* " back to "/*! " as in the english file
+// - use ngerman instead of german package in LaTeX
+// - changed "Datenelemente" to "Methoden" in
+// tr{,Static}{Public,Protected,Private}Members
+//
+// Todo:
+// - see FIXME
#ifndef TRANSLATOR_DE_H
#define TRANSLATOR_DE_H
-class TranslatorGerman : public TranslatorAdapter_1_2_17
+class TranslatorGerman : public Translator
{
public:
// --- Language control methods -------------------
-
- /* Used for identification of the language. The identification
- * should not be translated. It should be replaced by the name
+
+ /*! 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
+ * (e.g. "czech", "japanese", "russian", etc.). It should be equal to
* the identification used in language.cpp.
*/
virtual QCString idLanguage()
{ return "german"; }
- /* Used to get the LaTeX command(s) for the language support. This method
+ /*! Used to get the LaTeX command(s) for the language support. This method
* was designed for languages which do wish to use a babel package.
*/
virtual QCString latexLanguageSupportCommand()
{
- return "\\usepackage{german}\n";
+ QCString result="\\usepackage{ngerman}\n";
+ result+="\\usepackage{t1enc}% Trennung verbessern bei Umlauten\n";
+ result+="%\\usepackage[latin1]{inputenc}% Kodierung (cp850,latin1,ansinew)";
+ return result;
}
- /* return the language charset. This will be used for the HTML output */
+ /*! return the language charset. This will be used for the HTML output */
virtual QCString idLanguageCharset()
{
return "iso-8859-1";
@@ -102,57 +113,57 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// --- Language translation methods -------------------
- /* used in the compound documentation before a list of related functions. */
+ /*! used in the compound documentation before a list of related functions. */
virtual QCString trRelatedFunctions()
{ return "Verwandte Funktionen"; }
- /* subscript for the related functions. */
+ /*! subscript for the related functions. */
virtual QCString trRelatedSubscript()
{ return "(Es handelt sich hierbei nicht um Elementfunktionen.)"; }
- /* header that is put before the detailed description of files, classes and namespaces. */
+ /*! header that is put before the detailed description of files, classes and namespaces. */
virtual QCString trDetailedDescription()
{ return "Ausführliche Beschreibung"; }
- /* header that is put before the list of typedefs. */
+ /*! header that is put before the list of typedefs. */
virtual QCString trMemberTypedefDocumentation()
{ return "Dokumentation der benutzerdefinierten Datentypen"; }
- /* header that is put before the list of enumerations. */
+ /*! header that is put before the list of enumerations. */
virtual QCString trMemberEnumerationDocumentation()
{ return "Dokumentation der Aufzählungstypen"; }
-
- /* header that is put before the list of member functions. */
+
+ /*! header that is put before the list of member functions. */
virtual QCString trMemberFunctionDocumentation()
{ return "Dokumentation der Elementfunktionen"; }
-
- /* header that is put before the list of member attributes. */
+
+ /*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{ /* No difference if "OPTIMIZE_OUTPUT_FOR_C" is set! */
return "Dokumentation der Datenelemente";
}
- /* this is the text of a link put after brief descriptions. */
- virtual QCString trMore()
+ /*! this is the text of a link put after brief descriptions. */
+ virtual QCString trMore()
{ return "Mehr..."; }
- /* put in the class documentation */
+ /*! put in the class documentation */
virtual QCString trListOfAllMembers()
{ return "Aufstellung aller Elemente"; }
- /* used as the title of the "list of all members" page of a class */
+ /*! used as the title of the "list of all members" page of a class */
virtual QCString trMemberList()
{ return "Elementverzeichnis"; }
- /* this is the first part of a sentence that is followed by a class name */
+ /*! this is the first part of a sentence that is followed by a class name */
virtual QCString trThisIsTheListOfAllMembers()
{ return "Vollständige Aufstellung aller Elemente für "; }
- /* this is the remainder of the sentence after the class name */
+ /*! this is the remainder of the sentence after the class name */
virtual QCString trIncludingInheritedMembers()
{ return " einschließlich aller geerbten Elemente."; }
-
- /* this is put at the author sections at the bottom of man pages.
+
+ /*! 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)
@@ -162,33 +173,33 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result;
}
- /* put after an enum name in the list of all members */
+ /*! put after an enum name in the list of all members */
virtual QCString trEnumName()
{ return "enum Bezeichner"; }
-
- /* put after an enum value in the list of all members */
+
+ /*! put after an enum value in the list of all members */
virtual QCString trEnumValue()
{ return "enum Wert"; }
-
- /* put after an undocumented member in the list of all members */
+
+ /*! put after an undocumented member in the list of all members */
virtual QCString trDefinedIn()
{ return "Definiert in"; }
// quick reference sections
- /* This is put above each page as a link to the list of all groups of
- * compounds or files (see the \group command).
+ /*! This is put above each page as a link to the list of all groups of
+ * compounds or files (see the \\group command).
*/
virtual QCString trModules()
{ return "Module"; }
-
- /* This is put above each page as a link to the class hierarchy */
+
+ /*! This is put above each page as a link to the class hierarchy */
virtual QCString trClassHierarchy()
{ return "Klassenhierarchie"; }
-
- /* This is put above each page as a link to the list of annotated classes */
+
+ /*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
- {
+ {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Datenstrukturen";
@@ -198,18 +209,18 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return "Übersicht";
}
}
-
- /* This is put above each page as a link to the list of documented files */
+
+ /*! This is put above each page as a link to the list of documented files */
virtual QCString trFileList()
{ return "Auflistung der Dateien"; }
- /* This is put above each page as a link to the list of all verbatim headers */
+ /*! This is put above each page as a link to the list of all verbatim headers */
virtual QCString trHeaderFiles()
{ return "Auflistung der Header-Dateien"; }
- /* This is put above each page as a link to all members of compounds. */
+ /*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
- {
+ {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Datenstruktur-Elemente";
@@ -220,30 +231,30 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
}
}
- /* This is put above each page as a link to all members of files. */
+ /*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
/* No difference if "OPTIMIZE_OUTPUT_FOR_C" is set! */
{ return "Datei-Elemente"; }
- /* This is put above each page as a link to all related pages. */
+ /*! This is put above each page as a link to all related pages. */
virtual QCString trRelatedPages()
{ return "Zusätzliche Informationen"; }
- /* This is put above each page as a link to all examples. */
+ /*! This is put above each page as a link to all examples. */
virtual QCString trExamples()
{ return "Beispiele"; }
- /* This is put above each page as a link to the search engine. */
+ /*! This is put above each page as a link to the search engine. */
virtual QCString trSearch()
{ return "Suchen"; }
- /* This is an introduction to the class hierarchy. */
+ /*! This is an introduction to the class hierarchy. */
virtual QCString trClassHierarchyDescription()
{ return "Die Liste der Ableitungen ist -mit Einschränkungen- "
"alphabetisch sortiert:";
}
- /* This is an introduction to the list with all files. */
+ /*! This is an introduction to the list with all files. */
virtual QCString trFileListDescription(bool extractAll)
{
QCString result="Hier folgt die Aufzählung aller ";
@@ -252,99 +263,125 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result;
}
- /* This is an introduction to the annotated compound list. */
+ /*! This is an introduction to the annotated compound list. */
virtual QCString trCompoundListDescription()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
return "Hier folgt die Aufzählung aller Datenstrukturen "
"mit einer Kurzbeschreibung:";
+ }
else
+ {
return "Hier folgt die Aufzählung aller Klassen, Strukturen, "
"Varianten und Schnittstellen mit einer Kurzbeschreibung:";
+ }
}
- /* This is an introduction to the page with all class members. */
+ /*! This is an introduction to the page with all class members. */
virtual QCString trCompoundMembersDescription(bool extractAll)
{
QCString result="Hier folgt die Aufzählung aller ";
- if (!extractAll) result+="dokumentierten ";
+ if (!extractAll)
+ {
+ result+="dokumentierten ";
+ }
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
- result+="Strukturen und Varianten mit Verweisen auf ";
+ {
+ result+="Strukturen und Varianten";
+ }
else
- result+="Klassenelemente mit Verweisen auf ";
- if (!extractAll) {
+ {
+ result+="Klassenelemente";
+ }
+ result+=" mit Verweisen auf ";
+ if (!extractAll)
+ {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
result+="die Dokumentation zu jedem Element:";
- else
+ }
+ else
+ {
result+="die Klassendokumentation zu jedem Element:";
- } else {
+ }
+ }
+ else
+ {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
result+="die zugehörigen Elemente:";
+ }
else
+ {
result+="die zugehörigen Klassen:";
+ }
}
return result;
}
- /* This is an introduction to the page with all file members. */
+ /*! This is an introduction to the page with all file members. */
virtual QCString trFileMembersDescription(bool extractAll)
{
QCString result="Hier folgt die Aufzählung aller ";
if (!extractAll) result+="dokumentierten ";
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
- result+="Funktionen, Variablen, Makros, Aufzählungen und Typendefinitionen mit Verweisen auf ";
+ result+="Funktionen, Variablen, Makros, Aufzählungen und Typendefinitionen";
}
else
{
- result+="Dateielemente mit Verweisen auf ";
+ result+="Dateielemente";
}
- if (extractAll) result+="die Dokumentation zu jedem Element:";
- else result+="die zugehörigen Dateien:";
+ result+=" mit Verweisen auf ";
+ if (extractAll)
+ result+="die Dokumentation zu jedem Element:";
+ else
+ result+="die zugehörigen Dateien:";
return result;
}
- /* This is an introduction to the page with the list of all header files. */
+ /*! This is an introduction to the page with the list of all header files. */
virtual QCString trHeaderFilesDescription()
{ return "Hier folgen die Headerdateien, welche die API definieren:"; }
- /* This is an introduction to the page with the list of all examples */
+ /*! This is an introduction to the page with the list of all examples */
virtual QCString trExamplesDescription()
{ return "Hier folgt eine Liste mit allen Beispielen:"; }
- /* This is an introduction to the page with the list of related pages */
+ /*! This is an introduction to the page with the list of related pages */
virtual QCString trRelatedPagesDescription()
{ return "Hier folgt eine Liste mit zusammengehörigen Themengebieten:"; }
- /* This is an introduction to the page with the list of class/file groups */
+ /*! This is an introduction to the page with the list of class/file groups */
virtual QCString trModulesDescription()
{ return "Hier folgt die Aufzählung aller Module:"; }
- /* This sentences is used in the annotated class/file lists if no brief
+ /*! This sentences is used in the annotated class/file lists if no brief
* description is given.
*/
virtual QCString trNoDescriptionAvailable()
{ return "Keine Beschreibung verfügbar"; }
- // index titles (the project name is prepended for these)
-
- /* This is used in HTML as the title of index.html. */
+ // index titles (the project name is prepended for these)
+
+ /*! This is used in HTML as the title of index.html. */
virtual QCString trDocumentation()
{ return "Dokumentation"; }
- /* This is used in LaTeX as the title of the chapter with the
+ /*! This is used in LaTeX as the title of the chapter with the
* index of all groups.
*/
virtual QCString trModuleIndex()
{ return "Modul-Verzeichnis"; }
- /* This is used in LaTeX as the title of the chapter with the
+ /*! This is used in LaTeX as the title of the chapter with the
* class hierarchy.
*/
virtual QCString trHierarchicalIndex()
{ return "Hierarchie-Verzeichnis"; }
- /* This is used in LaTeX as the title of the chapter with the
+ /*! This is used in LaTeX as the title of the chapter with the
* annotated compound index.
*/
virtual QCString trCompoundIndex()
@@ -353,140 +390,144 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return "Datenstruktur-Verzeichnis";
}
- /* This is used in LaTeX as the title of the chapter with the
+ /*! This is used in LaTeX as the title of the chapter with the
* list of all files.
*/
- virtual QCString trFileIndex()
+ virtual QCString trFileIndex()
{ return "Datei-Verzeichnis"; }
- /* This is used in LaTeX as the title of the chapter containing
+ /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all groups.
*/
virtual QCString trModuleDocumentation()
{ return "Modul-Dokumentation"; }
- /* This is used in LaTeX as the title of the chapter containing
+ /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all classes, structs and unions.
*/
virtual QCString trClassDocumentation()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
return "Datenstruktur-Dokumentation";
+ }
else
+ {
return "Klassen-Dokumentation";
+ }
}
- /* This is used in LaTeX as the title of the chapter containing
+ /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all files.
*/
virtual QCString trFileDocumentation()
{ return "Datei-Dokumentation"; }
- /* This is used in LaTeX as the title of the chapter containing
+ /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all examples.
*/
virtual QCString trExampleDocumentation()
{ return "Dokumentation der Beispiele"; }
- /* This is used in LaTeX as the title of the chapter containing
+ /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all related pages.
*/
virtual QCString trPageDocumentation()
{ return "Zusätzliche Informationen"; }
- /* This is used in LaTeX as the title of the document */
+ /*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return "Nachschlagewerk"; }
-
- /* This is used in the documentation of a file as a header before the
+
+ /*! This is used in the documentation of a file as a header before the
* list of defines
*/
virtual QCString trDefines()
{ return "Makrodefinitionen"; }
- /* This is used in the documentation of a file as a header before the
+ /*! This is used in the documentation of a file as a header before the
* list of function prototypes
*/
virtual QCString trFuncProtos()
{ return "Funktionsprototypen"; }
- /* This is used in the documentation of a file as a header before the
+ /*! This is used in the documentation of a file as a header before the
* list of typedefs
*/
virtual QCString trTypedefs()
{ return "Typendefinitionen"; }
- /* This is used in the documentation of a file as a header before the
+ /*! This is used in the documentation of a file as a header before the
* list of enumerations
*/
virtual QCString trEnumerations()
{ return "Aufzählungen"; }
- /* This is used in the documentation of a file as a header before the
+ /*! This is used in the documentation of a file as a header before the
* list of (global) functions
*/
virtual QCString trFunctions()
{ return "Funktionen"; }
- /* This is used in the documentation of a file as a header before the
+ /*! This is used in the documentation of a file as a header before the
* list of (global) variables
*/
virtual QCString trVariables()
{ return "Variablen"; }
- /* This is used in the documentation of a file as a header before the
+ /*! This is used in the documentation of a file as a header before the
* list of (global) variables
*/
virtual QCString trEnumerationValues()
{ return "Aufzählungswerte"; }
-
- /* This is used in the documentation of a file before the list of
+
+ /*! This is used in the documentation of a file before the list of
* documentation blocks for defines
*/
virtual QCString trDefineDocumentation()
{ return "Makro-Dokumentation"; }
- /* This is used in the documentation of a file/namespace before the list
+ /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for function prototypes
*/
virtual QCString trFunctionPrototypeDocumentation()
{ return "Funktionsprototypen Dokumentation"; }
- /* This is used in the documentation of a file/namespace before the list
+ /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for typedefs
*/
virtual QCString trTypedefDocumentation()
{ return "Dokumentation der benutzerdefinerten Typen"; }
- /* This is used in the documentation of a file/namespace before the list
+ /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration types
*/
virtual QCString trEnumerationTypeDocumentation()
{ return "Dokumentation der Aufzählungstypen"; }
- /* This is used in the documentation of a file/namespace before the list
+ /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration values
*/
virtual QCString trEnumerationValueDocumentation()
{ return "Dokumentation des Wertebereiches der Aufzählungstypen"; }
- /* This is used in the documentation of a file/namespace before the list
+ /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for functions
*/
virtual QCString trFunctionDocumentation()
{ return "Dokumentation der Funktionen"; }
- /* This is used in the documentation of a file/namespace before the list
+ /*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for variables
*/
virtual QCString trVariableDocumentation()
{ return "Variablen-Dokumentation"; }
- /* This is used in the documentation of a file/namespace/group before
+ /*! This is used in the documentation of a file/namespace/group before
* the list of links to documented compounds
*/
virtual QCString trCompounds()
- {
+ {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Datenstrukturen";
@@ -497,7 +538,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
}
}
- /* This is used in the standard footer of each page and indicates when
+ /*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
virtual QCString trGeneratedAt(const char *date,const char *projName)
@@ -508,73 +549,73 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result;
}
- /* This is part of the sentence used in the standard footer of each page.
+ /*! This is part of the sentence used in the standard footer of each page.
*/
virtual QCString trWrittenBy()
{
return "geschrieben von";
}
- /* this text is put before a class diagram */
+ /*! this text is put before a class diagram */
virtual QCString trClassDiagram(const char *clName)
{
return (QCString)"Klassendiagramm für "+clName+":";
}
-
- /* this text is generated when the \internal command is used. */
+
+ /*! this text is generated when the \\internal command is used. */
virtual QCString trForInternalUseOnly()
{ return "Nur für den internen Gebrauch."; }
- /* this text is generated when the \reimp command is used. */
+ /*! this text is generated when the \\reimp command is used. */
virtual QCString trReimplementedForInternalReasons()
{ return "Aus internen Gründen neu implementiert. "
"Das API wird davon nicht berührt."; }
- /* this text is generated when the \warning command is used. */
+ /*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return "Warnung"; }
- /* this text is generated when the \bug command is used. */
+ /*! this text is generated when the \\bug command is used. */
virtual QCString trBugsAndLimitations()
{ return "Fehler und Einschränkungen"; }
- /* this text is generated when the \version command is used. */
+ /*! this text is generated when the \\version command is used. */
virtual QCString trVersion()
{ return "Version"; }
- /* this text is generated when the \date command is used. */
+ /*! this text is generated when the \\date command is used. */
virtual QCString trDate()
{ return "Datum"; }
- /* this text is generated when the \return command is used. */
+ /*! this text is generated when the \\return command is used. */
virtual QCString trReturns()
{ return "Rückgabe"; }
- /* this text is generated when the \sa command is used. */
+ /*! this text is generated when the \\sa command is used. */
virtual QCString trSeeAlso()
{ return "Siehe auch"; }
- /* this text is generated when the \param command is used. */
+ /*! this text is generated when the \\param command is used. */
virtual QCString trParameters()
{ return "Parameter"; }
- /* this text is generated when the \exception command is used. */
+ /*! this text is generated when the \\exception command is used. */
virtual QCString trExceptions()
{ return "Ausnahmebehandlung"; }
-
- /* this text is used in the title page of a LaTeX document. */
+
+ /*! this text is used in the title page of a LaTeX document. */
virtual QCString trGeneratedBy()
{ return "Erzeugt von"; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990307
//////////////////////////////////////////////////////////////////////////
-
- /* used as the title of page containing all the index of all namespaces. */
+
+ /*! used as the title of page containing all the index of all namespaces. */
virtual QCString trNamespaceList()
{ return "Liste aller Namensbereiche"; }
- /* used as an introduction to the namespace list */
+ /*! used as an introduction to the namespace list */
virtual QCString trNamespaceListDescription(bool extractAll)
{
QCString result="Liste aller ";
@@ -583,27 +624,27 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result;
}
- /* used in the class documentation as a header before the list of all
+ /*! used in the class documentation as a header before the list of all
* friends of a class
*/
virtual QCString trFriends()
{ return "Freundbeziehungen"; }
-
+
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990405
//////////////////////////////////////////////////////////////////////////
-
- /* used in the class documentation as a header before the list of all
+
+ /*! used in the class documentation as a header before the list of all
* related classes
*/
virtual QCString trRelatedFunctionDocumentation()
{ return "Freundbeziehungen und Funktionsdokumentation"; }
-
+
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
- /* used as the title of the HTML page of a class/struct/union */
+ /*! used as the title of the HTML page of a class/struct/union */
virtual QCString trCompoundReference(const char *clName,
ClassDef::CompoundType compType,
bool isTemplate)
@@ -622,7 +663,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result;
}
- /* used as the title of the HTML page of a file */
+ /*! used as the title of the HTML page of a file */
virtual QCString trFileReference(const char *fileName)
{
QCString result=fileName;
@@ -630,17 +671,16 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result;
}
- /* used as the title of the HTML page of a namespace */
+ /*! used as the title of the HTML page of a namespace */
virtual QCString trNamespaceReference(const char *namespaceName)
{
QCString result=namespaceName;
result+=" Namensbereichsreferenz";
return result;
}
-
- // these are for the member sections of a class, struct or union
+
virtual QCString trPublicMembers()
- { return "Öffentliche Datenelemente"; }
+ { return "Öffentliche Methoden"; }
virtual QCString trPublicSlots()
{ return "Öffentliche Slots"; }
@@ -649,29 +689,27 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
{ return "Signale"; }
virtual QCString trStaticPublicMembers()
- { return "Öffentliche, statische Datenelemente"; }
+ { return "Öffentliche, statische Methoden"; }
virtual QCString trProtectedMembers()
- { return "Geschützte Datenelemente"; }
+ { return "Geschützte Methoden"; }
virtual QCString trProtectedSlots()
{ return "Geschützte Slots"; }
virtual QCString trStaticProtectedMembers()
- { return "Geschützte, statische Datenelemente"; }
+ { return "Geschützte, statische Methoden"; }
virtual QCString trPrivateMembers()
- { return "Private Datenelemente"; }
+ { return "Private Methoden"; }
virtual QCString trPrivateSlots()
{ return "Private Slots"; }
virtual QCString trStaticPrivateMembers()
- { return "Private, statische Datenelemente"; }
+ { return "Private, statische Methoden"; }
- // end of member sections
-
- /* this function is used to produce a comma-separated list of items.
+ /*! this function is used to produce a comma-separated list of items.
* use generateMarker(i) to indicate where item i should be put.
*/
virtual QCString trWriteList(int numEntries)
@@ -679,24 +717,24 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
QCString result;
int i;
// the inherits list contain `numEntries' classes
- for (i=0;i<numEntries;i++)
+ for (i=0;i<numEntries;i++)
{
// use generateMarker to generate placeholders for the class links!
- result+=generateMarker(i); // generate marker for entry i in the list
+ result+=generateMarker(i); // generate marker for entry i in the list
// (order is left to right)
-
+
if (i!=numEntries-1) // not the last entry, so we need a separator
{
- if (i<numEntries-2) // not the fore last entry
+ if (i<numEntries-2) // not the fore last entry
result+=", ";
else // the fore last entry
result+=" und ";
}
}
- return result;
+ return result;
}
-
- /* used in class documentation to produce a list of base classes,
+
+ /*! used in class documentation to produce a list of base classes,
* if class diagrams are disabled.
*/
virtual QCString trInheritsList(int numEntries)
@@ -704,7 +742,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return "Abgeleitet von "+trWriteList(numEntries)+".";
}
- /* used in class documentation to produce a list of super classes,
+ /*! used in class documentation to produce a list of super classes,
* if class diagrams are disabled.
*/
virtual QCString trInheritedByList(int numEntries)
@@ -712,7 +750,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return "Basisklasse für "+trWriteList(numEntries)+".";
}
- /* used in member documentation blocks to produce a list of
+ /*! used in member documentation blocks to produce a list of
* members that are hidden by this one.
*/
virtual QCString trReimplementedFromList(int numEntries)
@@ -720,7 +758,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return "Erneute Implementation von "+trWriteList(numEntries)+".";
}
- /* used in member documentation blocks to produce a list of
+ /*! used in member documentation blocks to produce a list of
* all member that overwrite the implementation of this member.
*/
virtual QCString trReimplementedInList(int numEntries)
@@ -728,11 +766,11 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return "Erneute Implementation in "+trWriteList(numEntries)+".";
}
- /* This is put above each page as a link to all members of namespaces. */
+ /*! This is put above each page as a link to all members of namespaces. */
virtual QCString trNamespaceMembers()
{ return "Elemente eines Namensbereiches"; }
- /* This is an introduction to the page with all namespace members */
+ /*! This is an introduction to the page with all namespace members */
virtual QCString trNamespaceMemberDescription(bool extractAll)
{
QCString result="Hier folgt die Aufzählung aller ";
@@ -745,13 +783,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result;
}
- /* This is used in LaTeX as the title of the chapter with the
+ /*! This is used in LaTeX as the title of the chapter with the
* index of all namespaces.
*/
virtual QCString trNamespaceIndex()
{ return "Verzeichnis der Namensbereiche"; }
- /* This is used in LaTeX as the title of the chapter containing
+ /*! This is used in LaTeX as the title of the chapter containing
* the documentation of all namespaces.
*/
virtual QCString trNamespaceDocumentation()
@@ -761,7 +799,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 0.49-990522
//////////////////////////////////////////////////////////////////////////
- /* This is used in the documentation before the list of all
+ /*! This is used in the documentation before the list of all
* namespaces in a file.
*/
virtual QCString trNamespaces()
@@ -771,7 +809,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 0.49-990728
//////////////////////////////////////////////////////////////////////////
- /* This is put at the bottom of a class documentation page and is
+ /*! This is put at the bottom of a class documentation page and is
* followed by a list of files that were used to generate the page.
*/
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
@@ -792,7 +830,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result;
}
- /* This is in the (quick) index as a link to the alphabetical compound
+ /*! This is in the (quick) index as a link to the alphabetical compound
* list.
*/
virtual QCString trAlphabeticalList()
@@ -802,16 +840,16 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 0.49-990901
//////////////////////////////////////////////////////////////////////////
- /* This is used as the heading text for the retval command. */
+ /*! This is used as the heading text for the retval command. */
virtual QCString trReturnValues()
{ return "Rückgabewerte"; }
- /* This is in the (quick) index as a link to the main page (index.html)
+ /*! This is in the (quick) index as a link to the main page (index.html)
*/
virtual QCString trMainPage()
{ return "Hauptseite"; }
- /* This is used in references to page that are put in the LaTeX
+ /*! This is used in references to page that are put in the LaTeX
* documentation. It should be an abbreviation of the word page.
*/
virtual QCString trPageAbbreviation()
@@ -849,61 +887,61 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.0.0
//////////////////////////////////////////////////////////////////////////
- /* this text is put before a collaboration diagram */
+ /*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const char *clName)
{
return (QCString)"Zusammengehörigkeiten von "+clName+":";
}
- /* this text is put before an include dependency graph */
+ /*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const char *fName)
{
return (QCString)"Include-Abhängigkeitsdiagramm für "+fName+":";
}
- /* header that is put before the list of constructor/destructors. */
+ /*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
{
return "Beschreibung der Konstruktoren und Destruktoren";
}
- /* Used in the file documentation to point to the corresponding sources. */
+ /*! Used in the file documentation to point to the corresponding sources. */
virtual QCString trGotoSourceCode()
{
return "gehe zum Quellcode dieser Datei";
}
- /* Used in the file sources to point to the corresponding documentation. */
+ /*! Used in the file sources to point to the corresponding documentation. */
virtual QCString trGotoDocumentation()
{
return "gehe zur Dokumentation dieser Datei";
}
- /* Text for the \pre command */
+ /*! Text for the \\pre command */
virtual QCString trPrecondition()
{
return "Vorbedingung";
}
- /* Text for the \post command */
+ /*! Text for the \\post command */
virtual QCString trPostcondition()
{
return "Nachbedingung";
}
- /* Text for the \invariant command */
+ /*! Text for the \\invariant command */
virtual QCString trInvariant()
{
return "Invariant";
}
- /* Text shown before a multi-line variable/enum initialization */
+ /*! Text shown before a multi-line variable/enum initialization */
virtual QCString trInitialValue()
{
return "Initialisierung:";
}
- /* Text used the source code in the file index */
+ /*! Text used the source code in the file index */
virtual QCString trCode()
{
return "code";
@@ -995,13 +1033,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.1.3
//////////////////////////////////////////////////////////////////////////
- /* Used as a marker that is put before a \todo item */
+ /*! Used as a marker that is put before a \\todo item */
virtual QCString trTodo()
{
return "Noch zu erledigen";
}
- /* Used as the header of the todo list */
+ /*! Used as the header of the todo list */
virtual QCString trTodoList()
{
return "Liste der zu erledigenden Dinge";
@@ -1041,14 +1079,15 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.1.5
//////////////////////////////////////////////////////////////////////////
- /* title of the graph legend page */
+ /*! title of the graph legend page */
virtual QCString trLegendTitle()
{
return "Erklärung des Graphen";
}
- /* page explaining how the dot graph's should be interpreted
- The %A in the text below are to prevent link to classes called "A". */
+ /*! 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
@@ -1085,7 +1124,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
"\\endcode\n\n"
"Setzen des Tags \\c MAX_DOT_GRAPH_HEIGHT in der Konfigurationsdatei "
"auf 240 liefert den folgenden Graphen:"
- "<p><center><img src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n"
+ "<p><center><img alt=\"\" src=\"graph_legend."+Config_getEnum("DOT_IMAGE_FORMAT")+"\"></center>\n"
"<p>\n"
"Die Rechtecke in obigem Graphen bedeuten:\n"
"<ul>\n"
@@ -1116,23 +1155,23 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
"</ul>\n";
}
- /* text for the link to the legend page */
+ /*! text for the link to the legend page */
virtual QCString trLegend()
{
return "Legende";
}
-
+
//////////////////////////////////////////////////////////////////////////
// new since 1.2.0
//////////////////////////////////////////////////////////////////////////
-
- /* Used as a marker that is put before a test item */
+
+ /*! Used as a marker that is put before a test item */
virtual QCString trTest()
{
return "Test";
}
- /* Used as the header of the test list */
+ /*! Used as the header of the test list */
virtual QCString trTestList()
{
return "Test-Liste";
@@ -1142,7 +1181,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.2.1
//////////////////////////////////////////////////////////////////////////
- /* Used as a section header for KDE-2 IDL methods */
+ /*! Used as a section header for KDE-2 IDL methods */
virtual QCString trDCOPMethods()
{
return "DCOP Methoden";
@@ -1152,13 +1191,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.2.2
//////////////////////////////////////////////////////////////////////////
- /* Used as a section header for IDL properties */
+ /*! Used as a section header for IDL properties */
virtual QCString trProperties()
{
return "Eigenschaften";
}
- /* Used as a section header for IDL property documentation */
+ /*! Used as a section header for IDL property documentation */
virtual QCString trPropertyDocumentation()
{
return "Dokumentation der Eigenschaften";
@@ -1168,13 +1207,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.2.4
//////////////////////////////////////////////////////////////////////////
- /* Used for Java interfaces in the summary section of Java packages */
+ /*! Used for Java interfaces in the summary section of Java packages */
virtual QCString trInterfaces()
{
return "Schnittstellen";
}
- /* Used for Java classes in the summary section of Java packages */
+ /*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
@@ -1183,37 +1222,37 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return "Klassen";
}
- /* Used as the title of a Java package */
+ /*! Used as the title of a Java package */
virtual QCString trPackage(const char *name)
{
return (QCString)"Package "+name;
}
- /* Title of the package index page */
+ /*! Title of the package index page */
virtual QCString trPackageList()
{
return "Package Liste";
}
- /* The description of the package index page */
+ /*! The description of the package index page */
virtual QCString trPackageListDescription()
{
return "Hier folgen die packages mit einer Kurzbeschreibung (wenn verfügbar):";
}
- /* The link name in the Quick links header for each page */
+ /*! The link name in the Quick links header for each page */
virtual QCString trPackages()
{
return "Packages";
}
- /* Used as a chapter title for Latex & RTF output */
+ /*! Used as a chapter title for Latex & RTF output */
virtual QCString trPackageDocumentation()
{
return "Package Dokumentation";
}
- /* Text shown before a multi-line define */
+ /*! Text shown before a multi-line define */
virtual QCString trDefineValue()
{
return "Wert:";
@@ -1223,13 +1262,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.2.5
//////////////////////////////////////////////////////////////////////////
- /* Used as a marker that is put before a \bug item */
+ /*! Used as a marker that is put before a \\bug item */
virtual QCString trBug()
{
return "Fehler";
}
- /* Used as the header of the bug list */
+ /*! Used as the header of the bug list */
virtual QCString trBugList()
{
return "Liste der bekannten Fehler";
@@ -1239,13 +1278,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.2.6-20010422
//////////////////////////////////////////////////////////////////////////
- /* Used as ansicpg for RTF file. See translator_en.h for details. */
+ /*! Used as ansicpg for RTF file. See translator_en.h for details. */
virtual QCString trRTFansicp()
{
return "1252";
}
- /* Used as ansicpg for RTF fcharset
+ /*! Used as ansicpg for RTF fcharset
* \see trRTFansicp() for a table of possible values.
*/
virtual QCString trRTFCharSet()
@@ -1253,7 +1292,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return "0";
}
- /* Used as header RTF general index */
+ /*! Used as header RTF general index */
virtual QCString trRTFGeneralIndex()
{
return "Index";
@@ -1263,7 +1302,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.2.7
//////////////////////////////////////////////////////////////////////////
- /* This is used for translation of the word that will possibly
+ /*! 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.
*/
@@ -1274,7 +1313,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result;
}
- /* This is used for translation of the word that will possibly
+ /*! 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.
*/
@@ -1285,7 +1324,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result;
}
- /* This is used for translation of the word that will possibly
+ /*! 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.
*/
@@ -1296,7 +1335,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result;
}
- /* This is used for translation of the word that will possibly
+ /*! 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.
*/
@@ -1307,7 +1346,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result;
}
- /* This is used for translation of the word that will possibly
+ /*! 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.
*/
@@ -1318,7 +1357,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result;
}
- /* This is used for translation of the word that will possibly
+ /*! 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.
*/
@@ -1328,8 +1367,8 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
if (!singular) result+="e";
return result;
}
-
- /* This is used for translation of the word that will possibly
+
+ /*! 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.
*/
@@ -1340,7 +1379,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result;
}
- /* This is used for translation of the word that will possibly
+ /*! 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.
*/
@@ -1354,8 +1393,8 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
//////////////////////////////////////////////////////////////////////////
// new since 1.2.7-20010524
//////////////////////////////////////////////////////////////////////////
-
- /* This text is generated when the \author command is used and
+
+ /*! This text is generated when the \\author command is used and
* for the author section in man pages.
*/
virtual QCString trAuthor(bool, bool singular)
@@ -1369,7 +1408,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.2.11
//////////////////////////////////////////////////////////////////////////
- /* This text is put before the list of members referenced by a member
+ /*! This text is put before the list of members referenced by a member
*/
virtual QCString trReferences()
{
@@ -1379,16 +1418,17 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
//////////////////////////////////////////////////////////////////////////
// new since 1.2.13
//////////////////////////////////////////////////////////////////////////
- /* used in member documentation blocks to produce a list of
- * members that are implemented by this one.
+
+ /*! used in member documentation blocks to produce a list of
+ * members that are implemented by this one.
*/
virtual QCString trImplementedFromList(int numEntries)
{
return "Implementiert " + trWriteList(numEntries) + ".";
}
- /* used in member documentation blocks to produce a list of
- * all members that implement this abstract member.
+ /*! used in member documentation blocks to produce a list of
+ * all members that implement this abstract member.
*/
virtual QCString trImplementedInList(int numEntries)
{
@@ -1399,14 +1439,44 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.2.16
//////////////////////////////////////////////////////////////////////////
- /* used in RTF documentation as a heading for the Table
- * of Contents.
+ /*! used in RTF documentation as a heading for the Table
+ * of Contents.
*/
virtual QCString trRTFTableOfContents()
{
return "Inhaltsverzeichnis";
}
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.17
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as the header of the list of item that have been
+ * flagged deprecated
+ */
+ virtual QCString trDeprecatedList()
+ {
+ return "Veraltete Elemente";
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.18
+//////////////////////////////////////////////////////////////////////////
+
+ /*! Used as a header for declaration section of the events found in
+ * a C# program
+ */
+ virtual QCString trEvents()
+ {
+ return "Ereignisse";
+ }
+
+ /*! Header used for the documentation section of a class' events. */
+ virtual QCString trEventDocumentation()
+ {
+ return "Ereignisdokumentation";
+ }
+
};
#endif
-
diff --git a/src/util.cpp b/src/util.cpp
index b445c34..8e7c45e 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -657,8 +657,9 @@ QCString removeRedundantWhiteSpace(const QCString &s)
result+=", ";
}
else if (i>0 &&
- (isId(s.at(i)) && s.at(i-1)==')') ||
- (s.at(i)=='\'' && s.at(i-1)==' ')
+ ((isId(s.at(i)) && s.at(i-1)==')') ||
+ (s.at(i)=='\'' && s.at(i-1)==' ')
+ )
)
{
result+=' ';
@@ -670,7 +671,7 @@ QCString removeRedundantWhiteSpace(const QCString &s)
csp=0;
}
else if (!isspace(c) ||
- ( i!=0 && i!=l-1 &&
+ ( i>0 && i<l-1 &&
(isId(s.at(i-1)) || s.at(i-1)==')' || s.at(i-1)==',' || s.at(i-1)=='>' || s.at(i-1)==']') &&
isId(s.at(i+1))
)
@@ -3157,7 +3158,7 @@ void addMembersToMemberGroup(MemberList *ml,
MemberGroup *mg = memberGroupSDict->find(groupId);
if (mg==0)
{
- mg = new MemberGroup(groupId,*pGrpHeader,pDocs ? pDocs->data() : 0);
+ mg = new MemberGroup(context,groupId,*pGrpHeader,pDocs ? pDocs->data() : 0);
memberGroupSDict->append(groupId,mg);
}
mg->insertMember(context,fmd); // insert in member group
@@ -3178,7 +3179,7 @@ void addMembersToMemberGroup(MemberList *ml,
MemberGroup *mg = memberGroupSDict->find(groupId);
if (mg==0)
{
- mg = new MemberGroup(groupId,*pGrpHeader,pDocs ? pDocs->data() : 0);
+ mg = new MemberGroup(context,groupId,*pGrpHeader,pDocs ? pDocs->data() : 0);
memberGroupSDict->append(groupId,mg);
}
md = ml->take(index); // remove from member list
@@ -3551,20 +3552,21 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
//outputList->writeTitle(pi->name,pi->title);
// a page name is a label as well!
- SectionInfo *si=new SectionInfo(
- pi->name,pi->title,SectionInfo::Page,pi->reference);
+ QCString file;
if (gd)
{
- si->fileName=gd->getOutputFileBase();
+ file=gd->getOutputFileBase();
}
else if (pi->getGroupDef())
{
- si->fileName=pi->getGroupDef()->getOutputFileBase().copy();
+ file=pi->getGroupDef()->getOutputFileBase().copy();
}
else
{
- si->fileName=pageName;
+ file=pageName;
}
+ SectionInfo *si=new SectionInfo(
+ file,pi->name,pi->title,SectionInfo::Page,pi->reference);
//printf("si->label=`%s' si->definition=%s si->fileName=`%s'\n",
// si->label.data(),si->definition?si->definition->name().data():"<none>",
// si->fileName.data());
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp
index be8ca04..6c94ca7 100644
--- a/src/xmldocvisitor.cpp
+++ b/src/xmldocvisitor.cpp
@@ -95,7 +95,9 @@ void XmlDocVisitor::visit(DocSymbol *s)
void XmlDocVisitor::visit(DocURL *u)
{
if (m_hide) return;
- m_t << "<ulink url=\"" << u->url() << "\">";
+ m_t << "<ulink url=\"";
+ if (u->isEmail()) m_t << "mailto:";
+ m_t << u->url() << "\">";
filter(u->url());
m_t << "</ulink>";
}
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index b148133..070ccc2 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -34,6 +34,7 @@
#include "version.h"
#include "xmldocvisitor.h"
#include "docparser.h"
+#include "language.h"
#include <qdir.h>
#include <qfile.h>
@@ -56,7 +57,8 @@ static void writeXMLHeader(QTextStream &t)
{
QCString dtdName = Config_getString("XML_DTD");
QCString schemaName = Config_getString("XML_SCHEMA");
- t << "<?xml version='1.0' encoding='ISO-8859-1' standalone='";
+ t << "<?xml version='1.0' encoding='" << theTranslator->idLanguageCharset()
+ << "' standalone='";
if (dtdName.isEmpty() && schemaName.isEmpty()) t << "yes"; else t << "no";
t << "'?>" << endl;
if (!dtdName.isEmpty())
@@ -789,6 +791,7 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
return;
}
QTextStream t(&f);
+ t.setEncoding(QTextStream::Latin1);
writeXMLHeader(t);
t << " <compounddef id=\""
@@ -975,6 +978,7 @@ static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &ti)
return;
}
QTextStream t(&f);
+ t.setEncoding(QTextStream::Latin1);
writeXMLHeader(t);
t << " <compounddef id=\""
@@ -1065,6 +1069,7 @@ static void generateXMLForFile(FileDef *fd,QTextStream &ti)
return;
}
QTextStream t(&f);
+ t.setEncoding(QTextStream::Latin1);
writeXMLHeader(t);
t << " <compounddef id=\""
@@ -1198,6 +1203,7 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
}
QTextStream t(&f);
+ t.setEncoding(QTextStream::Latin1);
writeXMLHeader(t);
t << " <compounddef id=\""
<< gd->getOutputFileBase() << "\" kind=\"group\">" << endl;
@@ -1312,6 +1318,7 @@ static void generateXMLForPage(PageInfo *pi,QTextStream &ti)
}
QTextStream t(&f);
+ t.setEncoding(QTextStream::Latin1);
writeXMLHeader(t);
t << " <compounddef id=\"" << pageName;
t << "\" kind=\"page\">" << endl;
@@ -1393,6 +1400,7 @@ void generateXML()
return;
}
QTextStream t(&f);
+ t.setEncoding(QTextStream::Latin1);
writeXMLHeader(t);
ClassSDict::Iterator cli(Doxygen::classSDict);
ClassDef *cd;