[PATCH] IGNORE_PREFIX for functions
"Eivind Magnus Hvidevold" <[email protected]>
| Newsgroups | gmane.text.doxygen.devel |
|---|---|
| Organization | Artwork Systems |
| Message-ID | <[email protected]> |
Hi! I'm using Doxygen on an SDK where all C functions have the same prefix. I used the IGNORE_PREFIX setting to get them indexed properly by first letter after the prefix, but they all kept going under the first letter of the prefix. So I searched the mailing lists for IGNORE_PREFIX and found that it just works for classes. Here is a patch which makes it work also for functions. I'd be happy if this or something similar could be merged. Do you think there should there be a separate config setting? I was thinking of something like IGNORE_PREFIX_FUNCTIONS with YES|NO (using the list from IGNORE_PREFIX) or containing another ignore list. I don't need that extra setting but maybe others do? -- EMH ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Doxygen-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/doxygen-develop
ignore_prefix_functions.patch
(application/octet-stream, 4.3 KB)
diff -Naur src.old/index.cpp src/index.cpp
--- src.old/index.cpp 2006-06-08 11:05:46.000000000 +0200
+++ src/index.cpp 2006-07-07 12:29:04.988703800 +0200
@@ -1136,7 +1136,7 @@
{
if (cd->isLinkableInProject() && cd->templateMaster()==0)
{
- int c = cd->displayName().at(0);
+ int c = cd->displayName().at(getPrefixIndex(cd->displayName()));
g_classIndexLetterUsed[CHL_All][c]=TRUE;
switch(cd->compoundType())
{
@@ -1514,7 +1514,10 @@
MemberName *mn=0;
for (mnli.toFirst();(mn=mnli.current());++mnli)
{
- if (sectionFilter==0 || tolower(sectionFilter)==tolower(mn->memberName()[0]))
+ QCString name = mn->memberName();
+ int startIndex = getPrefixIndex(name);
+ char indexLetter = tolower(name.at(startIndex));
+ if (sectionFilter==0 || tolower(sectionFilter)==indexLetter)
{
MemberDef *md=mn->first();
bool found=FALSE;
@@ -1553,11 +1556,13 @@
if (useSections)
{
QCString name = mn->memberName();
- if (tolower(name.at(0))!=lastChar)
+ int startIndex = getPrefixIndex(name);
+ char indexLetter = tolower(name.at(startIndex));
+ if (indexLetter!=lastChar)
{
if (!first) ol.endItemList();
char cs[2];
- lastChar=cs[0]=tolower(name.at(0));cs[1]='\0';
+ lastChar=cs[0]=indexLetter;cs[1]='\0';
QCString anchor=(QCString)"index_"+cs;
QCString title=(QCString)"- "+cs+" -";
ol.startSection(anchor,title,SectionInfo::Subsection);
@@ -1649,7 +1654,7 @@
if (found)
{
QCString n = mn->memberName();
- if (!n.isEmpty()) g_memberIndexLetterUsed[filter][tolower(n.at(0))]=TRUE;
+ if (!n.isEmpty()) g_memberIndexLetterUsed[filter][tolower(n.at(getPrefixIndex(n)))]=TRUE;
count++;
}
}
@@ -1835,7 +1840,10 @@
MemberName *mn=0;
for (mnli.toFirst();(mn=mnli.current());++mnli)
{
- if (sectionFilter==0 || tolower(sectionFilter)==tolower(mn->memberName()[0]))
+ QCString name = mn->memberName();
+ int startIndex = getPrefixIndex(name);
+ char indexLetter = tolower(name.at(startIndex));
+ if (sectionFilter==0 || tolower(sectionFilter)==indexLetter)
{
MemberDef *md=mn->first();
bool found=FALSE;
@@ -1869,11 +1877,13 @@
if (useSections)
{
QCString name = mn->memberName();
- if (tolower(name.at(0))!=lastChar)
+ int startIndex = getPrefixIndex(name);
+ char indexLetter = tolower(name.at(startIndex));
+ if (indexLetter!=lastChar)
{
if (!first) ol.endItemList();
char cs[2];
- lastChar=cs[0]=tolower(name.at(0));cs[1]='\0';
+ lastChar=cs[0]=indexLetter;cs[1]='\0';
QCString anchor=(QCString)"index_"+cs;
QCString title=(QCString)"- "+cs+" -";
ol.startSection(anchor,title,SectionInfo::Subsection);
@@ -1962,11 +1972,13 @@
if (useSections)
{
QCString name = mn->memberName();
- if (tolower(name.at(0))!=lastChar)
+ int startIndex = getPrefixIndex(name);
+ char indexLetter = tolower(name.at(startIndex));
+ if (indexLetter!=lastChar)
{
if (!first) ol.endItemList();
char cs[2];
- lastChar=cs[0]=tolower(name.at(0));cs[1]='\0';
+ lastChar=cs[0]=indexLetter;cs[1]='\0';
QCString anchor=(QCString)"index_"+cs;
QCString title=(QCString)"- "+cs+" -";
ol.startSection(anchor,title,SectionInfo::Subsection);
@@ -2039,7 +2051,7 @@
)
{
QCString n = mn->memberName();
- if (!n.isEmpty()) g_namespaceIndexLetterUsed[filter][tolower(n.at(0))]=TRUE;
+ if (!n.isEmpty()) g_namespaceIndexLetterUsed[filter][tolower(n.at(getPrefixIndex(n)))]=TRUE;
found=TRUE;
}
else
@@ -2081,7 +2093,7 @@
QCString n = mn->memberName();
if (!n.isEmpty())
{
- g_fileIndexLetterUsed[filter][tolower(n.at(0))]=TRUE;
+ g_fileIndexLetterUsed[filter][tolower(n.at(getPrefixIndex(n)))]=TRUE;
}
found=TRUE;
}