summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentation.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-10-10 15:23:35 (GMT)
committerBrad King <brad.king@kitware.com>2008-10-10 15:23:35 (GMT)
commit5a82a0b1084096b9ba0a769d3319ba804d20d227 (patch)
tree74ccb137de52bcd7d8c0199044e04ee901878157 /Source/cmDocumentation.h
parent657627c231caac9fe816f24ec2e98b895d13292a (diff)
downloadCMake-5a82a0b1084096b9ba0a769d3319ba804d20d227.zip
CMake-5a82a0b1084096b9ba0a769d3319ba804d20d227.tar.gz
CMake-5a82a0b1084096b9ba0a769d3319ba804d20d227.tar.bz2
ENH: Improve generated documentation formatting
Applying patch provided in issue #7797. Fixes to man-pages: - Character '-' must be espaced as '\-' - Surround preformatted text with '.nf' and '.fi' to adjust filling - Give every page a NAME section for indexing by mandb - Pass the man page filename without extension to .TH in its header Also added a title to the HTML header.
Diffstat (limited to 'Source/cmDocumentation.h')
-rw-r--r--Source/cmDocumentation.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h
index c1b98d3..d6cdf8c 100644
--- a/Source/cmDocumentation.h
+++ b/Source/cmDocumentation.h
@@ -61,7 +61,7 @@ public:
bool PrintRequestedDocumentation(std::ostream& os);
/** Print help of the given type. */
- bool PrintDocumentation(Type ht, std::ostream& os);
+ bool PrintDocumentation(Type ht, std::ostream& os, const char* docname=0);
/** Set the program name for standard document generation. */
void SetName(const char* name);
@@ -124,6 +124,7 @@ public:
private:
void SetForm(Form f);
+ void SetDocName(const char* docname);
bool CreateSingleModule(const char* fname,
const char* moduleName,
@@ -134,6 +135,8 @@ private:
bool CreateCustomModulesSection();
void CreateFullDocumentation();
+ void AddDocumentIntroToPrint(const char* intro[2]);
+
bool PrintCopyright(std::ostream& os);
bool PrintVersion(std::ostream& os);
bool PrintDocumentationGeneric(std::ostream& os, const char *section);
@@ -157,9 +160,12 @@ private:
const char* GetNameString() const;
+ const char* GetDocName(bool fallbackToNameString = true) const;
+ const char* GetDefaultDocName(Type ht) const;
bool IsOption(const char* arg) const;
std::string NameString;
+ std::string DocName;
std::map<std::string,cmDocumentationSection*> AllSections;
std::string SeeAlsoString;