From 1426e2fbce1e3e4c8089b228c843042c90b2d1c4 Mon Sep 17 00:00:00 2001 From: dimitri Date: Sun, 28 Jan 2001 18:16:38 +0000 Subject: Release-1.2.4-20010128 --- INSTALL | 4 +- README | 4 +- VERSION | 2 +- addon/configgen/config_templ.l | 6 +- addon/configgen/configgen.cpp | 11 +++- addon/xmlgen/Makefile.in | 4 +- doc/config.doc | 9 +++ packages/rpm/doxygen.spec | 2 +- src/classdef.cpp | 23 ++++++-- src/config.h | 4 +- src/config.l | 50 ++++++++--------- src/constexp.y | 2 +- src/definition.cpp | 7 ++- src/doc.l | 18 +++--- src/doxygen.cpp | 5 +- src/groupdef.cpp | 123 +++++++++++++++++++++++------------------ src/groupdef.h | 5 +- src/index.cpp | 104 +++++++++++++++++++++------------- src/index.h | 1 + src/main.cpp | 18 ++++++ src/outputgen.h | 2 +- src/pre.l | 4 +- src/scanner.l | 4 +- src/section.h | 3 +- src/tagreader.cpp | 42 ++++++++++---- src/translator.h | 104 ++++++++++++++++++++++++++++++---- src/translator_cz.h | 77 +++++++++++++++++++++----- src/translator_de.h | 2 +- src/translator_nl.h | 2 +- src/util.cpp | 1 + 30 files changed, 449 insertions(+), 194 deletions(-) diff --git a/INSTALL b/INSTALL index 716ee94..a7e632a 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,6 @@ -DOXYGEN Version 1.2.4-20010121 +DOXYGEN Version 1.2.4-20010128 Please read the installation section of the manual for instructions. -------- -Dimitri van Heesch (21 January 2001) +Dimitri van Heesch (28 January 2001) diff --git a/README b/README index fe0f899..1d05bbb 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.2.4-20010121 +DOXYGEN Version 1.2.4-20010128 Please read INSTALL for compilation instructions. @@ -7,4 +7,4 @@ The latest version of doxygen can be obtained at Enjoy, -Dimitri van Heesch (21 January 2001) +Dimitri van Heesch (28 January 2001) diff --git a/VERSION b/VERSION index 06669b5..7131cb3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.4-20010121 +1.2.4-20010128 diff --git a/addon/configgen/config_templ.l b/addon/configgen/config_templ.l index aa1446b..69886d7 100644 --- a/addon/configgen/config_templ.l +++ b/addon/configgen/config_templ.l @@ -950,9 +950,13 @@ void checkConfig() } } +#undef PUTENV #if defined(_WIN32) - if (Config::haveDotFlag) _putenv("DOTFONTPATH=."); +#define PUTENV _putenv +#else +#define PUTENV putenv #endif + if (Config::haveDotFlag) PUTENV("DOTFONTPATH=."); } diff --git a/addon/configgen/configgen.cpp b/addon/configgen/configgen.cpp index e1c6a2e..6f62235 100644 --- a/addon/configgen/configgen.cpp +++ b/addon/configgen/configgen.cpp @@ -1046,6 +1046,15 @@ void init() "will result in a user defined paragraph with heading \"Side Effects:\". \n" "You can put \\n's in the value part of an alias to insert newlines. \n" ); + ConfigBool::add( "optimizeForCFlag", + "OPTIMIZE_OUTPUT_FOR_C", + "FALSE", + "do we parse C code?", + "Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources \n" + "only. Doxygen will then generate output that is more tailored for C. \n" + "For instance some of the names that are used will be different. The list \n" + "of all members will be omitted, etc. \n" + ); //----------------------------------------------------------------------------------------------- ConfigInfo::add( "Messages","configuration options related to warning and progress messages"); //----------------------------------------------------------------------------------------------- @@ -1306,7 +1315,7 @@ void init() "GENERATE_TREEVIEW", "FALSE", "should a folder tree view be generated?", - "If the GENERATE_TREEVIEW tag is set to YES, a side pannel will be\n" + "If the GENERATE_TREEVIEW tag is set to YES, a side panel will be\n" "generated containing a tree-like index structure (just like the one that \n" "is generated for HTML Help). For this to work a browser that supports \n" "JavaScript and frames is required (for instance Netscape 4.0+ \n" diff --git a/addon/xmlgen/Makefile.in b/addon/xmlgen/Makefile.in index 89d4796..05adc8b 100644 --- a/addon/xmlgen/Makefile.in +++ b/addon/xmlgen/Makefile.in @@ -5,8 +5,8 @@ distclean: clean $(RM) -f Makefile.xmlgen tmake: - export TMAKEPATH=$(TMAKEPATH) ; $(PERL) $(TMAKE) xmlgen.pro >Makefile.xmlgen + $(ENV) $(PERL) $(TMAKE) xmlgen.pro >Makefile.xmlgen Makefile.xmlgen: xmlgen.pro - export TMAKEPATH=$(TMAKEPATH) ; $(PERL) $(TMAKE) xmlgen.pro >Makefile.xmlgen + $(ENV) $(PERL) $(TMAKE) xmlgen.pro >Makefile.xmlgen diff --git a/doc/config.doc b/doc/config.doc index 653d9a9..3114b01 100644 --- a/doc/config.doc +++ b/doc/config.doc @@ -140,6 +140,7 @@ followed by the descriptions of the tags grouped by category.
  • \refitem cfg_man_output MAN_OUTPUT
  • \refitem cfg_max_dot_graph_height MAX_DOT_GRAPH_HEIGHT
  • \refitem cfg_max_dot_graph_width MAX_DOT_GRAPH_WIDTH +
  • \refitem cfg_optimize_output_for_c OPTIMIZE_OUTPUT_FOR_C
  • \refitem cfg_output_directory OUTPUT_DIRECTORY
  • \refitem cfg_output_language OUTPUT_LANGUAGE
  • \refitem cfg_paper_type PAPER_TYPE @@ -445,6 +446,14 @@ followed by the descriptions of the tags grouped by category. will result in a user defined paragraph with heading "Side Effects:". You can put \\n's in the value part of an alias to insert newlines. +\anchor cfg_optimize_output_for_c +
    \c OPTIMIZE_OUTPUT_FOR_C + \addindex OPTIMIZE_OUTPUT_FOR_C + Set the \c OPTIMIZE_OUTPUT_FOR_C tag to \c YES if your project consists + of C sources only. Doxygen will then generate output that is more tailored + for C. For instance some of the names that are used will be different. + The list of all members will be omitted, etc. + \subsection messages_input Options related to warning and progress messages diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec index 1c7fcbe..315bb0b 100644 --- a/packages/rpm/doxygen.spec +++ b/packages/rpm/doxygen.spec @@ -1,5 +1,5 @@ Name: doxygen -Version: 1.2.4-20010121 +Version: 1.2.4-20010128 Summary: documentation system for C, C++ and IDL Release: 1 Source0: doxygen-%{version}.src.tar.gz diff --git a/src/classdef.cpp b/src/classdef.cpp index b781c25..0fffcaf 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -897,7 +897,7 @@ void ClassDef::writeDocumentation(OutputList &ol) } // write link to list of all members (HTML only) - if (allMemberNameInfoList->count()>0 /*&& compType==Class*/) + if (allMemberNameInfoList->count()>0 && !Config::optimizeForCFlag) { ol.disableAllBut(OutputGenerator::Html); ol.startTextLink(memListFileName,0); @@ -1179,7 +1179,7 @@ void ClassDef::writeDocumentation(OutputList &ol) // write the list of all (inherited) members for this class void ClassDef::writeMemberList(OutputList &ol) { - if (allMemberNameInfoList->count()==0) return; + if (allMemberNameInfoList->count()==0 || Config::optimizeForCFlag) return; // only for HTML ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); @@ -1208,7 +1208,6 @@ void ClassDef::writeMemberList(OutputList &ol) if (mi->prot==Protected) // inherited protection { if (protect==Public) protect=Protected; - else if (protect==Protected) protect=Private; } //printf("Member %s of class %s mi->prot=%d prot=%d\n", @@ -1646,11 +1645,25 @@ void ClassDef::mergeMembers() MemberInfo *mi; for (;(mi=mnii.current());++mnii) { - if (mi->memberDef->protection()!=Private) + Protection prot = mi->memberDef->protection(); + if (bcd->prot==Protected) + { + if (prot==Public) prot=Protected; + } + else if (bcd->prot==Private) + { + prot=Private; + } + //printf("%s::%s: prot=%d bcd->prot=%d result=%d\n", + // name().data(),mi->memberDef->name().data(),mi->memberDef->protection(), + // bcd->prot,prot); + + if (prot!=Private) { Specifier virt=mi->virt; if (mi->virt==Normal && bcd->virt!=Normal) virt=bcd->virt; - MemberInfo *newMi=new MemberInfo(mi->memberDef,bcd->prot,virt); + + MemberInfo *newMi=new MemberInfo(mi->memberDef,prot,virt); newMi->scopePath=bClass->name()+"::"+mi->scopePath; newMi->ambigClass=mi->ambigClass; newMi->ambiguityResolutionScope=mi->ambiguityResolutionScope.copy(); diff --git a/src/config.h b/src/config.h index 2d6786c..130bf11 100644 --- a/src/config.h +++ b/src/config.h @@ -1,4 +1,4 @@ -/* This file was generated by configgen on Sun Jan 14 14:24:47 2001 +/* This file was generated by configgen on Sat Jan 27 18:27:32 2001 * from config_templ.h * * DO NOT EDIT! @@ -70,6 +70,7 @@ struct Config static bool generateTodoList; // do we want a todo list? static bool generateTestList; // do we want a test list? static QStrList aliasList; // list of aliases + static bool optimizeForCFlag; // do we parse C code? static bool quietFlag; // generate progress messages flag static bool warningFlag; // generate warnings flag static bool warningUndocFlag; // generate undocumented warnings @@ -116,7 +117,6 @@ struct Config static bool generateMan; // generate Man pages static QCString manOutputDir; // the directory to put the man pages static QCString manExtension; // extension the man page files - static bool generateXML; // generate XML output static bool preprocessingFlag; // enable preprocessing static bool macroExpansionFlag; // expand macros in the source. static bool onlyPredefinedFlag; // expand only predefined macros diff --git a/src/config.l b/src/config.l index 1bbd0c1..77cff87 100644 --- a/src/config.l +++ b/src/config.l @@ -1,4 +1,4 @@ -/* This file was generated by configgen on Sun Jan 14 14:24:47 2001 +/* This file was generated by configgen on Sat Jan 27 18:27:33 2001 * from config_templ.l * * DO NOT EDIT! @@ -107,6 +107,7 @@ QStrList Config::sectionFilterList; bool Config::generateTodoList = TRUE; bool Config::generateTestList = TRUE; QStrList Config::aliasList; +bool Config::optimizeForCFlag = FALSE; bool Config::quietFlag = FALSE; bool Config::warningFlag = TRUE; bool Config::warningUndocFlag = TRUE; @@ -153,7 +154,6 @@ QCString Config::rtfStylesheetFile; bool Config::generateMan = TRUE; QCString Config::manOutputDir = "man"; QCString Config::manExtension = ".3"; -bool Config::generateXML = FALSE; bool Config::preprocessingFlag = TRUE; bool Config::macroExpansionFlag = FALSE; bool Config::onlyPredefinedFlag = FALSE; @@ -379,6 +379,7 @@ static void readIncludeFile(const char *incName) "GENERATE_TESTLIST"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateTestList; } "ALIASES"[ \t]*"=" { BEGIN(GetStrList); l=&Config::aliasList; l->clear(); elemStr=""; } "ALIASES"[ \t]*"+=" { BEGIN(GetStrList); l=&Config::aliasList; elemStr=""; } +"OPTIMIZE_OUTPUT_FOR_C"[ \t]*"=" { BEGIN(GetBool); b=&Config::optimizeForCFlag; } "QUIET"[ \t]*"=" { BEGIN(GetBool); b=&Config::quietFlag; } "WARNINGS"[ \t]*"=" { BEGIN(GetBool); b=&Config::warningFlag; } "WARN_IF_UNDOCUMENTED"[ \t]*"=" { BEGIN(GetBool); b=&Config::warningUndocFlag; } @@ -434,7 +435,6 @@ static void readIncludeFile(const char *incName) "GENERATE_MAN"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateMan; } "MAN_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&Config::manOutputDir; s->resize(0); } "MAN_EXTENSION"[ \t]*"=" { BEGIN(GetString); s=&Config::manExtension; s->resize(0); } -"GENERATE_XML"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateXML; } "ENABLE_PREPROCESSING"[ \t]*"=" { BEGIN(GetBool); b=&Config::preprocessingFlag; } "MACRO_EXPANSION"[ \t]*"=" { BEGIN(GetBool); b=&Config::macroExpansionFlag; } "EXPAND_ONLY_PREDEF"[ \t]*"=" { BEGIN(GetBool); b=&Config::onlyPredefinedFlag; } @@ -628,6 +628,7 @@ void dumpConfig() is=Config::aliasList.next(); } } + printf("optimizeForCFlag=`%d'\n",Config::optimizeForCFlag); printf("# configuration options related to warning and progress messages\n"); printf("quietFlag=`%d'\n",Config::quietFlag); printf("warningFlag=`%d'\n",Config::warningFlag); @@ -744,8 +745,6 @@ void dumpConfig() printf("generateMan=`%d'\n",Config::generateMan); printf("manOutputDir=`%s'\n",Config::manOutputDir.data()); printf("manExtension=`%s'\n",Config::manExtension.data()); - printf("# configuration options related to the XML output\n"); - printf("generateXML=`%d'\n",Config::generateXML); printf("# Configuration options related to the preprocessor \n"); printf("preprocessingFlag=`%d'\n",Config::preprocessingFlag); printf("macroExpansionFlag=`%d'\n",Config::macroExpansionFlag); @@ -858,6 +857,7 @@ void Config::init() Config::generateTodoList = TRUE; Config::generateTestList = TRUE; Config::aliasList.clear(); + Config::optimizeForCFlag = FALSE; Config::quietFlag = FALSE; Config::warningFlag = TRUE; Config::warningUndocFlag = TRUE; @@ -904,7 +904,6 @@ void Config::init() Config::generateMan = TRUE; Config::manOutputDir = "man"; Config::manExtension = ".3"; - Config::generateXML = FALSE; Config::preprocessingFlag = TRUE; Config::macroExpansionFlag = FALSE; Config::onlyPredefinedFlag = FALSE; @@ -1385,6 +1384,18 @@ void writeTemplateConfig(QFile *f,bool sl) if (!sl) { t << "\n"; + t << "# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources \n"; + t << "# only. Doxygen will then generate output that is more tailored for C. \n"; + t << "# For instance some of the names that are used will be different. The list \n"; + t << "# of all members will be omitted, etc. \n"; + t << "\n"; + } + t << "OPTIMIZE_OUTPUT_FOR_C = "; + writeBoolValue(t,Config::optimizeForCFlag); + t << "\n"; + if (!sl) + { + t << "\n"; } t << "#---------------------------------------------------------------------------\n"; t << "# configuration options related to warning and progress messages\n"; @@ -1717,7 +1728,7 @@ void writeTemplateConfig(QFile *f,bool sl) if (!sl) { t << "\n"; - t << "# If the GENERATE_TREEVIEW tag is set to YES, a side pannel will be\n"; + t << "# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be\n"; t << "# generated containing a tree-like index structure (just like the one that \n"; t << "# is generated for HTML Help). For this to work a browser that supports \n"; t << "# JavaScript and frames is required (for instance Netscape 4.0+ \n"; @@ -1953,25 +1964,6 @@ void writeTemplateConfig(QFile *f,bool sl) t << "\n"; } t << "#---------------------------------------------------------------------------\n"; - t << "# configuration options related to the XML output\n"; - t << "#---------------------------------------------------------------------------\n"; - if (!sl) - { - t << "\n"; - t << "# If the GENERATE_XML tag is set to YES Doxygen will \n"; - t << "# generate an XML file that captures the structure of \n"; - t << "# the code including all documentation. Warning: This feature \n"; - t << "# is still experimental and very incomplete.\n"; - t << "\n"; - } - t << "GENERATE_XML = "; - writeBoolValue(t,Config::generateXML); - t << "\n"; - if (!sl) - { - t << "\n"; - } - t << "#---------------------------------------------------------------------------\n"; t << "# Configuration options related to the preprocessor \n"; t << "#---------------------------------------------------------------------------\n"; if (!sl) @@ -2912,9 +2904,13 @@ void checkConfig() } } +#undef PUTENV #if defined(_WIN32) - if (Config::haveDotFlag) _putenv("DOTFONTPATH=."); +#define PUTENV _putenv +#else +#define PUTENV putenv #endif + if (Config::haveDotFlag) PUTENV("DOTFONTPATH=."); } diff --git a/src/constexp.y b/src/constexp.y index f4306fb..f5565bc 100644 --- a/src/constexp.y +++ b/src/constexp.y @@ -32,7 +32,7 @@ int cppExpYYerror(const char *s) { - printf("ERROR: %s\n",s); + printf("Error in constant expression evaluation: %s\n",s); return 0; } diff --git a/src/definition.cpp b/src/definition.cpp index eb8b905..b068d79 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -116,8 +116,11 @@ void Definition::writeDocAnchorsToTagFile() SectionInfo *si; for (;(si=sdi.current());++sdi) { - if (definitionType()==TypeMember) Doxygen::tagFile << " "; - Doxygen::tagFile << " " << si->label << "" << endl; + if (!si->generated) + { + if (definitionType()==TypeMember) Doxygen::tagFile << " "; + Doxygen::tagFile << " " << si->label << "" << endl; + } } } } diff --git a/src/doc.l b/src/doc.l index b66a960..5c449b3 100644 --- a/src/doc.l +++ b/src/doc.l @@ -1514,6 +1514,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) outDoc->endSection(sec->label, sec->type==SectionInfo::Subsection); } + else + { + warn(yyFileName,yyLineNr,"Warning: reference to unknown section %s in the documentation of this entity!",yytext); + } } {CMD}"anchor "{ID}"\n" { QCString secName=&yytext[8]; @@ -1580,8 +1584,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) {SCOPENAME}|{FILE} { QCString ref=yytext; SectionInfo *sec; + //printf(">>> ref `%s'\n",yytext); if ((sec=Doxygen::sectionDict[ref])) { + //printf("Is a section!\n"); QCString text; if (sec->title.isEmpty()) text=sec->label; @@ -1598,7 +1604,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) else { //printf(" ref sec=%p sec->fileName=%s text=%s\n",sec,sec->fileName.data(),text.data()); - outDoc->writeSectionRef(sec->fileName,sec->label,text,sec->ref); + outDoc->writeSectionRef(sec->ref,sec->fileName,sec->label,text); } } else if (!generateLink(*outDoc,className,yytext,TRUE,0)) @@ -1631,7 +1637,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } else { - outDoc->writeSectionRef(sec->fileName,sec->label,text,sec->ref); + outDoc->writeSectionRef(sec->ref,sec->fileName,sec->label,text); } } else if (!generateLink(*outDoc,className,sectionRef,TRUE,text)) @@ -1744,18 +1750,12 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) generateRef(*outDoc,className,yytext,inSeeBlock); BEGIN(DocScan); } -({SCOPEMASK}"::")?"operator()"("("[a-z_A-Z0-9,\<\> \t\*\&]*")")? { +({SCOPEMASK}"::")?"operator"{OPMASK} { QCString oName=yytext; generateRef(*outDoc,className, removeRedundantWhiteSpace(oName),inSeeBlock); BEGIN(DocScan); } -({SCOPEMASK}"::")?"operator"[^(\r\n.,]+("("[a-z_A-Z0-9,\<\> \t\*\&]*")")? { - QCString oName=yytext; - generateRef(*outDoc,className, - removeRedundantWhiteSpace(oName),inSeeBlock); - BEGIN(DocScan); - } ("http:"|"https:"|"ftp:"|"file:"){URLMASK} { outDoc->writeHtmlLink(yytext,yytext); } [a-zA-Z_0-9\.\-]+"@"[0-9a-z_A-Z\.\-]+ { outDoc->writeMailLink(yytext); } {FILEMASK} { diff --git a/src/doxygen.cpp b/src/doxygen.cpp index bac4406..3990dd8 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -2522,7 +2522,7 @@ static void addTodoTestReferences() GroupDef *gd=Doxygen::groupList.first(); while (gd) { - addRefItem(gd->todoId(),gd->testId(),"group",gd->getOutputFileBase(),gd->name()); + addRefItem(gd->todoId(),gd->testId(),"group",gd->getOutputFileBase(),gd->groupTitle()); gd=Doxygen::groupList.next(); } PageSDictIterator pdi(*Doxygen::pageSDict); @@ -4798,6 +4798,7 @@ static void resolveUserReferences() if (si->label.left(5)=="_todo" || si->label.left(5)=="_test") { si->fileName=si->label.mid(1,4); // extract "todo" or "test" + si->generated=TRUE; } } } @@ -4839,7 +4840,7 @@ static void generatePageDocs() endFile(*outputList); outputList->enable(OutputGenerator::Man); - if (!Config::genTagFile.isEmpty()) + if (!Config::genTagFile.isEmpty() && pi->name!="todo" && pi->name!="test") { Doxygen::tagFile << " " << endl; Doxygen::tagFile << " " << pi->name << "" << endl; diff --git a/src/groupdef.cpp b/src/groupdef.cpp index 4bf262a..43ff8f3 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -42,7 +42,7 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t) : pageDict = new PageSDict(257); exampleDict = new PageSDict(257); allMemberList = new MemberList; - allMemberDict = new QDict; + allMemberNameInfoDict = new MemberNameInfoDict(1009); if (t) title = t; else @@ -67,7 +67,7 @@ GroupDef::~GroupDef() delete pageDict; delete exampleDict; delete allMemberList; - delete allMemberDict; + delete allMemberNameInfoDict; delete memberGroupList; delete memberGroupDict; } @@ -161,60 +161,77 @@ void GroupDef::addMembersToMemberGroup() void GroupDef::insertMember(MemberDef *md) { - QCString funcDecl=md->name()+md->argsString(); - if (allMemberDict->find(funcDecl)==0) - { - allMemberList->append(md); - allMemberDict->insert(funcDecl,md); - switch(md->memberType()) + //printf("GroupDef::insertMember(%s)\n",md->name().data()); + MemberNameInfo *mni=0; + if ((mni=(*allMemberNameInfoDict)[md->name()])) + { // member with this name already found + MemberNameInfoIterator srcMnii(*mni); + MemberInfo *srcMi; + for ( ; (srcMi=srcMnii.current()) ; ++srcMnii ) { - case MemberDef::Variable: - if (Config::sortMembersFlag) - varMembers.inSort(md); - else - varMembers.append(md); - break; - case MemberDef::Function: - if (Config::sortMembersFlag) - funcMembers.inSort(md); - else - funcMembers.append(md); - break; - case MemberDef::Typedef: - if (Config::sortMembersFlag) - typedefMembers.inSort(md); - else - typedefMembers.append(md); - break; - case MemberDef::Enumeration: - if (Config::sortMembersFlag) - enumMembers.inSort(md); - else - enumMembers.append(md); - break; - case MemberDef::EnumValue: - if (Config::sortMembersFlag) - enumValMembers.inSort(md); - else - enumValMembers.append(md); - break; - case MemberDef::Prototype: - if (Config::sortMembersFlag) - protoMembers.inSort(md); - else - protoMembers.append(md); - break; - case MemberDef::Define: - if (Config::sortMembersFlag) - defineMembers.inSort(md); - else - defineMembers.append(md); - break; - default: - err("FileDef::insertMembers(): unexpected member insert in file!\n"); + MemberDef *srcMd = srcMi->memberDef; + if (matchArguments(srcMd->argumentList(),md->argumentList())) + { + return; // member already added + } } - //addMemberToGroup(md,groupId); + mni->append(new MemberInfo(md,Public,Normal)); + } + else + { + mni = new MemberNameInfo(md->name()); + mni->append(new MemberInfo(md,Public,Normal)); + allMemberNameInfoDict->insert(mni->memberName(),mni); + } + allMemberList->append(md); + switch(md->memberType()) + { + case MemberDef::Variable: + if (Config::sortMembersFlag) + varMembers.inSort(md); + else + varMembers.append(md); + break; + case MemberDef::Function: + if (Config::sortMembersFlag) + funcMembers.inSort(md); + else + funcMembers.append(md); + break; + case MemberDef::Typedef: + if (Config::sortMembersFlag) + typedefMembers.inSort(md); + else + typedefMembers.append(md); + break; + case MemberDef::Enumeration: + if (Config::sortMembersFlag) + enumMembers.inSort(md); + else + enumMembers.append(md); + break; + case MemberDef::EnumValue: + if (Config::sortMembersFlag) + enumValMembers.inSort(md); + else + enumValMembers.append(md); + break; + case MemberDef::Prototype: + if (Config::sortMembersFlag) + protoMembers.inSort(md); + else + protoMembers.append(md); + break; + case MemberDef::Define: + if (Config::sortMembersFlag) + defineMembers.inSort(md); + else + defineMembers.append(md); + break; + default: + err("FileDef::insertMembers(): unexpected member insert in file!\n"); } + //addMemberToGroup(md,groupId); } void GroupDef::addGroup(const GroupDef *def) diff --git a/src/groupdef.h b/src/groupdef.h index 649f70d..4c87efc 100644 --- a/src/groupdef.h +++ b/src/groupdef.h @@ -36,6 +36,7 @@ class OutputList; class NamespaceList; class MemberGroupList; class MemberGroupDict; +class MemberNameInfoDict; class PageSDict; class PageInfo; @@ -86,8 +87,8 @@ class GroupDef : public Definition PageSDict *pageDict; // list of pages in the group PageSDict *exampleDict; // list of examples in the group - MemberList *allMemberList; // list of all members in the group - QDict *allMemberDict; + MemberList *allMemberList; + MemberNameInfoDict *allMemberNameInfoDict; // members sorted by type MemberList defineMembers; diff --git a/src/index.cpp b/src/index.cpp index 00b2514..bdb93e2 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -49,6 +49,7 @@ int documentedNamespaces; int documentedNamespaceMembers; int documentedIncludeFiles; int documentedPages; +int indexedPages; int documentedPackages; int countClassHierarchy(); @@ -60,7 +61,7 @@ int countNamespaces(); int countAnnotatedClasses(); int countNamespaceMembers(); int countIncludeFiles(); -int countRelatedPages(); +void countRelatedPages(int &docPages,int &indexPages); int countPackages(); void countDataStructures() @@ -70,10 +71,10 @@ void countDataStructures() documentedMembers = countClassMembers(); documentedFunctions = countFileMembers(); countFiles(documentedHtmlFiles,documentedFiles); + countRelatedPages(documentedPages,indexedPages); documentedGroups = countGroups(); documentedNamespaces = countNamespaces(); documentedNamespaceMembers = countNamespaceMembers(); - documentedPages = countRelatedPages(); documentedPackages = countPackages(); } @@ -249,7 +250,7 @@ void writeQuickLinks(OutputList &ol,bool compact ,bool ext=FALSE) parseText(ol,theTranslator->trFileMembers()); ol.endQuickIndexItem(); } - if (documentedPages>0) + if (indexedPages>0) { if (!compact) ol.writeListItem(); ol.startQuickIndexItem(extLink,"pages.html"); @@ -780,36 +781,47 @@ void writeFileIndex(OutputList &ol) OutputNameList outputNameList; outputNameList.setAutoDelete(TRUE); - // re-sort input files in (dir,file) output order instead of (file,dir) input order - FileName *fn=Doxygen::inputNameList.first(); - while (fn) + if (Config::fullPathNameFlag) { - FileDef *fd=fn->first(); - while (fd) + // re-sort input files in (dir,file) output order instead of (file,dir) input order + FileName *fn=Doxygen::inputNameList.first(); + while (fn) { - QCString path=fd->getPath(); - if (path.isEmpty()) path="[external]"; - FileList *fl = outputNameDict.find(path); - if (fl) + FileDef *fd=fn->first(); + while (fd) { - fl->inSort(fd); - //printf("+ inserting %s---%s\n",fd->getPath().data(),fd->name().data()); - } - else - { - //printf("o inserting %s---%s\n",fd->getPath().data(),fd->name().data()); - fl = new FileList(path); - fl->inSort(fd); - outputNameList.inSort(fl); - outputNameDict.insert(path,fl); + QCString path=fd->getPath(); + if (path.isEmpty()) path="[external]"; + FileList *fl = outputNameDict.find(path); + if (fl) + { + fl->inSort(fd); + //printf("+ inserting %s---%s\n",fd->getPath().data(),fd->name().data()); + } + else + { + //printf("o inserting %s---%s\n",fd->getPath().data(),fd->name().data()); + fl = new FileList(path); + fl->inSort(fd); + outputNameList.inSort(fl); + outputNameDict.insert(path,fl); + } + fd=fn->next(); } - fd=fn->next(); + fn=Doxygen::inputNameList.next(); } - fn=Doxygen::inputNameList.next(); } ol.startIndexList(); - FileList *fl=outputNameList.first(); + FileList *fl=0; + if (Config::fullPathNameFlag) + { + fl = outputNameList.first(); + } + else + { + fl = Doxygen::inputNameList.first(); + } while (fl) { FileDef *fd=fl->first(); @@ -910,7 +922,14 @@ void writeFileIndex(OutputList &ol) } fd=fl->next(); } - fl=outputNameList.next(); + if (Config::fullPathNameFlag) + { + fl=outputNameList.next(); + } + else + { + fl=Doxygen::inputNameList.next(); + } } ol.endIndexList(); if (hasHtmlHelp) @@ -1944,16 +1963,19 @@ void writeExampleIndex(OutputList &ol) //---------------------------------------------------------------------------- -int countRelatedPages() +void countRelatedPages(int &docPages,int &indexPages) { - int count=0; + docPages=indexPages=0; PageSDictIterator pdi(*Doxygen::pageSDict); PageInfo *pi=0; for (pdi.toFirst();(pi=pdi.current());++pdi) { - if (!pi->inGroup && !pi->isReference()) count++; + if (!pi->inGroup) + { + indexPages++; + if (!pi->isReference()) docPages++; + } } - return count; } //---------------------------------------------------------------------------- @@ -1977,7 +1999,7 @@ int countPackages() void writePageIndex(OutputList &ol) { - if (documentedPages==0) return; + if (indexedPages==0) return; ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); startFile(ol,"pages","Page Index"); @@ -2013,7 +2035,7 @@ void writePageIndex(OutputList &ol) PageInfo *pi=0; for (pdi.toFirst();(pi=pdi.current());++pdi) { - if (!pi->inGroup && !pi->isReference()) + if (!pi->inGroup /*&& !pi->isReference()*/) { QCString pageName,pageTitle; @@ -2027,10 +2049,16 @@ void writePageIndex(OutputList &ol) else pageTitle=pi->title; - //ol.writeListItem(); - ol.writeStartAnnoItem("pages",pageName,0,pageTitle); - //ol.writeObjectLink(0,pageName,0,pageTitle); - ol.writeEndAnnoItem(pageName); + ol.writeIndexItem(pi->getReference(),pi->getOutputFileBase(),pageTitle); + if (pi->isReference()) + { + ol.startTypewriter(); + ol.docify(" [external]"); + ol.endTypewriter(); + } + //ol.writeStartAnnoItem("pages",pageName,0,pageTitle); + ////ol.writeObjectLink(0,pageName,0,pageTitle); + //ol.writeEndAnnoItem(pageName); ol.writeString("\n"); if (hasHtmlHelp) htmlHelp->addContentsItem(FALSE,pageTitle,pageName); if (hasFtvHelp) ftvHelp->addContentsItem(FALSE,0,pageName,0,pageTitle); @@ -2535,7 +2563,7 @@ void writeIndex(OutputList &ol) parseText(ol,projPrefix+theTranslator->trFileIndex()); ol.endIndexSection(isFileIndex); } - if (documentedPages>0) + if (indexedPages>0) { ol.startIndexSection(isPageIndex); parseText(ol,projPrefix+theTranslator->trPageIndex()); @@ -2578,7 +2606,7 @@ void writeIndex(OutputList &ol) parseText(ol,projPrefix+theTranslator->trExampleDocumentation()); ol.endIndexSection(isExampleDocumentation); } - if (Doxygen::pageSDict->count()>0) + if (documentedPages>0) { ol.startIndexSection(isPageDocumentation); parseText(ol,projPrefix+theTranslator->trPageDocumentation()); diff --git a/src/index.h b/src/index.h index a81ccf5..eb9a38f 100644 --- a/src/index.h +++ b/src/index.h @@ -81,6 +81,7 @@ extern int documentedNamespaces; extern int documentedNamespaceMembers; extern int documentedIncludeFiles; extern int documentedPages; +extern int indexedPages; extern int documentedPackages; void startTitle(OutputList &ol,const char *fileName); diff --git a/src/main.cpp b/src/main.cpp index 7ae98c7..0406802 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,3 +1,21 @@ +/****************************************************************************** + * + * + * + * + * Copyright (C) 1997-2001 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + #include "doxygen.h" /*! \file diff --git a/src/outputgen.h b/src/outputgen.h index 12e4291..93f1046 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -368,7 +368,7 @@ class OutputGenerator : public BaseOutputDocInterface QStack *genStack; }; -/*! \brief Base Interface used for generating documentation. +/*! \brief Interface used for generating documentation. * * This abstract class is used by the documentation block * parser to generate the output for a specific format. diff --git a/src/pre.l b/src/pre.l index 4cb163b..59b542d 100644 --- a/src/pre.l +++ b/src/pre.l @@ -1240,9 +1240,9 @@ BN [ \t\r\n] } . . -{ID} { +{ID} { Define *def; - if ((def=isDefined(yytext))) + if ((def=isDefined(yytext)) && !def->isPredefined) { //printf("undefining %s\n",yytext); def->undef=TRUE; diff --git a/src/scanner.l b/src/scanner.l index 2243676..9ff3bbc 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -273,6 +273,7 @@ static void addSection() warn(yyFileName,yyLineNr, "Warning: Duplicate label %s found!",sectionLabel.data()); } + sectionTitle.resize(0); } // Adds a formula text to the list/dictionary of formulas if it was @@ -1385,6 +1386,7 @@ TITLE [tT][iI][tT][lL][eE] current->name.resize(0); current->args.resize(0); current->initializer.resize(0); + current->bitfields.resize(0); int i=oldType.length(); while (i>0 && (oldType[i-1]=='*' || oldType[i-1]=='&' || oldType[i-1]==' ')) i--; current->type = oldType.left(i); @@ -3085,8 +3087,8 @@ TITLE [tT][iI][tT][lL][eE] [^\n*]*/"\n" { sectionTitle+=yytext; sectionTitle=sectionTitle.stripWhiteSpace(); - addSection(); current->doc += "\\section "+sectionLabel+"\n"; + addSection(); BEGIN(PageDoc); } "*" { diff --git a/src/section.h b/src/section.h index 58605fa..90ac2d4 100644 --- a/src/section.h +++ b/src/section.h @@ -30,7 +30,7 @@ struct SectionInfo { enum SectionType { Section, Subsection, 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; } + { label=l; title=t; type=st; ref=r; definition=0; pageRef=0; generated=FALSE; } ~SectionInfo() {} QCString label; QCString title; @@ -39,6 +39,7 @@ struct SectionInfo Definition *definition; PageInfo *pageRef; QCString fileName; + bool generated; }; class SectionDict : public QDict diff --git a/src/tagreader.cpp b/src/tagreader.cpp index 997f171..9070103 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -32,6 +32,7 @@ #include "doxygen.h" #include "util.h" #include "message.h" +//#include "reflist.h" /*! Container for member specific info that can be read from a tagfile */ class TagMemberInfo @@ -740,17 +741,36 @@ void TagFileParser::addDocAnchors(Entry *e,QStrList &l) while (s) { QCString *anchorName = new QCString(s); - 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 (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()); + } + //} s=l.next(); } } diff --git a/src/translator.h b/src/translator.h index 0c203fa..e458c0f 100644 --- a/src/translator.h +++ b/src/translator.h @@ -21,6 +21,7 @@ #include "qtbc.h" #include "classdef.h" #include "util.h" +#include "config.h" class Translator { @@ -167,7 +168,16 @@ class Translator /*! header that is put before the list of member attributes. */ virtual QCString trMemberDataDocumentation() - { return "Member Data Documentation"; } + { + if (Config::optimizeForCFlag) + { + return "Field Documentation"; + } + else + { + return "Member Data Documentation"; + } + } /*! this is the text of a link put after brief descriptions. */ virtual QCString trMore() @@ -231,7 +241,16 @@ class Translator /*! This is put above each page as a link to the list of annotated classes */ virtual QCString trCompoundList() - { return "Compound List"; } + { + if (Config::optimizeForCFlag) + { + return "Data Structures"; + } + else + { + return "Compound List"; + } + } /*! This is put above each page as a link to the list of documented files */ virtual QCString trFileList() @@ -243,11 +262,29 @@ class Translator /*! This is put above each page as a link to all members of compounds. */ virtual QCString trCompoundMembers() - { return "Compound Members"; } + { + if (Config::optimizeForCFlag) + { + return "Data Fields"; + } + else + { + return "Compound Members"; + } + } /*! This is put above each page as a link to all members of files. */ virtual QCString trFileMembers() - { return "File Members"; } + { + if (Config::optimizeForCFlag) + { + return "Globals"; + } + else + { + return "File Members"; + } + } /*! This is put above each page as a link to all related pages. */ virtual QCString trRelatedPages() @@ -278,8 +315,17 @@ class Translator /*! This is an introduction to the annotated compound list. */ virtual QCString trCompoundListDescription() - { return "Here are the classes, structs, " - "unions and interfaces with brief descriptions:"; + { + + if (Config::optimizeForCFlag) + { + return "Here are the data structures with brief descriptions:"; + } + else + { + return "Here are the classes, structs, " + "unions and interfaces with brief descriptions:"; + } } /*! This is an introduction to the page with all class members. */ @@ -300,11 +346,20 @@ class Translator { QCString result="Here is a list of all "; if (!extractAll) result+="documented "; - result+="file members with links to "; + + if (Config::optimizeForCFlag) + { + result+="functions, variables, defines, enums, and typedefs"; + } + else + { + result+="file members"; + } + result+=" with links to "; if (extractAll) - result+="the file documentation for each member:"; - else result+="the files they belong to:"; + else + result+="the documentation:"; return result; } @@ -353,7 +408,16 @@ class Translator * annotated compound index. */ virtual QCString trCompoundIndex() - { return "Compound Index"; } + { + if (Config::optimizeForCFlag) + { + return "Data Structure Index"; + } + else + { + return "Compound Index"; + } + } /*! This is used in LaTeX as the title of the chapter with the * list of all files. @@ -487,7 +551,16 @@ class Translator * the list of links to documented compounds */ virtual QCString trCompounds() - { return "Compounds"; } + { + if (Config::optimizeForCFlag) + { + return "Data Structures"; + } + else + { + return "Compounds"; + } + } /*! This is used in the documentation of a group before the list of * links to documented files @@ -919,7 +992,14 @@ class Translator } virtual QCString trPublicAttribs() { - return "Public Attributes"; + if (Config::optimizeForCFlag) + { + return "Data Fields"; + } + else + { + return "Public Attributes"; + } } virtual QCString trStaticPublicAttribs() { diff --git a/src/translator_cz.h b/src/translator_cz.h index 6f41444..51c1530 100644 --- a/src/translator_cz.h +++ b/src/translator_cz.h @@ -20,24 +20,30 @@ #include "translator.h" -// The translation from English to Czech by Vlastimil Havran. -// In the cases where are more translations possible I hope -// that I have selected the most reasonable text. If not, please, -// mail the comments and text proposals to +// The first translation from English to Czech was started by +// Vlastimil Havran. He wrote: +// +// "In the cases where are more translations possible I hope +// that I have selected the most reasonable text. If not, please, +// mail the comments and text proposals to // -// havran@fel.cvut.cz, 1999/04/11 +// havran@fel.cvut.cz, 1999/04/11" +// +// The prototype version of Czech strings with diacritics was +// implemented by Petr Prikryl (prikrylp@skil.cz), 2000/06/20. As +// Vlastimil was quite busy at the time, he agreed that Petr be the +// second maintainer. // // Updates: // -------- -// 2000/06/20 -// - The prototype version of Czech strings with diacritics implemented by -// Petr Prikryl (prikrylp@skil.cz). (Vlastimil Havran is still -// the maintainer.) The translation was based on translator.h -// of Doxygen versison 1.1.4 (from scratch). +// 2000/06/20 (Petr Prikryl) +// - The prototype version of Czech strings with diacritics. The +// translation was based on translator.h of Doxygen version +// 1.1.4 (from scratch). // // 2000/07/10 (Petr Prikryl) // - Updated version based on 1.1.5 sources (including important updates -// of the up-to-1.1.4 strings). Czech strings this file were written +// of the up-to-1.1.4 strings). Czech strings in this file were written // in windows-1250 encoding. On-line decoding into iso-8859-2 ensured // via conditional compilation if the sources are compiled under UNIX. // @@ -73,14 +79,19 @@ // // 2000/10/17 (Petr Prikryl) // - Update for "new since 1.2.2" version. +// +// 2001/01/09 (Petr Prikryl) +// - Update for "new since 1.2.4" version. As I do not use Java, +// I tried my best to guess the Czech terminology for the Java. +// Let me know if some wording should be changed/improved. // // Notices: // -------- // The conditional compilation ensures or the neutral functionality // of the private inline Decode(), or calling the WinToISO() method // for on-line encoding conversion. If you want to maintain the -// source in the iso-8859-2, do convert the source encoding, change -// the conditional definition of the inline Decode() using the +// source in the iso-8859-2, do convert the encoding of the source, +// change the conditional definition of the inline Decode() using the // method ISO88592ToWin1250() -- for conversion of strings for the // Windows version. The version which does not call the function is // probably slightly faster. @@ -1126,6 +1137,46 @@ class TranslatorCzech : public Translator { return Decode("Dokumentace k vlastnosti"); } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.4 +////////////////////////////////////////////////////////////////////////// + + /*! Used for Java interfaces in the summary section of Java packages */ + virtual QCString trInterfaces() + { + return Decode("Rozhraní"); + } + /*! Used for Java classes in the summary section of Java packages */ + virtual QCString trClasses() + { + return Decode("Třídy"); + } + /*! Used as the title of a Java package */ + virtual QCString trPackage(const char *name) + { + return Decode((QCString)"Balík "+name); + } + /*! Title of the package index page */ + virtual QCString trPackageList() + { + return Decode("Seznam balíků"); + } + /*! The description of the package index page */ + virtual QCString trPackageListDescription() + { + return Decode("Zde naleznete seznam balíků se stručným popisem " + "(pokud byl uveden):"); + } + /*! The link name in the Quick links header for each page */ + virtual QCString trPackages() + { + return Decode("Balíky"); + } + /*! Used as a chapter title for Latex & RTF output */ + virtual QCString trPackageDocumentation() + { + return Decode("Dokumentace balíku"); + } }; #endif // TRANSLATOR_CZ_H diff --git a/src/translator_de.h b/src/translator_de.h index 5a5ee53..633c984 100644 --- a/src/translator_de.h +++ b/src/translator_de.h @@ -383,7 +383,7 @@ class TranslatorGerman : public Translator QCString trNamespaceList() // used as the title of page containing all the index of all namespaces. - { return "Lister aller Namensberiche"; } + { return "Liste aller Namensbereiche"; } QCString trNamespaceListDescription(bool extractAll) // used as an introduction to the namespace list { diff --git a/src/translator_nl.h b/src/translator_nl.h index 3ac1887..e2e139b 100644 --- a/src/translator_nl.h +++ b/src/translator_nl.h @@ -218,7 +218,7 @@ class TranslatorDutch : public Translator QCString trAuthors() { return "Auteur(s)"; } QCString trReturns() - { return "Retourneerd"; } + { return "Retourneert"; } QCString trSeeAlso() { return "Zie ook"; } QCString trParameters() diff --git a/src/util.cpp b/src/util.cpp index b1ba148..a0cf5b3 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -158,6 +158,7 @@ int iSystem(const char *command,const char *args,bool isBatchFile) else if (sInfo.hProcess) /* executable was launched, wait for it to finish */ { WaitForSingleObject(sInfo.hProcess,INFINITE); + CloseHandle(sInfo.hProcess); } } return 0; -- cgit v0.12