diff options
Diffstat (limited to 'Source/cmDocumentationFormatterMan.cxx')
-rw-r--r-- | Source/cmDocumentationFormatterMan.cxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Source/cmDocumentationFormatterMan.cxx b/Source/cmDocumentationFormatterMan.cxx index 79a3b25..4123c85 100644 --- a/Source/cmDocumentationFormatterMan.cxx +++ b/Source/cmDocumentationFormatterMan.cxx @@ -19,9 +19,15 @@ cmDocumentationFormatterMan::cmDocumentationFormatterMan() :cmDocumentationFormatter() +,ManSection(1) { } +void cmDocumentationFormatterMan::SetManSection(int manSection) +{ + this->ManSection = manSection; +} + void cmDocumentationFormatterMan ::PrintSection(std::ostream& os, const cmDocumentationSection §ion, @@ -32,9 +38,9 @@ void cmDocumentationFormatterMan os << ".SH " << name << "\n"; } - const std::vector<cmDocumentationEntry> &entries = + const std::vector<cmDocumentationEntry> &entries = section.GetEntries(); - for(std::vector<cmDocumentationEntry>::const_iterator op = entries.begin(); + for(std::vector<cmDocumentationEntry>::const_iterator op = entries.begin(); op != entries.end(); ++op) { if(op->Name.size()) @@ -58,7 +64,7 @@ void cmDocumentationFormatterMan::EscapeText(std::string& man_text) cmSystemTools::ReplaceString(man_text, "-", "\\-"); } -void cmDocumentationFormatterMan::PrintPreformatted(std::ostream& os, +void cmDocumentationFormatterMan::PrintPreformatted(std::ostream& os, const char* text) { std::string man_text = text; @@ -69,7 +75,7 @@ void cmDocumentationFormatterMan::PrintPreformatted(std::ostream& os, os << ".fi\n\n"; } -void cmDocumentationFormatterMan::PrintParagraph(std::ostream& os, +void cmDocumentationFormatterMan::PrintParagraph(std::ostream& os, const char* text) { std::string man_text = text; @@ -87,7 +93,7 @@ void cmDocumentationFormatterMan::PrintHeader(const char* docname, this->EscapeText(s_docname); this->EscapeText(s_appname); - os << ".TH " << s_docname << " 1 \"" + os << ".TH " << s_docname << " " << this->ManSection << " \"" << cmSystemTools::GetCurrentDateTime("%B %d, %Y").c_str() << "\" \"" << s_appname << " " << cmVersion::GetCMakeVersion() |