diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2005-09-18 19:25:32 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2005-09-18 19:25:32 (GMT) |
commit | db36de70fc9090e26c22ab288492407becb3a95e (patch) | |
tree | b25e22f178d0e6d1ebb7e74f2348e9811a2f5394 /src/dirdef.cpp | |
parent | 3b98221d43ba62088538ead3aa726f81dd9202f9 (diff) | |
download | Doxygen-db36de70fc9090e26c22ab288492407becb3a95e.zip Doxygen-db36de70fc9090e26c22ab288492407becb3a95e.tar.gz Doxygen-db36de70fc9090e26c22ab288492407becb3a95e.tar.bz2 |
Release-1.4.4-20050918
Diffstat (limited to 'src/dirdef.cpp')
-rw-r--r-- | src/dirdef.cpp | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/dirdef.cpp b/src/dirdef.cpp index 2ca264f..0e9a898 100644 --- a/src/dirdef.cpp +++ b/src/dirdef.cpp @@ -66,10 +66,33 @@ void DirDef::addFile(FileDef *fd) fd->setDirDef(this); } +static QCString escapeDirName(const QCString &anchor) +{ + QCString result; + int l = anchor.length(),i; + for (i=0;i<l;i++) + { + char c = anchor.at(i); + if ((c>='a' && c<='z') || (c>='A' && c<='Z') || (c>='0' && c<='9')) + { + result+=c; + } + else + { + static char hexStr[]="0123456789ABCDEF"; + char escChar[]={ '_', 0, 0, 0 }; + escChar[1]=hexStr[c>>4]; + escChar[2]=hexStr[c&0xf]; + result+=escChar; + } + } + return result; +} + QCString DirDef::getOutputFileBase() const { - //return "dir_"+convertNameToFile(name()); - return QCString().sprintf("dir_%06d",m_dirCount); + return "dir_"+escapeDirName(name()); + //return QCString().sprintf("dir_%06d",m_dirCount); } void DirDef::writeDetailedDocumentation(OutputList &ol) |