summaryrefslogtreecommitdiffstats
path: root/src/mangen.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2001-06-10 14:32:16 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2001-06-10 14:32:16 (GMT)
commitdf80e2787c543a3b48f775fbd5c18723abe64a07 (patch)
treee7d24c06a9c225fe4a29004a178cc28a435cdc67 /src/mangen.cpp
parentfcea664faa6475ff88208a719b50390b686e8930 (diff)
downloadDoxygen-df80e2787c543a3b48f775fbd5c18723abe64a07.zip
Doxygen-df80e2787c543a3b48f775fbd5c18723abe64a07.tar.gz
Doxygen-df80e2787c543a3b48f775fbd5c18723abe64a07.tar.bz2
Release-1.2.8.1
Diffstat (limited to 'src/mangen.cpp')
-rw-r--r--src/mangen.cpp61
1 files changed, 27 insertions, 34 deletions
diff --git a/src/mangen.cpp b/src/mangen.cpp
index ad3e63a..d4bd0aa 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -97,45 +97,38 @@ void ManGenerator::init()
static QCString buildFileName(const char *name)
{
- QCString fileName=name;
+ QCString fileName;
-#if 0
- // TODO: do something sensible here.
- if (fileName.left(6)=="class_")
+ const char *p=name;
+ char c;
+ while ((c=*p++))
{
- fileName=fileName.right(fileName.length()-6);
- }
- else if (fileName.left(10)=="interface_")
- {
- fileName=fileName.right(fileName.length()-10);
- }
- else if (fileName.left(7)=="struct_")
- {
- fileName=fileName.right(fileName.length()-7);
- }
- else if (fileName.left(6)=="union_")
- {
- fileName=fileName.right(fileName.length()-6);
- }
- else if (fileName.left(10)=="exception_")
- {
- fileName=fileName.right(fileName.length()-10);
- }
- else if (fileName.left(6)=="group_")
- {
- fileName=fileName.right(fileName.length()-6);
- }
-
- int i;
- if ((i=fileName.findRev('.'))!=-1)
- {
- fileName=fileName.left(i);
+ switch (c)
+ {
+ case ':':
+ fileName+="_";
+ if (*p==':') p++;
+ break;
+ case '<':
+ case '>':
+ case '&':
+ case '*':
+ case '!':
+ case '^':
+ case '~':
+ case '%':
+ case '+':
+ fileName+="_";
+ break;
+ default:
+ fileName+=c;
+ }
}
-#endif
- if (convertToQCString(fileName.right(2))!=Config_getString("MAN_EXTENSION"))
+ QCString &manExtension = Config_getString("MAN_EXTENSION");
+ if (convertToQCString(fileName.right(2))!=manExtension)
{
- fileName+=Config_getString("MAN_EXTENSION");
+ fileName+=manExtension;
}
return fileName;