From c604d141eb8b0708022a3e4b48b0b1871b692aa6 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Tue, 26 Apr 2011 10:48:48 +0000 Subject: Release-1.7.4-20110426 --- INSTALL | 4 +-- README | 4 +-- configure | 2 +- doc/install.doc | 2 +- doc/language.doc | 11 ++++---- doc/maintainers.txt | 1 + doc/translator_report.txt | 19 +++----------- src/classdef.cpp | 16 ++++++------ src/commentscan.l | 7 ++++- src/definition.h | 2 +- src/dirdef.cpp | 6 +---- src/docparser.cpp | 4 +-- src/docparser.h | 8 ++++-- src/docsets.cpp | 3 ++- src/doctokenizer.l | 8 +++--- src/dot.cpp | 2 +- src/doxygen.cpp | 56 ++++++++++++++++++++++++---------------- src/filedef.cpp | 4 +-- src/groupdef.cpp | 17 +++---------- src/htmlgen.cpp | 9 ++++--- src/latexdocvisitor.cpp | 36 +++++++++++++++++++++----- src/latexdocvisitor.h | 3 ++- src/latexgen.cpp | 40 +++++++++++++++++++++-------- src/latexgen.h | 2 +- src/memberdef.cpp | 65 +++++++++++++++++++++++++++++++++++++++-------- src/memberdef.h | 2 ++ src/membergroup.cpp | 6 +++-- src/memberlist.cpp | 6 +++-- src/namespacedef.cpp | 6 ++--- src/outputlist.cpp | 4 +-- src/outputlist.h | 2 +- src/rtfgen.cpp | 3 ++- src/scanner.l | 18 +++++++------ src/tagreader.cpp | 1 + src/translator_de.h | 57 ++++++++++++++++++++++++++++++++++++++++- src/util.cpp | 50 +++++++++++++++++++++--------------- src/util.h | 13 ++++++---- src/xmlgen.cpp | 2 +- 38 files changed, 333 insertions(+), 168 deletions(-) diff --git a/INSTALL b/INSTALL index eb1af46..f1132ee 100644 --- a/INSTALL +++ b/INSTALL @@ -1,7 +1,7 @@ -DOXYGEN Version 1.7.4 +DOXYGEN Version 1.7.4-20110426 Please read the installation section of the manual (http://www.doxygen.org/install.html) for instructions. -------- -Dimitri van Heesch (28 March 2011) +Dimitri van Heesch (26 April 2011) diff --git a/README b/README index acb5590..bc7a0a5 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.7.4 +DOXYGEN Version 1.7.4_20110426 Please read INSTALL for compilation instructions. @@ -26,4 +26,4 @@ forum. Enjoy, -Dimitri van Heesch (dimitri@stack.nl) (28 March 2011) +Dimitri van Heesch (dimitri@stack.nl) (26 April 2011) diff --git a/configure b/configure index 1605bce..5054923 100755 --- a/configure +++ b/configure @@ -20,7 +20,7 @@ doxygen_version_minor=7 doxygen_version_revision=4 #NOTE: Setting version_mmn to "NO" will omit mmn info from the package. -doxygen_version_mmn=NO +doxygen_version_mmn=20110426 bin_dirs=`echo $PATH | sed -e "s/:/ /g"` diff --git a/doc/install.doc b/doc/install.doc index 64eda00..b2dd559 100644 --- a/doc/install.doc +++ b/doc/install.doc @@ -560,7 +560,7 @@ Doxygen comes as a self-installing archive, so installation is extremely simple. Just follow the dialogs. After installation it is recommended to also download and install GraphViz -(version 2.8 or better is highly recommended). Doxygen can use the \c dot tool +(version 2.20 or better is highly recommended). Doxygen can use the \c dot tool of the GraphViz package to render nicer diagrams, see the \ref cfg_have_dot "HAVE_DOT" option in the configuration file. diff --git a/doc/language.doc b/doc/language.doc index 250f166..1537c17 100644 --- a/doc/language.doc +++ b/doc/language.doc @@ -23,7 +23,7 @@ text fragments, generated by doxygen, can be produced in languages other than English (the default). The output language is chosen through the configuration file (with default name and known as Doxyfile). -Currently (version 1.7.3), 38 languages +Currently (version 1.7.4), 38 languages are supported (sorted alphabetically): Afrikaans, Arabic, Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian, Czech, Danish, Dutch, English, Esperanto, @@ -138,9 +138,9 @@ when the translator was updated. German - Jens Seidel - jensseidel at users dot sf dot net - 1.6.3 + Peter Grotrian
Jens Seidel + Peter dot Grotrian at pdv-FS dot de
jensseidel at users dot sf dot net + up-to-date Greek @@ -342,7 +342,8 @@ when the translator was updated. \hline French & Xavier Outhier & {\tt\tiny xouthier at yahoo dot fr} & 1.6.3 \\ \hline - German & Jens Seidel & {\tt\tiny jensseidel at users dot sf dot net} & 1.6.3 \\ + German & Peter Grotrian & {\tt\tiny Peter dot Grotrian at pdv-FS dot de} & up-to-date \\ + ~ & Jens Seidel & {\tt\tiny jensseidel at users dot sf dot net} & ~ \\ \hline Greek & Paul Gessos & {\tt\tiny gessos dot paul at yahoo dot gr} & up-to-date \\ \hline diff --git a/doc/maintainers.txt b/doc/maintainers.txt index 426373f..544f89e 100644 --- a/doc/maintainers.txt +++ b/doc/maintainers.txt @@ -64,6 +64,7 @@ TranslatorFrench Xavier Outhier: xouthier at yahoo dot fr TranslatorGerman +Peter Grotrian: Peter dot Grotrian at pdv-FS dot de Jens Seidel: jensseidel at users dot sf dot net TranslatorGreek diff --git a/doc/translator_report.txt b/doc/translator_report.txt index 30c1d89..5d59c1e 100644 --- a/doc/translator_report.txt +++ b/doc/translator_report.txt @@ -1,4 +1,4 @@ -(1.7.3) +(1.7.4) Doxygen supports the following 38 languages (sorted alphabetically): @@ -10,7 +10,7 @@ Persian, Polish, Portuguese, Romanian, Russian, Serbian, SerbianCyrilic, Slovak, Slovene, Spanish, Swedish, Turkish, Ukrainian, and Vietnamese. -Of them, 16 translators are up-to-date, 22 translators are based on +Of them, 17 translators are up-to-date, 21 translators are based on some adapter class, and 2 are English based. ---------------------------------------------------------------------- @@ -27,6 +27,7 @@ still may be some details listed even for them: TranslatorDutch TranslatorEnglish TranslatorEsperanto + TranslatorGerman TranslatorGreek TranslatorItalian TranslatorKorean -- Change the base class to Translator. @@ -43,7 +44,6 @@ version when the class was last updated and number of methods that must be implemented to become up-to-date: TranslatorPolish 1.6.3 4 methods to implement (1 %) - TranslatorGerman 1.6.3 4 methods to implement (1 %) TranslatorFrench 1.6.3 4 methods to implement (1 %) Note: Reimplementation using UTF-8 suggested. @@ -269,19 +269,6 @@ TranslatorFrench (TranslatorAdapter_1_6_3) 4 methods to implement (1 %) virtual QCString trIncludesFileIn(const char * name) -TranslatorGerman (TranslatorAdapter_1_6_3) 4 methods to implement (1 %) ----------------- - - Implements 221 of the required methods (98 %). - - Missing methods (should be implemented): - - virtual QCString trDateTime(int year, int month, int day, int dayOfWeek, int hour, int minutes, int seconds, bool includeTime) - virtual QCString trFileIn(const char * name) - virtual QCString trDirDependency(const char * name) - virtual QCString trIncludesFileIn(const char * name) - - TranslatorHungarian (TranslatorAdapter_1_4_6) 33 methods to implement (14 %) ------------------- diff --git a/src/classdef.cpp b/src/classdef.cpp index cb4f842..5c75ebb 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -301,6 +301,10 @@ QCString ClassDef::displayName() const { n="<"+n.left(n.length()-2)+">"; } + else if (n.right(2)=="-g") + { + n = n.left(n.length()-2); + } //printf("ClassDef::displayName()=%s\n",n.data()); return n; } @@ -863,7 +867,7 @@ static void writeTemplateSpec(OutputList &ol,Definition *d, void ClassDef::writeBriefDescription(OutputList &ol,bool exampleFlag) { - if (!briefDescription().isEmpty()) + if (!briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { ol.startParagraph(); ol.parseDoc(briefFile(),briefLine(),this,0, @@ -882,10 +886,6 @@ void ClassDef::writeBriefDescription(OutputList &ol,bool exampleFlag) writeMoreLink(ol,anchor()); } - //ol.pushGeneratorState(); - //ol.disable(OutputGenerator::RTF); - //ol.newParagraph(); // FIXME:PARA - //ol.popGeneratorState(); ol.endParagraph(); } ol.writeSynopsis(); @@ -1937,9 +1937,9 @@ void ClassDef::writeDocumentation(OutputList &ol) } startTitle(ol,getOutputFileBase(),this); - ol.parseText(pageTitle); + ol.parseText(pageTitle,TRUE); addGroupListToTitle(ol,this); - endTitle(ol,getOutputFileBase(),name()); + endTitle(ol,getOutputFileBase(),displayName()); writeDocumentationContents(ol,pageTitle); if (generateTreeView) @@ -2073,7 +2073,7 @@ void ClassDef::writeMemberList(OutputList &ol) ol.endQuickIndices(); } startTitle(ol,0); - ol.parseText(displayName()+" "+theTranslator->trMemberList()); + ol.parseText(displayName()+" "+theTranslator->trMemberList(),TRUE); endTitle(ol,0,0); ol.startContents(); ol.parseText(theTranslator->trThisIsTheListOfAllMembers()); diff --git a/src/commentscan.l b/src/commentscan.l index b95ae7c..61cc9e2 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -1040,7 +1040,11 @@ RCSTAG "$"{ID}":"[^\n$]+"$" addOutput(yytext); } ^{B}*"-" { // start of autolist - setOutput(OutputDoc); + if (inContext!=OutputXRef) + { + briefEndsAtDot=FALSE; + setOutput(OutputDoc); + } addOutput(yytext); } ("."+)[a-z_A-Z0-9\)] { // . at start or in the middle of a word, or ellipsis @@ -2571,6 +2575,7 @@ bool parseCommentBlock(/* in */ ParserInterface *parser, lineNr = yyLineNr; //printf("position=%d parseMore=%d\n",position,parseMore); + return parseMore; } diff --git a/src/definition.h b/src/definition.h index 5d7fd15..46b81a0 100644 --- a/src/definition.h +++ b/src/definition.h @@ -290,7 +290,7 @@ class Definition : public DefinitionIntf, public LockableObj virtual void addInnerCompound(Definition *d); virtual void setOuterScope(Definition *d); - void setHidden(bool b); + virtual void setHidden(bool b); void setArtificial(bool b); diff --git a/src/dirdef.cpp b/src/dirdef.cpp index 2d15f54..9e9579b 100644 --- a/src/dirdef.cpp +++ b/src/dirdef.cpp @@ -152,7 +152,7 @@ void DirDef::writeDetailedDescription(OutputList &ol,const QCString &title) void DirDef::writeBriefDescription(OutputList &ol) { - if (!briefDescription().isEmpty()) + if (!briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { ol.startParagraph(); ol.parseDoc(briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE); @@ -225,7 +225,6 @@ void DirDef::writeSubDirList(OutputList &ol) } if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { - ol.startParagraph(); ol.startMemberDescription(); ol.parseDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(), FALSE, // indexWords @@ -235,7 +234,6 @@ void DirDef::writeSubDirList(OutputList &ol) TRUE // link from index ); ol.endMemberDescription(); - ol.endParagraph(); } dd=m_subdirs.next(); } @@ -288,7 +286,6 @@ void DirDef::writeFileList(OutputList &ol) ol.endMemberItem(); if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { - ol.startParagraph(); ol.startMemberDescription(); ol.parseDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(), FALSE, // indexWords @@ -298,7 +295,6 @@ void DirDef::writeFileList(OutputList &ol) TRUE // link from index ); ol.endMemberDescription(); - ol.endParagraph(); } fd=m_fileList->next(); } diff --git a/src/docparser.cpp b/src/docparser.cpp index 5028c90..d6f31df 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -6509,7 +6509,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine, return root; } -DocNode *validatingParseText(const char *input) +DocNode *validatingParseText(const char *input,bool forceBreaks) { // store parser state so we can re-enter this function if needed docParserPushContext(); @@ -6537,7 +6537,7 @@ DocNode *validatingParseText(const char *input) g_paramsFound.clear(); g_searchUrl=""; - DocText *txt = new DocText; + DocText *txt = new DocText(forceBreaks); if (input) { diff --git a/src/docparser.h b/src/docparser.h index 39f0fe5..6ad4457 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -69,7 +69,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine, /*! Main entry point for parsing simple text fragments. These * fragments are limited to words, whitespace and symbols. */ -DocNode *validatingParseText(const char *input); +DocNode *validatingParseText(const char *input,bool forceBreaks=FALSE); /*! Searches for section and anchor commands in the input */ void docFindSections(const char *input, @@ -1195,10 +1195,14 @@ class DocHtmlTable : public CompAccept, public DocNode class DocText : public CompAccept, public DocNode { public: - DocText() {} + DocText(bool forceBreaks) : m_forceBreaks(forceBreaks) {} Kind kind() const { return Kind_Text; } void accept(DocVisitor *v) { CompAccept::accept(this,v); } void parse(); + bool forceBreaks() const { return m_forceBreaks; } + + private: + bool m_forceBreaks; }; /*! @brief Root node of documentation tree */ diff --git a/src/docsets.cpp b/src/docsets.cpp index 1c0b55d..17f8ca8 100644 --- a/src/docsets.cpp +++ b/src/docsets.cpp @@ -135,7 +135,8 @@ void DocSets::initialize() err("Could not open file %s for writing\n",notes.data()); exit(1); } - QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index"; + //QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index"; + QCString indexName="index"; m_nts.setDevice(m_nf); m_nts << "" << endl; m_nts << "" << endl; diff --git a/src/doctokenizer.l b/src/doctokenizer.l index d33dc4a..1ede3b4 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -333,12 +333,12 @@ LNKWORD1 ("::"|"#")?{SCOPEMASK} CVSPEC {BLANK}*("const"|"volatile") LNKWORD2 (({SCOPEPRE}*"operator"{OPMASK})|({SCOPEPRE}"operator"{OPMASKOPT})|(("::"|"#"){SCOPEPRE}*"operator"{OPMASKOPT})){CVSPEC}? LNKWORD3 ([0-9a-z_A-Z\-]+("/"|"\\"))*[0-9a-z_A-Z\-]+("."[0-9a-z_A-Z]+)+ -CHARWORDQ [^ \t\n\r\\@<>()\[\]:;\?{}&%$#,."] +CHARWORDQ [^ \t\n\r\\@<>()\[\]:;\?{}&%$#,."=] ESCWORD "%"{ID}(("::"|"."){ID})* WORD1 {ESCWORD}|{CHARWORDQ}+|"{"|"}"|"'\"'"|("\""[^"\n]*\n?[^"\n]*"\"") -WORD2 "."|","|"("|")"|"["|"]"|":"|";"|"\?" +WORD2 "."|","|"("|")"|"["|"]"|":"|";"|"\?"|"=" WORD1NQ {ESCWORD}|{CHARWORDQ}+ -WORD2NQ "."|","|"("|")"|"["|"]"|":"|";"|"\?" +WORD2NQ "."|","|"("|")"|"["|"]"|":"|";"|"\?"|"=" HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*{WS}*(("/")?)">" HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"sup"|"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"|"SUP"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P" @@ -940,7 +940,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3} <*>\n { warn(g_fileName,yylineno,"warning: Unexpected new line character"); } -<*>[\\@<>&$#%~"] { /* unescaped special character */ +<*>[\\@<>&$#%~"=] { /* unescaped special character */ //warn(g_fileName,yylineno,"warning: Unexpected character `%s', assuming command \\%s was meant.",yytext,yytext); g_token->name = yytext; return TK_COMMAND; diff --git a/src/dot.cpp b/src/dot.cpp index 7a92eeb..744b95f 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -3579,7 +3579,7 @@ void writeDotImageMapFromFile(FTextStream &t, else // bitmap graphics { t << "\""" << endl + << imgName << "\" border=\"0\" usemap=\"#" << mapName << "\"/>" << endl << ""; convertMapFile(t, absOutFile, relPath ,TRUE, context); diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 2ad5bc5..a451e46 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -2398,12 +2398,13 @@ static void addVariable(EntryNav *rootNav,int isFuncPtr=-1) Debug::print(Debug::Variables,0, "VARIABLE_SEC: \n" - " type=`%s' name=`%s' args=`%s' bodyLine=`%d' mGrpId=%d\n", + " type=`%s' name=`%s' args=`%s' bodyLine=`%d' mGrpId=%d relates=%s\n", root->type.data(), root->name.data(), root->args.data(), root->bodyLine, - root->mGrpId + root->mGrpId, + root->relates.data() ); //printf("root->parent->name=%s\n",root->parent->name.data()); @@ -4355,8 +4356,8 @@ static bool findClassRelation( else if (mode==Undocumented && (scopeOffset==0 || isATemplateArgument)) { Debug::print(Debug::Classes,0, - " New undocumented base class `%s' baseClassName=%s\n", - biName.data(),baseClassName.data() + " New undocumented base class `%s' baseClassName=%s isArtificial=%d\n", + biName.data(),baseClassName.data(),isArtificial ); baseClass=0; if (isATemplateArgument) @@ -5941,16 +5942,17 @@ static void findMember(EntryNav *rootNav, { bool newMember=TRUE; // assume we have a new member bool newMemberName=FALSE; + MemberDef *mdDefine=0; bool isDefine=FALSE; { MemberName *mn = Doxygen::functionNameSDict->find(funcName); if (mn) { - MemberDef *md = mn->first(); - while (md && !isDefine) + mdDefine = mn->first(); + while (mdDefine && !isDefine) { - isDefine = isDefine || md->isDefine(); - md = mn->next(); + isDefine = isDefine || mdDefine->isDefine(); + if (!isDefine) mdDefine = mn->next(); } } } @@ -5970,6 +5972,7 @@ static void findMember(EntryNav *rootNav, LockingPtr rmdAl = rmd->argumentList(); newMember= + className!=rmd->getOuterScope()->name() || !matchArguments2(rmd->getOuterScope(),rmd->getFileDef(),rmdAl.pointer(), cd,fd,root->argList, TRUE); @@ -5997,19 +6000,17 @@ static void findMember(EntryNav *rootNav, else mtype=MemberDef::Function; + if (isDefine && mdDefine) + { + mdDefine->setHidden(TRUE); + funcType="#define"; + funcArgs=mdDefine->argsString(); + funcDecl=funcType + " " + funcName; + } + //printf("New related name `%s' `%d'\n",funcName.data(), // root->argList ? (int)root->argList->count() : -1); - // new related (member) function -#if 0 // removed as it doesn't handle related template functions correctly - ArgumentList *tArgList = - getTemplateArgumentsFromName(scopeName+"::"+funcName,root->tArgLists); - MemberDef *md=new MemberDef( - root->fileName,root->startLine, - funcType,funcName,funcArgs,exceptions, - root->protection,root->virt,root->stat,TRUE, - mtype,tArgList,funcArgs.isEmpty() ? 0 : root->argList); -#endif // first note that we pass: // (root->tArgLists ? root->tArgLists->last() : 0) // for the template arguments fo the new "member." @@ -6025,6 +6026,12 @@ static void findMember(EntryNav *rootNav, mtype, (root->tArgLists ? root->tArgLists->last() : 0), funcArgs.isEmpty() ? 0 : root->argList); + + if (isDefine && mdDefine) + { + md->setInitializer(mdDefine->initializer()); + } + // // we still have the problem that // MemberDef::writeDocumentation() in memberdef.cpp @@ -6105,7 +6112,10 @@ static void findMember(EntryNav *rootNav, cd->insertUsedFile(root->fileName); md->setRefItems(root->sli); if (root->relatesType == Duplicate) md->setRelatedAlso(cd); - addMemberToGroups(root,md); + if (!isDefine) + { + addMemberToGroups(root,md); + } //printf("Adding member=%s\n",md->name().data()); if (newMemberName) { @@ -7986,7 +7996,8 @@ static void buildPageList(EntryNav *rootNav) QCString title=root->args.stripWhiteSpace(); if (title.isEmpty()) title=theTranslator->trMainPage(); - QCString name = Config_getBool("GENERATE_TREEVIEW")?"main":"index"; + //QCString name = Config_getBool("GENERATE_TREEVIEW")?"main":"index"; + QCString name = "index"; addRefItem(root->sli, name, "page", @@ -8011,7 +8022,8 @@ static void findMainPage(EntryNav *rootNav) { //printf("Found main page! \n======\n%s\n=======\n",root->doc.data()); QCString title=root->args.stripWhiteSpace(); - QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index"; + //QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index"; + QCString indexName="index"; Doxygen::mainPage = new PageDef(root->fileName,root->startLine, indexName, root->brief+root->doc+root->inbodyDocs,title); //setFileNameForSections(root->anchors,"index",Doxygen::mainPage); @@ -9918,7 +9930,7 @@ void searchInputFiles(StringList &inputFiles) readFileOrDirectory(s,0,Doxygen::mscFileNameDict,0,0, 0,0,0, alwaysRecursive); - s=dotFileList.next(); + s=mscFileList.next(); } diff --git a/src/filedef.cpp b/src/filedef.cpp index b3f19fa..5c68187 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -220,7 +220,7 @@ void FileDef::writeDetailedDescription(OutputList &ol,const QCString &title) void FileDef::writeBriefDescription(OutputList &ol) { - if (!briefDescription().isEmpty()) + if (!briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { ol.startParagraph(); ol.parseDoc(briefFile(),briefLine(),this,0, @@ -531,7 +531,7 @@ void FileDef::writeDocumentation(OutputList &ol) ol.parseText(pageTitleShort); // Html only ol.enableAll(); ol.disable(OutputGenerator::Html); - ol.parseText(pageTitle); // other output formats + ol.parseText(pageTitle,TRUE); // other output formats ol.popGeneratorState(); addGroupListToTitle(ol,this); endTitle(ol,getOutputFileBase(),title); diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 82fd647..f4d4eb9 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -554,7 +554,7 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title) void GroupDef::writeBriefDescription(OutputList &ol) { - if (!briefDescription().isEmpty()) + if (!briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { ol.startParagraph(); ol.parseDoc(briefFile(),briefLine(),this,0, @@ -574,11 +574,6 @@ void GroupDef::writeBriefDescription(OutputList &ol) ol.endTextLink(); } ol.popGeneratorState(); - - //ol.pushGeneratorState(); - //ol.disable(OutputGenerator::RTF); - //ol.newParagraph(); - //ol.popGeneratorState(); ol.endParagraph(); } } @@ -626,11 +621,9 @@ void GroupDef::writeFiles(OutputList &ol,const QCString &title) ol.endMemberItem(); if (!fd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { - ol.startParagraph(); ol.startMemberDescription(); ol.parseDoc(briefFile(),briefLine(),fd,0,fd->briefDescription(),FALSE,FALSE); ol.endMemberDescription(); - ol.endParagraph(); } fd=fileList->next(); } @@ -668,11 +661,9 @@ void GroupDef::writeNestedGroups(OutputList &ol,const QCString &title) ol.endMemberItem(); if (!gd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { - ol.startParagraph(); ol.startMemberDescription(); ol.parseDoc(briefFile(),briefLine(),gd,0,gd->briefDescription(),FALSE,FALSE); ol.endMemberDescription(); - ol.endParagraph(); } gd=groupList->next(); } @@ -703,11 +694,9 @@ void GroupDef::writeDirs(OutputList &ol,const QCString &title) } if (!dd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { - ol.startParagraph(); ol.startMemberDescription(); ol.parseDoc(briefFile(),briefLine(),dd,0,dd->briefDescription(),FALSE,FALSE); ol.endMemberDescription(); - ol.endParagraph(); } dd=dirList->next(); } @@ -1276,7 +1265,9 @@ void addMemberToGroups(Entry *root,MemberDef *md) if (insertit) { - //printf("insertMember found at %s line %d\n",md->getDefFileName().data(),md->getDefLine()); + //printf("insertMember found at %s line %d: %s: related %s\n", + // md->getDefFileName().data(),md->getDefLine(), + // md->name().data(),root->relates.data()); bool success = fgd->insertMember(md); if (success) { diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index ebca041..f4e9c54 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -765,7 +765,10 @@ static void writeServerSearchBox(FTextStream &t,const char *relPath,bool highlig static QCString getLogoName(const char *projectLogo) { if (projectLogo==0) return ""; - if (projectLogo[0]=='$') return projectLogo; // marker is used + if (projectLogo[0]=='$') + { + return projectLogo; // marker is used + } QFileInfo fi(projectLogo); if (fi.exists()) { @@ -1017,8 +1020,8 @@ static QCString substituteHtmlKeywords(const QCString &s,const char *title, // additional HTML only keywords result = substitute(result,"$treeview",treeViewCssJs); - result = substitute(result,"$search",searchCssJs); result = substitute(result,"$searchbox",searchBox); + result = substitute(result,"$search",searchCssJs); result = substitute(result,"$mathjax",mathJaxJs); result = substitute(result,"$relpath$",relPath); //<-- must be last @@ -1275,7 +1278,7 @@ void HtmlGenerator::writeHeaderFile(QFile &file, const char *cssname) t << " \n"; t << " \n"; t << " \n"; - t << " \"Logo\"\n"; + t << " \"Logo\"\n"; t << " \n"; t << " \n"; t << " \n"; diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 48e3675..6d53f37 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -46,6 +46,28 @@ static QCString escapeLabelName(const char *s) return result; } +static bool isSymbol(const char *s) +{ + int l=0; // word length + int nCaps=0; // number of captials + int nCamels=0; // number of lowerCase+upperCase combos + int nUnscore=0; // number of underscores + const char *p=s; + char c; + bool plo=FALSE; + while ((c=*p++)) + { + bool lo=c>='a' && c<='z'; + bool up=c>='A' && c<='Z'; + if (c=='_') nUnscore++; + if (up) nCaps++; + if (up && plo) nCamels++; + plo=lo; + l++; + } + return l>=20 || nCaps>=4 || nCamels>=2 || nUnscore>0; +} + const int maxLevels=5; static const char *secLabels[maxLevels] = { "section","subsection","subsubsection","paragraph","subparagraph" }; @@ -100,7 +122,8 @@ LatexDocVisitor::LatexDocVisitor(FTextStream &t,CodeOutputInterface &ci, const char *langExt,bool insideTabbing) : DocVisitor(DocVisitor_Latex), m_t(t), m_ci(ci), m_insidePre(FALSE), m_insideItem(FALSE), m_hide(FALSE), m_insideTabbing(insideTabbing), - m_langExt(langExt), m_currentColumn(0), m_inRowspan(FALSE) + m_forceBreaks(FALSE), m_langExt(langExt), m_currentColumn(0), + m_inRowspan(FALSE) { } @@ -111,14 +134,14 @@ LatexDocVisitor::LatexDocVisitor(FTextStream &t,CodeOutputInterface &ci, void LatexDocVisitor::visit(DocWord *w) { if (m_hide) return; - filter(w->word()); + filter(w->word(),isSymbol(w->word())); } void LatexDocVisitor::visit(DocLinkedWord *w) { if (m_hide) return; startLink(w->ref(),w->file(),w->anchor()); - filter(w->word()); + filter(w->word(),isSymbol(w->word())); endLink(w->ref(),w->file(),w->anchor()); } @@ -1301,17 +1324,18 @@ void LatexDocVisitor::visitPost(DocCopy *) { } -void LatexDocVisitor::visitPre(DocText *) +void LatexDocVisitor::visitPre(DocText *t) { + m_forceBreaks = t->forceBreaks(); } void LatexDocVisitor::visitPost(DocText *) { } -void LatexDocVisitor::filter(const char *str) +void LatexDocVisitor::filter(const char *str,bool forceBreaks) { - filterLatexString(m_t,str,m_insideTabbing,m_insidePre,m_insideItem); + filterLatexString(m_t,str,m_insideTabbing,m_insidePre,m_insideItem,m_forceBreaks || forceBreaks); } void LatexDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor) diff --git a/src/latexdocvisitor.h b/src/latexdocvisitor.h index 535c411..b4c7f3b 100644 --- a/src/latexdocvisitor.h +++ b/src/latexdocvisitor.h @@ -137,7 +137,7 @@ class LatexDocVisitor : public DocVisitor // helper functions //-------------------------------------- - void filter(const char *str); + void filter(const char *str,bool forceBreaks=FALSE); void startLink(const QCString &ref,const QCString &file, const QCString &anchor); void endLink(const QCString &ref,const QCString &file, @@ -165,6 +165,7 @@ class LatexDocVisitor : public DocVisitor bool m_insideItem; bool m_hide; bool m_insideTabbing; + bool m_forceBreaks; QStack m_enabled; QCString m_langExt; QMap m_rowspanIndices; diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 6c297b8..3e301ac 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -264,6 +264,7 @@ static void writeDefaultHeaderPart1(FTextStream &t) "\\setcounter{tocdepth}{3}\n" "\\renewcommand{\\footrulewidth}{0.4pt}\n" "\\renewcommand{\\familydefault}{\\sfdefault}\n" + "\\hfuzz=10pt\n" // allow a bit of overflow to go unnoticed "\\begin{document}\n"; static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS"); static bool usePDFLatex = Config_getBool("USE_PDFLATEX"); @@ -618,21 +619,23 @@ static void writeDefaultStyleSheetPart3(FTextStream &t) " \\begin{DoxyDesc}{#2}%\n" " \\begin{description}%\n" " \\item[] \\hspace{\\fill} \\vspace{-25pt}%\n" - " \\definecolor{tableShade}{HTML}{F8F8F8}%\n" - " \\rowcolors{1}{white}{tableShade}%\n" - " \\arrayrulecolor{gray}%\n" + //" \\definecolor{tableShade}{HTML}{F8F8F8}%\n" + //" \\rowcolors{1}{white}{tableShade}%\n" + //" \\arrayrulecolor{gray}%\n" + " \\settowidth{\\labelwidth}{40pt}%\n" + " \\setlength{\\LTleft}{\\labelwidth}%\n" " \\setlength{\\tabcolsep}{0.01\\textwidth}%\n" " \\ifthenelse{\\equal{#1}{}}\n" // default: name, docs columns " {\\begin{longtable}{|>{\\raggedleft\\hspace{0pt}}p{0.15\\textwidth}|%\n" - " p{0.87\\textwidth}|}}%\n" + " p{0.76\\textwidth}|}}%\n" " {\\ifthenelse{\\equal{#1}{1}}%\n" // inout, name, docs columns, or type, name, docs columns " {\\begin{longtable}{|>{\\centering}p{0.10\\textwidth}|%\n" " >{\\raggedleft\\hspace{0pt}}p{0.15\\textwidth}|%\n" - " p{0.75\\textwidth}|}}%\n" + " p{0.64\\textwidth}|}}%\n" " {\\begin{longtable}{|>{\\centering}p{0.10\\textwidth}|%\n" // inout, type, name, docs columns " >{\\centering\\hspace{0pt}}p{0.15\\textwidth}|%\n" " >{\\raggedleft\\hspace{0pt}}p{0.15\\textwidth}|%\n" - " p{0.58\\textwidth}|}}%\n" + " p{0.47\\textwidth}|}}%\n" " }\\hline%\n" "}{%\n" " \\end{longtable}%\n" @@ -1033,7 +1036,8 @@ void LatexGenerator::endIndexSection(IndexSections is) break; case isMainPage: { - QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index"; + //QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index"; + QCString indexName="index"; t << "}\n\\label{index}"; if (Config_getBool("PDF_HYPERLINKS")) t << "\\hypertarget{index}{}"; t << "\\input{" << indexName << "}\n"; @@ -1397,12 +1401,12 @@ void LatexGenerator::endIndexKey() void LatexGenerator::startIndexValue(bool hasBrief) { t << " "; - if (hasBrief) t << "("; + if (hasBrief) t << "\\\\*"; } -void LatexGenerator::endIndexValue(const char *name,bool hasBrief) +void LatexGenerator::endIndexValue(const char *name,bool /*hasBrief*/) { - if (hasBrief) t << ")"; + //if (hasBrief) t << ")"; t << "}{\\pageref{" << name << "}}{}" << endl; } @@ -1777,7 +1781,7 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType) void LatexGenerator::docify(const char *str) { - filterLatexString(t,str,insideTabbing,FALSE); + filterLatexString(t,str,insideTabbing,FALSE,FALSE,TRUE); } void LatexGenerator::codify(const char *str) @@ -1961,7 +1965,9 @@ void LatexGenerator::writeNonBreakableSpace(int) t << "\\>"; } else + { t << "~"; + } } void LatexGenerator::startMemberList() @@ -2366,3 +2372,15 @@ void LatexGenerator::endInlineHeader() t << "}" << endl; } +void LatexGenerator::lineBreak(const char *) +{ + if (insideTabbing) + { + t << "\\\\\n"; + } + else + { + t << "\\*\n"; + } +} + diff --git a/src/latexgen.h b/src/latexgen.h index c1e4e52..0d7c2ef 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -143,7 +143,7 @@ class LatexGenerator : public OutputGenerator void endDescription(); void startDescItem(); void endDescItem(); - void lineBreak(const char *style=0) { (void)style; t << "\\par\n"; } + void lineBreak(const char *style=0); void startMemberDoc(const char *,const char *,const char *,const char *,bool); void endMemberDoc(bool); void startDoxyAnchor(const char *,const char *,const char *,const char *,const char *); diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 8479370..f4139d2 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -944,6 +944,13 @@ void MemberDef::setInbodyDocumentation(const char *d,const char *inbodyFile,int m_isLinkableCached = 0; } +void MemberDef::setHidden(bool b) +{ + makeResident(); + Definition::setHidden(b); + m_isLinkableCached = 0; +} + bool MemberDef::isLinkableInProject() const { if (m_isLinkableCached==0) @@ -988,8 +995,18 @@ void MemberDef::writeLink(OutputList &ol,ClassDef *,NamespaceDef *, LockingPtr lock(this,this); QCString sep = optimizeOutputJava ? "." : "::"; QCString n = name(); - if (!hideScopeNames && m_impl->classDef && gd) n.prepend(m_impl->classDef->name()+sep); - else if (!hideScopeNames && m_impl->nspace && (gd || fd)) n.prepend(m_impl->nspace->name()+sep); + if (!hideScopeNames) + { + if (m_impl->classDef && gd && !isRelated()) + { + n.prepend(m_impl->classDef->name()+sep); + } + else if (m_impl->nspace && (gd || fd)) + { + n.prepend(m_impl->nspace->name()+sep); + } + } + if (isObjCMethod()) { if (isStatic()) ol.docify("+ "); else ol.docify("- "); @@ -1170,7 +1187,7 @@ bool MemberDef::isBriefSectionVisible() const visibleIfEnabled && visibleIfPrivate && /*visibleIfDocVirtual &&*/ visibleIfNotDefaultCDTor && visibleIfFriendCompound && - !m_impl->annScope; + !m_impl->annScope && !isHidden(); //printf("MemberDef::isBriefSectionVisible() %d\n",visible); return visible; } @@ -1343,7 +1360,13 @@ void MemberDef::writeDeclaration(OutputList &ol, { if (getAnonymousEnumType()) // type is an anonymous enum { - linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),name(),ltype.left(i),TRUE); + linkifyText(TextGeneratorOLImpl(ol), // out + d, // scope + getBodyDef(), // fileScope + name(), // + ltype.left(i), // text + TRUE // autoBreak + ); getAnonymousEnumType()->writeEnumDeclaration(ol,cd,nd,fd,gd); //ol+=*getAnonymousEnumType()->enumDecl(); linkifyText(TextGeneratorOLImpl(ol),d,m_impl->fileDef,name(),ltype.right(ltype.length()-i-l),TRUE); @@ -1351,7 +1374,13 @@ void MemberDef::writeDeclaration(OutputList &ol, else { ltype = ltype.left(i) + " { ... } " + removeAnonymousScopes(ltype.right(ltype.length()-i-l)); - linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),name(),ltype,TRUE); + linkifyText(TextGeneratorOLImpl(ol), // out + d, // scope + getBodyDef(), // fileScope + name(), // + ltype, // text + TRUE // autoBreak + ); } } } @@ -1366,7 +1395,13 @@ void MemberDef::writeDeclaration(OutputList &ol, ltype.prepend("("); ltype.append(")"); } - linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),name(),ltype,TRUE); + linkifyText(TextGeneratorOLImpl(ol), // out + d, // scope + getBodyDef(), // fileScope + name(), // + ltype, // text + TRUE // autoBreak + ); } bool htmlOn = ol.isEnabled(OutputGenerator::Html); if (htmlOn && Config_getBool("HTML_ALIGN_MEMBERS") && !ltype.isEmpty()) @@ -1466,8 +1501,16 @@ void MemberDef::writeDeclaration(OutputList &ol, if (argsString() && !isObjCMethod()) { if (!isDefine()) ol.writeString(" "); - //ol.docify(argsString()); - linkifyText(TextGeneratorOLImpl(ol),d,getBodyDef(),name(),argsString()); + linkifyText(TextGeneratorOLImpl(ol), // out + d, // scope + getBodyDef(), // fileScope + name(), // + argsString(), // text + m_impl->annMemb, // autoBreak + TRUE, // external + FALSE, // keepSpaces + s_indentLevel + ); } // *** write exceptions @@ -1661,7 +1704,7 @@ bool MemberDef::isDetailedSectionLinkable() const ) ); - return ((docFilter && staticFilter && privateFilter && friendCompoundFilter) /*|| inAnonymousScope*/); + return ((docFilter && staticFilter && privateFilter && friendCompoundFilter && !isHidden()) /*|| inAnonymousScope*/); } bool MemberDef::isDetailedSectionVisible(bool inGroup,bool inFile) const @@ -1694,6 +1737,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, static bool optVhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL"); //printf("MemberDef::writeDocumentation(): name=`%s' hasDocs=`%d' containerType=%d inGroup=%d\n", // name().data(),hasDocs,container->definitionType(),inGroup); + if ( !hasDocs ) return; if (isEnumValue() && !showEnumValues) return; @@ -1976,7 +2020,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, } if (m_impl->classDef && container->definitionType()==TypeClass && - m_impl->classDef!=container + m_impl->classDef!=container && + !isRelated() ) { sl.append("inherited"); diff --git a/src/memberdef.h b/src/memberdef.h index 0ddda3d..4079f08 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -334,6 +334,8 @@ class MemberDef : public Definition void setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace=TRUE); void setBriefDescription(const char *b,const char *briefFile,int briefLine); void setInbodyDocumentation(const char *d,const char *inbodyFile,int inbodyLine); + + void setHidden(bool b); //----------------------------------------------------------------------------------- // --- actions ---- diff --git a/src/membergroup.cpp b/src/membergroup.cpp index 5a5fd80..2f821f8 100644 --- a/src/membergroup.cpp +++ b/src/membergroup.cpp @@ -69,11 +69,13 @@ MemberGroup::~MemberGroup() void MemberGroup::insertMember(MemberDef *md) { //printf("MemberGroup::insertMember m_parent=%s memberList=%p count=%d" - // " member section list: %p\n", + // " member section list: %p: md=%p:%s\n", // m_parent ? m_parent->name().data() : "", // memberList->first() ? memberList->first()->getSectionList(m_parent) : 0, // memberList->count(), - // md->getSectionList(m_parent)); + // md->getSectionList(m_parent), + // md,md->name().data()); + MemberDef *firstMd = memberList->first(); if (inSameSection && memberList->count()>0 && firstMd->getSectionList(m_parent)!=md->getSectionList(m_parent)) diff --git a/src/memberlist.cpp b/src/memberlist.cpp index fd37977..aad386c 100644 --- a/src/memberlist.cpp +++ b/src/memberlist.cpp @@ -60,7 +60,8 @@ int MemberList::compareItems(GCI item1, GCI item2) else if (ord2 > ord1) return 1; } - return stricmp(c1->name(),c2->name()); + int cmp = stricmp(c1->name(),c2->name()); + return cmp!=0 ? cmp : c1->getDefLine()-c2->getDefLine(); } /*! Count the number of members in this list that are visible in @@ -792,7 +793,8 @@ int MemberSDict::compareItems(GCI item1, GCI item2) { MemberDef *c1=(MemberDef *)item1; MemberDef *c2=(MemberDef *)item2; - return stricmp(c1->name(),c2->name()); + int cmp = stricmp(c1->name(),c2->name()); + return cmp!=0 ? cmp : c1->getDefLine()-c2->getDefLine(); } diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp index eca2dfe..0ea3edb 100644 --- a/src/namespacedef.cpp +++ b/src/namespacedef.cpp @@ -274,7 +274,7 @@ void NamespaceDef::writeDetailedDescription(OutputList &ol,const QCString &title void NamespaceDef::writeBriefDescription(OutputList &ol) { - if (!briefDescription().isEmpty()) + if (!briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { ol.startParagraph(); ol.parseDoc(briefFile(),briefLine(),this,0, @@ -440,7 +440,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) } startTitle(ol,getOutputFileBase(),this); - ol.parseText(pageTitle); + ol.parseText(pageTitle,TRUE); addGroupListToTitle(ol,this); endTitle(ol,getOutputFileBase(),displayName()); ol.startContents(); @@ -865,11 +865,9 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,bool loca ol.endMemberItem(); if (!nd->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC")) { - ol.startParagraph(); ol.startMemberDescription(); ol.parseDoc(nd->briefFile(),nd->briefLine(),nd,0,nd->briefDescription(),FALSE,FALSE); ol.endMemberDescription(); - ol.endParagraph(); } } } diff --git a/src/outputlist.cpp b/src/outputlist.cpp index 57f4f67..e50b259 100644 --- a/src/outputlist.cpp +++ b/src/outputlist.cpp @@ -173,7 +173,7 @@ void OutputList::parseDoc(const char *fileName,int startLine, delete root; } -void OutputList::parseText(const QCString &textStr) +void OutputList::parseText(const QCString &textStr,bool forceBreaks) { int count=0; OutputGenerator *og=outputs->first(); @@ -184,7 +184,7 @@ void OutputList::parseText(const QCString &textStr) } if (count==0) return; // no output formats enabled. - DocNode *root = validatingParseText(textStr); + DocNode *root = validatingParseText(textStr,forceBreaks); og=outputs->first(); while (og) diff --git a/src/outputlist.h b/src/outputlist.h index 1c78ada3..403adbc 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -68,7 +68,7 @@ class OutputList : public OutputDocInterface Definition *ctx,MemberDef *md,const QCString &docStr, bool indexWords,bool isExample,const char *exampleName=0, bool singleLine=FALSE,bool linkFromIndex=FALSE); - void parseText(const QCString &textStr); + void parseText(const QCString &textStr,bool forceBreaks=FALSE); void startIndexSection(IndexSections is) diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index cc6690e..0cebf87 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -615,7 +615,8 @@ void RTFGenerator::endIndexSection(IndexSections is) t << "{\\tc \\v " << substitute(Doxygen::mainPage->title(),"%","") << "}"<< endl; } t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \""; - if (Config_getBool("GENERATE_TREEVIEW")) t << "main"; else t << "index"; + //if (Config_getBool("GENERATE_TREEVIEW")) t << "main"; else t << "index"; + t << "index"; t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n"; break; //case isPackageIndex: diff --git a/src/scanner.l b/src/scanner.l index b654d47..122cd05 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -1220,16 +1220,18 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) current->startLine = yyLineNr; current->bodyLine = yyLineNr; lineCount(); - curlyCount=0; + } +";" { current_root->addSubEntry(current); current_root = current ; - current = new Entry ; + current = new Entry ; initEntry(); - BEGIN( FindMembers ) ; - } -";" { BEGIN(FindMembers); } +"{" { + curlyCount=0; + BEGIN( ReadNSBody ); + } {B}*"initonly"{BN}+ { current->type += " initonly "; if (insideCli) current->spec |= Entry::Initonly; @@ -3129,7 +3131,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) current->endBodyLine = yyLineNr; QCString &cn = current->name; QCString rn = current_root->name.copy(); - //printf("cn=`%s' rn=`%s'\n",cn.data(),rn.data()); + //printf("cn=`%s' rn=`%s' isTypedef=%d\n",cn.data(),rn.data(),isTypedef); if (!cn.isEmpty() && !rn.isEmpty()) { prependScope(); @@ -3174,7 +3176,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) } else { - if (!isTypedef) + if (!isTypedef && cn.find('@')==-1) // not typedef or unnamed struct { // enabled the next two lines for bug 623424 current->doc.resize(0); @@ -3392,7 +3394,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) } if (*yytext==';') // end of a struct/class ... { - if (msName.isEmpty() && memspecEntry && (current->section&Entry::COMPOUND_MASK)) + if (!isTypedef && msName.isEmpty() && memspecEntry && (current->section&Entry::COMPOUND_MASK)) { // case where a class/struct has a doc block after it if (!current->doc.isEmpty()) { diff --git a/src/tagreader.cpp b/src/tagreader.cpp index 0368dad..1934903 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -326,6 +326,7 @@ class TagFileParser : public QXmlDefaultHandler else { warn("warning: Unknown compound attribute `%s' found!\n",kind.data()); + m_state = Invalid; } if (isObjC=="yes" && m_curClass) { diff --git a/src/translator_de.h b/src/translator_de.h index ca92c2b..8a9ca21 100644 --- a/src/translator_de.h +++ b/src/translator_de.h @@ -129,7 +129,7 @@ #ifndef TRANSLATOR_DE_H #define TRANSLATOR_DE_H -class TranslatorGerman : public TranslatorAdapter_1_6_3 +class TranslatorGerman : public Translator { public: @@ -1910,6 +1910,61 @@ class TranslatorGerman : public TranslatorAdapter_1_6_3 return "Keine Treffer"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.6.3 (missing items for the directory pages) +////////////////////////////////////////////////////////////////////////// + + /*! introduction text for the directory dependency graph */ + virtual QCString trDirDependency(const char *name) + { + return (QCString)"Verzeichnis-Abhängigkeitsgraph für "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the first column mentions the + * source file that has a relation to another file. + */ + virtual QCString trFileIn(const char *name) + { + return (QCString)"Datei in "+name; + } + + /*! when clicking a directory dependency label, a page with a + * table is shown. The heading for the second column mentions the + * destination file that is included. + */ + virtual QCString trIncludesFileIn(const char *name) + { + return (QCString)"Include-Dateien in "+name; + } + + /** Compiles a date string. + * @param year Year in 4 digits + * @param month Month of the year: 1=January + * @param day Day of the Month: 1..31 + * @param dayOfWeek Day of the week: 1=Monday..7=Sunday + * @param hour Hour of the day: 0..23 + * @param minutes Minutes in the hour: 0..59 + * @param seconds Seconds within the minute: 0..59 + * @param includeTime Include time in the result string? + */ + virtual QCString trDateTime(int year,int month,int day,int dayOfWeek, + int hour,int minutes,int seconds, + bool includeTime) + { + static const char *days[] = { "Mon","Die","Mit","Don","Fre","Sam","Son" }; + static const char *months[] = { "Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez" }; + QCString sdate; + sdate.sprintf("%s %s %d %d",days[dayOfWeek-1],months[month-1],day,year); + if (includeTime) + { + QCString stime; + stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds); + sdate+=stime; + } + return sdate; + } + }; #endif diff --git a/src/util.cpp b/src/util.cpp index ecc1b34..b64ac28 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -90,6 +90,8 @@ TextGeneratorOLImpl::TextGeneratorOLImpl(OutputDocInterface &od) : m_od(od) void TextGeneratorOLImpl::writeString(const char *s,bool keepSpaces) const { + if (s==0) return; + //printf("TextGeneratorOlImpl::writeString('%s',%d)\n",s,keepSpaces); if (keepSpaces) { const char *p=s; @@ -111,18 +113,21 @@ void TextGeneratorOLImpl::writeString(const char *s,bool keepSpaces) const } } -void TextGeneratorOLImpl::writeBreak() const +void TextGeneratorOLImpl::writeBreak(int indent) const { - m_od.pushGeneratorState(); - m_od.disableAllBut(OutputGenerator::Html); m_od.lineBreak("typebreak"); - m_od.popGeneratorState(); + int i; + for (i=0;iname().data()); - // add link to the result - if (external ? cd->isLinkable() : cd->isLinkableInProject()) - { - out.writeLink(cd->getReference(),cd->getOutputFileBase(),cd->anchor(),word); - found=TRUE; - } - } - else if (typeDef) + cd=getResolvedClass(scope,fileScope,matchWord,&typeDef); + if (typeDef) // First look at typedef then class, see bug 584184. { //printf("Found typedef %s\n",typeDef->name().data()); if (external ? typeDef->isLinkable() : typeDef->isLinkableInProject()) @@ -1846,6 +1842,16 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope, found=TRUE; } } + if (!found && cd) + { + //printf("Found class %s\n",cd->name().data()); + // add link to the result + if (external ? cd->isLinkable() : cd->isLinkableInProject()) + { + out.writeLink(cd->getReference(),cd->getOutputFileBase(),cd->anchor(),word); + found=TRUE; + } + } else if ((cd=getClass(matchWord+"-p"))) // search for Obj-C protocols as well { // add link to the result @@ -4711,7 +4717,7 @@ QCString substituteKeywords(const QCString &s,const char *title) result = substitute(result,"$projectname",Config_getString("PROJECT_NAME")); result = substitute(result,"$projectnumber",Config_getString("PROJECT_NUMBER")); result = substitute(result,"$projectbrief",Config_getString("PROJECT_BRIEF")); - result = substitute(result,"$projectlogo",Config_getString("PROJECT_LOGO")); + result = substitute(result,"$projectlogo",stripPath(Config_getString("PROJECT_LOGO"))); return result; } @@ -5952,7 +5958,7 @@ void addGroupListToTitle(OutputList &ol,Definition *d) } void filterLatexString(FTextStream &t,const char *str, - bool insideTabbing,bool insidePre,bool insideItem) + bool insideTabbing,bool insidePre,bool insideItem,bool forceBreaks) { if (str==0) return; const unsigned char *p=(const unsigned char *)str; @@ -6017,6 +6023,10 @@ void filterLatexString(FTextStream &t,const char *str, break; default: + if (!insideTabbing && forceBreaks && c!=' ' && *p!=' ') + { + t << "\\-"; + } t << (char)c; } } diff --git a/src/util.h b/src/util.h index 5853e00..615f70e 100644 --- a/src/util.h +++ b/src/util.h @@ -65,7 +65,7 @@ class TextGeneratorIntf public: virtual ~TextGeneratorIntf() {} virtual void writeString(const char *,bool) const = 0; - virtual void writeBreak() const = 0; + virtual void writeBreak(int indent) const = 0; virtual void writeLink(const char *extRef,const char *file, const char *anchor,const char *text ) const = 0; @@ -77,7 +77,7 @@ class TextGeneratorOLImpl : public TextGeneratorIntf virtual ~TextGeneratorOLImpl() {} TextGeneratorOLImpl(OutputDocInterface &od); void writeString(const char *s,bool keepSpaces) const; - void writeBreak() const; + void writeBreak(int indent) const; void writeLink(const char *extRef,const char *file, const char *anchor,const char *text ) const; @@ -113,7 +113,8 @@ void linkifyText(const TextGeneratorIntf &ol, const char *text, bool autoBreak=FALSE, bool external=TRUE, - bool keepSpaces=FALSE + bool keepSpaces=FALSE, + int indentLevel=0 ); void setAnchors(ClassDef *cd,char id,MemberList *ml,int groupId=-1); @@ -307,8 +308,10 @@ QCString escapeCharsInString(const char *name,bool allowDots,bool allowUnderscor void addGroupListToTitle(OutputList &ol,Definition *d); void filterLatexString(FTextStream &t,const char *str, - bool insideTabbing=FALSE,bool insidePre=FALSE, - bool insideItem=FALSE); + bool insideTabbing=FALSE, + bool insidePre=FALSE, + bool insideItem=FALSE, + bool forceBreaks=FALSE); QCString rtfFormatBmkStr(const char *name); diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index b1cc535..dd793f6 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -203,7 +203,7 @@ class TextGeneratorXMLImpl : public TextGeneratorIntf { writeXMLString(m_t,s); } - void writeBreak() const {} + void writeBreak(int) const {} void writeLink(const char *extRef,const char *file, const char *anchor,const char *text ) const -- cgit v0.12