summaryrefslogtreecommitdiffstats
path: root/src/mangen.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2001-05-24 16:25:58 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2001-05-24 16:25:58 (GMT)
commitcd76bda7e377a14bd6b3d321425cf462a46a3f75 (patch)
tree8572e4828627ab6b9a6d55d425469176c0c02e0b /src/mangen.cpp
parent9b3aec9323189f25f4abb131b5a783fa110f45f6 (diff)
downloadDoxygen-cd76bda7e377a14bd6b3d321425cf462a46a3f75.zip
Doxygen-cd76bda7e377a14bd6b3d321425cf462a46a3f75.tar.gz
Doxygen-cd76bda7e377a14bd6b3d321425cf462a46a3f75.tar.bz2
Release-1.2.7-20010524
Diffstat (limited to 'src/mangen.cpp')
-rw-r--r--src/mangen.cpp55
1 files changed, 53 insertions, 2 deletions
diff --git a/src/mangen.cpp b/src/mangen.cpp
index 2082e2b..bdf3795 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -27,6 +27,7 @@
#include "config.h"
#include "util.h"
#include "doxygen.h"
+#include <string.h>
static QCString getExtension()
{
@@ -94,10 +95,11 @@ void ManGenerator::init()
}
}
-void ManGenerator::startFile(const char *name,const char *,bool)
+static QCString buildFileName(const char *name)
{
QCString fileName=name;
+#if 0
// TODO: do something sensible here.
if (fileName.left(6)=="class_")
{
@@ -129,11 +131,20 @@ void ManGenerator::startFile(const char *name,const char *,bool)
{
fileName=fileName.left(i);
}
+#endif
+
if (convertToQCString(fileName.right(2))!=Config_getString("MAN_EXTENSION"))
{
fileName+=Config_getString("MAN_EXTENSION");
}
- startPlainFile(fileName);
+
+ return fileName;
+}
+
+void ManGenerator::startFile(const char *,const char *manName,
+ const char *,bool)
+{
+ startPlainFile( buildFileName( manName ) );
firstCol=TRUE;
}
@@ -361,6 +372,46 @@ void ManGenerator::startMemberDoc(const char *,const char *,const char *,const c
paragraph=FALSE;
}
+void ManGenerator::startDoxyAnchor(const char *fname,const char *,
+ const char *name)
+{
+ const char *basename;
+
+ // something to be done?
+ if( !Config_getBool("MAN_LINKS") )
+ {
+ return; // no
+ }
+
+ // truncate after an (optional) ::
+ basename = strrchr( name, ':' );
+ if ( !basename )
+ {
+ basename = name;
+ }
+ else
+ {
+ basename++;
+ }
+
+ // only create file when it doesn't exist
+ QCString fileName=dir+"/"+buildFileName( basename );
+ QFile linkfile( fileName );
+ if ( !linkfile.open( IO_ReadOnly ) )
+ {
+ if ( linkfile.open( IO_WriteOnly ) )
+ {
+ QTextStream linkstream;
+ linkstream.setDevice(&linkfile);
+#if QT_VERSION >= 200
+ linkstream.setEncoding(QTextStream::Latin1);
+#endif
+ linkstream << ".so man" << getExtension() << "/" << buildFileName( fname ) << endl;
+ }
+ }
+ linkfile.close();
+}
+
void ManGenerator::endMemberDoc()
{
t << "\"";