summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixFCmd.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-10 13:12:20 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-10 13:12:20 (GMT)
commit94561c377266d0a78fa2eadbeeaa4145a2cd9dd6 (patch)
treee391322db983c54ccb679befcd7921c89daddaaa /unix/tclUnixFCmd.c
parentdb32aeed9858ddb8dd0828e2fb7ef36ac46bc5f6 (diff)
downloadtcl-94561c377266d0a78fa2eadbeeaa4145a2cd9dd6.zip
tcl-94561c377266d0a78fa2eadbeeaa4145a2cd9dd6.tar.gz
tcl-94561c377266d0a78fa2eadbeeaa4145a2cd9dd6.tar.bz2
Unbreak msvc builds, by depending on tclPort.h for inclusion of <sys/stat.h>.
Diffstat (limited to 'unix/tclUnixFCmd.c')
-rw-r--r--unix/tclUnixFCmd.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index d655990..b5450b1 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -40,7 +40,6 @@
* DAMAGE.
*/
-#include <sys/stat.h>
#include "tclInt.h"
#include <utime.h>
#include <grp.h>
startFile(ol,"functions","Compound Member Index"); startTitle(ol,0); parseText(ol,Config::projectName+" "+theTranslator->trCompoundMembers()); endTitle(ol,0,0); + bool quickIndex = documentedMembers>50; + if (quickIndex) + { + writeQuickMemberIndex(ol,g_memberIndexLetterUsed); + } parseText(ol,theTranslator->trCompoundMembersDescription(Config::extractAllFlag)); - writeMemberList(ol); + writeMemberList(ol,quickIndex); endFile(ol); - //ol.enable(OutputGenerator::Latex); - //ol.enable(OutputGenerator::Man); ol.popGeneratorState(); } //---------------------------------------------------------------------------- -void writeFileMemberList(OutputList &ol) +void writeFileMemberList(OutputList &ol,bool useSections) { - ol.startItemList(); + char lastChar=0; + bool first=TRUE; MemberName *mn=functionNameList.first(); while (mn) { @@ -1079,15 +1119,32 @@ void writeFileMemberList(OutputList &ol) if (fd && hasDocs && md->isLinkableInProject() - //!md->isReference() && - //md->hasDocumentation() && - //md->name()[0]!='@' ) found=TRUE; else md=mn->next(); } if (found) // function is documented { + if (useSections) + { + QCString name = mn->memberName(); + if (tolower(name.at(0))!=lastChar) + { + if (!first) ol.endItemList(); + char cs[2]; + lastChar=cs[0]=tolower(name.at(0));cs[1]='\0'; + QCString anchor=(QCString)"index_"+cs; + QCString title=(QCString)"- "+cs+" -"; + ol.writeSection(anchor,title,TRUE); + ol.startItemList(); + first=FALSE; + } + } + else if (first) + { + first=FALSE; + ol.startItemList(); + } ol.writeListItem(); ol.docify(md->name()); if (md->isFunction()) ol.docify("()"); @@ -1103,9 +1160,6 @@ void writeFileMemberList(OutputList &ol) md->getFileDef()->isLinkableInProject(); if (fd && hasDocs && md->isLinkableInProject() && - //!md->isReference() && - //md->hasDocumentation() && - //md->name()[0]!='@' && prevName!=fd->name()) { if (count==0) @@ -1113,9 +1167,6 @@ void writeFileMemberList(OutputList &ol) else ol.docify(", "); QCString baseName=fd->name().copy(); - //int s; - //if ((s=baseName.findRev("/"))!=-1) - // baseName=baseName.right(baseName.length()-s-1); ol.writeObjectLink(fd->getReference(), fd->getOutputFileBase(),md->anchor(), baseName); count++; @@ -1131,8 +1182,10 @@ void writeFileMemberList(OutputList &ol) //---------------------------------------------------------------------------- -void writeNamespaceMemberList(OutputList &ol) +void writeNamespaceMemberList(OutputList &ol,bool useSections) { + char lastChar=0; + bool first=TRUE; ol.startItemList(); MemberName *mn=functionNameList.first(); while (mn) @@ -1149,6 +1202,26 @@ void writeNamespaceMemberList(OutputList &ol) } if (found) // member is documented and in a documented namespace { + if (useSections) + { + QCString name = mn->memberName(); + if (tolower(name.at(0))!=lastChar) + { + if (!first) ol.endItemList(); + char cs[2]; + lastChar=cs[0]=tolower(name.at(0));cs[1]='\0'; + QCString anchor=(QCString)"index_"+cs; + QCString title=(QCString)"- "+cs+" -"; + ol.writeSection(anchor,title,TRUE); + ol.startItemList(); + first=FALSE; + } + } + else if (first) + { + first=FALSE; + ol.startItemList(); + } ol.writeListItem(); ol.docify(md->name()); if (md->isFunction()) ol.docify("()"); @@ -1185,6 +1258,7 @@ void writeNamespaceMemberList(OutputList &ol) int countNamespaceMembers() { + int i=0;for (i=0;i<256;i++) g_namespaceIndexLetterUsed[i]=FALSE; int count=0; MemberName *mn=functionNameList.first(); while (mn) @@ -1195,7 +1269,11 @@ int countNamespaceMembers() { NamespaceDef *nd=md->getNamespaceDef(); if (nd && nd->isLinkableInProject() && md->isLinkableInProject()) + { + QCString n = mn->memberName(); + if (!n.isEmpty()) g_namespaceIndexLetterUsed[tolower(n.at(0))]=TRUE; found=TRUE; + } else md=mn->next(); } @@ -1209,6 +1287,7 @@ int countNamespaceMembers() int countFileMembers() { + int i=0;for (i=0;i<256;i++) g_fileIndexLetterUsed[i]=FALSE; int count=0; MemberName *mn=functionNameList.first(); while (mn) @@ -1222,7 +1301,11 @@ int countFileMembers() (fd=md->getFileDef()) && fd->isLinkableInProject() ) + { + QCString n = mn->memberName(); + if (!n.isEmpty()) g_fileIndexLetterUsed[tolower(n.at(0))]=TRUE; found=TRUE; + } else md=mn->next(); } @@ -1243,8 +1326,13 @@ void writeFileMemberIndex(OutputList &ol) startTitle(ol,0); parseText(ol,Config::projectName+" "+theTranslator->trFileMembers()); endTitle(ol,0,0); + bool quickIndex = documentedMembers>50; + if (quickIndex) + { + writeQuickMemberIndex(ol,g_fileIndexLetterUsed); + } parseText(ol,theTranslator->trFileMembersDescription(Config::extractAllFlag)); - writeFileMemberList(ol); + writeFileMemberList(ol,quickIndex); endFile(ol); ol.popGeneratorState(); } @@ -1256,17 +1344,18 @@ void writeNamespaceMemberIndex(OutputList &ol) if (documentedNamespaceMembers==0) return; ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Html); - //ol.disable(OutputGenerator::Man); - //ol.disable(OutputGenerator::Latex); startFile(ol,"namespacemembers","Namespace Member Index"); startTitle(ol,0); parseText(ol,Config::projectName+" "+theTranslator->trNamespaceMembers()); endTitle(ol,0,0); + bool quickIndex = documentedMembers>50; + if (quickIndex) + { + writeQuickMemberIndex(ol,g_namespaceIndexLetterUsed); + } parseText(ol,theTranslator->trNamespaceMemberDescription(Config::extractAllFlag)); - writeNamespaceMemberList(ol); + writeNamespaceMemberList(ol,quickIndex); endFile(ol); - //ol.enable(OutputGenerator::Latex); - //ol.enable(OutputGenerator::Man); ol.popGeneratorState(); } @@ -1360,7 +1449,7 @@ void writeNamespaceMemberIndex(OutputList &ol) void writeExampleIndex(OutputList &ol) { - if (exampleList.count()==0) return; + if (exampleSDict->count()==0) return; ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); startFile(ol,"examples","Example Index"); @@ -1382,8 +1471,9 @@ void writeExampleIndex(OutputList &ol) //ol.newParagraph(); ol.endTextBlock(); ol.startIndexList(); - PageInfo *pi=exampleList.first(); - while (pi) + PageSDictIterator pdi(*exampleSDict); + PageInfo *pi=0; + for (pdi.toFirst();(pi=pdi.current());++pdi) { ol.writeListItem(); QCString n=convertFileName(pi->name)+"-example"; @@ -1398,7 +1488,6 @@ void writeExampleIndex(OutputList &ol) if (hasHtmlHelp) htmlHelp->addContentsItem(pi->name,n); } ol.writeString("\n"); - pi=exampleList.next(); } ol.endIndexList(); if (hasHtmlHelp) @@ -1414,7 +1503,7 @@ void writeExampleIndex(OutputList &ol) void writePageIndex(OutputList &ol) { - if (pageList.count()==0) return; + if (pageSDict->count()==0) return; ol.pushGeneratorState(); ol.disable(OutputGenerator::Man); startFile(ol,"pages","Page Index"); @@ -1436,8 +1525,9 @@ void writePageIndex(OutputList &ol) //ol.newParagraph(); ol.endTextBlock(); ol.startIndexList(); - PageInfo *pi=pageList.first(); - while (pi) + PageSDictIterator pdi(*pageSDict); + PageInfo *pi=0; + for (pdi.toFirst();(pi=pdi.current());++pdi) { QCString pageName,pageTitle; @@ -1457,7 +1547,6 @@ void writePageIndex(OutputList &ol) ol.writeEndAnnoItem(pageName); ol.writeString("\n"); if (hasHtmlHelp) htmlHelp->addContentsItem(pageTitle,pageName); - pi=pageList.next(); } ol.endIndexList(); if (hasHtmlHelp) @@ -1699,7 +1788,7 @@ void writeIndex(OutputList &ol) parseText(ol,projPrefix+theTranslator->trFileIndex()); ol.endIndexSection(isFileIndex); } - if (pageList.count()>0) + if (pageSDict->count()>0) { ol.startIndexSection(isPageIndex); parseText(ol,projPrefix+theTranslator->trPageIndex())