From f3e7209fed9703e8be668753d1083ba335121a6e Mon Sep 17 00:00:00 2001 From: dimitri Date: Thu, 28 Nov 2002 20:38:57 +0000 Subject: Release-1.3-rc1-20021128 --- INSTALL | 4 +- README | 4 +- VERSION | 2 +- doc/commands.doc | 3 +- doc/faq.doc | 3 +- doc/maintainers.txt | 1 - packages/rpm/doxygen.spec | 2 +- src/classdef.cpp | 38 +++- src/classdef.h | 1 + src/classlist.cpp | 2 +- src/cmdmapper.cpp | 3 + src/cmdmapper.h | 57 ++--- src/docparser.cpp | 553 ++++++++++++++++++++++++++-------------------- src/docparser.h | 13 +- src/doctokenizer.h | 44 ++-- src/doctokenizer.l | 165 +++++++++++++- src/doxygen.cpp | 97 ++++++-- src/filedef.cpp | 20 +- src/filedef.h | 1 + src/groupdef.cpp | 23 +- src/groupdef.h | 1 + src/htmldocvisitor.cpp | 6 +- src/htmlgen.cpp | 2 +- src/htmlgen.h | 4 +- src/latexdocvisitor.cpp | 4 +- src/latexgen.cpp | 197 +++-------------- src/latexgen.h | 4 +- src/mangen.cpp | 28 ++- src/mangen.h | 4 +- src/memberdef.cpp | 37 +++- src/memberdef.h | 9 +- src/membergroup.cpp | 26 ++- src/membergroup.h | 5 +- src/memberlist.cpp | 21 +- src/memberlist.h | 1 + src/namespacedef.cpp | 19 ++ src/namespacedef.h | 1 + src/outputgen.h | 4 +- src/outputlist.h | 8 +- src/page.h | 6 + src/rtfdocvisitor.cpp | 1 + src/rtfgen.cpp | 2 +- src/rtfgen.h | 4 +- src/scanner.l | 171 ++++++++------ src/section.h | 12 +- src/tagreader.cpp | 41 +--- src/translator_de.h | 506 ++++++++++++++++++++++++------------------ src/util.cpp | 22 +- src/xmldocvisitor.cpp | 4 +- src/xmlgen.cpp | 10 +- 50 files changed, 1331 insertions(+), 865 deletions(-) diff --git a/INSTALL b/INSTALL index 6bddd2a..d76d254 100644 --- a/INSTALL +++ b/INSTALL @@ -1,7 +1,7 @@ -DOXYGEN Version 1.3-rc1 +DOXYGEN Version 1.3-rc1-20021128 Please read the installation section of the manual (http://www.doxygen.org/install.html) for instructions. -------- -Dimitri van Heesch (15 November 2002) +Dimitri van Heesch (28 November 2002) diff --git a/README b/README index 64c9bbc..107875d 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.3_rc1 +DOXYGEN Version 1.3_rc1_20021128 Please read INSTALL for compilation instructions. @@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. Enjoy, -Dimitri van Heesch (dimitri@stack.nl) (15 November 2002) +Dimitri van Heesch (dimitri@stack.nl) (28 November 2002) diff --git a/VERSION b/VERSION index b03dc3a..a6f51d7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3-rc1 +1.3-rc1-20021128 diff --git a/doc/commands.doc b/doc/commands.doc index c2bb972..7e96292 100644 --- a/doc/commands.doc +++ b/doc/commands.doc @@ -376,7 +376,8 @@ doxygen. Unrecognized commands are treated as normal text. \addindex \\internal 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 to show or hide the internal documentation. diff --git a/doc/faq.doc b/doc/faq.doc index 7a85be4..56b1039 100644 --- a/doc/faq.doc +++ b/doc/faq.doc @@ -229,7 +229,8 @@ generator -> gen \endverbatim 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").
  • What was the reason to develop doxygen? diff --git a/doc/maintainers.txt b/doc/maintainers.txt index 44f387c..073c5e7 100644 --- a/doc/maintainers.txt +++ b/doc/maintainers.txt @@ -37,7 +37,6 @@ Xavier Outhier: xouthier@yahoo.fr German Jens Seidel: jensseidel@users.sf.net -Jens Breitenstein: Jens.Breitenstein@tlc.de Greek Harry Kalogirou: harkal@rainbow.cs.unipi.gr diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec index 4d897ac..f32523b 100644 --- a/packages/rpm/doxygen.spec +++ b/packages/rpm/doxygen.spec @@ -1,6 +1,6 @@ Summary: A documentation system for C/C++. Name: doxygen -Version: 1.3_rc1 +Version: 1.3_rc1_20021128 Release: 1 Epoch: 1 Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz diff --git a/src/classdef.cpp b/src/classdef.cpp index bfe7cac..70efe0d 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -34,6 +34,7 @@ #include "dot.h" #include "defargs.h" #include "debug.h" +#include "docparser.h" static QCString stripExtension(const char *fName) { @@ -553,6 +554,41 @@ void ClassDef::distributeMemberGroupDocumentation() } } +void ClassDef::findSectionsInDocumentation() +{ + docFindSections(documentation(),0,this,0); + MemberGroupSDict::Iterator mgli(*memberGroupSDict); + MemberGroup *mg; + for (;(mg=mgli.current());++mgli) + { + mg->findSectionsInDocumentation(); + } + pubTypes.findSectionsInDocumentation(); + pubMethods.findSectionsInDocumentation(); + pubAttribs.findSectionsInDocumentation(); + pubSlots.findSectionsInDocumentation(); + signals.findSectionsInDocumentation(); + dcopMethods.findSectionsInDocumentation(); + pubStaticMethods.findSectionsInDocumentation(); + pubStaticAttribs.findSectionsInDocumentation(); + proTypes.findSectionsInDocumentation(); + proMethods.findSectionsInDocumentation(); + proAttribs.findSectionsInDocumentation(); + proSlots.findSectionsInDocumentation(); + proStaticMethods.findSectionsInDocumentation(); + proStaticAttribs.findSectionsInDocumentation(); + priTypes.findSectionsInDocumentation(); + priMethods.findSectionsInDocumentation(); + priAttribs.findSectionsInDocumentation(); + priSlots.findSectionsInDocumentation(); + priStaticMethods.findSectionsInDocumentation(); + priStaticAttribs.findSectionsInDocumentation(); + friends.findSectionsInDocumentation(); + related.findSectionsInDocumentation(); + properties.findSectionsInDocumentation(); + events.findSectionsInDocumentation(); +} + // add a file name to the used files set void ClassDef::insertUsedFile(const char *f) @@ -1558,7 +1594,7 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup) } } ol.docify(" {"); - ol.endMemberItem(FALSE); + ol.endMemberItem(); // write user defined member groups MemberGroupSDict::Iterator mgli(*memberGroupSDict); diff --git a/src/classdef.h b/src/classdef.h index 1af7edd..95997f7 100644 --- a/src/classdef.h +++ b/src/classdef.h @@ -259,6 +259,7 @@ class ClassDef : public Definition bool addExample(const char *anchor,const char *name, const char *file); void addMembersToMemberGroup(); void distributeMemberGroupDocumentation(); + void findSectionsInDocumentation(); void setNamespace(NamespaceDef *nd) { m_nspace = nd; } void setTemplateArguments(ArgumentList *al); void mergeMembers(); diff --git a/src/classlist.cpp b/src/classlist.cpp index 7adacd8..9483329 100644 --- a/src/classlist.cpp +++ b/src/classlist.cpp @@ -112,7 +112,7 @@ void ClassSDict::writeDeclaration(OutputList &ol,const ClassDef::CompoundType *f ol.docify(cd->localName()); ol.endBold(); } - ol.endMemberItem(FALSE); + ol.endMemberItem(); if (!cd->briefDescription().isEmpty()) { ol.startMemberDescription(); diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp index 0f9cb76..57dceef 100644 --- a/src/cmdmapper.cpp +++ b/src/cmdmapper.cpp @@ -74,6 +74,9 @@ CommandMap cmdMap[] = { "sa", CMD_SA }, { "secreflist", CMD_SECREFLIST }, { "section", CMD_SECTION }, + { "subsection", CMD_SUBSECTION }, + { "subsubsection", CMD_SUBSUBSECTION }, + { "paragraph", CMD_PARAGRAPH }, { "see", CMD_SA }, { "since", CMD_SINCE }, { "skip", CMD_SKIP }, diff --git a/src/cmdmapper.h b/src/cmdmapper.h index ea765d4..dbb9624 100644 --- a/src/cmdmapper.h +++ b/src/cmdmapper.h @@ -73,33 +73,36 @@ enum CommandType CMD_RETVAL = 39 | SIMPLESECT_BIT, CMD_SA = 40 | SIMPLESECT_BIT , CMD_SECTION = 41, - CMD_SINCE = 42 | SIMPLESECT_BIT, - CMD_SKIP = 43, - CMD_SKIPLINE = 44, - CMD_STARTCODE = 45, - CMD_JAVALINK = 46, - CMD_TEST = 47 | SIMPLESECT_BIT, - CMD_TODO = 48 | SIMPLESECT_BIT, - CMD_UNTIL = 49, - CMD_VERBATIM = 50, - CMD_VERBINCLUDE = 51, - CMD_VERSION = 52 | SIMPLESECT_BIT, - CMD_WARNING = 53 | SIMPLESECT_BIT , - CMD_BSLASH = 54, - CMD_AT = 55, - CMD_LESS = 56, - CMD_GREATER = 57, - CMD_AMP = 58, - CMD_DOLLAR = 59, - CMD_HASH = 60, - CMD_PERCENT = 61, - CMD_LINEBREAK = 62, - CMD_FORMULA = 63, - CMD_SECREFLIST = 64, - CMD_ENDSECREFLIST= 65, - CMD_LANGSWITCH = 66, - CMD_AUTHORS = 67 | SIMPLESECT_BIT, - CMD_INTERNALREF = 68 + CMD_SUBSECTION = 42, + CMD_SUBSUBSECTION= 43, + CMD_PARAGRAPH = 44, + CMD_SINCE = 45 | SIMPLESECT_BIT, + CMD_SKIP = 46, + CMD_SKIPLINE = 47, + CMD_STARTCODE = 48, + CMD_JAVALINK = 49, + CMD_TEST = 50 | SIMPLESECT_BIT, + CMD_TODO = 51 | SIMPLESECT_BIT, + CMD_UNTIL = 52, + CMD_VERBATIM = 53, + CMD_VERBINCLUDE = 54, + CMD_VERSION = 55 | SIMPLESECT_BIT, + CMD_WARNING = 56 | SIMPLESECT_BIT , + CMD_BSLASH = 57, + CMD_AT = 58, + CMD_LESS = 59, + CMD_GREATER = 60, + CMD_AMP = 61, + CMD_DOLLAR = 62, + CMD_HASH = 63, + CMD_PERCENT = 64, + CMD_LINEBREAK = 65, + CMD_FORMULA = 66, + CMD_SECREFLIST = 67, + CMD_ENDSECREFLIST= 68, + CMD_LANGSWITCH = 69, + CMD_AUTHORS = 70 | SIMPLESECT_BIT, + CMD_INTERNALREF = 71 }; enum HtmlTagType diff --git a/src/docparser.cpp b/src/docparser.cpp index 53f58bc..f5c17d0 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -46,6 +46,15 @@ //--------------------------------------------------------------------------- +static const char *sectionLevelToName[] = +{ + "page", + "section", + "subsection", + "subsubsection", + "paragraph" +}; + //--------------------------------------------------------------------------- // global variables during a call to validatingParseDoc @@ -513,7 +522,7 @@ static int handleStyleArgument(DocNode *parent,QList &children, int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command", + warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", cmdName.data()); return tok; } @@ -526,15 +535,15 @@ static int handleStyleArgument(DocNode *parent,QList &children, switch (tok) { case TK_COMMAND: - warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command \\%s as the argument of a \\%s command", + warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command \\%s as the argument of a \\%s command", tokenName.data(),cmdName.data()); break; case TK_SYMBOL: - warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", tokenName.data()); break; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", tokToString(tok)); break; } @@ -561,7 +570,7 @@ static void handleStyleLeave(DocNode *parent,QList &children, g_styleStack.top()->position()!=g_nodeStack.count() // wrong position ) { - warn(g_fileName,doctokenizerYYlineno,"Error: found tag without matching <%s> in the same paragraph", + warn(g_fileName,doctokenizerYYlineno,"Warning: found tag without matching <%s> in the same paragraph", tagName,tagName); } else // end the section @@ -589,9 +598,9 @@ static void handlePendingStyleCommands(DocNode *parent,QList &children) case DocStyleChange::Small: cmd = "small"; break; case DocStyleChange::Subscript: cmd = "subscript"; break; case DocStyleChange::Superscript: cmd = "superscript"; break; - case DocStyleChange::Preformatted: cmd = "preformatted"; break; + case DocStyleChange::Preformatted: cmd = "pre"; break; } - warn(g_fileName,doctokenizerYYlineno,"Error: end of paragraph without end of style " + warn(g_fileName,doctokenizerYYlineno,"Warning: end of paragraph without end of style " "command ",cmd); children.append(new DocStyleChange(parent,g_nodeStack.count(),sc->style(),FALSE)); g_styleStack.pop(); @@ -719,7 +728,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList &children doctokenizerYYsetStateHtmlOnly(); int retval = doctokenizerYYlex(); children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::HtmlOnly,g_isExample,g_fileName)); - if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: htmlonly section ended without end marker"); + if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Warning: htmlonly section ended without end marker"); doctokenizerYYsetStatePara(); } break; @@ -728,7 +737,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList &children doctokenizerYYsetStateLatexOnly(); int retval = doctokenizerYYlex(); children.append(new DocVerbatim(parent,g_context,g_token->verb,DocVerbatim::LatexOnly,g_isExample,g_fileName)); - if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: latexonly section ended without end marker",doctokenizerYYlineno); + if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Warning: latexonly section ended without end marker",doctokenizerYYlineno); doctokenizerYYsetStatePara(); } break; @@ -743,20 +752,20 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList &children int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command", + warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", tokenName.data()); break; } tok=doctokenizerYYlex(); if (tok==0) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment block while parsing the " + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the " "argument of command %s",tokenName.data()); break; } else if (tok!=TK_WORD && tok!=TK_LNKWORD) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", tokToString(tok),tokenName.data()); break; } @@ -769,7 +778,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList &children int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command", + warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", tokenName.data()); break; } @@ -778,7 +787,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList &children DocInternalRef *ref=0; if (tok!=TK_WORD && tok!=TK_LNKWORD) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", tokToString(tok),tokenName.data()); doctokenizerYYsetStatePara(); break; @@ -812,11 +821,13 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList &children { handleStyleEnter(parent,children,DocStyleChange::Preformatted,&g_token->attribs); parent->setInsidePreformatted(TRUE); + doctokenizerYYsetInsidePre(TRUE); } else { handleStyleLeave(parent,children,DocStyleChange::Preformatted,tokenName); parent->setInsidePreformatted(FALSE); + doctokenizerYYsetInsidePre(FALSE); } break; case HTML_CODE: @@ -924,7 +935,7 @@ handlepara: return FALSE; break; case TK_URL: - children.append(new DocURL(parent,g_token->name)); + children.append(new DocURL(parent,g_token->name,g_token->isEMailAddr)); break; default: return FALSE; @@ -1029,14 +1040,14 @@ static void readTextFileByName(const QString &file,QString &text) } else if (ambig) { - warn(g_fileName,doctokenizerYYlineno,"Error: included file name %s is ambigious" + warn(g_fileName,doctokenizerYYlineno,"Warning: included file name %s is ambigious" "Possible candidates:\n%s",file.data(), showFileDefMatches(Doxygen::exampleNameDict,file).data() ); } else { - warn(g_fileName,doctokenizerYYlineno,"Error: included file %s is not found" + warn(g_fileName,doctokenizerYYlineno,"Warning: included file %s is not found" "Check you EXAMPLE_PATH",file.data()); } } @@ -1048,7 +1059,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor) { if (id.isEmpty()) { - warn(g_fileName,doctokenizerYYlineno,"Error: Empty anchor label"); + warn(g_fileName,doctokenizerYYlineno,"Warning: Empty anchor label"); } if (newAnchor) // found { @@ -1064,7 +1075,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor) } else { - warn(g_fileName,doctokenizerYYlineno,"Error: Invalid anchor id `%s'",id.data()); + warn(g_fileName,doctokenizerYYlineno,"Warning: Invalid anchor id `%s'",id.data()); } } } @@ -1231,13 +1242,13 @@ void DocCopy::parse() } else // oops, recursion { - warn(g_fileName,doctokenizerYYlineno,"Error: recursive call chain of \\copydoc commands detected at %d\n", + warn(g_fileName,doctokenizerYYlineno,"Warning: recursive call chain of \\copydoc commands detected at %d\n", doctokenizerYYlineno); } } else { - warn(g_fileName,doctokenizerYYlineno,"Error: target %s of \\copydoc command not found", + warn(g_fileName,doctokenizerYYlineno,"Warning: target %s of \\copydoc command not found", m_link.data()); } } @@ -1264,9 +1275,12 @@ void DocXRefItem::parse() m_anchor = item->listAnchor; m_title = refList->sectionTitle(); - docParserPushContext(); - internalValidatingParseDoc(this,m_children,item->text); - docParserPopContext(); + if (!item->text.isEmpty()) + { + docParserPushContext(); + internalValidatingParseDoc(this,m_children,item->text); + docParserPopContext(); + } } } @@ -1329,15 +1343,15 @@ void DocSecRefItem::parse() switch (tok) { case TK_COMMAND: - warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a \\refitem", + warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\refitem", g_token->name.data()); break; case TK_SYMBOL: - warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", g_token->name.data()); break; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", tokToString(tok)); break; } @@ -1357,13 +1371,13 @@ void DocSecRefItem::parse() } else { - warn(g_fileName,doctokenizerYYlineno,"Error reference to unknown section %s", + warn(g_fileName,doctokenizerYYlineno,"Warning reference to unknown section %s", m_target.data()); } } else { - warn(g_fileName,doctokenizerYYlineno,"Error reference to empty target"); + warn(g_fileName,doctokenizerYYlineno,"Warning reference to empty target"); } DBG(("DocSecRefItem::parse() end\n")); @@ -1393,13 +1407,13 @@ void DocSecRefList::parse() int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after \\refitem command"); + warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after \\refitem command"); break; } tok=doctokenizerYYlex(); if (tok!=TK_WORD && tok!=TK_LNKWORD) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of \\refitem", + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of \\refitem", tokToString(tok)); break; } @@ -1412,7 +1426,7 @@ void DocSecRefList::parse() case CMD_ENDSECREFLIST: goto endsecreflist; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a \\secreflist", + warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\secreflist", g_token->name.data()); goto endsecreflist; } @@ -1423,7 +1437,7 @@ void DocSecRefList::parse() } else { - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s inside section reference list", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s inside section reference list", tokToString(tok)); goto endsecreflist; } @@ -1466,15 +1480,15 @@ void DocInternalRef::parse() switch (tok) { case TK_COMMAND: - warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a \\ref", + warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\ref", g_token->name.data()); break; case TK_SYMBOL: - warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", g_token->name.data()); break; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", tokToString(tok)); break; } @@ -1504,7 +1518,7 @@ DocRef::DocRef(DocNode *parent,const QString &target) : m_ref = sec->ref; m_file = stripKnownExtensions(sec->fileName); - m_anchor = sec->label; + if (sec->type!=SectionInfo::Page) m_anchor = sec->label; m_refToAnchor = sec->type==SectionInfo::Anchor; m_refToSection = sec->type!=SectionInfo::Anchor; } @@ -1537,7 +1551,7 @@ DocRef::DocRef(DocNode *parent,const QString &target) : } else // oops, bogus target { - warn(g_fileName,doctokenizerYYlineno,"Error: unable to resolve reference to `%s' for \\ref command", + warn(g_fileName,doctokenizerYYlineno,"Warning: unable to resolve reference to `%s' for \\ref command", target.data()); } } @@ -1555,15 +1569,15 @@ void DocRef::parse() switch (tok) { case TK_COMMAND: - warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a \\ref", + warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\ref", g_token->name.data()); break; case TK_SYMBOL: - warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", g_token->name.data()); break; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", tokToString(tok)); break; } @@ -1606,7 +1620,7 @@ DocLink::DocLink(DocNode *parent,const QString &target) : } else // oops, bogus target { - warn(g_fileName,doctokenizerYYlineno,"Error: unable to resolve link to `%s' for \\link command", + warn(g_fileName,doctokenizerYYlineno,"Warning: unable to resolve link to `%s' for \\link command", target.data()); } } @@ -1631,17 +1645,17 @@ QString DocLink::parse(bool isJavaLink) case CMD_ENDLINK: if (isJavaLink) { - warn(g_fileName,doctokenizerYYlineno,"Error: {@link.. ended with @endlink command"); + warn(g_fileName,doctokenizerYYlineno,"Warning: {@link.. ended with @endlink command"); } goto endlink; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a \\link", + warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\link", g_token->name.data()); break; } break; case TK_SYMBOL: - warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", g_token->name.data()); break; case TK_LNKWORD: @@ -1668,7 +1682,7 @@ QString DocLink::parse(bool isJavaLink) m_children.append(new DocWord(this,g_token->name)); break; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", tokToString(tok)); break; } @@ -1676,7 +1690,7 @@ QString DocLink::parse(bool isJavaLink) } if (tok==0) { - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected end of comment while inside" + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected end of comment while inside" " link command\n"); } endlink: @@ -1713,15 +1727,15 @@ void DocDotFile::parse() switch (tok) { case TK_COMMAND: - warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a \\dotfile", + warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\dotfile", g_token->name.data()); break; case TK_SYMBOL: - warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", g_token->name.data()); break; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", tokToString(tok)); break; } @@ -1740,7 +1754,7 @@ void DocDotFile::parse() } else { - warn(g_fileName,doctokenizerYYlineno,"Error: Unknown option %s after image title", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unknown option %s after image title", g_token->name.data()); } tok=doctokenizerYYlex(); @@ -1757,14 +1771,14 @@ void DocDotFile::parse() } else if (ambig) { - warn(g_fileName,doctokenizerYYlineno,"Error: included dot file name %s is ambigious.\n" + warn(g_fileName,doctokenizerYYlineno,"Warning: included dot file name %s is ambigious.\n" "Possible candidates:\n%s",m_name.data(), showFileDefMatches(Doxygen::exampleNameDict,m_name).data() ); } else { - warn(g_fileName,doctokenizerYYlineno,"Error: included dot file %s is not found " + warn(g_fileName,doctokenizerYYlineno,"Warning: included dot file %s is not found " "in any of the paths specified via DOTFILE_DIRS!",m_name.data()); } @@ -1790,15 +1804,15 @@ void DocImage::parse() switch (tok) { case TK_COMMAND: - warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a \\image", + warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a \\image", g_token->name.data()); break; case TK_SYMBOL: - warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", g_token->name.data()); break; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", tokToString(tok)); break; } @@ -1817,7 +1831,7 @@ void DocImage::parse() } else { - warn(g_fileName,doctokenizerYYlineno,"Error: Unknown option %s after image title", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unknown option %s after image title", g_token->name.data()); } tok=doctokenizerYYlex(); @@ -1848,7 +1862,7 @@ int DocHtmlHeader::parse() switch (tok) { case TK_COMMAND: - warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a tag", + warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a tag", g_token->name.data(),m_level); break; case TK_HTMLTAG: @@ -1858,7 +1872,7 @@ int DocHtmlHeader::parse() { if (m_level!=1) { - warn(g_fileName,doctokenizerYYlineno,"Error: ended with ", + warn(g_fileName,doctokenizerYYlineno,"Warning: ended with ", m_level); } goto endheader; @@ -1867,7 +1881,7 @@ int DocHtmlHeader::parse() { if (m_level!=2) { - warn(g_fileName,doctokenizerYYlineno,"Error: ended with ", + warn(g_fileName,doctokenizerYYlineno,"Warning: ended with ", m_level); } goto endheader; @@ -1876,7 +1890,7 @@ int DocHtmlHeader::parse() { if (m_level!=3) { - warn(g_fileName,doctokenizerYYlineno,"Error: ended with ", + warn(g_fileName,doctokenizerYYlineno,"Warning: ended with ", m_level); } goto endheader; @@ -1885,7 +1899,7 @@ int DocHtmlHeader::parse() { if (m_level!=4) { - warn(g_fileName,doctokenizerYYlineno,"Error: ended with ", + warn(g_fileName,doctokenizerYYlineno,"Warning: ended with ", m_level); } goto endheader; @@ -1894,7 +1908,7 @@ int DocHtmlHeader::parse() { if (m_level!=5) { - warn(g_fileName,doctokenizerYYlineno,"Error: ended with ", + warn(g_fileName,doctokenizerYYlineno,"Warning: ended with ", m_level); } goto endheader; @@ -1903,24 +1917,24 @@ int DocHtmlHeader::parse() { if (m_level!=6) { - warn(g_fileName,doctokenizerYYlineno,"Error: ended with ", + warn(g_fileName,doctokenizerYYlineno,"Warning: ended with ", m_level); } goto endheader; } else { - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected html tag <%s%s> found within context", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected html tag <%s%s> found within context", g_token->endTag?"/":"",g_token->name.data(),m_level); } } break; case TK_SYMBOL: - warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", g_token->name.data()); break; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", tokToString(tok)); break; } @@ -1928,7 +1942,7 @@ int DocHtmlHeader::parse() } if (tok==0) { - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected end of comment while inside" + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected end of comment while inside" " tag\n",m_level); } endheader: @@ -1955,11 +1969,11 @@ int DocHRef::parse() switch (tok) { case TK_COMMAND: - warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a .. block", + warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a .. block", g_token->name.data()); break; case TK_SYMBOL: - warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", g_token->name.data()); break; case TK_HTMLTAG: @@ -1971,13 +1985,13 @@ int DocHRef::parse() } else { - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected html tag <%s%s> found within context", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected html tag <%s%s> found within context", g_token->endTag?"/":"",g_token->name.data(),doctokenizerYYlineno); } } break; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", tokToString(tok),doctokenizerYYlineno); break; } @@ -1985,7 +1999,7 @@ int DocHRef::parse() } if (tok==0) { - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected end of comment while inside" + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected end of comment while inside" " tag",doctokenizerYYlineno); } endhref: @@ -2023,7 +2037,7 @@ int DocInternal::parse() } if (retval==TK_LISTITEM) { - warn(g_fileName,doctokenizerYYlineno,"Error: Invalid list item found",doctokenizerYYlineno); + warn(g_fileName,doctokenizerYYlineno,"Warning: Invalid list item found",doctokenizerYYlineno); } } while (retval!=0 && retval!=RetVal_Section); if (lastPar) lastPar->markLast(); @@ -2031,24 +2045,24 @@ int DocInternal::parse() // then parse any number of level1 sections while (retval==RetVal_Section) { - SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId]; - int secLev = sec->type==SectionInfo::Subsection ? 2 : 1; - if (secLev!=1) // wrong level - { - warn(g_fileName,doctokenizerYYlineno,"Error: Expected level 1 section, found a section with level %d.",secLev); - break; - } - else - { - DocSection *s=new DocSection(this,secLev,g_token->sectionId); + //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId]; + //int secLev = sec->type==SectionInfo::Subsection ? 2 : 1; + //if (secLev!=1) // wrong level + //{ + // warn(g_fileName,doctokenizerYYlineno,"Warning: Expected level 1 section, found a section with level %d.",secLev); + // break; + //} + //else + //{ + DocSection *s=new DocSection(this,1,g_token->sectionId); m_children.append(s); retval = s->parse(); - } + //} } if (retval==RetVal_Internal) { - warn(g_fileName,doctokenizerYYlineno,"Error: \\internal command found inside internal section"); + warn(g_fileName,doctokenizerYYlineno,"Warning: \\internal command found inside internal section"); } DBG(("DocInternal::parse() end\n")); @@ -2067,7 +2081,7 @@ int DocIndexEntry::parse() int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after \\addindex command"); + warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after \\addindex command"); goto endindexentry; } m_entry=""; @@ -2096,7 +2110,7 @@ int DocIndexEntry::parse() case DocSymbol::Apos: m_entry+='\''; break; case DocSymbol::Quot: m_entry+='"'; break; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected symbol found as argument of \\addindex"); + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected symbol found as argument of \\addindex"); break; } } @@ -2113,13 +2127,13 @@ int DocIndexEntry::parse() case CMD_HASH: m_entry+='#'; break; case CMD_PERCENT: m_entry+='%'; break; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected command %s found as argument of \\addindex", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected command %s found as argument of \\addindex", g_token->name.data()); break; } break; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", tokToString(tok)); break; } @@ -2147,11 +2161,11 @@ int DocHtmlCaption::parse() switch (tok) { case TK_COMMAND: - warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a tag", + warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a tag", g_token->name.data()); break; case TK_SYMBOL: - warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", g_token->name.data()); break; case TK_HTMLTAG: @@ -2164,13 +2178,13 @@ int DocHtmlCaption::parse() } else { - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected html tag <%s%s> found within context", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected html tag <%s%s> found within context", g_token->endTag?"/":"",g_token->name.data()); } } break; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", tokToString(tok)); break; } @@ -2178,7 +2192,7 @@ int DocHtmlCaption::parse() } if (tok==0) { - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected end of comment while inside" + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected end of comment while inside" " tag",doctokenizerYYlineno); } endcaption: @@ -2245,20 +2259,20 @@ int DocHtmlRow::parse() } else // found some other tag { - warn(g_fileName,doctokenizerYYlineno,"Error: expected or tag but " + warn(g_fileName,doctokenizerYYlineno,"Warning: expected or tag but " "found <%s> instead!",g_token->name.data()); goto endrow; } } else if (tok==0) // premature end of comment { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment while looking" + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while looking" " for a html description title"); goto endrow; } else // token other than html token { - warn(g_fileName,doctokenizerYYlineno,"Error: expected or tag but found %s token instead!", + warn(g_fileName,doctokenizerYYlineno,"Warning: expected or tag but found %s token instead!", tokToString(tok)); goto endrow; } @@ -2309,7 +2323,7 @@ getrow: { if (m_caption) { - warn(g_fileName,doctokenizerYYlineno,"Error: table already has a caption, found another one"); + warn(g_fileName,doctokenizerYYlineno,"Warning: table already has a caption, found another one"); } else { @@ -2324,18 +2338,18 @@ getrow: } else // found wrong token { - warn(g_fileName,doctokenizerYYlineno,"Error: expected or tag but " + warn(g_fileName,doctokenizerYYlineno,"Warning: expected or tag but " "found <%s%s> instead!", g_token->endTag ? "/" : "", g_token->name.data()); } } else if (tok==0) // premature end of comment { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment while looking" + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while looking" " for a or tag"); } else // token other than html token { - warn(g_fileName,doctokenizerYYlineno,"Error: expected tag but found %s token instead!", + warn(g_fileName,doctokenizerYYlineno,"Warning: expected tag but found %s token instead!", tokToString(tok)); } @@ -2369,11 +2383,11 @@ int DocHtmlDescTitle::parse() switch (tok) { case TK_COMMAND: - warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a
    tag", + warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a
    tag", g_token->name.data()); break; case TK_SYMBOL: - warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", g_token->name.data()); break; case TK_HTMLTAG: @@ -2390,13 +2404,13 @@ int DocHtmlDescTitle::parse() } else { - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected html tag <%s%s> found within
    context", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected html tag <%s%s> found within
    context", g_token->endTag?"/":"",g_token->name.data()); } } break; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", tokToString(tok)); break; } @@ -2404,7 +2418,7 @@ int DocHtmlDescTitle::parse() } if (tok==0) { - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected end of comment while inside" + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected end of comment while inside" "
    tag"); } endtitle: @@ -2464,20 +2478,20 @@ int DocHtmlDescList::parse() } else // found some other tag { - warn(g_fileName,doctokenizerYYlineno,"Error: expected
    tag but " + warn(g_fileName,doctokenizerYYlineno,"Warning: expected
    tag but " "found <%s> instead!",g_token->name.data()); goto enddesclist; } } else if (tok==0) // premature end of comment { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment while looking" + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while looking" " for a html description title"); goto enddesclist; } else // token other than html token { - warn(g_fileName,doctokenizerYYlineno,"Error: expected
    tag but found %s token instead!", + warn(g_fileName,doctokenizerYYlineno,"Warning: expected
    tag but found %s token instead!", tokToString(tok)); goto enddesclist; } @@ -2502,7 +2516,7 @@ int DocHtmlDescList::parse() if (retval==0) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment while inside
    block"); + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while inside
    block"); } enddesclist: @@ -2589,20 +2603,20 @@ int DocHtmlList::parse() } else // found some other tag { - warn(g_fileName,doctokenizerYYlineno,"Error: expected
  • tag but " + warn(g_fileName,doctokenizerYYlineno,"Warning: expected
  • tag but " "found <%s> instead!",g_token->name.data()); goto endlist; } } else if (tok==0) // premature end of comment { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment while looking" + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while looking" " for a html list item"); goto endlist; } else // token other than html token { - warn(g_fileName,doctokenizerYYlineno,"Error: expected
  • tag but found %s token instead!", + warn(g_fileName,doctokenizerYYlineno,"Warning: expected
  • tag but found %s token instead!", tokToString(tok)); goto endlist; } @@ -2616,7 +2630,7 @@ int DocHtmlList::parse() if (retval==0) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment while inside <%cl> block", + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment while inside <%cl> block", m_type==Unordered ? 'u' : 'o'); } @@ -2710,15 +2724,15 @@ void DocTitle::parse() switch (tok) { case TK_COMMAND: - warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command %s as part of a title section", + warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal command %s as part of a title section", g_token->name.data()); break; case TK_SYMBOL: - warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", g_token->name.data()); break; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", tokToString(tok)); break; } @@ -2800,7 +2814,7 @@ int DocParamList::parse(const QString &cmdName) int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command", + warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", cmdName.data()); } doctokenizerYYsetStateParam(); @@ -2823,7 +2837,7 @@ int DocParamList::parse(const QString &cmdName) doctokenizerYYsetStatePara(); if (tok==0) /* premature end of comment block */ { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment block while parsing the " + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the " "argument of command %s",cmdName.data()); return 0; } @@ -2874,9 +2888,10 @@ int DocParamSect::parse(const QString &cmdName) int DocPara::handleSimpleSection(DocSimpleSect::Type t) { DocSimpleSect *ss=0; - if (!m_children.isEmpty() && // previous element - m_children.last()->kind()==Kind_SimpleSect && // was a simple sect - ((DocSimpleSect *)m_children.last())->type()==t) // of same type + if (!m_children.isEmpty() && // previous element + m_children.last()->kind()==Kind_SimpleSect && // was a simple sect + ((DocSimpleSect *)m_children.last())->type()==t && // of same type + t!=DocSimpleSect::User) // but not user defined { // append to previous section ss=(DocSimpleSect *)m_children.last(); @@ -2930,7 +2945,7 @@ void DocPara::handleIncludeOperator(const QString &cmdName,DocIncOperator::Type int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command", + warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", cmdName.data()); return; } @@ -2939,13 +2954,13 @@ void DocPara::handleIncludeOperator(const QString &cmdName,DocIncOperator::Type doctokenizerYYsetStatePara(); if (tok==0) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment block while parsing the " + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the " "argument of command %s", cmdName.data()); return; } else if (tok!=TK_WORD) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", tokToString(tok),cmdName.data()); return; } @@ -2980,21 +2995,21 @@ void DocPara::handleImage(const QString &cmdName) int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command", + warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", cmdName.data()); return; } tok=doctokenizerYYlex(); if (tok!=TK_WORD && tok!=TK_LNKWORD) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", tokToString(tok),cmdName.data()); return; } tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command", + warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", cmdName.data()); return; } @@ -3005,7 +3020,7 @@ void DocPara::handleImage(const QString &cmdName) else if (imgType=="rtf") t=DocImage::Rtf; else { - warn(g_fileName,doctokenizerYYlineno,"Error: image type %s specified as the first argument of " + warn(g_fileName,doctokenizerYYlineno,"Warning: image type %s specified as the first argument of " "%s is not valid", imgType.data(),cmdName.data()); return; @@ -3014,7 +3029,7 @@ void DocPara::handleImage(const QString &cmdName) tok=doctokenizerYYlex(); if (tok!=TK_WORD) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", tokToString(tok),cmdName.data()); return; } @@ -3029,7 +3044,7 @@ void DocPara::handleDotFile(const QString &cmdName) int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command", + warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", cmdName.data()); return; } @@ -3037,7 +3052,7 @@ void DocPara::handleDotFile(const QString &cmdName) tok=doctokenizerYYlex(); if (tok!=TK_WORD) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", tokToString(tok),cmdName.data()); return; } @@ -3052,7 +3067,7 @@ void DocPara::handleLink(const QString &cmdName,bool isJavaLink) int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command", + warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", cmdName.data()); return; } @@ -3060,7 +3075,7 @@ void DocPara::handleLink(const QString &cmdName,bool isJavaLink) tok=doctokenizerYYlex(); if (tok!=TK_WORD) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", tokToString(tok),cmdName.data()); return; } @@ -3079,7 +3094,7 @@ void DocPara::handleRef(const QString &cmdName) int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command", + warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", cmdName.data()); return; } @@ -3088,7 +3103,7 @@ void DocPara::handleRef(const QString &cmdName) DocRef *ref=0; if (tok!=TK_WORD) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", tokToString(tok),cmdName.data()); goto endref; } @@ -3129,7 +3144,7 @@ int DocPara::handleLanguageSwitch() } else { - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s as parameter of \\~", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s as parameter of \\~", tokToString(tok)); goto endlang; } @@ -3149,7 +3164,7 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t) int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command", + warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", cmdName.data()); return; } @@ -3158,13 +3173,13 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t) doctokenizerYYsetStatePara(); if (tok==0) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment block while parsing the " + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the " "argument of command %s",cmdName.data()); return; } else if (tok!=TK_WORD) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", tokToString(tok),cmdName.data()); return; } @@ -3173,6 +3188,35 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t) inc->parse(); } +void DocPara::handleSection(const QString &cmdName) +{ + // get the argument of the section command. + int tok=doctokenizerYYlex(); + if (tok!=TK_WHITESPACE) + { + warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", + cmdName.data()); + return; + } + tok=doctokenizerYYlex(); + if (tok==0) + { + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the " + "argument of command %s\n", cmdName.data()); + return; + } + else if (tok!=TK_WORD && tok!=TK_LNKWORD) + { + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", + tokToString(tok),cmdName.data()); + return; + } + g_token->sectionId = g_token->name; + doctokenizerYYsetStateSkipTitle(); + doctokenizerYYlex(); + doctokenizerYYsetStatePara(); +} + int DocPara::handleCommand(const QString &cmdName) { @@ -3180,7 +3224,7 @@ int DocPara::handleCommand(const QString &cmdName) switch (CmdMapper::map(cmdName)) { case CMD_UNKNOWN: - warn(g_fileName,doctokenizerYYlineno,"Error: Found unknown command `\\%s'",cmdName.data()); + warn(g_fileName,doctokenizerYYlineno,"Warning: Found unknown command `\\%s'",cmdName.data()); break; case CMD_EMPHASIS: m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Italic,TRUE)); @@ -3280,37 +3324,34 @@ int DocPara::handleCommand(const QString &cmdName) break; case CMD_SECTION: { - // get the argument of the section command. - int tok=doctokenizerYYlex(); - if (tok!=TK_WHITESPACE) - { - warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command", - cmdName.data()); - break; - } - tok=doctokenizerYYlex(); - if (tok==0) - { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment block while parsing the " - "argument of command %s\n", cmdName.data()); - break; - } - else if (tok!=TK_WORD && tok!=TK_LNKWORD) - { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s", - tokToString(tok),cmdName.data()); - break; - } - g_token->sectionId = g_token->name; + handleSection(cmdName); retval = RetVal_Section; } break; + case CMD_SUBSECTION: + { + handleSection(cmdName); + retval = RetVal_Subsection; + } + break; + case CMD_SUBSUBSECTION: + { + handleSection(cmdName); + retval = RetVal_Subsubsection; + } + break; + case CMD_PARAGRAPH: + { + handleSection(cmdName); + retval = RetVal_Paragraph; + } + break; case CMD_STARTCODE: { doctokenizerYYsetStateCode(); retval = doctokenizerYYlex(); m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Code,g_isExample,g_fileName)); - if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: code section ended without end marker"); + if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Warning: code section ended without end marker"); doctokenizerYYsetStatePara(); } break; @@ -3319,7 +3360,7 @@ int DocPara::handleCommand(const QString &cmdName) doctokenizerYYsetStateHtmlOnly(); retval = doctokenizerYYlex(); m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::HtmlOnly,g_isExample,g_fileName)); - if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: htmlonly section ended without end marker"); + if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Warning: htmlonly section ended without end marker"); doctokenizerYYsetStatePara(); } break; @@ -3328,7 +3369,7 @@ int DocPara::handleCommand(const QString &cmdName) doctokenizerYYsetStateLatexOnly(); retval = doctokenizerYYlex(); m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::LatexOnly,g_isExample,g_fileName)); - if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: latexonly section ended without end marker"); + if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Warning: latexonly section ended without end marker"); doctokenizerYYsetStatePara(); } break; @@ -3337,7 +3378,7 @@ int DocPara::handleCommand(const QString &cmdName) doctokenizerYYsetStateVerbatim(); retval = doctokenizerYYlex(); m_children.append(new DocVerbatim(this,g_context,g_token->verb,DocVerbatim::Verbatim,g_isExample,g_fileName)); - if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Error: verbatim section ended without end marker"); + if (retval==0) warn(g_fileName,doctokenizerYYlineno,"Warning: verbatim section ended without end marker"); doctokenizerYYsetStatePara(); } break; @@ -3346,7 +3387,7 @@ int DocPara::handleCommand(const QString &cmdName) case CMD_ENDLATEXONLY: case CMD_ENDLINK: case CMD_ENDVERBATIM: - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected command %s",g_token->name.data()); + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data()); break; case CMD_PARAM: retval = handleParamSection(cmdName,DocParamSect::Param); @@ -3380,20 +3421,20 @@ int DocPara::handleCommand(const QString &cmdName) int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command", + warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", cmdName.data()); break; } tok=doctokenizerYYlex(); if (tok==0) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment block while parsing the " + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the " "argument of command %s",cmdName.data()); break; } else if (tok!=TK_WORD && tok!=TK_LNKWORD) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", tokToString(tok),cmdName.data()); break; } @@ -3416,20 +3457,20 @@ int DocPara::handleCommand(const QString &cmdName) int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after %s command", + warn(g_fileName,doctokenizerYYlineno,"Warning: expected whitespace after %s command", cmdName.data()); break; } tok=doctokenizerYYlex(); if (tok==0) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected end of comment block while parsing the " + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected end of comment block while parsing the " "argument of command %s\n", cmdName.data()); break; } else if (tok!=TK_WORD && tok!=TK_LNKWORD) { - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected token %s as the argument of %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected token %s as the argument of %s", tokToString(tok),cmdName.data()); break; } @@ -3485,10 +3526,10 @@ int DocPara::handleCommand(const QString &cmdName) } break; case CMD_SECREFITEM: - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected command %s",g_token->name.data()); + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data()); break; case CMD_ENDSECREFLIST: - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected command %s",g_token->name.data()); + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data()); break; case CMD_FORMULA: { @@ -3500,7 +3541,7 @@ int DocPara::handleCommand(const QString &cmdName) retval = handleLanguageSwitch(); break; case CMD_INTERNALREF: - warn(g_fileName,doctokenizerYYlineno,"Error: unexpected command %s",g_token->name.data()); + warn(g_fileName,doctokenizerYYlineno,"Warning: unexpected command %s",g_token->name.data()); break; default: // we should not get here! @@ -3540,7 +3581,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag case HTML_LI: if (!insideUL(this) && !insideOL(this)) { - warn(g_fileName,doctokenizerYYlineno,"Error: lonely
  • tag found"); + warn(g_fileName,doctokenizerYYlineno,"Warning: lonely
  • tag found"); } else { @@ -3578,6 +3619,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag case HTML_PRE: handleStyleEnter(this,m_children,DocStyleChange::Preformatted,&g_token->attribs); setInsidePreformatted(TRUE); + doctokenizerYYsetInsidePre(TRUE); break; case HTML_P: retval=TK_NEWPARA; @@ -3593,7 +3635,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag retval = RetVal_DescTitle; break; case HTML_DD: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag
    found"); + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag
    found"); break; case HTML_TABLE: { @@ -3612,7 +3654,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag retval = RetVal_TableHCell; break; case HTML_CAPTION: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag found"); + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag found"); break; case HTML_BR: { @@ -3642,7 +3684,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag } else { - warn(g_fileName,doctokenizerYYlineno,"Error: found tag with name option but without value!"); + warn(g_fileName,doctokenizerYYlineno,"Warning: found tag with name option but without value!"); } } else if (opt->name=="href") // .. tag @@ -3717,7 +3759,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag } break; case HTML_UNKNOWN: - warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported html tag <%s> found", tagName.data()); + warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported html tag <%s> found", tagName.data()); break; default: // we should not get here! @@ -3737,7 +3779,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName) case HTML_UL: if (!insideUL(this)) { - warn(g_fileName,doctokenizerYYlineno,"Error: found tag without matching
      "); + warn(g_fileName,doctokenizerYYlineno,"Warning: found
    tag without matching
      "); } else { @@ -3747,7 +3789,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName) case HTML_OL: if (!insideOL(this)) { - warn(g_fileName,doctokenizerYYlineno,"Error: found tag without matching
        "); + warn(g_fileName,doctokenizerYYlineno,"Warning: found
      tag without matching
        "); } else { @@ -3757,7 +3799,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName) case HTML_LI: if (!insideLI(this)) { - warn(g_fileName,doctokenizerYYlineno,"Error: found tag without matching
      1. "); + warn(g_fileName,doctokenizerYYlineno,"Warning: found
      2. tag without matching
      3. "); } else { @@ -3767,7 +3809,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName) //case HTML_PRE: // if (!insidePRE(this)) // { - // warn(g_fileName,doctokenizerYYlineno,"Error: found tag without matching
        ");
        +    //    warn(g_fileName,doctokenizerYYlineno,"Warning: found 
        tag without matching
        ");
             //  }
             //  else
             //  {
        @@ -3798,6 +3840,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
             case HTML_PRE:
               handleStyleLeave(this,m_children,DocStyleChange::Preformatted,"preformatted");
               setInsidePreformatted(FALSE);
        +      doctokenizerYYsetInsidePre(FALSE);
               break;
             case HTML_P:
               // ignore 

        tag @@ -3824,32 +3867,32 @@ int DocPara::handleHtmlEndTag(const QString &tagName) // ignore tag break; case HTML_CAPTION: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag found"); + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag found"); break; case HTML_BR: - warn(g_fileName,doctokenizerYYlineno,"Error: Illegal
        tag found\n"); + warn(g_fileName,doctokenizerYYlineno,"Warning: Illegal
        tag found\n"); break; case HTML_H1: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag found"); + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag found"); break; case HTML_H2: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag found"); + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag found"); break; case HTML_H3: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag found"); + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag found"); break; case HTML_IMG: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag found"); + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag found"); break; case HTML_HR: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag found"); + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag found"); break; case HTML_A: - //warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected tag found"); + //warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag found"); // ignore tag (can be part of break; case HTML_UNKNOWN: - warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported html tag found", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported html tag found", tagName.data()); break; default: @@ -3886,7 +3929,7 @@ reparsetoken: handleLinkedWord(this,m_children); break; case TK_URL: - m_children.append(new DocURL(this,g_token->name)); + m_children.append(new DocURL(this,g_token->name,g_token->isEMailAddr)); break; case TK_WHITESPACE: { @@ -3982,13 +4025,13 @@ reparsetoken: } else { - warn(g_fileName,doctokenizerYYlineno,"Error: End of list marker found " + warn(g_fileName,doctokenizerYYlineno,"Warning: End of list marker found " "has invalid indent level"); } } else { - warn(g_fileName,doctokenizerYYlineno,"Error: End of list marker found without any preceding " + warn(g_fileName,doctokenizerYYlineno,"Warning: End of list marker found without any preceding " "list items"); } break; @@ -4089,7 +4132,7 @@ reparsetoken: } else { - warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", g_token->name.data()); } break; @@ -4115,7 +4158,7 @@ endparagraph: int DocSection::parse() { - DBG(("DocSection::parse() start %s\n",g_token->sectionId.data())); + DBG(("DocSection::parse() start %s level=%d\n",g_token->sectionId.data(),m_level)); int retval=RetVal_OK; g_nodeStack.push(this); @@ -4151,44 +4194,73 @@ int DocSection::parse() } if (retval==TK_LISTITEM) { - warn(g_fileName,doctokenizerYYlineno,"Error: Invalid list item found"); + warn(g_fileName,doctokenizerYYlineno,"Warning: Invalid list item found"); } - } while (retval!=0 && retval!=RetVal_Section && retval!=RetVal_Internal); + } while (retval!=0 && + retval!=RetVal_Internal && + retval!=RetVal_Section && + retval!=RetVal_Subsection && + retval!=RetVal_Subsubsection && + retval!=RetVal_Paragraph + ); + if (lastPar) lastPar->markLast(); - // then parse any number of nested sections - while (retval==RetVal_Section) // more sections follow + if (retval==RetVal_Subsection && m_level==1) { - SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId]; - ASSERT(sec!=0); - int secLev = 1; - switch (sec->type) - { - case SectionInfo::Section: secLev=1; break; - case SectionInfo::Subsection: secLev=2; break; - case SectionInfo::Subsubsection: secLev=3; break; - case SectionInfo::Paragraph: secLev=4; break; - default: ASSERT(0); - } - if (secLev<=level()) // new section at same or lower level + // then parse any number of nested sections + while (retval==RetVal_Subsection) // more sections follow { - break; + //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId]; + DocSection *s=new DocSection(this,2,g_token->sectionId); + m_children.append(s); + retval = s->parse(); } - if (secLev!=level()+1) // new section at wrong level + } + else if (retval==RetVal_Subsubsection && m_level==2) + { + // then parse any number of nested sections + while (retval==RetVal_Subsubsection) // more sections follow { - warn(g_fileName,doctokenizerYYlineno,"Error: Expected level %d section, found a section " - "with level %d",level()+1,secLev); - retval=0; // stop parsing any further. - break; + //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId]; + DocSection *s=new DocSection(this,3,g_token->sectionId); + m_children.append(s); + retval = s->parse(); } - else // nested section + } + else if (retval==RetVal_Paragraph && m_level==3) + { + // then parse any number of nested sections + while (retval==RetVal_Paragraph) // more sections follow { - DocSection *s=new DocSection(this,secLev,g_token->sectionId); + //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId]; + DocSection *s=new DocSection(this,4,g_token->sectionId); m_children.append(s); retval = s->parse(); } } - INTERNAL_ASSERT(retval==0 || retval==RetVal_Section || retval==RetVal_Internal); + else if ((m_level<=1 && retval==RetVal_Subsubsection) || + (m_level<=2 && retval==RetVal_Paragraph) + ) + { + int level; + if (retval==RetVal_Subsection) level=2; + else if (retval==RetVal_Subsubsection) level=3; + else level=4; + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected %s " + "command found inside %s!", + sectionLevelToName[level],sectionLevelToName[m_level]); + retval=0; // stop parsing + + } + + INTERNAL_ASSERT(retval==0 || + retval==RetVal_Section || + retval==RetVal_Subsection || + retval==RetVal_Subsubsection || + retval==RetVal_Paragraph || + retval==RetVal_Internal + ); DBG(("DocSection::parse() end\n")); DocNode *n = g_nodeStack.pop(); @@ -4224,7 +4296,7 @@ void DocText::parse() } else { - warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found", g_token->name.data()); } } @@ -4257,13 +4329,13 @@ void DocText::parse() m_children.append(new DocSymbol(this,DocSymbol::Percent)); break; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected command `%s' found", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected command `%s' found", g_token->name.data()); break; } break; default: - warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", + warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s", tokToString(tok)); break; } @@ -4301,7 +4373,7 @@ void DocRoot::parse() } if (retval==TK_LISTITEM) { - warn(g_fileName,doctokenizerYYlineno,"Error: Invalid list item found"); + warn(g_fileName,doctokenizerYYlineno,"Warning: Invalid list item found"); } } while (retval!=0 && retval!=RetVal_Section && retval!=RetVal_Internal); if (lastPar) lastPar->markLast(); @@ -4311,19 +4383,9 @@ void DocRoot::parse() { SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId]; ASSERT(sec!=0); - if (sec==0) break; - int secLev = sec->type==SectionInfo::Subsection ? 2 : 1; - if (secLev!=1) // wrong level - { - warn(g_fileName,doctokenizerYYlineno,"Error: Expected level 1 section, found a section with level %d",secLev); - break; - } - else - { - DocSection *s=new DocSection(this,secLev,g_token->sectionId); - m_children.append(s); - retval = s->parse(); - } + DocSection *s=new DocSection(this,1,g_token->sectionId); + m_children.append(s); + retval = s->parse(); } if (retval==RetVal_Internal) @@ -4431,3 +4493,8 @@ DocNode *validatingParseText(const char *input) return txt; } +void docFindSections(const char *input,PageInfo *pi,Definition *d,MemberGroup *mg) +{ + doctokenizerYYFindSections(input,pi,d,mg); +} + diff --git a/src/docparser.h b/src/docparser.h index 346623e..d7788db 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -30,6 +30,9 @@ class DocNode; class MemberDef; +class PageInfo; +class Definition; +class MemberGroup; //--------------------------------------------------------------------------- @@ -55,6 +58,9 @@ DocNode *validatingParseDoc(const char *fileName,int startLine, */ DocNode *validatingParseText(const char *input); +/*! Searches for section and anchor commands in the input */ +void docFindSections(const char *input,PageInfo *pi,Definition *d,MemberGroup *m); + //--------------------------------------------------------------------------- /*! @brief Abstract node interface with type information. */ @@ -200,16 +206,18 @@ class DocLinkedWord : public DocNode class DocURL : public DocNode { public: - DocURL(DocNode *parent,const QString &url) : - m_parent(parent), m_url(url) {} + DocURL(DocNode *parent,const QString &url,bool isEmail) : + m_parent(parent), m_url(url), m_isEmail(isEmail) {} QString url() const { return m_url; } Kind kind() const { return Kind_URL; } DocNode *parent() const { return m_parent; } void accept(DocVisitor *v) { v->visit(this); } + bool isEmail() const { return m_isEmail; } private: DocNode *m_parent; QString m_url; + bool m_isEmail; }; /*! @brief Node representing a line break */ @@ -912,6 +920,7 @@ class DocPara : public CompAccept, public DocNode void handleInclude(const QString &cmdName,DocInclude::Type t); void handleLink(const QString &cmdName,bool isJavaLink); void handleRef(const QString &cmdName); + void handleSection(const QString &cmdName); int handleLanguageSwitch(); private: diff --git a/src/doctokenizer.h b/src/doctokenizer.h index cb0a823..74077f4 100644 --- a/src/doctokenizer.h +++ b/src/doctokenizer.h @@ -23,6 +23,10 @@ #include #include "htmlattrib.h" +class Definition; +class PageInfo; +class MemberGroup; + enum Tokens { TK_WORD = 1, @@ -37,21 +41,24 @@ enum Tokens TK_RCSTAG = 10, TK_URL = 11, - RetVal_OK = 0x10000, - RetVal_SimpleSec = 0x10001, - RetVal_ListItem = 0x10002, - RetVal_Section = 0x10003, - RetVal_EndList = 0x10004, - RetVal_EndPre = 0x10005, - RetVal_DescData = 0x10006, - RetVal_DescTitle = 0x10007, - RetVal_EndDesc = 0x10008, - RetVal_TableRow = 0x10009, - RetVal_TableCell = 0x1000A, - RetVal_TableHCell = 0x1000B, - RetVal_EndTable = 0x1000C, - RetVal_Internal = 0x1000D, - RetVal_SwitchLang = 0x1000E + RetVal_OK = 0x10000, + RetVal_SimpleSec = 0x10001, + RetVal_ListItem = 0x10002, + RetVal_Section = 0x10003, + RetVal_Subsection = 0x10004, + RetVal_Subsubsection = 0x10005, + RetVal_Paragraph = 0x10006, + RetVal_EndList = 0x10007, + RetVal_EndPre = 0x10008, + RetVal_DescData = 0x10009, + RetVal_DescTitle = 0x1000A, + RetVal_EndDesc = 0x1000B, + RetVal_TableRow = 0x1000C, + RetVal_TableCell = 0x1000D, + RetVal_TableHCell = 0x1000E, + RetVal_EndTable = 0x1000F, + RetVal_Internal = 0x10010, + RetVal_SwitchLang = 0x10011 }; struct TokenInfo @@ -89,6 +96,9 @@ struct TokenInfo // whitespace QString chars; + + // url + bool isEMailAddr; }; // globals @@ -100,6 +110,8 @@ extern FILE *doctokenizerYYin; const char *tokToString(int token); // operations on the scanner +void doctokenizerYYFindSections(const char *input,PageInfo *pi,Definition *d, + MemberGroup *mg); void doctokenizerYYinit(const char *input,const char *fileName); void doctokenizerYYcleanup(); void doctokenizerYYpushContext(); @@ -119,5 +131,7 @@ void doctokenizerYYsetStateLink(); void doctokenizerYYsetStateRef(); void doctokenizerYYsetStateInternalRef(); void doctokenizerYYsetStateText(); +void doctokenizerYYsetStateSkipTitle(); +void doctokenizerYYsetInsidePre(bool b); #endif diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 879ca2c..be5db69 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -27,16 +27,30 @@ #include "cmdmapper.h" #include "config.h" #include "message.h" +#include "section.h" +#include "membergroup.h" +#include "definition.h" +#include "page.h" #define YY_NEVER_INTERACTIVE 1 //-------------------------------------------------------------------------- +// context for tokenizer phase static int g_commentState; TokenInfo *g_token = 0; static int g_inputPos = 0; static const char *g_inputString; static QString g_fileName; +static bool g_insidePre; + +// context for section finding phase +static PageInfo *g_pageInfo; +static Definition *g_definition; +static MemberGroup *g_memberGroup; +static QCString g_secLabel; +static QCString g_secTitle; +static SectionInfo::SectionType g_secType; struct DocLexerContext { @@ -189,6 +203,41 @@ static void parseHtmlAttribs(const char *att) //-------------------------------------------------------------------------- +static void processSection() +{ + //printf("found section/anchor with name `%s'\n",g_secLabel.data()); + QCString file; + if (g_memberGroup) + { + file = g_memberGroup->parent()->getOutputFileBase(); + } + else if (g_definition) + { + file = g_definition->getOutputFileBase(); + } + else if (g_pageInfo) + { + file = g_pageInfo->getOutputFileBase(); + } + else + { + warn(g_fileName,yylineno,"Found section/anchor %s without context\n",g_secLabel.data()); + } + SectionInfo *si=0; + if ((si=Doxygen::sectionDict.find(g_secLabel))==0) + { + si = new SectionInfo(file,g_secLabel,g_secTitle,g_secType); + Doxygen::sectionDict.insert(g_secLabel,si); + } + else if (!si->generated) + { + warn(g_fileName,yylineno,"Duplicate section/anchor label %s found!\n", + g_secLabel.data()); + } +} + +//-------------------------------------------------------------------------- + #undef YY_INPUT #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); @@ -237,14 +286,15 @@ OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG}) LNKWORD1 ("::"|"#")?{SCOPEMASK} CVSPEC {BLANK}*("const"|"volatile") LNKWORD2 {SCOPEPRE}*"operator"{OPMASK} -WORD1 [^ \t\n\r\\@<>{}&$#,.]+|"{"|"}" -WORD2 "."|"," -WORD1NQ [^ \t\n\r\\@<>{}&$#,."]+ -WORD2NQ "."|"," +WORD1 [^ \t\n\r\\@<>(){}&$#,.]+|"{"|"}" +WORD2 "."|","|"("|")" +WORD1NQ [^ \t\n\r\\@<>(){}&$#,."]+ +WORD2NQ "."|","|"("|")" HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">" HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p" HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P" HTMLKEYW {HTMLKEYL}|{HTMLKEYU} +LABELID [a-z_A-Z][a-z_A-Z0-9\-]* %option noyywrap %option yylineno @@ -269,6 +319,12 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU} %x St_Ref2 %x St_IntRef %x St_Text +%x St_SkipTitle + +%x St_Sections +%s St_SecLabel1 +%s St_SecLabel2 +%s St_SecTitle %% \r /* skip carriage return */ @@ -315,12 +371,14 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU} g_token->name = yytext+1; return TK_COMMAND; } -("http:"|"https:"|"ftp:"|"file:"|"news:"){URLMASK} { +("http:"|"https:"|"ftp:"|"file:"|"news:"){URLMASK} { // URL g_token->name=yytext; + g_token->isEMailAddr=FALSE; return TK_URL; } -[a-z_A-Z0-9.-]+"@"[a-z_A-Z0-9-]+"."[a-z_A-Z0-9.-]+ { +[a-z_A-Z0-9.-]+"@"[a-z_A-Z0-9-]+"."[a-z_A-Z0-9.-]+ { // Mail address g_token->name=yytext; + g_token->isEMailAddr=TRUE; return TK_URL; } "$"{ID}":"[^\n$]+"$" { /* RCS tag */ @@ -408,8 +466,19 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU} return TK_COMMAND; } ({BLANK}*\n)+{BLANK}*\n { - /* start of a new paragraph */ - return TK_NEWPARA; + if (g_insidePre) + { + /* Inside a
        ..
        blank lines are treated + * as whitespace. + */ + g_token->chars=yytext; + return TK_WHITESPACE; + } + else + { + /* start of a new paragraph */ + return TK_NEWPARA; + } } {CMD}"endcode" { return RetVal_OK; @@ -621,6 +690,56 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU} } [^-\n]+ /* inside html comment */ . /* inside html comment */ + + /* State for skipping title (all chars until the end of the line) */ + +. +\n { return 0; } + + /* State for the pass used to find the anchors and sections */ + +[^\n@\\]+ +"@@"|"\\\\" +{CMD}"anchor"{BLANK}+ { + g_secType = SectionInfo::Anchor; + BEGIN(St_SecLabel1); + } +{CMD}"section"{BLANK}+ { + g_secType = SectionInfo::Section; + BEGIN(St_SecLabel2); + } +{CMD}"subsection"{BLANK}+ { + g_secType = SectionInfo::Subsection; + BEGIN(St_SecLabel2); + } +{CMD}"subsubsection"{BLANK}+ { + g_secType = SectionInfo::Subsubsection; + BEGIN(St_SecLabel2); + } +{CMD}"paragraph"{BLANK}+ { + g_secType = SectionInfo::Paragraph; + BEGIN(St_SecLabel2); + } +. +\n +{LABELID} { + g_secLabel = yytext; + processSection(); + BEGIN(St_Sections); + } +{LABELID}{BLANK}+ { + g_secLabel = yytext; + g_secLabel = g_secLabel.stripWhiteSpace(); + BEGIN(St_SecTitle); + } +[^\n]*\n { + g_secTitle = yytext; + g_secTitle = g_secTitle.stripWhiteSpace(); + processSection(); + BEGIN(St_Sections); + } + + /* Generic rules that work for all states */ <*>\n { warn(g_fileName,yylineno,"Error: Unexpected new line character"); } @@ -636,11 +755,27 @@ HTMLKEYW {HTMLKEYL}|{HTMLKEYU} //-------------------------------------------------------------------------- +void doctokenizerYYFindSections(const char *input,PageInfo *pi,Definition *d, + MemberGroup *mg) +{ + if (input==0) return; + g_inputString = input; + //printf("parsing --->`%s'<---\n",input); + g_inputPos = 0; + g_pageInfo = pi; + g_definition = d; + g_memberGroup = mg; + BEGIN(St_Sections); + doctokenizerYYlineno = 1; + doctokenizerYYlex(); +} + void doctokenizerYYinit(const char *input,const char *fileName) { g_inputString = input; - g_inputPos = 0; - g_fileName = fileName; + g_inputPos = 0; + g_fileName = fileName; + g_insidePre = FALSE; BEGIN(St_Para); } @@ -718,11 +853,21 @@ void doctokenizerYYsetStateText() BEGIN(St_Text); } +void doctokenizerYYsetStateSkipTitle() +{ + BEGIN(St_SkipTitle); +} + void doctokenizerYYcleanup() { yy_delete_buffer( YY_CURRENT_BUFFER ); } +void doctokenizerYYsetInsidePre(bool b) +{ + g_insidePre = b; +} + extern "C" { // some bogus code to keep the compiler happy void doctokenizerYYdummy() { yy_flex_realloc(0,0); } } diff --git a/src/doxygen.cpp b/src/doxygen.cpp index e32300c..a0476f4 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -1149,7 +1149,7 @@ static MemberDef *addVariableToClass( /*const QCString &scope,*/ const QCString &name, bool fromAnnScope, - int indentDepth, + /*int indentDepth,*/ MemberDef *fromAnnMemb, Protection prot) { @@ -1236,7 +1236,7 @@ static MemberDef *addVariableToClass( md->addSectionsToDefinition(root->anchors); md->setFromAnonymousScope(fromAnnScope); md->setFromAnonymousMember(fromAnnMemb); - md->setIndentDepth(indentDepth); + //md->setIndentDepth(indentDepth); md->setBodySegment(root->bodyLine,root->endBodyLine); md->setInitializer(root->initializer); md->setMaxInitLines(root->initLines); @@ -1284,7 +1284,7 @@ static MemberDef *addVariableToFile( const QCString &scope, const QCString &name, bool fromAnnScope, - int indentDepth, + /*int indentDepth,*/ MemberDef *fromAnnMemb) { Debug::print(Debug::Variables,0, @@ -1403,7 +1403,7 @@ static MemberDef *addVariableToFile( md->addSectionsToDefinition(root->anchors); md->setFromAnonymousScope(fromAnnScope); md->setFromAnonymousMember(fromAnnMemb); - md->setIndentDepth(indentDepth); + //md->setIndentDepth(indentDepth); md->setBodySegment(root->bodyLine,root->endBodyLine); md->setInitializer(root->initializer); md->setMaxInitLines(root->initLines); @@ -1661,7 +1661,7 @@ void buildVarList(Entry *root) if (cd) { addVariableToClass(root,cd,MemberDef::Friend,/*scope,*/ - root->name,FALSE,0,0,Public); + root->name,FALSE,/*0,*/0,Public); } } goto nextMember; @@ -1693,44 +1693,51 @@ void buildVarList(Entry *root) scope=classScope; if (!scope.isEmpty() && !name.isEmpty() && (cd=getClass(scope))) { + // TODO: clean up this mess! MemberDef *md=0; // if cd is an annonymous scope we insert the member // into a non-annonymous scope as well. - int indentDepth=0; + //int indentDepth=0; int si=scope.find('@'); + //int anonyScopes = 0; + bool added=FALSE; if (si!=-1) { - //printf("name=`%s' scope=%s\n",name.data(),scope.data()); QCString pScope; ClassDef *pcd=0; pScope = scope.left(QMAX(si-2,0)); - indentDepth = scope.right(scope.length()-si).contains("::")+1; if (!pScope.isEmpty()) pScope.prepend(annScopePrefix); else if (annScopePrefix.length()>2) pScope=annScopePrefix.left(annScopePrefix.length()-2); - //printf("pScope=`%s'\n",pScope.data()); if (name.at(0)!='@') { if (!pScope.isEmpty() && (pcd=getClass(pScope))) { //Protection p = (Protection)QMAX((int)root->protection,(int)cd->protection()); - md=addVariableToClass(root,pcd,mtype,/*pScope,*/name,TRUE,indentDepth,0,root->protection); + md=addVariableToClass(root,pcd,mtype,name, + TRUE,0,root->protection); + added=TRUE; } else // annonymous scope inside namespace or file => put variable in the global scope { - //printf("Inserting member in global scope %s!\n",pScope.data()); - //md=addVariableToFile(root,mtype,pScope,name,!pScope.isEmpty(),indentDepth,0); - md=addVariableToFile(root,mtype,pScope,name,TRUE,indentDepth,0); + md=addVariableToFile(root,mtype,pScope,name,TRUE,0); + added=TRUE; } } - } - addVariableToClass(root,cd,mtype,/*scope,*/name,FALSE,indentDepth,md,root->protection); + } + //printf("name=`%s' scope=%s scope.right=%s indentDepth=%d anonyScopes=%d\n", + // name.data(),scope.data(), + // scope.right(scope.length()-si).data(), + // indentDepth, + // anonyScopes); + addVariableToClass(root,cd,mtype,name, + FALSE,md,root->protection); } else if (!name.isEmpty()) // global variable { //printf("Inserting member in global scope %s!\n",scope.data()); - addVariableToFile(root,mtype,scope,name,FALSE,0,0); + addVariableToFile(root,mtype,scope,name,FALSE,/*0,*/0); } //if (mtype==MemberDef::Typedef) //{ @@ -5719,6 +5726,53 @@ static void distributeMemberGroupDocumentation() //---------------------------------------------------------------------------- +static void findSectionsInDocumentation() +{ + // for each class + ClassSDict::Iterator cli(Doxygen::classSDict); + ClassDef *cd; + for ( ; (cd=cli.current()) ; ++cli ) + { + cd->findSectionsInDocumentation(); + } + // for each file + FileName *fn=Doxygen::inputNameList.first(); + while (fn) + { + FileDef *fd=fn->first(); + while (fd) + { + fd->findSectionsInDocumentation(); + fd=fn->next(); + } + fn=Doxygen::inputNameList.next(); + } + // for each namespace + NamespaceSDict::Iterator nli(Doxygen::namespaceSDict); + NamespaceDef *nd; + for ( ; (nd=nli.current()) ; ++nli ) + { + nd->findSectionsInDocumentation(); + } + // for each group + GroupSDict::Iterator gli(Doxygen::groupSDict); + GroupDef *gd; + for (gli.toFirst();(gd=gli.current());++gli) + { + gd->findSectionsInDocumentation(); + } + // for each page + PageSDict::Iterator pdi(*Doxygen::pageSDict); + PageInfo *pi=0; + for (pdi.toFirst();(pi=pdi.current());++pdi) + { + pi->findSectionsInDocumentation(); + } + if (Doxygen::mainPage) Doxygen::mainPage->findSectionsInDocumentation(); +} + +//---------------------------------------------------------------------------- + static void findDefineDocumentation(Entry *root) { if ((root->section==Entry::DEFINEDOC_SEC || @@ -5896,8 +5950,10 @@ static void findMainPage(Entry *root) // a page name is a label as well! SectionInfo *si=new SectionInfo( - Doxygen::mainPage->name,Doxygen::mainPage->title,SectionInfo::Section); - si->fileName=indexName; + indexName, + Doxygen::mainPage->name, + Doxygen::mainPage->title, + SectionInfo::Section); Doxygen::sectionDict.insert(indexName,si); } else @@ -7700,8 +7756,10 @@ void parseInput() msg("Adding source references...\n"); addSourceReferences(); + msg("Adding todo/test/bug list items...\n"); addListReferences(); + } void generateOutput() @@ -7775,6 +7833,9 @@ void generateOutput() msg("Resolving user defined references...\n"); resolveUserReferences(); + msg("Finding anchor and section in the documentation...\n"); + findSectionsInDocumentation(); + msg("Generating index page...\n"); writeIndex(*outputList); diff --git a/src/filedef.cpp b/src/filedef.cpp index e2e6be0..00f8f2c 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -29,6 +29,7 @@ #include "dot.h" #include "message.h" #include "code.h" +#include "docparser.h" //#include "xml.h" /*! create a new file definition, where \a p is the file path, @@ -97,6 +98,23 @@ void FileDef::distributeMemberGroupDocumentation() } } +void FileDef::findSectionsInDocumentation() +{ + docFindSections(documentation(),0,this,0); + MemberGroupSDict::Iterator mgli(*memberGroupSDict); + MemberGroup *mg; + for (;(mg=mgli.current());++mgli) + { + mg->findSectionsInDocumentation(); + } + decDefineMembers.findSectionsInDocumentation(); + decProtoMembers.findSectionsInDocumentation(); + decTypedefMembers.findSectionsInDocumentation(); + decEnumMembers.findSectionsInDocumentation(); + decFuncMembers.findSectionsInDocumentation(); + decVarMembers.findSectionsInDocumentation(); +} + void FileDef::writeDetailedDocumentation(OutputList &ol) { if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) || @@ -369,7 +387,7 @@ void FileDef::writeDocumentation(OutputList &ol) ol.docify(nd->displayName()); ol.endBold(); } - ol.endMemberItem(FALSE); + ol.endMemberItem(); } } if (found) ol.endMemberList(); diff --git a/src/filedef.h b/src/filedef.h index acd39ed..d49cd8f 100644 --- a/src/filedef.h +++ b/src/filedef.h @@ -145,6 +145,7 @@ class FileDef : public Definition void addMembersToMemberGroup(); void distributeMemberGroupDocumentation(); + void findSectionsInDocumentation(); void addListReferences(); diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 804d948..bd527c9 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -104,6 +104,23 @@ void GroupDef::distributeMemberGroupDocumentation() } } +void GroupDef::findSectionsInDocumentation() +{ + docFindSections(documentation(),0,this,0); + MemberGroupSDict::Iterator mgli(*memberGroupSDict); + MemberGroup *mg; + for (;(mg=mgli.current());++mgli) + { + mg->findSectionsInDocumentation(); + } + decDefineMembers.findSectionsInDocumentation(); + decProtoMembers.findSectionsInDocumentation(); + decTypedefMembers.findSectionsInDocumentation(); + decEnumMembers.findSectionsInDocumentation(); + decFuncMembers.findSectionsInDocumentation(); + decVarMembers.findSectionsInDocumentation(); +} + void GroupDef::addFile(const FileDef *def) { if (Config_getBool("SORT_MEMBER_DOCS")) @@ -435,7 +452,7 @@ void GroupDef::writeDocumentation(OutputList &ol) { Doxygen::tagFile << " " << convertToXML(fd->name()) << "" << endl; } - ol.endMemberItem(FALSE); + ol.endMemberItem(); if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { ol.startMemberDescription(); @@ -466,7 +483,7 @@ void GroupDef::writeDocumentation(OutputList &ol) { Doxygen::tagFile << " " << convertToXML(nd->name()) << "" << endl; } - ol.endMemberItem(FALSE); + ol.endMemberItem(); if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { ol.startMemberDescription(); @@ -496,7 +513,7 @@ void GroupDef::writeDocumentation(OutputList &ol) { Doxygen::tagFile << " " << convertToXML(gd->name()) << "" << endl; } - ol.endMemberItem(FALSE); + ol.endMemberItem(); if (!gd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { ol.startMemberDescription(); diff --git a/src/groupdef.h b/src/groupdef.h index 60dcba3..9246c9f 100644 --- a/src/groupdef.h +++ b/src/groupdef.h @@ -74,6 +74,7 @@ class GroupDef : public Definition void addMembersToMemberGroup(); void distributeMemberGroupDocumentation(); + void findSectionsInDocumentation(); void addListReferences(); diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index 982dc39..6d127c6 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -110,7 +110,9 @@ void HtmlDocVisitor::visit(DocSymbol *s) void HtmlDocVisitor::visit(DocURL *u) { if (m_hide) return; - m_t << "url() << "\">"; + m_t << "isEmail()) m_t << "mailto:"; + m_t << u->url() << "\">"; filter(u->url()); m_t << ""; } @@ -156,7 +158,7 @@ void HtmlDocVisitor::visit(DocStyleChange *s) case DocStyleChange::Preformatted: if (s->enable()) { - m_t << "attribs()) << ">\n"; + m_t << "attribs()) << ">"; m_insidePre=TRUE; } else diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 02f2b91..7b24074 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -766,7 +766,7 @@ void HtmlGenerator::startMemberItem(int annoType) } } -void HtmlGenerator::endMemberItem(bool) +void HtmlGenerator::endMemberItem() { //DBG_HTML(t << "" << endl) if (Config_getBool("HTML_ALIGN_MEMBERS")) diff --git a/src/htmlgen.h b/src/htmlgen.h index 5f8c13c..9e29d89 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -94,7 +94,10 @@ class HtmlGenerator : public OutputGenerator void endMemberSubtitle(); void startMemberList(); void endMemberList(); + void startAnonTypeScope(int) {} + void endAnonTypeScope(int) {} void startMemberItem(int); + void endMemberItem(); void startMemberGroupHeader(bool); void endMemberGroupHeader(); @@ -104,7 +107,6 @@ class HtmlGenerator : public OutputGenerator void endMemberGroup(bool); void insertMemberAlign(); - void endMemberItem(bool); void startMemberDescription(); void endMemberDescription(); diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index e226168..38e335b 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -158,7 +158,9 @@ void LatexDocVisitor::visit(DocURL *u) if (m_hide) return; if (Config_getBool("PDF_HYPERLINKS")) { - m_t << "\\href{" << u->url() << "}"; + m_t << "\\href{"; + if (u->isEmail()) m_t << "mailto:"; + m_t << u->url() << "}"; } m_t << "{\\tt "; filter(u->url()); diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 09ecae4..f95c174 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -1238,59 +1238,6 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType) t << "}\\label{" << lab << "}" << endl; } -//void LatexGenerator::writeSectionRef(const char *ref,const char *, -// const char *lab,const char *text) -//{ -// if (ref) // external reference -// { -// docify(text); -// } -// else // local reference -// { -// if (text && Config_getBool("PDF_HYPERLINKS")) -// { -// t << "\\hyperlink{"; -// if (lab) t << lab; -// t << "}{"; -// docify(text); -// t << "}"; -// //t << " {\\rm (p.\\,\\pageref{" << lab << "})}"; -// } -// else -// { -// if (strcmp(lab,text)!=0) // lab!=text -// { -// // todo: don't hardcode p. here! -// t << "{\\bf "; -// docify(text); -// t << "} {\\rm (p.\\,\\pageref{" << lab << "})}"; -// } -// else -// { -// t << "\\ref{" << lab << "}"; -// } -// } -// } -//} -// -//void LatexGenerator::writeSectionRefItem(const char *,const char *lab, -// const char *title) -//{ -// t << "\\item \\contentsline{section}{"; -// docify(title); -// t << "}{\\ref{" << lab << "}}{}" << endl; -//} -// -// TODO: remove this function -//void LatexGenerator::writeSectionRefAnchor(const char *,const char *lab, -// const char *title) -//{ -// startBold(); -// docify(title); -// endBold(); -// t << " (p.\\,\\pageref{" << lab << "})" << endl; -//} - //void LatexGenerator::docifyStatic(QTextStream &t,const char *str) void LatexGenerator::docify(const char *str) @@ -1364,42 +1311,42 @@ void LatexGenerator::endClassDiagram(ClassDiagram &d, d.writeFigure(t,dir,fileName); } -//void LatexGenerator::writeFormula(const char *,const char *text) -//{ -// t << text; -//} -void LatexGenerator::startMemberItem(int annType) -{ - if (!insideTabbing) +void LatexGenerator::startAnonTypeScope(int indent) +{ + if (indent==0) { - t << "\\item " << endl; - switch(annType) - { - case 0: break; - case 1: - default: - t << "\\begin{tabbing}" << endl; - t << "xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=\\kill" << endl; - //printf("LatexGenerator::startMemberItem() insideTabbing=TRUE\n"); - insideTabbing=TRUE; - break; - } + t << "\\begin{tabbing}" << endl; + t << "xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=\\kill" << endl; + //printf("LatexGenerator::startMemberItem() insideTabbing=TRUE\n"); + insideTabbing=TRUE; } } -void LatexGenerator::endMemberItem(bool endItem) +void LatexGenerator::endAnonTypeScope(int indent) { - if (insideTabbing && endItem) + if (indent==0) { t << endl << "\\end{tabbing}"; - //printf("LatexGenerator::endMemberItem() insideTabbing=FALSE\n"); insideTabbing=FALSE; } +} + +void LatexGenerator::startMemberItem(int) +{ + //printf("LatexGenerator::startMemberItem(%d)\n",annType); + if (!insideTabbing) + { + t << "\\item " << endl; + } +} + +void LatexGenerator::endMemberItem() +{ if (insideTabbing) { t << "\\\\"; - } + } t << endl; } @@ -1414,95 +1361,20 @@ void LatexGenerator::writeNonBreakableSpace(int) void LatexGenerator::startMemberList() { if (!insideTabbing) + { t << "\\begin{CompactItemize}" << endl; + } } void LatexGenerator::endMemberList() { + //printf("LatexGenerator::endMemberList(%d)\n",insideTabbing); if (!insideTabbing) + { t << "\\end{CompactItemize}" << endl; + } } -//void LatexGenerator::startImage(const char *name,const char *size,bool hasCaption) -//{ -// if (hasCaption) -// { -// t << "\\begin{figure}[H]" << endl; -// t << "\\begin{center}" << endl; -// } -// else -// { -// t << "\\mbox{"; -// } -// QCString gfxName = name; -// if (gfxName.right(4)==".eps") gfxName.left(gfxName.length()-4); -// // "\\epsfig{file=" << name; -// t << "\\includegraphics"; -// if (size) t << "[" << size << "]"; -// t << "{" << gfxName << "}"; -// if (hasCaption) -// { -// t << "\\caption{"; -// } -// else -// { -// t << "}" << endl; -// } -//} -// -//void LatexGenerator::endImage(bool hasCaption) -//{ -// if (hasCaption) -// { -// t << "}" << endl; -// t << "\\end{center}" << endl; -// t << "\\end{figure}" << endl; -// } -//} -// -//void LatexGenerator::startDotFile(const char *name,bool hasCaption) -//{ -// QCString baseName=name; -// int i; -// if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1) -// { -// baseName=baseName.right(baseName.length()-i-1); -// } -// QCString outDir = Config_getString("LATEX_OUTPUT"); -// writeDotGraphFromFile(name,outDir,baseName,EPS); -// if (hasCaption) -// { -// t << "\\begin{figure}[H]" << endl; -// t << "\\begin{center}" << endl; -// } -// else -// t << "\\mbox{"; -// t << "\\includegraphics"; -// if( Config_getBool("USE_PDFLATEX") ) -// { -// t << "{" << baseName << ".pdf}"; -// } -// else -// { -// t << "{" << baseName << ".eps}"; -// } -// -// if (hasCaption) -// t << "\\caption{"; -// else -// t << "}" << endl; -//} -// -//void LatexGenerator::endDotFile(bool hasCaption) -//{ -// if (hasCaption) -// { -// t << "}" << endl; -// t << "\\end{center}" << endl; -// t << "\\end{figure}" << endl; -// } -//} -// void LatexGenerator::startMemberGroupHeader(bool hasHeader) { @@ -1615,19 +1487,6 @@ void LatexGenerator::endParamList() t << "\\end{Desc}" << endl; } -//void LatexGenerator::startSectionRefList() -//{ -// t << "\\footnotesize" << endl; -// t << "\\begin{multicols}{2}" << endl; -// t << "\\begin{CompactList}" << endl; -//} - -//void LatexGenerator::endSectionRefList() -//{ -// t << "\\end{CompactList}" << endl; -// t << "\\end{multicols}" << endl; -// t << "\\normalsize" << endl; -//} void LatexGenerator::printDoc(DocNode *n) { diff --git a/src/latexgen.h b/src/latexgen.h index e03177b..7227daf 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -102,8 +102,10 @@ class LatexGenerator : public OutputGenerator void endMemberSubtitle() {} void startMemberList(); void endMemberList(); + void startAnonTypeScope(int); + void endAnonTypeScope(int); void startMemberItem(int); - void endMemberItem(bool); + void endMemberItem(); void startMemberGroupHeader(bool); void endMemberGroupHeader(); diff --git a/src/mangen.cpp b/src/mangen.cpp index 06f0204..d6df66d 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -473,21 +473,32 @@ void ManGenerator::endDescItem() firstCol=TRUE; } -void ManGenerator::startMemberItem(int annType) +void ManGenerator::startAnonTypeScope(int indentLevel) +{ + if (indentLevel==0) + { + insideTabbing=TRUE; + } +} + +void ManGenerator::endAnonTypeScope(int indentLevel) +{ + if (indentLevel==0) + { + insideTabbing=FALSE; + } +} + + +void ManGenerator::startMemberItem(int) { if (firstCol && !insideTabbing) t << ".in +1c\n"; t << "\n.ti -1c\n.RI \""; firstCol=FALSE; - if (annType!=0) insideTabbing=TRUE; } -void ManGenerator::endMemberItem(bool endItem) +void ManGenerator::endMemberItem() { - if (endItem) - { - insideTabbing=FALSE; - t << "\"\n.br\n.RI \""; - } t << "\"\n.br"; } @@ -619,5 +630,6 @@ void ManGenerator::printDoc(DocNode *n) ManDocVisitor *visitor = new ManDocVisitor(t,*this); n->accept(visitor); delete visitor; + firstCol=FALSE; } diff --git a/src/mangen.h b/src/mangen.h index 12af60b..9c91102 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -100,8 +100,10 @@ class ManGenerator : public OutputGenerator void writeListItem(); void startMemberList(); void endMemberList(); + void startAnonTypeScope(int); + void endAnonTypeScope(int); void startMemberItem(int); - void endMemberItem(bool); + void endMemberItem(); void startMemberGroupHeader(bool); void endMemberGroupHeader(); diff --git a/src/memberdef.cpp b/src/memberdef.cpp index cc8e0f2..4450a8f 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -30,8 +30,14 @@ #include "membergroup.h" #include "groupdef.h" #include "defargs.h" +#include "docparser.h" //#include "xml.h" + +//----------------------------------------------------------------------------- + +int MemberDef::s_indentLevel = 0; + //----------------------------------------------------------------------------- static QCString addTemplateNames(const QCString &s,const QCString &n,const QCString &t) @@ -307,7 +313,7 @@ MemberDef::MemberDef(const char *df,int dl, annUsed=FALSE; annShown=FALSE; annEnumType=0; - indDepth=0; + //indDepth=0; section=0; bodyMemb=0; explExt=FALSE; @@ -560,9 +566,11 @@ bool MemberDef::isBriefSectionVisible() const // 0,"", //grpId,grpId==-1?"":Doxygen::memberDocDict[grpId]->data(), // "", //getFileDef()->name().data(), // argsString()); + + QCString *pMemGrp = Doxygen::memberDocDict[grpId]; bool hasDocs = hasDocumentation() || // part of a documented member group - (grpId!=-1 && !Doxygen::memberDocDict[grpId]->isEmpty()); + (grpId!=-1 && pMemGrp && !pMemGrp->isEmpty()); // only include static members with file/namespace scope if // explicitly enabled in the config file @@ -636,6 +644,7 @@ bool MemberDef::isBriefSectionVisible() const return visible; } + void MemberDef::writeDeclaration(OutputList &ol, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd, bool inGroup @@ -705,6 +714,7 @@ void MemberDef::writeDeclaration(OutputList &ol, ClassDef *annoClassDef=getClassDefOfAnonymousType(); // start a new member declaration + ///printf("startMemberItem for %s\n",name().data()); ol.startMemberItem((annoClassDef || annMemb || annEnumType) ? 1 : 0); // If there is no detailed description we need to write the anchor here. @@ -728,11 +738,10 @@ void MemberDef::writeDeclaration(OutputList &ol, ol.popGeneratorState(); } - //printf("member name=%s indDepth=%d\n",name().data(),indDepth); if (annoClassDef || annMemb) { int j; - for (j=0;jwriteDeclaration(ol,annMemb,inGroup); + //printf(">>>>>>>>>>>>>> startMemberItem(2)\n"); ol.startMemberItem(2); int j; - for (j=0;j #include +#include #include "entry.h" #include "definition.h" @@ -221,8 +222,8 @@ class MemberDef : public Definition void setFromAnonymousMember(MemberDef *m) { annMemb=m; } bool fromAnonymousScope() const { return annScope; } bool anonymousDeclShown() const { return annUsed; } - void setIndentDepth( int i) { indDepth=i; } - int indentDepth() { return indDepth; } + //void setIndentDepth( int i) { indDepth=i; } + //int indentDepth() { return indDepth; } bool visibleMemberGroup(bool hideNoHeader); MemberDef *templateMaster() const { return m_templateMaster; } @@ -251,6 +252,7 @@ class MemberDef : public Definition void writeEnumDeclaration(OutputList &typeDecl, ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd); + void findSectionsInDocumentation(); bool visited; @@ -290,7 +292,7 @@ class MemberDef : public Definition bool annScope; // member is part of an annoymous scope bool annUsed; bool annShown; - int indDepth; // indentation depth for this member if inside an annonymous scope + //int indDepth; // indentation depth for this member if inside an annonymous scope int maxInitLines; // when the initializer will be displayed int userInitLines; // result of explicit \hideinitializer or \showinitializer MemberList *section; // declation list containing this member @@ -323,6 +325,7 @@ class MemberDef : public Definition // disable copying of member defs MemberDef(const MemberDef &); MemberDef &operator=(const MemberDef &); + static int s_indentLevel; }; #endif diff --git a/src/membergroup.cpp b/src/membergroup.cpp index 9bb5f17..537d55d 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -27,6 +27,7 @@ #include "scanner.h" #include "groupdef.h" #include "doxygen.h" +#include "docparser.h" //static QCString idToName(int id) //{ @@ -35,17 +36,19 @@ // return result; //} -MemberGroup::MemberGroup(int id,const char *hdr,const char *d) /* : Definition(idToName(id)) */ +MemberGroup::MemberGroup(Definition *parent, + int id,const char *hdr,const char *d) /* : Definition(idToName(id)) */ { //printf("New member group id=%d header=%s desc=%s\n",id,hdr,d); - memberList = new MemberList; - grpId = id; - grpHeader = hdr; - doc = d; - scope = 0; - inSameSection = TRUE; - inDeclSection = 0; + memberList = new MemberList; + grpId = id; + grpHeader = hdr; + doc = d; + scope = 0; + inSameSection = TRUE; + inDeclSection = 0; m_numDecMembers = -1; + m_parent = parent; //printf("Member group docs=`%s'\n",doc.data()); } @@ -210,3 +213,10 @@ void MemberGroup::addListReferences(Definition *def) { memberList->addListReferences(def); } + +void MemberGroup::findSectionsInDocumentation() +{ + docFindSections(doc,0,0,this); + memberList->findSectionsInDocumentation(); +} + diff --git a/src/membergroup.h b/src/membergroup.h index ee15dea..d5f543e 100644 --- a/src/membergroup.h +++ b/src/membergroup.h @@ -36,7 +36,7 @@ class Definition; class MemberGroup { public: - MemberGroup(int id,const char *header,const char *docs); + MemberGroup(Definition *parent,int id,const char *header,const char *docs); ~MemberGroup(); QCString header() const { return grpHeader; } int groupId() const { return grpId; } @@ -54,6 +54,7 @@ class MemberGroup void addToDeclarationSection(); int countDecMembers(/*bool sectionPerType*/); void distributeMemberGroupDocumentation(); + void findSectionsInDocumentation(); int varCount() const; int funcCount() const; int enumCount() const; @@ -67,6 +68,7 @@ class MemberGroup void setInGroup(bool b); void addListReferences(Definition *d); MemberList *members() const { return memberList; } + Definition *parent() const { return m_parent; } private: MemberList *memberList; // list of all members in the group @@ -78,6 +80,7 @@ class MemberGroup MemberList *inDeclSection; bool inSameSection; int m_numDecMembers; + Definition *m_parent; }; class MemberGroupList : public QList diff --git a/src/memberlist.cpp b/src/memberlist.cpp index 8f748a0..f694159 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -344,7 +344,7 @@ void MemberList::writePlainDeclarations(OutputList &ol, ol.insertMemberAlign(); //ol+=typeDecl; // append the enum values. md->writeEnumDeclaration(ol,cd,nd,fd,gd); - ol.endMemberItem(FALSE); + ol.endMemberItem(); if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { ol.startMemberDescription(); @@ -537,6 +537,25 @@ void MemberList::addListReferences(Definition *def) } } +void MemberList::findSectionsInDocumentation() +{ + MemberListIterator mli(*this); + MemberDef *md; + for ( ; (md=mli.current()) ; ++mli) + { + md->findSectionsInDocumentation(); + } + if (memberGroupList) + { + MemberGroupListIterator mgli(*memberGroupList); + MemberGroup *mg; + for (;(mg=mgli.current());++mgli) + { + mg->findSectionsInDocumentation(); + } + } +} + //-------------------------------------------------------------------------- int MemberSDict::compareItems(GCI item1, GCI item2) diff --git a/src/memberlist.h b/src/memberlist.h index dc93cc7..8dba41b 100644 --- a/src/memberlist.h +++ b/src/memberlist.h @@ -57,6 +57,7 @@ class MemberList : public QList void addMemberGroup(MemberGroup *mg); void setInGroup(bool group) { m_inGroup=group; } void addListReferences(Definition *def); + void findSectionsInDocumentation(); private: int m_varCnt,m_funcCnt,m_enumCnt,m_enumValCnt,m_typeCnt; diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index b0842f5..cac8dc9 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -25,6 +25,7 @@ #include "memberlist.h" #include "doxygen.h" #include "message.h" +#include "docparser.h" NamespaceDef::NamespaceDef(const char *df,int dl, const char *name,const char *lref) : @@ -61,6 +62,24 @@ void NamespaceDef::distributeMemberGroupDocumentation() mg->distributeMemberGroupDocumentation(); } } + +void NamespaceDef::findSectionsInDocumentation() +{ + docFindSections(documentation(),0,this,0); + MemberGroupSDict::Iterator mgli(*memberGroupSDict); + MemberGroup *mg; + for (;(mg=mgli.current());++mgli) + { + mg->findSectionsInDocumentation(); + } + decDefineMembers.findSectionsInDocumentation(); + decProtoMembers.findSectionsInDocumentation(); + decTypedefMembers.findSectionsInDocumentation(); + decEnumMembers.findSectionsInDocumentation(); + decFuncMembers.findSectionsInDocumentation(); + decVarMembers.findSectionsInDocumentation(); +} + void NamespaceDef::insertUsedFile(const char *f) { if (files.find(f)==-1) diff --git a/src/namespacedef.h b/src/namespacedef.h index 825242e..37c1e9b 100644 --- a/src/namespacedef.h +++ b/src/namespacedef.h @@ -72,6 +72,7 @@ class NamespaceDef : public Definition } void addMembersToMemberGroup(); void distributeMemberGroupDocumentation(); + void findSectionsInDocumentation(); virtual Definition *findInnerCompound(const char *name); void addInnerCompound(Definition *d); diff --git a/src/outputgen.h b/src/outputgen.h index f25bd8b..037eafc 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -302,8 +302,10 @@ class OutputGenerator : public BaseOutputDocInterface virtual void endMemberSubtitle() = 0; virtual void startMemberList() = 0; virtual void endMemberList() = 0; + virtual void startAnonTypeScope(int) = 0; + virtual void endAnonTypeScope(int) = 0; virtual void startMemberItem(int) = 0; - virtual void endMemberItem(bool) = 0; + virtual void endMemberItem() = 0; virtual void startMemberGroupHeader(bool) = 0; virtual void endMemberGroupHeader() = 0; virtual void startMemberGroupDocs() = 0; diff --git a/src/outputlist.h b/src/outputlist.h index fc49f1e..bd47bbe 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -161,10 +161,14 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::startMemberList); } void endMemberList() { forall(&OutputGenerator::endMemberList); } + void startAnonTypeScope(int i1) + { forall(&OutputGenerator::startAnonTypeScope,i1); } + void endAnonTypeScope(int i1) + { forall(&OutputGenerator::endAnonTypeScope,i1); } void startMemberItem(int i1) { forall(&OutputGenerator::startMemberItem,i1); } - void endMemberItem(bool b2) - { forall(&OutputGenerator::endMemberItem,b2); } + void endMemberItem() + { forall(&OutputGenerator::endMemberItem); } void startMemberGroupHeader(bool b) { forall(&OutputGenerator::startMemberGroupHeader,b); } void endMemberGroupHeader() diff --git a/src/page.h b/src/page.h index 331fbc7..8df76cf 100644 --- a/src/page.h +++ b/src/page.h @@ -17,8 +17,10 @@ #include "sortdict.h" #include "config.h" +#include "docparser.h" #include "section.h" +#include "doxygen.h" class PageInfo { @@ -76,6 +78,10 @@ class PageInfo } } } + void findSectionsInDocumentation() + { + docFindSections(doc,this,0,0); + } void writeDocAnchorsToTagFile() { diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index a11e857..1b975c8 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -202,6 +202,7 @@ void RTFDocVisitor::visit(DocURL *u) m_t << "{\\field " "{\\*\\fldinst " "{ HYPERLINK \\\\l \""; + if (u->isEmail()) m_t << "mailto:"; m_t << u->url(); m_t << "\" }" "{}"; diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 7965c9c..d76d817 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -1722,7 +1722,7 @@ void RTFGenerator::startMemberItem(int) t << rtf_Style_Reset << rtf_BList_DepthStyle() << endl; // set style to apropriate depth } -void RTFGenerator::endMemberItem(bool) +void RTFGenerator::endMemberItem() { DBG_RTF(t <<"{\\comment endMemberItem }" << endl) newParagraph(); diff --git a/src/rtfgen.h b/src/rtfgen.h index 45ec1de..751622b 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -103,8 +103,10 @@ class RTFGenerator : public OutputGenerator void endMemberSubtitle(); void startMemberList(); void endMemberList(); + void startAnonTypeScope(int) {} + void endAnonTypeScope(int) {} void startMemberItem(int); - void endMemberItem(bool); + void endMemberItem(); //void memberGroupSpacing(bool) {} //void memberGroupSeparator() {} void insertMemberAlign() {} diff --git a/src/scanner.l b/src/scanner.l index 67ec602..a346085 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -111,8 +111,8 @@ static char afterDocTerminator; static int tmpDocType; static QCString sectionLabel; static QCString sectionTitle; -static SectionInfo::SectionType - sectionType; +//static SectionInfo::SectionType +// sectionType; static QCString funcPtrType; static QCString templateStr; static QCString aliasName; @@ -279,6 +279,7 @@ static void newDocState(); //----------------------------------------------------------------- +#if 0 static void addSection() { //printf("New section pageName=%s label=%s title=%s\n", @@ -292,8 +293,7 @@ static void addSection() if (sectionLabel.isEmpty()) return; if (Doxygen::sectionDict.find(sectionLabel)==0) { - SectionInfo *si=new SectionInfo(sectionLabel,sectionTitle,sectionType); - si->fileName = current->name; + SectionInfo *si=new SectionInfo(current->name,sectionLabel,sectionTitle,sectionType); //printf("Adding section addr=%p label=`%s' sectionTitle=`%s' fileName=%s\n",si,sectionLabel.data(),sectionTitle.data(),si->fileName.data()); Doxygen::sectionDict.insert(sectionLabel,si); current->anchors->append(new QCString(sectionLabel)); @@ -305,6 +305,61 @@ static void addSection() } sectionTitle.resize(0); } +#endif + +static void addSpecialItem(const char *listName) +{ + ListItemInfo *lii=0; + RefList *refList = Doxygen::specialLists->find(listName); + ASSERT(refList!=0); + if (current->sli) + { + QListIterator 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 += "

        "; + item->text += current->brief; + //printf("%s: text +=%s\n",listName,item->text.data()); + } + else // new item + { + int itemId = refList->addRefItem(); + char anchorLabel[1024]; + sprintf(anchorLabel,"_%s%06d",listName,itemId); + RefItem *item = refList->getRefItem(itemId); + ASSERT(item!=0); + item->text = current->brief.copy(); + item->listAnchor = anchorLabel; + current->addSpecialListItem(listName,itemId); + QCString cmdString; + cmdString.sprintf("\\%s %d\n",listName,itemId); + current->doc += cmdString; + //current->doc += (QCString)"\\anchor "+anchorLabel+"\n"; + + SectionInfo *si=new SectionInfo(listName,anchorLabel, + sectionTitle,SectionInfo::Anchor); + Doxygen::sectionDict.insert(anchorLabel,si); + current->anchors->append(new QCString(anchorLabel)); + + //QCString tmpName = current->name; + //current->name = listName; + //sectionType=SectionInfo::Anchor; + //sectionLabel=anchorLabel; + //addSection(); + //current->name = tmpName; + //printf("%s: text %s doc %s\n",listName,item->text.data(),cmdString.data()); + } + current->brief = slString.copy(); // restore orginial brief desc. +} + +//----------------------------------------------------------------------------- // Adds a formula text to the list/dictionary of formulas if it was // not already added. Returns the label of the formula. @@ -434,52 +489,6 @@ static void prependScope() } } -//----------------------------------------------------------------------------- - -static void addSpecialItem(const char *listName) -{ - ListItemInfo *lii=0; - RefList *refList = Doxygen::specialLists->find(listName); - ASSERT(refList!=0); - if (current->sli) - { - QListIterator 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 += "

        "; - item->text += current->brief; - //printf("%s: text +=%s\n",listName,item->text.data()); - } - else // new item - { - int itemId = refList->addRefItem(); - char anchorLabel[1024]; - sprintf(anchorLabel,"_%s%06d",listName,itemId); - RefItem *item = refList->getRefItem(itemId); - ASSERT(item!=0); - item->text = current->brief.copy(); - item->listAnchor = anchorLabel; - current->addSpecialListItem(listName,itemId); - QCString cmdString; - cmdString.sprintf("\\%s %d\n",listName,itemId); - current->doc += cmdString; - QCString tmpName = current->name; - current->name = listName; - sectionType=SectionInfo::Anchor; - sectionLabel=anchorLabel; - addSection(); - current->name = tmpName; - //printf("%s: text %s doc %s\n",listName,item->text.data(),cmdString.data()); - } - current->brief = slString.copy(); // restore orginial brief desc. -} /* ----------------------------------------------------------------- */ #undef YY_INPUT #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); @@ -953,7 +962,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) } {B}*((("disp")?"interface")|"valuetype"){BN}+ { // M$/Corba IDL interface lineCount(); - if (insideIDL) + if (insideIDL || insideJava) { isTypedef=FALSE; current->section = Entry::INTERFACE_SEC; @@ -1948,6 +1957,20 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) initEntry(); BEGIN(MemberSpecSkip); } +";" { /* 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 ) ; + } ([*&]*{BN}*)*{ID}("["[a-z_A-Z0-9]*"]")* { // the [] part could be improved. lineCount(); int i=0,l=yyleng,j; @@ -1963,6 +1986,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) msType = yytext; msType=msType.left(i); } [,;] { + //printf("current->name=`%s' msName=`%s'\n",current->name.data(),msName.data()); if (msName.isEmpty() && !current->name.isEmpty()) /* && (current->section & Entry::COMPOUND_MASK)) */ { @@ -2044,7 +2068,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) initEntry(); BEGIN( FindMembers ); } - } + } "=" { lastInitializerContext=YY_START; initializerSharpCount=0; @@ -2607,6 +2631,17 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) previous->doc += current->doc; current->doc.resize(0); } + if (current->sli) // copy special list items + { + QListIterator li(*current->sli); + ListItemInfo *lii; + for (li.toFirst();(lii=li.current());++li) + { + previous->addSpecialListItem(lii->type,lii->itemId); + } + delete current->sli; + current->sli = 0; + } previous->endBodyLine=yyLineNr; BEGIN( lastCurlyContext ) ; } @@ -3582,19 +3617,23 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) current->doc+=yytext; } {CMD}"section"{B}+ { - sectionType=SectionInfo::Section; + //sectionType=SectionInfo::Section; + current->doc+=yytext; BEGIN(SectionLabel); } {CMD}"subsection"{B}+ { - sectionType=SectionInfo::Subsection; + //sectionType=SectionInfo::Subsection; + current->doc+=yytext; BEGIN(SectionLabel); } {CMD}"subsubsection"{B}+ { - sectionType=SectionInfo::Subsubsection; + //sectionType=SectionInfo::Subsubsection; + current->doc+=yytext; BEGIN(SectionLabel); } {CMD}"paragraph"{B}+ { - sectionType=SectionInfo::Paragraph; + //sectionType=SectionInfo::Paragraph; + current->doc+=yytext; BEGIN(SectionLabel); } . { memberGroupHeader+=*yytext; } @@ -3629,7 +3668,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) } {CMD}"anchor"{B}+ { lastAnchorContext = YY_START; - sectionType=SectionInfo::Anchor; + //sectionType=SectionInfo::Anchor; + current->doc+=yytext; BEGIN(AnchorLabel); } ("\\\\"|"@@")"verbatim"/[^a-z_A-Z0-9] { @@ -3742,28 +3782,33 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) *pSkipDoc+=*yytext; } {LABELID} { - sectionLabel=yytext; - addSection(); - current->doc += "\\anchor "+sectionLabel+" "; + //sectionLabel=yytext; + //addSection(); + //current->doc += "\\anchor "+sectionLabel+" "; + current->doc+=yytext; BEGIN(lastAnchorContext); } {LABELID} { - sectionLabel=yytext; + //sectionLabel=yytext; sectionTitle.resize(0); + current->doc+=yytext; BEGIN(SectionTitle); } [^\n*]*/"\n" { sectionTitle+=yytext; sectionTitle=sectionTitle.stripWhiteSpace(); - current->doc += "\\section "+sectionLabel+" "; - addSection(); + //current->doc += "\\section "+sectionLabel+" "; + //addSection(); + current->doc+=yytext; BEGIN(PageDoc); } [^\n*]* { sectionTitle+=yytext; + current->doc+=yytext; } "*" { sectionTitle+=yytext; + current->doc+=yytext; } "\n" { yyLineNr++ ; current->doc+=yytext; } [a-z_A-Z0-9 \t]+ { current->doc += yytext; } diff --git a/src/section.h b/src/section.h index b1138b0..8210bfc 100644 --- a/src/section.h +++ b/src/section.h @@ -29,9 +29,15 @@ class PageInfo; struct SectionInfo { - enum SectionType { Page, Section, Subsection, Subsubsection, Paragraph, Anchor }; - SectionInfo(const char *l,const char *t,SectionType st,const char *r=0) - { label=l; title=t; type=st; ref=r; definition=0; pageRef=0; generated=FALSE; } + enum SectionType { Page, Section, Subsection, + Subsubsection, Paragraph, Anchor + }; + SectionInfo(const char *f,const char *l,const char *t, + SectionType st,const char *r=0) + { label=l; title=t; type=st; ref=r; + definition=0; pageRef=0; generated=FALSE; + fileName=f; + } ~SectionInfo() {} QCString label; QCString title; diff --git a/src/tagreader.cpp b/src/tagreader.cpp index 3edb09f..1637044 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -857,36 +857,17 @@ void TagFileParser::addDocAnchors(Entry *e,QStrList &l) while (s) { QCString *anchorName = new QCString(s); - //if (anchorName->left(5)=="_todo") - //{ - // int todoItemId = todoList.addRefItem(); - // char anchorLabel[12]; - // sprintf(anchorLabel,"_todo%06d",todoItemId); - // RefItem *item = todoList.getRefItem(todoItemId); - // item->listAnchor = anchorLabel; - //} - //else if (anchorName->left(5)=="_test") - //{ - // int testItemId = testList.addRefItem(); - // char anchorLabel[12]; - // sprintf(anchorLabel,"_test%06d",testItemId); - // RefItem *item = testList.getRefItem(testItemId); - // item->listAnchor = anchorLabel; - //} - //else - //{ - if (Doxygen::sectionDict.find(*anchorName)==0) - { - SectionInfo *si=new SectionInfo(*anchorName,*anchorName, - SectionInfo::Anchor,m_tagName); - Doxygen::sectionDict.insert(*anchorName,si); - e->anchors->append(anchorName); - } - else - { - err("Duplicate anchor %s found\n",anchorName->data()); - } - //} + if (Doxygen::sectionDict.find(*anchorName)==0) + { + SectionInfo *si=new SectionInfo(e->fileName,*anchorName,*anchorName, + SectionInfo::Anchor,m_tagName); + Doxygen::sectionDict.insert(*anchorName,si); + e->anchors->append(anchorName); + } + else + { + err("Duplicate anchor %s found\n",anchorName->data()); + } s=l.next(); } } diff --git a/src/translator_de.h b/src/translator_de.h index 9a94ae4..6134aaf 100644 --- a/src/translator_de.h +++ b/src/translator_de.h @@ -52,49 +52,60 @@ // 2001/07/24 Jens Seidel (jensseidel@users.sourceforge.net) // - trClassDocumentation() updated as in the English translator. // -// 2001/11/30 Oliver Brandt (o.brandt@tu-bs.de) and -// Jens Seidel (jensseidel@users.sourceforge.net) +// 2001/11/30 Oliver Brandt (o.brandt@tu-bs.de) and +// Jens Seidel (jensseidel@users.sourceforge.net) // - trReferences() implemented. // - trCompoundReference(), trLegendDocs() updated // - Removed some TODO's // -// 2001/02/13 Oliver Brandt (o.brandt@tu-bs.de) +// 2001/02/13 Oliver Brandt (o.brandt@tu-bs.de) // - Updated for "new since 1.2.13" version // - Removed some TODO's // -// 2002-07-08 Oliver Brandt (o.brandt@tu-bs.de) +// 2002/07/08 Oliver Brandt (o.brandt@tu-bs.de) // - Updated for "new since 1.2.16" version // -// Todo: -// - see FIXME +// 2002/11/25 Jens Seidel (jensseidel@users.sourceforge.net) +// - sync with english version 1.3 +// - TranslatorGerman doesn't inherit from TranslatorEnglish anymore, +// so I changed "/* " back to "/*! " as in the english file +// - use ngerman instead of german package in LaTeX +// - changed "Datenelemente" to "Methoden" in +// tr{,Static}{Public,Protected,Private}Members +// +// Todo: +// - see FIXME #ifndef TRANSLATOR_DE_H #define TRANSLATOR_DE_H -class TranslatorGerman : public TranslatorAdapter_1_2_17 +class TranslatorGerman : public Translator { public: // --- Language control methods ------------------- - - /* Used for identification of the language. The identification - * should not be translated. It should be replaced by the name + + /*! Used for identification of the language. The identification + * should not be translated. It should be replaced by the name * of the language in English using lower-case characters only - * (e.g. "czech", "japanese", "russian", etc.). It should be equal to + * (e.g. "czech", "japanese", "russian", etc.). It should be equal to * the identification used in language.cpp. */ virtual QCString idLanguage() { return "german"; } - /* Used to get the LaTeX command(s) for the language support. This method + /*! Used to get the LaTeX command(s) for the language support. This method * was designed for languages which do wish to use a babel package. */ virtual QCString latexLanguageSupportCommand() { - return "\\usepackage{german}\n"; + QCString result="\\usepackage{ngerman}\n"; + result+="\\usepackage{t1enc}% Trennung verbessern bei Umlauten\n"; + result+="%\\usepackage[latin1]{inputenc}% Kodierung (cp850,latin1,ansinew)"; + return result; } - /* return the language charset. This will be used for the HTML output */ + /*! return the language charset. This will be used for the HTML output */ virtual QCString idLanguageCharset() { return "iso-8859-1"; @@ -102,57 +113,57 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 // --- Language translation methods ------------------- - /* used in the compound documentation before a list of related functions. */ + /*! used in the compound documentation before a list of related functions. */ virtual QCString trRelatedFunctions() { return "Verwandte Funktionen"; } - /* subscript for the related functions. */ + /*! subscript for the related functions. */ virtual QCString trRelatedSubscript() { return "(Es handelt sich hierbei nicht um Elementfunktionen.)"; } - /* header that is put before the detailed description of files, classes and namespaces. */ + /*! header that is put before the detailed description of files, classes and namespaces. */ virtual QCString trDetailedDescription() { return "Ausführliche Beschreibung"; } - /* header that is put before the list of typedefs. */ + /*! header that is put before the list of typedefs. */ virtual QCString trMemberTypedefDocumentation() { return "Dokumentation der benutzerdefinierten Datentypen"; } - /* header that is put before the list of enumerations. */ + /*! header that is put before the list of enumerations. */ virtual QCString trMemberEnumerationDocumentation() { return "Dokumentation der Aufzählungstypen"; } - - /* header that is put before the list of member functions. */ + + /*! header that is put before the list of member functions. */ virtual QCString trMemberFunctionDocumentation() { return "Dokumentation der Elementfunktionen"; } - - /* header that is put before the list of member attributes. */ + + /*! header that is put before the list of member attributes. */ virtual QCString trMemberDataDocumentation() { /* No difference if "OPTIMIZE_OUTPUT_FOR_C" is set! */ return "Dokumentation der Datenelemente"; } - /* this is the text of a link put after brief descriptions. */ - virtual QCString trMore() + /*! this is the text of a link put after brief descriptions. */ + virtual QCString trMore() { return "Mehr..."; } - /* put in the class documentation */ + /*! put in the class documentation */ virtual QCString trListOfAllMembers() { return "Aufstellung aller Elemente"; } - /* used as the title of the "list of all members" page of a class */ + /*! used as the title of the "list of all members" page of a class */ virtual QCString trMemberList() { return "Elementverzeichnis"; } - /* this is the first part of a sentence that is followed by a class name */ + /*! this is the first part of a sentence that is followed by a class name */ virtual QCString trThisIsTheListOfAllMembers() { return "Vollständige Aufstellung aller Elemente für "; } - /* this is the remainder of the sentence after the class name */ + /*! this is the remainder of the sentence after the class name */ virtual QCString trIncludingInheritedMembers() { return " einschließlich aller geerbten Elemente."; } - - /* this is put at the author sections at the bottom of man pages. + + /*! this is put at the author sections at the bottom of man pages. * parameter s is name of the project name. */ virtual QCString trGeneratedAutomatically(const char *s) @@ -162,33 +173,33 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 return result; } - /* put after an enum name in the list of all members */ + /*! put after an enum name in the list of all members */ virtual QCString trEnumName() { return "enum Bezeichner"; } - - /* put after an enum value in the list of all members */ + + /*! put after an enum value in the list of all members */ virtual QCString trEnumValue() { return "enum Wert"; } - - /* put after an undocumented member in the list of all members */ + + /*! put after an undocumented member in the list of all members */ virtual QCString trDefinedIn() { return "Definiert in"; } // quick reference sections - /* This is put above each page as a link to the list of all groups of - * compounds or files (see the \group command). + /*! This is put above each page as a link to the list of all groups of + * compounds or files (see the \\group command). */ virtual QCString trModules() { return "Module"; } - - /* This is put above each page as a link to the class hierarchy */ + + /*! This is put above each page as a link to the class hierarchy */ virtual QCString trClassHierarchy() { return "Klassenhierarchie"; } - - /* This is put above each page as a link to the list of annotated classes */ + + /*! This is put above each page as a link to the list of annotated classes */ virtual QCString trCompoundList() - { + { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { return "Datenstrukturen"; @@ -198,18 +209,18 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 return "Übersicht"; } } - - /* This is put above each page as a link to the list of documented files */ + + /*! This is put above each page as a link to the list of documented files */ virtual QCString trFileList() { return "Auflistung der Dateien"; } - /* This is put above each page as a link to the list of all verbatim headers */ + /*! This is put above each page as a link to the list of all verbatim headers */ virtual QCString trHeaderFiles() { return "Auflistung der Header-Dateien"; } - /* This is put above each page as a link to all members of compounds. */ + /*! This is put above each page as a link to all members of compounds. */ virtual QCString trCompoundMembers() - { + { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { return "Datenstruktur-Elemente"; @@ -220,30 +231,30 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 } } - /* This is put above each page as a link to all members of files. */ + /*! This is put above each page as a link to all members of files. */ virtual QCString trFileMembers() /* No difference if "OPTIMIZE_OUTPUT_FOR_C" is set! */ { return "Datei-Elemente"; } - /* This is put above each page as a link to all related pages. */ + /*! This is put above each page as a link to all related pages. */ virtual QCString trRelatedPages() { return "Zusätzliche Informationen"; } - /* This is put above each page as a link to all examples. */ + /*! This is put above each page as a link to all examples. */ virtual QCString trExamples() { return "Beispiele"; } - /* This is put above each page as a link to the search engine. */ + /*! This is put above each page as a link to the search engine. */ virtual QCString trSearch() { return "Suchen"; } - /* This is an introduction to the class hierarchy. */ + /*! This is an introduction to the class hierarchy. */ virtual QCString trClassHierarchyDescription() { return "Die Liste der Ableitungen ist -mit Einschränkungen- " "alphabetisch sortiert:"; } - /* This is an introduction to the list with all files. */ + /*! This is an introduction to the list with all files. */ virtual QCString trFileListDescription(bool extractAll) { QCString result="Hier folgt die Aufzählung aller "; @@ -252,99 +263,125 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 return result; } - /* This is an introduction to the annotated compound list. */ + /*! This is an introduction to the annotated compound list. */ virtual QCString trCompoundListDescription() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { return "Hier folgt die Aufzählung aller Datenstrukturen " "mit einer Kurzbeschreibung:"; + } else + { return "Hier folgt die Aufzählung aller Klassen, Strukturen, " "Varianten und Schnittstellen mit einer Kurzbeschreibung:"; + } } - /* This is an introduction to the page with all class members. */ + /*! This is an introduction to the page with all class members. */ virtual QCString trCompoundMembersDescription(bool extractAll) { QCString result="Hier folgt die Aufzählung aller "; - if (!extractAll) result+="dokumentierten "; + if (!extractAll) + { + result+="dokumentierten "; + } if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) - result+="Strukturen und Varianten mit Verweisen auf "; + { + result+="Strukturen und Varianten"; + } else - result+="Klassenelemente mit Verweisen auf "; - if (!extractAll) { + { + result+="Klassenelemente"; + } + result+=" mit Verweisen auf "; + if (!extractAll) + { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { result+="die Dokumentation zu jedem Element:"; - else + } + else + { result+="die Klassendokumentation zu jedem Element:"; - } else { + } + } + else + { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { result+="die zugehörigen Elemente:"; + } else + { result+="die zugehörigen Klassen:"; + } } return result; } - /* This is an introduction to the page with all file members. */ + /*! This is an introduction to the page with all file members. */ virtual QCString trFileMembersDescription(bool extractAll) { QCString result="Hier folgt die Aufzählung aller "; if (!extractAll) result+="dokumentierten "; if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+="Funktionen, Variablen, Makros, Aufzählungen und Typendefinitionen mit Verweisen auf "; + result+="Funktionen, Variablen, Makros, Aufzählungen und Typendefinitionen"; } else { - result+="Dateielemente mit Verweisen auf "; + result+="Dateielemente"; } - if (extractAll) result+="die Dokumentation zu jedem Element:"; - else result+="die zugehörigen Dateien:"; + result+=" mit Verweisen auf "; + if (extractAll) + result+="die Dokumentation zu jedem Element:"; + else + result+="die zugehörigen Dateien:"; return result; } - /* This is an introduction to the page with the list of all header files. */ + /*! This is an introduction to the page with the list of all header files. */ virtual QCString trHeaderFilesDescription() { return "Hier folgen die Headerdateien, welche die API definieren:"; } - /* This is an introduction to the page with the list of all examples */ + /*! This is an introduction to the page with the list of all examples */ virtual QCString trExamplesDescription() { return "Hier folgt eine Liste mit allen Beispielen:"; } - /* This is an introduction to the page with the list of related pages */ + /*! This is an introduction to the page with the list of related pages */ virtual QCString trRelatedPagesDescription() { return "Hier folgt eine Liste mit zusammengehörigen Themengebieten:"; } - /* This is an introduction to the page with the list of class/file groups */ + /*! This is an introduction to the page with the list of class/file groups */ virtual QCString trModulesDescription() { return "Hier folgt die Aufzählung aller Module:"; } - /* This sentences is used in the annotated class/file lists if no brief + /*! This sentences is used in the annotated class/file lists if no brief * description is given. */ virtual QCString trNoDescriptionAvailable() { return "Keine Beschreibung verfügbar"; } - // index titles (the project name is prepended for these) - - /* This is used in HTML as the title of index.html. */ + // index titles (the project name is prepended for these) + + /*! This is used in HTML as the title of index.html. */ virtual QCString trDocumentation() { return "Dokumentation"; } - /* This is used in LaTeX as the title of the chapter with the + /*! This is used in LaTeX as the title of the chapter with the * index of all groups. */ virtual QCString trModuleIndex() { return "Modul-Verzeichnis"; } - /* This is used in LaTeX as the title of the chapter with the + /*! This is used in LaTeX as the title of the chapter with the * class hierarchy. */ virtual QCString trHierarchicalIndex() { return "Hierarchie-Verzeichnis"; } - /* This is used in LaTeX as the title of the chapter with the + /*! This is used in LaTeX as the title of the chapter with the * annotated compound index. */ virtual QCString trCompoundIndex() @@ -353,140 +390,144 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 return "Datenstruktur-Verzeichnis"; } - /* This is used in LaTeX as the title of the chapter with the + /*! This is used in LaTeX as the title of the chapter with the * list of all files. */ - virtual QCString trFileIndex() + virtual QCString trFileIndex() { return "Datei-Verzeichnis"; } - /* This is used in LaTeX as the title of the chapter containing + /*! This is used in LaTeX as the title of the chapter containing * the documentation of all groups. */ virtual QCString trModuleDocumentation() { return "Modul-Dokumentation"; } - /* This is used in LaTeX as the title of the chapter containing + /*! This is used in LaTeX as the title of the chapter containing * the documentation of all classes, structs and unions. */ virtual QCString trClassDocumentation() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { return "Datenstruktur-Dokumentation"; + } else + { return "Klassen-Dokumentation"; + } } - /* This is used in LaTeX as the title of the chapter containing + /*! This is used in LaTeX as the title of the chapter containing * the documentation of all files. */ virtual QCString trFileDocumentation() { return "Datei-Dokumentation"; } - /* This is used in LaTeX as the title of the chapter containing + /*! This is used in LaTeX as the title of the chapter containing * the documentation of all examples. */ virtual QCString trExampleDocumentation() { return "Dokumentation der Beispiele"; } - /* This is used in LaTeX as the title of the chapter containing + /*! This is used in LaTeX as the title of the chapter containing * the documentation of all related pages. */ virtual QCString trPageDocumentation() { return "Zusätzliche Informationen"; } - /* This is used in LaTeX as the title of the document */ + /*! This is used in LaTeX as the title of the document */ virtual QCString trReferenceManual() { return "Nachschlagewerk"; } - - /* This is used in the documentation of a file as a header before the + + /*! This is used in the documentation of a file as a header before the * list of defines */ virtual QCString trDefines() { return "Makrodefinitionen"; } - /* This is used in the documentation of a file as a header before the + /*! This is used in the documentation of a file as a header before the * list of function prototypes */ virtual QCString trFuncProtos() { return "Funktionsprototypen"; } - /* This is used in the documentation of a file as a header before the + /*! This is used in the documentation of a file as a header before the * list of typedefs */ virtual QCString trTypedefs() { return "Typendefinitionen"; } - /* This is used in the documentation of a file as a header before the + /*! This is used in the documentation of a file as a header before the * list of enumerations */ virtual QCString trEnumerations() { return "Aufzählungen"; } - /* This is used in the documentation of a file as a header before the + /*! This is used in the documentation of a file as a header before the * list of (global) functions */ virtual QCString trFunctions() { return "Funktionen"; } - /* This is used in the documentation of a file as a header before the + /*! This is used in the documentation of a file as a header before the * list of (global) variables */ virtual QCString trVariables() { return "Variablen"; } - /* This is used in the documentation of a file as a header before the + /*! This is used in the documentation of a file as a header before the * list of (global) variables */ virtual QCString trEnumerationValues() { return "Aufzählungswerte"; } - - /* This is used in the documentation of a file before the list of + + /*! This is used in the documentation of a file before the list of * documentation blocks for defines */ virtual QCString trDefineDocumentation() { return "Makro-Dokumentation"; } - /* This is used in the documentation of a file/namespace before the list + /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for function prototypes */ virtual QCString trFunctionPrototypeDocumentation() { return "Funktionsprototypen Dokumentation"; } - /* This is used in the documentation of a file/namespace before the list + /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for typedefs */ virtual QCString trTypedefDocumentation() { return "Dokumentation der benutzerdefinerten Typen"; } - /* This is used in the documentation of a file/namespace before the list + /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for enumeration types */ virtual QCString trEnumerationTypeDocumentation() { return "Dokumentation der Aufzählungstypen"; } - /* This is used in the documentation of a file/namespace before the list + /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for enumeration values */ virtual QCString trEnumerationValueDocumentation() { return "Dokumentation des Wertebereiches der Aufzählungstypen"; } - /* This is used in the documentation of a file/namespace before the list + /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for functions */ virtual QCString trFunctionDocumentation() { return "Dokumentation der Funktionen"; } - /* This is used in the documentation of a file/namespace before the list + /*! This is used in the documentation of a file/namespace before the list * of documentation blocks for variables */ virtual QCString trVariableDocumentation() { return "Variablen-Dokumentation"; } - /* This is used in the documentation of a file/namespace/group before + /*! This is used in the documentation of a file/namespace/group before * the list of links to documented compounds */ virtual QCString trCompounds() - { + { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { return "Datenstrukturen"; @@ -497,7 +538,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 } } - /* This is used in the standard footer of each page and indicates when + /*! This is used in the standard footer of each page and indicates when * the page was generated */ virtual QCString trGeneratedAt(const char *date,const char *projName) @@ -508,73 +549,73 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 return result; } - /* This is part of the sentence used in the standard footer of each page. + /*! This is part of the sentence used in the standard footer of each page. */ virtual QCString trWrittenBy() { return "geschrieben von"; } - /* this text is put before a class diagram */ + /*! this text is put before a class diagram */ virtual QCString trClassDiagram(const char *clName) { return (QCString)"Klassendiagramm für "+clName+":"; } - - /* this text is generated when the \internal command is used. */ + + /*! this text is generated when the \\internal command is used. */ virtual QCString trForInternalUseOnly() { return "Nur für den internen Gebrauch."; } - /* this text is generated when the \reimp command is used. */ + /*! this text is generated when the \\reimp command is used. */ virtual QCString trReimplementedForInternalReasons() { return "Aus internen Gründen neu implementiert. " "Das API wird davon nicht berührt."; } - /* this text is generated when the \warning command is used. */ + /*! this text is generated when the \\warning command is used. */ virtual QCString trWarning() { return "Warnung"; } - /* this text is generated when the \bug command is used. */ + /*! this text is generated when the \\bug command is used. */ virtual QCString trBugsAndLimitations() { return "Fehler und Einschränkungen"; } - /* this text is generated when the \version command is used. */ + /*! this text is generated when the \\version command is used. */ virtual QCString trVersion() { return "Version"; } - /* this text is generated when the \date command is used. */ + /*! this text is generated when the \\date command is used. */ virtual QCString trDate() { return "Datum"; } - /* this text is generated when the \return command is used. */ + /*! this text is generated when the \\return command is used. */ virtual QCString trReturns() { return "Rückgabe"; } - /* this text is generated when the \sa command is used. */ + /*! this text is generated when the \\sa command is used. */ virtual QCString trSeeAlso() { return "Siehe auch"; } - /* this text is generated when the \param command is used. */ + /*! this text is generated when the \\param command is used. */ virtual QCString trParameters() { return "Parameter"; } - /* this text is generated when the \exception command is used. */ + /*! this text is generated when the \\exception command is used. */ virtual QCString trExceptions() { return "Ausnahmebehandlung"; } - - /* this text is used in the title page of a LaTeX document. */ + + /*! this text is used in the title page of a LaTeX document. */ virtual QCString trGeneratedBy() { return "Erzeugt von"; } ////////////////////////////////////////////////////////////////////////// // new since 0.49-990307 ////////////////////////////////////////////////////////////////////////// - - /* used as the title of page containing all the index of all namespaces. */ + + /*! used as the title of page containing all the index of all namespaces. */ virtual QCString trNamespaceList() { return "Liste aller Namensbereiche"; } - /* used as an introduction to the namespace list */ + /*! used as an introduction to the namespace list */ virtual QCString trNamespaceListDescription(bool extractAll) { QCString result="Liste aller "; @@ -583,27 +624,27 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 return result; } - /* used in the class documentation as a header before the list of all + /*! used in the class documentation as a header before the list of all * friends of a class */ virtual QCString trFriends() { return "Freundbeziehungen"; } - + ////////////////////////////////////////////////////////////////////////// // new since 0.49-990405 ////////////////////////////////////////////////////////////////////////// - - /* used in the class documentation as a header before the list of all + + /*! used in the class documentation as a header before the list of all * related classes */ virtual QCString trRelatedFunctionDocumentation() { return "Freundbeziehungen und Funktionsdokumentation"; } - + ////////////////////////////////////////////////////////////////////////// // new since 0.49-990425 ////////////////////////////////////////////////////////////////////////// - /* used as the title of the HTML page of a class/struct/union */ + /*! used as the title of the HTML page of a class/struct/union */ virtual QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate) @@ -622,7 +663,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 return result; } - /* used as the title of the HTML page of a file */ + /*! used as the title of the HTML page of a file */ virtual QCString trFileReference(const char *fileName) { QCString result=fileName; @@ -630,17 +671,16 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 return result; } - /* used as the title of the HTML page of a namespace */ + /*! used as the title of the HTML page of a namespace */ virtual QCString trNamespaceReference(const char *namespaceName) { QCString result=namespaceName; result+=" Namensbereichsreferenz"; return result; } - - // these are for the member sections of a class, struct or union + virtual QCString trPublicMembers() - { return "Öffentliche Datenelemente"; } + { return "Öffentliche Methoden"; } virtual QCString trPublicSlots() { return "Öffentliche Slots"; } @@ -649,29 +689,27 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 { return "Signale"; } virtual QCString trStaticPublicMembers() - { return "Öffentliche, statische Datenelemente"; } + { return "Öffentliche, statische Methoden"; } virtual QCString trProtectedMembers() - { return "Geschützte Datenelemente"; } + { return "Geschützte Methoden"; } virtual QCString trProtectedSlots() { return "Geschützte Slots"; } virtual QCString trStaticProtectedMembers() - { return "Geschützte, statische Datenelemente"; } + { return "Geschützte, statische Methoden"; } virtual QCString trPrivateMembers() - { return "Private Datenelemente"; } + { return "Private Methoden"; } virtual QCString trPrivateSlots() { return "Private Slots"; } virtual QCString trStaticPrivateMembers() - { return "Private, statische Datenelemente"; } + { return "Private, statische Methoden"; } - // end of member sections - - /* this function is used to produce a comma-separated list of items. + /*! this function is used to produce a comma-separated list of items. * use generateMarker(i) to indicate where item i should be put. */ virtual QCString trWriteList(int numEntries) @@ -679,24 +717,24 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 QCString result; int i; // the inherits list contain `numEntries' classes - for (i=0;i

        \n" + "

        \"\"
        \n" "

        \n" "Die Rechtecke in obigem Graphen bedeuten:\n" "

          \n" @@ -1116,23 +1155,23 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 "
        \n"; } - /* text for the link to the legend page */ + /*! text for the link to the legend page */ virtual QCString trLegend() { return "Legende"; } - + ////////////////////////////////////////////////////////////////////////// // new since 1.2.0 ////////////////////////////////////////////////////////////////////////// - - /* Used as a marker that is put before a test item */ + + /*! Used as a marker that is put before a test item */ virtual QCString trTest() { return "Test"; } - /* Used as the header of the test list */ + /*! Used as the header of the test list */ virtual QCString trTestList() { return "Test-Liste"; @@ -1142,7 +1181,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 // new since 1.2.1 ////////////////////////////////////////////////////////////////////////// - /* Used as a section header for KDE-2 IDL methods */ + /*! Used as a section header for KDE-2 IDL methods */ virtual QCString trDCOPMethods() { return "DCOP Methoden"; @@ -1152,13 +1191,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 // new since 1.2.2 ////////////////////////////////////////////////////////////////////////// - /* Used as a section header for IDL properties */ + /*! Used as a section header for IDL properties */ virtual QCString trProperties() { return "Eigenschaften"; } - /* Used as a section header for IDL property documentation */ + /*! Used as a section header for IDL property documentation */ virtual QCString trPropertyDocumentation() { return "Dokumentation der Eigenschaften"; @@ -1168,13 +1207,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 // new since 1.2.4 ////////////////////////////////////////////////////////////////////////// - /* Used for Java interfaces in the summary section of Java packages */ + /*! Used for Java interfaces in the summary section of Java packages */ virtual QCString trInterfaces() { return "Schnittstellen"; } - /* Used for Java classes in the summary section of Java packages */ + /*! Used for Java classes in the summary section of Java packages */ virtual QCString trClasses() { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) @@ -1183,37 +1222,37 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 return "Klassen"; } - /* Used as the title of a Java package */ + /*! Used as the title of a Java package */ virtual QCString trPackage(const char *name) { return (QCString)"Package "+name; } - /* Title of the package index page */ + /*! Title of the package index page */ virtual QCString trPackageList() { return "Package Liste"; } - /* The description of the package index page */ + /*! The description of the package index page */ virtual QCString trPackageListDescription() { return "Hier folgen die packages mit einer Kurzbeschreibung (wenn verfügbar):"; } - /* The link name in the Quick links header for each page */ + /*! The link name in the Quick links header for each page */ virtual QCString trPackages() { return "Packages"; } - /* Used as a chapter title for Latex & RTF output */ + /*! Used as a chapter title for Latex & RTF output */ virtual QCString trPackageDocumentation() { return "Package Dokumentation"; } - /* Text shown before a multi-line define */ + /*! Text shown before a multi-line define */ virtual QCString trDefineValue() { return "Wert:"; @@ -1223,13 +1262,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 // new since 1.2.5 ////////////////////////////////////////////////////////////////////////// - /* Used as a marker that is put before a \bug item */ + /*! Used as a marker that is put before a \\bug item */ virtual QCString trBug() { return "Fehler"; } - /* Used as the header of the bug list */ + /*! Used as the header of the bug list */ virtual QCString trBugList() { return "Liste der bekannten Fehler"; @@ -1239,13 +1278,13 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 // new since 1.2.6-20010422 ////////////////////////////////////////////////////////////////////////// - /* Used as ansicpg for RTF file. See translator_en.h for details. */ + /*! Used as ansicpg for RTF file. See translator_en.h for details. */ virtual QCString trRTFansicp() { return "1252"; } - /* Used as ansicpg for RTF fcharset + /*! Used as ansicpg for RTF fcharset * \see trRTFansicp() for a table of possible values. */ virtual QCString trRTFCharSet() @@ -1253,7 +1292,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 return "0"; } - /* Used as header RTF general index */ + /*! Used as header RTF general index */ virtual QCString trRTFGeneralIndex() { return "Index"; @@ -1263,7 +1302,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 // new since 1.2.7 ////////////////////////////////////////////////////////////////////////// - /* This is used for translation of the word that will possibly + /*! This is used for translation of the word that will possibly * be followed by a single name or by a list of names * of the category. */ @@ -1274,7 +1313,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 return result; } - /* This is used for translation of the word that will possibly + /*! This is used for translation of the word that will possibly * be followed by a single name or by a list of names * of the category. */ @@ -1285,7 +1324,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 return result; } - /* This is used for translation of the word that will possibly + /*! This is used for translation of the word that will possibly * be followed by a single name or by a list of names * of the category. */ @@ -1296,7 +1335,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 return result; } - /* This is used for translation of the word that will possibly + /*! This is used for translation of the word that will possibly * be followed by a single name or by a list of names * of the category. */ @@ -1307,7 +1346,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 return result; } - /* This is used for translation of the word that will possibly + /*! This is used for translation of the word that will possibly * be followed by a single name or by a list of names * of the category. */ @@ -1318,7 +1357,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 return result; } - /* This is used for translation of the word that will possibly + /*! This is used for translation of the word that will possibly * be followed by a single name or by a list of names * of the category. */ @@ -1328,8 +1367,8 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 if (!singular) result+="e"; return result; } - - /* This is used for translation of the word that will possibly + + /*! This is used for translation of the word that will possibly * be followed by a single name or by a list of names * of the category. */ @@ -1340,7 +1379,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 return result; } - /* This is used for translation of the word that will possibly + /*! This is used for translation of the word that will possibly * be followed by a single name or by a list of names * of the category. */ @@ -1354,8 +1393,8 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ////////////////////////////////////////////////////////////////////////// // new since 1.2.7-20010524 ////////////////////////////////////////////////////////////////////////// - - /* This text is generated when the \author command is used and + + /*! This text is generated when the \\author command is used and * for the author section in man pages. */ virtual QCString trAuthor(bool, bool singular) @@ -1369,7 +1408,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 // new since 1.2.11 ////////////////////////////////////////////////////////////////////////// - /* This text is put before the list of members referenced by a member + /*! This text is put before the list of members referenced by a member */ virtual QCString trReferences() { @@ -1379,16 +1418,17 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 ////////////////////////////////////////////////////////////////////////// // new since 1.2.13 ////////////////////////////////////////////////////////////////////////// - /* used in member documentation blocks to produce a list of - * members that are implemented by this one. + + /*! used in member documentation blocks to produce a list of + * members that are implemented by this one. */ virtual QCString trImplementedFromList(int numEntries) { return "Implementiert " + trWriteList(numEntries) + "."; } - /* used in member documentation blocks to produce a list of - * all members that implement this abstract member. + /*! used in member documentation blocks to produce a list of + * all members that implement this abstract member. */ virtual QCString trImplementedInList(int numEntries) { @@ -1399,14 +1439,44 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 // new since 1.2.16 ////////////////////////////////////////////////////////////////////////// - /* used in RTF documentation as a heading for the Table - * of Contents. + /*! used in RTF documentation as a heading for the Table + * of Contents. */ virtual QCString trRTFTableOfContents() { return "Inhaltsverzeichnis"; } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.17 +////////////////////////////////////////////////////////////////////////// + + /*! Used as the header of the list of item that have been + * flagged deprecated + */ + virtual QCString trDeprecatedList() + { + return "Veraltete Elemente"; + } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a header for declaration section of the events found in + * a C# program + */ + virtual QCString trEvents() + { + return "Ereignisse"; + } + + /*! Header used for the documentation section of a class' events. */ + virtual QCString trEventDocumentation() + { + return "Ereignisdokumentation"; + } + }; #endif - diff --git a/src/util.cpp b/src/util.cpp index b445c34..8e7c45e 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -657,8 +657,9 @@ QCString removeRedundantWhiteSpace(const QCString &s) result+=", "; } else if (i>0 && - (isId(s.at(i)) && s.at(i-1)==')') || - (s.at(i)=='\'' && s.at(i-1)==' ') + ((isId(s.at(i)) && s.at(i-1)==')') || + (s.at(i)=='\'' && s.at(i-1)==' ') + ) ) { result+=' '; @@ -670,7 +671,7 @@ QCString removeRedundantWhiteSpace(const QCString &s) csp=0; } else if (!isspace(c) || - ( i!=0 && i!=l-1 && + ( i>0 && i' || s.at(i-1)==']') && isId(s.at(i+1)) ) @@ -3157,7 +3158,7 @@ void addMembersToMemberGroup(MemberList *ml, MemberGroup *mg = memberGroupSDict->find(groupId); if (mg==0) { - mg = new MemberGroup(groupId,*pGrpHeader,pDocs ? pDocs->data() : 0); + mg = new MemberGroup(context,groupId,*pGrpHeader,pDocs ? pDocs->data() : 0); memberGroupSDict->append(groupId,mg); } mg->insertMember(context,fmd); // insert in member group @@ -3178,7 +3179,7 @@ void addMembersToMemberGroup(MemberList *ml, MemberGroup *mg = memberGroupSDict->find(groupId); if (mg==0) { - mg = new MemberGroup(groupId,*pGrpHeader,pDocs ? pDocs->data() : 0); + mg = new MemberGroup(context,groupId,*pGrpHeader,pDocs ? pDocs->data() : 0); memberGroupSDict->append(groupId,mg); } md = ml->take(index); // remove from member list @@ -3551,20 +3552,21 @@ PageInfo *addRelatedPage(const char *name,const QCString &ptitle, //outputList->writeTitle(pi->name,pi->title); // a page name is a label as well! - SectionInfo *si=new SectionInfo( - pi->name,pi->title,SectionInfo::Page,pi->reference); + QCString file; if (gd) { - si->fileName=gd->getOutputFileBase(); + file=gd->getOutputFileBase(); } else if (pi->getGroupDef()) { - si->fileName=pi->getGroupDef()->getOutputFileBase().copy(); + file=pi->getGroupDef()->getOutputFileBase().copy(); } else { - si->fileName=pageName; + file=pageName; } + SectionInfo *si=new SectionInfo( + file,pi->name,pi->title,SectionInfo::Page,pi->reference); //printf("si->label=`%s' si->definition=%s si->fileName=`%s'\n", // si->label.data(),si->definition?si->definition->name().data():"", // si->fileName.data()); diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index be8ca04..6c94ca7 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -95,7 +95,9 @@ void XmlDocVisitor::visit(DocSymbol *s) void XmlDocVisitor::visit(DocURL *u) { if (m_hide) return; - m_t << "url() << "\">"; + m_t << "isEmail()) m_t << "mailto:"; + m_t << u->url() << "\">"; filter(u->url()); m_t << ""; } diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index b148133..070ccc2 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -34,6 +34,7 @@ #include "version.h" #include "xmldocvisitor.h" #include "docparser.h" +#include "language.h" #include #include @@ -56,7 +57,8 @@ static void writeXMLHeader(QTextStream &t) { QCString dtdName = Config_getString("XML_DTD"); QCString schemaName = Config_getString("XML_SCHEMA"); - t << "idLanguageCharset() + << "' standalone='"; if (dtdName.isEmpty() && schemaName.isEmpty()) t << "yes"; else t << "no"; t << "'?>" << endl; if (!dtdName.isEmpty()) @@ -789,6 +791,7 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti) return; } QTextStream t(&f); + t.setEncoding(QTextStream::Latin1); writeXMLHeader(t); t << " getOutputFileBase() << "\" kind=\"group\">" << endl; @@ -1312,6 +1318,7 @@ static void generateXMLForPage(PageInfo *pi,QTextStream &ti) } QTextStream t(&f); + t.setEncoding(QTextStream::Latin1); writeXMLHeader(t); t << " " << endl; @@ -1393,6 +1400,7 @@ void generateXML() return; } QTextStream t(&f); + t.setEncoding(QTextStream::Latin1); writeXMLHeader(t); ClassSDict::Iterator cli(Doxygen::classSDict); ClassDef *cd; -- cgit v0.12