summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog/ccmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-02-19 01:42:02 (GMT)
committerBrad King <brad.king@kitware.com>2003-02-19 01:42:02 (GMT)
commit5e18bec8f76a811e48d2c31a954d0de44e8c5c11 (patch)
tree7c9f61e2a5d552f3ce69c2dd80618edc2cdf0af2 /Source/CursesDialog/ccmake.cxx
parentba56262ae21686670b26935d3a89cabc6f4d8a1f (diff)
downloadCMake-5e18bec8f76a811e48d2c31a954d0de44e8c5c11.zip
CMake-5e18bec8f76a811e48d2c31a954d0de44e8c5c11.tar.gz
CMake-5e18bec8f76a811e48d2c31a954d0de44e8c5c11.tar.bz2
ENH: Re-implemented document generation class to be more organized and more robust.
Diffstat (limited to 'Source/CursesDialog/ccmake.cxx')
-rw-r--r--Source/CursesDialog/ccmake.cxx19
1 files changed, 12 insertions, 7 deletions
diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx
index 47ae7ee..a9386a2 100644
--- a/Source/CursesDialog/ccmake.cxx
+++ b/Source/CursesDialog/ccmake.cxx
@@ -30,8 +30,8 @@
//----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationName[] =
{
- {"ccmake",
- "- Curses Interface for CMake.", 0},
+ {0,
+ " ccmake - Curses Interface for CMake.", 0},
{0,0,0}
};
@@ -39,7 +39,7 @@ static const cmDocumentationEntry cmDocumentationName[] =
static const cmDocumentationEntry cmDocumentationUsage[] =
{
{0,
- "ccmake <path-to-source>", 0},
+ " ccmake <path-to-source>", 0},
{0,0,0}
};
@@ -88,10 +88,15 @@ int main(int argc, char** argv)
cmDocumentation doc;
if(cmDocumentation::Type ht = doc.CheckOptions(argc, argv))
{
- doc.SetName(cmDocumentationName);
- doc.SetUsage(cmDocumentationUsage);
- doc.SetDescription(cmDocumentationDescription);
- doc.Print(ht, std::cout);
+ cmake hcm;
+ std::vector<cmDocumentationEntry> commands;
+ hcm.GetCommandDocumentation(commands);
+ doc.SetNameSection(cmDocumentationName);
+ doc.SetUsageSection(cmDocumentationUsage);
+ doc.SetDescriptionSection(cmDocumentationDescription);
+ doc.SetOptionsSection(0);
+ doc.SetCommandsSection(&commands[0]);
+ doc.PrintDocumentation(ht, std::cout);
return 0;
}