Permalink
Browse files

For manpages remove trailing dash when no brief description

  • Loading branch information...
artur-kink committed Sep 25, 2016
1 parent d4beb39 commit 98d3f8e7d581c589e7bd1a7faf98fc6736847cf1
Showing with 35 additions and 9 deletions.
  1. +3 −0 src/classdef.cpp
  2. +4 −1 src/dirdef.cpp
  3. +4 −1 src/filedef.cpp
  4. +12 −5 src/groupdef.cpp
  5. +1 −1 src/mangen.cpp
  6. +3 −0 src/namespacedef.cpp
  7. +8 −1 src/pagedef.cpp
View
@@ -954,6 +954,9 @@ void ClassDef::writeBriefDescription(OutputList &ol,bool exampleFlag)
if (hasBriefDescription())
{
ol.startParagraph();
ol.disableAllBut(OutputGenerator::Man);
ol.writeString(" - ");
ol.enableAll();
ol.generateDoc(briefFile(),briefLine(),this,0,
briefDescription(),TRUE,FALSE,0,TRUE,FALSE);
ol.pushGeneratorState();
View
@@ -170,13 +170,16 @@ void DirDef::writeDetailedDescription(OutputList &ol,const QCString &title)
void DirDef::writeBriefDescription(OutputList &ol)
{
if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
if (hasBriefDescription())
{
DocRoot *rootNode = validatingParseDoc(
briefFile(),briefLine(),this,0,briefDescription(),TRUE,FALSE);
if (rootNode && !rootNode->isEmpty())
{
ol.startParagraph();
ol.disableAllBut(OutputGenerator::Man);
ol.writeString(" - ");
ol.enableAll();
ol.writeDoc(rootNode,this,0);
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
View
@@ -365,14 +365,17 @@ void FileDef::writeDetailedDescription(OutputList &ol,const QCString &title)
void FileDef::writeBriefDescription(OutputList &ol)
{
if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
if (hasBriefDescription())
{
DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
briefDescription(),TRUE,FALSE,0,TRUE,FALSE);
if (rootNode && !rootNode->isEmpty())
{
ol.startParagraph();
ol.disableAllBut(OutputGenerator::Man);
ol.writeString(" - ");
ol.enableAll();
ol.writeDoc(rootNode,this,0);
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
View
@@ -711,8 +711,11 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title)
|| !documentation().isEmpty() || !inbodyDocumentation().isEmpty()
)
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Man); // always print title for man page
if (pageDict->count()!=countMembers()) // not only pages -> classical layout
{
ol.enableAll();
ol.pushGeneratorState();
ol.disable(OutputGenerator::Html);
ol.writeRuler();
@@ -721,10 +724,11 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title)
ol.disableAllBut(OutputGenerator::Html);
ol.writeAnchor(0,"details");
ol.popGeneratorState();
ol.startGroupHeader();
ol.parseText(title);
ol.endGroupHeader();
}
ol.startGroupHeader();
ol.parseText(title);
ol.endGroupHeader();
ol.popGeneratorState();
// repeat brief description
if (!briefDescription().isEmpty() && Config_getBool(REPEAT_BRIEF))
@@ -762,13 +766,16 @@ void GroupDef::writeDetailedDescription(OutputList &ol,const QCString &title)
void GroupDef::writeBriefDescription(OutputList &ol)
{
if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC))
if (hasBriefDescription())
{
DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
briefDescription(),TRUE,FALSE,0,TRUE,FALSE);
if (rootNode && !rootNode->isEmpty())
{
ol.startParagraph();
ol.disableAllBut(OutputGenerator::Man);
ol.writeString(" - ");
ol.enableAll();
ol.writeDoc(rootNode,this,0);
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
@@ -789,6 +796,7 @@ void GroupDef::writeBriefDescription(OutputList &ol)
}
delete rootNode;
}
ol.writeSynopsis();
}
void GroupDef::writeGroupGraph(OutputList &ol)
@@ -1091,7 +1099,6 @@ void GroupDef::writeDocumentation(OutputList &ol)
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Man);
ol.endTitleHead(getOutputFileBase(),name());
ol.parseText(title);
ol.popGeneratorState();
ol.endHeaderSection();
ol.startContents();
View
@@ -191,7 +191,7 @@ void ManGenerator::endTitleHead(const char *,const char *name)
t << ".ad l" << endl;
t << ".nh" << endl;
t << ".SH NAME" << endl;
t << name << " \\- ";
t << name;
firstCol=FALSE;
paragraph=TRUE;
inHeader=TRUE;
View
@@ -408,6 +408,9 @@ void NamespaceDef::writeBriefDescription(OutputList &ol)
if (rootNode && !rootNode->isEmpty())
{
ol.startParagraph();
ol.disableAllBut(OutputGenerator::Man);
ol.writeString(" - ");
ol.enableAll();
ol.writeDoc(rootNode,this,0);
ol.pushGeneratorState();
ol.disable(OutputGenerator::RTF);
View
@@ -229,12 +229,19 @@ void PageDef::writePageDocumentation(OutputList &ol)
}
ol.startTextBlock();
QCString docStr = documentation()+inbodyDocumentation();
if (!docStr.isEmpty())
{
ol.disableAllBut(OutputGenerator::Man);
ol.writeString(" - ");
ol.enableAll();
}
ol.generateDoc(
docFile(), // fileName
docLine(), // startLine
this, // context
0, // memberdef
documentation()+inbodyDocumentation(), // docStr
docStr, // docStr
TRUE, // index words
FALSE // not an example
);

0 comments on commit 98d3f8e

Please sign in to comment.