Commit f3e7209f authored by dimitri's avatar dimitri

Release-1.3-rc1-20021128

parent e952dab5
DOXYGEN Version 1.3-rc1 DOXYGEN Version 1.3-rc1-20021128
Please read the installation section of the manual Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions. (http://www.doxygen.org/install.html) for instructions.
-------- --------
Dimitri van Heesch (15 November 2002) Dimitri van Heesch (28 November 2002)
DOXYGEN Version 1.3_rc1 DOXYGEN Version 1.3_rc1_20021128
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (15 November 2002) Dimitri van Heesch (dimitri@stack.nl) (28 November 2002)
1.3-rc1 1.3-rc1-20021128
...@@ -376,7 +376,8 @@ doxygen. Unrecognized commands are treated as normal text. ...@@ -376,7 +376,8 @@ doxygen. Unrecognized commands are treated as normal text.
\addindex \\internal \addindex \\internal
This command writes the message `For internal use only' to the output and This command writes the message `For internal use only' to the output and
all text \e after a \c \\internal command is ignored. all text \e after a \c \\internal command until the end of the
comment block is ignored.
You can use \ref cfg_internal_docs "INTERNAL_DOCS" in the config file You can use \ref cfg_internal_docs "INTERNAL_DOCS" in the config file
to show or hide the internal documentation. to show or hide the internal documentation.
......
...@@ -229,7 +229,8 @@ generator -> gen ...@@ -229,7 +229,8 @@ generator -> gen
\endverbatim \endverbatim
At the time I was looking into lex and yacc, where a lot of things start with At the time I was looking into lex and yacc, where a lot of things start with
"yy", so the "y" slipped in and made things pronounceable. "yy", so the "y" slipped in and made things pronounceable
(the proper pronouncement is Docs-ee-gen, so with a long "e").
<li><b>What was the reason to develop doxygen?</b> <li><b>What was the reason to develop doxygen?</b>
......
...@@ -37,7 +37,6 @@ Xavier Outhier: xouthier@yahoo.fr ...@@ -37,7 +37,6 @@ Xavier Outhier: xouthier@yahoo.fr
German German
Jens Seidel: jensseidel@users.sf.net Jens Seidel: jensseidel@users.sf.net
Jens Breitenstein: Jens.Breitenstein@tlc.de
Greek Greek
Harry Kalogirou: harkal@rainbow.cs.unipi.gr Harry Kalogirou: harkal@rainbow.cs.unipi.gr
......
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.3_rc1 Version: 1.3_rc1_20021128
Release: 1 Release: 1
Epoch: 1 Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "dot.h" #include "dot.h"
#include "defargs.h" #include "defargs.h"
#include "debug.h" #include "debug.h"
#include "docparser.h"
static QCString stripExtension(const char *fName) static QCString stripExtension(const char *fName)
{ {
...@@ -553,6 +554,41 @@ void ClassDef::distributeMemberGroupDocumentation() ...@@ -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 // add a file name to the used files set
void ClassDef::insertUsedFile(const char *f) void ClassDef::insertUsedFile(const char *f)
...@@ -1558,7 +1594,7 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup) ...@@ -1558,7 +1594,7 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup)
} }
} }
ol.docify(" {"); ol.docify(" {");
ol.endMemberItem(FALSE); ol.endMemberItem();
// write user defined member groups // write user defined member groups
MemberGroupSDict::Iterator mgli(*memberGroupSDict); MemberGroupSDict::Iterator mgli(*memberGroupSDict);
......
...@@ -259,6 +259,7 @@ class ClassDef : public Definition ...@@ -259,6 +259,7 @@ class ClassDef : public Definition
bool addExample(const char *anchor,const char *name, const char *file); bool addExample(const char *anchor,const char *name, const char *file);
void addMembersToMemberGroup(); void addMembersToMemberGroup();
void distributeMemberGroupDocumentation(); void distributeMemberGroupDocumentation();
void findSectionsInDocumentation();
void setNamespace(NamespaceDef *nd) { m_nspace = nd; } void setNamespace(NamespaceDef *nd) { m_nspace = nd; }
void setTemplateArguments(ArgumentList *al); void setTemplateArguments(ArgumentList *al);
void mergeMembers(); void mergeMembers();
......
...@@ -112,7 +112,7 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f ...@@ -112,7 +112,7 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f
ol.docify(cd->localName()); ol.docify(cd->localName());
ol.endBold(); ol.endBold();
} }
ol.endMemberItem(FALSE); ol.endMemberItem();
if (!cd->briefDescription().isEmpty()) if (!cd->briefDescription().isEmpty())
{ {
ol.startMemberDescription(); ol.startMemberDescription();
......
...@@ -74,6 +74,9 @@ CommandMap cmdMap[] = ...@@ -74,6 +74,9 @@ CommandMap cmdMap[] =
{ "sa", CMD_SA }, { "sa", CMD_SA },
{ "secreflist", CMD_SECREFLIST }, { "secreflist", CMD_SECREFLIST },
{ "section", CMD_SECTION }, { "section", CMD_SECTION },
{ "subsection", CMD_SUBSECTION },
{ "subsubsection", CMD_SUBSUBSECTION },
{ "paragraph", CMD_PARAGRAPH },
{ "see", CMD_SA }, { "see", CMD_SA },
{ "since", CMD_SINCE }, { "since", CMD_SINCE },
{ "skip", CMD_SKIP }, { "skip", CMD_SKIP },
......
...@@ -73,33 +73,36 @@ enum CommandType ...@@ -73,33 +73,36 @@ enum CommandType
CMD_RETVAL = 39 | SIMPLESECT_BIT, CMD_RETVAL = 39 | SIMPLESECT_BIT,
CMD_SA = 40 | SIMPLESECT_BIT , CMD_SA = 40 | SIMPLESECT_BIT ,
CMD_SECTION = 41, CMD_SECTION = 41,
CMD_SINCE = 42 | SIMPLESECT_BIT, CMD_SUBSECTION = 42,
CMD_SKIP = 43, CMD_SUBSUBSECTION= 43,
CMD_SKIPLINE = 44, CMD_PARAGRAPH = 44,
CMD_STARTCODE = 45, CMD_SINCE = 45 | SIMPLESECT_BIT,
CMD_JAVALINK = 46, CMD_SKIP = 46,
CMD_TEST = 47 | SIMPLESECT_BIT, CMD_SKIPLINE = 47,
CMD_TODO = 48 | SIMPLESECT_BIT, CMD_STARTCODE = 48,
CMD_UNTIL = 49, CMD_JAVALINK = 49,
CMD_VERBATIM = 50, CMD_TEST = 50 | SIMPLESECT_BIT,
CMD_VERBINCLUDE = 51, CMD_TODO = 51 | SIMPLESECT_BIT,
CMD_VERSION = 52 | SIMPLESECT_BIT, CMD_UNTIL = 52,
CMD_WARNING = 53 | SIMPLESECT_BIT , CMD_VERBATIM = 53,
CMD_BSLASH = 54, CMD_VERBINCLUDE = 54,
CMD_AT = 55, CMD_VERSION = 55 | SIMPLESECT_BIT,
CMD_LESS = 56, CMD_WARNING = 56 | SIMPLESECT_BIT ,
CMD_GREATER = 57, CMD_BSLASH = 57,
CMD_AMP = 58, CMD_AT = 58,
CMD_DOLLAR = 59, CMD_LESS = 59,
CMD_HASH = 60, CMD_GREATER = 60,
CMD_PERCENT = 61, CMD_AMP = 61,
CMD_LINEBREAK = 62, CMD_DOLLAR = 62,
CMD_FORMULA = 63, CMD_HASH = 63,
CMD_SECREFLIST = 64, CMD_PERCENT = 64,
CMD_ENDSECREFLIST= 65, CMD_LINEBREAK = 65,
CMD_LANGSWITCH = 66, CMD_FORMULA = 66,
CMD_AUTHORS = 67 | SIMPLESECT_BIT, CMD_SECREFLIST = 67,
CMD_INTERNALREF = 68 CMD_ENDSECREFLIST= 68,
CMD_LANGSWITCH = 69,
CMD_AUTHORS = 70 | SIMPLESECT_BIT,
CMD_INTERNALREF = 71
}; };
enum HtmlTagType enum HtmlTagType
......
...@@ -46,6 +46,15 @@ ...@@ -46,6 +46,15 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static const char *sectionLevelToName[] =
{
"page",
"section",
"subsection",
"subsubsection",
"paragraph"
};
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// global variables during a call to validatingParseDoc // global variables during a call to validatingParseDoc
...@@ -513,7 +522,7 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children, ...@@ -513,7 +522,7 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) 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()); cmdName.data());
return tok; return tok;
} }
...@@ -526,15 +535,15 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children, ...@@ -526,15 +535,15 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
switch (tok) switch (tok)
{ {
case TK_COMMAND: 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()); tokenName.data(),cmdName.data());
break; break;
case TK_SYMBOL: case TK_SYMBOL:
warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found", warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
tokenName.data()); tokenName.data());
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok)); tokToString(tok));
break; break;
} }
...@@ -561,7 +570,7 @@ static void handleStyleLeave(DocNode *parent,QList<DocNode> &children, ...@@ -561,7 +570,7 @@ static void handleStyleLeave(DocNode *parent,QList<DocNode> &children,
g_styleStack.top()->position()!=g_nodeStack.count() // wrong position 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); tagName,tagName);
} }
else // end the section else // end the section
...@@ -589,9 +598,9 @@ static void handlePendingStyleCommands(DocNode *parent,QList<DocNode> &children) ...@@ -589,9 +598,9 @@ static void handlePendingStyleCommands(DocNode *parent,QList<DocNode> &children)
case DocStyleChange::Small: cmd = "small"; break; case DocStyleChange::Small: cmd = "small"; break;
case DocStyleChange::Subscript: cmd = "subscript"; break; case DocStyleChange::Subscript: cmd = "subscript"; break;
case DocStyleChange::Superscript: cmd = "superscript"; 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); "command </%s>",cmd);
children.append(new DocStyleChange(parent,g_nodeStack.count(),sc->style(),FALSE)); children.append(new DocStyleChange(parent,g_nodeStack.count(),sc->style(),FALSE));
g_styleStack.pop(); g_styleStack.pop();
...@@ -719,7 +728,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children ...@@ -719,7 +728,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
doctokenizerYYsetStateHtmlOnly(); doctokenizerYYsetStateHtmlOnly();
int retval = doctokenizerYYlex(); int retval = doctokenizerYYlex();
children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::HtmlOnly,g_isExample,g_fileName)); 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(); doctokenizerYYsetStatePara();
} }
break; break;
...@@ -728,7 +737,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children ...@@ -728,7 +737,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
doctokenizerYYsetStateLatexOnly(); doctokenizerYYsetStateLatexOnly();
int retval = doctokenizerYYlex(); int retval = doctokenizerYYlex();
children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::LatexOnly,g_isExample,g_fileName)); 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(); doctokenizerYYsetStatePara();
} }
break; break;
...@@ -743,20 +752,20 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children ...@@ -743,20 +752,20 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) 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()); tokenName.data());
break; break;
} }
tok=doctokenizerYYlex(); tok=doctokenizerYYlex();
if (tok==0) 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()); "argument of command %s",tokenName.data());
break; break;
} }
else if (tok!=TK_WORD && tok!=TK_LNKWORD) 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()); tokToString(tok),tokenName.data());
break; break;
} }
...@@ -769,7 +778,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children ...@@ -769,7 +778,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) 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()); tokenName.data());
break; break;
} }
...@@ -778,7 +787,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children ...@@ -778,7 +787,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
DocInternalRef *ref=0; DocInternalRef *ref=0;
if (tok!=TK_WORD && tok!=TK_LNKWORD) 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()); tokToString(tok),tokenName.data());
doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara();
break; break;
...@@ -812,11 +821,13 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children ...@@ -812,11 +821,13 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
{ {
handleStyleEnter(parent,children,DocStyleChange::Preformatted,&g_token->attribs); handleStyleEnter(parent,children,DocStyleChange::Preformatted,&g_token->attribs);
parent->setInsidePreformatted(TRUE); parent->setInsidePreformatted(TRUE);
doctokenizerYYsetInsidePre(TRUE);
} }
else else
{ {
handleStyleLeave(parent,children,DocStyleChange::Preformatted,tokenName); handleStyleLeave(parent,children,DocStyleChange::Preformatted,tokenName);
parent->setInsidePreformatted(FALSE); parent->setInsidePreformatted(FALSE);
doctokenizerYYsetInsidePre(FALSE);
} }
break; break;
case HTML_CODE: case HTML_CODE:
...@@ -924,7 +935,7 @@ handlepara: ...@@ -924,7 +935,7 @@ handlepara:
return FALSE; return FALSE;
break; break;
case TK_URL: case TK_URL:
children.append(new DocURL(parent,g_token->name)); children.append(new DocURL(parent,g_token->name,g_token->isEMailAddr));
break; break;
default: default:
return FALSE; return FALSE;
...@@ -1029,14 +1040,14 @@ static void readTextFileByName(const QString &file,QString &text) ...@@ -1029,14 +1040,14 @@ static void readTextFileByName(const QString &file,QString &text)
} }
else if (ambig) 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(), "Possible candidates:\n%s",file.data(),
showFileDefMatches(Doxygen::exampleNameDict,file).data() showFileDefMatches(Doxygen::exampleNameDict,file).data()
); );
} }
else 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()); "Check you EXAMPLE_PATH",file.data());
} }
} }
...@@ -1048,7 +1059,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor) ...@@ -1048,7 +1059,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor)
{ {
if (id.isEmpty()) 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"> if (newAnchor) // found <a name="label">
{ {
...@@ -1064,7 +1075,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor) ...@@ -1064,7 +1075,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor)
} }
else 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() ...@@ -1231,13 +1242,13 @@ void DocCopy::parse()
} }
else // oops, recursion 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); doctokenizerYYlineno);
} }
} }
else 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()); m_link.data());
} }
} }
...@@ -1264,10 +1275,13 @@ void DocXRefItem::parse() ...@@ -1264,10 +1275,13 @@ void DocXRefItem::parse()
m_anchor = item->listAnchor; m_anchor = item->listAnchor;
m_title = refList->sectionTitle(); m_title = refList->sectionTitle();
if (!item->text.isEmpty())
{
docParserPushContext(); docParserPushContext();
internalValidatingParseDoc(this,m_children,item->text); internalValidatingParseDoc(this,m_children,item->text);
docParserPopContext(); docParserPopContext();
} }
}
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -1329,15 +1343,15 @@ void DocSecRefItem::parse() ...@@ -1329,15 +1343,15 @@ void DocSecRefItem::parse()
switch (tok) switch (tok)
{ {
case TK_COMMAND: 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()); g_token->name.data());
break; break;
case TK_SYMBOL: 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()); g_token->name.data());
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok)); tokToString(tok));
break; break;
} }
...@@ -1357,13 +1371,13 @@ void DocSecRefItem::parse() ...@@ -1357,13 +1371,13 @@ void DocSecRefItem::parse()
} }
else else
{ {
warn(g_fileName,doctokenizerYYlineno,"Error reference to unknown section %s", warn(g_fileName,doctokenizerYYlineno,"Warning reference to unknown section %s",
m_target.data()); m_target.data());
} }
} }
else else
{ {
warn(g_fileName,doctokenizerYYlineno,"Error reference to empty target"); warn(g_fileName,doctokenizerYYlineno,"Warning reference to empty target");
} }
DBG(("DocSecRefItem::parse() end\n")); DBG(("DocSecRefItem::parse() end\n"));
...@@ -1393,13 +1407,13 @@ void DocSecRefList::parse() ...@@ -1393,13 +1407,13 @@ void DocSecRefList::parse()
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) 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; break;
} }
tok=doctokenizerYYlex(); tok=doctokenizerYYlex();
if (tok!=TK_WORD && tok!=TK_LNKWORD) 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)); tokToString(tok));
break; break;
} }
...@@ -1412,7 +1426,7 @@ void DocSecRefList::parse() ...@@ -1412,7 +1426,7 @@ void DocSecRefList::parse()
case CMD_ENDSECREFLIST: case CMD_ENDSECREFLIST:
goto endsecreflist; goto endsecreflist;
default: 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()); g_token->name.data());
goto endsecreflist; goto endsecreflist;
} }
...@@ -1423,7 +1437,7 @@ void DocSecRefList::parse() ...@@ -1423,7 +1437,7 @@ void DocSecRefList::parse()
} }
else 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)); tokToString(tok));
goto endsecreflist; goto endsecreflist;
} }
...@@ -1466,15 +1480,15 @@ void DocInternalRef::parse() ...@@ -1466,15 +1480,15 @@ void DocInternalRef::parse()
switch (tok) switch (tok)
{ {
case TK_COMMAND: 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()); g_token->name.data());
break; break;
case TK_SYMBOL: 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()); g_token->name.data());
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok)); tokToString(tok));
break; break;
} }
...@@ -1504,7 +1518,7 @@ DocRef::DocRef(DocNode *parent,const QString &target) : ...@@ -1504,7 +1518,7 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
m_ref = sec->ref; m_ref = sec->ref;
m_file = stripKnownExtensions(sec->fileName); 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_refToAnchor = sec->type==SectionInfo::Anchor;
m_refToSection = sec->type!=SectionInfo::Anchor; m_refToSection = sec->type!=SectionInfo::Anchor;
} }
...@@ -1537,7 +1551,7 @@ DocRef::DocRef(DocNode *parent,const QString &target) : ...@@ -1537,7 +1551,7 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
} }
else // oops, bogus 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()); target.data());
} }
} }
...@@ -1555,15 +1569,15 @@ void DocRef::parse() ...@@ -1555,15 +1569,15 @@ void DocRef::parse()
switch (tok) switch (tok)
{ {
case TK_COMMAND: 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()); g_token->name.data());
break; break;
case TK_SYMBOL: 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()); g_token->name.data());
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok)); tokToString(tok));
break; break;
} }
...@@ -1606,7 +1620,7 @@ DocLink::DocLink(DocNode *parent,const QString &target) : ...@@ -1606,7 +1620,7 @@ DocLink::DocLink(DocNode *parent,const QString &target) :
} }
else // oops, bogus 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()); target.data());
} }
} }
...@@ -1631,17 +1645,17 @@ QString DocLink::parse(bool isJavaLink) ...@@ -1631,17 +1645,17 @@ QString DocLink::parse(bool isJavaLink)
case CMD_ENDLINK: case CMD_ENDLINK:
if (isJavaLink) if (isJavaLink)
{ {
warn(g_fileName,doctokenizerYYlineno,"Error: {@link.. ended with @endlink command"); warn(g_fileName,doctokenizerYYlineno,"Warning: {@link.. ended with @endlink command");
} }
goto endlink; goto endlink;
default: 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()); g_token->name.data());
break; break;
} }
break; break;
case TK_SYMBOL: 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()); g_token->name.data());
break; break;
case TK_LNKWORD: case TK_LNKWORD:
...@@ -1668,7 +1682,7 @@ QString DocLink::parse(bool isJavaLink) ...@@ -1668,7 +1682,7 @@ QString DocLink::parse(bool isJavaLink)
m_children.append(new DocWord(this,g_token->name)); m_children.append(new DocWord(this,g_token->name));
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok)); tokToString(tok));
break; break;
} }
...@@ -1676,7 +1690,7 @@ QString DocLink::parse(bool isJavaLink) ...@@ -1676,7 +1690,7 @@ QString DocLink::parse(bool isJavaLink)
} }
if (tok==0) 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"); " link command\n");
} }
endlink: endlink:
...@@ -1713,15 +1727,15 @@ void DocDotFile::parse() ...@@ -1713,15 +1727,15 @@ void DocDotFile::parse()
switch (tok) switch (tok)
{ {
case TK_COMMAND: 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()); g_token->name.data());
break; break;
case TK_SYMBOL: 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()); g_token->name.data());
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok)); tokToString(tok));
break; break;
} }
...@@ -1740,7 +1754,7 @@ void DocDotFile::parse() ...@@ -1740,7 +1754,7 @@ void DocDotFile::parse()
} }
else 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()); g_token->name.data());
} }
tok=doctokenizerYYlex(); tok=doctokenizerYYlex();
...@@ -1757,14 +1771,14 @@ void DocDotFile::parse() ...@@ -1757,14 +1771,14 @@ void DocDotFile::parse()
} }
else if (ambig) 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(), "Possible candidates:\n%s",m_name.data(),
showFileDefMatches(Doxygen::exampleNameDict,m_name).data() showFileDefMatches(Doxygen::exampleNameDict,m_name).data()
); );
} }
else 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()); "in any of the paths specified via DOTFILE_DIRS!",m_name.data());
} }
...@@ -1790,15 +1804,15 @@ void DocImage::parse() ...@@ -1790,15 +1804,15 @@ void DocImage::parse()
switch (tok) switch (tok)
{ {
case TK_COMMAND: 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()); g_token->name.data());
break; break;
case TK_SYMBOL: 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()); g_token->name.data());
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok)); tokToString(tok));
break; break;
} }
...@@ -1817,7 +1831,7 @@ void DocImage::parse() ...@@ -1817,7 +1831,7 @@ void DocImage::parse()
} }
else 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()); g_token->name.data());
} }
tok=doctokenizerYYlex(); tok=doctokenizerYYlex();
...@@ -1848,7 +1862,7 @@ int DocHtmlHeader::parse() ...@@ -1848,7 +1862,7 @@ int DocHtmlHeader::parse()
switch (tok) switch (tok)
{ {
case TK_COMMAND: 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); g_token->name.data(),m_level);
break; break;
case TK_HTMLTAG: case TK_HTMLTAG:
...@@ -1858,7 +1872,7 @@ int DocHtmlHeader::parse() ...@@ -1858,7 +1872,7 @@ int DocHtmlHeader::parse()
{ {
if (m_level!=1) 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); m_level);
} }
goto endheader; goto endheader;
...@@ -1867,7 +1881,7 @@ int DocHtmlHeader::parse() ...@@ -1867,7 +1881,7 @@ int DocHtmlHeader::parse()
{ {
if (m_level!=2) 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); m_level);
} }
goto endheader; goto endheader;
...@@ -1876,7 +1890,7 @@ int DocHtmlHeader::parse() ...@@ -1876,7 +1890,7 @@ int DocHtmlHeader::parse()
{ {
if (m_level!=3) 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); m_level);
} }
goto endheader; goto endheader;
...@@ -1885,7 +1899,7 @@ int DocHtmlHeader::parse() ...@@ -1885,7 +1899,7 @@ int DocHtmlHeader::parse()
{ {
if (m_level!=4) 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); m_level);
} }
goto endheader; goto endheader;
...@@ -1894,7 +1908,7 @@ int DocHtmlHeader::parse() ...@@ -1894,7 +1908,7 @@ int DocHtmlHeader::parse()
{ {
if (m_level!=5) 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); m_level);
} }
goto endheader; goto endheader;
...@@ -1903,24 +1917,24 @@ int DocHtmlHeader::parse() ...@@ -1903,24 +1917,24 @@ int DocHtmlHeader::parse()
{ {
if (m_level!=6) 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); m_level);
} }
goto endheader; goto endheader;
} }
else 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); g_token->endTag?"/":"",g_token->name.data(),m_level);
} }
} }
break; break;
case TK_SYMBOL: 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()); g_token->name.data());
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok)); tokToString(tok));
break; break;
} }
...@@ -1928,7 +1942,7 @@ int DocHtmlHeader::parse() ...@@ -1928,7 +1942,7 @@ int DocHtmlHeader::parse()
} }
if (tok==0) 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); " <h%d> tag\n",m_level);
} }
endheader: endheader:
...@@ -1955,11 +1969,11 @@ int DocHRef::parse() ...@@ -1955,11 +1969,11 @@ int DocHRef::parse()
switch (tok) switch (tok)
{ {
case TK_COMMAND: 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()); g_token->name.data());
break; break;
case TK_SYMBOL: 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()); g_token->name.data());
break; break;
case TK_HTMLTAG: case TK_HTMLTAG:
...@@ -1971,13 +1985,13 @@ int DocHRef::parse() ...@@ -1971,13 +1985,13 @@ int DocHRef::parse()
} }
else 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); g_token->endTag?"/":"",g_token->name.data(),doctokenizerYYlineno);
} }
} }
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok),doctokenizerYYlineno); tokToString(tok),doctokenizerYYlineno);
break; break;
} }
...@@ -1985,7 +1999,7 @@ int DocHRef::parse() ...@@ -1985,7 +1999,7 @@ int DocHRef::parse()
} }
if (tok==0) 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); " <a href=...> tag",doctokenizerYYlineno);
} }
endhref: endhref:
...@@ -2023,7 +2037,7 @@ int DocInternal::parse() ...@@ -2023,7 +2037,7 @@ int DocInternal::parse()
} }
if (retval==TK_LISTITEM) 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); } while (retval!=0 && retval!=RetVal_Section);
if (lastPar) lastPar->markLast(); if (lastPar) lastPar->markLast();
...@@ -2031,24 +2045,24 @@ int DocInternal::parse() ...@@ -2031,24 +2045,24 @@ int DocInternal::parse()
// then parse any number of level1 sections // then parse any number of level1 sections
while (retval==RetVal_Section) while (retval==RetVal_Section)
{ {
SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId]; //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
int secLev = sec->type==SectionInfo::Subsection ? 2 : 1; //int secLev = sec->type==SectionInfo::Subsection ? 2 : 1;
if (secLev!=1) // wrong level //if (secLev!=1) // wrong level
{ //{
warn(g_fileName,doctokenizerYYlineno,"Error: Expected level 1 section, found a section with level %d.",secLev); // warn(g_fileName,doctokenizerYYlineno,"Warning: Expected level 1 section, found a section with level %d.",secLev);
break; // break;
} //}
else //else
{ //{
DocSection *s=new DocSection(this,secLev,g_token->sectionId); DocSection *s=new DocSection(this,1,g_token->sectionId);
m_children.append(s); m_children.append(s);
retval = s->parse(); retval = s->parse();
} //}
} }
if (retval==RetVal_Internal) 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")); DBG(("DocInternal::parse() end\n"));
...@@ -2067,7 +2081,7 @@ int DocIndexEntry::parse() ...@@ -2067,7 +2081,7 @@ int DocIndexEntry::parse()
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) 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; goto endindexentry;
} }
m_entry=""; m_entry="";
...@@ -2096,7 +2110,7 @@ int DocIndexEntry::parse() ...@@ -2096,7 +2110,7 @@ int DocIndexEntry::parse()
case DocSymbol::Apos: m_entry+='\''; break; case DocSymbol::Apos: m_entry+='\''; break;
case DocSymbol::Quot: m_entry+='"'; break; case DocSymbol::Quot: m_entry+='"'; break;
default: 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; break;
} }
} }
...@@ -2113,13 +2127,13 @@ int DocIndexEntry::parse() ...@@ -2113,13 +2127,13 @@ int DocIndexEntry::parse()
case CMD_HASH: m_entry+='#'; break; case CMD_HASH: m_entry+='#'; break;
case CMD_PERCENT: m_entry+='%'; break; case CMD_PERCENT: m_entry+='%'; break;
default: 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()); g_token->name.data());
break; break;
} }
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok)); tokToString(tok));
break; break;
} }
...@@ -2147,11 +2161,11 @@ int DocHtmlCaption::parse() ...@@ -2147,11 +2161,11 @@ int DocHtmlCaption::parse()
switch (tok) switch (tok)
{ {
case TK_COMMAND: 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()); g_token->name.data());
break; break;
case TK_SYMBOL: 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()); g_token->name.data());
break; break;
case TK_HTMLTAG: case TK_HTMLTAG:
...@@ -2164,13 +2178,13 @@ int DocHtmlCaption::parse() ...@@ -2164,13 +2178,13 @@ int DocHtmlCaption::parse()
} }
else 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()); g_token->endTag?"/":"",g_token->name.data());
} }
} }
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok)); tokToString(tok));
break; break;
} }
...@@ -2178,7 +2192,7 @@ int DocHtmlCaption::parse() ...@@ -2178,7 +2192,7 @@ int DocHtmlCaption::parse()
} }
if (tok==0) 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); " <caption> tag",doctokenizerYYlineno);
} }
endcaption: endcaption:
...@@ -2245,20 +2259,20 @@ int DocHtmlRow::parse() ...@@ -2245,20 +2259,20 @@ int DocHtmlRow::parse()
} }
else // found some other tag 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()); "found <%s> instead!",g_token->name.data());
goto endrow; goto endrow;
} }
} }
else if (tok==0) // premature end of comment 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"); " for a html description title");
goto endrow; goto endrow;
} }
else // token other than html token 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)); tokToString(tok));
goto endrow; goto endrow;
} }
...@@ -2309,7 +2323,7 @@ getrow: ...@@ -2309,7 +2323,7 @@ getrow:
{ {
if (m_caption) 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 else
{ {
...@@ -2324,18 +2338,18 @@ getrow: ...@@ -2324,18 +2338,18 @@ getrow:
} }
else // found wrong token 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()); "found <%s%s> instead!", g_token->endTag ? "/" : "", g_token->name.data());
} }
} }
else if (tok==0) // premature end of comment 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"); " for a <tr> or <caption> tag");
} }
else // token other than html token 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)); tokToString(tok));
} }
...@@ -2369,11 +2383,11 @@ int DocHtmlDescTitle::parse() ...@@ -2369,11 +2383,11 @@ int DocHtmlDescTitle::parse()
switch (tok) switch (tok)
{ {
case TK_COMMAND: 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()); g_token->name.data());
break; break;
case TK_SYMBOL: 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()); g_token->name.data());
break; break;
case TK_HTMLTAG: case TK_HTMLTAG:
...@@ -2390,13 +2404,13 @@ int DocHtmlDescTitle::parse() ...@@ -2390,13 +2404,13 @@ int DocHtmlDescTitle::parse()
} }
else 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()); g_token->endTag?"/":"",g_token->name.data());
} }
} }
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok)); tokToString(tok));
break; break;
} }
...@@ -2404,7 +2418,7 @@ int DocHtmlDescTitle::parse() ...@@ -2404,7 +2418,7 @@ int DocHtmlDescTitle::parse()
} }
if (tok==0) 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"); " <dt> tag");
} }
endtitle: endtitle:
...@@ -2464,20 +2478,20 @@ int DocHtmlDescList::parse() ...@@ -2464,20 +2478,20 @@ int DocHtmlDescList::parse()
} }
else // found some other tag 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()); "found <%s> instead!",g_token->name.data());
goto enddesclist; goto enddesclist;
} }
} }
else if (tok==0) // premature end of comment 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"); " for a html description title");
goto enddesclist; goto enddesclist;
} }
else // token other than html token 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)); tokToString(tok));
goto enddesclist; goto enddesclist;
} }
...@@ -2502,7 +2516,7 @@ int DocHtmlDescList::parse() ...@@ -2502,7 +2516,7 @@ int DocHtmlDescList::parse()
if (retval==0) 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: enddesclist:
...@@ -2589,20 +2603,20 @@ int DocHtmlList::parse() ...@@ -2589,20 +2603,20 @@ int DocHtmlList::parse()
} }
else // found some other tag 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()); "found <%s> instead!",g_token->name.data());
goto endlist; goto endlist;
} }
} }
else if (tok==0) // premature end of comment 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"); " for a html list item");
goto endlist; goto endlist;
} }
else // token other than html token 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)); tokToString(tok));
goto endlist; goto endlist;
} }
...@@ -2616,7 +2630,7 @@ int DocHtmlList::parse() ...@@ -2616,7 +2630,7 @@ int DocHtmlList::parse()
if (retval==0) 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'); m_type==Unordered ? 'u' : 'o');
} }
...@@ -2710,15 +2724,15 @@ void DocTitle::parse() ...@@ -2710,15 +2724,15 @@ void DocTitle::parse()
switch (tok) switch (tok)
{ {
case TK_COMMAND: 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()); g_token->name.data());
break; break;
case TK_SYMBOL: 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()); g_token->name.data());
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok)); tokToString(tok));
break; break;
} }
...@@ -2800,7 +2814,7 @@ int DocParamList::parse(const QString &cmdName) ...@@ -2800,7 +2814,7 @@ int DocParamList::parse(const QString &cmdName)
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) 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()); cmdName.data());
} }
doctokenizerYYsetStateParam(); doctokenizerYYsetStateParam();
...@@ -2823,7 +2837,7 @@ int DocParamList::parse(const QString &cmdName) ...@@ -2823,7 +2837,7 @@ int DocParamList::parse(const QString &cmdName)
doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara();
if (tok==0) /* premature end of comment block */ 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()); "argument of command %s",cmdName.data());
return 0; return 0;
} }
...@@ -2876,7 +2890,8 @@ int DocPara::handleSimpleSection(DocSimpleSect::Type t) ...@@ -2876,7 +2890,8 @@ int DocPara::handleSimpleSection(DocSimpleSect::Type t)
DocSimpleSect *ss=0; DocSimpleSect *ss=0;
if (!m_children.isEmpty() && // previous element if (!m_children.isEmpty() && // previous element
m_children.last()->kind()==Kind_SimpleSect && // was a simple sect m_children.last()->kind()==Kind_SimpleSect && // was a simple sect
((DocSimpleSect *)m_children.last())->type()==t) // of same type ((DocSimpleSect *)m_children.last())->type()==t && // of same type
t!=DocSimpleSect::User) // but not user defined
{ {
// append to previous section // append to previous section
ss=(DocSimpleSect *)m_children.last(); ss=(DocSimpleSect *)m_children.last();
...@@ -2930,7 +2945,7 @@ void DocPara::handleIncludeOperator(const QString &cmdName,DocIncOperator::Type ...@@ -2930,7 +2945,7 @@ void DocPara::handleIncludeOperator(const QString &cmdName,DocIncOperator::Type
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) 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()); cmdName.data());
return; return;
} }
...@@ -2939,13 +2954,13 @@ void DocPara::handleIncludeOperator(const QString &cmdName,DocIncOperator::Type ...@@ -2939,13 +2954,13 @@ void DocPara::handleIncludeOperator(const QString &cmdName,DocIncOperator::Type
doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara();
if (tok==0) 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()); "argument of command %s", cmdName.data());
return; return;
} }
else if (tok!=TK_WORD) 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()); tokToString(tok),cmdName.data());
return; return;
} }
...@@ -2980,21 +2995,21 @@ void DocPara::handleImage(const QString &cmdName) ...@@ -2980,21 +2995,21 @@ void DocPara::handleImage(const QString &cmdName)
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) 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()); cmdName.data());
return; return;
} }
tok=doctokenizerYYlex(); tok=doctokenizerYYlex();
if (tok!=TK_WORD && tok!=TK_LNKWORD) 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()); tokToString(tok),cmdName.data());
return; return;
} }
tok=doctokenizerYYlex(); tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) 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()); cmdName.data());
return; return;
} }
...@@ -3005,7 +3020,7 @@ void DocPara::handleImage(const QString &cmdName) ...@@ -3005,7 +3020,7 @@ void DocPara::handleImage(const QString &cmdName)
else if (imgType=="rtf") t=DocImage::Rtf; else if (imgType=="rtf") t=DocImage::Rtf;
else 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", "%s is not valid",
imgType.data(),cmdName.data()); imgType.data(),cmdName.data());
return; return;
...@@ -3014,7 +3029,7 @@ void DocPara::handleImage(const QString &cmdName) ...@@ -3014,7 +3029,7 @@ void DocPara::handleImage(const QString &cmdName)
tok=doctokenizerYYlex(); tok=doctokenizerYYlex();
if (tok!=TK_WORD) 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()); tokToString(tok),cmdName.data());
return; return;
} }
...@@ -3029,7 +3044,7 @@ void DocPara::handleDotFile(const QString &cmdName) ...@@ -3029,7 +3044,7 @@ void DocPara::handleDotFile(const QString &cmdName)
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) 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()); cmdName.data());
return; return;
} }
...@@ -3037,7 +3052,7 @@ void DocPara::handleDotFile(const QString &cmdName) ...@@ -3037,7 +3052,7 @@ void DocPara::handleDotFile(const QString &cmdName)
tok=doctokenizerYYlex(); tok=doctokenizerYYlex();
if (tok!=TK_WORD) 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()); tokToString(tok),cmdName.data());
return; return;
} }
...@@ -3052,7 +3067,7 @@ void DocPara::handleLink(const QString &cmdName,bool isJavaLink) ...@@ -3052,7 +3067,7 @@ void DocPara::handleLink(const QString &cmdName,bool isJavaLink)
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) 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()); cmdName.data());
return; return;
} }
...@@ -3060,7 +3075,7 @@ void DocPara::handleLink(const QString &cmdName,bool isJavaLink) ...@@ -3060,7 +3075,7 @@ void DocPara::handleLink(const QString &cmdName,bool isJavaLink)
tok=doctokenizerYYlex(); tok=doctokenizerYYlex();
if (tok!=TK_WORD) 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()); tokToString(tok),cmdName.data());
return; return;
} }
...@@ -3079,7 +3094,7 @@ void DocPara::handleRef(const QString &cmdName) ...@@ -3079,7 +3094,7 @@ void DocPara::handleRef(const QString &cmdName)
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) 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()); cmdName.data());
return; return;
} }
...@@ -3088,7 +3103,7 @@ void DocPara::handleRef(const QString &cmdName) ...@@ -3088,7 +3103,7 @@ void DocPara::handleRef(const QString &cmdName)
DocRef *ref=0; DocRef *ref=0;
if (tok!=TK_WORD) 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()); tokToString(tok),cmdName.data());
goto endref; goto endref;
} }
...@@ -3129,7 +3144,7 @@ int DocPara::handleLanguageSwitch() ...@@ -3129,7 +3144,7 @@ int DocPara::handleLanguageSwitch()
} }
else 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)); tokToString(tok));
goto endlang; goto endlang;
} }
...@@ -3149,7 +3164,7 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t) ...@@ -3149,7 +3164,7 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t)
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) 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()); cmdName.data());
return; return;
} }
...@@ -3158,13 +3173,13 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t) ...@@ -3158,13 +3173,13 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t)
doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara();
if (tok==0) 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()); "argument of command %s",cmdName.data());
return; return;
} }
else if (tok!=TK_WORD) 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()); tokToString(tok),cmdName.data());
return; return;
} }
...@@ -3173,6 +3188,35 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t) ...@@ -3173,6 +3188,35 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t)
inc->parse(); 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) int DocPara::handleCommand(const QString &cmdName)
{ {
...@@ -3180,7 +3224,7 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3180,7 +3224,7 @@ int DocPara::handleCommand(const QString &cmdName)
switch (CmdMapper::map(cmdName)) switch (CmdMapper::map(cmdName))
{ {
case CMD_UNKNOWN: 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; break;
case CMD_EMPHASIS: case CMD_EMPHASIS:
m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Italic,TRUE)); m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Italic,TRUE));
...@@ -3280,29 +3324,26 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3280,29 +3324,26 @@ int DocPara::handleCommand(const QString &cmdName)
break; break;
case CMD_SECTION: case CMD_SECTION:
{ {
// get the argument of the section command. handleSection(cmdName);
int tok=doctokenizerYYlex(); retval = RetVal_Section;
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; break;
} case CMD_SUBSECTION:
else if (tok!=TK_WORD && tok!=TK_LNKWORD)
{ {
warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s", handleSection(cmdName);
tokToString(tok),cmdName.data()); retval = RetVal_Subsection;
}
break; break;
case CMD_SUBSUBSECTION:
{
handleSection(cmdName);
retval = RetVal_Subsubsection;
} }
g_token->sectionId = g_token->name; break;
retval = RetVal_Section; case CMD_PARAGRAPH:
{
handleSection(cmdName);
retval = RetVal_Paragraph;
} }
break; break;
case CMD_STARTCODE: case CMD_STARTCODE:
...@@ -3310,7 +3351,7 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3310,7 +3351,7 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStateCode(); doctokenizerYYsetStateCode();
retval = doctokenizerYYlex(); retval = doctokenizerYYlex();
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Code,g_isExample,g_fileName)); 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(); doctokenizerYYsetStatePara();
} }
break; break;
...@@ -3319,7 +3360,7 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3319,7 +3360,7 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStateHtmlOnly(); doctokenizerYYsetStateHtmlOnly();
retval = doctokenizerYYlex(); retval = doctokenizerYYlex();
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::HtmlOnly,g_isExample,g_fileName)); 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(); doctokenizerYYsetStatePara();
} }
break; break;
...@@ -3328,7 +3369,7 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3328,7 +3369,7 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStateLatexOnly(); doctokenizerYYsetStateLatexOnly();
retval = doctokenizerYYlex(); retval = doctokenizerYYlex();
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::LatexOnly,g_isExample,g_fileName)); 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(); doctokenizerYYsetStatePara();
} }
break; break;
...@@ -3337,7 +3378,7 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3337,7 +3378,7 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStateVerbatim(); doctokenizerYYsetStateVerbatim();
retval = doctokenizerYYlex(); retval = doctokenizerYYlex();
m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Verbatim,g_isExample,g_fileName)); 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(); doctokenizerYYsetStatePara();
} }
break; break;
...@@ -3346,7 +3387,7 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3346,7 +3387,7 @@ int DocPara::handleCommand(const QString &cmdName)
case CMD_ENDLATEXONLY: case CMD_ENDLATEXONLY:
case CMD_ENDLINK: case CMD_ENDLINK:
case CMD_ENDVERBATIM: 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; break;
case CMD_PARAM: case CMD_PARAM:
retval = handleParamSection(cmdName,DocParamSect::Param); retval = handleParamSection(cmdName,DocParamSect::Param);
...@@ -3380,20 +3421,20 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3380,20 +3421,20 @@ int DocPara::handleCommand(const QString &cmdName)
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) 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()); cmdName.data());
break; break;
} }
tok=doctokenizerYYlex(); tok=doctokenizerYYlex();
if (tok==0) 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()); "argument of command %s",cmdName.data());
break; break;
} }
else if (tok!=TK_WORD && tok!=TK_LNKWORD) 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()); tokToString(tok),cmdName.data());
break; break;
} }
...@@ -3416,20 +3457,20 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3416,20 +3457,20 @@ int DocPara::handleCommand(const QString &cmdName)
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) 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()); cmdName.data());
break; break;
} }
tok=doctokenizerYYlex(); tok=doctokenizerYYlex();
if (tok==0) 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()); "argument of command %s\n", cmdName.data());
break; break;
} }
else if (tok!=TK_WORD && tok!=TK_LNKWORD) 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()); tokToString(tok),cmdName.data());
break; break;
} }
...@@ -3485,10 +3526,10 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3485,10 +3526,10 @@ int DocPara::handleCommand(const QString &cmdName)
} }
break; break;
case CMD_SECREFITEM: 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; break;
case CMD_ENDSECREFLIST: 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; break;
case CMD_FORMULA: case CMD_FORMULA:
{ {
...@@ -3500,7 +3541,7 @@ int DocPara::handleCommand(const QString &cmdName) ...@@ -3500,7 +3541,7 @@ int DocPara::handleCommand(const QString &cmdName)
retval = handleLanguageSwitch(); retval = handleLanguageSwitch();
break; break;
case CMD_INTERNALREF: 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; break;
default: default:
// we should not get here! // we should not get here!
...@@ -3540,7 +3581,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag ...@@ -3540,7 +3581,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
case HTML_LI: case HTML_LI:
if (!insideUL(this) && !insideOL(this)) if (!insideUL(this) && !insideOL(this))
{ {
warn(g_fileName,doctokenizerYYlineno,"Error: lonely <li> tag found"); warn(g_fileName,doctokenizerYYlineno,"Warning: lonely <li> tag found");
} }
else else
{ {
...@@ -3578,6 +3619,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag ...@@ -3578,6 +3619,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
case HTML_PRE: case HTML_PRE:
handleStyleEnter(this,m_children,DocStyleChange::Preformatted,&g_token->attribs); handleStyleEnter(this,m_children,DocStyleChange::Preformatted,&g_token->attribs);
setInsidePreformatted(TRUE); setInsidePreformatted(TRUE);
doctokenizerYYsetInsidePre(TRUE);
break; break;
case HTML_P: case HTML_P:
retval=TK_NEWPARA; retval=TK_NEWPARA;
...@@ -3593,7 +3635,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag ...@@ -3593,7 +3635,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
retval = RetVal_DescTitle; retval = RetVal_DescTitle;
break; break;
case HTML_DD: case HTML_DD:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag <dd> found"); warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag <dd> found");
break; break;
case HTML_TABLE: case HTML_TABLE:
{ {
...@@ -3612,7 +3654,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag ...@@ -3612,7 +3654,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
retval = RetVal_TableHCell; retval = RetVal_TableHCell;
break; break;
case HTML_CAPTION: case HTML_CAPTION:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag <caption> found"); warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag <caption> found");
break; break;
case HTML_BR: case HTML_BR:
{ {
...@@ -3642,7 +3684,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag ...@@ -3642,7 +3684,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
} }
else 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 else if (opt->name=="href") // <a href=url>..</a> tag
...@@ -3717,7 +3759,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag ...@@ -3717,7 +3759,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
} }
break; break;
case HTML_UNKNOWN: 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; break;
default: default:
// we should not get here! // we should not get here!
...@@ -3737,7 +3779,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName) ...@@ -3737,7 +3779,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
case HTML_UL: case HTML_UL:
if (!insideUL(this)) 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 else
{ {
...@@ -3747,7 +3789,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName) ...@@ -3747,7 +3789,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
case HTML_OL: case HTML_OL:
if (!insideOL(this)) 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 else
{ {
...@@ -3757,7 +3799,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName) ...@@ -3757,7 +3799,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
case HTML_LI: case HTML_LI:
if (!insideLI(this)) 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 else
{ {
...@@ -3767,7 +3809,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName) ...@@ -3767,7 +3809,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
//case HTML_PRE: //case HTML_PRE:
// if (!insidePRE(this)) // 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 // else
// { // {
...@@ -3798,6 +3840,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName) ...@@ -3798,6 +3840,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
case HTML_PRE: case HTML_PRE:
handleStyleLeave(this,m_children,DocStyleChange::Preformatted,"preformatted"); handleStyleLeave(this,m_children,DocStyleChange::Preformatted,"preformatted");
setInsidePreformatted(FALSE); setInsidePreformatted(FALSE);
doctokenizerYYsetInsidePre(FALSE);
break; break;
case HTML_P: case HTML_P:
// ignore </p> tag // ignore </p> tag
...@@ -3824,32 +3867,32 @@ int DocPara::handleHtmlEndTag(const QString &tagName) ...@@ -3824,32 +3867,32 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
// ignore </th> tag // ignore </th> tag
break; break;
case HTML_CAPTION: case HTML_CAPTION:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag </caption> found"); warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </caption> found");
break; break;
case HTML_BR: case HTML_BR:
warn(g_fileName,doctokenizerYYlineno,"Error: Illegal </br> tag found\n"); warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal </br> tag found\n");
break; break;
case HTML_H1: case HTML_H1:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag </h1> found"); warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </h1> found");
break; break;
case HTML_H2: case HTML_H2:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag </h2> found"); warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </h2> found");
break; break;
case HTML_H3: case HTML_H3:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag </h3> found"); warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </h3> found");
break; break;
case HTML_IMG: case HTML_IMG:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag </img> found"); warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </img> found");
break; break;
case HTML_HR: case HTML_HR:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag </hr> found"); warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </hr> found");
break; break;
case HTML_A: 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> // ignore </a> tag (can be part of <a name=...></a>
break; break;
case HTML_UNKNOWN: 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()); tagName.data());
break; break;
default: default:
...@@ -3886,7 +3929,7 @@ reparsetoken: ...@@ -3886,7 +3929,7 @@ reparsetoken:
handleLinkedWord(this,m_children); handleLinkedWord(this,m_children);
break; break;
case TK_URL: 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; break;
case TK_WHITESPACE: case TK_WHITESPACE:
{ {
...@@ -3982,13 +4025,13 @@ reparsetoken: ...@@ -3982,13 +4025,13 @@ reparsetoken:
} }
else 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"); "has invalid indent level");
} }
} }
else 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"); "list items");
} }
break; break;
...@@ -4089,7 +4132,7 @@ reparsetoken: ...@@ -4089,7 +4132,7 @@ reparsetoken:
} }
else else
{ {
warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found", warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
g_token->name.data()); g_token->name.data());
} }
break; break;
...@@ -4115,7 +4158,7 @@ endparagraph: ...@@ -4115,7 +4158,7 @@ endparagraph:
int DocSection::parse() 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; int retval=RetVal_OK;
g_nodeStack.push(this); g_nodeStack.push(this);
...@@ -4151,44 +4194,73 @@ int DocSection::parse() ...@@ -4151,44 +4194,73 @@ int DocSection::parse()
} }
if (retval==TK_LISTITEM) 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(); if (lastPar) lastPar->markLast();
// then parse any number of nested sections if (retval==RetVal_Subsection && m_level==1)
while (retval==RetVal_Section) // more sections follow
{ {
SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId]; // then parse any number of nested sections
ASSERT(sec!=0); while (retval==RetVal_Subsection) // more sections follow
int secLev = 1;
switch (sec->type)
{ {
case SectionInfo::Section: secLev=1; break; //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
case SectionInfo::Subsection: secLev=2; break; DocSection *s=new DocSection(this,2,g_token->sectionId);
case SectionInfo::Subsubsection: secLev=3; break; m_children.append(s);
case SectionInfo::Paragraph: secLev=4; break; retval = s->parse();
default: ASSERT(0);
} }
if (secLev<=level()) // new section at same or lower level
{
break;
} }
if (secLev!=level()+1) // new section at wrong level else if (retval==RetVal_Subsubsection && m_level==2)
{ {
warn(g_fileName,doctokenizerYYlineno,"Error: Expected level %d section, found a section " // then parse any number of nested sections
"with level %d",level()+1,secLev); while (retval==RetVal_Subsubsection) // more sections follow
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)
{ {
DocSection *s=new DocSection(this,secLev,g_token->sectionId); // then parse any number of nested sections
while (retval==RetVal_Paragraph) // more sections follow
{
//SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
DocSection *s=new DocSection(this,4,g_token->sectionId);
m_children.append(s); m_children.append(s);
retval = s->parse(); 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")); DBG(("DocSection::parse() end\n"));
DocNode *n = g_nodeStack.pop(); DocNode *n = g_nodeStack.pop();
...@@ -4224,7 +4296,7 @@ void DocText::parse() ...@@ -4224,7 +4296,7 @@ void DocText::parse()
} }
else else
{ {
warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found", warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
g_token->name.data()); g_token->name.data());
} }
} }
...@@ -4257,13 +4329,13 @@ void DocText::parse() ...@@ -4257,13 +4329,13 @@ void DocText::parse()
m_children.append(new DocSymbol(this,DocSymbol::Percent)); m_children.append(new DocSymbol(this,DocSymbol::Percent));
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected command `%s' found", warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected command `%s' found",
g_token->name.data()); g_token->name.data());
break; break;
} }
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok)); tokToString(tok));
break; break;
} }
...@@ -4301,7 +4373,7 @@ void DocRoot::parse() ...@@ -4301,7 +4373,7 @@ void DocRoot::parse()
} }
if (retval==TK_LISTITEM) 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_Section && retval!=RetVal_Internal);
if (lastPar) lastPar->markLast(); if (lastPar) lastPar->markLast();
...@@ -4311,20 +4383,10 @@ void DocRoot::parse() ...@@ -4311,20 +4383,10 @@ void DocRoot::parse()
{ {
SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId]; SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
ASSERT(sec!=0); ASSERT(sec!=0);
if (sec==0) break; DocSection *s=new DocSection(this,1,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);
m_children.append(s); m_children.append(s);
retval = s->parse(); retval = s->parse();
} }
}
if (retval==RetVal_Internal) if (retval==RetVal_Internal)
{ {
...@@ -4431,3 +4493,8 @@ DocNode *validatingParseText(const char *input) ...@@ -4431,3 +4493,8 @@ DocNode *validatingParseText(const char *input)
return txt; return txt;
} }
void docFindSections(const char *input,PageInfo *pi,Definition *d,MemberGroup *mg)
{
doctokenizerYYFindSections(input,pi,d,mg);
}
...@@ -30,6 +30,9 @@ ...@@ -30,6 +30,9 @@
class DocNode; class DocNode;
class MemberDef; class MemberDef;
class PageInfo;
class Definition;
class MemberGroup;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
...@@ -55,6 +58,9 @@ DocNode *validatingParseDoc(const char *fileName,int startLine, ...@@ -55,6 +58,9 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
*/ */
DocNode *validatingParseText(const char *input); 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. */ /*! @brief Abstract node interface with type information. */
...@@ -200,16 +206,18 @@ class DocLinkedWord : public DocNode ...@@ -200,16 +206,18 @@ class DocLinkedWord : public DocNode
class DocURL : public DocNode class DocURL : public DocNode
{ {
public: public:
DocURL(DocNode *parent,const QString &url) : DocURL(DocNode *parent,const QString &url,bool isEmail) :
m_parent(parent), m_url(url) {} m_parent(parent), m_url(url), m_isEmail(isEmail) {}
QString url() const { return m_url; } QString url() const { return m_url; }
Kind kind() const { return Kind_URL; } Kind kind() const { return Kind_URL; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); } void accept(DocVisitor *v) { v->visit(this); }
bool isEmail() const { return m_isEmail; }
private: private:
DocNode *m_parent; DocNode *m_parent;
QString m_url; QString m_url;
bool m_isEmail;
}; };
/*! @brief Node representing a line break */ /*! @brief Node representing a line break */
...@@ -912,6 +920,7 @@ class DocPara : public CompAccept<DocPara>, public DocNode ...@@ -912,6 +920,7 @@ class DocPara : public CompAccept<DocPara>, public DocNode
void handleInclude(const QString &cmdName,DocInclude::Type t); void handleInclude(const QString &cmdName,DocInclude::Type t);
void handleLink(const QString &cmdName,bool isJavaLink); void handleLink(const QString &cmdName,bool isJavaLink);
void handleRef(const QString &cmdName); void handleRef(const QString &cmdName);
void handleSection(const QString &cmdName);
int handleLanguageSwitch(); int handleLanguageSwitch();
private: private:
......
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
#include <qlist.h> #include <qlist.h>
#include "htmlattrib.h" #include "htmlattrib.h"
class Definition;
class PageInfo;
class MemberGroup;
enum Tokens enum Tokens
{ {
TK_WORD = 1, TK_WORD = 1,
...@@ -41,17 +45,20 @@ enum Tokens ...@@ -41,17 +45,20 @@ enum Tokens
RetVal_SimpleSec = 0x10001, RetVal_SimpleSec = 0x10001,
RetVal_ListItem = 0x10002, RetVal_ListItem = 0x10002,
RetVal_Section = 0x10003, RetVal_Section = 0x10003,
RetVal_EndList = 0x10004, RetVal_Subsection = 0x10004,
RetVal_EndPre = 0x10005, RetVal_Subsubsection = 0x10005,
RetVal_DescData = 0x10006, RetVal_Paragraph = 0x10006,
RetVal_DescTitle = 0x10007, RetVal_EndList = 0x10007,
RetVal_EndDesc = 0x10008, RetVal_EndPre = 0x10008,
RetVal_TableRow = 0x10009, RetVal_DescData = 0x10009,
RetVal_TableCell = 0x1000A, RetVal_DescTitle = 0x1000A,
RetVal_TableHCell = 0x1000B, RetVal_EndDesc = 0x1000B,
RetVal_EndTable = 0x1000C, RetVal_TableRow = 0x1000C,
RetVal_Internal = 0x1000D, RetVal_TableCell = 0x1000D,
RetVal_SwitchLang = 0x1000E RetVal_TableHCell = 0x1000E,
RetVal_EndTable = 0x1000F,
RetVal_Internal = 0x10010,
RetVal_SwitchLang = 0x10011
}; };
struct TokenInfo struct TokenInfo
...@@ -89,6 +96,9 @@ struct TokenInfo ...@@ -89,6 +96,9 @@ struct TokenInfo
// whitespace // whitespace
QString chars; QString chars;
// url
bool isEMailAddr;
}; };
// globals // globals
...@@ -100,6 +110,8 @@ extern FILE *doctokenizerYYin; ...@@ -100,6 +110,8 @@ extern FILE *doctokenizerYYin;
const char *tokToString(int token); const char *tokToString(int token);
// operations on the scanner // operations on the scanner
void doctokenizerYYFindSections(const char *input,PageInfo *pi,Definition *d,
MemberGroup *mg);
void doctokenizerYYinit(const char *input,const char *fileName); void doctokenizerYYinit(const char *input,const char *fileName);
void doctokenizerYYcleanup(); void doctokenizerYYcleanup();
void doctokenizerYYpushContext(); void doctokenizerYYpushContext();
...@@ -119,5 +131,7 @@ void doctokenizerYYsetStateLink(); ...@@ -119,5 +131,7 @@ void doctokenizerYYsetStateLink();
void doctokenizerYYsetStateRef(); void doctokenizerYYsetStateRef();
void doctokenizerYYsetStateInternalRef(); void doctokenizerYYsetStateInternalRef();
void doctokenizerYYsetStateText(); void doctokenizerYYsetStateText();
void doctokenizerYYsetStateSkipTitle();
void doctokenizerYYsetInsidePre(bool b);
#endif #endif
...@@ -27,16 +27,30 @@ ...@@ -27,16 +27,30 @@
#include "cmdmapper.h" #include "cmdmapper.h"
#include "config.h" #include "config.h"
#include "message.h" #include "message.h"
#include "section.h"
#include "membergroup.h"
#include "definition.h"
#include "page.h"
#define YY_NEVER_INTERACTIVE 1 #define YY_NEVER_INTERACTIVE 1
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
// context for tokenizer phase
static int g_commentState; static int g_commentState;
TokenInfo *g_token = 0; TokenInfo *g_token = 0;
static int g_inputPos = 0; static int g_inputPos = 0;
static const char *g_inputString; static const char *g_inputString;
static QString g_fileName; 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 struct DocLexerContext
{ {
...@@ -189,6 +203,41 @@ static void parseHtmlAttribs(const char *att) ...@@ -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 #undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
...@@ -237,14 +286,15 @@ OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG}) ...@@ -237,14 +286,15 @@ OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG})
LNKWORD1 ("::"|"#")?{SCOPEMASK} LNKWORD1 ("::"|"#")?{SCOPEMASK}
CVSPEC {BLANK}*("const"|"volatile") CVSPEC {BLANK}*("const"|"volatile")
LNKWORD2 {SCOPEPRE}*"operator"{OPMASK} LNKWORD2 {SCOPEPRE}*"operator"{OPMASK}
WORD1 [^ \t\n\r\\@<>{}&$#,.]+|"{"|"}" WORD1 [^ \t\n\r\\@<>(){}&$#,.]+|"{"|"}"
WORD2 "."|"," WORD2 "."|","|"("|")"
WORD1NQ [^ \t\n\r\\@<>{}&$#,."]+ WORD1NQ [^ \t\n\r\\@<>(){}&$#,."]+
WORD2NQ "."|"," WORD2NQ "."|","|"("|")"
HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">" 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" 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" 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} HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
%option noyywrap %option noyywrap
%option yylineno %option yylineno
...@@ -269,6 +319,12 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU} ...@@ -269,6 +319,12 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
%x St_Ref2 %x St_Ref2
%x St_IntRef %x St_IntRef
%x St_Text %x St_Text
%x St_SkipTitle
%x St_Sections
%s St_SecLabel1
%s St_SecLabel2
%s St_SecTitle
%% %%
<St_Para>\r /* skip carriage return */ <St_Para>\r /* skip carriage return */
...@@ -315,12 +371,14 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU} ...@@ -315,12 +371,14 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
g_token->name = yytext+1; g_token->name = yytext+1;
return TK_COMMAND; 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->name=yytext;
g_token->isEMailAddr=FALSE;
return TK_URL; 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->name=yytext;
g_token->isEMailAddr=TRUE;
return TK_URL; return TK_URL;
} }
<St_Para>"$"{ID}":"[^\n$]+"$" { /* RCS tag */ <St_Para>"$"{ID}":"[^\n$]+"$" { /* RCS tag */
...@@ -408,9 +466,20 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU} ...@@ -408,9 +466,20 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
return TK_COMMAND; return TK_COMMAND;
} }
<St_Para>({BLANK}*\n)+{BLANK}*\n { <St_Para>({BLANK}*\n)+{BLANK}*\n {
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 */ /* start of a new paragraph */
return TK_NEWPARA; return TK_NEWPARA;
} }
}
<St_Code>{CMD}"endcode" { <St_Code>{CMD}"endcode" {
return RetVal_OK; return RetVal_OK;
} }
...@@ -621,6 +690,56 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU} ...@@ -621,6 +690,56 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
} }
<St_Comment>[^-\n]+ /* inside html comment */ <St_Comment>[^-\n]+ /* inside html comment */
<St_Comment>. /* 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 { <*>\n {
warn(g_fileName,yylineno,"Error: Unexpected new line character"); warn(g_fileName,yylineno,"Error: Unexpected new line character");
} }
...@@ -636,11 +755,27 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU} ...@@ -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) void doctokenizerYYinit(const char *input,const char *fileName)
{ {
g_inputString = input; g_inputString = input;
g_inputPos = 0; g_inputPos = 0;
g_fileName = fileName; g_fileName = fileName;
g_insidePre = FALSE;
BEGIN(St_Para); BEGIN(St_Para);
} }
...@@ -718,11 +853,21 @@ void doctokenizerYYsetStateText() ...@@ -718,11 +853,21 @@ void doctokenizerYYsetStateText()
BEGIN(St_Text); BEGIN(St_Text);
} }
void doctokenizerYYsetStateSkipTitle()
{
BEGIN(St_SkipTitle);
}
void doctokenizerYYcleanup() void doctokenizerYYcleanup()
{ {
yy_delete_buffer( YY_CURRENT_BUFFER ); yy_delete_buffer( YY_CURRENT_BUFFER );
} }
void doctokenizerYYsetInsidePre(bool b)
{
g_insidePre = b;
}
extern "C" { // some bogus code to keep the compiler happy extern "C" { // some bogus code to keep the compiler happy
void doctokenizerYYdummy() { yy_flex_realloc(0,0); } void doctokenizerYYdummy() { yy_flex_realloc(0,0); }
} }
...@@ -1149,7 +1149,7 @@ static MemberDef *addVariableToClass( ...@@ -1149,7 +1149,7 @@ static MemberDef *addVariableToClass(
/*const QCString &scope,*/ /*const QCString &scope,*/
const QCString &name, const QCString &name,
bool fromAnnScope, bool fromAnnScope,
int indentDepth, /*int indentDepth,*/
MemberDef *fromAnnMemb, MemberDef *fromAnnMemb,
Protection prot) Protection prot)
{ {
...@@ -1236,7 +1236,7 @@ static MemberDef *addVariableToClass( ...@@ -1236,7 +1236,7 @@ static MemberDef *addVariableToClass(
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
md->setFromAnonymousScope(fromAnnScope); md->setFromAnonymousScope(fromAnnScope);
md->setFromAnonymousMember(fromAnnMemb); md->setFromAnonymousMember(fromAnnMemb);
md->setIndentDepth(indentDepth); //md->setIndentDepth(indentDepth);
md->setBodySegment(root->bodyLine,root->endBodyLine); md->setBodySegment(root->bodyLine,root->endBodyLine);
md->setInitializer(root->initializer); md->setInitializer(root->initializer);
md->setMaxInitLines(root->initLines); md->setMaxInitLines(root->initLines);
...@@ -1284,7 +1284,7 @@ static MemberDef *addVariableToFile( ...@@ -1284,7 +1284,7 @@ static MemberDef *addVariableToFile(
const QCString &scope, const QCString &scope,
const QCString &name, const QCString &name,
bool fromAnnScope, bool fromAnnScope,
int indentDepth, /*int indentDepth,*/
MemberDef *fromAnnMemb) MemberDef *fromAnnMemb)
{ {
Debug::print(Debug::Variables,0, Debug::print(Debug::Variables,0,
...@@ -1403,7 +1403,7 @@ static MemberDef *addVariableToFile( ...@@ -1403,7 +1403,7 @@ static MemberDef *addVariableToFile(
md->addSectionsToDefinition(root->anchors); md->addSectionsToDefinition(root->anchors);
md->setFromAnonymousScope(fromAnnScope); md->setFromAnonymousScope(fromAnnScope);
md->setFromAnonymousMember(fromAnnMemb); md->setFromAnonymousMember(fromAnnMemb);
md->setIndentDepth(indentDepth); //md->setIndentDepth(indentDepth);
md->setBodySegment(root->bodyLine,root->endBodyLine); md->setBodySegment(root->bodyLine,root->endBodyLine);
md->setInitializer(root->initializer); md->setInitializer(root->initializer);
md->setMaxInitLines(root->initLines); md->setMaxInitLines(root->initLines);
...@@ -1661,7 +1661,7 @@ void buildVarList(Entry *root) ...@@ -1661,7 +1661,7 @@ void buildVarList(Entry *root)
if (cd) if (cd)
{ {
addVariableToClass(root,cd,MemberDef::Friend,/*scope,*/ addVariableToClass(root,cd,MemberDef::Friend,/*scope,*/
root->name,FALSE,0,0,Public); root->name,FALSE,/*0,*/0,Public);
} }
} }
goto nextMember; goto nextMember;
...@@ -1693,44 +1693,51 @@ void buildVarList(Entry *root) ...@@ -1693,44 +1693,51 @@ void buildVarList(Entry *root)
scope=classScope; scope=classScope;
if (!scope.isEmpty() && !name.isEmpty() && (cd=getClass(scope))) if (!scope.isEmpty() && !name.isEmpty() && (cd=getClass(scope)))
{ {
// TODO: clean up this mess!
MemberDef *md=0; MemberDef *md=0;
// if cd is an annonymous scope we insert the member // if cd is an annonymous scope we insert the member
// into a non-annonymous scope as well. // into a non-annonymous scope as well.
int indentDepth=0; //int indentDepth=0;
int si=scope.find('@'); int si=scope.find('@');
//int anonyScopes = 0;
bool added=FALSE;
if (si!=-1) if (si!=-1)
{ {
//printf("name=`%s' scope=%s\n",name.data(),scope.data());
QCString pScope; QCString pScope;
ClassDef *pcd=0; ClassDef *pcd=0;
pScope = scope.left(QMAX(si-2,0)); pScope = scope.left(QMAX(si-2,0));
indentDepth = scope.right(scope.length()-si).contains("::")+1;
if (!pScope.isEmpty()) if (!pScope.isEmpty())
pScope.prepend(annScopePrefix); pScope.prepend(annScopePrefix);
else if (annScopePrefix.length()>2) else if (annScopePrefix.length()>2)
pScope=annScopePrefix.left(annScopePrefix.length()-2); pScope=annScopePrefix.left(annScopePrefix.length()-2);
//printf("pScope=`%s'\n",pScope.data());
if (name.at(0)!='@') if (name.at(0)!='@')
{ {
if (!pScope.isEmpty() && (pcd=getClass(pScope))) if (!pScope.isEmpty() && (pcd=getClass(pScope)))
{ {
//Protection p = (Protection)QMAX((int)root->protection,(int)cd->protection()); //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 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,TRUE,0);
//md=addVariableToFile(root,mtype,pScope,name,!pScope.isEmpty(),indentDepth,0); added=TRUE;
md=addVariableToFile(root,mtype,pScope,name,TRUE,indentDepth,0);
} }
} }
} }
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 else if (!name.isEmpty()) // global variable
{ {
//printf("Inserting member in global scope %s!\n",scope.data()); //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) //if (mtype==MemberDef::Typedef)
//{ //{
...@@ -5719,6 +5726,53 @@ static void distributeMemberGroupDocumentation() ...@@ -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) static void findDefineDocumentation(Entry *root)
{ {
if ((root->section==Entry::DEFINEDOC_SEC || if ((root->section==Entry::DEFINEDOC_SEC ||
...@@ -5896,8 +5950,10 @@ static void findMainPage(Entry *root) ...@@ -5896,8 +5950,10 @@ static void findMainPage(Entry *root)
// a page name is a label as well! // a page name is a label as well!
SectionInfo *si=new SectionInfo( SectionInfo *si=new SectionInfo(
Doxygen::mainPage->name,Doxygen::mainPage->title,SectionInfo::Section); indexName,
si->fileName=indexName; Doxygen::mainPage->name,
Doxygen::mainPage->title,
SectionInfo::Section);
Doxygen::sectionDict.insert(indexName,si); Doxygen::sectionDict.insert(indexName,si);
} }
else else
...@@ -7700,8 +7756,10 @@ void parseInput() ...@@ -7700,8 +7756,10 @@ void parseInput()
msg("Adding source references...\n"); msg("Adding source references...\n");
addSourceReferences(); addSourceReferences();
msg("Adding todo/test/bug list items...\n"); msg("Adding todo/test/bug list items...\n");
addListReferences(); addListReferences();
} }
void generateOutput() void generateOutput()
...@@ -7775,6 +7833,9 @@ void generateOutput() ...@@ -7775,6 +7833,9 @@ void generateOutput()
msg("Resolving user defined references...\n"); msg("Resolving user defined references...\n");
resolveUserReferences(); resolveUserReferences();
msg("Finding anchor and section in the documentation...\n");
findSectionsInDocumentation();
msg("Generating index page...\n"); msg("Generating index page...\n");
writeIndex(*outputList); writeIndex(*outputList);
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "dot.h" #include "dot.h"
#include "message.h" #include "message.h"
#include "code.h" #include "code.h"
#include "docparser.h"
//#include "xml.h" //#include "xml.h"
/*! create a new file definition, where \a p is the file path, /*! create a new file definition, where \a p is the file path,
...@@ -97,6 +98,23 @@ void FileDef::distributeMemberGroupDocumentation() ...@@ -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) void FileDef::writeDetailedDocumentation(OutputList &ol)
{ {
if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) || if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
...@@ -369,7 +387,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -369,7 +387,7 @@ void FileDef::writeDocumentation(OutputList &ol)
ol.docify(nd->displayName()); ol.docify(nd->displayName());
ol.endBold(); ol.endBold();
} }
ol.endMemberItem(FALSE); ol.endMemberItem();
} }
} }
if (found) ol.endMemberList(); if (found) ol.endMemberList();
......
...@@ -145,6 +145,7 @@ class FileDef : public Definition ...@@ -145,6 +145,7 @@ class FileDef : public Definition
void addMembersToMemberGroup(); void addMembersToMemberGroup();
void distributeMemberGroupDocumentation(); void distributeMemberGroupDocumentation();
void findSectionsInDocumentation();
void addListReferences(); void addListReferences();
......
...@@ -104,6 +104,23 @@ void GroupDef::distributeMemberGroupDocumentation() ...@@ -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) void GroupDef::addFile(const FileDef *def)
{ {
if (Config_getBool("SORT_MEMBER_DOCS")) if (Config_getBool("SORT_MEMBER_DOCS"))
...@@ -435,7 +452,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -435,7 +452,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
{ {
Doxygen::tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl; Doxygen::tagFile << " <file>" << convertToXML(fd->name()) << "</file>" << endl;
} }
ol.endMemberItem(FALSE); ol.endMemberItem();
if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{ {
ol.startMemberDescription(); ol.startMemberDescription();
...@@ -466,7 +483,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -466,7 +483,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
{ {
Doxygen::tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl; Doxygen::tagFile << " <namespace>" << convertToXML(nd->name()) << "</namespace>" << endl;
} }
ol.endMemberItem(FALSE); ol.endMemberItem();
if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{ {
ol.startMemberDescription(); ol.startMemberDescription();
...@@ -496,7 +513,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -496,7 +513,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
{ {
Doxygen::tagFile << " <subgroup>" << convertToXML(gd->name()) << "</subgroup>" << endl; Doxygen::tagFile << " <subgroup>" << convertToXML(gd->name()) << "</subgroup>" << endl;
} }
ol.endMemberItem(FALSE); ol.endMemberItem();
if (!gd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) if (!gd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{ {
ol.startMemberDescription(); ol.startMemberDescription();
......
...@@ -74,6 +74,7 @@ class GroupDef : public Definition ...@@ -74,6 +74,7 @@ class GroupDef : public Definition
void addMembersToMemberGroup(); void addMembersToMemberGroup();
void distributeMemberGroupDocumentation(); void distributeMemberGroupDocumentation();
void findSectionsInDocumentation();
void addListReferences(); void addListReferences();
......
...@@ -110,7 +110,9 @@ void HtmlDocVisitor::visit(DocSymbol *s) ...@@ -110,7 +110,9 @@ void HtmlDocVisitor::visit(DocSymbol *s)
void HtmlDocVisitor::visit(DocURL *u) void HtmlDocVisitor::visit(DocURL *u)
{ {
if (m_hide) return; 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()); filter(u->url());
m_t << "</a>"; m_t << "</a>";
} }
...@@ -156,7 +158,7 @@ void HtmlDocVisitor::visit(DocStyleChange *s) ...@@ -156,7 +158,7 @@ void HtmlDocVisitor::visit(DocStyleChange *s)
case DocStyleChange::Preformatted: case DocStyleChange::Preformatted:
if (s->enable()) if (s->enable())
{ {
m_t << "<pre" << htmlAttribsToString(s->attribs()) << ">\n"; m_t << "<pre" << htmlAttribsToString(s->attribs()) << ">";
m_insidePre=TRUE; m_insidePre=TRUE;
} }
else else
......
...@@ -766,7 +766,7 @@ void HtmlGenerator::startMemberItem(int annoType) ...@@ -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) //DBG_HTML(t << "<!-- endMemberItem(" << (int)inGroup << "," << fileName << "," << headerName << " -->" << endl)
if (Config_getBool("HTML_ALIGN_MEMBERS")) if (Config_getBool("HTML_ALIGN_MEMBERS"))
......
...@@ -94,7 +94,10 @@ class HtmlGenerator : public OutputGenerator ...@@ -94,7 +94,10 @@ class HtmlGenerator : public OutputGenerator
void endMemberSubtitle(); void endMemberSubtitle();
void startMemberList(); void startMemberList();
void endMemberList(); void endMemberList();
void startAnonTypeScope(int) {}
void endAnonTypeScope(int) {}
void startMemberItem(int); void startMemberItem(int);
void endMemberItem();
void startMemberGroupHeader(bool); void startMemberGroupHeader(bool);
void endMemberGroupHeader(); void endMemberGroupHeader();
...@@ -104,7 +107,6 @@ class HtmlGenerator : public OutputGenerator ...@@ -104,7 +107,6 @@ class HtmlGenerator : public OutputGenerator
void endMemberGroup(bool); void endMemberGroup(bool);
void insertMemberAlign(); void insertMemberAlign();
void endMemberItem(bool);
void startMemberDescription(); void startMemberDescription();
void endMemberDescription(); void endMemberDescription();
......
...@@ -158,7 +158,9 @@ void LatexDocVisitor::visit(DocURL *u) ...@@ -158,7 +158,9 @@ void LatexDocVisitor::visit(DocURL *u)
if (m_hide) return; if (m_hide) return;
if (Config_getBool("PDF_HYPERLINKS")) 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 "; m_t << "{\\tt ";
filter(u->url()); filter(u->url());
......
...@@ -1238,59 +1238,6 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType) ...@@ -1238,59 +1238,6 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType)
t << "}\\label{" << lab << "}" << endl; 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::docifyStatic(QTextStream &t,const char *str)
void LatexGenerator::docify(const char *str) void LatexGenerator::docify(const char *str)
...@@ -1364,38 +1311,38 @@ void LatexGenerator::endClassDiagram(ClassDiagram &d, ...@@ -1364,38 +1311,38 @@ void LatexGenerator::endClassDiagram(ClassDiagram &d,
d.writeFigure(t,dir,fileName); d.writeFigure(t,dir,fileName);
} }
//void LatexGenerator::writeFormula(const char *,const char *text)
//{
// t << text;
//}
void LatexGenerator::startMemberItem(int annType) void LatexGenerator::startAnonTypeScope(int indent)
{ {
if (!insideTabbing) if (indent==0)
{ {
t << "\\item " << endl;
switch(annType)
{
case 0: break;
case 1:
default:
t << "\\begin{tabbing}" << endl; t << "\\begin{tabbing}" << endl;
t << "xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=\\kill" << endl; t << "xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=\\kill" << endl;
//printf("LatexGenerator::startMemberItem() insideTabbing=TRUE\n"); //printf("LatexGenerator::startMemberItem() insideTabbing=TRUE\n");
insideTabbing=TRUE; insideTabbing=TRUE;
break;
}
} }
} }
void LatexGenerator::endMemberItem(bool endItem) void LatexGenerator::endAnonTypeScope(int indent)
{ {
if (insideTabbing && endItem) if (indent==0)
{ {
t << endl << "\\end{tabbing}"; t << endl << "\\end{tabbing}";
//printf("LatexGenerator::endMemberItem() insideTabbing=FALSE\n");
insideTabbing=FALSE; insideTabbing=FALSE;
} }
}
void LatexGenerator::startMemberItem(int)
{
//printf("LatexGenerator::startMemberItem(%d)\n",annType);
if (!insideTabbing)
{
t << "\\item " << endl;
}
}
void LatexGenerator::endMemberItem()
{
if (insideTabbing) if (insideTabbing)
{ {
t << "\\\\"; t << "\\\\";
...@@ -1414,95 +1361,20 @@ void LatexGenerator::writeNonBreakableSpace(int) ...@@ -1414,95 +1361,20 @@ void LatexGenerator::writeNonBreakableSpace(int)
void LatexGenerator::startMemberList() void LatexGenerator::startMemberList()
{ {
if (!insideTabbing) if (!insideTabbing)
{
t << "\\begin{CompactItemize}" << endl; t << "\\begin{CompactItemize}" << endl;
}
} }
void LatexGenerator::endMemberList() void LatexGenerator::endMemberList()
{ {
//printf("LatexGenerator::endMemberList(%d)\n",insideTabbing);
if (!insideTabbing) if (!insideTabbing)
{
t << "\\end{CompactItemize}" << endl; 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) void LatexGenerator::startMemberGroupHeader(bool hasHeader)
{ {
...@@ -1615,19 +1487,6 @@ void LatexGenerator::endParamList() ...@@ -1615,19 +1487,6 @@ void LatexGenerator::endParamList()
t << "\\end{Desc}" << endl; 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) void LatexGenerator::printDoc(DocNode *n)
{ {
......
...@@ -102,8 +102,10 @@ class LatexGenerator : public OutputGenerator ...@@ -102,8 +102,10 @@ class LatexGenerator : public OutputGenerator
void endMemberSubtitle() {} void endMemberSubtitle() {}
void startMemberList(); void startMemberList();
void endMemberList(); void endMemberList();
void startAnonTypeScope(int);
void endAnonTypeScope(int);
void startMemberItem(int); void startMemberItem(int);
void endMemberItem(bool); void endMemberItem();
void startMemberGroupHeader(bool); void startMemberGroupHeader(bool);
void endMemberGroupHeader(); void endMemberGroupHeader();
......
...@@ -473,21 +473,32 @@ void ManGenerator::endDescItem() ...@@ -473,21 +473,32 @@ void ManGenerator::endDescItem()
firstCol=TRUE; firstCol=TRUE;
} }
void ManGenerator::startMemberItem(int annType) void ManGenerator::startAnonTypeScope(int indentLevel)
{ {
if (firstCol && !insideTabbing) t << ".in +1c\n"; if (indentLevel==0)
t << "\n.ti -1c\n.RI \""; {
firstCol=FALSE; insideTabbing=TRUE;
if (annType!=0) insideTabbing=TRUE; }
} }
void ManGenerator::endMemberItem(bool endItem) void ManGenerator::endAnonTypeScope(int indentLevel)
{ {
if (endItem) if (indentLevel==0)
{ {
insideTabbing=FALSE; insideTabbing=FALSE;
t << "\"\n.br\n.RI \"";
} }
}
void ManGenerator::startMemberItem(int)
{
if (firstCol && !insideTabbing) t << ".in +1c\n";
t << "\n.ti -1c\n.RI \"";
firstCol=FALSE;
}
void ManGenerator::endMemberItem()
{
t << "\"\n.br"; t << "\"\n.br";
} }
...@@ -619,5 +630,6 @@ void ManGenerator::printDoc(DocNode *n) ...@@ -619,5 +630,6 @@ void ManGenerator::printDoc(DocNode *n)
ManDocVisitor *visitor = new ManDocVisitor(t,*this); ManDocVisitor *visitor = new ManDocVisitor(t,*this);
n->accept(visitor); n->accept(visitor);
delete visitor; delete visitor;
firstCol=FALSE;
} }
...@@ -100,8 +100,10 @@ class ManGenerator : public OutputGenerator ...@@ -100,8 +100,10 @@ class ManGenerator : public OutputGenerator
void writeListItem(); void writeListItem();
void startMemberList(); void startMemberList();
void endMemberList(); void endMemberList();
void startAnonTypeScope(int);
void endAnonTypeScope(int);
void startMemberItem(int); void startMemberItem(int);
void endMemberItem(bool); void endMemberItem();
void startMemberGroupHeader(bool); void startMemberGroupHeader(bool);
void endMemberGroupHeader(); void endMemberGroupHeader();
......
...@@ -30,8 +30,14 @@ ...@@ -30,8 +30,14 @@
#include "membergroup.h" #include "membergroup.h"
#include "groupdef.h" #include "groupdef.h"
#include "defargs.h" #include "defargs.h"
#include "docparser.h"
//#include "xml.h" //#include "xml.h"
//-----------------------------------------------------------------------------
int MemberDef::s_indentLevel = 0;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static QCString addTemplateNames(const QCString &s,const QCString &n,const QCString &t) static QCString addTemplateNames(const QCString &s,const QCString &n,const QCString &t)
...@@ -307,7 +313,7 @@ MemberDef::MemberDef(const char *df,int dl, ...@@ -307,7 +313,7 @@ MemberDef::MemberDef(const char *df,int dl,
annUsed=FALSE; annUsed=FALSE;
annShown=FALSE; annShown=FALSE;
annEnumType=0; annEnumType=0;
indDepth=0; //indDepth=0;
section=0; section=0;
bodyMemb=0; bodyMemb=0;
explExt=FALSE; explExt=FALSE;
...@@ -560,9 +566,11 @@ bool MemberDef::isBriefSectionVisible() const ...@@ -560,9 +566,11 @@ bool MemberDef::isBriefSectionVisible() const
// 0,"", //grpId,grpId==-1?"<none>":Doxygen::memberDocDict[grpId]->data(), // 0,"", //grpId,grpId==-1?"<none>":Doxygen::memberDocDict[grpId]->data(),
// "", //getFileDef()->name().data(), // "", //getFileDef()->name().data(),
// argsString()); // argsString());
QCString *pMemGrp = Doxygen::memberDocDict[grpId];
bool hasDocs = hasDocumentation() || bool hasDocs = hasDocumentation() ||
// part of a documented member group // 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 // only include static members with file/namespace scope if
// explicitly enabled in the config file // explicitly enabled in the config file
...@@ -636,6 +644,7 @@ bool MemberDef::isBriefSectionVisible() const ...@@ -636,6 +644,7 @@ bool MemberDef::isBriefSectionVisible() const
return visible; return visible;
} }
void MemberDef::writeDeclaration(OutputList &ol, void MemberDef::writeDeclaration(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
bool inGroup bool inGroup
...@@ -705,6 +714,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -705,6 +714,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
ClassDef *annoClassDef=getClassDefOfAnonymousType(); ClassDef *annoClassDef=getClassDefOfAnonymousType();
// start a new member declaration // start a new member declaration
///printf("startMemberItem for %s\n",name().data());
ol.startMemberItem((annoClassDef || annMemb || annEnumType) ? 1 : 0); ol.startMemberItem((annoClassDef || annMemb || annEnumType) ? 1 : 0);
// If there is no detailed description we need to write the anchor here. // If there is no detailed description we need to write the anchor here.
...@@ -728,11 +738,10 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -728,11 +738,10 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol.popGeneratorState(); ol.popGeneratorState();
} }
//printf("member name=%s indDepth=%d\n",name().data(),indDepth);
if (annoClassDef || annMemb) if (annoClassDef || annMemb)
{ {
int j; int j;
for (j=0;j<indDepth;j++) for (j=0;j<s_indentLevel;j++)
{ {
ol.writeNonBreakableSpace(3); ol.writeNonBreakableSpace(3);
} }
...@@ -752,6 +761,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -752,6 +761,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (ltype.left(7)=="friend ") ltype=ltype.right(ltype.length()-7); if (ltype.left(7)=="friend ") ltype=ltype.right(ltype.length()-7);
static QRegExp r("@[0-9]+"); static QRegExp r("@[0-9]+");
bool endAnonScopeNeeded=FALSE;
int l,i=r.match(ltype,0,&l); int l,i=r.match(ltype,0,&l);
if (i!=-1) // member has an anonymous type if (i!=-1) // member has an anonymous type
{ {
...@@ -761,10 +771,13 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -761,10 +771,13 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (annoClassDef) // type is an anonymous compound if (annoClassDef) // type is an anonymous compound
{ {
int ir=i+l; int ir=i+l;
//printf("<<<<<<<<<<<<<<\n");
ol.startAnonTypeScope(s_indentLevel++);
annoClassDef->writeDeclaration(ol,annMemb,inGroup); annoClassDef->writeDeclaration(ol,annMemb,inGroup);
//printf(">>>>>>>>>>>>>> startMemberItem(2)\n");
ol.startMemberItem(2); ol.startMemberItem(2);
int j; int j;
for (j=0;j<indDepth;j++) for (j=0;j< s_indentLevel-1;j++)
{ {
ol.writeNonBreakableSpace(3); ol.writeNonBreakableSpace(3);
} }
...@@ -775,6 +788,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -775,6 +788,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
{ {
ol.docify(";"); ol.docify(";");
} }
endAnonScopeNeeded=TRUE;
} }
else else
{ {
...@@ -900,9 +914,11 @@ void MemberDef::writeDeclaration(OutputList &ol, ...@@ -900,9 +914,11 @@ void MemberDef::writeDeclaration(OutputList &ol,
ol.endDoxyAnchor(cfname,anchor()); 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 // write brief description
if (!briefDescription().isEmpty() && if (!briefDescription().isEmpty() &&
Config_getBool("BRIEF_MEMBER_DESC") && Config_getBool("BRIEF_MEMBER_DESC") &&
...@@ -1944,8 +1960,15 @@ void MemberDef::setArgumentList(ArgumentList *al) ...@@ -1944,8 +1960,15 @@ void MemberDef::setArgumentList(ArgumentList *al)
if (defArgList) delete defArgList; if (defArgList) delete defArgList;
defArgList = al; defArgList = al;
} }
void MemberDef::setDeclArgumentList(ArgumentList *al) void MemberDef::setDeclArgumentList(ArgumentList *al)
{ {
if (declArgList) delete declArgList; if (declArgList) delete declArgList;
declArgList = al; declArgList = al;
} }
void MemberDef::findSectionsInDocumentation()
{
docFindSections(documentation(),0,this,0);
}
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "qtbc.h" #include "qtbc.h"
#include <qlist.h> #include <qlist.h>
#include <qdict.h> #include <qdict.h>
#include <qstack.h>
#include "entry.h" #include "entry.h"
#include "definition.h" #include "definition.h"
...@@ -221,8 +222,8 @@ class MemberDef : public Definition ...@@ -221,8 +222,8 @@ class MemberDef : public Definition
void setFromAnonymousMember(MemberDef *m) { annMemb=m; } void setFromAnonymousMember(MemberDef *m) { annMemb=m; }
bool fromAnonymousScope() const { return annScope; } bool fromAnonymousScope() const { return annScope; }
bool anonymousDeclShown() const { return annUsed; } bool anonymousDeclShown() const { return annUsed; }
void setIndentDepth( int i) { indDepth=i; } //void setIndentDepth( int i) { indDepth=i; }
int indentDepth() { return indDepth; } //int indentDepth() { return indDepth; }
bool visibleMemberGroup(bool hideNoHeader); bool visibleMemberGroup(bool hideNoHeader);
MemberDef *templateMaster() const { return m_templateMaster; } MemberDef *templateMaster() const { return m_templateMaster; }
...@@ -251,6 +252,7 @@ class MemberDef : public Definition ...@@ -251,6 +252,7 @@ class MemberDef : public Definition
void writeEnumDeclaration(OutputList &typeDecl, void writeEnumDeclaration(OutputList &typeDecl,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd); ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd);
void findSectionsInDocumentation();
bool visited; bool visited;
...@@ -290,7 +292,7 @@ class MemberDef : public Definition ...@@ -290,7 +292,7 @@ class MemberDef : public Definition
bool annScope; // member is part of an annoymous scope bool annScope; // member is part of an annoymous scope
bool annUsed; bool annUsed;
bool annShown; 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 maxInitLines; // when the initializer will be displayed
int userInitLines; // result of explicit \hideinitializer or \showinitializer int userInitLines; // result of explicit \hideinitializer or \showinitializer
MemberList *section; // declation list containing this member MemberList *section; // declation list containing this member
...@@ -323,6 +325,7 @@ class MemberDef : public Definition ...@@ -323,6 +325,7 @@ class MemberDef : public Definition
// disable copying of member defs // disable copying of member defs
MemberDef(const MemberDef &); MemberDef(const MemberDef &);
MemberDef &operator=(const MemberDef &); MemberDef &operator=(const MemberDef &);
static int s_indentLevel;
}; };
#endif #endif
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "scanner.h" #include "scanner.h"
#include "groupdef.h" #include "groupdef.h"
#include "doxygen.h" #include "doxygen.h"
#include "docparser.h"
//static QCString idToName(int id) //static QCString idToName(int id)
//{ //{
...@@ -35,7 +36,8 @@ ...@@ -35,7 +36,8 @@
// return result; // 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); //printf("New member group id=%d header=%s desc=%s\n",id,hdr,d);
memberList = new MemberList; memberList = new MemberList;
...@@ -46,6 +48,7 @@ MemberGroup::MemberGroup(int id,const char *hdr,const char *d) /* : Definition(i ...@@ -46,6 +48,7 @@ MemberGroup::MemberGroup(int id,const char *hdr,const char *d) /* : Definition(i
inSameSection = TRUE; inSameSection = TRUE;
inDeclSection = 0; inDeclSection = 0;
m_numDecMembers = -1; m_numDecMembers = -1;
m_parent = parent;
//printf("Member group docs=`%s'\n",doc.data()); //printf("Member group docs=`%s'\n",doc.data());
} }
...@@ -210,3 +213,10 @@ void MemberGroup::addListReferences(Definition *def) ...@@ -210,3 +213,10 @@ void MemberGroup::addListReferences(Definition *def)
{ {
memberList->addListReferences(def); memberList->addListReferences(def);
} }
void MemberGroup::findSectionsInDocumentation()
{
docFindSections(doc,0,0,this);
memberList->findSectionsInDocumentation();
}
...@@ -36,7 +36,7 @@ class Definition; ...@@ -36,7 +36,7 @@ class Definition;
class MemberGroup class MemberGroup
{ {
public: public:
MemberGroup(int id,const char *header,const char *docs); MemberGroup(Definition *parent,int id,const char *header,const char *docs);
~MemberGroup(); ~MemberGroup();
QCString header() const { return grpHeader; } QCString header() const { return grpHeader; }
int groupId() const { return grpId; } int groupId() const { return grpId; }
...@@ -54,6 +54,7 @@ class MemberGroup ...@@ -54,6 +54,7 @@ class MemberGroup
void addToDeclarationSection(); void addToDeclarationSection();
int countDecMembers(/*bool sectionPerType*/); int countDecMembers(/*bool sectionPerType*/);
void distributeMemberGroupDocumentation(); void distributeMemberGroupDocumentation();
void findSectionsInDocumentation();
int varCount() const; int varCount() const;
int funcCount() const; int funcCount() const;
int enumCount() const; int enumCount() const;
...@@ -67,6 +68,7 @@ class MemberGroup ...@@ -67,6 +68,7 @@ class MemberGroup
void setInGroup(bool b); void setInGroup(bool b);
void addListReferences(Definition *d); void addListReferences(Definition *d);
MemberList *members() const { return memberList; } MemberList *members() const { return memberList; }
Definition *parent() const { return m_parent; }
private: private:
MemberList *memberList; // list of all members in the group MemberList *memberList; // list of all members in the group
...@@ -78,6 +80,7 @@ class MemberGroup ...@@ -78,6 +80,7 @@ class MemberGroup
MemberList *inDeclSection; MemberList *inDeclSection;
bool inSameSection; bool inSameSection;
int m_numDecMembers; int m_numDecMembers;
Definition *m_parent;
}; };
class MemberGroupList : public QList<MemberGroup> class MemberGroupList : public QList<MemberGroup>
......
...@@ -344,7 +344,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, ...@@ -344,7 +344,7 @@ void MemberList::writePlainDeclarations(OutputList &ol,
ol.insertMemberAlign(); ol.insertMemberAlign();
//ol+=typeDecl; // append the enum values. //ol+=typeDecl; // append the enum values.
md->writeEnumDeclaration(ol,cd,nd,fd,gd); md->writeEnumDeclaration(ol,cd,nd,fd,gd);
ol.endMemberItem(FALSE); ol.endMemberItem();
if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
{ {
ol.startMemberDescription(); ol.startMemberDescription();
...@@ -537,6 +537,25 @@ void MemberList::addListReferences(Definition *def) ...@@ -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) int MemberSDict::compareItems(GCI item1, GCI item2)
......
...@@ -57,6 +57,7 @@ class MemberList : public QList<MemberDef> ...@@ -57,6 +57,7 @@ class MemberList : public QList<MemberDef>
void addMemberGroup(MemberGroup *mg); void addMemberGroup(MemberGroup *mg);
void setInGroup(bool group) { m_inGroup=group; } void setInGroup(bool group) { m_inGroup=group; }
void addListReferences(Definition *def); void addListReferences(Definition *def);
void findSectionsInDocumentation();
private: private:
int m_varCnt,m_funcCnt,m_enumCnt,m_enumValCnt,m_typeCnt; int m_varCnt,m_funcCnt,m_enumCnt,m_enumValCnt,m_typeCnt;
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "memberlist.h" #include "memberlist.h"
#include "doxygen.h" #include "doxygen.h"
#include "message.h" #include "message.h"
#include "docparser.h"
NamespaceDef::NamespaceDef(const char *df,int dl, NamespaceDef::NamespaceDef(const char *df,int dl,
const char *name,const char *lref) : const char *name,const char *lref) :
...@@ -61,6 +62,24 @@ void NamespaceDef::distributeMemberGroupDocumentation() ...@@ -61,6 +62,24 @@ void NamespaceDef::distributeMemberGroupDocumentation()
mg->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) void NamespaceDef::insertUsedFile(const char *f)
{ {
if (files.find(f)==-1) if (files.find(f)==-1)
......
...@@ -72,6 +72,7 @@ class NamespaceDef : public Definition ...@@ -72,6 +72,7 @@ class NamespaceDef : public Definition
} }
void addMembersToMemberGroup(); void addMembersToMemberGroup();
void distributeMemberGroupDocumentation(); void distributeMemberGroupDocumentation();
void findSectionsInDocumentation();
virtual Definition *findInnerCompound(const char *name); virtual Definition *findInnerCompound(const char *name);
void addInnerCompound(Definition *d); void addInnerCompound(Definition *d);
......
...@@ -302,8 +302,10 @@ class OutputGenerator : public BaseOutputDocInterface ...@@ -302,8 +302,10 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endMemberSubtitle() = 0; virtual void endMemberSubtitle() = 0;
virtual void startMemberList() = 0; virtual void startMemberList() = 0;
virtual void endMemberList() = 0; virtual void endMemberList() = 0;
virtual void startAnonTypeScope(int) = 0;
virtual void endAnonTypeScope(int) = 0;
virtual void startMemberItem(int) = 0; virtual void startMemberItem(int) = 0;
virtual void endMemberItem(bool) = 0; virtual void endMemberItem() = 0;
virtual void startMemberGroupHeader(bool) = 0; virtual void startMemberGroupHeader(bool) = 0;
virtual void endMemberGroupHeader() = 0; virtual void endMemberGroupHeader() = 0;
virtual void startMemberGroupDocs() = 0; virtual void startMemberGroupDocs() = 0;
......
...@@ -161,10 +161,14 @@ class OutputList : public OutputDocInterface ...@@ -161,10 +161,14 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startMemberList); } { forall(&OutputGenerator::startMemberList); }
void endMemberList() void endMemberList()
{ forall(&OutputGenerator::endMemberList); } { forall(&OutputGenerator::endMemberList); }
void startAnonTypeScope(int i1)
{ forall(&OutputGenerator::startAnonTypeScope,i1); }
void endAnonTypeScope(int i1)
{ forall(&OutputGenerator::endAnonTypeScope,i1); }
void startMemberItem(int i1) void startMemberItem(int i1)
{ forall(&OutputGenerator::startMemberItem,i1); } { forall(&OutputGenerator::startMemberItem,i1); }
void endMemberItem(bool b2) void endMemberItem()
{ forall(&OutputGenerator::endMemberItem,b2); } { forall(&OutputGenerator::endMemberItem); }
void startMemberGroupHeader(bool b) void startMemberGroupHeader(bool b)
{ forall(&OutputGenerator::startMemberGroupHeader,b); } { forall(&OutputGenerator::startMemberGroupHeader,b); }
void endMemberGroupHeader() void endMemberGroupHeader()
......
...@@ -17,8 +17,10 @@ ...@@ -17,8 +17,10 @@
#include "sortdict.h" #include "sortdict.h"
#include "config.h" #include "config.h"
#include "docparser.h"
#include "section.h" #include "section.h"
#include "doxygen.h"
class PageInfo class PageInfo
{ {
...@@ -76,6 +78,10 @@ class PageInfo ...@@ -76,6 +78,10 @@ class PageInfo
} }
} }
} }
void findSectionsInDocumentation()
{
docFindSections(doc,this,0,0);
}
void writeDocAnchorsToTagFile() void writeDocAnchorsToTagFile()
{ {
......
...@@ -202,6 +202,7 @@ void RTFDocVisitor::visit(DocURL *u) ...@@ -202,6 +202,7 @@ void RTFDocVisitor::visit(DocURL *u)
m_t << "{\\field " m_t << "{\\field "
"{\\*\\fldinst " "{\\*\\fldinst "
"{ HYPERLINK \\\\l \""; "{ HYPERLINK \\\\l \"";
if (u->isEmail()) m_t << "mailto:";
m_t << u->url(); m_t << u->url();
m_t << "\" }" m_t << "\" }"
"{}"; "{}";
......
...@@ -1722,7 +1722,7 @@ void RTFGenerator::startMemberItem(int) ...@@ -1722,7 +1722,7 @@ void RTFGenerator::startMemberItem(int)
t << rtf_Style_Reset << rtf_BList_DepthStyle() << endl; // set style to apropriate depth 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) DBG_RTF(t <<"{\\comment endMemberItem }" << endl)
newParagraph(); newParagraph();
......
...@@ -103,8 +103,10 @@ class RTFGenerator : public OutputGenerator ...@@ -103,8 +103,10 @@ class RTFGenerator : public OutputGenerator
void endMemberSubtitle(); void endMemberSubtitle();
void startMemberList(); void startMemberList();
void endMemberList(); void endMemberList();
void startAnonTypeScope(int) {}
void endAnonTypeScope(int) {}
void startMemberItem(int); void startMemberItem(int);
void endMemberItem(bool); void endMemberItem();
//void memberGroupSpacing(bool) {} //void memberGroupSpacing(bool) {}
//void memberGroupSeparator() {} //void memberGroupSeparator() {}
void insertMemberAlign() {} void insertMemberAlign() {}
......
...@@ -111,8 +111,8 @@ static char afterDocTerminator; ...@@ -111,8 +111,8 @@ static char afterDocTerminator;
static int tmpDocType; static int tmpDocType;
static QCString sectionLabel; static QCString sectionLabel;
static QCString sectionTitle; static QCString sectionTitle;
static SectionInfo::SectionType //static SectionInfo::SectionType
sectionType; // sectionType;
static QCString funcPtrType; static QCString funcPtrType;
static QCString templateStr; static QCString templateStr;
static QCString aliasName; static QCString aliasName;
...@@ -279,6 +279,7 @@ static void newDocState(); ...@@ -279,6 +279,7 @@ static void newDocState();
//----------------------------------------------------------------- //-----------------------------------------------------------------
#if 0
static void addSection() static void addSection()
{ {
//printf("New section pageName=%s label=%s title=%s\n", //printf("New section pageName=%s label=%s title=%s\n",
...@@ -292,8 +293,7 @@ static void addSection() ...@@ -292,8 +293,7 @@ static void addSection()
if (sectionLabel.isEmpty()) return; if (sectionLabel.isEmpty()) return;
if (Doxygen::sectionDict.find(sectionLabel)==0) if (Doxygen::sectionDict.find(sectionLabel)==0)
{ {
SectionInfo *si=new SectionInfo(sectionLabel,sectionTitle,sectionType); SectionInfo *si=new SectionInfo(current->name,sectionLabel,sectionTitle,sectionType);
si->fileName = current->name;
//printf("Adding section addr=%p label=`%s' sectionTitle=`%s' fileName=%s\n",si,sectionLabel.data(),sectionTitle.data(),si->fileName.data()); //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); Doxygen::sectionDict.insert(sectionLabel,si);
current->anchors->append(new QCString(sectionLabel)); current->anchors->append(new QCString(sectionLabel));
...@@ -305,6 +305,61 @@ static void addSection() ...@@ -305,6 +305,61 @@ static void addSection()
} }
sectionTitle.resize(0); 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 // Adds a formula text to the list/dictionary of formulas if it was
// not already added. Returns the label of the formula. // not already added. Returns the label of the formula.
...@@ -434,52 +489,6 @@ static void prependScope() ...@@ -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 #undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
...@@ -953,7 +962,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -953,7 +962,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
} }
<FindMembers>{B}*((("disp")?"interface")|"valuetype"){BN}+ { // M$/Corba IDL interface <FindMembers>{B}*((("disp")?"interface")|"valuetype"){BN}+ { // M$/Corba IDL interface
lineCount(); lineCount();
if (insideIDL) if (insideIDL || insideJava)
{ {
isTypedef=FALSE; isTypedef=FALSE;
current->section = Entry::INTERFACE_SEC; current->section = Entry::INTERFACE_SEC;
...@@ -1948,6 +1957,20 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1948,6 +1957,20 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
initEntry(); initEntry();
BEGIN(MemberSpecSkip); 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. <MemberSpec>([*&]*{BN}*)*{ID}("["[a-z_A-Z0-9]*"]")* { // the [] part could be improved.
lineCount(); lineCount();
int i=0,l=yyleng,j; int i=0,l=yyleng,j;
...@@ -1963,6 +1986,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1963,6 +1986,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
msType = yytext; msType=msType.left(i); msType = yytext; msType=msType.left(i);
} }
<MemberSpec>[,;] { <MemberSpec>[,;] {
//printf("current->name=`%s' msName=`%s'\n",current->name.data(),msName.data());
if (msName.isEmpty() && !current->name.isEmpty()) if (msName.isEmpty() && !current->name.isEmpty())
/* && (current->section & Entry::COMPOUND_MASK)) */ /* && (current->section & Entry::COMPOUND_MASK)) */
{ {
...@@ -2607,6 +2631,17 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -2607,6 +2631,17 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
previous->doc += current->doc; previous->doc += current->doc;
current->doc.resize(0); 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; previous->endBodyLine=yyLineNr;
BEGIN( lastCurlyContext ) ; BEGIN( lastCurlyContext ) ;
} }
...@@ -3582,19 +3617,23 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -3582,19 +3617,23 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->doc+=yytext; current->doc+=yytext;
} }
<PageDoc>{CMD}"section"{B}+ { <PageDoc>{CMD}"section"{B}+ {
sectionType=SectionInfo::Section; //sectionType=SectionInfo::Section;
current->doc+=yytext;
BEGIN(SectionLabel); BEGIN(SectionLabel);
} }
<PageDoc>{CMD}"subsection"{B}+ { <PageDoc>{CMD}"subsection"{B}+ {
sectionType=SectionInfo::Subsection; //sectionType=SectionInfo::Subsection;
current->doc+=yytext;
BEGIN(SectionLabel); BEGIN(SectionLabel);
} }
<PageDoc>{CMD}"subsubsection"{B}+ { <PageDoc>{CMD}"subsubsection"{B}+ {
sectionType=SectionInfo::Subsubsection; //sectionType=SectionInfo::Subsubsection;
current->doc+=yytext;
BEGIN(SectionLabel); BEGIN(SectionLabel);
} }
<PageDoc>{CMD}"paragraph"{B}+ { <PageDoc>{CMD}"paragraph"{B}+ {
sectionType=SectionInfo::Paragraph; //sectionType=SectionInfo::Paragraph;
current->doc+=yytext;
BEGIN(SectionLabel); BEGIN(SectionLabel);
} }
<GroupHeader>. { memberGroupHeader+=*yytext; } <GroupHeader>. { memberGroupHeader+=*yytext; }
...@@ -3629,7 +3668,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -3629,7 +3668,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
} }
<ExampleDoc,Doc,PageDoc,JavaDoc,ClassDoc>{CMD}"anchor"{B}+ { <ExampleDoc,Doc,PageDoc,JavaDoc,ClassDoc>{CMD}"anchor"{B}+ {
lastAnchorContext = YY_START; lastAnchorContext = YY_START;
sectionType=SectionInfo::Anchor; //sectionType=SectionInfo::Anchor;
current->doc+=yytext;
BEGIN(AnchorLabel); BEGIN(AnchorLabel);
} }
<Doc,PageDoc,ClassDoc>("\\\\"|"@@")"verbatim"/[^a-z_A-Z0-9] { <Doc,PageDoc,ClassDoc>("\\\\"|"@@")"verbatim"/[^a-z_A-Z0-9] {
...@@ -3742,28 +3782,33 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -3742,28 +3782,33 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
*pSkipDoc+=*yytext; *pSkipDoc+=*yytext;
} }
<AnchorLabel>{LABELID} { <AnchorLabel>{LABELID} {
sectionLabel=yytext; //sectionLabel=yytext;
addSection(); //addSection();
current->doc += "\\anchor "+sectionLabel+" "; //current->doc += "\\anchor "+sectionLabel+" ";
current->doc+=yytext;
BEGIN(lastAnchorContext); BEGIN(lastAnchorContext);
} }
<SectionLabel>{LABELID} { <SectionLabel>{LABELID} {
sectionLabel=yytext; //sectionLabel=yytext;
sectionTitle.resize(0); sectionTitle.resize(0);
current->doc+=yytext;
BEGIN(SectionTitle); BEGIN(SectionTitle);
} }
<SectionTitle>[^\n*]*/"\n" { <SectionTitle>[^\n*]*/"\n" {
sectionTitle+=yytext; sectionTitle+=yytext;
sectionTitle=sectionTitle.stripWhiteSpace(); sectionTitle=sectionTitle.stripWhiteSpace();
current->doc += "\\section "+sectionLabel+" "; //current->doc += "\\section "+sectionLabel+" ";
addSection(); //addSection();
current->doc+=yytext;
BEGIN(PageDoc); BEGIN(PageDoc);
} }
<SectionTitle>[^\n*]* { <SectionTitle>[^\n*]* {
sectionTitle+=yytext; sectionTitle+=yytext;
current->doc+=yytext;
} }
<SectionTitle>"*" { <SectionTitle>"*" {
sectionTitle+=yytext; sectionTitle+=yytext;
current->doc+=yytext;
} }
<ExampleDoc,PageDoc,ClassDoc>"\n" { yyLineNr++ ; current->doc+=yytext; } <ExampleDoc,PageDoc,ClassDoc>"\n" { yyLineNr++ ; current->doc+=yytext; }
<ExampleDoc,PageDoc,ClassDoc>[a-z_A-Z0-9 \t]+ { current->doc += yytext; } <ExampleDoc,PageDoc,ClassDoc>[a-z_A-Z0-9 \t]+ { current->doc += yytext; }
......
...@@ -29,9 +29,15 @@ class PageInfo; ...@@ -29,9 +29,15 @@ class PageInfo;
struct SectionInfo struct SectionInfo
{ {
enum SectionType { Page, Section, Subsection, Subsubsection, Paragraph, Anchor }; enum SectionType { Page, Section, Subsection,
SectionInfo(const char *l,const char *t,SectionType st,const char *r=0) Subsubsection, Paragraph, Anchor
{ label=l; title=t; type=st; ref=r; definition=0; pageRef=0; generated=FALSE; } };
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() {} ~SectionInfo() {}
QCString label; QCString label;
QCString title; QCString title;
......
...@@ -857,27 +857,9 @@ void TagFileParser::addDocAnchors(Entry *e,QStrList &l) ...@@ -857,27 +857,9 @@ void TagFileParser::addDocAnchors(Entry *e,QStrList &l)
while (s) while (s)
{ {
QCString *anchorName = new QCString(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) if (Doxygen::sectionDict.find(*anchorName)==0)
{ {
SectionInfo *si=new SectionInfo(*anchorName,*anchorName, SectionInfo *si=new SectionInfo(e->fileName,*anchorName,*anchorName,
SectionInfo::Anchor,m_tagName); SectionInfo::Anchor,m_tagName);
Doxygen::sectionDict.insert(*anchorName,si); Doxygen::sectionDict.insert(*anchorName,si);
e->anchors->append(anchorName); e->anchors->append(anchorName);
...@@ -886,7 +868,6 @@ void TagFileParser::addDocAnchors(Entry *e,QStrList &l) ...@@ -886,7 +868,6 @@ void TagFileParser::addDocAnchors(Entry *e,QStrList &l)
{ {
err("Duplicate anchor %s found\n",anchorName->data()); err("Duplicate anchor %s found\n",anchorName->data());
} }
//}
s=l.next(); s=l.next();
} }
} }
......
...@@ -62,22 +62,30 @@ ...@@ -62,22 +62,30 @@
// - Updated for "new since 1.2.13" version // - Updated for "new since 1.2.13" version
// - Removed some TODO's // - 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 // - Updated for "new since 1.2.16" version
// //
// 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: // Todo:
// - see FIXME // - see FIXME
#ifndef TRANSLATOR_DE_H #ifndef TRANSLATOR_DE_H
#define TRANSLATOR_DE_H #define TRANSLATOR_DE_H
class TranslatorGerman : public TranslatorAdapter_1_2_17 class TranslatorGerman : public Translator
{ {
public: public:
// --- Language control methods ------------------- // --- Language control methods -------------------
/* Used for identification of the language. The identification /*! Used for identification of the language. The identification
* should not be translated. It should be replaced by the name * should not be translated. It should be replaced by the name
* of the language in English using lower-case characters only * 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
...@@ -86,15 +94,18 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -86,15 +94,18 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
virtual QCString idLanguage() virtual QCString idLanguage()
{ return "german"; } { 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. * was designed for languages which do wish to use a babel package.
*/ */
virtual QCString latexLanguageSupportCommand() 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() virtual QCString idLanguageCharset()
{ {
return "iso-8859-1"; return "iso-8859-1";
...@@ -102,57 +113,57 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -102,57 +113,57 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// --- Language translation methods ------------------- // --- 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() virtual QCString trRelatedFunctions()
{ return "Verwandte Funktionen"; } { return "Verwandte Funktionen"; }
/* subscript for the related functions. */ /*! subscript for the related functions. */
virtual QCString trRelatedSubscript() virtual QCString trRelatedSubscript()
{ return "(Es handelt sich hierbei nicht um Elementfunktionen.)"; } { 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() virtual QCString trDetailedDescription()
{ return "Ausführliche Beschreibung"; } { 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() virtual QCString trMemberTypedefDocumentation()
{ return "Dokumentation der benutzerdefinierten Datentypen"; } { 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() virtual QCString trMemberEnumerationDocumentation()
{ return "Dokumentation der Aufzählungstypen"; } { 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() virtual QCString trMemberFunctionDocumentation()
{ return "Dokumentation der Elementfunktionen"; } { 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() virtual QCString trMemberDataDocumentation()
{ /* No difference if "OPTIMIZE_OUTPUT_FOR_C" is set! */ { /* No difference if "OPTIMIZE_OUTPUT_FOR_C" is set! */
return "Dokumentation der Datenelemente"; return "Dokumentation der Datenelemente";
} }
/* this is the text of a link put after brief descriptions. */ /*! this is the text of a link put after brief descriptions. */
virtual QCString trMore() virtual QCString trMore()
{ return "Mehr..."; } { return "Mehr..."; }
/* put in the class documentation */ /*! put in the class documentation */
virtual QCString trListOfAllMembers() virtual QCString trListOfAllMembers()
{ return "Aufstellung aller Elemente"; } { 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() virtual QCString trMemberList()
{ return "Elementverzeichnis"; } { 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() virtual QCString trThisIsTheListOfAllMembers()
{ return "Vollständige Aufstellung aller Elemente für "; } { 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() virtual QCString trIncludingInheritedMembers()
{ return " einschließlich aller geerbten Elemente."; } { 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. * parameter s is name of the project name.
*/ */
virtual QCString trGeneratedAutomatically(const char *s) virtual QCString trGeneratedAutomatically(const char *s)
...@@ -162,31 +173,31 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -162,31 +173,31 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result; 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() virtual QCString trEnumName()
{ return "enum Bezeichner"; } { 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() virtual QCString trEnumValue()
{ return "enum Wert"; } { 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() virtual QCString trDefinedIn()
{ return "Definiert in"; } { return "Definiert in"; }
// quick reference sections // quick reference sections
/* This is put above each page as a link to the list of all groups of /*! This is put above each page as a link to the list of all groups of
* compounds or files (see the \group command). * compounds or files (see the \\group command).
*/ */
virtual QCString trModules() virtual QCString trModules()
{ return "Module"; } { 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() virtual QCString trClassHierarchy()
{ return "Klassenhierarchie"; } { 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() virtual QCString trCompoundList()
{ {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
...@@ -199,15 +210,15 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -199,15 +210,15 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
} }
} }
/* 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() virtual QCString trFileList()
{ return "Auflistung der Dateien"; } { 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() virtual QCString trHeaderFiles()
{ return "Auflistung der Header-Dateien"; } { 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() virtual QCString trCompoundMembers()
{ {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
...@@ -220,30 +231,30 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -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() virtual QCString trFileMembers()
/* No difference if "OPTIMIZE_OUTPUT_FOR_C" is set! */ /* No difference if "OPTIMIZE_OUTPUT_FOR_C" is set! */
{ return "Datei-Elemente"; } { 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() virtual QCString trRelatedPages()
{ return "Zusätzliche Informationen"; } { 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() virtual QCString trExamples()
{ return "Beispiele"; } { 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() virtual QCString trSearch()
{ return "Suchen"; } { return "Suchen"; }
/* This is an introduction to the class hierarchy. */ /*! This is an introduction to the class hierarchy. */
virtual QCString trClassHierarchyDescription() virtual QCString trClassHierarchyDescription()
{ return "Die Liste der Ableitungen ist -mit Einschränkungen- " { return "Die Liste der Ableitungen ist -mit Einschränkungen- "
"alphabetisch sortiert:"; "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) virtual QCString trFileListDescription(bool extractAll)
{ {
QCString result="Hier folgt die Aufzählung aller "; QCString result="Hier folgt die Aufzählung aller ";
...@@ -252,75 +263,101 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -252,75 +263,101 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result; return result;
} }
/* This is an introduction to the annotated compound list. */ /*! This is an introduction to the annotated compound list. */
virtual QCString trCompoundListDescription() virtual QCString trCompoundListDescription()
{ {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Hier folgt die Aufzählung aller Datenstrukturen " return "Hier folgt die Aufzählung aller Datenstrukturen "
"mit einer Kurzbeschreibung:"; "mit einer Kurzbeschreibung:";
}
else else
{
return "Hier folgt die Aufzählung aller Klassen, Strukturen, " return "Hier folgt die Aufzählung aller Klassen, Strukturen, "
"Varianten und Schnittstellen mit einer Kurzbeschreibung:"; "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) virtual QCString trCompoundMembersDescription(bool extractAll)
{ {
QCString result="Hier folgt die Aufzählung aller "; QCString result="Hier folgt die Aufzählung aller ";
if (!extractAll) result+="dokumentierten "; if (!extractAll)
{
result+="dokumentierten ";
}
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
result+="Strukturen und Varianten mit Verweisen auf "; {
result+="Strukturen und Varianten";
}
else else
result+="Klassenelemente mit Verweisen auf "; {
if (!extractAll) { result+="Klassenelemente";
}
result+=" mit Verweisen auf ";
if (!extractAll)
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
result+="die Dokumentation zu jedem Element:"; result+="die Dokumentation zu jedem Element:";
}
else else
{
result+="die Klassendokumentation zu jedem Element:"; result+="die Klassendokumentation zu jedem Element:";
} else { }
}
else
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
result+="die zugehörigen Elemente:"; result+="die zugehörigen Elemente:";
}
else else
{
result+="die zugehörigen Klassen:"; result+="die zugehörigen Klassen:";
} }
}
return result; 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) virtual QCString trFileMembersDescription(bool extractAll)
{ {
QCString result="Hier folgt die Aufzählung aller "; QCString result="Hier folgt die Aufzählung aller ";
if (!extractAll) result+="dokumentierten "; if (!extractAll) result+="dokumentierten ";
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) 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 else
{ {
result+="Dateielemente mit Verweisen auf "; result+="Dateielemente";
} }
if (extractAll) result+="die Dokumentation zu jedem Element:"; result+=" mit Verweisen auf ";
else result+="die zugehörigen Dateien:"; if (extractAll)
result+="die Dokumentation zu jedem Element:";
else
result+="die zugehörigen Dateien:";
return result; 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() virtual QCString trHeaderFilesDescription()
{ return "Hier folgen die Headerdateien, welche die API definieren:"; } { 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() virtual QCString trExamplesDescription()
{ return "Hier folgt eine Liste mit allen Beispielen:"; } { 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() virtual QCString trRelatedPagesDescription()
{ return "Hier folgt eine Liste mit zusammengehörigen Themengebieten:"; } { 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() virtual QCString trModulesDescription()
{ return "Hier folgt die Aufzählung aller Module:"; } { 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. * description is given.
*/ */
virtual QCString trNoDescriptionAvailable() virtual QCString trNoDescriptionAvailable()
...@@ -328,23 +365,23 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -328,23 +365,23 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// index titles (the project name is prepended for these) // index titles (the project name is prepended for these)
/* This is used in HTML as the title of index.html. */ /*! This is used in HTML as the title of index.html. */
virtual QCString trDocumentation() virtual QCString trDocumentation()
{ return "Dokumentation"; } { 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. * index of all groups.
*/ */
virtual QCString trModuleIndex() virtual QCString trModuleIndex()
{ return "Modul-Verzeichnis"; } { 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. * class hierarchy.
*/ */
virtual QCString trHierarchicalIndex() virtual QCString trHierarchicalIndex()
{ return "Hierarchie-Verzeichnis"; } { 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. * annotated compound index.
*/ */
virtual QCString trCompoundIndex() virtual QCString trCompoundIndex()
...@@ -353,136 +390,140 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -353,136 +390,140 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return "Datenstruktur-Verzeichnis"; 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. * list of all files.
*/ */
virtual QCString trFileIndex() virtual QCString trFileIndex()
{ return "Datei-Verzeichnis"; } { 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. * the documentation of all groups.
*/ */
virtual QCString trModuleDocumentation() virtual QCString trModuleDocumentation()
{ return "Modul-Dokumentation"; } { 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. * the documentation of all classes, structs and unions.
*/ */
virtual QCString trClassDocumentation() virtual QCString trClassDocumentation()
{ {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return "Datenstruktur-Dokumentation"; return "Datenstruktur-Dokumentation";
}
else else
{
return "Klassen-Dokumentation"; 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. * the documentation of all files.
*/ */
virtual QCString trFileDocumentation() virtual QCString trFileDocumentation()
{ return "Datei-Dokumentation"; } { 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. * the documentation of all examples.
*/ */
virtual QCString trExampleDocumentation() virtual QCString trExampleDocumentation()
{ return "Dokumentation der Beispiele"; } { 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. * the documentation of all related pages.
*/ */
virtual QCString trPageDocumentation() virtual QCString trPageDocumentation()
{ return "Zusätzliche Informationen"; } { 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() virtual QCString trReferenceManual()
{ return "Nachschlagewerk"; } { 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 * list of defines
*/ */
virtual QCString trDefines() virtual QCString trDefines()
{ return "Makrodefinitionen"; } { 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 * list of function prototypes
*/ */
virtual QCString trFuncProtos() virtual QCString trFuncProtos()
{ return "Funktionsprototypen"; } { 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 * list of typedefs
*/ */
virtual QCString trTypedefs() virtual QCString trTypedefs()
{ return "Typendefinitionen"; } { 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 * list of enumerations
*/ */
virtual QCString trEnumerations() virtual QCString trEnumerations()
{ return "Aufzählungen"; } { 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 * list of (global) functions
*/ */
virtual QCString trFunctions() virtual QCString trFunctions()
{ return "Funktionen"; } { 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 * list of (global) variables
*/ */
virtual QCString trVariables() virtual QCString trVariables()
{ return "Variablen"; } { 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 * list of (global) variables
*/ */
virtual QCString trEnumerationValues() virtual QCString trEnumerationValues()
{ return "Aufzählungswerte"; } { 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 * documentation blocks for defines
*/ */
virtual QCString trDefineDocumentation() virtual QCString trDefineDocumentation()
{ return "Makro-Dokumentation"; } { 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 * of documentation blocks for function prototypes
*/ */
virtual QCString trFunctionPrototypeDocumentation() virtual QCString trFunctionPrototypeDocumentation()
{ return "Funktionsprototypen Dokumentation"; } { 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 * of documentation blocks for typedefs
*/ */
virtual QCString trTypedefDocumentation() virtual QCString trTypedefDocumentation()
{ return "Dokumentation der benutzerdefinerten Typen"; } { 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 * of documentation blocks for enumeration types
*/ */
virtual QCString trEnumerationTypeDocumentation() virtual QCString trEnumerationTypeDocumentation()
{ return "Dokumentation der Aufzählungstypen"; } { 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 * of documentation blocks for enumeration values
*/ */
virtual QCString trEnumerationValueDocumentation() virtual QCString trEnumerationValueDocumentation()
{ return "Dokumentation des Wertebereiches der Aufzählungstypen"; } { 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 * of documentation blocks for functions
*/ */
virtual QCString trFunctionDocumentation() virtual QCString trFunctionDocumentation()
{ return "Dokumentation der Funktionen"; } { 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 * of documentation blocks for variables
*/ */
virtual QCString trVariableDocumentation() virtual QCString trVariableDocumentation()
{ return "Variablen-Dokumentation"; } { 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 * the list of links to documented compounds
*/ */
virtual QCString trCompounds() virtual QCString trCompounds()
...@@ -497,7 +538,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -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 * the page was generated
*/ */
virtual QCString trGeneratedAt(const char *date,const char *projName) virtual QCString trGeneratedAt(const char *date,const char *projName)
...@@ -508,61 +549,61 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -508,61 +549,61 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result; 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() virtual QCString trWrittenBy()
{ {
return "geschrieben von"; 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) virtual QCString trClassDiagram(const char *clName)
{ {
return (QCString)"Klassendiagramm für "+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() virtual QCString trForInternalUseOnly()
{ return "Nur für den internen Gebrauch."; } { 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() virtual QCString trReimplementedForInternalReasons()
{ return "Aus internen Gründen neu implementiert. " { return "Aus internen Gründen neu implementiert. "
"Das API wird davon nicht berührt."; } "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() virtual QCString trWarning()
{ return "Warnung"; } { 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() virtual QCString trBugsAndLimitations()
{ return "Fehler und Einschränkungen"; } { 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() virtual QCString trVersion()
{ return "Version"; } { 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() virtual QCString trDate()
{ return "Datum"; } { 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() virtual QCString trReturns()
{ return "Rückgabe"; } { 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() virtual QCString trSeeAlso()
{ return "Siehe auch"; } { 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() virtual QCString trParameters()
{ return "Parameter"; } { 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() virtual QCString trExceptions()
{ return "Ausnahmebehandlung"; } { 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() virtual QCString trGeneratedBy()
{ return "Erzeugt von"; } { return "Erzeugt von"; }
...@@ -570,11 +611,11 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -570,11 +611,11 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 0.49-990307 // 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() virtual QCString trNamespaceList()
{ return "Liste aller Namensbereiche"; } { 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) virtual QCString trNamespaceListDescription(bool extractAll)
{ {
QCString result="Liste aller "; QCString result="Liste aller ";
...@@ -583,7 +624,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -583,7 +624,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result; 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 * friends of a class
*/ */
virtual QCString trFriends() virtual QCString trFriends()
...@@ -593,7 +634,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -593,7 +634,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 0.49-990405 // 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 * related classes
*/ */
virtual QCString trRelatedFunctionDocumentation() virtual QCString trRelatedFunctionDocumentation()
...@@ -603,7 +644,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -603,7 +644,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 0.49-990425 // 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, virtual QCString trCompoundReference(const char *clName,
ClassDef::CompoundType compType, ClassDef::CompoundType compType,
bool isTemplate) bool isTemplate)
...@@ -622,7 +663,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -622,7 +663,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result; 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) virtual QCString trFileReference(const char *fileName)
{ {
QCString result=fileName; QCString result=fileName;
...@@ -630,7 +671,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -630,7 +671,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result; 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) virtual QCString trNamespaceReference(const char *namespaceName)
{ {
QCString result=namespaceName; QCString result=namespaceName;
...@@ -638,9 +679,8 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -638,9 +679,8 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result; return result;
} }
// these are for the member sections of a class, struct or union
virtual QCString trPublicMembers() virtual QCString trPublicMembers()
{ return "Öffentliche Datenelemente"; } { return "Öffentliche Methoden"; }
virtual QCString trPublicSlots() virtual QCString trPublicSlots()
{ return "Öffentliche Slots"; } { return "Öffentliche Slots"; }
...@@ -649,29 +689,27 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -649,29 +689,27 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
{ return "Signale"; } { return "Signale"; }
virtual QCString trStaticPublicMembers() virtual QCString trStaticPublicMembers()
{ return "Öffentliche, statische Datenelemente"; } { return "Öffentliche, statische Methoden"; }
virtual QCString trProtectedMembers() virtual QCString trProtectedMembers()
{ return "Geschützte Datenelemente"; } { return "Geschützte Methoden"; }
virtual QCString trProtectedSlots() virtual QCString trProtectedSlots()
{ return "Geschützte Slots"; } { return "Geschützte Slots"; }
virtual QCString trStaticProtectedMembers() virtual QCString trStaticProtectedMembers()
{ return "Geschützte, statische Datenelemente"; } { return "Geschützte, statische Methoden"; }
virtual QCString trPrivateMembers() virtual QCString trPrivateMembers()
{ return "Private Datenelemente"; } { return "Private Methoden"; }
virtual QCString trPrivateSlots() virtual QCString trPrivateSlots()
{ return "Private Slots"; } { return "Private Slots"; }
virtual QCString trStaticPrivateMembers() 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. * use generateMarker(i) to indicate where item i should be put.
*/ */
virtual QCString trWriteList(int numEntries) virtual QCString trWriteList(int numEntries)
...@@ -696,7 +734,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -696,7 +734,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
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. * if class diagrams are disabled.
*/ */
virtual QCString trInheritsList(int numEntries) virtual QCString trInheritsList(int numEntries)
...@@ -704,7 +742,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -704,7 +742,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return "Abgeleitet von "+trWriteList(numEntries)+"."; 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. * if class diagrams are disabled.
*/ */
virtual QCString trInheritedByList(int numEntries) virtual QCString trInheritedByList(int numEntries)
...@@ -712,7 +750,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -712,7 +750,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return "Basisklasse für "+trWriteList(numEntries)+"."; 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. * members that are hidden by this one.
*/ */
virtual QCString trReimplementedFromList(int numEntries) virtual QCString trReimplementedFromList(int numEntries)
...@@ -720,7 +758,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -720,7 +758,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return "Erneute Implementation von "+trWriteList(numEntries)+"."; 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. * all member that overwrite the implementation of this member.
*/ */
virtual QCString trReimplementedInList(int numEntries) virtual QCString trReimplementedInList(int numEntries)
...@@ -728,11 +766,11 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -728,11 +766,11 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return "Erneute Implementation in "+trWriteList(numEntries)+"."; 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() virtual QCString trNamespaceMembers()
{ return "Elemente eines Namensbereiches"; } { 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) virtual QCString trNamespaceMemberDescription(bool extractAll)
{ {
QCString result="Hier folgt die Aufzählung aller "; QCString result="Hier folgt die Aufzählung aller ";
...@@ -745,13 +783,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -745,13 +783,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result; 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. * index of all namespaces.
*/ */
virtual QCString trNamespaceIndex() virtual QCString trNamespaceIndex()
{ return "Verzeichnis der Namensbereiche"; } { 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. * the documentation of all namespaces.
*/ */
virtual QCString trNamespaceDocumentation() virtual QCString trNamespaceDocumentation()
...@@ -761,7 +799,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -761,7 +799,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 0.49-990522 // 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. * namespaces in a file.
*/ */
virtual QCString trNamespaces() virtual QCString trNamespaces()
...@@ -771,7 +809,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -771,7 +809,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 0.49-990728 // 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. * followed by a list of files that were used to generate the page.
*/ */
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
...@@ -792,7 +830,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -792,7 +830,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result; 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. * list.
*/ */
virtual QCString trAlphabeticalList() virtual QCString trAlphabeticalList()
...@@ -802,16 +840,16 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -802,16 +840,16 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 0.49-990901 // 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() virtual QCString trReturnValues()
{ return "Rückgabewerte"; } { 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() virtual QCString trMainPage()
{ return "Hauptseite"; } { 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. * documentation. It should be an abbreviation of the word page.
*/ */
virtual QCString trPageAbbreviation() virtual QCString trPageAbbreviation()
...@@ -849,61 +887,61 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -849,61 +887,61 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.0.0 // 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) virtual QCString trCollaborationDiagram(const char *clName)
{ {
return (QCString)"Zusammengehörigkeiten von "+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) virtual QCString trInclDepGraph(const char *fName)
{ {
return (QCString)"Include-Abhängigkeitsdiagramm für "+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() virtual QCString trConstructorDocumentation()
{ {
return "Beschreibung der Konstruktoren und Destruktoren"; 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() virtual QCString trGotoSourceCode()
{ {
return "gehe zum Quellcode dieser Datei"; 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() virtual QCString trGotoDocumentation()
{ {
return "gehe zur Dokumentation dieser Datei"; return "gehe zur Dokumentation dieser Datei";
} }
/* Text for the \pre command */ /*! Text for the \\pre command */
virtual QCString trPrecondition() virtual QCString trPrecondition()
{ {
return "Vorbedingung"; return "Vorbedingung";
} }
/* Text for the \post command */ /*! Text for the \\post command */
virtual QCString trPostcondition() virtual QCString trPostcondition()
{ {
return "Nachbedingung"; return "Nachbedingung";
} }
/* Text for the \invariant command */ /*! Text for the \\invariant command */
virtual QCString trInvariant() virtual QCString trInvariant()
{ {
return "Invariant"; return "Invariant";
} }
/* Text shown before a multi-line variable/enum initialization */ /*! Text shown before a multi-line variable/enum initialization */
virtual QCString trInitialValue() virtual QCString trInitialValue()
{ {
return "Initialisierung:"; return "Initialisierung:";
} }
/* Text used the source code in the file index */ /*! Text used the source code in the file index */
virtual QCString trCode() virtual QCString trCode()
{ {
return "code"; return "code";
...@@ -995,13 +1033,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -995,13 +1033,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.1.3 // 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() virtual QCString trTodo()
{ {
return "Noch zu erledigen"; return "Noch zu erledigen";
} }
/* Used as the header of the todo list */ /*! Used as the header of the todo list */
virtual QCString trTodoList() virtual QCString trTodoList()
{ {
return "Liste der zu erledigenden Dinge"; return "Liste der zu erledigenden Dinge";
...@@ -1041,14 +1079,15 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1041,14 +1079,15 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.1.5 // new since 1.1.5
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
/* title of the graph legend page */ /*! title of the graph legend page */
virtual QCString trLegendTitle() virtual QCString trLegendTitle()
{ {
return "Erklärung des Graphen"; return "Erklärung des Graphen";
} }
/* page explaining how the dot graph's should be interpreted /*! page explaining how the dot graph's should be interpreted
The %A in the text below are to prevent link to classes called "A". */ * The %A in the text below are to prevent link to classes called "A".
*/
virtual QCString trLegendDocs() virtual QCString trLegendDocs()
{ {
return return
...@@ -1085,7 +1124,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1085,7 +1124,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
"\\endcode\n\n" "\\endcode\n\n"
"Setzen des Tags \\c MAX_DOT_GRAPH_HEIGHT in der Konfigurationsdatei " "Setzen des Tags \\c MAX_DOT_GRAPH_HEIGHT in der Konfigurationsdatei "
"auf 240 liefert den folgenden Graphen:" "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" "<p>\n"
"Die Rechtecke in obigem Graphen bedeuten:\n" "Die Rechtecke in obigem Graphen bedeuten:\n"
"<ul>\n" "<ul>\n"
...@@ -1116,7 +1155,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1116,7 +1155,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
"</ul>\n"; "</ul>\n";
} }
/* text for the link to the legend page */ /*! text for the link to the legend page */
virtual QCString trLegend() virtual QCString trLegend()
{ {
return "Legende"; return "Legende";
...@@ -1126,13 +1165,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1126,13 +1165,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.2.0 // 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() virtual QCString trTest()
{ {
return "Test"; return "Test";
} }
/* Used as the header of the test list */ /*! Used as the header of the test list */
virtual QCString trTestList() virtual QCString trTestList()
{ {
return "Test-Liste"; return "Test-Liste";
...@@ -1142,7 +1181,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1142,7 +1181,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.2.1 // 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() virtual QCString trDCOPMethods()
{ {
return "DCOP Methoden"; return "DCOP Methoden";
...@@ -1152,13 +1191,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1152,13 +1191,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.2.2 // new since 1.2.2
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
/* Used as a section header for IDL properties */ /*! Used as a section header for IDL properties */
virtual QCString trProperties() virtual QCString trProperties()
{ {
return "Eigenschaften"; return "Eigenschaften";
} }
/* Used as a section header for IDL property documentation */ /*! Used as a section header for IDL property documentation */
virtual QCString trPropertyDocumentation() virtual QCString trPropertyDocumentation()
{ {
return "Dokumentation der Eigenschaften"; return "Dokumentation der Eigenschaften";
...@@ -1168,13 +1207,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1168,13 +1207,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.2.4 // 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() virtual QCString trInterfaces()
{ {
return "Schnittstellen"; 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() virtual QCString trClasses()
{ {
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
...@@ -1183,37 +1222,37 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1183,37 +1222,37 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return "Klassen"; return "Klassen";
} }
/* Used as the title of a Java package */ /*! Used as the title of a Java package */
virtual QCString trPackage(const char *name) virtual QCString trPackage(const char *name)
{ {
return (QCString)"Package "+name; return (QCString)"Package "+name;
} }
/* Title of the package index page */ /*! Title of the package index page */
virtual QCString trPackageList() virtual QCString trPackageList()
{ {
return "Package Liste"; return "Package Liste";
} }
/* The description of the package index page */ /*! The description of the package index page */
virtual QCString trPackageListDescription() virtual QCString trPackageListDescription()
{ {
return "Hier folgen die packages mit einer Kurzbeschreibung (wenn verfügbar):"; 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() virtual QCString trPackages()
{ {
return "Packages"; return "Packages";
} }
/* Used as a chapter title for Latex & RTF output */ /*! Used as a chapter title for Latex & RTF output */
virtual QCString trPackageDocumentation() virtual QCString trPackageDocumentation()
{ {
return "Package Dokumentation"; return "Package Dokumentation";
} }
/* Text shown before a multi-line define */ /*! Text shown before a multi-line define */
virtual QCString trDefineValue() virtual QCString trDefineValue()
{ {
return "Wert:"; return "Wert:";
...@@ -1223,13 +1262,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1223,13 +1262,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.2.5 // 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() virtual QCString trBug()
{ {
return "Fehler"; return "Fehler";
} }
/* Used as the header of the bug list */ /*! Used as the header of the bug list */
virtual QCString trBugList() virtual QCString trBugList()
{ {
return "Liste der bekannten Fehler"; return "Liste der bekannten Fehler";
...@@ -1239,13 +1278,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1239,13 +1278,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.2.6-20010422 // 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() virtual QCString trRTFansicp()
{ {
return "1252"; return "1252";
} }
/* Used as ansicpg for RTF fcharset /*! Used as ansicpg for RTF fcharset
* \see trRTFansicp() for a table of possible values. * \see trRTFansicp() for a table of possible values.
*/ */
virtual QCString trRTFCharSet() virtual QCString trRTFCharSet()
...@@ -1253,7 +1292,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1253,7 +1292,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return "0"; return "0";
} }
/* Used as header RTF general index */ /*! Used as header RTF general index */
virtual QCString trRTFGeneralIndex() virtual QCString trRTFGeneralIndex()
{ {
return "Index"; return "Index";
...@@ -1263,7 +1302,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1263,7 +1302,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.2.7 // 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 * be followed by a single name or by a list of names
* of the category. * of the category.
*/ */
...@@ -1274,7 +1313,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1274,7 +1313,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result; 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 * be followed by a single name or by a list of names
* of the category. * of the category.
*/ */
...@@ -1285,7 +1324,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1285,7 +1324,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result; 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 * be followed by a single name or by a list of names
* of the category. * of the category.
*/ */
...@@ -1296,7 +1335,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1296,7 +1335,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result; 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 * be followed by a single name or by a list of names
* of the category. * of the category.
*/ */
...@@ -1307,7 +1346,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1307,7 +1346,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result; 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 * be followed by a single name or by a list of names
* of the category. * of the category.
*/ */
...@@ -1318,7 +1357,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1318,7 +1357,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result; 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 * be followed by a single name or by a list of names
* of the category. * of the category.
*/ */
...@@ -1329,7 +1368,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1329,7 +1368,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result; 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 * be followed by a single name or by a list of names
* of the category. * of the category.
*/ */
...@@ -1340,7 +1379,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1340,7 +1379,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return result; 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 * be followed by a single name or by a list of names
* of the category. * of the category.
*/ */
...@@ -1355,7 +1394,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1355,7 +1394,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.2.7-20010524 // 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. * for the author section in man pages.
*/ */
virtual QCString trAuthor(bool, bool singular) virtual QCString trAuthor(bool, bool singular)
...@@ -1369,7 +1408,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1369,7 +1408,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.2.11 // 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() virtual QCString trReferences()
{ {
...@@ -1379,7 +1418,8 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1379,7 +1418,8 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// new since 1.2.13 // new since 1.2.13
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
/* used in member documentation blocks to produce a list of
/*! used in member documentation blocks to produce a list of
* members that are implemented by this one. * members that are implemented by this one.
*/ */
virtual QCString trImplementedFromList(int numEntries) virtual QCString trImplementedFromList(int numEntries)
...@@ -1387,7 +1427,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1387,7 +1427,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
return "Implementiert " + trWriteList(numEntries) + "."; return "Implementiert " + trWriteList(numEntries) + ".";
} }
/* used in member documentation blocks to produce a list of /*! used in member documentation blocks to produce a list of
* all members that implement this abstract member. * all members that implement this abstract member.
*/ */
virtual QCString trImplementedInList(int numEntries) virtual QCString trImplementedInList(int numEntries)
...@@ -1399,14 +1439,44 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ...@@ -1399,14 +1439,44 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17
// new since 1.2.16 // new since 1.2.16
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
/* used in RTF documentation as a heading for the Table /*! used in RTF documentation as a heading for the Table
* of Contents. * of Contents.
*/ */
virtual QCString trRTFTableOfContents() virtual QCString trRTFTableOfContents()
{ {
return "Inhaltsverzeichnis"; 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 #endif
...@@ -657,9 +657,10 @@ QCString removeRedundantWhiteSpace(const QCString &s) ...@@ -657,9 +657,10 @@ QCString removeRedundantWhiteSpace(const QCString &s)
result+=", "; result+=", ";
} }
else if (i>0 && else if (i>0 &&
(isId(s.at(i)) && s.at(i-1)==')') || ((isId(s.at(i)) && s.at(i-1)==')') ||
(s.at(i)=='\'' && s.at(i-1)==' ') (s.at(i)=='\'' && s.at(i-1)==' ')
) )
)
{ {
result+=' '; result+=' ';
result+=s.at(i); result+=s.at(i);
...@@ -670,7 +671,7 @@ QCString removeRedundantWhiteSpace(const QCString &s) ...@@ -670,7 +671,7 @@ QCString removeRedundantWhiteSpace(const QCString &s)
csp=0; csp=0;
} }
else if (!isspace(c) || 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)) || s.at(i-1)==')' || s.at(i-1)==',' || s.at(i-1)=='>' || s.at(i-1)==']') &&
isId(s.at(i+1)) isId(s.at(i+1))
) )
...@@ -3157,7 +3158,7 @@ void addMembersToMemberGroup(MemberList *ml, ...@@ -3157,7 +3158,7 @@ void addMembersToMemberGroup(MemberList *ml,
MemberGroup *mg = memberGroupSDict->find(groupId); MemberGroup *mg = memberGroupSDict->find(groupId);
if (mg==0) 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); memberGroupSDict->append(groupId,mg);
} }
mg->insertMember(context,fmd); // insert in member group mg->insertMember(context,fmd); // insert in member group
...@@ -3178,7 +3179,7 @@ void addMembersToMemberGroup(MemberList *ml, ...@@ -3178,7 +3179,7 @@ void addMembersToMemberGroup(MemberList *ml,
MemberGroup *mg = memberGroupSDict->find(groupId); MemberGroup *mg = memberGroupSDict->find(groupId);
if (mg==0) 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); memberGroupSDict->append(groupId,mg);
} }
md = ml->take(index); // remove from member list md = ml->take(index); // remove from member list
...@@ -3551,20 +3552,21 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle, ...@@ -3551,20 +3552,21 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle,
//outputList->writeTitle(pi->name,pi->title); //outputList->writeTitle(pi->name,pi->title);
// a page name is a label as well! // a page name is a label as well!
SectionInfo *si=new SectionInfo( QCString file;
pi->name,pi->title,SectionInfo::Page,pi->reference);
if (gd) if (gd)
{ {
si->fileName=gd->getOutputFileBase(); file=gd->getOutputFileBase();
} }
else if (pi->getGroupDef()) else if (pi->getGroupDef())
{ {
si->fileName=pi->getGroupDef()->getOutputFileBase().copy(); file=pi->getGroupDef()->getOutputFileBase().copy();
} }
else 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", //printf("si->label=`%s' si->definition=%s si->fileName=`%s'\n",
// si->label.data(),si->definition?si->definition->name().data():"<none>", // si->label.data(),si->definition?si->definition->name().data():"<none>",
// si->fileName.data()); // si->fileName.data());
......
...@@ -95,7 +95,9 @@ void XmlDocVisitor::visit(DocSymbol *s) ...@@ -95,7 +95,9 @@ void XmlDocVisitor::visit(DocSymbol *s)
void XmlDocVisitor::visit(DocURL *u) void XmlDocVisitor::visit(DocURL *u)
{ {
if (m_hide) return; 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()); filter(u->url());
m_t << "</ulink>"; m_t << "</ulink>";
} }
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "version.h" #include "version.h"
#include "xmldocvisitor.h" #include "xmldocvisitor.h"
#include "docparser.h" #include "docparser.h"
#include "language.h"
#include <qdir.h> #include <qdir.h>
#include <qfile.h> #include <qfile.h>
...@@ -56,7 +57,8 @@ static void writeXMLHeader(QTextStream &t) ...@@ -56,7 +57,8 @@ static void writeXMLHeader(QTextStream &t)
{ {
QCString dtdName = Config_getString("XML_DTD"); QCString dtdName = Config_getString("XML_DTD");
QCString schemaName = Config_getString("XML_SCHEMA"); 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"; if (dtdName.isEmpty() && schemaName.isEmpty()) t << "yes"; else t << "no";
t << "'?>" << endl; t << "'?>" << endl;
if (!dtdName.isEmpty()) if (!dtdName.isEmpty())
...@@ -789,6 +791,7 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti) ...@@ -789,6 +791,7 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
return; return;
} }
QTextStream t(&f); QTextStream t(&f);
t.setEncoding(QTextStream::Latin1);
writeXMLHeader(t); writeXMLHeader(t);
t << " <compounddef id=\"" t << " <compounddef id=\""
...@@ -975,6 +978,7 @@ static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &ti) ...@@ -975,6 +978,7 @@ static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &ti)
return; return;
} }
QTextStream t(&f); QTextStream t(&f);
t.setEncoding(QTextStream::Latin1);
writeXMLHeader(t); writeXMLHeader(t);
t << " <compounddef id=\"" t << " <compounddef id=\""
...@@ -1065,6 +1069,7 @@ static void generateXMLForFile(FileDef *fd,QTextStream &ti) ...@@ -1065,6 +1069,7 @@ static void generateXMLForFile(FileDef *fd,QTextStream &ti)
return; return;
} }
QTextStream t(&f); QTextStream t(&f);
t.setEncoding(QTextStream::Latin1);
writeXMLHeader(t); writeXMLHeader(t);
t << " <compounddef id=\"" t << " <compounddef id=\""
...@@ -1198,6 +1203,7 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti) ...@@ -1198,6 +1203,7 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
} }
QTextStream t(&f); QTextStream t(&f);
t.setEncoding(QTextStream::Latin1);
writeXMLHeader(t); writeXMLHeader(t);
t << " <compounddef id=\"" t << " <compounddef id=\""
<< gd->getOutputFileBase() << "\" kind=\"group\">" << endl; << gd->getOutputFileBase() << "\" kind=\"group\">" << endl;
...@@ -1312,6 +1318,7 @@ static void generateXMLForPage(PageInfo *pi,QTextStream &ti) ...@@ -1312,6 +1318,7 @@ static void generateXMLForPage(PageInfo *pi,QTextStream &ti)
} }
QTextStream t(&f); QTextStream t(&f);
t.setEncoding(QTextStream::Latin1);
writeXMLHeader(t); writeXMLHeader(t);
t << " <compounddef id=\"" << pageName; t << " <compounddef id=\"" << pageName;
t << "\" kind=\"page\">" << endl; t << "\" kind=\"page\">" << endl;
...@@ -1393,6 +1400,7 @@ void generateXML() ...@@ -1393,6 +1400,7 @@ void generateXML()
return; return;
} }
QTextStream t(&f); QTextStream t(&f);
t.setEncoding(QTextStream::Latin1);
writeXMLHeader(t); writeXMLHeader(t);
ClassSDict::Iterator cli(Doxygen::classSDict); ClassSDict::Iterator cli(Doxygen::classSDict);
ClassDef *cd; ClassDef *cd;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment