--- index.cpp.orig	2006-07-16 22:10:06.000000000 +0200
+++ index.cpp	2006-08-01 09:26:03.177299500 +0200
@@ -1140,7 +1140,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())
       {
@@ -1507,6 +1507,26 @@
 
 //----------------------------------------------------------------------------
 
+class PrefixIgnoreMemberNameSDict : public MemberNameSDict
+{
+public:
+  PrefixIgnoreMemberNameSDict(int size) : MemberNameSDict(size) {}
+  ~PrefixIgnoreMemberNameSDict() {}
+
+  virtual int compareItems(GCI item1, GCI item2)
+  {
+    MemberName *c1=(MemberName *)item1;
+    MemberName *c2=(MemberName *)item2;
+
+    QCString n1 = c1->memberName();
+    n1.remove (0, getPrefixIndex(n1));
+    QCString n2 = c2->memberName();
+    n2.remove (0, getPrefixIndex(n2));
+    
+    return stricmp (n1, n2);
+  }
+};
+
 void writeMemberList(OutputList &ol,bool useSections,
     ClassMemberHighlight filter,char sectionFilter)
 {
@@ -1514,11 +1534,22 @@
   char lastChar = 0;
   static bool hideFriendCompounds = Config_getBool("HIDE_FRIEND_COMPOUNDS");
 
-  MemberNameSDict::Iterator mnli(Doxygen::memberNameSDict);
+  MemberNameSDict::Iterator mnli_unsorted(Doxygen::memberNameSDict);
   MemberName *mn=0;
+  
+  // Make a new list sorted without prefix
+  PrefixIgnoreMemberNameSDict prefixIgnoreMemberNameSDict(10000);
+  for (mnli_unsorted.toFirst();(mn=mnli_unsorted.current());++mnli_unsorted) {
+      prefixIgnoreMemberNameSDict.inSort(mn->memberName(), mn);
+  }
+  MemberNameSDict::Iterator mnli(prefixIgnoreMemberNameSDict);
+
   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;
@@ -1557,11 +1588,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);
@@ -1653,7 +1686,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,11 +1868,23 @@
 {
   char lastChar=0;
   bool first=TRUE;
-  MemberNameSDict::Iterator mnli(Doxygen::functionNameSDict);
+  
+  MemberNameSDict::Iterator mnli_unsorted(Doxygen::functionNameSDict);
   MemberName *mn=0;
+  
+  // Make a new list sorted without prefix
+  PrefixIgnoreMemberNameSDict prefixIgnoreMemberNameSDict(10000);
+  for (mnli_unsorted.toFirst();(mn=mnli_unsorted.current());++mnli_unsorted) {
+      prefixIgnoreMemberNameSDict.inSort(mn->memberName(), mn);
+  }
+  MemberNameSDict::Iterator mnli(prefixIgnoreMemberNameSDict);
+
   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;
@@ -1873,11 +1918,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);
@@ -1966,11 +2013,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);
@@ -2043,7 +2092,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
@@ -2085,7 +2134,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;
       }
