diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2001-06-10 14:32:16 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2001-06-10 14:32:16 (GMT) |
commit | df80e2787c543a3b48f775fbd5c18723abe64a07 (patch) | |
tree | e7d24c06a9c225fe4a29004a178cc28a435cdc67 /src/mangen.cpp | |
parent | fcea664faa6475ff88208a719b50390b686e8930 (diff) | |
download | Doxygen-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.cpp | 61 |
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; |