summaryrefslogtreecommitdiffstats
path: root/src/mangen.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2001-04-30 17:28:34 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2001-04-30 17:28:34 (GMT)
commit3e8e2e531ac41a9d4729375151b6af6493a61fd7 (patch)
treee2fe643e6fc6aabac8311560e2258318c1dead5a /src/mangen.cpp
parent9a1a3728724df58e6fc9196651f8e8c8f23f1e2d (diff)
downloadDoxygen-3e8e2e531ac41a9d4729375151b6af6493a61fd7.zip
Doxygen-3e8e2e531ac41a9d4729375151b6af6493a61fd7.tar.gz
Doxygen-3e8e2e531ac41a9d4729375151b6af6493a61fd7.tar.bz2
Release-1.2.7
Diffstat (limited to 'src/mangen.cpp')
-rw-r--r--src/mangen.cpp45
1 files changed, 36 insertions, 9 deletions
diff --git a/src/mangen.cpp b/src/mangen.cpp
index 68a59ed..758be75 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -15,6 +15,9 @@
*
*/
+/* http://www.cubic.org/source/archive/fileform/txt/man/ has some
+ nice introductions to groff and man pages. */
+
#include <stdlib.h>
#include "qtbc.h"
@@ -187,14 +190,14 @@ void ManGenerator::writeMailLink(const char *url)
void ManGenerator::startGroupHeader()
{
if (!firstCol) t << endl;
- t << ".SH ";
+ t << ".SH \"";
upperCase=TRUE;
firstCol=FALSE;
}
void ManGenerator::endGroupHeader()
{
- t << "\n.PP " << endl;
+ t << "\"\n.PP " << endl;
firstCol=TRUE;
paragraph=TRUE;
upperCase=FALSE;
@@ -203,12 +206,12 @@ void ManGenerator::endGroupHeader()
void ManGenerator::startMemberHeader()
{
if (!firstCol) t << endl;
- t << ".SS ";
+ t << ".SS \"";
}
void ManGenerator::endMemberHeader()
{
- t << "\n";
+ t << "\"\n";
firstCol=TRUE;
paragraph=FALSE;
}
@@ -225,6 +228,7 @@ void ManGenerator::docify(const char *str)
{
case '\\': t << "\\\\"; col++; break;
case '\n': t << "\n"; col=0; break;
+ case '\"': c = '\''; // no break!
default: t << c; col++; break;
}
}
@@ -254,6 +258,7 @@ void ManGenerator::codify(const char *str)
break;
case '\n': t << "\n"; firstCol=TRUE; col=0; break;
case '\\': t << "\\"; col++; break;
+ case '\"': c = '\''; // no break!
default: t << c; firstCol=FALSE; col++; break;
}
}
@@ -269,6 +274,7 @@ void ManGenerator::writeChar(char c)
switch (c)
{
case '\\': t << "\\\\"; break;
+ case '\"': c = '\''; // no break!
default: t << c; break;
}
//printf("%c",c);fflush(stdout);
@@ -288,11 +294,16 @@ void ManGenerator::startDescList()
void ManGenerator::startTitle()
{
if (!firstCol) t << endl;
- t << ".SH ";
+ t << ".SH \"";
firstCol=FALSE;
paragraph=FALSE;
}
+void ManGenerator::endTitle()
+{
+ t << "\"";
+}
+
void ManGenerator::writeListItem()
{
if (!firstCol) t << endl;
@@ -322,27 +333,43 @@ void ManGenerator::endCodeFragment()
void ManGenerator::startMemberDoc(const char *,const char *,const char *,const char *)
{
if (!firstCol) t << endl;
- t << ".SS ";
+ t << ".SS \"";
firstCol=FALSE;
paragraph=FALSE;
}
+void ManGenerator::endMemberDoc()
+{
+ t << "\"";
+}
+
void ManGenerator::startSubsection()
{
if (!firstCol) t << endl;
- t << ".SS ";
+ t << ".SS \"";
firstCol=FALSE;
paragraph=FALSE;
}
+void ManGenerator::endSubsection()
+{
+ t << "\"";
+}
+
+
void ManGenerator::startSubsubsection()
{
if (!firstCol) t << endl;
- t << "\n.SS ";
+ t << "\n.SS \"";
firstCol=FALSE;
paragraph=FALSE;
}
+void ManGenerator::endSubsubsection()
+{
+ t << "\"";
+}
+
void ManGenerator::writeSynopsis()
{
if (!firstCol) t << endl;
@@ -420,7 +447,7 @@ void ManGenerator::startMemberGroupHeader(bool)
void ManGenerator::endMemberGroupHeader()
{
- t << "\\fR\"\n.br\n";
+ t << "\\fP\"\n.br\n";
firstCol=TRUE;
}