diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-01-28 18:16:38 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-01-28 18:16:38 (GMT) |
commit | 1426e2fbce1e3e4c8089b228c843042c90b2d1c4 (patch) | |
tree | 26b976ebd24f845a5cf88ab76f81f928c47c4548 /src | |
parent | bf4bb2e1e1fb5e61fa5a7458f6354002994fa5ee (diff) | |
download | Doxygen-1426e2fbce1e3e4c8089b228c843042c90b2d1c4.zip Doxygen-1426e2fbce1e3e4c8089b228c843042c90b2d1c4.tar.gz Doxygen-1426e2fbce1e3e4c8089b228c843042c90b2d1c4.tar.bz2 |
Release-1.2.4-20010128
Diffstat (limited to 'src')
-rw-r--r-- | src/classdef.cpp | 23 | ||||
-rw-r--r-- | src/config.h | 4 | ||||
-rw-r--r-- | src/config.l | 50 | ||||
-rw-r--r-- | src/constexp.y | 2 | ||||
-rw-r--r-- | src/definition.cpp | 7 | ||||
-rw-r--r-- | src/doc.l | 18 | ||||
-rw-r--r-- | src/doxygen.cpp | 5 | ||||
-rw-r--r-- | src/groupdef.cpp | 123 | ||||
-rw-r--r-- | src/groupdef.h | 5 | ||||
-rw-r--r-- | src/index.cpp | 104 | ||||
-rw-r--r-- | src/index.h | 1 | ||||
-rw-r--r-- | src/main.cpp | 18 | ||||
-rw-r--r-- | src/outputgen.h | 2 | ||||
-rw-r--r-- | src/pre.l | 4 | ||||
-rw-r--r-- | src/scanner.l | 4 | ||||
-rw-r--r-- | src/section.h | 3 | ||||
-rw-r--r-- | src/tagreader.cpp | 42 | ||||
-rw-r--r-- | src/translator.h | 104 | ||||
-rw-r--r-- | src/translator_cz.h | 77 | ||||
-rw-r--r-- | src/translator_de.h | 2 | ||||
-rw-r--r-- | src/translator_nl.h | 2 | ||||
-rw-r--r-- | src/util.cpp | 1 |
22 files changed, 417 insertions, 184 deletions
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) <Start>"GENERATE_TESTLIST"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateTestList; } <Start>"ALIASES"[ \t]*"=" { BEGIN(GetStrList); l=&Config::aliasList; l->clear(); elemStr=""; } <Start>"ALIASES"[ \t]*"+=" { BEGIN(GetStrList); l=&Config::aliasList; elemStr=""; } +<Start>"OPTIMIZE_OUTPUT_FOR_C"[ \t]*"=" { BEGIN(GetBool); b=&Config::optimizeForCFlag; } <Start>"QUIET"[ \t]*"=" { BEGIN(GetBool); b=&Config::quietFlag; } <Start>"WARNINGS"[ \t]*"=" { BEGIN(GetBool); b=&Config::warningFlag; } <Start>"WARN_IF_UNDOCUMENTED"[ \t]*"=" { BEGIN(GetBool); b=&Config::warningUndocFlag; } @@ -434,7 +435,6 @@ static void readIncludeFile(const char *incName) <Start>"GENERATE_MAN"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateMan; } <Start>"MAN_OUTPUT"[ \t]*"=" { BEGIN(GetString); s=&Config::manOutputDir; s->resize(0); } <Start>"MAN_EXTENSION"[ \t]*"=" { BEGIN(GetString); s=&Config::manExtension; s->resize(0); } -<Start>"GENERATE_XML"[ \t]*"=" { BEGIN(GetBool); b=&Config::generateXML; } <Start>"ENABLE_PREPROCESSING"[ \t]*"=" { BEGIN(GetBool); b=&Config::preprocessingFlag; } <Start>"MACRO_EXPANSION"[ \t]*"=" { BEGIN(GetBool); b=&Config::macroExpansionFlag; } <Start>"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 << " <docanchor>" << si->label << "</docanchor>" << endl; + if (!si->generated) + { + if (definitionType()==TypeMember) Doxygen::tagFile << " "; + Doxygen::tagFile << " <docanchor>" << si->label << "</docanchor>" << endl; + } } } } @@ -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); + } } <DocScan>{CMD}"anchor "{ID}"\n" { QCString secName=&yytext[8]; @@ -1580,8 +1584,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) <DocRefName>{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); } -<DocScan,DocRefName>({SCOPEMASK}"::")?"operator()"("("[a-z_A-Z0-9,\<\> \t\*\&]*")")? { +<DocScan,DocRefName>({SCOPEMASK}"::")?"operator"{OPMASK} { QCString oName=yytext; generateRef(*outDoc,className, removeRedundantWhiteSpace(oName),inSeeBlock); BEGIN(DocScan); } -<DocScan,DocRefName>({SCOPEMASK}"::")?"operator"[^(\r\n.,]+("("[a-z_A-Z0-9,\<\> \t\*\&]*")")? { - QCString oName=yytext; - generateRef(*outDoc,className, - removeRedundantWhiteSpace(oName),inSeeBlock); - BEGIN(DocScan); - } <DocScan>("http:"|"https:"|"ftp:"|"file:"){URLMASK} { outDoc->writeHtmlLink(yytext,yytext); } <DocScan>[a-zA-Z_0-9\.\-]+"@"[0-9a-z_A-Z\.\-]+ { outDoc->writeMailLink(yytext); } <DocScan>{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 << " <compound kind=\"page\">" << endl; Doxygen::tagFile << " <name>" << pi->name << "</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<MemberDef>; + 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<MemberDef> *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<bool> *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. @@ -1240,9 +1240,9 @@ BN [ \t\r\n] } <IgnoreLine>. <Command>. -<UndefName>{ID} { +<UndefName>{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] <SectionTitle>[^\n*]*/"\n" { sectionTitle+=yytext; sectionTitle=sectionTitle.stripWhiteSpace(); - addSection(); current->doc += "\\section "+sectionLabel+"\n"; + addSection(); BEGIN(PageDoc); } <SectionTitle>"*" { 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<SectionInfo> 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; |