From cd19d7a220915d1f637e0a0a5b2d05d5750f5db0 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sun, 21 Feb 2010 12:36:45 +0000 Subject: Release-1.6.3 --- INSTALL | 4 +-- README | 4 +-- configure | 4 +-- src/commentscan.l | 51 +++++++++++++++++++++++++++++++ src/definition.cpp | 2 +- src/docparser.cpp | 5 ++- src/dot.cpp | 15 +++++++-- src/doxygen.cpp | 10 +++--- src/htmldocvisitor.cpp | 12 +++++--- src/index.cpp | 83 +++++++++++++++++++++++++++++++++++++++++++++----- src/latexgen.cpp | 7 ++--- src/scanner.l | 22 ++++++------- src/util.cpp | 8 ++--- src/util.h | 2 +- src/vhdldocgen.cpp | 18 ++++++++++- src/vhdldocgen.h | 2 +- src/vhdlscanner.l | 21 ++++++++----- 17 files changed, 212 insertions(+), 58 deletions(-) diff --git a/INSTALL b/INSTALL index 438146d..88814de 100644 --- a/INSTALL +++ b/INSTALL @@ -1,7 +1,7 @@ -DOXYGEN Version 1.6.2-20100216 +DOXYGEN Version 1.6.3 Please read the installation section of the manual (http://www.doxygen.org/install.html) for instructions. -------- -Dimitri van Heesch (16 February 2010) +Dimitri van Heesch (21 February 2010) diff --git a/README b/README index 9cdab5a..038e604 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.6.2_20100216 +DOXYGEN Version 1.6.3 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) (16 February 2010) +Dimitri van Heesch (dimitri@stack.nl) (21 February 2010) diff --git a/configure b/configure index 809c4cf..542023f 100755 --- a/configure +++ b/configure @@ -17,10 +17,10 @@ doxygen_version_major=1 doxygen_version_minor=6 -doxygen_version_revision=2 +doxygen_version_revision=3 #NOTE: Setting version_mmn to "NO" will omit mmn info from the package. -doxygen_version_mmn=20100216 +doxygen_version_mmn=NO bin_dirs=`echo $PATH | sed -e "s/:/ /g"` diff --git a/src/commentscan.l b/src/commentscan.l index 2690657..5306075 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -395,6 +395,8 @@ static bool inGroupParamFound; static int braceCount; static bool insidePre; static bool parseMore; +static int g_condCount; +static int g_sectionLevel; static int g_commentCount; @@ -1691,6 +1693,48 @@ RCSTAG "$"{ID}":"[^\n$]+"$" if (*yytext=='\n') yyLineNr++; addOutput('\n'); } +[@\\]"if"/[ \t] { + g_condCount++; + } +[@\\]"ifnot"/[ \t] { + g_condCount++; + } +[@\\]/"endif" { + g_condCount--; + if (g_condCount<0) // handle conditional section around of \internal, see bug607743 + { + unput('\\'); + BEGIN(Comment); + } + } +[@\\]/"section"[ \t] { + if (g_sectionLevel>0) + { + unput('\\'); + BEGIN(Comment); + } + } +[@\\]/"subsection"[ \t] { + if (g_sectionLevel>1) + { + unput('\\'); + BEGIN(Comment); + } + } +[@\\]/"subsubsection"[ \t] { + if (g_sectionLevel>2) + { + unput('\\'); + BEGIN(Comment); + } + } +[@\\]/"paragraph"[ \t] { + if (g_sectionLevel>3) + { + unput('\\'); + BEGIN(Comment); + } + } [^ \\@\n]+ { // skip non-special characters } . { // any other character @@ -2134,6 +2178,10 @@ static bool handleSection(const QCString &s) setOutput(OutputDoc); addOutput("@"+s+" "); BEGIN(SectionLabel); + if (s=="section") g_sectionLevel=1; + else if (s=="subsection") g_sectionLevel=2; + else if (s=="subsubsection") g_sectionLevel=3; + else if (s=="paragraph") g_sectionLevel=4; return FALSE; } @@ -2283,6 +2331,7 @@ static bool handleInternal(const QCString &) { current->doc.resize(0); } + g_condCount=0; BEGIN( SkipInternal ); } else @@ -2409,6 +2458,8 @@ bool parseCommentBlock(/* in */ ParserInterface *parser, outputXRef.resize(0); setOutput( isBrief || isAutoBriefOn ? OutputBrief : OutputDoc ); briefEndsAtDot = isAutoBriefOn; + g_condCount = 0; + g_sectionLevel = 0; if (!current->inbodyDocs.isEmpty() && isInbody) // separate in body fragments { diff --git a/src/definition.cpp b/src/definition.cpp index acd3374..78e2883 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -449,7 +449,7 @@ void Definition::_setBriefDescription(const char *b,const char *briefFile,int br { switch(brief.at(bl-1)) { - case '.': case '!': case '?': break; + case '.': case '!': case '?': case '>': case ':': break; default: if (uni_isupper(brief.at(0))) brief+='.'; break; diff --git a/src/docparser.cpp b/src/docparser.cpp index 50e1b17..d0b8fb0 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -4929,8 +4929,11 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag DBG(("handleHtmlStartTag(%s,%d)\n",tagName.data(),tagHtmlAttribs.count())); int retval=RetVal_OK; int tagId = Mappers::htmlTagMapper->map(tagName); - if (g_token->emptyTag && !(tagId&XML_CmdMask) && tagId!=HTML_UNKNOWN) + if (g_token->emptyTag && !(tagId&XML_CmdMask) && + tagId!=HTML_UNKNOWN && tagId!=HTML_IMG && tagId!=HTML_BR) + { warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: HTML tags may not use the 'empty tag' XHTML syntax."); + } switch (tagId) { case HTML_UL: diff --git a/src/dot.cpp b/src/dot.cpp index 8c8cd90..a951cf6 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -35,7 +35,7 @@ #include "pagedef.h" #include "portable.h" #include "dirdef.h" - +#include "vhdldocgen.h" #include #include #include @@ -718,9 +718,18 @@ void DotNode::writeBox(QTextStream &t, } else { - if (!Config_getBool("DOT_TRANSPARENT")) + static bool dotTransparent = Config_getBool("DOT_TRANSPARENT"); + static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL"); + if (!dotTransparent) { - t << ",color=\"" << labCol << "\", fillcolor=\"white\", style=\"filled\""; + ClassDef* ccd=this->m_classDef; + + t << ",color=\"" << labCol << "\", fillcolor=\""; + if (ccd && vhdlOpt && (VhdlDocGen::VhdlClasses)ccd->protection()==VhdlDocGen::ARCHITECTURECLASS) + t << "khaki"; + else + t << "white"; + t << "\", style=\"filled\""; } else { diff --git a/src/doxygen.cpp b/src/doxygen.cpp index f37bad1..e3fffb3 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -10025,14 +10025,12 @@ void parseInput() msg("Computing class relations...\n"); computeTemplateClassRelations(); flushUnresolvedRelations(); + + computeClassRelations(); + if (Config_getBool("OPTIMIZE_OUTPUT_VHDL")) - { VhdlDocGen::computeVhdlComponentRelations(); - } - else - { - computeClassRelations(); - } + g_classEntries.clear(); msg("Add enum values to enums...\n"); diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index 0bd3620..194faa5 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -80,6 +80,8 @@ static bool mustBeOutsideParagraph(DocNode *n) /* */ case DocNode::Kind_Section: case DocNode::Kind_HtmlHeader: + /* \internal */ + case DocNode::Kind_Internal: /*
*/ case DocNode::Kind_Verbatim: case DocNode::Kind_Include: @@ -705,6 +707,7 @@ void HtmlDocVisitor::visitPre(DocPara *p) switch (p->parent()->kind()) { case DocNode::Kind_Section: + case DocNode::Kind_Internal: case DocNode::Kind_HtmlListItem: case DocNode::Kind_HtmlDescData: case DocNode::Kind_HtmlCell: @@ -784,6 +787,7 @@ void HtmlDocVisitor::visitPost(DocPara *p) switch (p->parent()->kind()) { case DocNode::Kind_Section: + case DocNode::Kind_Internal: case DocNode::Kind_HtmlListItem: case DocNode::Kind_HtmlDescData: case DocNode::Kind_HtmlCell: @@ -1106,17 +1110,17 @@ void HtmlDocVisitor::visitPost(DocHtmlCaption *) m_t << "\n"; } -void HtmlDocVisitor::visitPre(DocInternal *) +void HtmlDocVisitor::visitPre(DocInternal *i) { if (m_hide) return; + forceEndParagraph(i); m_t << "

" << theTranslator->trForInternalUseOnly() << "

" << endl; - m_t << "

" << endl; } -void HtmlDocVisitor::visitPost(DocInternal *) +void HtmlDocVisitor::visitPost(DocInternal *i) { if (m_hide) return; - m_t << "

" << endl; + forceStartParagraph(i); } void HtmlDocVisitor::visitPre(DocHRef *href) diff --git a/src/index.cpp b/src/index.cpp index 1d3a7d1..cd93d8c 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -317,8 +317,21 @@ void endFile(OutputList &ol,bool) static bool classHasVisibleChildren(ClassDef *cd) { - if (cd->subClasses()==0) return FALSE; - BaseClassList *bcl=cd->subClasses(); + bool vhdl=Config_getBool("OPTIMIZE_OUTPUT_VHDL"); + + BaseClassList *bcl; + + if (vhdl) // reverse baseClass/subClass relation + { + if (cd->baseClasses()==0) return FALSE; + bcl=cd->baseClasses(); + } + else + { + if (cd->subClasses()==0) return FALSE; + bcl=cd->subClasses(); + } + BaseClassListIterator bcli(*bcl); for ( ; bcli.current() ; ++bcli) { @@ -332,13 +345,25 @@ static bool classHasVisibleChildren(ClassDef *cd) void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper,int level,FTVHelp* ftv) { + static bool vhdl=Config_getBool("OPTIMIZE_OUTPUT_VHDL"); + if (bcl==0) return; BaseClassListIterator bcli(*bcl); bool started=FALSE; for ( ; bcli.current() ; ++bcli) { ClassDef *cd=bcli.current()->classDef; - if (cd->isVisibleInHierarchy() && hasVisibleRoot(cd->baseClasses())) + bool b; + if (vhdl) + { + b=hasVisibleRoot(cd->subClasses()); + } + else + { + b=hasVisibleRoot(cd->baseClasses()); + } + + if (cd->isVisibleInHierarchy() && b) // hasVisibleRoot(cd->baseClasses())) { if (!started) { @@ -382,7 +407,14 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper,int level,F //printf("Class %s at %p visited=%d\n",cd->name().data(),cd,cd->visited); bool wasVisited=cd->visited; cd->visited=TRUE; - writeClassTree(ol,cd->subClasses(),wasVisited,level+1,ftv); + if (vhdl) + { + writeClassTree(ol,cd->baseClasses(),wasVisited,level+1,ftv); + } + else + { + writeClassTree(ol,cd->subClasses(),wasVisited,level+1,ftv); + } } ol.endIndexListItem(); } @@ -441,6 +473,8 @@ void writeClassTree(BaseClassList *cl,int level) void writeClassTreeNode(ClassDef *cd,bool &started,int level) { //printf("writeClassTreeNode(%s) visited=%d\n",cd->name().data(),cd->visited); + static bool vhdl=Config_getBool("OPTIMIZE_OUTPUT_VHDL"); + if (cd->isVisibleInHierarchy() && !cd->visited) { if (!started) @@ -455,7 +489,14 @@ void writeClassTreeNode(ClassDef *cd,bool &started,int level) } if (hasChildren) { - writeClassTree(cd->subClasses(),level+1); + if (vhdl) + { + writeClassTree(cd->baseClasses(),level+1); + } + else + { + writeClassTree(cd->subClasses(),level+1); + } } cd->visited=TRUE; } @@ -495,6 +536,7 @@ void writeClassTree(ClassSDict *d,int level) static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FTVHelp* ftv) { + static bool vhdl=Config_getBool("OPTIMIZE_OUTPUT_VHDL"); ClassSDict::Iterator cli(*cl); for (;cli.current(); ++cli) { @@ -504,7 +546,22 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FT // hasVisibleRoot(cd->baseClasses()), // cd->isVisibleInHierarchy() // ); - if (!hasVisibleRoot(cd->baseClasses())) // filter on root classes + bool b; + if (vhdl) + { + if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKAGECLASS || + (VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKBODYCLASS) + { + continue; + } + b=!hasVisibleRoot(cd->subClasses()); + } + else + { + b=!hasVisibleRoot(cd->baseClasses()); + } + + if (b) //filter on root classes { if (cd->isVisibleInHierarchy()) // should it be visible { @@ -543,7 +600,12 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FT if (ftv) ftv->addContentsItem(hasChildren,cd->displayName(),0,0,0); } - if (hasChildren) + if (vhdl && hasChildren) + { + writeClassTree(ol,cd->baseClasses(),cd->visited,1,ftv); + cd->visited=TRUE; + } + else if (hasChildren) { writeClassTree(ol,cd->subClasses(),cd->visited,1,ftv); cd->visited=TRUE; @@ -1073,6 +1135,13 @@ void writeAnnotatedClassList(OutputList &ol) { QCString type=cd->compoundTypeString(); ol.startIndexKey(); + static bool vhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL"); + if (vhdl) + { + QCString prot= VhdlDocGen::getProtectionName((VhdlDocGen::VhdlClasses)cd->protection()); + ol.docify(prot.data()); + ol.insertMemberAlign(); + } ol.writeObjectLink(0,cd->getOutputFileBase(),0,cd->displayName()); ol.endIndexKey(); bool hasBrief = !cd->briefDescription().isEmpty(); diff --git a/src/latexgen.cpp b/src/latexgen.cpp index d193f39..fc1f73c 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -351,7 +351,7 @@ static void writeDefaultStyleSheetPart3(QTextStream &t) " \\setlength{\\itemsep}{-4pt}%\n" " \\renewcommand{\\makelabel}{\\entrylabel}%\n" " }%\n" - " \\item[#1:]%\n" + " \\item[#1]%\n" "}{%\n" " \\end{list}%\n" "}\n\n"; @@ -504,9 +504,8 @@ static void writeDefaultStyleSheetPart3(QTextStream &t) "}\n\n"; t << "% Used by @internal\n" "\\newenvironment{DoxyInternal}[1]{%\n" - " \\begin{DoxyDesc}{#1}%\n" + " \\paragraph*{#1}%\n" "}{%\n" - " \\end{DoxyDesc}%\n" "}\n\n"; t << "% Used by @par and @paragraph\n" "\\newenvironment{DoxyParagraph}[1]{%\n" @@ -1127,6 +1126,7 @@ void LatexGenerator::startParagraph() void LatexGenerator::endParagraph() { + t << endl << endl; } void LatexGenerator::writeString(const char *text) @@ -1658,7 +1658,6 @@ void LatexGenerator::startClassDiagram() { //if (Config_getBool("COMPACT_LATEX")) t << "\\subsubsection"; else t << "\\subsection"; //t << "{"; - newParagraph(); } void LatexGenerator::endClassDiagram(const ClassDiagram &d, diff --git a/src/scanner.l b/src/scanner.l index b7d70aa..590413d 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -145,7 +145,7 @@ static bool insideTryBlock=FALSE; static bool insideCode; static bool needsSemi; -static int depthIf; +//static int depthIf; static int initBracketCount; static QCString memberGroupRelates; static QCString memberGroupInside; @@ -5495,7 +5495,7 @@ static void parseCompounds(Entry *rt) // ce->name.data(),ce->program.data()); // init scanner state padCount=0; - depthIf = 0; + //depthIf = 0; inputString = ce->program; inputPosition = 0; scanYYrestart( scanYYin ) ; @@ -5577,10 +5577,10 @@ static void parseCompounds(Entry *rt) ce->program.resize(0); - if (depthIf>0) - { - warn(yyFileName,yyLineNr,"Documentation block ended in the middle of a conditional section!"); - } + //if (depthIf>0) + //{ + // warn(yyFileName,yyLineNr,"Documentation block ended in the middle of a conditional section!"); + //} } parseCompounds(ce); } @@ -5598,7 +5598,7 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt) g_inputFromFile = FALSE; //anonCount = 0; // don't reset per file - depthIf = 0; + //depthIf = 0; protection = Public; mtype = Method; gstat = FALSE; @@ -5648,10 +5648,10 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt) //forceEndGroup(); groupLeaveFile(yyFileName,yyLineNr); - if (depthIf>0) - { - warn(yyFileName,yyLineNr,"Documentation block ended in the middle of a conditional section!"); - } + //if (depthIf>0) + //{ + // warn(yyFileName,yyLineNr,"Documentation block ended in the middle of a conditional section!"); + //} rt->program.resize(0); delete current; current=0; diff --git a/src/util.cpp b/src/util.cpp index ebf876b..512bb66 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -1595,9 +1595,9 @@ nextChar: ADD_CHAR(' '); } 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)==' ') + ) ) { ADD_CHAR(' '); @@ -6325,7 +6325,7 @@ bool findAndRemoveWord(QCString &s,const QCString &word) { if (s.mid(i,l)==word) { - if (i>0 && isspace(s.at(i-1))) + if (i>0 && isspace((uchar)s.at(i-1))) i--,l++; else if (i+l<(int)s.length() && isspace(s.at(i+l))) l++; diff --git a/src/util.h b/src/util.h index 6b86afb..b1c12a6 100644 --- a/src/util.h +++ b/src/util.h @@ -199,7 +199,7 @@ int guessSection(const char *name); inline bool isId(int c) { - return c=='_' || isalnum(c) || c>=128 || c<0; + return c=='_' || c>=128 || c<0 || isalnum(c); } QCString removeRedundantWhiteSpace(const QCString &s); diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index 872ed55..3abc9a0 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -213,17 +213,20 @@ void VhdlDocGen::computeVhdlComponentRelations() { cli.current()->visited=FALSE; ClassDef * cd = cli.current(); - if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ARCHITECTURECLASS) + if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ARCHITECTURECLASS || + (VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKBODYCLASS) { QCString bName=cd->name(); int i=bName.find("::"); if (i>0) { QCString entityName=bName.left(i); + entityName.stripPrefix("_"); ClassDef *classEntity=Doxygen::classSDict->find(entityName); // entity for architecutre ? if (classEntity) { + // printf("\n entity %s arch %s",entityName.data(),bName.data()); classEntity->insertBaseClass(cd,bName,Public,Normal,0); cd->insertSubClass(classEntity,Public,Normal,0); } @@ -1163,6 +1166,19 @@ void VhdlDocGen::getFuncParams(QList& ql, const char* str) }//while } // getFuncName +QCString VhdlDocGen::getProtectionName(int prot) +{ + if (prot==VhdlDocGen::ENTITYCLASS) + return "entity"; + else if (prot==VhdlDocGen::ARCHITECTURECLASS) + return "architecture"; + else if (prot==VhdlDocGen::PACKAGECLASS) + return "package"; + else if (prot==VhdlDocGen::PACKBODYCLASS) + return "package body"; + + return ""; +} QCString VhdlDocGen::trTypeString(int type) { diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h index 4445a41..25708a3 100644 --- a/src/vhdldocgen.h +++ b/src/vhdldocgen.h @@ -264,7 +264,7 @@ class VhdlDocGen static bool membersHaveSpecificType(MemberList *ml,int type); static void startFonts(const QCString& q, const char *keyword,OutputList& ol); static bool isNumber(const QCString& s); - + static QCString getProtectionName(int prot); private: static void getFuncParams(QList&, const char* str); static bool compareArgList(ArgumentList*,ArgumentList*); diff --git a/src/vhdlscanner.l b/src/vhdlscanner.l index a769d1f..5f582be 100644 --- a/src/vhdlscanner.l +++ b/src/vhdlscanner.l @@ -875,6 +875,11 @@ ENDPROTECEDBODY "end"{BR}+"protected"{BR}+"body"{BR}+{NAME} current->name=QCString(qsl[0]); if (lastCompound) { + if (!VhdlDocGen::foundInsertedComponent(current->type,lastCompound)) + { + BaseInfo *bb=new BaseInfo(current->type,Public,Normal); + lastCompound->extends->append(bb); + } lastCompound->addSubEntry(current); current = new Entry; initEntry(current); @@ -968,15 +973,15 @@ ENDPROTECEDBODY "end"{BR}+"protected"{BR}+"body"{BR}+{NAME} //current->name+=qcs.lower(); current->name.prepend(qcs+"::"); - if (lastEntity) - { + //if (lastEntity) + //{ // inherit private inheritance relation between entity and architecture - if (!VhdlDocGen::foundInsertedComponent(current->name,lastEntity)) - { - BaseInfo *bb=new BaseInfo(current->name,Private,Normal); - lastEntity->extends->append(bb); - } - } + //if (!VhdlDocGen::foundInsertedComponent(current->name,lastEntity)) + //{ + // BaseInfo *bb=new BaseInfo(current->name,Private,Normal); + // lastEntity->extends->append(bb); + //} + //} } else if (current->spec==VhdlDocGen::PACKAGE_BODY) -- cgit v0.12