summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-01-01 10:28:09 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2021-01-01 10:28:09 (GMT)
commiteec3c9ab5eb881d596b489f1f6024e4ac29f23ce (patch)
treeff00d09df7c51e53b6c93d374ad2cec63816499e
parent54d939984cd99ee3414f6b8aee3a90a134ba8677 (diff)
downloadDoxygen-eec3c9ab5eb881d596b489f1f6024e4ac29f23ce.zip
Doxygen-eec3c9ab5eb881d596b489f1f6024e4ac29f23ce.tar.gz
Doxygen-eec3c9ab5eb881d596b489f1f6024e4ac29f23ce.tar.bz2
Refactoring: remove unused Doxygen::htmlDirMap
-rw-r--r--src/doxygen.cpp1
-rw-r--r--src/doxygen.h1
-rw-r--r--src/util.cpp43
3 files changed, 2 insertions, 43 deletions
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index bd2f69e..4c66014 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -146,7 +146,6 @@ SearchIndexIntf *Doxygen::searchIndex=0;
SymbolMap<Definition> Doxygen::symbolMap;
QDict<Definition> *Doxygen::clangUsrMap = 0;
bool Doxygen::outputToWizard=FALSE;
-QDict<int> * Doxygen::htmlDirMap = 0;
Cache<std::string,LookupInfo> *Doxygen::lookupCache;
DirLinkedMap *Doxygen::dirLinkedMap;
SDict<DirRelation> Doxygen::dirRelations(257);
diff --git a/src/doxygen.h b/src/doxygen.h
index a75618c..2ce27bd 100644
--- a/src/doxygen.h
+++ b/src/doxygen.h
@@ -126,7 +126,6 @@ class Doxygen
static SymbolMap<Definition> symbolMap;
static QDict<Definition> *clangUsrMap;
static bool outputToWizard;
- static QDict<int> *htmlDirMap;
static Cache<std::string,LookupInfo> *lookupCache;
static DirLinkedMap *dirLinkedMap;
static SDict<DirRelation> dirRelations;
diff --git a/src/util.cpp b/src/util.cpp
index b520505..d64994b 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -83,17 +83,6 @@
//------------------------------------------------------------------------
-// selects one of the name to sub-dir mapping algorithms that is used
-// to select a sub directory when CREATE_SUBDIRS is set to YES.
-
-#define ALGO_COUNT 1
-#define ALGO_CRC16 2
-#define ALGO_MD5 3
-
-//#define MAP_ALGO ALGO_COUNT
-//#define MAP_ALGO ALGO_CRC16
-#define MAP_ALGO ALGO_MD5
-
#define REL_PATH_TO_ROOT "../../"
static const char *hex = "0123456789ABCDEF";
@@ -3834,40 +3823,12 @@ QCString convertNameToFile(const char *name,bool allowDots,bool allowUnderscore)
{
int l1Dir=0,l2Dir=0;
-#if MAP_ALGO==ALGO_COUNT
- // old algorithm, has the problem that after regeneration the
- // output can be located in a different dir.
- if (Doxygen::htmlDirMap==0)
- {
- Doxygen::htmlDirMap=new QDict<int>(100003);
- Doxygen::htmlDirMap->setAutoDelete(TRUE);
- }
- static int curDirNum=0;
- int *dirNum = Doxygen::htmlDirMap->find(result);
- if (dirNum==0) // new name
- {
- Doxygen::htmlDirMap->insert(result,new int(curDirNum));
- l1Dir = (curDirNum)&0xf; // bits 0-3
- l2Dir = (curDirNum>>4)&0xff; // bits 4-11
- curDirNum++;
- }
- else // existing name
- {
- l1Dir = (*dirNum)&0xf; // bits 0-3
- l2Dir = ((*dirNum)>>4)&0xff; // bits 4-11
- }
-#elif MAP_ALGO==ALGO_CRC16
- // second algorithm based on CRC-16 checksum
- int dirNum = qChecksum(result,result.length());
- l1Dir = dirNum&0xf;
- l2Dir = (dirNum>>4)&0xff;
-#elif MAP_ALGO==ALGO_MD5
- // third algorithm based on MD5 hash
+ // compute md5 hash to determine sub directory to use
uchar md5_sig[16];
MD5Buffer((const unsigned char *)result.data(),result.length(),md5_sig);
l1Dir = md5_sig[14]&0xf;
l2Dir = md5_sig[15];
-#endif
+
result.prepend(QCString().sprintf("d%x/d%02x/",l1Dir,l2Dir));
}
//printf("*** convertNameToFile(%s)->%s\n",name,result.data());