diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-06-10 14:32:16 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-06-10 14:32:16 (GMT) |
commit | 6bcfa2ef74dee5be64110aa0b06b368d498c9a73 (patch) | |
tree | e7d24c06a9c225fe4a29004a178cc28a435cdc67 /src/mangen.cpp | |
parent | c2107e15c87bc0b964d333e24ec193c1a2d27335 (diff) | |
download | Doxygen-6bcfa2ef74dee5be64110aa0b06b368d498c9a73.zip Doxygen-6bcfa2ef74dee5be64110aa0b06b368d498c9a73.tar.gz Doxygen-6bcfa2ef74dee5be64110aa0b06b368d498c9a73.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; |