summaryrefslogtreecommitdiffstats
path: root/src/mangen.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2001-05-24 16:25:58 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2001-05-24 16:25:58 (GMT)
commit9c04d0ffef418ec6c771a0afa4679a4e508ba710 (patch)
tree8572e4828627ab6b9a6d55d425469176c0c02e0b /src/mangen.cpp
parent9ca6896b9e1e932f3ddf11bb74a9f80d5560044e (diff)
downloadDoxygen-9c04d0ffef418ec6c771a0afa4679a4e508ba710.zip
Doxygen-9c04d0ffef418ec6c771a0afa4679a4e508ba710.tar.gz
Doxygen-9c04d0ffef418ec6c771a0afa4679a4e508ba710.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 << "\"";