summaryrefslogtreecommitdiffstats
path: root/src/mangen.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2001-06-17 15:02:31 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2001-06-17 15:02:31 (GMT)
commitd5150cf4f1de010ad62f6de641532805ba81940a (patch)
tree4174efd197ffb98e336e31881c5c95fa3e09cbcc /src/mangen.cpp
parentdf80e2787c543a3b48f775fbd5c18723abe64a07 (diff)
downloadDoxygen-d5150cf4f1de010ad62f6de641532805ba81940a.zip
Doxygen-d5150cf4f1de010ad62f6de641532805ba81940a.tar.gz
Doxygen-d5150cf4f1de010ad62f6de641532805ba81940a.tar.bz2
Release-1.2.8-20010617
Diffstat (limited to 'src/mangen.cpp')
-rw-r--r--src/mangen.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mangen.cpp b/src/mangen.cpp
index d4bd0aa..36d23e1 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -366,7 +366,7 @@ void ManGenerator::startMemberDoc(const char *,const char *,const char *,const c
}
void ManGenerator::startDoxyAnchor(const char *,const char *manName,
- const char *, const char *)
+ const char *, const char *name)
{
// something to be done?
if( !Config_getBool("MAN_LINKS") )
@@ -374,9 +374,16 @@ void ManGenerator::startDoxyAnchor(const char *,const char *manName,
return; // no
}
- // only create file when it doesn't exist
- QCString fileName=dir+"/"+buildFileName( manName );
+ // the name of the link file is derived from the name of the anchor:
+ // - truncate after an (optional) ::
+ QCString baseName = name;
+ int i=baseName.findRev(':');
+ if (i!=-1) baseName=baseName.right(baseName.length()-i-1);
+
+ // - remove dangerous characters and append suffix, then add dir prefix
+ QCString fileName=dir+"/"+buildFileName( baseName );
QFile linkfile( fileName );
+ // - only create file if it doesn't exist already
if ( !linkfile.open( IO_ReadOnly ) )
{
if ( linkfile.open( IO_WriteOnly ) )