summaryrefslogtreecommitdiffstats
path: root/src/dirdef.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2005-09-18 19:25:32 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2005-09-18 19:25:32 (GMT)
commitba7233b1be8545e619d80a62dd274521392fbe1f (patch)
treeb25e22f178d0e6d1ebb7e74f2348e9811a2f5394 /src/dirdef.cpp
parent143b39e71a45892c2b8e8bf22f5d448b441bf36a (diff)
downloadDoxygen-ba7233b1be8545e619d80a62dd274521392fbe1f.zip
Doxygen-ba7233b1be8545e619d80a62dd274521392fbe1f.tar.gz
Doxygen-ba7233b1be8545e619d80a62dd274521392fbe1f.tar.bz2
Release-1.4.4-20050918
Diffstat (limited to 'src/dirdef.cpp')
-rw-r--r--src/dirdef.cpp27
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)